All Projects → simon816 → PHPDeobfuscator

simon816 / PHPDeobfuscator

Licence: MIT license
Advanced PHP deobfuscator

Programming Languages

PHP
23972 projects - #3 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to PHPDeobfuscator

CodeDeobfuscator
Code Deobfuscator
Stars: ✭ 45 (+2.27%)
Mutual labels:  deobfuscator
akamai-toolkit
A set of tools to work on Akamai v1 anti-bot solution. Current supported version: 1.70
Stars: ✭ 215 (+388.64%)
Mutual labels:  deobfuscator
AgileDotNet-StringDeobfuscator
String decryption for Agile.NET packed assemblies.
Stars: ✭ 25 (-43.18%)
Mutual labels:  deobfuscator
Deobfuscator
Some deobfuscator for java lol
Stars: ✭ 225 (+411.36%)
Mutual labels:  deobfuscator
Simplify
Android virtual machine and deobfuscator
Stars: ✭ 3,865 (+8684.09%)
Mutual labels:  deobfuscator
deobfuscator
Online Javascript Deobfuscator Tool
Stars: ✭ 46 (+4.55%)
Mutual labels:  deobfuscator
batch deobfuscator
Deobfuscate batch scripts obfuscated using string substitution and escape character techniques.
Stars: ✭ 82 (+86.36%)
Mutual labels:  deobfuscator
Reconstruct
ProGuard Deobfuscator
Stars: ✭ 79 (+79.55%)
Mutual labels:  deobfuscator
.NetReactorStringDecryptor
A string decryptor for .NET Reactor.
Stars: ✭ 20 (-54.55%)
Mutual labels:  deobfuscator
UnSealer
.NET Assemblies Deobfuscator.
Stars: ✭ 57 (+29.55%)
Mutual labels:  deobfuscator
MC-Remapper
Deobfuscator for Minecraft by mapping json
Stars: ✭ 104 (+136.36%)
Mutual labels:  deobfuscator
JavaDeobfuscator
Java Deobfuscator
Stars: ✭ 32 (-27.27%)
Mutual labels:  deobfuscator
decrypticon
Java-layer Android Malware Simplifier
Stars: ✭ 17 (-61.36%)
Mutual labels:  deobfuscator
OSRSUpdater
A simple (and outdated) Old-School RuneScape decompiler/deobfuscator. Performs field and method analysis which uses ASM and bytecode patterns for identification. Identified fields could be used for creating bot clients or QoL clients. For educational use only.
Stars: ✭ 13 (-70.45%)
Mutual labels:  deobfuscator
.NetReactorCfCleaner
A control flow cleaner for .NET Reactor.
Stars: ✭ 42 (-4.55%)
Mutual labels:  deobfuscator
akamai-deobfuscator
A tool to help you deobfuscate Akamai scripts.
Stars: ✭ 236 (+436.36%)
Mutual labels:  deobfuscator
NetReactorSlayer
An open source (GPLv3) deobfuscator for Eziriz .NET Reactor
Stars: ✭ 260 (+490.91%)
Mutual labels:  deobfuscator

PHPDeobfuscator

Overview

This deobfuscator attempts to reverse common obfuscation techniques applied to PHP source code.

It is implemented in PHP with the help of PHP-Parser.

Features

  • Reduces all constant expressions e.g. 1 + 2 is replaced by 3
  • Safely run whitelisted PHP functions e.g. base64_decode
  • Deobfuscate eval expressions
  • Unwrap deeply nested obfuscation
  • Filesystem virtualization
  • Variable resolver (e.g. $var1 = 10; $var2 = &$var1; $var2 = 20; can determine $var1 equals 20)
  • Rewrite control flow obfuscation

Installation

PHP Deobfuscator uses Composer to manage its dependencies. Make sure Composer is installed first.

Run composer install in the root of this project to fetch dependencies.

Usage

CLI

php index.php [-f filename] [-t] [-o]

required arguments:

-f    The obfuscated PHP file

optional arguments:

-t    Dump the output node tree for debugging
-o    Output comments next to each expression with the original code

The deobfuscated output is printed to STDOUT.

Web Server

index.php outputs a simple textarea to paste the PHP code into. Deobfuscated code is printed when the form is submitted

Examples

Input

<?php
eval(base64_decode("ZWNobyAnSGVsbG8gV29ybGQnOwo="));

Output

<?php

eval /* PHPDeobfuscator eval output */ {
    echo "Hello World";
};

Input

<?
$f = fopen(__FILE__, 'r');
$str = fread($f, 200);
list(,, $payload) = explode('?>', $str);
eval($payload . '');
?>
if ($doBadThing) {
    evil_payload();
}

Output

<?php

$f = fopen("/var/www/html/input.php", 'r');
$str = "<?\n\$f = fopen(__FILE__, 'r');\n\$str = fread(\$f, 200);\nlist(,, \$payload) = explode('?>', \$str);\neval(\$payload . '');\n?>\nif (\$doBadThing) {\n    evil_payload();\n}\n";
list(, , $payload) = array(0 => "<?\n\$f = fopen(__FILE__, 'r');\n\$str = fread(\$f, 200);\nlist(,, \$payload) = explode('", 1 => "', \$str);\neval(\$payload . '');\n", 2 => "\nif (\$doBadThing) {\n    evil_payload();\n}\n");
eval /* PHPDeobfuscator eval output */ {
    if ($doBadThing) {
        evil_payload();
    }
};
?>
if ($doBadThing) {
    evil_payload();
}

Input

<?php
$x = 'y';
$$x = 10;
echo $y * 2;

Output

<?php

$x = 'y';
$y = 10;
echo 20;

Input

<?php
goto label4;
label1:
func4();
exit;
label2:
func3();
goto label1;
label3:
func2();
goto label2;
label4:
func1();
goto label3;

Output

<?php

func1();
func2();
func3();
func4();
exit;
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].