Call: +44 (0)7759 277220 Call
Forum

Welcome, Guest. Please Login.
Nov 23rd, 2024, 8:16am
News: If you would like to register contact the forum admin
Home | Help | Search | Members | Login
   Pete Finnigan's Oracle Security Forum
   Oracle Security
   Oracle Security
(Moderator: Pete Finnigan)
   Unwrapping PL/SQL
« Previous topic | Next topic »
Pages: 1 2  Reply | Notify of replies | Send Topic | Print
   Author  Topic: Unwrapping PL/SQL  (Read 28464 times)
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Unwrapping PL/SQL
« on: Aug 8th, 2006, 2:05pm »
Quote | Modify

I have just posted a link to my presentation slides from Blackhat Las Vegas 2006 on my [url http://www.petefinnigan.com/orasec.htm]Oracle security white papers[/url] page. The slides can be found [url http://www.insight.co.uk/files/presentations/BlackHat%20conference.pdf]here[/url]
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #1 on: Aug 9th, 2006, 5:22pm »
Quote | Modify

Pete,
 
It's a very interesting document. And very useful too. I think there are many wrapped pl/sql procedures for which people don't have the source anymore. I have a few wrapped pl/sql procedures written many years ago by DBA's. We know what the functionality is of these procedures but we don't have the source anymore! If we want to change them we have to reverse engineer them. I'll try to unwrap these procedures with you unwrap script.
 
regards,
 
Ivan
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #2 on: Aug 16th, 2006, 5:07pm »
Quote | Modify

Pete,
Can one  unwrap a PL/SQL Package in oracle 10g?
 
 
 
 
Olivet
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #3 on: Aug 17th, 2006, 9:19am »
Quote | Modify

Hi,
 
the example procedure included with the paper is for 9i and lower and is only a proof of concept. The 10g algorithm is completely different.
 
cheers
 
Pete
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #4 on: Aug 17th, 2006, 10:47am »
Quote | Modify

Pete,
I really understand the write up and i know you delibrated much more on the process for Oracle 9i and bellow  with respect to DIANA and m code. But I have an issue in house. I have a package that we wrapped  in Oracle 10g. What the package does is to send notification to our numerious customers once a trasaction takes place in their account. We need to expand the scope of this package and we are stucked. The source code cannotbe trace again. Wehave the .plb  only. We dont want to re invent the wheel as it took some time to get to that position . I really need your advice in this case. what can we do. Can we get the souce code back from .plb or from another means.
Thak you.  
 
 
Warmest regards,
Olivet
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #5 on: Aug 18th, 2006, 1:21am »
Quote | Modify

Pete,
 
I've read your presentation and it's very good. My question is very much from the other side. We have source which we have wrapped in order to protect our IP. Obviously this is not as protected as we had first thought. Angry
 
Is there anything else we should be looking at to minimise the risk of people unwrapping our code and stealing the IP given that the nature of our product means we cannot lock down the database structures (we are using 10g)?
 
Regards,
Graeme
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #6 on: Aug 18th, 2006, 10:22am »
Quote | Modify

Hi Graeme,
 
The issue is really that the 10g mechanism has also been cracked. There are a number of 10g unwrappers out there. I know of at least 5 different ones. At this point in time they are not in general circulation so its unlikely that someone without connections is going to get one.  
 
The issue is that the wrapped source is stored in SYS.SOURCE$ so even if the files are not shipped to the server somone may be able to get the wrapped source from the database and unwrap it.
 
Unless you can protect the wrapped source from view the intellectual property is vulnerable. In this sense the wrap mechanism does little to help protect source code.  
 
cheers
 
Pete
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #7 on: Aug 21st, 2006, 6:41am »
Quote | Modify

Maybe it's not something that you've looked into, but how does native compilation compare to wrapping for 'code hiding' purposes ?
Obviously that isn't its primary purpose, but maybe there's another 'layer' that can be applied on top of native compilation to obfuscate the object ?
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #8 on: Aug 21st, 2006, 5:42pm »
Quote | Modify

Hi Gary,
 
I have looked into Native compilation in detail. I even mentioned it in the slides. The problem would be that the native PL/SQL is simply the mcode for the PL/SQL VM. The Source code and diana levels still exist, i.e the IDL$ tables still have contents and the SYS.SOURCE$ table still contains the wrapped PL/SQL so we would not gain anything from this strategy.
 
cheers
 
Pete
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #9 on: Aug 23rd, 2006, 12:00am »
Quote | Modify

Hi Pete & Gary,
 
So to me it looks like there is no way to 100% lock down PL/SQL in order to protect IP. The 2 ways mentioned (wrapping and Native compilation)seem to only be a deterrent to prying eyes and could be read by suitably connected malicious hackers.
 
Not that I think the IP we are protecting will attract these hackers, our IP is still worth a considerable amount and differentiates us from the competition. From my simplistic outlook this is a big issue for IP protection within PL/SQL and a gap in the market for a good solution which can guarantee IP protection within PL/SQL.
 
Cheers,
 
Graeme
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #10 on: Aug 24th, 2006, 10:24pm »
Quote | Modify

Hi Graeme,
 
I agree, its virtually impossible to protect your IP if a DBA has access to the SYS.SOURCE$ table. I also agree that this seems like a gap in the market to provide a tool but even if you tac something on top of PL/SQL i.e. encrypt the source and dynamically extract and run it the problem is you could still get at the source.
 
An obvious solutiojn is to move your code to C, OCI or Pro*C.
 
cheers
 
Pete
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #11 on: Sep 12th, 2006, 8:32am »
Quote | Modify

Hi!
Will you be so kind, to help me with my trouble?
I will try to explain.
We do use Spatial optins with oracle, and after applying the patchset to 9.2.0.8.0 we can't create or rebuild spatial indexes.
We taking a error like this:
 
11:28:48 test 8 RELEASE2>alter index test_g_idx rebuild;
alter index test_g_idx rebuild
*
ERROR at line 1:
ORA-29858: error occurred in the execution of ODCIINDEXALTER routine
ORA-29400: data cartridge error
Xjэ
ORA-13249: internal error in Spatial index: [mdidxrbd]
ORA-13205: internal error  while parsing spatial parameters
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 259
ORA-06512: at line 1
 
 
Metalink told us, that this is a bug, and it fixed in 10R2 ;(
 
But at 9.2.0.7.0 we was able to create spatial indexes.
Can you help me to unwrap this package, I wish to look it, and possible to know, why it isn't working.
Thank you!
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #12 on: Sep 14th, 2006, 5:34am »
Quote | Modify

hi pete,
amazing, before this doc really I thought Oracle is unbreakable, about the tool you mentioned that this tool works for 10g, am i right or I missed something please clarify
regards
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #13 on: Sep 14th, 2006, 10:49am »
Quote | Modify

Read some more papers from Pete's website and you too will know: Oracle really isn't unbreakable.
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
Re: Unwrapping PL/SQL
« Reply #14 on: Mar 7th, 2007, 3:43pm »
Quote | Modify

Pete,  
 
it really works when unwrapping a PL/SQL "procedure" in 9i,
but how to unwrap a PL/SQL "Package" in 9i ?
 
"Write PL/SQL as packages; DIANA is not stored in the database" what does it mean in  slides ?
Am I missed anything ?
 
IP Logged

Pete Finnigan (email:pete@petefinnigan.com)
Oracle Security Web site: http://www.petefinnigan.com
Forum: http://www.petefinnigan.com/forum/yabb/YaBB.cgi
Oracle security blog: http://www.petefinnigan.com/weblog/entries/index.html
Pages: 1 2  Reply | Notify of replies | Send Topic | Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board
  • PFCLScan PFCLScan

    Simply connect PFCLScan to your Oracle database and it will automatically discover the security issues that could make your Oracle database vulnerable to attack and to the potential loss of your data.

  • PFCL Obfuscate PFCLObfuscate

    PFCLObfuscate is the only tool available that can automatically add license controls to your PL/SQL code. PFCLObfuscate protects your Intellectual Property invested in your PL/SQL database code.

  • PFCLCode PFCLCode

    PFCLCode is a tool to allow you to analyse your PL/SQL code for many different types of security issues. PFCLCode gives you a detailed review and reports and includes a powerful colour syntax highlighting code editor

  • PFCLForensics PFCLForensics

    PFCLForensics is the only tool available to allow you to do a detailed live response of a breached Oracle database and to then go on and do a detailed forensic analysis of the data gathered.

  • Products We resell PFCLReselling

    PeteFinnigan.com Limited has partnered with a small number of relevant companies to resell their products where they enhance or compliment what we do

  • PFCLATK PFCLATK

    PFCLATK is a toolkit that allows detailed pre-defined policy driven audit trails for your Oracle database. The toolkit also provides for a centralised audit trail and centralised activity reporting

  • PFCLCookie PFCLCookie

    PFCLCookie is a useful tool to use to audit your websites for tracking cookies. Scan websites in a natural way using powerful browser driven scanner

  • PFCL Training PFCLTraining

    PFCLTraining is a set of expert training classes for you, aimed at teaching how to audit your own Oracle database, design audit trails, secure code in PL/SQL and secure and lock down your Oracle database.

  • PFCL Services PFCLServices

    Choose PFCLServices to add PeteFinnigan.com Ltd to your team for your Oracle Security needs. We are experts in performing detailed security audits, data security design work and policy creation

  • PFCLConsulting PFCLConsulting

    Choose PFCLConsulting to ask PeteFinnigan.com Limited to set up and use our products on your behalf

  • PFCLCustom PFCLCustom

    All of our software products can be customised at a number of levels. Choose this to see how our products can be part of your products and services

  • PFCLCloud PFCLCloud

    Private cloud, public cloud, hybrid cloud or no cloud. Learn how all of our services, trainings and products will work in the cloud

  • PFCLUserRights PFCLUserRights

    PFCLUserRights allows you to create a very detailed view of database users rights. The focus of the reports is to allow you to decide what privileges and accounts to keep and which to remove.

  • PFCLSTK PFCLSTK

    PFCLSTK is a toolkit application that allows you to provide database security easily to an existing database. PFCLSTK is a policy driven toolkit of PL/SQL that creates your security

  • PFCLSFTK PFCLSFTK

    PFCLSFTK is a toolkit that solves the problem of securing third party applications written in PL/SQL. It does this by creating a thin layer between the application and database and this traps SQL Injection attempts. This is a static firewall.

  • PFCLSEO PFCLSEO

    PFCLSEO is a web scanner based on the PFCLScan technology so that a user can easily scan a website for technical SEO issues