美文网首页
网鼎杯第二场wp(web)

网鼎杯第二场wp(web)

作者: wuli_decade | 来源:发表于2018-08-23 23:08 被阅读45次

    web~~~~~sqlweb

    先用御剑扫一波,得到sql.php,访问


    image.png

    然后用这个账号密码登陆得到


    image.png

    试用admin/admin123登陆,得到


    image.png

    猜测此题为得到wuyanzu账号的密码登陆获得flag。

    uname=wuyanzu'/**/%26%26/**/mid(passwd/**/from/**/{1}/**/for/**/1)/**/in/**/('{1}')/**/limit/**/1%23&passwd=asdf&submit=login
    
    image.png

    最终爆破出来的密码即为flag
    flag{22acfb93-4b2f-4171-95d2-987e04216506}

    web~~~~~~~calc

    页面为一个计算器,猜测试ssti

    image.png
    参考:禁用import的情况下绕过python沙箱 image.png

    web~~~~~~~~wafload

    <?php
    $sandbox = '/var/www/html/upload/' . md5("phpIsBest" . $_SERVER['REMOTE_ADDR']);
    @mkdir($sandbox);
    @chdir($sandbox);
    
    if (!empty($_FILES['file'])) {
        #mime check
        if (!in_array($_FILES['file']['type'], ['image/jpeg', 'image/png', 'image/gif'])) {
            die('This type is not allowed!');
        }
    
        #check filename
        $file = empty($_POST['filename']) ? $_FILES['file']['name'] : $_POST['filename'];
        if (!is_array($file)) {
            $file = explode('.', strtolower($file));
        }
        $ext = end($file);
        if (!in_array($ext, ['jpg', 'png', 'gif'])) {
            die('This file is not allowed!');
        }
    
        $filename = reset($file) . '.' . $file[count($file) - 1];
        if (move_uploaded_file($_FILES['file']['tmp_name'], $sandbox . '/' . $filename)) {
            echo 'Success!';
            echo 'filepath:' . $sandbox . '/' . $filename;
        } else {
            echo 'Failed!';
        }
    }
    show_source(__file__);
    ?>
    

    这里只能通过数组绕过,先查一下end函数

    image.png

    发现一个惊奇的东西,刚好可以绕过后缀名的检查


    image.png
    image.png

    然后用菜刀连


    image.png

    相关文章

      网友评论

          本文标题:网鼎杯第二场wp(web)

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