前言
记一次某行业CTF比赛中遇见的一道题目EZweb
,结束后才发现魔改的webmaster
,题解基本类似。
信息搜集
全端口扫描

开放端口22, 53,80,查询web应用

获取权限
查看源码发现提示
webmaster.hmv

修改hosts文件
添加192.168.221.138 webmaster.hmv
dig axfr @192.168.221.138 webmaster.hmv
dig
是一个DNS查找实用程序,用于查询DNS名称服务器。它是“域信息槽”的缩写。
axfr
是一种DNS查询类型,用于请求一个区域的完整复制。这通常用于在DNS服务器之间复制区域。这种类型的查询通常被称为"区域传输"。
@192.168.221.138
指定了要查询的DNS服务器的IP地址。
webmaster.hmv
是你想要查询的域名。
使用dig工具从DNS服务器192.168.221.138请求一个关于域名webmaster.hmv的完整区域传输。

根据dns查询信息获取到john的密码Myhiddenpazzword

登录成功,看到tips.txt
提示flag在根目录下的flag.txt中,但是用户权限不足。


提权
- www目录的权限是nginx目录,创建文件给权限直接写shell

cd /var/www/html
touch shell.php
vi shell.php


192.168.221.138 /shell.php

根目录读取flag
