Hiding WordPress version has no future
Yesterday I came across this “Replace WP-Version” WordPress plugin (english translation), which tries to mangle or simply hide WordPress version declaration in feeds and web pages.
For example, such HTML is usually found in blog header:
<meta name="generator" content="WordPress 2.6.5" />
Broadcasting version is generally believed to be a sore point in blog security — it invited crackers to determine easily which blog is exploitable, thus the existance of such plugins. It reminds me about a plugin I have written for myself before, for similar purpose. But on second thought, I didn’t publish and advertise it. Why?
Version can be decided though other means
Since recent WordPress releases (not very recent though), WordPress also emit versions in javascript links. Take my own blog for example:
<script type='text/javascript' src='http://me.abelcheung.org/wp-includes/js/prototype.js?ver=1.6'></script> <script type='text/javascript' src='http://me.abelcheung.org/wp-includes/js/scriptaculous/wp-scriptaculous.js?ver=1.8.0'></script> <script type='text/javascript' src='http://me.abelcheung.org/wp-includes/js/scriptaculous/effects.js?ver=1.8.0'></script> <script type='text/javascript' src='http://me.abelcheung.org/wp-includes/js/jquery/jquery.js?ver=1.2.6'></script>
With javascript versioning, WordPress version can be approximately determined. Even worse, these declarations can’t be disabled. That means just hiding WordPress version is not effective anymore, regardless of other reasons.
Exploits are generic enough to ignore any versioning
While WordPress fanboys are retarded enough to declare any security measure as “obscurity”, this one is probably right. Version hiding is very likely defenceless against most exploits, which simply tries every possible attack method. This renders version hiding pointless.
It affects functionality of other plugins
Some other plugins do check WordPress version in order to behave differently. Take a look at the comment of bs-wp-noversion plugin (which is yet another version hiding plugin). WordPress rendered broken is a possibility if version is changed or hidden.
我不會hide version,只是把WP 以一個獨立 user 運行就好了,反正上得blog都是秘密,hack 就 hack 吧。Restore也只是五分鍾的事 ^_^
你很看得開嘛!不過最怕的是種 javascript 或種 link 在網站內,不易發覺之餘,又會被當作跳板,甚至無故被搜尋器誤認為問題網站,會很不是味兒。