RE: Oracle Auditing

From: Erez (schwarz_at_esecurity.co.jp)
Date: 08/03/05

  • Next message: John Alexander: "Re: Is there any way to measure IT Security??"
    To: "'Joe T'" <recommendeddosage@gmail.com>, <pen-test@securityfocus.com>
    Date: Wed, 3 Aug 2005 15:54:23 +0900
    
    

    Joe hi,

    A few things about Oracle and the 'listener' service. It is a process that
    accepts and manages connections from the client to the Oracle database. The
    listener provides the capability to remotely manage the listener. It has
    separate authentication and auditing, it runs as a separate process and it
    accepts commands and performs tasks outside the database. In the past this
    would have allowed a remote user to execute commands like: STOP, RELOAD,
    and SET LOG_FILE on the listener. In response to your second question, there
    are tools that will allow you to interact with the Listener service in this
    way, for example you can find a utility called tnscmd.pl that is freely
    available, that allows you to issue a STOP command and this would 'stop' the
    Listener service - which means that no one could connect to the database.
    This is of course was very undesirable (and of course very dangerous).
    Oracle's response was to issue a patch that updated the listener.ora file
    and added a ADMIN_RESTRICTIONS_listener_name=ON parameter. The
    ADMIN_RESTRICTIONS flag disables the ability of the listener controller to
    set parameters, thereby not allowing remote users to set parameters.
    Unfortunately the default setting when the Listener service is installed is
    OFF! Most of the databases that I have seen have had this setting turned
    'OFF'!!!

    You can find a slightly old explanation on Listener manipulation at:
    http://www.jammed.com/~jwa/hacks/security/tnscmd/tnscmd-doc.html by jwa, he
    also wrote & published the tnscmd tool.

    The explanation by jwa is a bit dated now, but once you start experimenting
    with later versions, you will no doubt discover many very interesting
    reactions and occurrences.

    Also check out the EXTPROC(external procedure) vulnerabilities. This is a
    service that allows PL/SQL packages to load and call functions in operating
    system DLLs and shared libraries . When a call to load a function in an
    external library is made, the Oracle process contacts the Listener process.
    The Listener process in turn connects to the EXTPROC service and passes the
    name of the library and the requested function to it. You may ask how the
    EXTPROC service authenticate the user, well it doesn't!! You can issue
    requests to the Listener process to call functions in the external operating
    system libraries. Oracle responded by changing this functionality in the
    next version 9.2(something). Now all the failed calls would get logged to a
    file. If you enter an overly long string it overwrites the saved return
    address allowing you to execute your own code. Oracle came out with a patch
    to solve this problem as well.
    By the way there are much quicker & easier ways to 'own' an Oracle database
    then attacking the Listener.

    Erez Schwarz

    -----Original Message-----
    From: Joe T [mailto:recommendeddosage@gmail.com]
    Sent: Wednesday, August 03, 2005 12:55 AM
    To: pen-test@securityfocus.com
    Subject: Oracle Auditing

    Good day,

    I should preface this message by saying that I have little to no
    experience with Oracle administration, and I'm looking to gain a bit
    of information.

    When performing some network scans, I notice that the Oracle database
    rarely has a password set for the tnslsnr account. From the Nessus
    scan results, I have learned that the database may be compromised
    because of this null password. I've searched the web, and the majority
    of the information I find talks about a DoS attack for Oracle 8.

    My question becomes: Has anyone exploited this misconfiguration, and
    if so - how? Is this an account that you can connect to without
    expensive Oracle software?

    Also, what other tools do you utilize to audit Oracle?

    Thank you,

    Joe

    ----------------------------------------------------------------------------

    --
    FREE WHITE PAPER - Wireless LAN Security: What Hackers Know That You Don't
    Learn the hacker's secrets that compromise wireless LANs. Secure your
    WLAN by understanding these threats, available hacking tools and proven
    countermeasures. Defend your WLAN against man-in-the-Middle attacks and
    session hijacking, denial-of-service, rogue access points, identity
    thefts and MAC spoofing. Request your complimentary white paper at:
    http://www.securityfocus.com/sponsor/AirDefense_pen-test_050801
    ----------------------------------------------------------------------------
    ---
    ------------------------------------------------------------------------------
    FREE WHITE PAPER - Wireless LAN Security: What Hackers Know That You Don't
    Learn the hacker's secrets that compromise wireless LANs. Secure your
    WLAN by understanding these threats, available hacking tools and proven
    countermeasures. Defend your WLAN against man-in-the-Middle attacks and
    session hijacking, denial-of-service, rogue access points, identity
    thefts and MAC spoofing. Request your complimentary white paper at:
    http://www.securityfocus.com/sponsor/AirDefense_pen-test_050801
    -------------------------------------------------------------------------------
    

  • Next message: John Alexander: "Re: Is there any way to measure IT Security??"

    Relevant Pages

    • Re: 10g listener configuration
      ... files are changed to localhost and I've restarted the listener, ... can't get the database to register with the listener. ... Have you tried on a clean system with a fresh install of the Oracle ...
      (comp.databases.oracle.server)
    • Re: Ora 10.2.0.1, Error ORA-12514
      ... I'm trying to install an Oracle Database version 10.2.0.1, ... If you comment it out then stop & start listener again ...
      (comp.databases.oracle.server)
    • Re: ORA-27101: shared memory realm does not exist
      ... I was able to create and use a database. ... ORA-01034: ORACLE not available ... STATUS of the LISTENER ... Instance "DB1", status UNKNOWN, has 1 handlerfor this service... ...
      (comp.databases.oracle.misc)
    • [NEWS] Vulnerability in Oracle 9i Database Server Leads to Remote Compromise
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Oracle version 9 ... functions exported by operating system libraries or Dynamic Link ... requests that the Listener load the relevant library, ...
      (Securiteam)
    • Re: Slow access to the data base.
      ... "fo" will access the DB without passing through a listener? ... the oracle executable - it is a good example of what to check. ... And that vendor doesn't handle some tcp stuff correctly, ... the database for security reasons hence all connections go through the ...
      (comp.databases.oracle.server)