SlideShare a Scribd company logo
WordPress Security
Few Simple Steps
@ Null Meet 16th
Oct 2010
Pune
Gaurav Pant
http://www.gauravpant.com
gauravggs@gmail.com
Agenda
● What is wordpress
● Installation
● Few basic steps for security
● Social aspects
WordPress
● weBlog Engine
● Written in PHP(mostly)
● Used for websites
● Approx 80% weblogs run on wordpress
● 20% on version 2.x
● 15% on version 3.x
● Ver 1.x: Jan 3 2004 -- Dec 2005
● Ver 2.x: Dec 31 2005 – June 2009
● Ver 3.x: June 17 2010 – and updating
WP installation
● Is Simple
● Need a web server with Apache, MySQL and
PHP
● Download WP from wordpress.org
● Create/Request DB User and Pass
● Unpack to document root of server
● Edit/Create wp-config.php
● Go to webpage and follow instructions
● Demo
Basic Security Steps
● FIX you Table Prefix
– Change Table prefix (this can be generally
done during install)
– edit your wp-config for prefix
– regular table prefix is wp_table
– vulnerable to standard SQL injections
Basic Security Steps...
● Securing the directories and files
– wordpress root / perms: writable by user acc.
– .htaccess writable by Wordpress if automatic
update is requreid
– other sub-dirs to be writable only by user acc
– /wp-contents/ sub dirs perms will vary
according to plugins and themes
– Uploaded images dir
● need to be WP writable for automatic uploads
● DO MANUAL UPLOADS uncomfortable but
safe
Basic Security Steps...
● Renaming 'admin' account:
● Run the query:
– update TablePrefix_users set
user_login='newusername' where
user_login='admin'
● Do all this before you start posting
● Do not write posts as admin
● Create generic user to create/write/
posts/pages
Basic Security Steps...
● Securing the /wp-admin/ area
● Move you wordpress installation to different dir
● Standard loc:
– www.site.com/wp-admin/
● Move or install wordpress in subdir
– www.site.com/mysecretinstall/wp-admin
● Users will still get your site from
– www.site.com
Basic Security Steps...
● Version info can be dangerous
● Disable version info
● Also from
● code meta tags
● Edit functions.php add:
– remove_action('wp_head',
'wp_generator');
Basic Security Steps...
● Disable dir index view
● Simple way:
– just add a blank index.html to all directories
(which do not have any index)
● Or add/modify .htaccess line
– Option Indexes
– TO
– Option -Indexes
Basic Security Steps...
● Moving wordpress:
● Edit wordpress url from wordpress panel
● copy index.php and .htaccess to root or new
location
● edit index.php and add following lines
– require('./wp-blog-header.php');
– TO
– require('./secretloc/wp-blog-header.php');
● New login location will be
– http://yoursite/secretloc/wp-admin/
Basic Security Steps...
● Hardening /wp-admin/ with .htaccess
● Create a .htaccess in wp-admin dir
● AuthUserFile /home/dexter/.htpasswd
● AuthName "Verify yourself"
● AuthType Basic
● require valid-user
● Create a .htpasswd
– /home/dexter/.htpasswd
– #htpasswd -b /home/dexter/.htpasswd dede
dede123
Basic Security Steps...
● USE SSL for admin/logins
● can be added to wp-config.php
● define('FORCE_SSL_LOGIN',true)
● define('FORCE_SSL_ADMIN',true)
● Add Salt: to wp-config: for better cookie
security
● define('AUTH_KEY', 'kie938rjmd903kdmr904');
● define('SECURE_AUTH_KEY','9485ekdfmsk43
98');
● define('LOGGED_IN_KEY', '9i7j6k[9md38');
● define('NONCE_KEY', 'kdkflow932034');
Basic Security Steps.
● Very BASIC but important:
● Don't be lazy –
– Update WP to latest version
– Change Passwords REGULARY
– Dont be a log Observer LOGS
– USE Passcode not just a word
– Backup DateBase regularly
– Report Bugs
– Use security Plugins like:
● lockdown, WP Security Scan, Captcha, Secure
Wordpress etc.
BLOGS...
● If its on the blog its no more personal
● If you put it on blog have good enough
material to defend it
● Do not use copy paste – check copy rights
● Acknowledge/Quote stuff used from other
places
● Be original
● Be Safe
Thanks!
Questions?

More Related Content

ODP
Introduction to WordPress Multisite
PPT
WP-MU 101: How to Install and Avoid Common Mistakes
TXT
Readme
PPTX
WordPress.org & Optimizing Security for your WordPress sites
KEY
DC Alt.Net: Building Web Apps With node.js
ODP
Web Quality Assurance Automation
PDF
#Continuous delivery with #Deployit
PDF
Wordpress Command-Line
Introduction to WordPress Multisite
WP-MU 101: How to Install and Avoid Common Mistakes
Readme
WordPress.org & Optimizing Security for your WordPress sites
DC Alt.Net: Building Web Apps With node.js
Web Quality Assurance Automation
#Continuous delivery with #Deployit
Wordpress Command-Line

What's hot (7)

PPTX
Webpack and Web Performance Optimization
PPTX
Ryan Duff 2015 WordCamp US HTTP API
PDF
How to create_a_simple_java_web_service_and_publish_it_on_netbeans_7
PPTX
Matt doyleppt
PDF
WP-CLI - WordCamp Miami 2015
PDF
Web Sockets - HTML5
PDF
Production optimization with React and Webpack
Webpack and Web Performance Optimization
Ryan Duff 2015 WordCamp US HTTP API
How to create_a_simple_java_web_service_and_publish_it_on_netbeans_7
Matt doyleppt
WP-CLI - WordCamp Miami 2015
Web Sockets - HTML5
Production optimization with React and Webpack
Ad

Viewers also liked (19)

PPTX
WordPress End-User Security - Orange County WordCamp 2011
PDF
WordPress Security for SEO & More
PDF
WordPress Security Essential Tips & Tricks
PDF
4 roadside hazard management
PDF
Understanding governance
PPS
SAUDADE
PPS
BELA BAHIA - BRASIL
PPT
Exploiting stack overflow 101
PPS
ÍNDIA
PPT
Personal research environment presentation
PPTX
Vwde dglt presentation 100511 bahasa (final)
PPS
BRASIL - MORRO BRANCO (CE)
RTF
Document
PPT
5 route network rs final id r1
PDF
Ess 01 & ess-02 closing meeting
PPT
Aero dataworkshop 2d-module-00_v1.0_en
PPTX
Digital library workshop
PDF
4 roadside hazard management
PPS
Tea time
WordPress End-User Security - Orange County WordCamp 2011
WordPress Security for SEO & More
WordPress Security Essential Tips & Tricks
4 roadside hazard management
Understanding governance
SAUDADE
BELA BAHIA - BRASIL
Exploiting stack overflow 101
ÍNDIA
Personal research environment presentation
Vwde dglt presentation 100511 bahasa (final)
BRASIL - MORRO BRANCO (CE)
Document
5 route network rs final id r1
Ess 01 & ess-02 closing meeting
Aero dataworkshop 2d-module-00_v1.0_en
Digital library workshop
4 roadside hazard management
Tea time
Ad

Similar to WordPress Security (20)

PDF
Word press beirut 9th meetup march
PDF
Developers, Be a Bada$$ with WP-CLI
ODP
1. MySql plugins
PDF
Word camp2011 introwordpresssecurity
PDF
Beyond the WordPress 5 minute Install
PPTX
A new way to develop with WordPress!
PDF
The WP Engine Developer Experience. Increased agility, improved efficiency.
PPTX
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
PPTX
WordPress Optimization & Security - LAC 2013, London
PDF
Complete Wordpress Security By CHETAN SONI - Cyber Security Expert
PDF
WordPress Security 101: Practical Techniques & Best Practices
PDF
How to set up a Wordpress Blog
PDF
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
PPTX
Presentation to SAIT Students - Dec 2013
KEY
What is (not) WordPress
PDF
10 things every developer should know about their database to run word press ...
PDF
Intro to WordPress Plugin Development
PPTX
WordPress CLI in-depth
PDF
WordPress Plugin Development 201
PDF
It’s a WIN, WIN: ‘WordPress On Windows’
Word press beirut 9th meetup march
Developers, Be a Bada$$ with WP-CLI
1. MySql plugins
Word camp2011 introwordpresssecurity
Beyond the WordPress 5 minute Install
A new way to develop with WordPress!
The WP Engine Developer Experience. Increased agility, improved efficiency.
40 WordPress Tips: Security, Engagement, SEO & Performance - SMX Sydney 2013
WordPress Optimization & Security - LAC 2013, London
Complete Wordpress Security By CHETAN SONI - Cyber Security Expert
WordPress Security 101: Practical Techniques & Best Practices
How to set up a Wordpress Blog
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
Presentation to SAIT Students - Dec 2013
What is (not) WordPress
10 things every developer should know about their database to run word press ...
Intro to WordPress Plugin Development
WordPress CLI in-depth
WordPress Plugin Development 201
It’s a WIN, WIN: ‘WordPress On Windows’

More from n|u - The Open Security Community (20)

PDF
Hardware security testing 101 (Null - Delhi Chapter)
PPTX
SSRF exploit the trust relationship
PDF
PDF
Api security-testing
PDF
Introduction to TLS 1.3
PDF
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
PDF
Talking About SSRF,CRLF
PPTX
Building active directory lab for red teaming
PPTX
Owning a company through their logs
PPTX
Introduction to shodan
PDF
Detecting persistence in windows
PPTX
Frida - Objection Tool Usage
PDF
OSQuery - Monitoring System Process
PDF
DevSecOps Jenkins Pipeline -Security
PDF
Extensible markup language attacks
PPTX
PDF
Hardware security testing 101 (Null - Delhi Chapter)
SSRF exploit the trust relationship
Api security-testing
Introduction to TLS 1.3
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Talking About SSRF,CRLF
Building active directory lab for red teaming
Owning a company through their logs
Introduction to shodan
Detecting persistence in windows
Frida - Objection Tool Usage
OSQuery - Monitoring System Process
DevSecOps Jenkins Pipeline -Security
Extensible markup language attacks

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
A Presentation on Artificial Intelligence
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Big Data Technologies - Introduction.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Approach and Philosophy of On baking technology
PDF
Electronic commerce courselecture one. Pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
The AUB Centre for AI in Media Proposal.docx
Understanding_Digital_Forensics_Presentation.pptx
A Presentation on Artificial Intelligence
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
Network Security Unit 5.pdf for BCA BBA.
Big Data Technologies - Introduction.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Encapsulation_ Review paper, used for researhc scholars
cuic standard and advanced reporting.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Approach and Philosophy of On baking technology
Electronic commerce courselecture one. Pdf
Empathic Computing: Creating Shared Understanding
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

WordPress Security

  • 1. WordPress Security Few Simple Steps @ Null Meet 16th Oct 2010 Pune Gaurav Pant http://www.gauravpant.com gauravggs@gmail.com
  • 2. Agenda ● What is wordpress ● Installation ● Few basic steps for security ● Social aspects
  • 3. WordPress ● weBlog Engine ● Written in PHP(mostly) ● Used for websites ● Approx 80% weblogs run on wordpress ● 20% on version 2.x ● 15% on version 3.x ● Ver 1.x: Jan 3 2004 -- Dec 2005 ● Ver 2.x: Dec 31 2005 – June 2009 ● Ver 3.x: June 17 2010 – and updating
  • 4. WP installation ● Is Simple ● Need a web server with Apache, MySQL and PHP ● Download WP from wordpress.org ● Create/Request DB User and Pass ● Unpack to document root of server ● Edit/Create wp-config.php ● Go to webpage and follow instructions ● Demo
  • 5. Basic Security Steps ● FIX you Table Prefix – Change Table prefix (this can be generally done during install) – edit your wp-config for prefix – regular table prefix is wp_table – vulnerable to standard SQL injections
  • 6. Basic Security Steps... ● Securing the directories and files – wordpress root / perms: writable by user acc. – .htaccess writable by Wordpress if automatic update is requreid – other sub-dirs to be writable only by user acc – /wp-contents/ sub dirs perms will vary according to plugins and themes – Uploaded images dir ● need to be WP writable for automatic uploads ● DO MANUAL UPLOADS uncomfortable but safe
  • 7. Basic Security Steps... ● Renaming 'admin' account: ● Run the query: – update TablePrefix_users set user_login='newusername' where user_login='admin' ● Do all this before you start posting ● Do not write posts as admin ● Create generic user to create/write/ posts/pages
  • 8. Basic Security Steps... ● Securing the /wp-admin/ area ● Move you wordpress installation to different dir ● Standard loc: – www.site.com/wp-admin/ ● Move or install wordpress in subdir – www.site.com/mysecretinstall/wp-admin ● Users will still get your site from – www.site.com
  • 9. Basic Security Steps... ● Version info can be dangerous ● Disable version info ● Also from ● code meta tags ● Edit functions.php add: – remove_action('wp_head', 'wp_generator');
  • 10. Basic Security Steps... ● Disable dir index view ● Simple way: – just add a blank index.html to all directories (which do not have any index) ● Or add/modify .htaccess line – Option Indexes – TO – Option -Indexes
  • 11. Basic Security Steps... ● Moving wordpress: ● Edit wordpress url from wordpress panel ● copy index.php and .htaccess to root or new location ● edit index.php and add following lines – require('./wp-blog-header.php'); – TO – require('./secretloc/wp-blog-header.php'); ● New login location will be – http://yoursite/secretloc/wp-admin/
  • 12. Basic Security Steps... ● Hardening /wp-admin/ with .htaccess ● Create a .htaccess in wp-admin dir ● AuthUserFile /home/dexter/.htpasswd ● AuthName "Verify yourself" ● AuthType Basic ● require valid-user ● Create a .htpasswd – /home/dexter/.htpasswd – #htpasswd -b /home/dexter/.htpasswd dede dede123
  • 13. Basic Security Steps... ● USE SSL for admin/logins ● can be added to wp-config.php ● define('FORCE_SSL_LOGIN',true) ● define('FORCE_SSL_ADMIN',true) ● Add Salt: to wp-config: for better cookie security ● define('AUTH_KEY', 'kie938rjmd903kdmr904'); ● define('SECURE_AUTH_KEY','9485ekdfmsk43 98'); ● define('LOGGED_IN_KEY', '9i7j6k[9md38'); ● define('NONCE_KEY', 'kdkflow932034');
  • 14. Basic Security Steps. ● Very BASIC but important: ● Don't be lazy – – Update WP to latest version – Change Passwords REGULARY – Dont be a log Observer LOGS – USE Passcode not just a word – Backup DateBase regularly – Report Bugs – Use security Plugins like: ● lockdown, WP Security Scan, Captcha, Secure Wordpress etc.
  • 15. BLOGS... ● If its on the blog its no more personal ● If you put it on blog have good enough material to defend it ● Do not use copy paste – check copy rights ● Acknowledge/Quote stuff used from other places ● Be original ● Be Safe