Skip to content

Instantly share code, notes, and snippets.

@jakewarren
Last active December 15, 2015 17:54
Show Gist options
  • Save jakewarren/6dc04feefda90409c55a to your computer and use it in GitHub Desktop.
Save jakewarren/6dc04feefda90409c55a to your computer and use it in GitHub Desktop.
Joomla 12/14/15 RCE 0day Mitigation
# 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