PHP Encoders: Protection where are you?Thursday, October 20. 2005Thursday, October 20. 2005 From time to time people ask if it is possible to use the Hardening-Patch together with the IonCube Encoder or the ZendEncoder. I usually answer, that they should ask the IonCube support or the Zend support, to simply create compatible versions.
Comments
Display comments as
(Linear | Threaded)
Zend can not only be theohetically cracked, there have been sites for some months that have offered Zend decoding services, and there are several threads in the Zend forums from people that have tested the services and seen it to be true. e.g.
http://www.zend.com/phorum//read.php?num=8&id=538&thread=401 and surrounding threads. What Stefan fails to mention is that most users of encoded files rarely just encode the files, as with PHP being inherently insecure from being opensource, tinkering inside PHP is possible. Instead, users generally protect files with license files, locking to MAC address and other machine parameters, and that when files are protected from even being deocded unless run on the correct target hardware, the security of Zend and ionCube systems comes into their own. There is a significant and vital difference between the real world usage that users perform with ionCube and Zend and playing with test files on a PHP system that is open to modification. That said, there is always a level of threat, and seeing the rise in attacks on Zend from the anti Zend lobby over the last few months, ionCube have developed and tested a new security technique to prevent opcode dumping and access in the way described above. With proof of concept tests completed, this will be available in the ionCube solution soon, and an added benefit to users of the ionCube solution. It is expected that the Zend solution may likely follow suit as well. jc posted on Thursday, October 20. 2005
#1.1
Stefan Esser
()
First of all: Jonathan above is an employee of IonCube. Well atleast he reads his mails at http://mail.ioncube.com/...
Seeing that there is no protection at all in ionCube Encoder I seriously doubt that they have developed anything that cannot be cracked within hours once you have the rest of the system in place... And what he fails to mention is, that anything that is even able to decode ZendEncoder will be able to support IonCube with a few changes and that all you need to crack a file, that is protected to only run on the correct hardware is, to have one valid license. If that is needed at all. For years hardware dongles get cracked again and again, do you really believe a software only protection that is not developed by the right people (because I seriously doubt that IonCube or Zend have the right people for software runtime protection hired) can hold off a real attacker? Btw: Tinkering in Operation Systems is and was always possible. It just needs a different skillevel (than patching PHP source code). And it has never stopped anyone from breaking executable binary runtime protections. posted on Thursday, October 20. 2005
Your comments really just assert what is widely known, which is that there is ultimately no security to anything. The hardware dongles that Steinberg use have been cracked with emulating device drivers, DRM gets cracked, FlexLM, our neighbours upstairs window two days ago, and your observations do not describe any weakness in encoding solutions, but are actually just a comment on PHP. Now, if only PHP were closed source...
So, is it really all doom and gloom for code protection then, are all bets off, and should we just give up? Well, of course note. Things are rarely black and white, and "security" is a rather all encompassing and actually vague term. For one thing, in order to determine that something is insecure, it's important to establish what an end user considers to be secure from their perspective, and not just ones own. In fact, ask any true security expert whether something is secure and if they're honest you'll get the answer that no it's not, so it's not necessarily helpfui. With PHP and its runtime environment being opensource and easy to tinker with, the notion of security at all is somewhat of a difficult concept to make stick. The crucial point is that there are different degrees and types of protection, and this is where headway is made. Now, if we looked inside PHP and saw the original source code to encoded scripts then I have to agree, but claiming that there is no security at all in these encoding solutions is of course incorrect and misleading. People use these tools for a variety of reasons, and for most people, they actually provide much more than an adequate solution, and effectively are totally secure for the purpose that they require. I'll expand, but as an aside for a moment, an interesting parallel not related to computing is with the handcuffs that Scotland Yard used in the UK for many years to secure prisoners. Whilst totally effective at their purpose, they had an interesting design flaw in that if you hit your wrists hard down on a table they would spring open and you would be free! Now whilst this, of course, is somewhat of a weakness, the handcuffs were none the less totally effective at giving the security that Scotland Yard required, and so the tools were pefect at the job. It is often similar in the software world that whilst any protection can be targetted for attempts to compromise, the realities of the real world and real world situations are that the existance of this possiiblity is none the less of no consequence practically speaking, and that the protection offered is totally effective. Now back to PHP, if you consider the PHP Encoding market, solutions broadly fall into two types and two extremes; source code encoding, and compiled code. The source code solutions rely on restoring source, which is executed by eval, and is trivial to expose by intercepting the restored code. These solutions truly are insecure, can result in severe performance degredation, don't offer 100% code compatibility due the differences in how eval processes some idioms, but none the less do have a place in the market and are suitable for some people. Compiled code solutions, such as Zend, IonCube, SourceGuardian and PHPShield (actually the same product as SG just rebranded), compile code to bytecodes and eliminate the source, and are the other extreme. Ultimately the compiled code is of course available in memory as it has to be, and of course tools may be able to access it, (this is actually hardly a new revelation), but the point is that there is a gulf between the compiled code and original source, and this is part of the value in this type of solution. That and other benefits such as increased performance. In fact, all manner of information can be obtained with any encoding solution by examining what happens inside PHP at runtime, but is this insight useful? Practically speaking, no, not at all. As far as accessing compiled code goes, it may be novel for those that understand assembler code and that are interested to learn about PHP internals, but it's not the original source code, (afterall the bytecodes are a different language), and it's the source that most people are looking to protect. Even though Zend files have been turned back to source as indicated above, these sites are being shutdown, and even when up, when it comes down to it those services are not in reality a substantial threat at all for many reasons. A further thing to note that some of these tools offer mechanisms for the developer to take advantage of that going beyond complied code. In tools such as ionCube, mechanisms exist for storing sensitive data inside the encoded files and away from the opcodes. This information isn't revealed at all by running an opcode dumper, and even triggering a core dump and examining a memory image wouldn't reveal the information either in its raw form, and so it's not necessary to try and hide it from the opcodes as it's simply not there in the opcodes in the first place. Like many protection systems, they need to be utilised fully to get maximum effect and benefit. As a final thought, we shouldn't forget that Zend Encoder and ionCube, plus SG more recently, have been around for 3 to 4 years now, and it's only because of these systems that huge numbers of individuals, companies and large corporations have been able to produce products for the benefit of the PHP market and PHP itself. The viability of people even contemplating producing serious systems for PHP is substantially due to these tools, and they have been totally effective at what they set out to do. Had they not been, then in 3 years we'd have heard about it a long time ago. Without them, the development of PHP in terms of available products for putting together major systems would most likely have been substantially less swift, and projects such as hardened PHP might not even exist because no one would really care. Whilst from time to time people jump up and claim that XYZ is totally insecure (this blog post certainly isn't the first), there is often with a not always particularly well hidden agenda, and the reality from the end users perspective is different. Without doubt, Zend, SG, ionCube, are a major contributing factor to the success of PHP, and of substantial benefit to thousands of users every day around the world. Rather than trying to attack systems that offer real value for developers and that hardened PHP is not currently compatible with, it would surely be better to concentrate efforts on getting the hardened PHP patch adopted as standard. As soon as the patch is available in PHP, then value adding products such as Zend Encoder, IonCube and SG would become compatible very quickly (you'd be surprised just how quickly), and PHP will have taken a step further down the road of vital improvement. Everyone involved in the business has the best interests of the PHP development community and PHP itself at heart, and taking positive steps instead of the negative one attempted here will ultimately get the respect, attention and action that they deserve. posted on Friday, October 21. 2005
#4
Stefan Esser
()
Jonathan,
let us not twist the facts. Everyone involved in the business of selling add-on products (with questionable worth) to the members of the PHP community is just trying to achieve one thing: maximizing his own revenue. It is a joke that you claim, that the existance of PHP was majorly influenced by the existance of some encoders that create "encoded" PHP files, which do not run on the majority of PHP servers, because those have neither your, nor Zend's extension installed. The success of PHP is based on the fact, that it is easy to learn and available to everyone. Not only to a few paying customers of yours. If a few bigger companies believe that they cannot sell their products, if they do not encode them, then this is simply their problem. PHP is an open source language, always was and hopefully always will be. PHP was the most important script language on the web, long before IBM, Intel, SAP, etc... married with Zend. And it is an even bigger joke, that you believe your existance or non existance was relevant in the creation of the Hardening-Patch. The Hardening-Patch was created, because I wanted to have *my* PHP servers secure. That I released it as an open source project is just caused by the fact, that I love to share my work with others. I am not selling it and I am not trying to convince everyone to install it. It is as simple as: You have the choice to install it and If you choose not to, then don't cry at me if you get hacked. (The existance is warning enough from my side about my opinion about PHP's security) And btw... It is not the Hardening-Patch, that is incompatible to your or Zend's products, it is the simple nature of closed source add-ons, to be incompatible to changes in the code. And it is the Hardening-Patch that would add value to your products, if you supported it, not the other way around. The Hardening-Patch is installed by some pretty big companies and hosters and they can happily live without your extensions. In the end we both simply have different goals. I am protecting PHP and the PHP community against a lot of different kinds of security problems and you want to promote PHP in big companies to maximize your revenue, by selling them your products. PS: I don't need you to teach me the nature of runtime encryption. I did runtime encryption in DOS days, was one of the first 3 people who wrote windows PE file encryptors, helped with developing ELF encryptors and should be still the only one who wrote a XBOX XBE file encryptor... Beside the fact, that I did consulting work for PC game copyprotection companies, that are mostly based on "protecting" the game executable by encryption layers... posted on Friday, October 21. 2005
It is unfortunate that Stefan did not choose to first contact and privately solicit comment from those that were about to be included in a sensationalist and inaccurate commentary. In order that balanced and accurate information is committed to permanent public record, it is accepted practice to do so, and would have shown professionalism.
Had he made contact, ionCube would willingly have provided the most recent software, and he would have found that his experiment revealed nothing and merely crashed. Whilst we do applaud efforts at finding mistakes in PHP code that may put servers at risk, we are surprised to see the active promotion and patches to a tool one might use in attempts to breach the copyright and intellectual property of developers. If Stefan chooses to do more research in this area, we would invite him to get in touch for the latest developments. Nick Lindridge Managing Director, ionCube Ltd. posted on Saturday, October 22. 2005
#5.1
Stefan Esser
()
Nick,
I understand, that you dislike my blog entry. However there is nothing inaccurate in my posting. Why should I have contacted you first? To hear from you the same statements, that I can read here in the comments? Do you really believe that would have changed my mind? Your comment about VLD however is another joke. VLD is a disassembler for ZendEngine generated op_arrays. Compared to what you guys call the real world, it is nothing else than f.e. the unix tool objdump or the disassembler part of any debugger. Calling it a tool that can be used to breach copyright and intellectual property is just "a sensationalist" comment. It is not the problem of VLD, that your Encoder does not offer any protection at all against disassembling the op_array in memory. -se posted on Saturday, October 22. 2005
Last months, I took a closer look to the Vulcan Logic Disassembler, and yes, indeed, You can dump the opcodes. However, I did not found a fast way to convert the generated opcode to source code.
But it should not be a big deal to write a little program to do the job, and I think it will be written pretty soon. I remember the old days of Clipper. Valkyrie was a product to decompile (correction: detoken) clipper programs, and currently most interpreted languages can be reversed to source. It's only a matter of time to write a tool to translate the opcode to source. The reversed source would not be identical to the initial code, but it will be a code which shall work for 95% I am opensource programmer too, and I do not like tools as Ioncube or alike, because...commercial entities can use Your code inside their projects and they can violate Your license. This is the second face of encoding tools. Maybe the commercial entity is hiding something not from their own, they used (stealed) code from other sources, and shall You support such behaviour by buying it ? posted on Saturday, November 5. 2005
"I am opensource programmer too, and I do not like tools as Ioncube or alike, because...commercial entities can use Your code
inside their projects and they can violate Your license." How about encrypting own code but leaving unencrypted the GPL used in some of my projects ? (I ask for permission from the original author's of GPL and explain to him/her that my application is commercial and not an open-source, however my application will work without their scripts if not found in Plugins ... in order to expand for extra features they can be used but not mandatory. I get permission and i include them unencrypted.) Now how about working on a project a 8-10 hours a day and developing it in 2-3 years with own efforts, own investment and just giving it away without any protection ? I'm not against OpenSource , I gave a way some RealEstate application... and many functions, from over 20k downloads $0 donations But if is a commercial product i think that it should be protected. If used some parts of code from third-party should be given credits. regards feha p.s. sorry for my english posted on Sunday, April 16. 2006
Add Comment
|
Calendar
Categories Syndicate This Blog |
|||||||||||||||||||||||||||||||||||||||||||||||||


