PureBasic Forum
http://forums.purebasic.com/english/

Injecting Procedure to another process
http://forums.purebasic.com/english/viewtopic.php?f=12&t=16676
Page 4 of 5

Author:  okasvi [ Mon Sep 05, 2005 6:23 pm ]
Post subject: 

which method were you using? i havent gotten that kind of error message at never...

Author:  DarkDragon [ Mon Sep 05, 2005 6:26 pm ]
Post subject: 

:-S is your debugger disabled?

Author:  LuCiFeR[SD] [ Mon Sep 05, 2005 6:45 pm ]
Post subject: 

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

Author:  DoubleDutch [ Mon Sep 05, 2005 10:00 pm ]
Post subject: 

Looks like microsoft aren't that clever after all... ;)

Author:  LuCiFeR[SD] [ Mon Sep 05, 2005 10:20 pm ]
Post subject: 

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

Author:  okasvi [ Tue Sep 06, 2005 12:19 am ]
Post subject: 

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:
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 ;)

Author:  DarkDragon [ Tue Sep 06, 2005 6:08 am ]
Post subject: 

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.

Author:  xgp [ Tue Sep 06, 2005 10:36 am ]
Post subject: 

Happened to me the same as LuCiFeR[SD].
Debugger disabled runs perdectly, when debugger is on it crashes.

xgp

Author:  thefool [ Tue Sep 06, 2005 2:41 pm ]
Post subject: 

If debugger is on it attemps to inject a part of the debugging code too!

Okvasi:
Code:
DisableDebugger ;DISABLES DEBUGGER! This is needed.


add that on top of the sources so no one mistakes this. Then the source will work!

Author:  DarkDragon [ Tue Sep 06, 2005 2:42 pm ]
Post subject: 

thefool wrote:
If debugger is on it attemps to inject a part of the debugging code too!

Okvasi:
Code:
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.

Author:  okasvi [ Tue Sep 06, 2005 2:48 pm ]
Post subject: 

Critical sections? sounds interesting, tell me more... :)

Author:  DarkDragon [ Tue Sep 06, 2005 4:25 pm ]
Post subject: 

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/viewtopic.php?t=3061&highlight=critical+sections

Author:  okasvi [ Tue Sep 06, 2005 5:01 pm ]
Post subject: 

found this and looked easy enought to implement http://forums.purebasic.com/english/vie ... l+sections


but do i really need that if i inject only one thread to same process?

Author:  DarkDragon [ Tue Sep 06, 2005 5:42 pm ]
Post subject: 

okasvi wrote:
found this and looked easy enought to implement http://forums.purebasic.com/english/vie ... l+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.

Author:  xgp [ Tue Sep 06, 2005 6:40 pm ]
Post subject: 

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

Page 4 of 5 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/