Pete Finnigan's Oracle Security Forum (http://www.petefinnigan.com/forum/yabb/YaBB.cgi)
Oracle Security >> Oracle Security >> Remote Database Access
(Message started by: Pete Finnigan on Aug 5th, 2008, 3:08pm)

Title: Remote Database Access
Post by Pete Finnigan on Aug 5th, 2008, 3:08pm
What is the best/most secure way to provide access to a dev oracle 10g (or 11g) database over the internet (https?) without the use of vpn or any other special client software?  Being able to remotely access a central development database (hosted on Win Server 2003 or 2008) would be very useful.

I'm thinking if I could somehow 1) encrypt all traffic, 2) open the database up to the world, 3) and only allow incoming traffic by (explicitly stated) IPs via a firewall, I might be able to meet my requirements.  This might be crazy or might not be possible.  Interested in your thoughts.

Title: Re: Remote Database Access
Post by Pete Finnigan on Aug 8th, 2008, 7:39am
What sort of access are you planning ?

There's some information here on SSL for the Oracle HTTP server and embedded PL/SQL Gateway (I think the latter is supported for 11g only).
http://wiki.shellprompt.net/bin/view/Apex/SecurityCategory

SSL (as I understand it) is about the client knowing that the server is who it says it is, rather than the other way round, so I'm not sure it helps you much (and I think it is part of the Advanced Security option).

Also think about the risk of the development database 'talking' to a production database (eg DB Link).

If you want to work from home, VPN / SSH seems a better approach.

Title: Re: Remote Database Access
Post by Pete Finnigan on Aug 9th, 2008, 6:02pm
Hi,

When you say https, do you mean at the TNS level or at a web application level. You say development database but don' t clarify whether you mean to do development or to access the application/database. can you clarify as the level of risk is obviously quite different.

cheers

Pete

Title: Re: Remote Database Access
Post by Pete Finnigan on Aug 12th, 2008, 2:07pm
Thanks for the response.  I believe TNS - basically dont want traffic (un,pw) transmitted in clear text.  Application developers need to be able to connect to and read from the central development database (config and other tables) for remote application debugging.  Ideally there would be no configuration of the client workstations, w. the exception of hosts file.  VPN would be great but it's not really an option right now.

Title: Re: Remote Database Access
Post by Pete Finnigan on Aug 13th, 2008, 4:10am
"I believe TNS - basically dont want traffic (un,pw) transmitted in clear text. "
It isn't anyway (packet sniffing on a LAN is as much a risk as it is on the internet)

Here's a brief posting by David Litchfield outlining the authentication mechanism.
http://www.freelists.org/archives/dbsec/11-2006/msg00005.html
and it covered here too
http://soonerorlater.hu/index.khtml?article_id=512

There's some information on securing the connection here:
www.dbspecialists.com/files/presentations/net8_security.html - (broken link)

Title: Re: Remote Database Access
Post by Pete Finnigan on Aug 13th, 2008, 8:00am
Hi,

Thanks for your confirmation. I am still unclear whether you mean remote as in really remote; i.e. your developers are at different sites or more importantly the access would be over the internet? - **I think** you mean that the developers are in your buildings and on your network.

To encrypt TNS you have a number of options:

1) pay for Oracle ASO and use TCPS instead of TNS, i.e. set up a listener with SSL for TNS, you can only do this with ASO though.

2) USe a free solution. You can tunnel TNS over SSH, there are a couple of papers listed on my white papers page http://www.petefinnigan.com/orasec.htm - just search in the page for "ssh" with CRTL-F, you wll find the papers, one shows how to tunnel sqlplus through ssh.

3) Again use ssh; using something like putty and allow developers access to the server and connect to sqlplus that way. I would not go this route unless absolutely necessary as you are increasing the attack surface by allowing more people acess to the server.

In terms of a solution that only depends on config, this is not easily possible. All the above require some form of install and config.

Finally the password is never transmitted in clear text to the database server anyway. The username is but not the password (for TNS i mean)

cheers

Pete

Title: Re: Remote Database Access
Post by Pete Finnigan on Aug 13th, 2008, 2:55pm
Thanks again for the replies.  I'll check into those referenced papers/links.  Clearly I have much to learn about this topic.

To clear up the ambiguity: 1) remote means over the internet and 2) in terms of access required, it is for the testing/debugging of the database driven application being developed in C# that connects to the database. There really is no need to connect remotely with sqlplus.

I'll consider all of the options that you presented.  Thanks.

Title: Re: Remote Database Access
Post by Pete Finnigan on Aug 14th, 2008, 8:05am
Hi,

Thanks for your reply. It sounds like your application supplies a database username and password to a database connection in c#. Therefore it is just as feasible that any of the developers can also use SQL*Plus by extracting the password (is this why you don't want the username/password to be exposed?). There are various techniques to get the password when an application has it stored for use.

Also more worringly, if the application does indeed make a connection from each client to the database, this means that the database listener has to be exposed and open to the internet. This then means that your database must be hardended to prevent attack.

Is there a business reason that the developers need to access the database directly over the internet. It is always a better design to allow http / https access over the internet and then inside the firewall from the application server allow access to the database.

cheers

Pete



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