渗透思路:
nmap扫描----匿名登录ftp----gobuster扫描网站目录----利用RCE getshell(payload需要base64编码)----寻找敏感信息切换到用户nitish----sudo切换到sam(善用man命令)----sudo提权到root(使用uncompyle6反编译.pyc)
环境信息:
靶机:192.168.101.67
攻击机:192.168.101.34
具体步骤:
1、nmap扫描
sudo nmap -sV -sC -p- 192.168.101.68
扫描到21(ftp)、22(ssh)、1337、7331(http)端口

2、匿名登录ftp下载文件
登录ftp,用户名和密码都是anonymous
ftp 192.168.101.68

下载文件
ftp> get creds.txt
ftp> get game.txt
ftp> get message.txt
在攻击机上打开下载好的文件,内容分别如下
creds.txt
nitu:81299
game.txt
oh and I forgot to tell you I've setup a game for you on port 1337. See if you can reach to the
final level and get the prize.
message.txt
@nitish81299 I am going on holidays for few days, please take care of all the work.
And don't mess up anything.
3、gobuster扫描
用gobuster扫描7331端口网站目录
gobuster dir -u http://192.168.101.68:7331 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x .php,.html,.txt
扫描到/wish和/genie

4、利用远程命令执行getshell(base64)
浏览器访问

本文通过具体步骤介绍了如何利用nmap、gobuster等工具进行渗透测试,包括匿名登录ftp获取凭证、利用RCE获取shell、权限提升等过程。
最低0.47元/天 解锁文章
572

被折叠的 条评论
为什么被折叠?



