Last active
December 15, 2015 17:54
-
-
Save jakewarren/6dc04feefda90409c55a to your computer and use it in GitHub Desktop.
Joomla 12/14/15 RCE 0day Mitigation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Joomla 12/14/15 RCE 0day Mitigation | |
# Note: Use at your own risk. The best mitigation is to patch Joomla to v3.4.6 | |
# Apache mitigation | |
# Apply within .htaccess file | |
RewriteCond %{HTTP_USER_AGENT} O:[0-9]+: | |
RewriteRule .* - [F,L] | |
RewriteCond %{HTTP:X-FORWARDED-FOR} O:[0-9]+: | |
RewriteRule .* - [F,L] | |
# Nginx mitigation | |
# Apply within server block | |
if ( $http_user_agent ~* (\{|\}) ) { | |
return 403; | |
} | |
if ( $http_x_forwarded_for ~* (\{|\}) ) { | |
return 403; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment