vulnhub djinn: 1

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

渗透思路:

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)

浏览器访问

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值