OP 12 April, 2022 - 06:22 PM
Dirsearch is a powerful tool that automatically checks for the existence of directories/files on a server It might discover admin logins, configuration files the admin forgot to remove and more! When attacking a site during a penetration test, I used this tool numerous times and have also had success based on the things I found with it
Dirsearch does not only output files it found, but also files it got a 403 (Forbidden Access) or other interesting response codes from
To use it on Linux, first install Git
Then clone into the repository
A folder named dirsearch will appear within the directory you executed this command in Switch into the directory by using
You will need pip3 to install the requirements listed in requirements.txt To install pip3 and afterwards install all the requirements using pip3 do
A basic usage of dirsearch could look like this
-u specifies the URL that you want to check for the files
-e specifies the file extensions that will be looked for, in this case: php,js,txt and .conf
In addition to that, there are some other useful flags you can use:
--cidr scans all hosts in the given cidr
-X Excludes specified extensions
-r Search directories recursively
--proxy Proxy your requests; good for circumventing IP blocks and privacy
As it is a tool I find myself using pretty often, I thought I would share that as well, hope you enjoyed this and learned something new
Dirsearch does not only output files it found, but also files it got a 403 (Forbidden Access) or other interesting response codes from
To use it on Linux, first install Git
Code:
apt -y install git
Then clone into the repository
Code:
git clone https://github.com/maurosoria/dirsearch
A folder named dirsearch will appear within the directory you executed this command in Switch into the directory by using
Quote:cd dirsearch
You will need pip3 to install the requirements listed in requirements.txt To install pip3 and afterwards install all the requirements using pip3 do
Quote:apt install python3-pip
pip3 install -r requirements.txt
A basic usage of dirsearch could look like this
Quote:python3 dirsearch.py -u https://example.com -e php,js,txt,conf
-u specifies the URL that you want to check for the files
-e specifies the file extensions that will be looked for, in this case: php,js,txt and .conf
In addition to that, there are some other useful flags you can use:
--cidr scans all hosts in the given cidr
-X Excludes specified extensions
-r Search directories recursively
--proxy Proxy your requests; good for circumventing IP blocks and privacy
As it is a tool I find myself using pretty often, I thought I would share that as well, hope you enjoyed this and learned something new