当前位置: 首页 > news >正文

vulnhub靶场之JOY

一.环境搭建

1.靶场描述

Does penetration testing spark joy? If it does, this machine is for you.
This machine is full of services, full of fun, but how many ways are there to align the stars? Perhaps, just like the child in all of us, we may find joy in a playground such as this.
This is somewhat OSCP-like for learning value, but is nowhere as easy to complete with an OSCP exam timeframe. But if you found this box because of preparation for the OSCP, you might as well try harder. :-)
If you MUST have hints for this machine (even though they will probably not help you very much until you root the box!): Joy is (#1): https://www.youtube.com/watch?v=9AvWs2X-bEA, (#2): something that should be replicated, (#3): what happens when you clean out seemingly "hidden" closets.
Note: There are at least two reliable ways of obtaining user privileges and rooting this machine. Have fun. :-)
Feel free to contact the author at https://donavan.sg/blog if you would like to drop a comment.

2.靶场下载

https://download.vulnhub.com/digitalworld/JOY.7z

3.靶场启动

二.信息收集

1.寻找靶场真实的ip地址

nmap -sP 192.168.239.0/24

arp-scan -l

靶场IP地址为192.168.239.132

2.探测端口及服务

nmap -p- -sV http://192.168.239.132

我们看到开启的端口:21,22,80等等

三.渗透测试

1.访问web服务

http://192.168.239.132

我们看到cms:ossec

2.扫描web服务

这里IP地址变为192.168.239.133

dirb http://192.168.239.133

sudo dirsearch -u   http://192.168.239.133

什么也没有

3.渗透测试

1)ossec框架

我们可以看到cms是ossec,版本号是0.8,我们进行漏洞查看

searchsploit ossec 0.8

我们没有找到合适的脚本

我们使用msfconsole进行漏洞查找,还是没有漏洞

也没有

2)ftp服务

我们看到21端口开放,我们进行查看,用户名是anonymous,密码为空

ftp 192.168.239.133

我们看到2个文件,我们进行查看

我们在/upload/,可以看到2个文件,我们进行查看

这个文件没有什么用

我们可以看到一个版本号的文件,但是它存在于patrick路径中,我们是没有权限去获取的,所以尝试将其转移到/upload路径中

我们使用telnet进行复制

telnet和ftp命令的区别:
telnet连接后,用户主机实际成为远程TELNET服务器的一个虚拟终端(或称是哑终端),一切服务完全在远程服务器上执行,但用户决不能从远程服务器中下载或上传文件,或拷贝文件到用户主机中来。
ftp则不同,它是采用客户机/服务器模式,用户能够操作FTP服务器中的目录,上传或下载文件,但用户不能请求服务器执行某个文件。

我们可以看到版本号在/upload/目录下,我们进行查看

我们可以看到ftp版本号是1.3.5,我们使用msf进行漏洞利用

3)msfconsole

我们使用msfconsole,可以看到攻击成功

4)提权

我们查看目录文件

可以看到patricksecretsofjoy,里面是patrick的密码,我们进行登录

patrick:apollo098765

我们查看提权方式

我们使用telnet进行复制,我们可以看到复制成功

echo "awk 'BEGIN {system(\"/bin/bash\")}'" > test

写入脚本到文件中,可以获取root权限

我们可以看到写入成功,我们把文件复制到/home/patrick/script/里面,然后执行

5)查看flag


http://www.mrgr.cn/news/54764.html

相关文章:

  • 保研推荐信模板
  • 利用python进行数据处理,得到对自己有利的内容
  • Array数组
  • 案例分享-优秀蓝色系UI界面赏析
  • 深入探索卷积神经网络(CNN):图像分类的利器
  • 前端开发学习(一)VUE框架概述
  • 提示词高级阶段学习day2.1-在提示词编写中对{}的使用教程
  • 卷积神经网络
  • R语言中的stat_compare_means():如何解决anova目标对象的方法问题
  • 我对需求分析的理解
  • DockerCompose快速部署Java项目、nginx前端和mysql数据库到centos虚拟机
  • ES6 中函数参数的默认值
  • protobuf 未知字段的获取
  • gc cr/current block 2-way
  • 【MySQL】内外连接
  • 2024年深圳福田区第十二届职工技能大比武职业技能竞赛圆满收官
  • Vue-router 路由守卫执行流程图
  • 光纤光学的基本方程
  • 【MySQL】:库的操作
  • 【力扣打卡系列】滑动窗口与双指针(接雨水)
  • 【Maven】一篇带你了解Maven项目管理工具
  • int argc, char *argv[]
  • 6.C++经典实例-计算给定范围内的素数(质数)
  • SLACC Simion-based Language Agnostic Code Clones
  • 基于STM32的超声波流量计设计
  • python编译问题 当你编译第一个python程序时可能出现如下错误