Directory Fuzzing — Bug Bounty
2021-04-12 16:57:48 Author: infosecwriteups.com(查看原文) 阅读量:223 收藏

Let python automate your bug bounty work!

c0d3x27

Image by c0d3x all right reserved.

When you are fuzzing a subdomain, You may find admin panels or even sensitive files. Let’s say you find a .git directory during directory fuzzing, You can download the source code of the application using this git dumper tool https://github.com/arthaud/git-dumper. This source code may contain credentials. You can find many articles related to this issue online.

Before even starting, we need to check if the domain is alive or not, Because large number of requests to a dead domain is just a waste of time. Let’s write a script to check for the domain we want to test.

Code:

Save this code as whatever.py, this script send requests to both port 80 and 443 to check the domain status. Using this script you are only going to hit robots.txt endpoint. Let’s focus to robots.txt, other than this endpoints will be just too large in size. Also, This is only used to fill up except blocks. Isdomainlive function return the list of domains with respective scheme if they are available, otherwise return False.

Code:

As seen in Line 4, you will download the directory wordlist from the dirsearch Github repository. The first will be to check whether the Domain is live or not. If the Domain is live, then fuzzing will start. Otherwise, it will just go to the next subdomain. The whole process takes a while because of the number of domains and subdomains. If you want to run this script in the behind the scene, you can use screen.

Happy Hunting !!


文章来源: https://infosecwriteups.com/directory-fuzzing-bug-bounty-3deb4dd3c32?source=rss----7b722bfd1b8d--bug_bounty
如有侵权请联系:admin#unsafe.sh