Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74418 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17936 invoked from network); 21 May 2014 20:12:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 May 2014 20:12:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=nicolai.scheer@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nicolai.scheer@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.46 as permitted sender) X-PHP-List-Original-Sender: nicolai.scheer@gmail.com X-Host-Fingerprint: 209.85.213.46 mail-yh0-f46.google.com Received: from [209.85.213.46] ([209.85.213.46:40326] helo=mail-yh0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/F1-00924-6C80D735 for ; Wed, 21 May 2014 16:12:54 -0400 Received: by mail-yh0-f46.google.com with SMTP id 29so2145813yhl.19 for ; Wed, 21 May 2014 13:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=YaebOD1mDb1gQNbzmrbV5wMRb65zZRMM/hYN946tzqE=; b=zZzFoTD2ARJiAe6MK96jTUxMoDNuSJENYiLTIqJd6bpLfU46LizqnRy5+T9qZzgIPs 05oe6yat/2gYmY54q7s0u1zmHX4bfjJZ9jAE+xhRDo4Abg9Ok2aE+Z+PgVfloAoJoDlD 9h/mfOPXrXj2RMDtHOmSblltEBiKQbMjMWLyVLNj+2z+D84+piwx0mLqlgDDetUWAsmo e479VAWpHMKX/xDCrhenE7byP7rywA2Vv7uOhPWJl2ws+eSxI+xIEHUYsU2bj9IZg7G0 nFf/VMvExH1RPeggq6DilqPJg0t0SEi4Cs7KvlZIrXR9pOVOQoUoDymNiogOPOP9xv+q PO+A== MIME-Version: 1.0 X-Received: by 10.236.161.164 with SMTP id w24mr75967033yhk.23.1400703171974; Wed, 21 May 2014 13:12:51 -0700 (PDT) Received: by 10.170.88.215 with HTTP; Wed, 21 May 2014 13:12:51 -0700 (PDT) In-Reply-To: <537CBD67.4000008@lerdorf.com> References: <6048BA05-CC13-46DD-8439-9CB4EE29078B@ajf.me> <9EBA95A7-B9F7-41F0-AE2B-283260753E5A@googlemail.com> <537CBD67.4000008@lerdorf.com> Date: Wed, 21 May 2014 22:12:51 +0200 Message-ID: To: Rasmus Lerdorf Cc: Andrea Faulds , Kevin Ingwersen , PHP Internals Content-Type: multipart/alternative; boundary=20cf30549fe70062b104f9ee9f72 Subject: Re: [PHP-DEV] encode php scripts with opcache compatibility From: nicolai.scheer@gmail.com (Nicolai Scheer) --20cf30549fe70062b104f9ee9f72 Content-Type: text/plain; charset=UTF-8 Hi On 21 May 2014 16:51, Rasmus Lerdorf wrote: > On 5/21/14, 7:27 AM, Nicolai Scheer wrote: > > Hi, > > > > yes, we are shipping code to customers and they should not read the > source. > > The level of protection gained from obfuscated code is not enough, but > just > > delivering the opcodes would be ok. > > > > I know that the opcode array might be dumped, this is just to raise the > > bar. If I just obfuscate the code there's still the possibilty left to > edit > > the code directly. > > > > It is completely trivial to turn opcodes back into PHP code. Sure, it > won't look exactly like the original, but it will run exactly the same > and can easily be modified. There are tools out there that let even a > complete neophyte do it. > > If you truly want to protect your code, ship a signed compiled C/C++ > extension and put key components of your application in it. That is much > harder to reverse (anything can be reversed, of course) and it has the > added advantage of likely making your application faster. > > -Rasmus > > But that would imply developing our key components in C, wouldn't it? Unfortunately that is not feasible for our project. Do you have an example of a tool that can reverse opcodes to php code? Maybe I did not search for the right thing, I did not stumble upon any. I always thought the opcodes where kind of cryptic, at least a bit... I'm not longing for "true" protection. It's enough if the scripts can not be read and modified in an easy way. All I'm asking for is a way do so in way, that scripts are still cacheable (even if this makes dumping the opcodes easier...). I found Derick's Vulcan Logic Disassembler, I think this can help my understanding of what opcodes of a script look like. Greetings Nico --20cf30549fe70062b104f9ee9f72--