美文网首页
实验吧-Once More

实验吧-Once More

作者: V0W | 来源:发表于2018-08-08 14:46 被阅读0次

Once More

原题链接

http://ctf5.shiyanbar.com/web/more.php

分析

审计源码

<?php
if (isset ($_GET['password'])) {
    if (ereg ("^[a-zA-Z0-9]+$", $_GET['password']) === FALSE)
    {
        echo '<p>You password must be alphanumeric</p>';
    }
    else if (strlen($_GET['password']) < 8 && $_GET['password'] > 9999999)
    {
        if (strpos ($_GET['password'], '*-*') !== FALSE)
        {
            die('Flag: ' . $flag);
        }
        else
        {
            echo('<p>*-* have not been found</p>');
        }
    }
    else
    {
        echo '<p>Invalid password</p>';
    }
}
?>

password有几个要求

  1. 必须是数字及字母组成
  2. 长度小于8
  3. 值大于999999
  4. 要包含 *-*

包含的*-*可以放在%00后面,%00截断,>999999可以用科学计数法。
EZ:

password=9e9%00*-*

flag

CTF{Ch3ck_anD_Ch3ck}

知识点

php简单审计,科学记数法,%00截断

相关文章

网友评论

      本文标题:实验吧-Once More

      本文链接:https://www.haomeiwen.com/subject/hpfxbftx.html