Decoding ion cube encrypted php files

I have a project whose files are encrypted with ion cube. I asked for the original source code but my client does not have it. How can I decode those files because I had not seen any ion cube decoder, I downloaded and tried couple of tools for decoding, but I am always ending up with errors and some thing messed up, I am not getting the correct output.

You can’t. IonCube optimizes, obfuscates, and compiles the source code into bytecode. Any attempts to decode it won’t end up being all that useful since you won’t end up with the original source code.

If the client doesn’t have the source code, try contacting the original developer.

thanks for your quick reply. The main problem is that client is not able to get source code from original developer. Is there any other way.

You can attempt to rewrite it. Otherwise, nope.

Encryption is intended to prevent others from tampering, viewing, and/or stealing the source code.

And why doesn’t he have the source code?

If he can’t deliver, tell him you’ll need to write anew and charge accordingly.

Sounds like he either doesn’t own the code, or he wants to have it reverse engineered when he either doesn’t have the legal right to do so or wants to avoid the original author’s modification fees.

Either way, there is a reason it was encoded and you are probably entering an area that could have legal ramifications for you if you’re not careful.

Yes… I will tell client that it need to be rewritten again other wise I will not work no more.
Thanks for your quick support.

@techrahul87 - Yes agree with your issue. There are many developers these days who provide encrypted code to their customer and then for supporting their product charge a huge amount. I have also faced this situation, where in a customer wanted to shift to some other agency because his developer was not providing him proper support. When I told them that a lot of code was encrypted, they contacted the existing developer from whom the application was developed and the web agency flatly refused to share the source code stating that only the web code was with source code. Hence, I think some sort of decoding mechanism needs to be put in place by Ion cube for customers having such genuine issues.

I have heard there are decoders but have not tried any. If you do a google search you will come across many such decoders online as well as offline, but cant comment as have not used any

I have issued a ticket regarding this in Ion Cube. Waiting for there reply, but I am not sure that they will help in these kind of cases. Waiting for reply from them.

As Mittineague indicated, decryption or reverse engineering may be legally questionable and could open you up to lawsuits from the original developer.

Since you do not own the code in question, this isn’t really IonCube’s problem–they won’t help you decrypt code owned by someone else. You’ll either have to work it out with the original developer that owns the product/code or go with a different solution.

Seems to me this is most likely to be a “buyer beware” type of thing. That is, unless it’s specified in the contract that you are also purchasing the rights to the source code, you’re likely to be out of luck. But, IANAL

Yes would agree with that. The main thing to note is check the previous terms the client had with the developer. If it was a custom development for the client, then it should definitely include the source codes. Then I think the developer would be legally bound to provide the source code.