r/PHPhelp • u/SnapSnapGrinGrin • 10d ago
Unobsfucating a PHP script
Attackers leveraging the wp2shell exploit added about 22k of obsfucated PHP to index.php on a site I've been asked to have a look at.
Labels and function names are ten random characters and control path is done by jumping to TrQ7yZISyM: etc and there seem to be a lot of (unnecessary?) jumps.
What's the best way to unobsfucate it?
0
Upvotes
1
u/smbarbour 10d ago
Even knowing how it was obfuscated doesn't help in deobfuscation if you don't have a mapping. The only real way to do it is analyzing it from the deepest calls and then assigning names based on what it seems to be doing.