<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>oracle-tns-listener-poison-attack &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/oracle-tns-listener-poison-attack/</link>
	<description>Feed of posts on WordPress.com tagged "oracle-tns-listener-poison-attack"</description>
	<pubDate>Sat, 25 May 2013 10:34:26 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Turning off dynamic listener registration on non-RAC systems to protect against "Oracle TNS Listener Poison Attack"]]></title>
<link>http://matthiashoys.wordpress.com/2012/05/24/turning-off-dynamic-listener-registration-on-non-rac-systems-to-protect-against-oracle-tns-listener-poison-attack/</link>
<pubDate>Thu, 24 May 2012 12:09:28 +0000</pubDate>
<dc:creator>matthiashoys</dc:creator>
<guid>http://matthiashoys.wordpress.com/2012/05/24/turning-off-dynamic-listener-registration-on-non-rac-systems-to-protect-against-oracle-tns-listener-poison-attack/</guid>
<description><![CDATA[Environment: Oracle database 11.2.0.3 64-bit, Oracle Linux 6.2 64-bit Oracle recently released a sec]]></description>
<content:encoded><![CDATA[<p><span style="text-decoration:underline;">Environment</span>: Oracle database 11.2.0.3 64-bit, Oracle Linux 6.2 64-bit</p>
<p>Oracle recently released a security alert (CVE-2012-1675) where they warn against a possible &#8220;Oracle TNS Listener Poison Attack&#8221;. There is no real fix, but there are a number of workarounds that you can use to protect your listeners against unauthorised hijacking.</p>
<p>One of the workarounds involves turning off dynamic registration of database instances by the listener service. However, this workaround can only be used for stand-alone, non-RAC installations. For RAC, you can implement secure transports, which are explained in My Oracle Support document 1453883.1 (if you have access to Oracle support).</p>
<p>Dynamic registration is by default turned on in Oracle 11g. To turn it off, there are two things you need to modify in your <em>$ORACLE_HOME/network/listener.ora</em> file:</p>
<p>First, you need to add a description for all the database instances that the listener will handle. If you fail to do this, any clients trying to connect will receive &#8220;<strong>ORA-12154: TNS:could not resolve the connect identifier specified</strong>&#8221; errors after you turned off the dynamic registration.</p>
<p>This is an example for my instance &#8220;oratst.mydomain.com&#8221;:</p>
<pre class="brush: sql; title: ; wrap-lines: false; notranslate" title="">
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = oratst.mydomain.com)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
      (SID_NAME = oratst)
    )
  )
</pre>
<p><span style="text-decoration:underline;">Note</span>: the GLOBAL_DBNAME and SID_NAME can be found by checking the Oracle initialization parameters db_name, db_domain and instance_name.</p>
<p>Next, to turn off dynamic registration, you need to add the following line to the <em>listener.ora</em> file:</p>
<pre class="brush: sql; title: ; wrap-lines: false; notranslate" title="">
DYNAMIC_REGISTRATION_LISTENER = OFF
</pre>
<p>This is how my full <em>listener.ora</em> file now looks like:</p>
<pre class="brush: sql; title: ; wrap-lines: false; notranslate" title="">
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = oracle-tst.mydomain.com)(PORT = 1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = oratst.mydomain.com)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
      (SID_NAME = oratst)
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle

# needed to solve a conflict with the ONS service installed in the OHS home
# see metalink note 284602.1
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER = OFF

DYNAMIC_REGISTRATION_LISTENER = OFF
</pre>
<p>After this, use the listener control utility (lsnrctl) to reload your listener&#8217;s configuration, and check the status of the services and the dynamic registration:</p>
<pre class="brush: sql; title: ; wrap-lines: false; notranslate" title="">
&#62;lsnrctl

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 24-MAY-2012 13:45:49

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Welcome to LSNRCTL, type &#34;help&#34; for information.

LSNRCTL&#62; reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-tst.mydomain.com)(PORT=1521)))
The command completed successfully
LSNRCTL&#62; services
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-tst.mydomain.com)(PORT=1521)))
Services Summary...
Service &#34;oratst.mydomain.com&#34; has 1 instance(s).
  Instance &#34;oratst&#34;, status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      &#34;DEDICATED&#34; established:0 refused:0
         LOCAL SERVER
The command completed successfully
LSNRCTL&#62; show dynamic_registration
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-tst.mydomain.com)(PORT=1521)))
LISTENER parameter &#34;dynamic_registration&#34; set to OFF
The command completed successfully
</pre>
<p><span style="text-decoration:underline;">Note</span>: the status &#8220;UNKNOWN&#8221; is normal when you are not using dynamic registration.</p>
<p>Finally, check if you can still connect to the database using a remote client!</p>
<p>HTH,<br />
Matthias</p>
]]></content:encoded>
</item>

</channel>
</rss>
