-
Notifications
You must be signed in to change notification settings - Fork 173
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
Jumper and Jumper_randomized are not sending calls from NTDLL address space #13
Comments
My understanding is that jumper is doing the same thing as this post described -- instead of doing it manually |
You're intuition about the syscall is right, what it is a bit off is the detection you're presenting. This Frida script doesn't actually check where the syscall is originating from. It's trying to detect the syscall stub position. What's happening, at least for what I can guess by reading the Frida script, is that when you are calling an "Nt" function, the script will detect the call, trace execution "forward" using an instruction iterator, and detects the syscall stub by looking ahead the stub instructions: |
I added bunch of NOPs between those statements, but it didn't help. The Frida script checks if mov eax is outbounds of the NTDLL address, which it is therefore it declares it malicious direct syscall. More like ROP chain concept I am not trying to evade this scanning, but it seems like modern AVs/EDRs are leveraging this along with ETW to direct syscalls and shutsdown the process |
Thanks for pointing it out. On the first glance, this kind of detection seems trivial to bypass, I'll have a play with this script as soon as I can. Anyway, regardless this specific Firda script, there are several updates currently under development to address stack tracing and detections similar to what you're describing. However, I'm afraid they won't be ready overnight. I planned to release more things faster but I got delayed and I won't be ready to release anything major before March I guess. |
Hi, I was wondering if you have any updates planned. Seems like a lot of EDRs are now tracking the stack to detect direct syscalls and blocking them -- which becomes a pain in the butt for Red Teaming. |
Hey @philross88, thank you very much for the heads up. I do have some plans for this, yes. But I am afraid they won't be announced before August this year 😬 |
My understanding is that Jumper and Jumper_randomized would jump into NTDLL space, and use the syscall instructions by jumping into those assembly instructions, however when I trace the program with Frida, I can see that none of calls are jumped or at least Frida script is catching them being called outside of the NTDLL space.
I also enabled the debug and prints for Found Syscalls and I see them getting kicked In. I tried debugging with the debugger and I saw jumps to NTDLL but I am not sure why the calls are still made from outside of the NTDLL address space.
Using the following functions and command to generate the syswhisper files in generic code injector
python3 syswhispers.py -a x64 -c msvc -m jumper_randomized -f NtAllocateVirtualMemory,NtWriteVirtualMemory,NtOpenProcess,NtCreateThreadEx,NtProtectVirtualMemory
I used the following Frida script to trace the syscalls origination:
The text was updated successfully, but these errors were encountered: