2

My test file is:

<?php
echo "Hello";
?>

Now I encoded with ionCube, it becomes obfuscated.

ioncube.sh -55 test.php -o test_e.php

Whenever I run php test_e.php > out it prints Hello in the "out" file.
So it executed somewhere in the system and decompile PHP code in system. Is there any way to obtain that decompiled code?
I searched lots of things in Google like "xdebug, parsing, trace" but it's not working to obtain the decompiled PHP.

TonyStark
  • 379
  • 6
  • 22
  • @mario i dont think so that the question is duplicated, i need some log or some process that behind decompiling php execution. – TonyStark Jun 28 '15 at 11:03
  • 1
    ionCube uses a custom bytecode set. No, you can't decode it. (Short of running it in `gdb` and inspecting which Zend functions are invoked). And yes, it's both a duplicate (over 100 prior questions like this) and off-topic (looking for software). – mario Jun 28 '15 at 11:10
  • @mario thanks for comment, i have old ioncube loader that i can easily decompile php5.3 file, but in php5.5 and ioncube5 it gives php output(hello) instead of php code... so i thought that decompilation process done in runtime in system core, so if i can log/monitor then i can decompile php. thanx for suggesting `gdb`. i will check more on it – TonyStark Jun 28 '15 at 11:18
  • 1
    "So it executed somewhere in the system and decompile PHP code in system". This is not how ionCube works. As was said elsewhere, there is a custom bytecode compilation, and execution is of the bytecode. There is no internal decompilation necessary. You would need to discover the bytecode and decompile that. New mechanisms in v9, particularly encryption with algorithmic keys if code is annotated to use that, would make this tricky. Don't forget too that whilst it would be an interesting exercise, keep in mind that trying to decompile files is against the terms and conditions for their use. – Nick Jul 01 '15 at 16:42
  • @Nick Thanks nick, now i got it. and yes this is ass kicking exercise, to find the algorithm :) – TonyStark Jul 01 '15 at 18:05

0 Answers0