How to use the command 'feroxbuster' (with examples)
The ‘feroxbuster’ command is a simple and fast content discovery tool written in Rust. It can be used to brute-force hidden paths on web servers and more. It supports various features such as recursive searching, wordlist matching, filtering by status code and file size, extracting links from webpages, and using a proxy.
Use case 1: Discover specific directories and files that match in the wordlist with extensions and 100 threads and a random user-agent
Code:
feroxbuster --url "https://example.com" --wordlist path/to/file --threads 100 --extensions "php,txt" --random-agent
Motivation: This use case is useful when you want to discover specific directories and files on a website using a wordlist. By specifying the extensions and using multiple threads, it allows for efficient and fast discovery of hidden content.
Explanation:
--url "https://example.com"
: Specifies the target URL to scan.--wordlist path/to/file
: Specifies the path to the wordlist file containing directory and file names.--threads 100
: Specifies the number of threads to use for concurrent scanning.--extensions "php,txt"
: Specifies the extensions to match with the wordlist entries.--random-agent
: Uses a randomly selected user-agent header for each request.
Example output:
[+] Progress: 10/100
[+] Progress: 20/100
...
[+] Progress: 100/100
Use case 2: Enumerate directories without recursion through a specific proxy
Code:
feroxbuster --url "https://example.com" --wordlist path/to/file --no-recursion --proxy "http://127.0.0.1:8080"
Motivation: This use case allows you to enumerate directories on a website without recursively searching through subdirectories. It can be helpful when you only want to focus on the top-level directories. By specifying a proxy, you can also route the traffic through a specific server for analysis or debugging purposes.
Explanation:
--url "https://example.com"
: Specifies the target URL to scan.--wordlist path/to/file
: Specifies the path to the wordlist file containing directory and file names.--no-recursion
: Disables recursive searching through subdirectories.--proxy "http://127.0.0.1:8080"
: Specifies the proxy server to use for sending HTTP requests.
Example output:
[+] Proxy: http://127.0.0.1:8080
[+] Starting: https://example.com/
[+] Results:
https://example.com/dir1
https://example.com/dir2
https://example.com/dir3
Use case 3: Find links in webpages
Code:
feroxbuster --url "https://example.com" --extract-links
Motivation: This use case is useful when you want to extract links from webpages. It allows you to find other URLs within the target webpage, which can be further used for exploration or analysis.
Explanation:
--url "https://example.com"
: Specifies the target URL to scan.--extract-links
: Enables the extraction of links from webpages.
Example output:
[+] Results:
https://example.com/page1.html
https://example.com/page2.html
https://example.com/page3.html
Use case 4: Filter by a specific status code and a number of chars
Code:
feroxbuster --url "https://example.com" --filter-status 301 --filter-size 4092
Motivation: This use case allows you to filter the results based on a specific status code and a number of characters in the response. It can be helpful when you want to narrow down the discovered paths based on specific criteria.
Explanation:
--url "https://example.com"
: Specifies the target URL to scan.--filter-status 301
: Filters the results to include only URLs with a status code of 301 (Moved Permanently).--filter-size 4092
: Filters the results to include only URLs with a response size of 4092 characters.
Example output:
[+] Results:
https://example.com/page1.html
https://example.com/page2.html
https://example.com/page3.html
Conclusion:
The ‘feroxbuster’ command is a powerful content discovery tool that offers various use cases for uncovering hidden paths on web servers. It supports features such as recursively searching through directories, wordlist matching, extracting links from webpages, and filtering results by status code or file size. By understanding these use cases and how to utilize the command’s arguments, you can effectively discover and explore web content.