FDSploit : File Inclusion & Directory Traversal Fuzzing, Enumeration & Exploitation Tool

FDSploit is a file Inclusion & Directory Traversal fuzzing, enumeration & exploitation tool. It can be used to discover and exploit Local/Remote File Inclusion and directory traversal vulnerabilities automatically.

In case an LFI vulnerability is found, –lfishell option can be used to exploit it. For now, 3 different types of LFI shells are supported:

  • Simple: This type of shell allows user to read files easily without having to type the url everytime. Also it only provides the output of the file and not the whole html-source code of the page which makes it very useful.
  • Expect: This type of shell is a semi-interactive shell which allows user to execute commands through PHP’s expect:// wrapper.
  • Input: This type of shell is a semi-interactive shell which also allows user to execute commands through PHP’s php://input stream.

So far, there are only two lfi-shell built-in commands:

  • Clear
  • Exit

Also Read – SysAnalyzer : Automated Malcode Analysis System

Features

  • The LFI-shell interface provides only the output of the file readed or the command issued and not all the html code.
  • 3 different types of LFI-shells can be specified.
  • Both GET/POST requests are supported.
  • Automatic detection of GET parameters.
  • Certain parameters can be specified for testing using wildcards (*).
  • Optional session cookies can be specified and used.
  • Automatic check for RCE using PHP functions can be performed.
  • Additional use of sha-256 hash is used to identify the potential vulnerabilities.
  • base64/urlencoding support.

Some Examples

  1. Directory traversal vulnerability discovery:
    From the below output it seems that the directory parameter is probably vulnerable to directory traversal vulnerability since every request with ../ as payload produces a different sha-256 hash.
    Also the content-length is different for every request:

./fdsploit.py -u ‘http://127.0.0.1:8888/test/bWAPP/bWAPP/directory_traversal_2.php?directory=documents’ -c ‘PHPSESSID=7acf1c5311fee614d0eb40d7f3473087; security_level=0’ -d 8

2. LFI vulnerability discovery:
Again, the language parameter seems vulnerable to LFI since using ../etc/passwd etc.. as payload, every request being colored with green produces a different hash, a different content-length from the initial, and the keyword specified is found in the response:

./fdsploit.py -u ‘http://127.0.0.1:8888/test/bWAPP/bWAPP/rlfi.php?language=*&action=go’ -c ‘PHPSESSID=7acf1c5311fee614d0eb40d7f3473087; security_level=0’ -d 7 -k root -p /etc/passwd

3. LFI exploitation using simple shell:
Exploiting the above LFI using simple shell:

Notes

  • When POST verb is used, –params option must also be specified.
  • To test for Directory Traversal vulnerability the –payload option must be left to default value (None).
  • When –file options is used for multiple-urls testing, then only GET request is supported.
  • When both –file & –cookie options are set then since only one cookie can be specified each time the urls must refer on the same domain or be accessible without a cookie (that’s is going to be fixed in a future update).
  • input shell is not compatible with POST verb.

Requirements:

Note: To install the requirements:

pip install -r requirements.txt –upgrade –user

Disclaimer

This tool is only for testing and academic purposes and can only be used where strict consent has been given. Do not use it for illegal purposes! 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 tool and software in general.

R K

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

4 days ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

4 days ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

6 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

1 week ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

2 weeks ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

2 weeks ago