SlideShare a Scribd company logo
1 of 49
Download to read offline
WordPress Security Brecht Ryckaert
Brecht Ryckaert
- Support engineer @ Combell.com

- WordPress sinds 1.5

- Blogger (tot 2010 techblogger)

- Auteur

- WordCamp Netherlands 2014
WordPress Security 101
• Amazon Kindle

• + 1800 exemplaren

• Blijft een “work in progress”

• Eerstkomende update ergens
in de komende 4 weken
Wie zijn site werd al
eens gehacked of had
een site van een client
die gehacked is
geweest?
“Is WordPress nog veilig?”
Tuurlijk!
“Een keten is zo sterk als zijn zwakste schakel."
WordPress hacking - de dreigingen
Onderzoek van WPMUdev heeft uitgewezen dat hacking
gebeurt door volgende oorzaken:
• 50%: thema’s of plugins
• 25%: WordPress core (verouderde versies)
• 25%: server configuratie + andere factoren
Wie van jullie
installeert security
plugins in zijn/haar
WordPress websites?
En bij wie van die mensen
is dat de enige
beveiligingsmaatregel?
Wie gebruikt FTP om
bestanden op zijn
website te plaatsen en
eventuele code te
bewerken?
FTP
Uit persoonlijke ervaring heb ik geleerd dat FTP eveneens een
bijzonder zwakke schakel is. Heel wat hacks gebeuren middels
gestolen FTP-gegevens die men heeft bemachtigd via:
• Keyloggers
• Virussen (meestal trojans)
• Andere malware of spyware
• Lekken in oudere versies van software (Acrobat Reader 8, Flash
Player)
FTP
Hoe vermijden we hacking via FTP:
• Geen FTP gebruiken! Gebruik SFTP waar mogelijk.
• OS up to date houden
• Software up to date houden
• Gebruik anti-virus + anti-malware + firewall software
Welke soorten aanvallen?
*Meest voorkomende soorten
Type 1 Backdoors
Type 2 Drive By Downloads
Type 3 Pharma Hack
Type 4 Malafide Redirects
Hoe gaan we dergelijke 

hacks vermijden?
Security in WordPress Plugins, Themes & Best Practices
Security door middel van plugins
iThemes Security
Wordfence Security
Sucuri Security
Sucuri Security Website Firewall
Bulletproof Security
Limit Login Attempts
All in one WP Security & Firewall
…
Security mét plugins
• Beperk het aantal plugins waar mogelijk
• Verwijder gedeactiveerde plugins altijd
• Hou je plugins altijd up to date
• Probeer je te beperken tot plugins uit de officiële
WordPress plugin repository (http://www.wordpress.org/
plugins)
• Check altijd hoe lang geleden de laatste update
uitgegeven werd.
WordPress gebruikers
• Gebruik geen admin user, verwijder deze na installatie!
• Kies een goed wachtwoord: 

- Hoofdletters & kleine letters

- Cijfers

- Speciale tekens (@, !, ?, …)

- Gebruik geen bestaande woorden
WordPress Themes
• Altijd up to date houden
• Gratis theme? Altijd via http://www.wordpress.org/
themes.
• Premium themes? Hou dit altijd goed up to date
• Nooit themes aanpassen in de theme files zelf. Werk
ALTIJD met een child theme voor aanpassingen.
Eigen thema gemaakt?
• test met https://wordpress.org/plugins/theme-check/
WordPress opties
• Pingbacks uitschakelen
• User Registration uitschakelen indien niet noodzakelijk
De bestandsstructuur Tweaks binnen je hosting
Toegang tot gevoelige files blokkeren via htaccess
Options All -Indexes

<files .htaccess>

Order allow,deny

Deny from all

</files>

<files readme.html>

Order allow,deny

Deny from all

</files>

<files license.txt>

Order allow,deny

Deny from all

</files>

<files install.php>

Order allow,deny

Deny from all

</files>

<files wp-config.php>

Order allow,deny

Deny from all

</files>
Plaats dit in de hoofdmap 

van je WordPress-installatie
Injections blokkeren via htaccess
<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC]

RewriteRule ^(.*)$ - [F,L]

RewriteCond %{QUERY_STRING} ../ [NC,OR]

RewriteCond %{QUERY_STRING} boot.ini [NC,OR]

RewriteCond %{QUERY_STRING} tag= [NC,OR]

RewriteCond %{QUERY_STRING} ftp: [NC,OR]

RewriteCond %{QUERY_STRING} http: [NC,OR]

RewriteCond %{QUERY_STRING} https: [NC,OR]

RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]

RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|%3D) [NC,OR]

RewriteCond %{QUERY_STRING} base64_encode.*(.*) [NC,OR]

RewriteCond %{QUERY_STRING} ^.*([|]|(|)|<|>|ê|"|;|?|*|=$).* [NC,OR]

RewriteCond %{QUERY_STRING} ^.*(&#x22;|&#x27;|&#x3C;|&#x3E;|&#x5C;|&#x7B;|&#x7C;).* [NC,OR]

RewriteCond %{QUERY_STRING} ^.*(%24&x).* [NC,OR]

RewriteCond %{QUERY_STRING} ^.*(%0|%A|%B|%C|%D|%E|%F|127.0).* [NC,OR]

RewriteCond %{QUERY_STRING} ^.*(globals|encode|localhost|loopback).* [NC,OR]

RewriteCond %{QUERY_STRING} ^.*(request|select|insert|union|declare).* [NC]

RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in_.*$

RewriteRule ^(.*)$ - [F,L]

</IfModule>
Robots.txt
User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins
Disallow: /wp-content/cache
Disallow: /wp-content/themes
Allow: /wp-content/uploads
wp-content/uploads beveiligen met .htaccess
<Files *.php>

deny from all

</Files>
Server configuratie Tweaks in php.ini, …
PHP versie
• Huidige PHP-versie 5.6
• Heel wat security tweaks vanaf 5.4
• Heel wat hosters draaien nog 5.3
• Vraag actief naar upgrades bij je hoster! Een goede
hoster standaardiseert op 5.5.
PHP.ini
• safe_mode (weg sinds 5.4, deprecated in 5.3)
• allow_url_fopen
• register_globals (weg sinds 5.4, deprecated in 5.3)
Fail2ban
• Server package tegen brute forcing
• Integreerbaar met wp-fail2ban (https://wordpress.org/
plugins/wp-fail2ban/)
Wat als je zelf onvoldoende
technisch onderlegd bent om dit
zelf te implementeren?
Managed (WordPress)
Hosting
- Nemen de serverconfiguratie voor
hun rekening

- Doen de WordPress & plugin
updates voor je

- Ondersteunen jou bij hacking
savvii.nl
• Sponsor van dit event

(waarvoor dank!)

• Gespecialiseerd in managed
WordPress hosting
Hoe kan je je website 

proactief doorlichten?
WPScan
• scanner voor WordPress

• scant naar vulnerabilities

• kan gebruikt worden om DDOS
te simuleren

• via CLI

• Self hosted

• Gratis te gebruiken
Sucuri’s sitecheck
• http://sitecheck.sucuri.net/

• Gratis te gebruiken
Site toch gehacked Wat nu?
Zelf te nemen acties
• Wijzig alle wachtwoorden: MySQL database, FTP,
WordPress, …
• Update je gehele installatie van WordPress, de thema’s,
plugins
• Controleer de inhoud van je database op eventuele
malafide entries of verdachte users
Zijn er nog vragen?
Bedankt!
https://joind.in/13678

More Related Content

Similar to WordPress Security

De gevaren van WordPress plugins
De gevaren van WordPress pluginsDe gevaren van WordPress plugins
De gevaren van WordPress pluginsTrendwerk
 
Optimaliseer uw datacenter met Microsoft Azure
Optimaliseer uw datacenter met Microsoft AzureOptimaliseer uw datacenter met Microsoft Azure
Optimaliseer uw datacenter met Microsoft AzureDelta-N
 
Best Practice: Joomla! templating
Best Practice: Joomla! templatingBest Practice: Joomla! templating
Best Practice: Joomla! templatingHans Kuijpers
 
Website-tool: CMS of Framework
Website-tool: CMS of FrameworkWebsite-tool: CMS of Framework
Website-tool: CMS of FrameworkNils Breunese
 
WordPress plugin development
WordPress plugin developmentWordPress plugin development
WordPress plugin developmentLuc De Brouwer
 
Web Application Security; Hacking your way in!
Web Application Security; Hacking your way in!Web Application Security; Hacking your way in!
Web Application Security; Hacking your way in!Peter Schuler
 
Zelf je Joomla! template bouwen voor beginners
Zelf je Joomla! template bouwen voor beginnersZelf je Joomla! template bouwen voor beginners
Zelf je Joomla! template bouwen voor beginnersRachel Walraven
 
Experts Live 2015 Hybrid Identity in vier makkelijke stappen 16x9 EMS Track v1.0
Experts Live 2015 Hybrid Identity in vier makkelijke stappen 16x9 EMS Track v1.0Experts Live 2015 Hybrid Identity in vier makkelijke stappen 16x9 EMS Track v1.0
Experts Live 2015 Hybrid Identity in vier makkelijke stappen 16x9 EMS Track v1.0Ronny de Jong
 
Html5 jeugdwerknet
Html5 jeugdwerknetHtml5 jeugdwerknet
Html5 jeugdwerknetHans Rossel
 
WordPress Security - Battening down the hatches
WordPress Security - Battening down the hatchesWordPress Security - Battening down the hatches
WordPress Security - Battening down the hatchesBrecht Ryckaert
 
The power of powershell in Office 365 - TechDays 2015
The power of powershell in Office 365 - TechDays 2015The power of powershell in Office 365 - TechDays 2015
The power of powershell in Office 365 - TechDays 2015Delta-N
 
Ontwikkeling Wordpress Plugins
Ontwikkeling Wordpress PluginsOntwikkeling Wordpress Plugins
Ontwikkeling Wordpress PluginsCoen Jacobs
 
Online usability - les 3 introductie WordPress - thema's, widgets en plugins
Online usability - les 3 introductie WordPress - thema's, widgets en pluginsOnline usability - les 3 introductie WordPress - thema's, widgets en plugins
Online usability - les 3 introductie WordPress - thema's, widgets en pluginsPeter Luit
 
PFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele testsPFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele testsRichard Tuin
 
Hyperlocal Academy - deel 2: techniek
Hyperlocal Academy - deel 2: techniekHyperlocal Academy - deel 2: techniek
Hyperlocal Academy - deel 2: techniekPeter Luit
 
Website Usability deel 3: vervolg WordPress
Website Usability deel 3: vervolg WordPressWebsite Usability deel 3: vervolg WordPress
Website Usability deel 3: vervolg WordPressPeter Luit
 
Robot framework en Browser Library
Robot framework en Browser LibraryRobot framework en Browser Library
Robot framework en Browser Librarychristiantester
 
Talk 02 html5-css3
Talk 02 html5-css3Talk 02 html5-css3
Talk 02 html5-css3Monkeyshot
 

Similar to WordPress Security (20)

De gevaren van WordPress plugins
De gevaren van WordPress pluginsDe gevaren van WordPress plugins
De gevaren van WordPress plugins
 
Optimaliseer uw datacenter met Microsoft Azure
Optimaliseer uw datacenter met Microsoft AzureOptimaliseer uw datacenter met Microsoft Azure
Optimaliseer uw datacenter met Microsoft Azure
 
Best Practice: Joomla! templating
Best Practice: Joomla! templatingBest Practice: Joomla! templating
Best Practice: Joomla! templating
 
Website-tool: CMS of Framework
Website-tool: CMS of FrameworkWebsite-tool: CMS of Framework
Website-tool: CMS of Framework
 
Een goede DEV omgeving opzetten
Een goede DEV omgeving opzettenEen goede DEV omgeving opzetten
Een goede DEV omgeving opzetten
 
WordPress plugin development
WordPress plugin developmentWordPress plugin development
WordPress plugin development
 
Web Application Security; Hacking your way in!
Web Application Security; Hacking your way in!Web Application Security; Hacking your way in!
Web Application Security; Hacking your way in!
 
Zelf je Joomla! template bouwen voor beginners
Zelf je Joomla! template bouwen voor beginnersZelf je Joomla! template bouwen voor beginners
Zelf je Joomla! template bouwen voor beginners
 
Experts Live 2015 Hybrid Identity in vier makkelijke stappen 16x9 EMS Track v1.0
Experts Live 2015 Hybrid Identity in vier makkelijke stappen 16x9 EMS Track v1.0Experts Live 2015 Hybrid Identity in vier makkelijke stappen 16x9 EMS Track v1.0
Experts Live 2015 Hybrid Identity in vier makkelijke stappen 16x9 EMS Track v1.0
 
Html5 jeugdwerknet
Html5 jeugdwerknetHtml5 jeugdwerknet
Html5 jeugdwerknet
 
WordPress Security - Battening down the hatches
WordPress Security - Battening down the hatchesWordPress Security - Battening down the hatches
WordPress Security - Battening down the hatches
 
The power of powershell in Office 365 - TechDays 2015
The power of powershell in Office 365 - TechDays 2015The power of powershell in Office 365 - TechDays 2015
The power of powershell in Office 365 - TechDays 2015
 
Ontwikkeling Wordpress Plugins
Ontwikkeling Wordpress PluginsOntwikkeling Wordpress Plugins
Ontwikkeling Wordpress Plugins
 
Online usability - les 3 introductie WordPress - thema's, widgets en plugins
Online usability - les 3 introductie WordPress - thema's, widgets en pluginsOnline usability - les 3 introductie WordPress - thema's, widgets en plugins
Online usability - les 3 introductie WordPress - thema's, widgets en plugins
 
PFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele testsPFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele tests
 
Hyperlocal Academy - deel 2: techniek
Hyperlocal Academy - deel 2: techniekHyperlocal Academy - deel 2: techniek
Hyperlocal Academy - deel 2: techniek
 
WordPress 3.5
WordPress 3.5WordPress 3.5
WordPress 3.5
 
Website Usability deel 3: vervolg WordPress
Website Usability deel 3: vervolg WordPressWebsite Usability deel 3: vervolg WordPress
Website Usability deel 3: vervolg WordPress
 
Robot framework en Browser Library
Robot framework en Browser LibraryRobot framework en Browser Library
Robot framework en Browser Library
 
Talk 02 html5-css3
Talk 02 html5-css3Talk 02 html5-css3
Talk 02 html5-css3
 

More from Brecht Ryckaert

Using WordPress as a Static Site Generator
Using WordPress as a Static Site GeneratorUsing WordPress as a Static Site Generator
Using WordPress as a Static Site GeneratorBrecht Ryckaert
 
The Anatomy Of A Hack - WordCamp Sofia 2018
The Anatomy Of A Hack - WordCamp Sofia 2018The Anatomy Of A Hack - WordCamp Sofia 2018
The Anatomy Of A Hack - WordCamp Sofia 2018Brecht Ryckaert
 
Scaling WordPress On A Small Budget
Scaling WordPress On A Small BudgetScaling WordPress On A Small Budget
Scaling WordPress On A Small BudgetBrecht Ryckaert
 
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best PracticesWordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best PracticesBrecht Ryckaert
 
WordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht Ryckaert
WordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht RyckaertWordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht Ryckaert
WordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht RyckaertBrecht Ryckaert
 
WordPress Security - A Top Down Approach
WordPress Security - A Top Down ApproachWordPress Security - A Top Down Approach
WordPress Security - A Top Down ApproachBrecht Ryckaert
 
WordPress Performantie Optimalisatie
WordPress Performantie OptimalisatieWordPress Performantie Optimalisatie
WordPress Performantie OptimalisatieBrecht Ryckaert
 
WordPress Performance optimization
WordPress Performance optimizationWordPress Performance optimization
WordPress Performance optimizationBrecht Ryckaert
 
De valkuilen bij het migreren of publiceren van je WordPress website
De valkuilen bij het migreren of publiceren van je WordPress websiteDe valkuilen bij het migreren of publiceren van je WordPress website
De valkuilen bij het migreren of publiceren van je WordPress websiteBrecht Ryckaert
 
Combell Academy - Exchange 2010
Combell Academy - Exchange 2010Combell Academy - Exchange 2010
Combell Academy - Exchange 2010Brecht Ryckaert
 

More from Brecht Ryckaert (12)

Using WordPress as a Static Site Generator
Using WordPress as a Static Site GeneratorUsing WordPress as a Static Site Generator
Using WordPress as a Static Site Generator
 
The Anatomy Of A Hack - WordCamp Sofia 2018
The Anatomy Of A Hack - WordCamp Sofia 2018The Anatomy Of A Hack - WordCamp Sofia 2018
The Anatomy Of A Hack - WordCamp Sofia 2018
 
Scaling WordPress On A Small Budget
Scaling WordPress On A Small BudgetScaling WordPress On A Small Budget
Scaling WordPress On A Small Budget
 
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best PracticesWordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
WordPress Meetup Ieper - 15/03/2018 - WordPress Security Best Practices
 
WordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht Ryckaert
WordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht RyckaertWordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht Ryckaert
WordCamp Antwerp - 3/3/2018 - Debugging WordPress by Brecht Ryckaert
 
Debugging WordPress
Debugging WordPressDebugging WordPress
Debugging WordPress
 
WordPress Security - A Top Down Approach
WordPress Security - A Top Down ApproachWordPress Security - A Top Down Approach
WordPress Security - A Top Down Approach
 
WordPress Performantie Optimalisatie
WordPress Performantie OptimalisatieWordPress Performantie Optimalisatie
WordPress Performantie Optimalisatie
 
WordPress Performance optimization
WordPress Performance optimizationWordPress Performance optimization
WordPress Performance optimization
 
De valkuilen bij het migreren of publiceren van je WordPress website
De valkuilen bij het migreren of publiceren van je WordPress websiteDe valkuilen bij het migreren of publiceren van je WordPress website
De valkuilen bij het migreren of publiceren van je WordPress website
 
Combell Academy - Exchange 2010
Combell Academy - Exchange 2010Combell Academy - Exchange 2010
Combell Academy - Exchange 2010
 
Presentatie Ebook
Presentatie EbookPresentatie Ebook
Presentatie Ebook
 

WordPress Security

  • 2. Brecht Ryckaert - Support engineer @ Combell.com - WordPress sinds 1.5 - Blogger (tot 2010 techblogger) - Auteur - WordCamp Netherlands 2014
  • 3. WordPress Security 101 • Amazon Kindle • + 1800 exemplaren • Blijft een “work in progress” • Eerstkomende update ergens in de komende 4 weken
  • 4. Wie zijn site werd al eens gehacked of had een site van een client die gehacked is geweest?
  • 5.
  • 6. “Is WordPress nog veilig?”
  • 8. “Een keten is zo sterk als zijn zwakste schakel."
  • 9. WordPress hacking - de dreigingen Onderzoek van WPMUdev heeft uitgewezen dat hacking gebeurt door volgende oorzaken: • 50%: thema’s of plugins • 25%: WordPress core (verouderde versies) • 25%: server configuratie + andere factoren
  • 10. Wie van jullie installeert security plugins in zijn/haar WordPress websites?
  • 11. En bij wie van die mensen is dat de enige beveiligingsmaatregel?
  • 12. Wie gebruikt FTP om bestanden op zijn website te plaatsen en eventuele code te bewerken?
  • 13. FTP Uit persoonlijke ervaring heb ik geleerd dat FTP eveneens een bijzonder zwakke schakel is. Heel wat hacks gebeuren middels gestolen FTP-gegevens die men heeft bemachtigd via: • Keyloggers • Virussen (meestal trojans) • Andere malware of spyware • Lekken in oudere versies van software (Acrobat Reader 8, Flash Player)
  • 14. FTP Hoe vermijden we hacking via FTP: • Geen FTP gebruiken! Gebruik SFTP waar mogelijk. • OS up to date houden • Software up to date houden • Gebruik anti-virus + anti-malware + firewall software
  • 15. Welke soorten aanvallen? *Meest voorkomende soorten
  • 17.
  • 18. Type 2 Drive By Downloads
  • 20. Type 4 Malafide Redirects
  • 21. Hoe gaan we dergelijke 
 hacks vermijden?
  • 22. Security in WordPress Plugins, Themes & Best Practices
  • 23. Security door middel van plugins iThemes Security Wordfence Security Sucuri Security Sucuri Security Website Firewall Bulletproof Security Limit Login Attempts All in one WP Security & Firewall …
  • 24. Security mét plugins • Beperk het aantal plugins waar mogelijk • Verwijder gedeactiveerde plugins altijd • Hou je plugins altijd up to date • Probeer je te beperken tot plugins uit de officiële WordPress plugin repository (http://www.wordpress.org/ plugins) • Check altijd hoe lang geleden de laatste update uitgegeven werd.
  • 25. WordPress gebruikers • Gebruik geen admin user, verwijder deze na installatie! • Kies een goed wachtwoord: 
 - Hoofdletters & kleine letters
 - Cijfers
 - Speciale tekens (@, !, ?, …)
 - Gebruik geen bestaande woorden
  • 26. WordPress Themes • Altijd up to date houden • Gratis theme? Altijd via http://www.wordpress.org/ themes. • Premium themes? Hou dit altijd goed up to date • Nooit themes aanpassen in de theme files zelf. Werk ALTIJD met een child theme voor aanpassingen.
  • 27. Eigen thema gemaakt? • test met https://wordpress.org/plugins/theme-check/
  • 28. WordPress opties • Pingbacks uitschakelen • User Registration uitschakelen indien niet noodzakelijk
  • 29. De bestandsstructuur Tweaks binnen je hosting
  • 30. Toegang tot gevoelige files blokkeren via htaccess Options All -Indexes
 <files .htaccess>
 Order allow,deny
 Deny from all
 </files>
 <files readme.html>
 Order allow,deny
 Deny from all
 </files>
 <files license.txt>
 Order allow,deny
 Deny from all
 </files>
 <files install.php>
 Order allow,deny
 Deny from all
 </files>
 <files wp-config.php>
 Order allow,deny
 Deny from all
 </files> Plaats dit in de hoofdmap 
 van je WordPress-installatie
  • 31. Injections blokkeren via htaccess <IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC]
 RewriteRule ^(.*)$ - [F,L]
 RewriteCond %{QUERY_STRING} ../ [NC,OR]
 RewriteCond %{QUERY_STRING} boot.ini [NC,OR]
 RewriteCond %{QUERY_STRING} tag= [NC,OR]
 RewriteCond %{QUERY_STRING} ftp: [NC,OR]
 RewriteCond %{QUERY_STRING} http: [NC,OR]
 RewriteCond %{QUERY_STRING} https: [NC,OR]
 RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
 RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|%3D) [NC,OR]
 RewriteCond %{QUERY_STRING} base64_encode.*(.*) [NC,OR]
 RewriteCond %{QUERY_STRING} ^.*([|]|(|)|<|>|ê|"|;|?|*|=$).* [NC,OR]
 RewriteCond %{QUERY_STRING} ^.*(&#x22;|&#x27;|&#x3C;|&#x3E;|&#x5C;|&#x7B;|&#x7C;).* [NC,OR]
 RewriteCond %{QUERY_STRING} ^.*(%24&x).* [NC,OR]
 RewriteCond %{QUERY_STRING} ^.*(%0|%A|%B|%C|%D|%E|%F|127.0).* [NC,OR]
 RewriteCond %{QUERY_STRING} ^.*(globals|encode|localhost|loopback).* [NC,OR]
 RewriteCond %{QUERY_STRING} ^.*(request|select|insert|union|declare).* [NC]
 RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in_.*$
 RewriteRule ^(.*)$ - [F,L]
 </IfModule>
  • 32. Robots.txt User-agent: * Disallow: /cgi-bin Disallow: /wp-admin Disallow: /wp-includes Disallow: /wp-content/plugins Disallow: /wp-content/cache Disallow: /wp-content/themes Allow: /wp-content/uploads
  • 33. wp-content/uploads beveiligen met .htaccess <Files *.php>
 deny from all
 </Files>
  • 34. Server configuratie Tweaks in php.ini, …
  • 35. PHP versie • Huidige PHP-versie 5.6 • Heel wat security tweaks vanaf 5.4 • Heel wat hosters draaien nog 5.3 • Vraag actief naar upgrades bij je hoster! Een goede hoster standaardiseert op 5.5.
  • 36. PHP.ini • safe_mode (weg sinds 5.4, deprecated in 5.3) • allow_url_fopen • register_globals (weg sinds 5.4, deprecated in 5.3)
  • 37. Fail2ban • Server package tegen brute forcing • Integreerbaar met wp-fail2ban (https://wordpress.org/ plugins/wp-fail2ban/)
  • 38. Wat als je zelf onvoldoende technisch onderlegd bent om dit zelf te implementeren?
  • 39. Managed (WordPress) Hosting - Nemen de serverconfiguratie voor hun rekening - Doen de WordPress & plugin updates voor je - Ondersteunen jou bij hacking
  • 40. savvii.nl • Sponsor van dit event
 (waarvoor dank!) • Gespecialiseerd in managed WordPress hosting
  • 41. Hoe kan je je website 
 proactief doorlichten?
  • 42. WPScan • scanner voor WordPress • scant naar vulnerabilities • kan gebruikt worden om DDOS te simuleren • via CLI • Self hosted • Gratis te gebruiken
  • 44.
  • 46.
  • 47. Zelf te nemen acties • Wijzig alle wachtwoorden: MySQL database, FTP, WordPress, … • Update je gehele installatie van WordPress, de thema’s, plugins • Controleer de inhoud van je database op eventuele malafide entries of verdachte users
  • 48. Zijn er nog vragen?