Remove Malicious Code from All Files

Hello,

Server got hacked and all php files in all website contain the following code in the beginning.

http://pastebin.com/3PUgfwju

As I am hardening the server and trying to find culprit issues;

Can someone please find me a script which i can run to remove this code from all php files on the server.

Will be very grateful

2 Replies

Scrub entire server, start fresh, reload files from backup.

It's not worth the risk in trying to "fix" hacked files, you'll NEVER be sure you got them all, and then all of your work in rebuilding your server is once again rubbish.

@vonskippy:

Scrub entire server, start fresh, reload files from backup.

It's not worth the risk in trying to "fix" hacked files, you'll NEVER be sure you got them all, and then all of your work in rebuilding your server is once again rubbish.

Yeah, thats the way to go about it. Thanks

Still if anyone find himself in the same boat, use this;

http://pastebin.com/UyAR3nCr

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct