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

Goal: 1000 CNY · Raised: 1310 CNY

100%

CVE-2022-39952 PoC — Fortinet FortiNAC 安全漏洞

Source
Associated Vulnerability
Title:Fortinet FortiNAC 安全漏洞 (CVE-2022-39952)
Description:A external control of file name or path in Fortinet FortiNAC versions 9.4.0, 9.2.0 through 9.2.5, 9.1.0 through 9.1.7, 8.8.0 through 8.8.11, 8.7.0 through 8.7.6, 8.6.0 through 8.6.5, 8.5.0 through 8.5.4, 8.3.7 may allow an unauthenticated attacker to execute unauthorized code or commands via specifically crafted HTTP request.
Description
POC for CVE-2022-39952
Readme
# CVE-2022-39952
POC for CVE-2022-39952 affecting Fortinet FortiNAC

The default configuration of this exploit writes a cron job to create a
reverse shell. Be sure to change the `payload` file to suite your environment.

## Technical Analysis
A technical root cause analysis of the vulnerability and indicators of compromise can be found on our blog:
https://www.horizon3.ai/fortinet-fortinac-cve-2022-39952-deep-dive-and-iocs

## Summary
This POC abuses the keyUpload.jsp endpoint to achieve an arbitrary file write.

## Usage
```plaintext
root@kali:~/CVE-2022-39952# python3 CVE-2022-39952.py --target 10.0.40.85 --file payload
[+] Wrote payload to /etc/cron.d/payload
[+] Payload successfully delivered
```

## Troubleshooting
If using a cron based payload, make sure the payload file has the appropriate
permissions and owner:
```shell
sudo chown root:root payload
```
```shell
sudo chmod 0644 payload 
```

## Mitigations
Update to the latest version by following the instructions within the PSIRT
https://www.fortiguard.com/psirt/FG-IR-22-300

## Follow the Horizon3.ai Attack Team on Twitter for the latest security research:
*  [Horizon3 Attack Team](https://twitter.com/Horizon3Attack)
*  [James Horseman](https://twitter.com/JamesHorseman2)
*  [Zach Hanley](https://twitter.com/hacks_zach)

## Disclaimer
This software has been created purely for the purposes of academic research and for the development of effective defensive techniques, and is not intended to be used to attack systems except where explicitly authorized. Project maintainers are not responsible or liable for misuse of the software. Use responsibly.

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 →