-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Antidebug detection implementation #32
Comments
Hi @cecio !
This is the convention that I use across the .tag file, and it helps to load those tags into various tools. Just a small change, but it will increase the readability significantly. |
Thanks a lot @hasherezade! I started to implement the change you suggested, which make totally sense (thanks for the tip). I found a way, by saving the last transition in a global. I don't like very much this, but it works and it' probably the simplest way. What do you think (you can have a look at the last commit on the fork)? Any other idea? It results in something like this in
I marked everything I modified in the Let me know what you think. If it's ok, I'll test a bit more than I can make a first pull request. Then you can obviously rework anything you think need to be reworked. Thanks! |
@cecio - to be honest, I also don't like the solution with saving the last transition in a global. I worry it may give wrong results if the application is multithreaded. |
Yeah, I totally agree.
or
I'll try this out and check how it looks |
hey. I did some changes.
If this is ok, I'll make a pull request, then I'll continue to work on the further implementations |
Thanks for the updates! I am a quite busy today, so I just took a quick look. I like how the tagging looks now.
While params.txt don't include tracing
In general I see no point in adding the file |
Thanks for the comments! Let me go through them:
This antidebug trick tries to open the executable itself in exclusive mode. Having the parameters displayed make immediately clear what is happening, having the file name and the mode printed just below. Anyway, I was in doubt as well. If you prefer not to having them, I can remove this.
True. You are right saying that the list is in some way already hardcoded, at least for checking the results. But I need to hardcode also the list of watched functions (because I need to check the parameters). I thought to hardcode this in a separate file (that's why I separated it from the When you have time, let me know what you think about the last two points and I'll modify the code accordingly. |
Quick update: I did some additional mods
|
thank you @cecio ! I checked it and I like it, feel free to send a pull request :) |
@hasherezade great, I'll do it. |
@cecio - squashed is better. |
thanks @hasherezade! I'm closing this after the merge. |
Hey @hasherezade
I'm opening this as an Issue even if it's not a real one, but it's more to start a conversation :-).
First of all let me thank you for the great tools you are creating for all of us, they are awesome!
Then, coming to my "Issue". I used TinyTracer for a while and I found it very useful. I had a use case which was not entirely covered, which was the following: sometimes, in order to carry on dynamic analysis on malware samples, I'd like to identify where antidebug tricks are placed, so that I can patch them out and continue with my work.
So, I started to implement this kind of "flagging" by using TinyTracer as a starting point. Right now I'm just at the beginning of this, but I already have something functional. You can have a look to the fork if you want (https://github.com/cecio/tiny_tracer).
What I did so far is to start to implement various techniques (mainly from the well known https://anti-debug.checkpoint.com, but then also from few others) and add a line in the TinyTracer output when one if found ([ANTIDEBUG] is the tag I used for these messages).
I tried to keep my code as much as possible isolated from the main core (files
AntiDebug.cpp
andAntiDebug.h
) and I put it under a specific option of the INI file (because is going for sure to impact performance)I'm currently focused on two aspect:
Some sample output looks like this:
For the time being, I fully implemented (for both 32 and 64 bit) the "Debug Flags" portion of the Checkpoint site and started to work on the "Object Handles". I'm at the beginning, but it's starting to take shape.
If you find this in some way usfeful, I'm more than happy to do a pull request. Obviously if you think it does not fit, or if you just don't want my crappy code in your repo, I totally understand you ;-) and I can keep this as a separated fork. And if you have any suggestion or advice on how to improve it, it's welcome!
Thanks a lot.
The text was updated successfully, but these errors were encountered: