Call: +44 (0)7759 277220 Call
Forum

Welcome, Guest. Please Login.
Nov 22nd, 2024, 6:17am
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)
   OS Authentication
« Previous topic | Next topic »
Pages: 1  Reply | Notify of replies | Send Topic | Print
   Author  Topic: OS Authentication  (Read 7434 times)
Pete Finnigan
PeteFinnigan.com Administrator
*****




Oracle Security is easier if you design for it

   
View Profile | WWW | Email

Gender: male
Posts: 309
OS Authentication
« on: Jan 30th, 2008, 4:23pm »
Quote | Modify

Good morning folks,
 
I'd like to know your thoughts on the use of OS authenticated accounts (not Remote OS authenticated) and the OPS$ prefix.  As many of you probably know, OPS$ allows a single database account to either log in locally via OS authentication or via a database password if connecting remotely.  It has been deemed to be a security vulnerability to use OPS$ accounts because, "When set to the value “OPS$”, accounts defined with the prefix of “OPS$” may authenticate either with a password or with OS authentication.  Setting this parameter to a value other than “OPS$” allows only those accounts identified EXTERNALLY to authenticate to the database without providing a password."
 
I disagree with this assertion.  Currently, we have both OS authenticated accounts and regular database accounts for each of our DBAs just to avoid using OPS$ accounts.  This enables them to run scripts or even cronjobs on the database server without resorting to clear text passwords, extensive encryption on password files, etc.  They can also connect remotely to pull audit records for review, etc, as needed.  I do not see how avoiding the use of OPS$ is more secure.  In fact, having to use 2 accounts to enable us to perform the same functions simply increases our account management.  If someone has insight into why OPS$ accounts should be avoided, please post your reasoning.
 
Thanks in advance.
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: OS Authentication
« Reply #1 on: Jan 31st, 2008, 11:08am »
Quote | Modify

Hi,
 
I am for and against OS authenticated accounts. I always say never use remote_os_authent of course but you would be surprised how many sites i see this being used. In the case of locally OS authenticated accounts, they are fine if they are designed and used for a specific purpose, i.e. run cron job or other form of batch job perhaps written in Pro*C. They are fine if they are designed for purpose and have the least privilege principal defined during that design.  
 
Using them for DBA accounts well, always edges me to say no. The reason being is that you have potentially increased or at least changed the attack surface, probably changed is a better description. The authentication has moved out a layer to the OS. If you are going to use OS authentication then use it for a specific purpose and even go as far as to lock the OS account if its used for a cron job or similar.
 
If the issue is holding passwords in files, i.e. thats what stops the use of a database authenticated account then there are other options. The use of a tool such as OPR is great as it allows the password to be stored securley and retreived and also allows the database accounts to be associated with the OS account. There is an argument that this is similar to OS authentication anyway as once the password is in the repository it can be used with a slash logon. The Oracle mkstore uses a similar technique but uses the wallet to store the password and has the same issue. An alternate technique is to use dbms jobs or at worse the scheduler to allow the jobs to be controlled from the database.
 
Now to the use of OPS$ and the possibility to have an account authenticated in the database and also in the OS. There are two issues with this. First the attack surface in this case has been increased. There are now two vectors not one, somepne can gain access to the OS account and connect or they can gain access (or guess) the password and connect.  
 
The second issue is that once the password is set it makes it slightly harder to identify external accounts. This is not the main issue though the first one is.
 
MY two penneth, avoid OS authentication if possible, it pushes the authentication out a layer and if joined with DB autentication increases the attack surface.  
 
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: OS Authentication
« Reply #2 on: Jan 31st, 2008, 3:27pm »
Quote | Modify

Thanks for the reply.  BTW, not sure if I stated it, but this is on HP UNIX servers with a dedicated VPN.
 
I did take the approach of creating special locked OS accounts for recurring cron jobs.  So the only way to get to the OS account itself is via root.  I also ensure there are no OS accounts except the SA, DBAs and these special application accounts on the production servers.  For all practical purposes, if any of those accounts are hacked, no matter what I do, the person will have the ability to sudo to root and thus be able to affect the database however they want.  This affectively means the increased attack surface by using local OS authentication is a push since any user account hacked on the production server makes it all vulnerable no matter what other measure I have applied.  The database account I'm more worried about are the database authenticated ones since we have external customers that can sqlplus into the database and try to guess passwords.  Again, that's something I can't avoid since they have to be able to sqlplus to the database to perform their work.  I did take the precaution of having password verify set for interactive accounts as well as require 15-30 character passwords.  Hopefully the SAs do their part in identifying weak passwords for OS user accounts.
 
I have also made the argument that having password files, even in clear text but with directory/file permissions which only allow the locked OS account to access them is as secure as the other open OS accounts.  However, the powers that be disagree and insist we must have encryption password files but yet won't give us an approved tool to encrypt them with.
 
Based upon the additional information I just presented that I failed to in the original posting, would you still feel I'm leaving us open for attack (probably internal threat if anything)?
 
PS.  What does hth mean?   Tongue
 
Cody
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: OS Authentication
« Reply #3 on: Jan 31st, 2008, 5:45pm »
Quote | Modify

Hi Cody,
 
Thanks for your reply. hth means, "hope this helps" - I think you have summarised the issues, the fact is by having OS and DB authent fior the same account does increase the surface. Whether you can rely on the fact that OS accounts are locked and you can only sudo to them and SA and DBA and worse external people  have set strong passwords is the weak link in the process. If you have a process that checks these accounts for weak passwords, checks that the OS accounts are in fact locked, and a process to check DB passwords are strong then you have made it better. But as you point out the risk nowadays is internal. IF (big IF) the DB password is weak then someone can start to guess it, the OS may be locked and strong but thats effectively bypassed if the DB password is weak.
 
I dont see why you need dual authenticated accounts  - if these are DBA like accounts I would avoid the OS authentication altogether and stick with DB ones. If these are used to run jobs then by all means create a seperate OS account with least privs and use that but not dual as a DBA account as well.
 
Why not use mkstore, its Oracle's product and part of ASO so should not require approval?
 
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: OS Authentication
« Reply #4 on: Feb 1st, 2008, 12:09am »
Quote | Modify

Several comments about OS authentication.
 
OS authentication could be safer than DB authentication if the OS password  
rules are strong (password complexity and length, aging, etc.)  In other  
words, there should be a company algorithm for passwords, and the same  
algorithm should be effect for any platform, whether that platform be  
database, OS, or applications.  The problem with Oracle DB passwords is that  
their hashes are visible to some users in sys.user$ in 11G, as well as in  
DBA_USERS in 10G and lower.  So that's why some would consider OS authentication to be a safer choice.  (Depends upon local conditions.)
 
The problem with dual authentication is that I wonder if the owners know  
they are established for both?  On the other hand, if there is appropriate  
aging applied at both levels, then it doesn't matter if they forget about  
one.  A blackhat would still need to know the password to obtain access, and  
presumably strong password controls would be in place at account creation,  
right? (I'm talking to people who care about security here, not the general case!)
 
The tougher question has to do with non-individual accounts.  If somebody  
comes across the network into the database as OPS$ORACLE, is it easy to  
determine the individual who connected?  I think not.  Yes, you can chase  
through the Listener log and audit entries and maybe get something (from  
OS_USERNAME, USERHOST, HOST=, USER=), but it would much simpler if you could  
mandate that any interactive work must be done via an account that maps to  
one and only one individual.  
 
I believe somebody I know said that if OPS$ was set to null, then accounts  
could be established for local authentication but they could not be used to  
connect across the network.  I haven't had time to test that.  Anybody  
know?  
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: OS Authentication
« Reply #5 on: Mar 2nd, 2008, 3:31pm »
Quote | Modify

I disagree with this assertion.  Currently, we have both OS authenticated accounts and regular database accounts for each of our DBAs just to avoid using OPS$  wowgoldboss
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: OS Authentication
« Reply #6 on: Mar 31st, 2008, 10:52am »
Quote | Modify

Hi,
 
So you have two seperate accounts. Do you mean an OS account with true database OS authentication, i.e. the database account is identified external and you have a NULL os_authent_prefix or are you connecting as sysdba from an OS account in the OSDBA group? - plus you have a seperate database account?
 
In any of these scenarios you have increased the "attack surface" of the database as for one individual (or more) you have two methods (and accounts) to enter the database. Good security should always reduce the attack surface, reduce features, defaults, accounts, privileges etc.
 
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: OS Authentication
« Reply #7 on: Apr 1st, 2008, 2:49pm »
Quote | Modify

For our site, I have the os_authent_prefix defined.  We do lock the OS accounts which are application accounts.  Remote authentication is disabled.
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