Hack Like a Pro: How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB) « Null Byte :: WonderHowTo

Welcome back, my hacker novitiates!Often, tohack a website, we need to connect to and exploit a particular object within said website. It might be an admin panel or a subdirectory that is vulnerable to attack. The key, of course, is to find these objects, as they may be hidden.DIRB, developed by The Dark Raver, is a tool designed to find these objects, hidden and unhidden. Since it is already included into Kali, there is no need to download and install anything. For those of you who need to download it, it is availablehere.Step 1: Open a TerminalThe first step, as usual, is to fire upKaliand open a terminal.Step 2: Start DIRBOnce we have a terminal open, go ahead and typedirbto get the help screen.kali > dirbAs you can see in this screenshot above, DIRB's syntax is very simple with multiple options. In its simplest form, we only need to type the commanddirbfollowed by the URL of the website we are testing.kali > dirb URLStep 3: Using DIRB for a Simple Hidden Object ScanIt's simplest form, DIRB will scan the website looking for 4,612 object types. Let's try it on our favorite test site,webscantest.com.kali > dirbhttp://webscantest.comDIRB begins the scan looking for those keywords among the website objects.When DIRB finds a good directory (Code 200), it then begins to look inside that directory for additional hidden objects. Code 503 indicates "temporarily unavailable."Finally, when DIRB is done, it reports back the number of found objects (113 in this case). Note that in the help screen above, we can use the-oswitch to send the results to an output file to save the results to a text file.Step 4: Testing for Special Vulnerable ListsWe can use DIRB to test for specific vulnerable objects within specific types of web technologies. Each web technology has different vulnerabilities. They are NOT all the same. DIRB can help us look for specific vulnerable objects specific to the particular technology.In Kali, DIRB has specific wordlists to search for these vulnerable, often hidden objects. You can find them at:kali > cd /usr/share/dirb/wordlists/vulnThen list the contents of that directory:kali > ls -lAs you can see above, there are numerous wordlists that contain keywords of vulnerable objects in different web technologies such as Apache, ColdFusion, FatWire, ISS, JBoss, Oracle, SAP, Tomcat, WebLogic, and many more. Since I suspect my website is running Apache as a web server (I could do abanner grabor usehttprintto make certain), it makes sense to try theapache.txtwordlist first.We can now build ourdirbcommand to use that Apache vulnerable object wordlist by typing:kali > dirbhttp://webscantest.com/usr/share/dirb/wordlists/vulns/apache.txtWhen we hit enter, DIRB will scan the site looking for vulnerable objects from theapache.txtwordlist.Now, DIRB will use that Apache list to look for known vulnerable objects. If it finds any, then you can take the next step and look for an exploit to take advantage of it inExploit-DB,Metasploit,SecurityFocus, or any of the other many exploits sources on the web. Of course, you must use thevulnswordlist appropriate to the technology being used in the website. For instance, if it is a Windows IIS server, you should use theiis.txtwordlist.Keep coming back, my hacker novitiates, as we continue to explore the technologies and techniques of the most valuable skill set of the 21st century—hacking!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHack Like a Pro:How to Hack Web Apps, Part 1 (Getting Started)Hack Like a Pro:How to Hack Web Apps, Part 2 (Website Spidering with WebScarab)How To:Launch Apps, Tasks, & Websites Directly from Your iPhone's Notification CenterNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:How to Crack Online Web Form Passwords with THC-Hydra & Burp SuiteHack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)How To:If You're Seeing Lock Screen 'DU' Malware When Charging, Uninstall These Apps Right NowHow To:Launch Apps from the Side of Your Screen (A Perfect Mod for the Galaxy S6 Edge)How To:Remove Stock iOS App, Without Jailbreak (iOS 6)News:5 Apps That'll Make You Ditch Your Stock Photo GalleryHow To:Unlock the Hidden Multi-Window Mode in Android 6.0 MarshmallowNews:Your Apple Watch Is a Secret Social Media MachineHow To:Temporarily Disable Your Instagram Account When You Need to Take an #InstaBreakHow To:Hide Stories in Your Facebook Feed on iPhone or AndroidNews:The Best Cyber Monday Deals on iOS Apps & Games for Your iPhoneHow To:Save Battery When Playing YouTube Music on Your Galaxy, Pixel, or Other AMOLED DeviceHow To:Encrypt & Hide Files, Photos, & Videos on AndroidHow To:The Safest Way to Disable ALL Bloatware on Your Galaxy S10How To:Lock Your Photos, Videos, Files, & Passwords in a Digital Safe for iOSBest Android Antivirus:Avast vs. AVG vs. Kaspersky vs. McAfeeHack Like a Pro:How to Find Website Vulnerabilities Using WiktoHow To:Force Restart Your iPhone 11, 11 Pro, or 11 Pro Max When It's Acting UpHow To:Generate Viral Memes Like a Pro with These Apps for Your iPhoneApple Photos 101:How to Hide Images & Videos from Your iPhone's Camera RollHow To:Access the Home Screen on the iPhone X,XS,XR, 11 & 11 ProHow To:Broken Buttons on Your Android Phone? Use This On-Screen Navigation Bar Instead (No Root Needed)News:Deleting Stock Apps on iOS 10 Doesn't Actually Remove Them — Here's ProofHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)How To:Find 3D Snapchat Filters for New Effects with Your iPhone's Face ID CameraHow To:Save Custom Shooting Presets in Filmic Pro So You Don't Have to Adjust Settings Later for Similar ShotsHow To:Use This Shortcut to Turn Any Photo into a Notch-Hiding Wallpaper on Your iPhoneHow To:View the Battery Percentage Indicator on Your iPhone X,XS,XSMax, orXRHow To:Hack TOR Hidden ServicesHack Like a Pro:How to Hack Web Apps, Part 4 (Hacking Form Authentication with Burp Suite)How To:Activate Developer Options on Your Galaxy Note 9How To:Remove Yourself from a Tagged Photo on InstagramHow To:Record Your iPhone's Screen Without the Annoying Red Bar or BubbleNova Launcher 101:How to Hide Apps to Remove Icons & Free Up Space in Your App DrawerHow To:Hide the Status Bar on Your iPhone with This Cool & Simple GlitchHow To:Replace Your Galaxy S8's Nav Bar with Pie Controls to Prevent Screen Burn-In