View previous topic :: View next topic |
Author |
Message |
DoomsDay Grandmaster Cheater Reputation: 0
Joined: 06 Jan 2007 Posts: 768 Location: %HomePath%
|
Posted: Sat Oct 20, 2007 10:22 am Post subject: [MASM32]DLL Injector |
|
|
Source included, hope you'll find this usefull (advises\corrections are welcomed).
Link
Last edited by DoomsDay on Sat Apr 05, 2008 1:54 pm; edited 3 times in total |
|
Back to top |
|
|
AJAX88 Expert Cheater Reputation: 0
Joined: 27 Sep 2007 Posts: 168
|
Posted: Tue Oct 23, 2007 6:43 pm Post subject: |
|
|
Nice work |
|
Back to top |
|
|
Hackerdevelopment Advanced Cheater Reputation: 0
Joined: 11 Oct 2007 Posts: 55
|
Posted: Tue Oct 23, 2007 6:48 pm Post subject: |
|
|
wat is this?just want to know. |
|
Back to top |
|
|
HomerSexual Grandmaster Cheater Supreme Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Tue Oct 23, 2007 6:51 pm Post subject: |
|
|
it injects a messagebox into the application. But you can customize it to inject a dll into any app. _________________
|
|
Back to top |
|
|
Hackerdevelopment Advanced Cheater Reputation: 0
Joined: 11 Oct 2007 Posts: 55
|
Posted: Tue Oct 23, 2007 6:58 pm Post subject: |
|
|
Ok thanks! |
|
Back to top |
|
|
DeletedUser14087 I post too much Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Tue Oct 23, 2007 7:18 pm Post subject: |
|
|
Great job, but idk masm ;D
if it could be in C/C++/Delphi i'd appreacite |
|
Back to top |
|
|
FerrisBuellerYourMyHero Master Cheater Reputation: 0
Joined: 14 Feb 2007 Posts: 401 Location: Inside your <kernel>
|
Posted: Sun Oct 28, 2007 8:32 am Post subject: |
|
|
Kaspersky wrote: | Great job, but idk masm ;D
if it could be in C/C++/Delphi i'd appreacite |
Kasp! things coded in straight ASM are very fast running and high performance!!!
If you can code it in ASM, then do it!
but you could easily re-create it in c++ or delphi if you wanted too...
but IDK why you'd want to lose some performance by doing that _________________
You know, life moves pretty fast. If you don't stop and look around once in a while, You could miss it!
|
|
Back to top |
|
|
DoomsDay Grandmaster Cheater Reputation: 0
Joined: 06 Jan 2007 Posts: 768 Location: %HomePath%
|
Posted: Sun Oct 28, 2007 9:44 am Post subject: |
|
|
Delphi version:
Code: | program Injector;
{$APPTYPE CONSOLE}
uses
SysUtils, windows, psapi, tlhelp32, inifiles;
var
WName,PName,DName:string;
DLLLocation:string;
ProcessId:DWORD;
procedure PhraseINI();
var
IniFile:TIniFile;
begin
if FileExists(GetCurrentDir + '\Injector.ini') then
begin
IniFile:=TIniFile.Create(GetCurrentDir + '\Injector.ini');
WName:=IniFile.ReadString('DLL Injector','Window','');
PName:=IniFile.ReadString('DLL Injector','Target','notepad.exe');
DName:=IniFile.ReadString('DLL Injector','DLL','MessageBox.dll');
end
else
begin
IniFile:=TIniFile.Create(GetCurrentDir + '\Injector.ini');
IniFile.WriteString('Injector','Window','Untitled - Notepad');
IniFile.WriteString('Injector','Target','notepad.exe');
IniFile.WriteString('Injector','DLL','MessageBox.dll');
PhraseINI();
end;
end;
procedure GetPID();
var
TempSnapshot:THandle;
Process32:TProcessEntry32;
begin
while (ProcessId=0) do
begin
TempSnapshot:=CreateToolhelp32Snapshot(TH32CS_SNAPALL,0);
Process32First(TempSnapshot,Process32);
while Process32Next(TempSnapshot,Process32) do
begin
if Process32.szExeFile = PName then
ProcessId:=Process32.th32ProcessID;
end;
CloseHandle(TempSnapshot);
end;
end;
procedure InjectDLL();
var
Process:THandle;
TempHandle:THandle;
AllocatedRegion:pointer;
Empty:DWORD;
NumberOfBytesWritten:Cardinal;
begin
Process:=OpenProcess(PROCESS_ALL_ACCESS,False,ProcessId);
AllocatedRegion:=VirtualAllocEx(Process,NIL,length(DLLLocation),MEM_COMMIT,PAGE_EXECUTE_READWRITE);
WriteProcessMemory(Process,AllocatedRegion,pchar(DLLLocation),length(DLLLocation),NumberOfBytesWritten);
if WName='' then
sleep(750)
else
while FindWindow(nil,pchar(WName))=0 do
sleep(10);
TempHandle:=CreateRemoteThread(Process,nil,0,GetProcAddress(GetModuleHandle('kernel32.dll'),'LoadLibraryA'),AllocatedRegion,0,Empty);
WaitForSingleObject(TempHandle,INFINITE);
CloseHandle(TempHandle);
end;
begin
PhraseINI();
Writeln('- DLL Injector -'+#$0A+#$0D+'----------------');
DLLLocation:=GetCurrentDir()+'\'+DName;
if not FileExists(DLLLocation) then
begin
Writeln('Unable to locate the DLL');
sleep(7000);
exitprocess(0);
end;
Writeln('Waiting for process: '+PName);
GetPID();
Writeln(' - Process found'+#$0A+#$0D);
Writeln('Injecting '+DName+' into '+PName);
InjectDLL();
Writeln(' - DLL injected');
sleep(7000);
end. |
Last edited by DoomsDay on Sun Oct 28, 2007 2:00 pm; edited 1 time in total |
|
Back to top |
|
|
DeletedUser14087 I post too much Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Sun Oct 28, 2007 12:28 pm Post subject: |
|
|
Thanks DoomsDay ! |
|
Back to top |
|
|
giveme Grandmaster Cheater Reputation: 0
Joined: 16 Jan 2007 Posts: 933 Location: GMS - Khaini
|
Posted: Wed Oct 31, 2007 8:16 pm Post subject: |
|
|
can u make the injector to inject 3 dlls into 3different process? |
|
Back to top |
|
|
charch84 How do I cheat? Reputation: 0
Joined: 25 Mar 2008 Posts: 7
|
Posted: Sat Apr 05, 2008 10:40 am Post subject: |
|
|
Thanks so much DoomsDay! Works well |
|
Back to top |
|
|
NothingToShow Grandmaster Cheater Supreme Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Sat Apr 05, 2008 12:47 pm Post subject: |
|
|
So, can you make a DLL which contains a ShowMessage, and then it would pop up in the application we injected it in? |
|
Back to top |
|
|
HolyBlah Master Cheater Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Sat Apr 05, 2008 1:22 pm Post subject: |
|
|
Moller wrote: | So, can you make a DLL which contains a ShowMessage, and then it would pop up in the application we injected it in? | Sure, just call it in the DLLMain procedure. |
|
Back to top |
|
|
atom0s Moderator Reputation: 199
Joined: 25 Jan 2006 Posts: 8518 Location: 127.0.0.1
|
|
Back to top |
|
|
NothingToShow Grandmaster Cheater Supreme Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Sun Apr 06, 2008 1:40 am Post subject: |
|
|
Wiccaan wrote: | charch84 wrote: | Thanks so much DoomsDay! Works well |
You bumped this even though the link is dead, saying 'works well' lol...? |
I think he ment the delphi one. |
|
Back to top |
|
|
|