Page 4 of 5

Posted: Mon Sep 05, 2005 6:23 pm
by okasvi
which method were you using? i havent gotten that kind of error message at never...

Posted: Mon Sep 05, 2005 6:26 pm
by DarkDragon
:-S is your debugger disabled?

Posted: Mon Sep 05, 2005 6:45 pm
by LuCiFeR[SD]
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

Posted: Mon Sep 05, 2005 10:00 pm
by DoubleDutch
Looks like microsoft aren't that clever after all... ;)

Posted: Mon Sep 05, 2005 10:20 pm
by LuCiFeR[SD]
DoubleDutch wrote:Looks like microsoft aren't that clever after all... ;)
yes, seems odd that with the debugger on that M$ successfully interupts it. my faith in M$ was almost converted lol. At least somebody (other than me) thought to check if the debugger was enabled LMAO

Posted: Tue Sep 06, 2005 12:19 am
by okasvi
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.
here is one apicall used...

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
after injecting that check your taskmanager(ctrl+alt+delete) and there should be calc.exe running ;)

Posted: Tue Sep 06, 2005 6:08 am
by DarkDragon
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
Ok so now is all right again ;) . Debugger already had to be disabled with the code before.

Posted: Tue Sep 06, 2005 10:36 am
by xgp
Happened to me the same as LuCiFeR[SD].
Debugger disabled runs perdectly, when debugger is on it crashes.

xgp

Posted: Tue Sep 06, 2005 2:41 pm
by thefool
If debugger is on it attemps to inject a part of the debugging code too!

Okvasi:

Code: Select all

DisableDebugger ;DISABLES DEBUGGER! This is needed.
add that on top of the sources so no one mistakes this. Then the source will work!

Posted: Tue Sep 06, 2005 2:42 pm
by DarkDragon
thefool wrote:If debugger is on it attemps to inject a part of the debugging code too!

Okvasi:

Code: Select all

DisableDebugger ;DISABLES DEBUGGER! This is needed.
add that on top of the sources so no one mistakes this. Then the source will work!
Yes, or we use some Critical Sections, that should also work.

Posted: Tue Sep 06, 2005 2:48 pm
by okasvi
Critical sections? sounds interesting, tell me more... :)

Posted: Tue Sep 06, 2005 4:25 pm
by DarkDragon
okasvi wrote:Critical sections? sounds interesting, tell me more... :)
Critical Sections are for using strings in Threads. Maybe you should use them then.

In this Topic are a few Methods:

http://forums.purebasic.com/german/view ... l+sections

Posted: Tue Sep 06, 2005 5:01 pm
by okasvi
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?

Posted: Tue Sep 06, 2005 5:42 pm
by DarkDragon
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?
Yes, threads are not secure, so it could crash.

Posted: Tue Sep 06, 2005 6:40 pm
by xgp
I've tried other operations(Files) than Messagerequester and it crashes on that line.(I've made a messagerequester to every operation in the thread).

xgp