环境准备
两台靶机:
2020-12-07 10:51:45.687490 | Ubuntu Target | 185.245.3.246 |
m0nk3y |
---|---|---|---|
2020-12-07 10:51:45.679223 | Kali Jump Host | 185.245.3.246 |
m0nk3y |
Kali 作为跳板机去打 内网Ubuntu。
Kali : 3.85.234.26
Ubuntu: 172.15.53.85
题目如下:

ssh 登录 kali
1 | ssh -i metasploit_ctf_kali_ssh_key.pem [email protected] |

直接开淦
When you find a challenge flag, calculate and submit the MD5 checksum of the PNG image to receive points! Hashes are not case sensitive.
说人话,flag就是找到的图片的 md5值,忽略大小写。
1 | [email protected]:~$ ifconfig |
ifconfig, 可以看到内网ip为 172.15.53.84, 而Ubuntu 目标ip为 172.15.53.85 。为同一个内网ip中。
nmap 扫端口
1 | [email protected]:~$ nmap -v 172.15.53.85 |
开启了80端口,先不忙搭nps隧道啥的,我直接curl 请求一下这个 http web服务。
1 | [email protected]:~$ curl 172.15.53.85 |
curl 下载一下这个图片。
1 | [email protected]:~$ curl -O 172.15.53.85/4_of_hearts.png |
得到这个flag:776d1d5ecfb91f71aecad71cb3c7c9d1。并且给了hint,Your remaining challenges are on other ports。那就再来一个全端口扫描吧。
1 | [email protected]:~$ nmap -p 1-65535 172.15.53.85 |
有点疑问,有些端口,用浏览器无法正常,curl却能返回一些信息。(原来是有联系的。
因为搞其他8080端口需要交互了,所以得弄个转发,在本机操作一下。
nps可以不落地配置文件启动:
1 | ./npc -server=ip:port -vkey=web界面中显示的密钥 |
nps建立成功后创建隧道。http 和 socks 代理就行啦。(这个时候可以把kali这台机器当做是我们已经GetShell 后的一台边界主机,因为kali 能出网,也能访问内网应用),kali 机器上安装 npc。
浏览器和proxychains4设置成nps 代理,这样就能在浏览器和 工具都在代理了。(或者直接用Proxifier


OK, 代理问题解决好了后,就继续淦。
80端口 4 of Hearts
80端口访问的那张图片的md5.
8080端口
4545端口

看到simplehttp 和 python,用curl请求一下果然有类似flag的文件,
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
用curl -o 这次好像不能下载了, 用wget下载就可以了。
8_of_hearts.elf
8_of_hearts.enc
得到这两个二进制文件。
xxd 查看一下

拖入IDA,F5一波(x),查看字符串:

F5一下 main函数:

6868端口
8092端口

8101端口

8200 文件上传GetShell
BP 要先设置 socks ,然后才能正常的抓包和重放。

有两种错误:
- Unsupported mime type (文件上传的后缀和content-type 不对应)
- Unsupported file format(gif以及其他后缀,只能传 jpg 和 png)

8202端口

8888端口

9000端口

9001端口

9010端口 Queen of Hearts
直接访问,给了一个jar包。

1 | ──> java -jar QOH_Client.jar ──(一,1207)─┘ |
[proxychains] Strict chain … xx.xx.xxx.116:6443 … xx.xx.xxx.116:6080 … 172.15.53.85:9008 … OK
Successfully connected to the server!
Please select an available action from the list below:
[1] Lists available files on the server
[2] Download available files from the server
[3] Authenticate to the server
1
Executing action…
Listing available files to download:
test.txt
queen_of_hearts.png
todo.md
Please select an available action from the list below:
[1] Lists available files on the server
[2] Download available files from the server
[3] Authenticate to the server
2
Executing action…
Checking authentication status…
You are not authenticated. Please authenticate before attempting to download from the server
要拿Queen of Hearts这个题的flag,要知道密码,em,好像不能暴破,先放一下。
9007端口 Red Joker

下载里面就有一个图片,直接 md5 filename 获取flag
1 | ┌─(~/CTF/metasploit_ctf/red_joker)─────────────────────────────────────────────────────────────────────────────────────────────────([email protected]:s000)─┐ |
9009
1 | └─(01:32:22)──> proxychains4 curl http://172.15.53.85:9009 ──(二,1208)─┘ |
国外友人的WP
https://rushisec.net/metasploit-ctf-2020-writeup/#9ofheartsport53
https://ctftime.org/event/1200/tasks/
挺不错的,就是发现比赛有点晚了,就打了一会儿就给停了vps。