Sites hacked

Couple basic tips if anyone cares:

- Contact your host, and ask them to, "change the suEXEC user on my domain to a separate user account". Most of these cPanel hosts have suEXEC enabled, which means Apache is running under the same user as all your files / directories are owned by. If you login via FTP with "mysite", then Apache is most likely running as user "mysite". This is a huge security hole, because it means any PHP page that gets loaded via the web browser has full permission to modify all files / directories on your domain.

For example, if you login via FTP with "mysite", then Apache should be configured to run as say, "mysite_httpd", or whatever. They should never be the same though.

- Ensure any directories you have CHMODed to 0777 (eg. /tmp/, /cache/, etc.) are NOT viewable via web browser. Modify Apache / Nginx configuration as needed, so a 403 Forbidden error is thrown when trying to view those directories.

Follow these two simple things, and I bet a lot of the hacks you guys experience stop. Right now, all people have to do is get a shared account on the same server as you, find one file on your domain that's CHMODed to 0777 (can even be a .txt file in some /tmp/ directory), and that's it. Within seconds, they have full control over your domain. They just modify the file and add some PHP code that's a remote file & database manager, rename to .php if needed, then open it up in their web browser. Since Apache is running as the same user as all your files / directories are owned by, they have full access to all files on the domain.

EDIT: Oh, and ionCube your database info. Most of these systems have a config.php file or similar. Signup at ioncube.com, and use their online encoder to code that file.
 


ScumBag is most likely right about the shell and Ccarter explains how the shell was uploaded.

Search for info on how to clean based on what they said (php shell removal, deleting old plugin files).

I prefer a scorched earth policy followed by a move to a new server but I know that isn't in the cards for everyone.
 
I got caught out on a few sites before xmas. Id left an old copy of revolution slider installed (attached to an inactive theme).

1. Php mailer script installed. Wrecked the email reputation.
2. Fashion directory installed selling fake shit
3. Bunch of others just had malware and back doors added.

Pain in the ass. Learned a lot from it.

Ugh, same.
 
SRS? You just leave old abandoned PHP files & DBs lying around online for anyone to have a go at?!!! Not even updating your SQL server?

I'm an atheist (actually anti-theist) but... ON GOD'S GREEN EARTH WHY WOULD YOU DO THAT?!!

To whomever this tag belongs I doff my cap: 'revoke * from shindig'
KYMAqRt.gif
 
I well remember the time when my Wordpress sites got hacked a couple of years ago. I was a noob then and accidentally changed the file permissions of a couple of files when I was just getting to know cPanel. I then re-changed some of the files to 644 or something. Anyway, it was either me or the Hostgator India web hosting that was responsible. From then on every time I visit my (Wordpress) sites in the morning I feel like shit.

Maybe Wordpress is not to blame, they do their best to keep it secure.
 
Was probably the revslider hack

Make sure it's updated, and also make sure any "all in 1" themes you're using have it updated as well. Popular themes like Avada bundle it into the theme files, which means Wordpress will miss the fact that the plugin has to be updated

I had 10-15 client sites fucked due to it, and the only way to truly protect against anything inserted into ftp/db is to rebuild the site from scratch. If you're too lazy to do that, constantly filter through your wp-includes folder for files name things like 'hello.php', 'file.php', 'Tiff.php', etc...in most cases the hacker will pop 20-30 of these php files all around the server giving them multiple doorways back in

Also commonly they'll create a wp-profile.php in the main directory and modify your index.php to read that first, which redirects all traffic that comes from search engines. Tricky lil move because when you type the site into the browser it'll load fine
 
Sucuri charges $99 to run a script they've used 10,000 times lol. dat return