📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  Target Specific - General  >>  How to Spy on Malware API Calls

Topic created on: December 10, 2007 15:00 CST by Valentin .

Hi

I would like to build something similar to Anubis or Norman Sandbox on a real machine (to avoid vm and debugger detection). My idea is to build something which  logs API calls like NtCreateFile or RegSetValue into a textfile. In order to avoid debugger detection my idea is to replace the orginal dlls with proxy dlls.

Since I am no expert in RE my questions would be:
1. Does this make any sense?
2. Is there any freeware/open source solutions which can help to accomplish this?
3. Are there other techniques I should consider? Maybe a neat python libary ...

Greetings
Valentin

  TCM   December 10, 2007 21:10.43 CST
There are many "API Spys" which will log all of the API calls to a text file. Just google API Spy.

Without emulation or virtualization your machine will be compromised.

  TFk     December 11, 2007 11:58.43 CST
Yep, there are already a couple of commercial apps that perform "spying", you can see another one at http://www.threatexpert.com.

TCM is correct that not running a VM would cause infection, but there are ways around that. Sergei presented his approach to this problem at VirusBulletin this past summer.

It is a large effort to make it work well...
1. Yes, it makes sense, but there are some malware that will evade that technique as well.
2. No, there has not been, to my knowledge.
3. Check out the api spies that TCM already noted.

Good luck!

  Valentin     December 13, 2007 07:01.03 CST
Thanks for the input.

Infection isnt that much of an issue because that will be the sole purpose of that machine.

I am looking into those api spies. So far most of them dont fit. Something more flexibel/scriptable would be nice.

Is any way to get hold of Sergei's paper/presention?

Thanks,
Valentin

  jms     December 13, 2007 11:04.31 CST
You could script something through ImmunityDebugger or PyDbg. Just find all inter-modular calls, and set hooks on them. When the hook gets hit, decode the function parameters on the stack and log to a file.

This will produce the strace-like API information that you are looking for.

  jeffreytan   December 14, 2007 04:15.48 CST
Is there any Windows platform most recommended API hook/spy tool? We know some specific spy tool like Process Monitor, but I did not find such a good tool so that I can configure to hook a set of specified functions. It seems that the best tool is windbg breakpoint...

If you have any good tool like ProcMon, I would like to hear. Thanks

Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit