Call: +44 (0)7759 277220 Call
Forum

Welcome, Guest. Please Login.
Nov 22nd, 2024, 6:56pm
News: Welcome to Pete Finnigan's Oracle security forum
Home | Help | Search | Members | Login
   Pete Finnigan's Oracle Security Forum
   Oracle Security
   Oracle Security
(Moderator: Pete Finnigan)
   .NET and sending userid/password strings
« Previous topic | Next topic »
Pages: 1  Reply | Notify of replies | Send Topic | Print
   Author  Topic: .NET and sending userid/password strings  (Read 10276 times)
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
.NET and sending userid/password strings
« on: Sep 4th, 2007, 3:21pm »
Quote | Modify

Is there any way to send an encrypted password to Oracle as part of a connection string for logon w/o having to decrypt it?
 
I'm writing in .NET which as you know can be reverse engineered easily.   If I encrypt a password on my own to place it in the string but then decrypt it to create my connection string, I've essentially given away everything necessary to get into the database.
 
Is there any way around this?
 
I'm using Oracle 10.2 and Visual Basic via Visual Studio 2005.
 
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: .NET and sending userid/password strings
« Reply #1 on: Sep 6th, 2007, 2:58am »
Quote | Modify

If the .NET code cannot be obfuscated, then whatever means it uses to connect to Oracle can be discovered.
That is, even if it could connect using an encrypted version of the password, then looking at the .NET code will give the "cracker" the same ability to connect with that encrypted password.
 
The username/password authentication is supposed to verify that the end USER knows the password. It doesn't really help if the password is coded into the application.  
You could have a logon trigger that confirms that the access is coming from an appropriate (secure) IP address.  
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: .NET and sending userid/password strings
« Reply #2 on: Sep 6th, 2007, 10:18am »
Quote | Modify

Gary's idea about a logon trigger to check where the request is coming from is good. Also look at valid_node_checking in the sqlnet.ora file and restrict the connections that way as well. Also have a look at Oracle password repository, There isa  link in my tools page. You can use this to store an encrypted password on the OS and then access it at run time. You could access this possibly via a system() command in VB. This is jnot foolproof as someone could sniff the connection and get the password. You could then use ASO to encrypt the network connection or for free look at openssh, there are a couple of papers listed on my Oracle security white papers page, one by Roger Shragg and one I think by Jared still on how to tunnel TNS through openssh.
 
Also have a look at the Oracle mkstore tool that allows passwords to be encrypted in a wallet and then a slash connection to the database can be made. This is better as it allows your users to connect with slash without exposing the password, the password is not leaked in the OS, you should use valid node checking and/or a logon trigger. mkstore was added in 10gR2. I am going to talk about mkstore in my blog soon.
 
hth
 
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: .NET and sending userid/password strings
« Reply #3 on: Oct 22nd, 2007, 8:02pm »
Quote | Modify

Hi,
 
I use Oracle 10g enterprise (10.2) [DB server]
Tomcat as application server [DB client]
JDBC Thin driver to connect from Tomcat to Oracle
Everything in Linux machines.
 
I am trying to extract passwords from my application code so I want to use download-uk.oracle.com/docs/cd/B19306_01/java.102/b14355/clntsec.htm#CHD IJDBB]Secure External Password Store using a wallet to store usernames and passwords.
 
The problem is that all documentation I have found uses Thick clients (like SQLPlus) with configuration files where configure the wallet location and other options. But I am using JDBC with Thin driver so my client does not have an sqlnet.ora configuration file (for example). I must use the object properties in the Java code for configuring the wallet location and I couldn't find any example that explains that.
 
Another question is how to create a wallet in a machine without Oracle tools. I need mkstore to create a wallet, but my client does not have any Oracle software! It only executes Java code that must connect to Oracle, but no Oracle client is installed!
So, can I use mkstore to create a wallet in another computer and simply copy the resulting wallet files to the client computer? I need any special care when doing this (preserve file permissions, owner, etc)?
 
Any idea or helpful link?
Thanks.
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: .NET and sending userid/password strings
« Reply #4 on: Oct 23rd, 2007, 9:00am »
Quote | Modify

Hi,
 
Oracles wallet is a PKCS12 format which is an industry standard. You can use the Bouncy Castle provider or JCE to manipulate wallets and use them for passwords. You should check http://blog.mikesidoti.com/2007/04/opening-oracles-wallet.html for some basic ideas. The documentation for using wallets for database passwords is not good.
 
hth
 
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: .NET and sending userid/password strings
« Reply #5 on: Oct 29th, 2007, 5:37pm »
Quote | Modify

Thank you very much, Pete.
Your response was very helpful for me, but I have some doubts:
 
Can I use the method used in your link?
Storing passwords instead of certificates is a problem?
At least can I use the Mike's method to open the wallet and then use another thing instead of the keystore api?
What is the role of Bouncycastle/JCE? Replace the keystore api for storing passwords?
 
Do you have any better idea to extract passwords from Java code? I don't use SSL certificates for authentication because Oracle Advanced Security in Oracle 10g do not support them in JDBC thin driver.
 
I hope you understand my entry-level JDBC knowledge and my poor english.
 
THANKS A LOT!!
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: .NET and sending userid/password strings
« Reply #6 on: Aug 14th, 2008, 11:32pm »
Quote | Modify

did you figure this out at all??
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  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