Unhacking a Hacked WordPress Site

A collection of commands to help you determine if you’ve been hacked, the same commands can be used to find obfuscated code and dangerous php in any other CMS system such as Joomla or Drupal.

Using the Find command

A few different ways to utilize this powerful command. Set different permissions on files and folders sudo find . -type f -exec chmod 664 {} \; sudo find . -type d -exec chmod 775 {} \;

xmlrpc.php

I was seeing lots of Warnings about POST-request to xmlrpc.php in the logfiles of modSecurity for apache. Turns out that wordpress uses the XML-RPC protocol that was created in 1998, the problem with having this enabled is that it encourages hackers to try and guess your password by making hundreds or thousands of login attempts… Continue reading xmlrpc.php

The ultimate ~/.vimrc

So many hours spent on this file… It only uses built in functions from the vim-nox package, if you dont already have it installed then issue: # apt-get install vim-nox I use vim as a full IDE for all my development, combined with MiniBufExpl plugin and TMux to split screen for tailing log files.

Tcpcrypt.. How could we miss this?

Install Tcpcrypt and you’ll feel no difference in your every day user experience, but yet your traffic will be more secure and you’ll have made life much harder for hackers.

GenRandID

PHP Class for generating unique non chronological ids from a number list This code is part of a larger project where we needed user ids that would be simple to remeber but hard to predict.

Categorized as PHP