-
Notifications
You must be signed in to change notification settings - Fork 36
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
shellcode_amd64 executor crashes agent #433
Comments
In the msg above I was using Go version 1.20.5. I saw mention of 1.11 in a config file so I installed that version. Same error:
@elegantmoose Can you shed any light on this? |
Hey, I had the same problem. Inspecting the code it seems that all the WinAPIs related to the shellcode lading are not initialised properly on Windows. This means that VirtualAlloc is NULL, and when invoked raises an ACCESS_DENIED exception. You can solve this by "stealing" the lazyDll loading code from from the donut executor. I simply included both modules in my fixed sandcat. At line 20-ish the var statement now looks like this:
and fix the import with the following
|
Also bear in mind that you always need to use a shellcode with an exitfunc=thread, or it will crash the sandcat process. A working example is this: |
Describe the bug
The sandcat agent crashes and the connection between it and Caldera is lost (no heartbeat) when executing shellcode using the shellcode_amd64 executor on a Windows 10 system.
To Reproduce
Steps to reproduce the behavior:
Target system: Windows 10 22H2
Caldera: latest (4.2.0)
Sandcat: latest
Here is the text
Expected behavior
The given shellcode is executed.
Desktop (please complete the following information):
Additional context
I tested the shellcode functionality on Linux (Kali) and it seemed to work fine.
The same error code is also shown in a cmd prompt
The text was updated successfully, but these errors were encountered: