~ DLL Injector Source Code ~

Posts 115 of 33 · Page 1 of 3
~ DLL Injector Source Code ~
I saw many people asking how to do a DLL Injector, so i diceded to post a source that i made for myself...

NOTE: It is in Visual Basic 6 (VB6) You can't open it with VB.net...

You can start doing your first DLL Injector from that source...
I Hope you understand everything i made, and please don't do sh*t with it!

Have fun (The file is Attached)
Dll Injector Source - By Silk - Fixed.rarattachment deleted · 2,838 downloads before removal
Dll Injector Source - By Silk - Fixed.zipattachment deleted · 1,141 downloads before removal
Doesn't work for me, tried compiling multiple times and using it and it doesn't work.
Edit: I found an error, i fixed it, it should work now...
Thank you very much.

I'm trying to convert this to VB.NET, and works fine except one line.

(ProsH renamed to ProcessHandle)
Code:
CreateThread = CreateRemoteThread(ProcessHandle, vbNull, 0, LibAddress, DLLVirtLoc, 0, ThreadID)

The error:
Code:
************** Exception Text **************
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at WindowsApplication1.Form1.CreateRemoteThread(IntPtr ProcessHandle, Int64 lpThreadAttributes, IntPtr dwStackSize, IntPtr lpStartAddress, String lpParameter, Int64 dwCreationFlags, IntPtr lpThreadID)
   at WindowsApplication1.Form1.InjectDll(String DllPath, IntPtr ProcessHandle)
   at WindowsApplication1.Form1.Injection()
   at WindowsApplication1.Form1.cmdInject_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.PerformClick()
   at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
   at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
Any help is highly appreciated.
Thanks in advance.
Mulle, i will try to convert it to VB.net if i got any idea how to fix it, i will tell u ..
thanks bro help me with trying to make my first hack
Ah yes, this code I found over at PSCode.com and it is what inspired me to write my own Module(DLL/Exe) injector and ejector (Similar to unlocker)

As for the .Net problem the error appears to be "Attempted to read or write protected memory. " it probably is due to a problem with VirtualAllocEx. Ensure it is succeeded (proper return value according to MSDN) and you could try perhaps using PAGE_READWRITEEXECUTE.

I would check to ensure that all your API calls are succeeding, and if not go from there.

PS -->
Private Const MEM_RELEASE = &H8000 needs to be changed to Private Const MEM_RELEASE = &H8000& (Add "&" at the end) because we need the number to be unsigned. If it is signed it will = -32768 instead of 32768 which is what we want. (If you dont know about signed numbers google it)
Because the declaration of how it is now VirtualFreeEx is failing. (See MSDN documentation to see the proper return value that it should have for success)


Hopefully this helps.
sweet, thanks. i'll check it out.
Thanks silk... and just to let you know, you can update your sig thing and mark down 50 posts.
Thank´s
This is very usefull
hi m8 everytime i try to compile it, it comes up with this error Method or Data Member not found and it highlights this part

Code:
Private Sub Command2_Click()
  Dim sTemp As String
  CommonDialog1.FileName = "*.dll"
  CommonDialog1.ShowOpen
  Text1.Text = CommonDialog1.FileName
End Sub
it highlights
Code:
FileName
any ideas?
what exactly does it do ?
Thanks man... Really useful
Posts 115 of 33 · Page 1 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?