我想完全删除或阻止访问我的网站中的特定页面。
更具体地说,我已经看到了这个漏洞“ Joomla COM_MEDIA Exploit ”: http : //all1gat0r.blogspot.gr/2013/08/joomla-commedia-exploit.html
从我看到的,有页面: /index.php?option=com_media&view=images&tmpl=component&fieldid=&e_name=jform_articletext&asset=com_content&author=&folder=
这个漏洞对我不起作用,但无论如何我想彻底删除上面的页面 。 我怎样才能做到这一点?
Web服务器: Ubuntu 14.04 LTS ( 安装Mod Security2 )
网站: Joomla 3.1.5
由于查询改变参数的顺序,并仍然可以利用,我不是很熟练mod_security,我可能会使用mod_rewrite来阻止它:
在所有的configurationJoomla的东西的Apache服务器的conf文件中,添加以下内容:
RewriteCond %{QUERY_STRING} option=com_media RewriteCond %{QUERY_STRING} view=images RewriteCond %{QUERY_STRING} tmpl=component RewriteCond %{QUERY_STRING} fieldid RewriteCond %{QUERY_STRING} e_name=jform_articletext RewriteCond %{QUERY_STRING} asset=com_content RewriteCond %{QUERY_STRING} author RewriteCond %{QUERY_STRING} folder RewriteRule index.php - [F,L]
注意:你可能需要加载mod_rewrite并启动它
LoadModule rewrite_module modules/mod_rewrite.so RewriteEngine on