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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

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

Source
Associated Vulnerability
Title:Fortinet FortiNAC 安全漏洞 (CVE-2022-39952)
Description:Fortinet FortiNAC是美国飞塔(Fortinet)公司的一种零信任访问解决方案。 Fortinet FortiNAC存在安全漏洞。攻击者利用该漏洞通过特制的HTTP请求执行未经授权的代码或命令。以下版本受到影响:9.4.0版本、9.2.0版本至9.2.5版本、9.1.0版本至9.1.7版本、8.8.0版本至8.8.11版本、8.7.0版本至8.7.6版本、8.6.0版本至8.6.5版本、8.5.0版本至8.5.4版本、8.3.7版本。
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

[4.0K] /data/pocs/197011163a9dee22898b9756d8222984ae3560e6 ├── [ 912] CVE-2022-39952.py ├── [ 55] payload └── [1.6K] README.md 0 directories, 3 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.