Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string.h>
- using namespace std;
- /*
- Manual - You can preety much compile this in any OS ,all you have to look after is
- that you open the file with existing powershell commands,this will encrypt the
- powershell shell code to an encrypted Format,(You can use your own techniques
- be creative with the encoding techniques)
- Author - S0urav (n0va)
- */
- class PowershellEncrypter{
- private:
- string shellCode;
- public:
- int encoder(){
- ifstream shell_reader("shellCode.n0va");
- while(getline(shell_reader,shellCode)){
- shell_reader >> shellCode;
- }
- shell_reader.close();
- //This is Where the Encoding Happens, After Encoding It Have no work
- int len_ofShell = shellCode.length();
- for(int i = 0;i<len_ofShell;i++){
- if(shellCode.at(i) == 112) shellCode.at(i) = shellCode.at(i) - 17;
- if(shellCode.at(i) == 113) shellCode.at(i) = shellCode.at(i) - 99;
- else shellCode.at(i) = shellCode.at(i) + 17;
- }
- ofstream shell_writer;
- shell_writer.open("shellCode.n0va",ios::trunc);
- shell_writer << shellCode;
- int newLen = shellCode.length();
- if(newLen == len_ofShell){
- return 0;
- }
- return 1;
- }
- };
- int main(){
- int temp;
- PowershellEncrypter psh;
- psh.encoder();
- cin >> temp;
- }
- /*NOT ONLY POWERSHELL SHELL-CODE BE CREATIVE TRY THIS WITH OTHER PAYLOADS AS WELL like (webDelivery)*/
Add Comment
Please, Sign In to add comment