|
Thread |
Forum |
Last Post |
Posts |
Views |
 |
Brauche mal Hilfe
Posted on: Sat 7. Sep 2013, 00:50
capo1337
Preview
Go To Post
Ich habs selber gemacht.. du hast mir überhaupt nicht geholfen
|
VB, C/C++, Delphi, etc |
Mon 9. Sep 2013, 17:01
by KN4CK3R
|
3 |
371 |
 |
Brauche mal Hilfe
Posted on: Sat 7. Sep 2013, 00:50
capo1337
Preview
Go To Post
Ich habe mal eine dll erstellt, die als Schnittstelle zwischen dem Opferprogramm und meiner Anwedung dient. Das hatte mal funktioniert aber nun gehts wieder nichtmehr -.- Ich habe eigentlich nix daran verändert.. Und nebenbei vielleicht ein paar Tipps, was man sauberer machen kann wäre nett von euch ^^ CPP Code: #define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <tlhelp32.h> #include <wchar.h> #include <cstdarg> #include <cstdio> #define EXPORT extern "C" __declspec(dllexport) //STRUCTS struct sCreateDialog { int style; char titel[65]; char text[1000]; char button1[65]; char button2[65]; }; //GLOBALS HANDLE g_hMod = NULL; HANDLE g_hGTA = NULL; DWORD g_dwGTAPID = 0; //EXPORTS EXPORT BOOL CreateDialog(int,char*,char*,char*,char*); //style,titel,text,button1,button2 EXPORT void CreateDialogEx(LPVOID); //INTERNE FUNKTIONEN BOOL ReadProcessMemoryPointer(HANDLE, LPCVOID, LPVOID,SIZE_T,SIZE_T *, int, ...); BOOL WriteProcessMemoryPointer(HANDLE, LPVOID, LPCVOID,SIZE_T,SIZE_T *, int, ...); HANDLE getProcHandle(); BOOL checkInjected(); BOOL Inject(); HANDLE getSampBase(); DWORD getPID(); //FUNKTIONEN EXPORT BOOL CreateDialog(int style, char* titel, char* text, char* button1, char* button2) { if(!titel || !text || !button1 || !button2) return FALSE; if(style<0 || style>3 || strlen(titel)>64 || strlen(text)>999 || strlen(button1)>64 || strlen(button2)>64) return FALSE; sCreateDialog s; s.style = style; strcpy_s(s.titel,titel); strcpy_s(s.text,text); strcpy_s(s.button1,button1); strcpy_s(s.button2,button2); if(!checkInjected()) return FALSE; HANDLE hProc = getProcHandle(); if(!hProc) return FALSE; LPVOID lpAddr = VirtualAllocEx(hProc, 0, sizeof(sCreateDialog), MEM_COMMIT|MEM_RESERVE, PAGE_EXECUTE_READWRITE); if(!lpAddr) { return FALSE; } BOOL bSuccess = WriteProcessMemory(hProc, lpAddr, (LPVOID)&s, sizeof(sCreateDialog), 0); if(!bSuccess) { return FALSE; } HANDLE hThread = CreateRemoteThread(hProc, 0, 0, (LPTHREAD_START_ROUTINE)GetProcAddress((HMODULE)g_hMod,"CreateDialogEx"), lpAddr, 0, 0); if(!hThread) { return FALSE; } WaitForSingleObject(hThread,INFINITE); CloseHandle(hThread); VirtualFreeEx(hProc,lpAddr,sizeof(sCreateDialog),MEM_RELEASE); return TRUE; } EXPORT void CreateDialogEx(LPVOID msg) { MessageBox(0,L"CreateDialogEx",0,MB_OK); if(!msg) return; sCreateDialog* sptr = (sCreateDialog*)msg; int style = sptr->style; char* titel = sptr->titel; char* text = sptr->text; char* button1 = sptr->button1; char* button2 = sptr->button2; DWORD addr = (DWORD)GetModuleHandle(L"samp.dll"); if(!addr) return; DWORD dialogptr = addr + 0x2129F8; DWORD func = addr + 0x806F0; __asm { mov eax, dword ptr[dialogptr] mov ecx, dword ptr[eax] push 0 push button2 push button1 push text push titel push style; push 0 call func } } ////////////////////////////////////////////////////////// BOOL ReadProcessMemoryPointer(HANDLE hProcess, LPCVOID lpBaseAddress, LPVOID lpBuffer,SIZE_T nSize,SIZE_T *lpNumberOfBytesRead, int nOffsets, ...) { if(nOffsets == 0) return ReadProcessMemory(hProcess,lpBaseAddress,lpBuffer,nSize,lpNumberOfBytesRead); va_list arguments; DWORD ptr = (DWORD)lpBaseAddress; va_start(arguments, nOffsets); for(int i=0;i<nOffsets;i++) { if( !ReadProcessMemory(hProcess,(LPVOID)ptr,&ptr,4,0) ) { va_end(arguments); return FALSE; } ptr += va_arg(arguments,DWORD); } va_end(arguments); return ReadProcessMemory(hProcess,(LPVOID)ptr,lpBuffer,nSize,lpNumberOfBytesRead); } BOOL WriteProcessMemoryPointer(HANDLE hProcess, LPVOID lpBaseAddress, LPCVOID lpBuffer,SIZE_T nSize,SIZE_T *lpNumberOfBytesWritten, int nOffsets, ...) { if(nOffsets == 0) return WriteProcessMemory(hProcess,lpBaseAddress,lpBuffer,nSize,lpNumberOfBytesWritten); va_list arguments; DWORD ptr = (DWORD)lpBaseAddress; va_start(arguments, nOffsets); for(int i=0;i<nOffsets;i++) { if( !ReadProcessMemory(hProcess,(LPVOID)ptr,&ptr,4,0) ) { va_end(arguments); return FALSE; } ptr += va_arg(arguments,DWORD); } va_end(arguments); return WriteProcessMemory(hProcess,(LPVOID)ptr,lpBuffer,nSize,lpNumberOfBytesWritten); } DWORD getPID() { DWORD pid; HWND hwnd = FindWindow(0,L"GTA:SA:MP"); if(!hwnd) return 0; GetWindowThreadProcessId(hwnd,&pid); if(!pid) return 0; return pid; } HANDLE getProcHandle() { DWORD pid = getPID(); if(!pid) { if(g_hGTA) //kein prozess handle aber offen { CloseHandle(g_hGTA); g_hGTA = NULL; return NULL; } return NULL; } if(pid != g_dwGTAPID) //neuer Prozess { if(g_hGTA) // Handle noch offen { CloseHandle(g_hGTA); HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS,FALSE,pid); g_hGTA = hProc; return hProc; } else //beim starten oder so { HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS,FALSE,pid); g_hGTA = hProc; return hProc; } } return g_hGTA; } HANDLE getSampBase() { DWORD dwPID = getPID(); if(!dwPID) return NULL; HANDLE hModuleSnap = INVALID_HANDLE_VALUE; MODULEENTRY32 me32; // Take a snapshot of all modules in the specified process. hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, dwPID ); if( hModuleSnap == INVALID_HANDLE_VALUE ) { return( 0 ); } // Set the size of the structure before using it. me32.dwSize = sizeof( MODULEENTRY32 ); // Retrieve information about the first module, // and exit if unsuccessful if( !Module32First( hModuleSnap, &me32 ) ) { CloseHandle( hModuleSnap ); // clean the snapshot object return( 0 ); } // Now walk the module list of the process, // and display information about each module do { if(wcsstr(me32.szModule,L"samp.dll")) { CloseHandle( hModuleSnap ); return me32.hModule; } } while( Module32Next( hModuleSnap, &me32 ) ); CloseHandle( hModuleSnap ); return( 0 ); } BOOL checkInjected() { DWORD dwPID = getPID(); if(!dwPID) return FALSE; WCHAR DllPath[MAX_PATH]; GetModuleFileName((HMODULE)g_hMod,DllPath,MAX_PATH); WCHAR DllName[100]; _wsplitpath_s(DllPath,0,0,0,0,DllName,100,0,0); HANDLE hModuleSnap = INVALID_HANDLE_VALUE; MODULEENTRY32 me32; // Take a snapshot of all modules in the specified process. hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, dwPID ); if( hModuleSnap == INVALID_HANDLE_VALUE ) { return( FALSE ); } // Set the size of the structure before using it. me32.dwSize = sizeof( MODULEENTRY32 ); // Retrieve information about the first module, // and exit if unsuccessful if( !Module32First( hModuleSnap, &me32 ) ) { CloseHandle( hModuleSnap ); // clean the snapshot object return( FALSE ); } // Now walk the module list of the process, // and display information about each module do { if(wcsstr(me32.szModule,DllName)) { CloseHandle( hModuleSnap ); return TRUE; } } while( Module32Next( hModuleSnap, &me32 ) ); CloseHandle( hModuleSnap ); return( Inject() ); } BOOL Inject() { WCHAR DllPath[MAX_PATH]; GetModuleFileName((HMODULE)g_hMod,DllPath,MAX_PATH); DWORD dwSize = (wcslen(DllPath)+1)*2; HANDLE hProc = getProcHandle(); if(!hProc) return FALSE; LPVOID lpAddr = VirtualAllocEx(hProc, 0, dwSize, MEM_COMMIT|MEM_RESERVE, PAGE_EXECUTE_READWRITE); if(!lpAddr) { return FALSE; } BOOL bSuccess = WriteProcessMemory(hProc, lpAddr, DllPath, dwSize, 0); if(!bSuccess) { return FALSE; } HANDLE hThread = CreateRemoteThread(hProc, 0, 0, (LPTHREAD_START_ROUTINE)GetProcAddress(GetModuleHandle(L"kernel32.dll"),"LoadLibraryW"), lpAddr, 0, 0); if(!hThread) { return FALSE; } WaitForSingleObject(hThread,INFINITE); CloseHandle(hThread); VirtualFreeEx(hProc,lpAddr,dwSize,MEM_RELEASE); return TRUE; } BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { if(ul_reason_for_call==DLL_PROCESS_ATTACH) { g_hMod = hModule; DisableThreadLibraryCalls((HMODULE)hModule); } return TRUE; }
|
VB, C/C++, Delphi, etc |
Mon 9. Sep 2013, 17:01
by KN4CK3R
|
3 |
371 |
 |
daten in echtzeit mit einfachem webspace?
Posted on: Sun 30. Jun 2013, 21:20
capo1337
Preview
|
Java, HTML, PHP |
Mon 1. Jul 2013, 13:11
by Dr_Pepper
|
3 |
352 |
 |
daten in echtzeit mit einfachem webspace?
Posted on: Sun 30. Jun 2013, 21:20
capo1337
Preview
Go To Post
Hallo, ist es möglich Daten zwischen Anwendungen und einem einfachen Webspace (bietet: PHP 5.4,CGI/Perl,Ruby,Python,SSI) in echtzeit auszutauschen?
|
Java, HTML, PHP |
Mon 1. Jul 2013, 13:11
by Dr_Pepper
|
3 |
352 |
 |
Chams Problem
Posted on: Sat 25. May 2013, 21:27
capo1337
Preview
Go To Post
Tie kriege ich es noch hin, dass die Texturen heller dargestellt werden? das benutze ich bisher: TEXT Code: pDevice->SetRenderState(D3DRS_ZENABLE,false); pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID); pDevice->SetTexture( 0, texRed); pDevice->DrawIndexedPrimitive(Type,BaseVertexIndex, MinVertexIndex, NumVertices, startIndex,primCount); pDevice->SetRenderState(D3DRS_ZENABLE,true); pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID); pDevice->SetTexture( 0, texGreen);
|
VB, C/C++, Delphi, etc |
Thu 13. Jun 2013, 11:16
by Mantarochen
|
14 |
953 |
 |
Chams Problem
Posted on: Sat 25. May 2013, 21:27
capo1337
Preview
Go To Post
@Mantarochen nein, denn wenn ich statt SetPixelShader SetTexture benutze siehts so aus: Only registered and activated users can see links.doch wie gesagt sind die Spieler dann im Schatten kaum sichtbar CPP Code: pDevice->SetRenderState(D3DRS_LIGHTING,false); pDevice->SetRenderState(D3DRS_AMBIENT,txtWhite);
das hat nix gebracht diesen teil hab ich einfach oben drangetan, war doch richtig, oder?
|
VB, C/C++, Delphi, etc |
Thu 13. Jun 2013, 11:16
by Mantarochen
|
14 |
953 |
 |
Chams Problem
Posted on: Sat 25. May 2013, 21:27
capo1337
Preview
|
VB, C/C++, Delphi, etc |
Thu 13. Jun 2013, 11:16
by Mantarochen
|
14 |
953 |
 |
Chams Problem
Posted on: Sat 25. May 2013, 21:27
capo1337
Preview
Go To Post
würde das bei meinem Problem helfen, oder meinst du vedels Beispiel?
|
VB, C/C++, Delphi, etc |
Thu 13. Jun 2013, 11:16
by Mantarochen
|
14 |
953 |
 |
Chams Problem
Posted on: Sat 25. May 2013, 21:27
capo1337
Preview
Go To Post
@vedel dein Bespiel kenn ich, habs auch ausprobiert, doch dannach buggte die Darstellung in meinem Spiel total. hab dann das hier gefunden ist aber nicht optimal finde ich, einige Objekte (Autos, halbdurchsichtige Wände,Rauch..) werden im Fordergrund gezeichnet und man sieht dann den Spieler nicht, viellecht weiß jemand warum TEXT Code: if(chams) { pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_SOLID ); pDevice->SetRenderState( D3DRS_ZENABLE, false ); pDevice->SetRenderState( D3DRS_PATCHEDGESTYLE, D3DPATCHEDGE_CONTINUOUS ); pDevice->SetPixelShader( shaRed ); pDevice->DrawIndexedPrimitive( Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount ); // actor infront wall pDevice->SetPixelShader( shaGreen ); pDevice->SetRenderState( D3DRS_ZENABLE, true ); pDevice->DrawIndexedPrimitive( Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount ); pDevice->SetPixelShader( NULL ); return pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_SOLID ); }
|
VB, C/C++, Delphi, etc |
Thu 13. Jun 2013, 11:16
by Mantarochen
|
14 |
953 |
 |
Chams Problem
Posted on: Sat 25. May 2013, 21:27
capo1337
Preview
Go To Post
hab das oben hinzugefügt: TEXT Code: pDevice->SetRenderState(D3DRS_LIGHTING,false); pDevice->SetRenderState(D3DRS_AMBIENT,txtWhite);
hat jedoch nix genützt, wie krieg es hin, dass die Spieler immer gleich hell sichtbar sind?
|
VB, C/C++, Delphi, etc |
Thu 13. Jun 2013, 11:16
by Mantarochen
|
14 |
953 |
 |
Chams Problem
Posted on: Sat 25. May 2013, 21:27
capo1337
Preview
Go To Post
Hi, da die Methode mit NumVertices und primCount in meinem Fall für 300 verschiedene Skins zu zeitafwändig ist und mit stripes es überhaupt nicht geklappt hat, hab ich nach einer Alternative gesucht und eine gefunden. TEXT Code: //DIP-hook DWORD dwRet_addr = ( DWORD ) _ReturnAddress(); // actors if ( dwRet_addr == 0x761142 ) { pDevice->SetRenderState(D3DRS_ZENABLE,false); //... }
Wie funktioniert das? Hab keine Erklärung dazu gefunden. /e hat sich erledigt :>
|
VB, C/C++, Delphi, etc |
Thu 13. Jun 2013, 11:16
by Mantarochen
|
14 |
953 |
 |
problem directx sdk
Posted on: Sat 18. May 2013, 15:35
capo1337
Preview
Go To Post
wo finde ich diesen Ordner? Ich hatte bei der Installation keinen Ordner angegeben
|
VB, C/C++, Delphi, etc |
Wed 12. Jun 2013, 23:10
by vedel
|
4 |
228 |
 |
problem directx sdk
Posted on: Sat 18. May 2013, 15:35
capo1337
Preview
Go To Post
Hi, Ich habe ein Problem den DirectX SDK zu nutzen. Die Installation ging auf Anhieb nicht, es kamm dieser S1023 Fehler, den Only registered and activated users can see links. zu lösen versuchte. Ich "habs installiert", doch wenn ich versuche den d3dx9 header zu includen kommt ein Fehler - Header nicht gefunden. Wie gehts nun weiter?
|
VB, C/C++, Delphi, etc |
Wed 12. Jun 2013, 23:10
by vedel
|
4 |
228 |
 |
player struct ptr help
Posted on: Sun 9. Jun 2013, 00:46
capo1337
Preview
Go To Post
Hi, ich habe ein paar Fragen bezüglich der "player struct pointer". (am Bsp. Assault Cube) Wenn ich die Adresse von hp eines Spielers in CE in dissect data structures eingebe finde ich in der nähe den Namen und andere Werte. Wenn ich weiter runterscrolle finde ich weitere Namen. Die Namen wiederholen sich nach 0x448. Das muss dann die Struct Größe sein.(?) Was die ganzen Werte bedeuten finde ich nur durch raten heraus, richtig(?) Wie bekomme ich den Basepointer? Wie finde ich die Anzahl der Structs heraus? Vielen Dank für hilfreiche Antworten!
|
VB, C/C++, Delphi, etc |
Sun 9. Jun 2013, 02:39
by SilverFire
|
1 |
700 |
 |
code verbessern
Posted on: Wed 8. May 2013, 23:56
capo1337
Preview
Go To Post
Wie kann ich meine Funktionen mit einer pipe umsetzen? Kann mir das jemand erklären?
|
VB, C/C++, Delphi, etc |
Fri 17. May 2013, 18:08
by KN4CK3R
|
4 |
314 |
 |
code verbessern
Posted on: Wed 8. May 2013, 23:56
capo1337
Preview
Go To Post
mein programm basiert auf einer scriptsprache, man kann dort vieles in wenigen zeilen machen, nur nicht inline assembler o.ä. deswegen brauche ich die schnittstelle, zu einem dummen multiplayer spiel
|
VB, C/C++, Delphi, etc |
Fri 17. May 2013, 18:08
by KN4CK3R
|
4 |
314 |
 |
code verbessern
Posted on: Wed 8. May 2013, 23:56
capo1337
Preview
Go To Post
Hi, ich habe ein Projekt, welches aus einer Dll besteht, die Funktionen exportiert. Die Dll soll die "Schnittstelle" von meinem Prozess und dem Opferprozess sein und im Opferprozess Funktionen mit Parametern aufrufen. Pseudocode: TEXT Code: extern "C" __declspec(dllexport) BOOL Funnktion(int i, char* c) // beispielhafte Parameter { //nach eigenem Modul im Opferprozess suchen, wenn nicht gefunden sich dort injecten //eine Struct mit den Parametern füllen //Speicher für Struct im Opferpprozess anfordern, schreiben //Remotethread im Opferprozess, Funktion ist "FunktionEx" und Parameter ist der Struktpointer } extern "C" __declspec(dllexport) void FunktionEx(LPVOID s) { //mit inline assembler eine Funktion im Opferprozess aufrufen mit den Parametern aus der Struct }
Ist das der Beste weg oder kann man hier etwas verbessern?
|
VB, C/C++, Delphi, etc |
Fri 17. May 2013, 18:08
by KN4CK3R
|
4 |
314 |
 |
programmfluss ändern
Posted on: Tue 14. May 2013, 20:58
capo1337
Preview
Go To Post
Hi, wenn ich an einer Stelle in meinem Opferprogramm statt einem JE ein JMP haben möchte, kann ich einfach extern "WriteProcessMemory" nutzen? Und wenn ich direkten Speicherzugriff habe "memcpy"?
|
VB, C/C++, Delphi, etc |
Tue 14. May 2013, 21:50
by SilverFire
|
1 |
194 |
 |
projekt schützen
Posted on: Sat 4. May 2013, 21:57
capo1337
Preview
Go To Post
Hi, mich wundert es, dass wenn ich mein Projekt (Dll welche Funktionen exportiert) in olly anschaue, olly den originalen quelltext kennt Only registered and activated users can see links.Kann man irgendwie verhindern? Muss ich dazu irgendwas in den Projekteinstellungen ändern oder geht das mit irgendeiner encrypt lib?
|
VB, C/C++, Delphi, etc |
Sat 4. May 2013, 23:51
by KN4CK3R
|
2 |
213 |
 |
code im einem prozess ausführen
Posted on: Wed 1. May 2013, 17:52
capo1337
Preview
Go To Post
ich hab versucht mein code soweit zu ändern, dass ich nicht auf nicht auf falschen Speicher zugreife, jedoch klappt das irgendwie nicht.. geht das auch anders? Die InteressanteFuncEx besteht im wesentlichen aus: TEXT Code: push 0 push 0 push 0 push 0 push 0 push cstr call adresse
ich hatte lediglich noch die adresse berechnet, weil die Funktion in einer dll liegt. geht auch vorher Könnte ich nicht einfach die opcodes reinschreiben? push 0 -> 6A 00 bei call blicke ich noch nicht durch was für die adresse rein soll call adresse -> E8 ????????
|
VB, C/C++, Delphi, etc |
Thu 2. May 2013, 17:56
by KN4CK3R
|
3 |
690 |