Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hoest Kuch, Prut !
- ~Bas
- # mod_rewrite Apache (uwoowoo!)
- # php2shell-mitigation, well... just for the ./kids
- # signatures are stupid easy to bypass.
- # terug naar bed << okthxbye
- SecRule REQUEST_HEADERS:Content-Type "@contains multipart" \
- "id:2026109618, \
- phase:1, \
- t:none,t:lowercase, \
- deny, \
- status:403, \
- msg:'Potential php2shell exploitation attempt - Multipart blocked'"
- # mod_rewite
- <IfModule mod_rewrite.c>
- RewriteEngine On
- RewriteCond %{HTTP:Content-Type} multipart [NC]
- RewriteRule .* - [F,L]
- </IfModule>
- <If "%{HTTP:Content-Type} =~ /multipart/i">
- Require all denied
- </If>
- # Nginx
- if ($http_content_type ~* "multipart") {
- return 403;
- }
- # Suricata / Snort
- alert tcp any any -> any $HTTP_PORTS (msg:"POTENTIAL PHP2SHELL MULTIPART EXPLOIT-ATTEMPT"; flow:to_server,established; content:"Content-Type|3a|"; http_header; content:"multipart"; http_header; distance:0; classtype:attempted-admin; sid:2026109618; rev:1;)
- # Caddy
- @multipart {
- header Content-Type *multipart*
- }
- respond @multipart 403
- # Lighttpd
- $HTTP["header"] =~ "Content-Type:.*multipart" {
- url.access-deny = ("")
- }
- # PHP
- session.upload_progress.enabled = Off
Advertisement