Skip to main content
1 of 6
Mark Buffalo
  • 22.6k
  • 8
  • 77
  • 91

I found unknown PHP code on my server. How do I de-obfuscate the code?

We've been getting a lot of noise regarding hacked PHP files here, and it's taking a lot of time to answer these questions. In many cases, they are off-topic. We've had a discussion about this on Information Security Meta, and many people want these posts to stay.

However, nearly every single post about obfuscated PHP can be answered in almost the same way. We can condense the majority of the methods for de-obfuscating hacked files into one single answer. Or even multiple answers if one answer can't cut it.

This leads to the question many people are asking: how do I de-obfuscate malicious PHP code that I found on my server, how did it happen, and what do I do?!

Mark Buffalo
  • 22.6k
  • 8
  • 77
  • 91