dc-2靶机

下载靶机dc-2
先找靶机
nmap -sV 10.204.11.0/24
先广泛的找一下
再细查一下
nmap -A -p- 10.204.11.3

开了个80端口又有一个ssh登陆端口
我们先查看一下
端口服务
发现无法访问解析失败我们可以配置/etc/hosts文件再主机配置C:\Windows\System32\drivers\etc
没有权限的话右键更改即可

在kali上直接改就行
都是加入

ip   dc-2

image
image

知道了是什么cms
并且找到了第一个flag
翻译结果

Flag
Flag 1:

Your usual wordlists probably won’t work, so instead, maybe you just need to be cewl.

More passwords is always better, but sometimes you just can’t win them all.

Log in as one to see the next flag.

If you can’t find it, log in as another.

看到workpress的cms我们就好办了kali有个工具wpscan专门打它
我们先扫一下目录

找到登陆页面

根据提示用cewl生成密码字典
至于用户名我们可以用wpscan生成

cewl http://dc-2/ -w 1.txt

image

wpscan --url dc-2 -e u
//找到用户名

image

把三个用户名放到一个文件里

image

开始爆破

image

爆出它两个的密码登陆试一下

在jerry中找到了flag2

Flag 2:

If you can't exploit WordPress and take a shortcut, there is another way.

Hope you found another entry point.

提示我们还有一个入口

我们能想到是ssh登录
jarrp死活登不上去
就用tom登录了

image

有rbash限制
rbash逃逸
利用系统常见应用逃逸
我们先看一下都能利用那些命令

compgen -c

发现有vi

vi随便打开文件直接
:set shell=/bin/sh
:shell
即可

image

成功
但是cat命令还是不能执行这是环境变量的问题
看一下flag3的内容

Poor old Tom is always running after Jerry. Perhaps he should su for all the stress he causes.

提醒我们用su去登陆jerry
进入后找到flag4

image

Good to see that you've made it this far - but you're not home yet. 

You still need to get the final flag (the only flag that really counts!!!).  

No hints here - you're on your own now.  :-)

Go on - git outta here!!!!

提示我们git
那我们就用git继续提权

git提权
image

除了git我们好像也没有什么方法

image
image

通关

posted @ 2024-08-06 21:27  DGhh  阅读(9)  评论(0编辑  收藏  举报