| View previous topic :: View next topic |
| Author |
Message |
ErrorMaker Newbie cheater
Reputation: 0
Joined: 25 Jun 2010 Posts: 21
|
Posted: Thu Jul 22, 2010 12:51 pm Post subject: |
|
|
| Wiccaan wrote: | | Assuming you are hacking a flash game, the games will use whatever Flash specifically exports for the browser. Also if it is flash, Firefox does not (any more) directly link flash inside the browser, instead if sits inside a new process called plugin-container.exe |
Worked Thanks again for your great help
|
|
| Back to top |
|
 |
ErrorMaker Newbie cheater
Reputation: 0
Joined: 25 Jun 2010 Posts: 21
|
Posted: Wed Oct 06, 2010 9:37 am Post subject: HTML Source with recv function? Unject DLL? |
|
|
Ok my DLL can successfully inject a DLL into any process and hook those functions:
connect
wsaconnect
recv
wsarecv
send
wsasend
Now what I wanna do is getting the html source of the current page of a browserprocess using the recv and wsarecv functions. But I get data like this from the recv & wsarecv function:
Do I have to convert that? Or does someone know how to get the right data?
My second question is how to unject a DLL I'm using a VB6 DLL Injection source but I want to also add a unject function. I think I have to call "DLL_PROCESS_DETACH" in the DLLMain entry point, but I'm not sure how to do that.
Btw: When I'm injecting my DLL, does it have a hWnd or just a ThreadID?
Thanks in advance
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8588 Location: 127.0.0.1
|
Posted: Wed Oct 06, 2010 1:23 pm Post subject: |
|
|
You get crap data more then likely due to encryption. You will need to find out whether or not the game does encrypt the data or if you are just incorrectly reading it from the buffer. (Wrong character set maybe?)
When you inject your DLL into another process you have direct access to the process and its memory. You don't, by default, have a hWnd as the DLL is not passed that information. You can use things like:
- GetCurrentThread()
- GetCurrentProcess()
- GetCurrentProcessId()
Which can be used to find additional information if need be.
Unejecting your DLL can be done one of a few ways and no it does not require you to call DLL_PROCESS_DETACH. The system will automatically call your DLL entry point and push that when the DLL is unloaded.
One method is to use FreeLibrary the same way you used LoadLibrary to inject. Instead of the DLL path though, you need to obtain the already loaded modules handle. Which you can do with CreateToolhelp32Snapshot / Module32First + Module32Next or with the PSAPI equivalents.
Another method would be to inject your own code stub to call the same thing or to use LdrUnloadDll.
Another method would be to call an exported function inside your module that has the ability to clean itself up and unload itself internally.
Up to you which you want to do.
_________________
- Retired. |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Wed Oct 06, 2010 2:44 pm Post subject: |
|
|
| Something to watch out for in DLL ejection is that you must make sure you kill all threads running in the DLL before you eject it or else the memory will be freed and a thread will try to run on the freed memory and crash.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8588 Location: 127.0.0.1
|
Posted: Wed Oct 06, 2010 4:00 pm Post subject: |
|
|
| Slugsnack wrote: | | Something to watch out for in DLL ejection is that you must make sure you kill all threads running in the DLL before you eject it or else the memory will be freed and a thread will try to run on the freed memory and crash. |
Yep, which leaves exporting a function for cleanup a favored choice to ensure everything in your library is done before you unload it.
_________________
- Retired. |
|
| Back to top |
|
 |
ErrorMaker Newbie cheater
Reputation: 0
Joined: 25 Jun 2010 Posts: 21
|
Posted: Thu Oct 07, 2010 1:07 pm Post subject: |
|
|
Thanks again for the help
At the moment I'm not looking for logging packets of game. I want to get the html source of the page which my browser process is currently at.
I try now to communicate from my VB6 application to the (injected into a browser process) DLL.
I found this guide: http://www.digitalise.net/2009/01/02/calling-an-exported-function-in-an-injected-dll-library/
| Quote: | The steps required after injection
1. Load the library into the local process (injector).
2. Retrieve the absolute address of the DLL function in the injector.
3. Calculate the relative address using the absolute address.
4. Locally unload the library.
5. Calculate the absolute address of the DLL function in the remote process using adding the relative function address to the DLL base address.
6. Call the function using CreateRemoteThread.
7. Retrieve the remote thread exit code to determine if the remote execution was successful. |
I've got the absolute address of the DLL function in the local process (Step 2) but I can't find a way to calculate the relative address in VB6
Any ideas?
Thanks in advance.
|
|
| Back to top |
|
 |
justa_dude Grandmaster Cheater
Reputation: 23
Joined: 29 Jun 2010 Posts: 893
|
Posted: Thu Oct 07, 2010 3:21 pm Post subject: |
|
|
| If you're using IE, it's trivial to get the document source via automation/COM - like six or seven lines of vbscript.
|
|
| Back to top |
|
 |
ErrorMaker Newbie cheater
Reputation: 0
Joined: 25 Jun 2010 Posts: 21
|
Posted: Thu Oct 07, 2010 6:53 pm Post subject: |
|
|
Thanks for you answer But the problem is, that i dont want to get the html source of just an IE page. I can simply get it with IE when loading a page with the IE componente of VB6, but I wanna get the current html source of the page of the process my DLL is injected to :/
|
|
| Back to top |
|
 |
justa_dude Grandmaster Cheater
Reputation: 23
Joined: 29 Jun 2010 Posts: 893
|
Posted: Thu Oct 07, 2010 10:16 pm Post subject: |
|
|
| BHO?
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8588 Location: 127.0.0.1
|
|
| Back to top |
|
 |
|