Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   Themida/WinLicence latest version information (https://forum.exetools.com/showthread.php?t=18455)

dummys 10-18-2017 17:59

Themida/WinLicence latest version information
 
Hi guys,

I'm trying to be able to debug an application that run only in Windows 10 and is packed by Themida. In fact, it's not the main exe file which is packed, it's a dll that after add a lot of new sections to the exe it seems. I can attach to it using ScyllaHide, but when running secure function inside the binary my debugger seems to get trapped and the application crash. I was trying to launch directly from the debugger the application, but even with all ScyllaHide antidebug activated, it seems that themida still find that I'm debugging it. I tried to hook using Frida the NtSetInformationThread in order to block the ThreadHideFromDebugger flag, without success. I've also tried using API Monitor, with the context switch attach. I'm searching for information about some of the protection that this protector can use. Or if you have idea how to detect of search which protection it is using. thanks

ahmadmansoor 10-18-2017 18:59

you have to handle this by sure :
KERNELBASE.dll NtSetInformationProcess
KERNELBASE.dll NtQueryInformationProcess
KERNELBASE.dll NtClose
that should work ....
windows 10 suck :( , handle API not that easy .
try on windows 8.1 or 7 SP2

dummys 10-18-2017 19:39

the problem is that it didn't run on Windows 7. msvcr80.dll crash.
Those Api should be handled by ScyllaHide. I tested it with ScyllaTest and it's ok.
Do you think that themida is doing kernel hook as well ?

TechLord 10-19-2017 02:49

Quote:

Originally Posted by ahmadmansoor (Post 110932)
you have to handle this by sure :
...
windows 10 suck :( , handle API not that easy .
try on windows 8.1 or 7 SP2

Yes, also it seems that in the Creators Update of Win 10 to be released soon, the hooking of system processes/modules will not be allowed ... :(

So we need to come up with newer methods to hook and hide our debugging efforts. Or just keep using the older versions of Windows ...

dummys 10-19-2017 15:00

Jeez, that's crap... What you do when you have no choice on the platform for reversing ?

So I was able to see the ring3 hooks with PC_Hunter, it's only ntdll.DbgUiRemoteBreakin. There is no ring0 hook (oreans driver not loaded). When I restore the ring3 hooks and then attach my debugger it's working. But when starting a "secure" function, then debugee does nothing.

ahmadmansoor 10-19-2017 21:23

check if there are single step check , what the target is ?

dummys 10-20-2017 14:51

yes, I get some exception for single stepping, I always pass it to the debugee.
I'ts a legit application. Do you think it's possible to totally remove the themida protector from the protected DLL ? The original software is not packed, it's only the "secure dll" that is packed/protected.

dummys 10-20-2017 21:11

Hey there,

I made some progress. Was able to install the application (after a ton of hack) to a windows 7 x64VM. With x64dbg+ScyllaHide, i get trap and the debuggee closed. I get Exception with "Illegal_INSTRUCTION". This exception I need to pass it to the debuggee right ? I get another exception: "EXCEPTION_PRIV_INSTRUCTION". I also pass it to the application. After this it close.

sendersu 10-21-2017 01:19

mr Exodia recently fixed/udpated the hider - ScyllaHide_2017-10-19_18-54.7z
and yes - you need to pass each & every exception into the dbg engine,
think as if there is no debugger at all!
what would happen then? :)

dummys 10-23-2017 16:13

Yes, that what I do. The problem is that when using shift+F9, my debugger get trapped and process exited. Even with ScyllaHide and profile Themida x86 on. How can I trace to find the tricks he is using to detect me ?

sendersu 10-24-2017 00:57

What OS are you on?
2) try using diff debugger (Olly/ISA)

dummys 10-26-2017 16:04

x64dbg + ScyllaHide. Tried on windows 10x64 and windows 7

sendersu 10-27-2017 15:23

Have you already seen the Tm Ultra Unpacker 1.4 script?
eg: https://tuts4you.com/download.php?view.3526
I recommend you to use W7 (if XP not possible) for R.E.

dummys 10-30-2017 16:27

Yes I've already tried. My debugger get trapped...

SKiLLa 10-30-2017 23:00

Could be the Trap Flag in EFLAGS when you single-step the instruction instead of skipping it. Or the push ss; pop ss; pushf trick...

Another guess would be the SetUnhandledExceptionFilter detection trick. Probably not the best link, but still:

Quote:

_hxxps://evilcodecave.wordpress.com/2008/07/24/setunhandledexception-filter-anti-debug-trick/
All these require some manual skipping/continuing instead of blindly passing the exception to the debuggee ....


All times are GMT +8. The time now is 05:03.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX