Improve security
-
WordPress installation now automatically create .htaccess file. WordPress should add
Options -Indexes
into the .htaccess, so non-real file/folder without permission will get 404 error without the need of placing empty index.html/index.php. This should also eliminate some security notices when user ran security checks on wordpress sites.After I ran a test against my installation on WordPress 4.3.1 multisites, Detectify gave me following warnings.
- Cookie is not set to be HttpOnly – /wp-login.php One or more cookies lack the flag HttpOnly-flag. If an attacker discovers an XSS he may use it to steal cookies which haven’t got the HttpOnly-flag.
- WordPress Username Enumeration – /?author={id} A flaw in WordPress makes it possible to enumerate which usernames are registered. An attacker can use this information in another step of an attack, for example trying common passwords against the users, spear fishing or social engineering.
- Content Sniffing This may open up for XSS attacks as browsers will attempt to guess how to render specific resources without the correct policies.
- Empty Document – /wp-includes/Text/Diff.php Direct access
- Empty Document – /wp-includes/admin-bar.php Direct access
- Empty Document – /wp-includes/category-template.php Direct access
Therefore, I recommend:
- Add
Options -Indexes
andHeader set X-Content-Type-Options "nosniff"
in .htaccess - Remove all index.php/index.html from wordpress directories
- Add
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
into php file header Ref. https://codex.www.ads-software.com/Writing_a_Plugin#Plugin_Files
Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Improve security’ is closed to new replies.