wordpress security - battening down the hatches
TRANSCRIPT
WORDPRESS SECURITY – BATTENING DOWN THE
HATCHES@brechtryckaert
@BRECHTRYCKAERT - WordPress Specialist bij Combell.com
- Auteur van WordPress Security 101 ebook (Kindle, Kobo, iBooks, Gumroad)
WIE WERD AL EENS SLACHTOFFER VAN HACKING?
SOORTEN HACKS Backdoors & Shells Pharma hack Drive By Downloads Malafide redirects
HOE GERAKEN HACKERS BINNEN?
Oorzaken van hacking
Lekken in thema's en plug-ins
Verouderde versies Wordpress
Server config & andere oorzaken
HOE KUNNEN WE DE BEVEILIGING VERSCHERPEN?
Waar aanpakken?
SERVER WORDPRESS
SECURITY BINNEN WORDPRESS De basics:Security plugin (iThemes, Wordfence, Sucuri, ...)Sterke wachtwoorden“admin” gebruiker uit den boze
SECURITY BINNEN WORDPRESS Maar ook:2-factor authentication (bvb Clef)Inactieve plugins en thema’s verwijderenUPDATES! UPDATES! UPDATES!Geen core-file tweaken!
SECURITY OP SERVER-NIVEAU
Verschillende tweaks aan de wp-config.phpAanpassingen aan .htaccessMappen 755-rechten, files 644.Robots.txt
SECURITY OP SERVER-NIVEAU: WP-CONFIG.PHPdefine( 'DISALLOW_FILE_EDIT', true );=> uitschakelen thema & plugin editor
define('WP_AUTO_UPDATE_CORE', true); add_filter( 'auto_update_plugin', '__return_true' ); add_filter( 'auto_update_theme', '__return_true' );=> forceert automatische updates van WordPress (alle releases) alsook plugins en thema’s.
SECURITY OP SERVER-NIVEAU: .HTACCESS
Blokkeer de includes
# Block the include-only files.<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteRule ^wp-admin/includes/ - [F,L]RewriteRule !^wp-includes/ - [S=3]RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]RewriteRule ^wp-includes/theme-compat/ - [F,L]</IfModule>
SECURITY OP SERVER-NIVEAU: .HTACCESS
Beperk backend access
Afzonderlijke .htaccess voor in /wp-admin
# Limit backend acces.order deny,allowdeny from allallow from xx.xx.xx.xx
SECURITY OP SERVER-NIVEAU: .HTACCESS
Blokkeer Track & Trace en vermijd XSS attack
#Block track & traceRewriteEngine OnRewriteCond %{REQUEST_METHOD} ^TRACERewriteRule .* - [F]
SECURITY OP SERVER-NIVEAU: .HTACCESS
Afzonderlijke .htaccess in /wp-content/uploads/
#Block PHP execution<Files *.php>deny from all</Files>
SECURITY OP SERVER-NIVEAU: FILE PERMISSIONS
Mappen 755 Bestanden 644
Geen 777!!!
SECURITY OP SERVER-NIVEAU: ROBOTS.TXT Vermijd dat bots kritieke locaties kunnen crawlen Voeg volgende toe als robots.txt: User-agent: *
Disallow: /feed/Disallow: /trackback/Disallow: /wp-admin/Disallow: /wp-content/Disallow: /wp-includes/Disallow: /xmlrpc.phpDisallow: /wp-
SECURITY: USER & EXTERN Security op de pc’s/mac’s van eindgebruiker Illegale/”gevonden” software UPDATES UPDATES UPDATES!!! Komt meestal neer op het heropvoeden van de gebruiker
SECURITY: USER & EXTERN
CDN, bijvoorbeeld CloudFlare
PENETRATION TESTING!
WPScan (http://www.wpscan.org)Sucuri Sitecheck (https://sitecheck.sucuri.net/)
VRAGEN???
Contacteer me! Twitter: @brechtryckaert
Blog: http://brechtryckaert.be
50% korting op mijn e-book: https://gum.co/WPS101/WCNL2015