-
Notifications
You must be signed in to change notification settings - Fork 48
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
Import reconstruction is not working #85
Comments
It shouldn't be necessary to use That is something that I haven't tested in years, you may be the first to notice it's broken for a similar time period. The reason it's not enabled by default for all jobs is that it adds complexity and risk of crashing, which itself might impact detonation quality. But like anything with cape - if it was proven to be be solid enough it might be something that could be switched on in future. If you can supply a bit more info such as whether it's any UPX samples or a specific one, whether it's a 32-bit or 64-bit sample, etc. If it's a specific sample please share it. |
While Let's consider into two stages - unpacking and import reconstruction. These stages are independent. So if a PE payload is dumped using any mechanism in capemon, without import reconstruction enabled it will be 'fixed' or 'unmapped' but it won't have imports reconstructed. So you don't need this I have enough info now thanks - I can see for myself that it is indeed not working. So let me have a proper look into fixing it and I will get back to you. |
Thanks for your explanation! I'll be waiting for your reply. |
Import reconstruction is hopefully now fixed! Please do test with your sample(s) and let me know if there are any issues. For what it's worth, if you would like to enable import reconstruction for all UPX-packed samples then you can simply add the
This is a change I will consider making in the main repo - however as I mentioned since any issues or bugs here could detrimentally affect detonation of relevant samples, the bar for testing a universal change like this is quite high. |
Just re-reading your original post I wanted to just make sure you knew that you can enable import reconstruction as an advanced submission option: An alternative is to put You shouldn't need to touch the source or compile anything to access any feature in capemon! |
I attempted to unpack a simple UPX sample, but I found that the resulting file of dump-on-api could not run because the IAT was not fixed. After reading the code, I noticed that the related functionality in ScyllaHarness.cpp is disabled by default, so I enabled it.
Additionally, I found that the DumpImageInCurrentProcess function in CAPE.c calls the DumpProcess function, where the FixImport parameter is set to FALSE. I changed it to TRUE, but unfortunately, the IAT still could not be fixed. The related debugging information is shown in the attached image.
Could you please advise on what further modifications I need to make to enable the IAT repair functionality of capemon? Also, I am curious why this IAT repair feature is disabled by default. Thank you very much for your assistance!
The text was updated successfully, but these errors were encountered: