have minimum access • Update software often & regularly • Use security firewalls & scan regularly • Consider using 2-factor authentication • Stick to reputable theme providers • Uninstall unused code/themes/plugins • Lock all doors, windows & switch off Internet!
threats are those you don’t know about You need to understand your weaknesses You need to build a solid defence You need to have a plan of attack SO BE PREPARED
the entire setup process. Hackers can find WordPress setup pages and install their own site – aka “WPSetup Attack” Ref: https://www.wordfence.com/blog/2017/07/wpsetup-attack/
DoB, Marriage • Fav footie club name, car rego, house number Examples of Bad Passwords Bob1976 Swans2017 !2Nancy The Password Paradox And Why Our Personalities Will Get Us Hacked
remember = difficult for hackers to guess Try to avoid reusing the same password on multiple sites. Read The Real Life Risks Of Re Using The Same Passwords
uses cookies to store session information. These are hashed with MD5 + salt keys in the wp-config.php file https://api.wordpress.org/secret-key/1.1/salt/
do need at least 1 Admin user to administer the site – do you need any more than that? Editor role is sufficient for somebody to manage 90% of all the site’s day-to-day content.
• u – the user who owns the file or directory (owner) • g - the group to which the user belongs • o - all other users on the system (not owner or user’s group), this is the permission group that you want to watch the most.
r - a user's capability to read the contents of the file • w - a user's capability to write or modify a file or directory • x - a user's capability to execute (run) a file or view the contents of a directory.
Web Server) = permalinks, redirects, error files, directory pswds, etc This should be locked down to CHMOD 444 php.ini = PHP version, extensions, remote opens, file uploads, etc wp-config.php = WordPress DB username & password, Salts These should be locked down to CHMOD 440
scripts Sucuri detects and cleans malware on servers De-blacklists your server/site Notify by SMS, Email, Private Twitter etc http://sucuri.net/ USD $199.99 per site per year
by default. For more control, in wp-config.php define( 'WP_AUTO_UPDATE_CORE', true ); • true - Development, minor, and major updates are all enabled • false - Development, minor, and major updates are all disabled • 'minor’ - Minor updates are enabled, development, and major updates are disabled
links & malware – Malware can read your wp-config.php file and email it to the hacker = you’re screwed – Don’t use themes or plugins from torrent sites! – Always try to download from original source Read: http://premium.wpmudev.org/blog/free-wordpress- themes-ultimate-guide/
plugins Responsible for many many WordPress security breaches “The ability for a site visitor to load content from a remote website and to make the web server write that remote content to a web accessible directory is the cause of the vulnerability in timthumb.php.” Ref: http://markmaunder.com/2011/08/02/technical-details-and-scripts-of-the-wordpress-timthumb-php-hack/
to have on your site. TimThumb is no longer supported or maintained as of Sept 2014 http://www.binarymoon.co.uk/2014/09/timthumb-end-life/ Read this: https://zeropointdevelopment.com/timthumb-is-evil/
new WordPress website. Hackers monitor SSL certificate transparency report +30mins after new certificate being issued. They can take over your new site before you complete the installation process. Ref: https://www.wordfence.com/blog/2017/07/hackers-find-wordpress-within-30-mins/
as malware). JS cryptocurrency miner (mostly Coinhive). Runs in browser when visitor opens infected page. Uses 100% of your computer’s CPU power. Grey area between legit use & as malware: • Some firewall & malware scanners look past mining code • Wordfence detects known miner scripts
Block IP address after X number of unsuccessful login attempts within a time period. Limit Login Attempts Reloaded plugin https://wordpress.org/plugins/limit-login-attempts-reloaded/
site frequently (real-time, hourly, daily, weekly). Back up to email https://wordpress.org/plugins/updraftplus/ Back up to Dropbox http://wordpress.org/plugins/wordpress-backup-to-dropbox/ Back up to Amazon S3 http://wordpress.org/plugins/xcloner-backup-and-restore/ Backup Buddy https://ithemes.com/purchase/backupbuddy/ VaultPress http://vaultpress.com/ Set your retention frequency. Can you restore from an issue that’s been happening for 2 months? Check your backup files – do a test restore!
hashes using Portable PHP password hashing framework e.g. $P$BdJlqDtx7PsXLuUAUcuiRRd9NebMKP. Passwords themselves are not stored in the DB Password can be replaced in DB with MD5 hash. After login it’s replaced by a salted MD5 hash. PASSWORD TYPE PASSWORD HASH
~264 MD5 has been broken but not resistance to preimages or second- preimages. MD5 + salts still poor choice as it’s designed to be fast. Modern GPUs generate billions of candidate passwords per second i.e. brute force Ref: https://en.wikipedia.org/wiki/MD5 Ref: https://en.wikipedia.org/wiki/Collision_attack Ref: http://security.stackexchange.com/questions/15790/why-do-people-still-use-recommend-md5-if-it-is-cracked-since-1996
relatively long time to be calculated; over time, the iteration count can be increased to make it even slower. This is done intentionally to resist brute force attacks as computational power increases. Ref: https://en.wikipedia.org/wiki/Bcrypt
uses part of our own body as the second verification part. This is going to be the normal way of authenticating with systems in the not-so-distant future.
following into wp-config.php before the line: /* That's all, stop editing! Happy blogging. */ define ('WP_CONTENT_DIR','/full/path/to/your/content/dir'); define ('WP_CONTENT_URL','http://example.com/full/path/to/your/content/dirs/url'); Warning: badly developed plugins & themes may have hard-coded wp-content location.
(NOT the main .htaccess in root). In the wp-admin .htaccess file, paste the following code: <Files admin-ajax.php> Order allow,deny Allow from all Satisfy any </Files>
to your DB they can easily find the table prefix. SELECT DISTINCT SUBSTRING(`TABLE_NAME` FROM 1 FOR ( LENGTH(`TABLE_NAME`)-8 ) ) FROM information_schema.TABLES WHERE `TABLE_NAME` LIKE '%postmeta'; Output: wp_ Ref: Changing WordPress' default table prefix does nothing to enhance security
order deny,allow deny from all allow from 123.123.123.123 </Files> Replace 123.123.123.123 with your own computer’s IP if you use the WordPress mobile app. Remove line 5 to completely block all XML-RCP requests to your site. Note: this will stop Jetpack, official WP mobile app, trackbacks and pingbacks from working.
Vulnerability Database (WordPress) Wordfence Blog and Free Security Scan Sucuri Blog Hardening WordPress from wordpress.org WPScan Vulnerability Database Zero Point Development Blog