Injecting Procedure to another process
-
- Addict
- Posts: 2228
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
-
- 666
- Posts: 1033
- Joined: Mon Sep 01, 2003 2:33 pm
Using dark dragons code I think? second example in the first post.
and yes, I think the debugger was disabled EDIT: I lied Debugger was enabled (I find it so difficult to tell from the IDE gadgets these days if the debbuger is on or off!) Injects successfully if debugger disabled. My apologies for being a dumb ass lol
and yes, I think the debugger was disabled EDIT: I lied Debugger was enabled (I find it so difficult to tell from the IDE gadgets these days if the debbuger is on or off!) Injects successfully if debugger disabled. My apologies for being a dumb ass lol
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Looks like microsoft aren't that clever after all...
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
-
- 666
- Posts: 1033
- Joined: Mon Sep 01, 2003 2:33 pm
here is one apicall used...ricardo wrote:Can anybody show something that the injected code can do without crashing?
I was only able to use delays and msgboxes, but not anymore. Any API call (per example) crashes for me.
Code: Select all
Procedure RemoteThread()
MessageRequester("Success","Injection worked.")
CreateProcess_(0, "calc.exe", 0, 0, 0, #CREATE_SUSPENDED, 0, 0, @sinfo.STARTUPINFO, @pinfo.PROCESS_INFORMATION)
EndProcedure
-
- Addict
- Posts: 2228
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Ok so now is all right again . Debugger already had to be disabled with the code before.LuCiFeR[SD] wrote:EDIT: I lied Debugger was enabled (I find it so difficult to tell from the IDE gadgets these days if the debbuger is on or off!) Injects successfully if debugger disabled. My apologies for being a dumb ass lol
bye,
Daniel
Daniel
If debugger is on it attemps to inject a part of the debugging code too!
Okvasi:
add that on top of the sources so no one mistakes this. Then the source will work!
Okvasi:
Code: Select all
DisableDebugger ;DISABLES DEBUGGER! This is needed.
-
- Addict
- Posts: 2228
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Yes, or we use some Critical Sections, that should also work.thefool wrote:If debugger is on it attemps to inject a part of the debugging code too!
Okvasi:add that on top of the sources so no one mistakes this. Then the source will work!Code: Select all
DisableDebugger ;DISABLES DEBUGGER! This is needed.
bye,
Daniel
Daniel
-
- Addict
- Posts: 2228
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Critical Sections are for using strings in Threads. Maybe you should use them then.okasvi wrote:Critical sections? sounds interesting, tell me more...
In this Topic are a few Methods:
http://forums.purebasic.com/german/view ... l+sections
bye,
Daniel
Daniel
found this and looked easy enought to implement viewtopic.php?t=16488&highlight=critical+sections
but do i really need that if i inject only one thread to same process?
but do i really need that if i inject only one thread to same process?
-
- Addict
- Posts: 2228
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Yes, threads are not secure, so it could crash.okasvi wrote:found this and looked easy enought to implement viewtopic.php?t=16488&highlight=critical+sections
but do i really need that if i inject only one thread to same process?
bye,
Daniel
Daniel