Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Christophe <xof(at)thebuild(dot)com>
Cc: Postgres General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)
Date: 2008-09-25 22:08:37
Message-ID: Pine.GSO.4.64.0809251732400.16879@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-www

On Thu, 25 Sep 2008, Christophe wrote:

> it strikes me that a reasonable approach would be a non-core pluggable
> language which accepts encrypted strings as functions, decrypts them
> (using a key compiled into the language module), and passes them on to
> PL/pgSQL for execution...This would, of course, be easily hacked with
> someone who can step through the language module with a debugger

If we presume that the module doing the encryption/decryption is itself is
a common open-source implementation, all I have to do is read in the
de-obfuscator code byte at a time, stopping every time I have a key length
worth of bytes to see if they unlock something that looks like plaintext.
You have to move to at least another layer of relatively serious security
before you need debugger-level skills to crack it.

People routinely tear through protection like this even on closed-source
systems that benefit some from security by obscurity, and if you can know
the method used that usually allows an even easier approach.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Amiel 2008-09-25 22:18:42 Re: The planner hates me.
Previous Message x asasaxax 2008-09-25 21:59:58 Doubt on query

Browse pgsql-www by date

  From Date Subject
Next Message Casey Allen Shobe 2008-09-25 23:38:18 Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)
Previous Message Andrew Sullivan 2008-09-25 21:14:04 Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)