Toon posts:

Oracle database benaderer vanuit de root

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hallo,

ik heb Oracle 8.1.6 draaien op Linux RH 7.2 Wanneer ik inlog als oracle user kan ik middels:

svrmgrl
connect internal
startup
quit

mijn database opstarten. Dit werkt goed.

Maar ... hoe start ik nu de database op als ik inlog als root. Ik wil namelijk SilverStream Apllication Server installeren en tijdens de installatie moet ik verbinding maken met de database en dat lukt niet. Ik kan immers geen connection maken vanuit de root.

Wie weet hoe ik een database connection kan maken vanuit de root, of hoe je de database connection automatisch laat opstarten.

Verwijderd

Op woensdag 06 februari 2002 09:48 schreef BL het volgende:
Hallo,

ik heb Oracle 8.1.6 draaien op Linux RH 7.2 Wanneer ik inlog als oracle user kan ik middels:

svrmgrl
connect internal
startup
quit

mijn database opstarten. Dit werkt goed.

Maar ... hoe start ik nu de database op als ik inlog als root. Ik wil namelijk SilverStream Apllication Server installeren en tijdens de installatie moet ik verbinding maken met de database en dat lukt niet. Ik kan immers geen connection maken vanuit de root.

Wie weet hoe ik een database connection kan maken vanuit de root, of hoe je de database connection automatisch laat opstarten.
Ga eens naar De Meern en loop ff bij Oracle binnen zou ik zeggen :P

Verwijderd

Dacht dat als je inlogt als Oracle user, je vervolgens de db opstart en dan: su en vervolgens je rootwachtwoord intikt je als root erin zit en je db gewoon draait.

Verwijderd

Op woensdag 06 februari 2002 10:08 schreef SGBas het volgende:
Dacht dat als je inlogt als Oracle user, je vervolgens de db opstart en dan: su en vervolgens je rootwachtwoord intikt je als root erin zit en je db gewoon draait.
Ben je wel ingelogt als gebruiker?
Dit is echt belangrijk anders gaat het nooit werken.

  • Ro_meo
  • Registratie: Juni 2001
  • Laatst online: 16:04
is je ORACLE_HOME etc. (environment settings als root) hetzelfde als oracle ?

CHECK : (als root)
set | grep ORA
su - oracle
set | grep ORA

iOS N3rd


  • Ro_meo
  • Registratie: Juni 2001
  • Laatst online: 16:04
Op woensdag 06 februari 2002 09:54 schreef larry_ellison het volgende:

[..]

Ga eens naar De Meern en loop ff bij Oracle binnen zou ik zeggen :P
Waar slaat DIT nou weer op ?
Vraagt de topicstarter toch niet ?

iOS N3rd


Verwijderd

Topicstarter
Ik ben er al uit.

In principe kun je database alleen benaderen al oracle user. Maar je moet wel de listeners wel goed installeren en dat had ik niet gedaan. Ik log nu in als root start de listener en dan kan ik zonder problemen SilverStream installeren.

  • rig0r
  • Registratie: Juli 2001
  • Laatst online: 11-03-2025
Op donderdag 07 februari 2002 10:08 schreef BL het volgende:
Ik ben er al uit.

In principe kun je database alleen benaderen al oracle user. Maar je moet wel de listeners wel goed installeren en dat had ik niet gedaan. Ik log nu in als root start de listener en dan kan ik zonder problemen SilverStream installeren.
Hmm dit is niet helemaal juist, je kan als willekeurige user met een oracle db connecten, als je je environment maar goed zet :

export ORACLE_HOME=/u01/app/oracle/product/8.1.7
export ORACLE_SID=BLAAT

dan kan je al via sqlplus connecten, en die installer moet dat dan ook kunnen (al dan niet via sqlplus of via z'n eigen libs).

Database stoppen/starten is een ander verhaal, dat kan alleen op het moment dat je lid bent van de juiste (dba)groep.

De Oracle listener dient ook onder de user oracle te draaien, uiteraard moet je in je listener.ora wel de instances configureren die actief zijn. Dit moet je ook doen in de tnsnames.ora, deze file wordt gebruikt door de Oracle client libraries. Hier zet je dus in hoe je database heet en op welke host hij draait.

  • Ro_meo
  • Registratie: Juni 2001
  • Laatst online: 16:04
als we toch bezig zijn :
/var/opt/oracle/oratab

Hierin zet je je instance-namen + oracle-homes + Y/N
voor Yes of No niet opstarten / stoppen met dbstart/dbshut

iOS N3rd


Verwijderd

Of zo:
Vulnerability in Oracle 9i Database Server Leads to Remote Compromise
------------------------------------------------------------------------


SUMMARY

Attackers can execute any function in any library remotely on a system
running Oracle's database server without a user ID or password.

DETAILS

Vulnerable systems:
Oracle version 9
Oracle version 8

A large part of Oracle database functionality is provided by PL/SQL
packages. PL/SQL, or Procedural Language/ Structured Query Language,
extends SQL and allows an "executable" package be created that exports
procedures and functions. PL/SQL packages can be extended to call
functions exported by operating system libraries or Dynamic Link
Libraries. It is possible to create a (PL/SQL) library and PL/SQL package
that calls any function in any library on the file system. An attack would
probably call system() and pass the name of a program to be executed. It
is apparent that to do this a user must be able to connect to the Oracle
database server and login with an account that has the CREATE LIBRARY
permission before an attack becomes successful. However, NGSSoftware
Insight Security Research has discovered a way to fool the Oracle database
server into loading arbitrary libraries and executing arbitrary functions
without ever having to authenticate.


Details:
When a PL/SQL package executing in the database is required to run an
external procedure the oracle process connects to the Listener and
requests that the Listener load the relevant library, call the function
and pass the function any parameters passed to it. The Listener does not
load the library into its own process address space but rather launches
another process, extproc on UNIX systems or extproc.exe on Windows
platforms, and directs oracle to connect to it. Oracle obliges and
connects to the extproc process using named pipes and makes the same
request that it made to the listener. Extproc loads the library and calls
the function. There is no authentication performed anywhere in all of
this. This opens up a glaring and extremely dangerous security hole.

It is possible for an attacker to masquerade as an Oracle process and
execute any function in any DLL on the file system. What exacerbates this
problem is that, even though communication normally goes over named pipes,
it can be forced to use sockets and can be done remotely. Because of this,
an attacker can write an exploit that connects to the listener/extproc
over TCP and, without ever having to authenticate, run any function in any
library they wish. A real world attack would probably call system()
exported by msvcrt.dll on Windows platforms or exec() or system() exported
by libc on UNIX platforms. Any operating system command passed as a
parameter to these functions would run in the security context of the
account running the oracle processes. On UNIX systems, this is commonly
the "oracle" user and on Windows NT/2000, this is, by default, the local
SYSTEM account. Needless to say that any commands executed as these users
will have dire consequences for the! computer system involved.


Fix information:
There are several things that can be done to help mitigate the risk of
such an attack. The first line of defense is, of course, with the use of a
firewall. No one should be able to access the listener port of 1521 from
the Internet. This not only helps mitigate the risk concerned with this
problem but a slew of others, too.

Moving to the Oracle database server itself, PLSExtproc functionality can
be removed if not needed. To do this remove the relevant entries in
tnsnames.ora and listener.ora. The PLS External Procedure service can have
many different names depending upon the system and Oracle version
installed. This could be icache_extproc, PLSExtproc, or extproc. It is
also suggested that extproc(.exe) be deleted, too, on the off chance that
an attacker, replaces the entries in tnsnames.ora and listener.ora.

If this functionality is required then it is possible to limit the
machines that may access the listener. Whilst this is a trust mechanism
based only on IP address, it does help. The process is called "valid node
checking" and requires a modification to the sqlnet.ora file found in the
$ORACLE_HOME\network\admin directory. Add the entries

tcp.validnode_checking = YES
tcp.invited_nodes = (10.1.1.2, scylla)

Replace 10.1.1.2 or Scylla in this example with the hosts that require
access. Any host not listed here will still be able to make a TCP
connection to the listener but the listener will simply terminate the
connection. Invited nodes should be restricted to machines that require
access.

As another step towards help mitigating the risk, you could set the
listener listening on a non-default port (i.e. not 1521). Whilst this is
not a great solution, as anyone with a TCP port scanner has a highly
likely chance of finding the listener, it still helps.

Finally, on Windows NT/2000 the Oracle processes should not be running as
local SYSTEM. It is suggested that a low privileged account be created and
the Oracle processes run as this user. This account will need to be given
the "Logon as a service" account privilege.

Oracle was alerted to the theoretical vulnerability last summer and
provided with working exploit code in October and are currently
investigating the issue and working on a patch. NGSSoftware and Oracle
have decided to release this advisory in the interim of the patch becoming
available so Oracle customers may take steps to mitigate the risk that may
be posed to their Oracle database servers.


:)
Pagina: 1