当前位置:网站首页>vulnhub之DC2
vulnhub之DC2
2022-06-10 21:38:00 【天下 (天衍师)】
简述:各位兄弟可移步至https://blog.csdn.net/shuteer_xu/article/details/116141639,直接看这位师傅的即可,本人只当成一个笔记
老三样,主机发现,端口扫描,指纹识别
主机发现
nmap -sS 192.168.43.0/24

全端口扫描
nmap -A -p- 192.168.43.130

共发现 7744为ssh端口处于开放状态,使用hydra进行爆破,使用
hydra -L /opt/user.txt -P /opt/mima.txt ssh://192.168.43.130:7744该命令进行爆破尝试,未发现相应结果
80为Apache端口,nmap显示会重定向到http://dc-2中,修改/etc/hosts文件,添加192.168.43.130 dc-2
指纹识别,使用whatweb进行指纹识别,发现为wordpress,使用wpscan进行检测,扫描并未发现相应漏洞可以进行利用,尝试进行枚举用户名,
使用浏览器访问即可,发现有flag页面,显示需要使用cewl获取密码字典,使用cewl dc-2 >pass.txt 该命令获取密码字典
共发现三个用户名:admin,jerry,tom,将三个用户名存储为user.txt,使用我wpscan爆破账号所对应的密码
wpscan --url http://dc-2/ -U user.txt -P pass.txt
共发现
| Username: jerry, Password: adipiscing
| Username: tom, Password: parturient
对应的用户名和密码
尝试连接ssh jerry未成功登陆,tom成功登陆,显示该用户所能够执行的命令
echo $PATH
echo /home/tom/usr/bin/*

发现tom用户仅仅能够使用less,scp,ls,vi四个命令,此文件夹下存在flag3.txt文件,提示我们需要su到jerry用户中,
但是输入su jerry缺显示命令未找到,看大佬的博客,存在rbash,相当于权限控制,使得用户无法执行某些命令,需要进行绕过rbash
采用大佬提供的命令
[email protected]‐2:~$ BASH_CMDS[a]=/bin/sh;a
$ /bin/bash
[email protected]‐2:~$ export PATH=$PATH:/bin/
[email protected]‐2:~$ export PATH=$PATH:/usr/bin

即可绕过rbash进行切换用户的操作,切换到jerry用户下,接下来需要提权操作
sudo -l 查看当前用户所能够使用的root命令
显示存在一个git可以使用sudo执行
查找git提权命令,师傅的博客中提供的链接里面有两种git提权方法,我使用的是第一种,成功提权,第二种,估计是能力不够,实现不了提权的操作
以下为师傅的博客地址,
https://blog.csdn.net/shuteer_xu/article/details/116141639
边栏推荐
- TcaplusDB君 · 行业新闻汇编(六)
- Interpretation of dataset class of mmdetection
- C语言内功修炼【整型在内存中的存储】
- 中小型会议如何进行数字化升级?
- 自己搞了一个相亲软件的源码,用兴趣的可以聊聊
- Storage engine analysis
- Pki/tls Swiss Army knife cfssl
- Locking mechanism
- How small and micro enterprises build micro official websites at low cost
- Blue Bridge Cup_ A fool sends a letter_ recursion
猜你喜欢

【TcaplusDB知识库】TcaplusDB查看进程状态介绍

How can small and medium-sized conferences be upgraded digitally?

Interpreting the registry class of mmcv

【TcaplusDB知识库】TcaplusDB查看进程所在机器介绍

Tcapulusdb Jun · industry news collection (VI)

Reading notes on the way of Huawei data

小微企业如何低成本搭建微官网

【TcaplusDB知识库】TcaplusDB TcapProxy扩缩容介绍

Web3生态去中心化金融平台——Sealem Finance
![[tcapulusdb knowledge base] Introduction to tcapulusdb engine parameter adjustment](/img/74/6ce32e007c064c9255269fe38761a4.png)
[tcapulusdb knowledge base] Introduction to tcapulusdb engine parameter adjustment
随机推荐
Face recognition software based on deepface model
[tcapulusdb knowledge base] tcapulusdb daily inspection introduction
SMB anonymous
【TcaplusDB知识库】TcaplusDB刷新tbus通道介绍
Opencv_100问_第三章 (11-15)
Niuke: expression evaluation
自己做了个相亲交友App,有兴趣的朋友可以看看
Web3 ecological decentralized financial platform sealem Finance
CCF CSP 202109-2 非零段划分【100分】
Several reasons and solutions of virtual machine Ping failure
Web3生态去中心化金融平台——Sealem Finance
mathtype7.x的基本使用
UE4骨骼动画新手入门
LuoYongHao: if I were the person in charge, I could make apple products go up more than three steps
[Axi] explain the principle of two-way handshake mechanism of Axi protocol
[tcapulusdb knowledge base] Introduction to the machine where the tcapulusdb viewing process is located
Watlow签订从施耐德电气手中收购Eurotherm的协议
TcaplusDB君 · 行业新闻汇编(一)
How small and micro enterprises build micro official websites at low cost
Matlab - Implementation of evolutionary game theory