记一次vulnhub|渗透测试Five86-1

vulnhub Five86-1


  • 0X01 Main Point
    1.sploitdb的使用
    2.crunch字典生成和john爆破的混搭
    3.利用kali进行SSH和靶机连接
    4.sudo -l查看用户被授予其它权限的文件
  • 0X02 前期嗅探和端口探测
    arp-scan -l得到靶机IP:
    在这里插入图片描述
    nmap -sS -A -p- 172.20.10.3扫描靶机IP的端口开放情况:
    10000端口值得引起注意,登录需要密码。
    在这里插入图片描述
    先访问80端口,发现没有任何东西,国际惯例扫目录即可。
    在这里插入图片描述
    查看robots.txt发现/ona/目录,只是普通用户,是opennetadmin

OpenNetAdmin是一个IP网络地址和主机管理系统,拥有轻爽的Ajax接口,我们查看其版本:v18.1.1
在这里插入图片描述
sploitdb查看有无其历史版本的漏洞可以利用:
在这里插入图片描述
正好有Metasploit接口的脚本可以利用,但是kali本地上搜索不到此脚本,下载后把它放在/usr/share/metasplot-framework/modules/exploits/,这是metasploit存储脚本的地方。reload_all 重新加载msf即可,搜索脚本名称利用该脚本。
在这里插入图片描述
将各种需要的配置设置好之后exploit,成功得到www-data用户的shell:
在这里插入图片描述
ls -la查看隐藏文件,发现一个可疑文件,打开后得到hint:
在这里插入图片描述
密码长度是10,且包含aefhrt,使用crunch生成口令字典,再利用john进行爆破。

  • Crunch是一种创建密码字典工具,按照指定的规则生成密码字典,可以灵活的制定自己的字典文件。使用Crunch工具生成的密码可以输出到屏幕,保存到文件、或另一个程序。由其在渗透测试需要爆破的时候,字典的编排等直接影响到我们的爆破速度,对整个渗透测试流程起着十分重要的作用。

使用语法和参数

 crunch <min> <max> [options]

详细使用:

     max    设定最大字符串长度(必选)
     
     oprions
     -b     指定文件输出的大小,避免字典文件过大  
     -c     指定文件输出的行数,即包含密码的个数
     -d     限制相同元素出现的次数
     -e     定义停止字符,即到该字符串就停止生成
     -f     调用库文件(/etc/share/crunch/charset.lst)
     -i     改变输出格式,即aaa,aab -> aaa,baa
     -I     通常与-t联合使用,表明该字符为实义字符
     -m     通常与-p搭配
     -o     将密码保存到指定文件
     -p     指定元素以组合的方式进行
     -q     读取密码文件,即读取pass.txt
     -r     定义重某一字符串重新开始
     -s     指定一个开始的字符,即从自己定义的密码xxxx开始
     -t     指定密码输出的格式
     -u     禁止打印百分比(必须为最后一个选项)
     -z     压缩生成的字典文件,支持gzip,bzip2,lzma,7z 

crunch生成字典:
在这里插入图片描述
利用之前得到的douglas用户的加密密码,john进行爆破:
在这里插入图片描述
得到douglas用户的密码,结合之前查看/etc/passwd的结果,可以尝试SSH连接,10000端口使用该口令无法登陆,/reports网址同样需要密码,依然无法登陆,先SSH douglas用户:
在这里插入图片描述
ls -la没有收获,sudo -l发现douglas用户可以以jen用户使用/bin/cp命令
思路
echo将kali的SSH公钥写入/tmp路径下,接着sudo -u jen使用/bin/cp命令来将kali的SSH公钥复制到jen用户/home/.ssh/authorized_keys下,从而kali进行SSH登录jen用户。
在这里插入图片描述
在这里插入图片描述

ssh douglas@172.20.10.3 -p 22(这里使用的是空密码)

在这里插入图片描述
提示你有新的邮件,打开查看:
在这里插入图片描述
在这里插入图片描述
直接su切换moss用户:
ls -la查看有隐藏文件夹.games进入后可以打开.upyourgame
在这里插入图片描述
进入后发现直接得到root权限,得到最终flag:
在这里插入图片描述


写到此处不知道10000端口的作用以及/reports目录的用途是什么,或许这道题有其他途径提权或者得到flag。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Write a Model class with the following UML specification: +----------------------------------------------+ | Model | +----------------------------------------------+ | - score: int | | - bubbles: ArrayList<IShape> | +----------------------------------------------+ | + Model() | | + getScore(): int | | + addBubble(int w, int h): void | | + moveAll(int dx, int dy): void | | + clearInvisibles(int w, int h): void | | + deleteBubblesAtPoint(int x, int y): void | | + drawAll(Graphics g): void | | + testModel(): void | +----------------------------------------------+ When a new model object is created, the score must be zero and the arraylist must be empty. The getScore method returns as result the current score for the game. The addBubble method adds a new bubble to the arraylist of bubbles. The position of the center of the new bubble is random but must be inside a window of width w and height h (the arguments of the addBubble method), like this: new Bubble((int)(w * Math.random()), (int)(h * Math.random())) The moveAll method moves the positions of all the bubbles in the arraylist of bubbles by the amount dx in the x direction and by the amount dy in the y direction. The clearInvisibles method takes as argument the width w and the height h of the window, and deletes from the arraylist of bubbles any bubble which is not visible in the window anymore. For each bubble which is deleted, the score decreases by 1.The deleteBubblesAtPoint method takes as argument the coordinates (x, y) of a point, and deletes from the arraylist of bubbles any bubble which contains this point (multiple bubbles might contain the point, because bubbles can overlap in the window). For each bubble which is deleted, the score increases by 1. The drawAll method draws all the bubbles in the arraylist of bub
05-11

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值