ช่องโหว่บน Fortinet Firewall CVE-2018–13382 เพียงเปิด SSLVPN ไว้ก็โดนเปลี่ยน password ได้ง่ายดาย

KErOjUnG
KErOjUnG
Published in
1 min readSep 13, 2019

--

ช่องโหว่ของ CVE-2018–13379 ถ้าเปิด public SSLVPN ที่สามารถเข้าถึงได้จากภายนอกทาง hacker สามารถ รันโปรแกรม python ไปแก้ไข password ได้โดยไม่จำเป็นต้องทราบ password ตัวเก่า หลังจากนั้นก็สามารถใช้งาน SSLVPN ได้ปกติ

Firmware บน Firewall Fortinet ที่กระทบ

FortiOS: 5.4.0, 5.4.1, 5.4.2, 5.4.3, 5.4.4, 5.4.5, 5.4.6, 5.4.7, 5.4.8, 5.4.9, 5.4.10, 5.6.0, 5.6.1, 5.6.2, 5.6.3, 5.6.4, 5.6.5, 5.6.6, 5.6.7, 5.6.8, 6.0.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4

สำหรับ Version 5.40 หรือ ต่ำกว่า 5.2 ไม่กระทบ ซึ่งทางเราได้ลอง scan ด้วย tool

CVE-2018–13382(python) สามารถ download ได้ที่ github

https://github.com/milo2012/CVE-2018-13382

$ python CVE-2018-13382.py  -h
Usage: CVE-2018-13382.py [options]

Options:
-h, --help show this help message and exit
-i IP e.g. 127.0.0.1:10443
-u USERNAME
-p PASSWORD

สำหรับท่านที่ไม่สามารถลงโปรแกรมได้ให้ลองคำสั่ง

pip install colored

pip install multiprocessing

pip install -U user_agent

pip install termcolor

*ถ้ามีการใช้ port ที่ไม่ใช่ default ให้ระบุ -i x.x.x.x:10443 เป็นต้น

ซึ่งข้อแนะนำจากทาง fortinet คือให้ทำการ upgrade ไป version ที่สูงกว่า FortiOS 5.4.11, 5.6.9, 6.0.5, 6.2.0

หรือปิด function SSLVPN บน box นั้นซะ !! โดยใช้ command ตามนี้

config vpn ssl settings

unset source-interface

end

อีกทางเลือกนึงคือนำ Two-Factor Authentication(2FA) ใช้งานหาก hacker ทำการเปลี่ยน password ก็ไม่สามารถเข้าได้

ตัวอย่างการรัน execute python program ผ่านทางช่องโหว่ดังกล่าวจะเป็นถึง password plain text show ขึ้นมา

ภาพจาก https://devco.re/blog/2019/08/09/attacking-ssl-vpn-part-2-breaking-the-Fortigate-ssl-vpn/

ที่มาข้อมูล Link : https://fortiguard.com/psirt/FG-IR-18-389

--

--