
| | #1 (permalink) |
| Member Join Date: Jul 2008
Posts: 52
Thanks: 2
Thanked 7 Times in 4 Posts ![]() | ~ 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)
__________________ - Arunforce fan - My MPGH goals: -Post Count- 10 Posts [x] 20 Posts [x] 50 Posts [ ] 70 Posts [ ] 100 Posts [ ] 200 Posts [ ] 500 Posts [ ] 1000 Posts [ ] -Membership Status- Become V.I.P. [ ] Become a Trusted Member [ ] Become a MPGH Staff Member [ ] -Programming Status- Dominate VB.Net 2008 [x] Dominate C++.net 2008 [ ] Dominate C++.net 2003 [ ] Dominate C#.net 2008 [ ] Dominate D3D Hooks [x] Dominate Java Scripts [x] Dominate HTML Scripts [x] Last edited by Silk[H4x]; 08-12-2008 at 07:29 AM. |
| | |
| The Following 4 Users Say Thank You to Silk[H4x] For This Useful Post: | Fizz_X (2 Weeks Ago),
MulleDK19 (08-30-2008),
olie122333 (09-21-2008),
Spadez47 (10-28-2008)
|
| | #3 (permalink) |
| Member Join Date: Jul 2008
Posts: 52
Thanks: 2
Thanked 7 Times in 4 Posts ![]() | Edit: I found an error, i fixed it, it should work now...
__________________ - Arunforce fan - My MPGH goals: -Post Count- 10 Posts [x] 20 Posts [x] 50 Posts [ ] 70 Posts [ ] 100 Posts [ ] 200 Posts [ ] 500 Posts [ ] 1000 Posts [ ] -Membership Status- Become V.I.P. [ ] Become a Trusted Member [ ] Become a MPGH Staff Member [ ] -Programming Status- Dominate VB.Net 2008 [x] Dominate C++.net 2008 [ ] Dominate C++.net 2003 [ ] Dominate C#.net 2008 [ ] Dominate D3D Hooks [x] Dominate Java Scripts [x] Dominate HTML Scripts [x] Last edited by Silk[H4x]; 08-12-2008 at 07:27 AM. |
| | |
| | #5 (permalink) |
| Choob Join Date: Aug 2008
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts ![]() | 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) Thanks in advance. |
| | |
| | #7 (permalink) |
| Member Join Date: Jul 2008
Posts: 52
Thanks: 2
Thanked 7 Times in 4 Posts ![]() | Mulle, i will try to convert it to VB.net if i got any idea how to fix it, i will tell u ..
__________________ - Arunforce fan - My MPGH goals: -Post Count- 10 Posts [x] 20 Posts [x] 50 Posts [ ] 70 Posts [ ] 100 Posts [ ] 200 Posts [ ] 500 Posts [ ] 1000 Posts [ ] -Membership Status- Become V.I.P. [ ] Become a Trusted Member [ ] Become a MPGH Staff Member [ ] -Programming Status- Dominate VB.Net 2008 [x] Dominate C++.net 2008 [ ] Dominate C++.net 2003 [ ] Dominate C#.net 2008 [ ] Dominate D3D Hooks [x] Dominate Java Scripts [x] Dominate HTML Scripts [x] Last edited by Silk[H4x]; 09-13-2008 at 02:23 PM. |
| | |
| | #9 (permalink) |
| Choob Join Date: May 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts ![]() | 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. |
| | |