CIS Sybase ASE 15.0 Benchmark v1.1.0
CIS Sybase ASE 15.0 Benchmark v1.1.0
CIS provides benchmarks, scoring tools, software, data, information, suggestions, ideas, and other services and
materials from the CIS website or elsewhere (“Products”) as a public service to Internet users worldwide.
Recommendations contained in the Products (“Recommendations”) result from a consensus-building process that
involves many security experts and are generally generic in nature. The Recommendations are intended to provide
helpful information to organizations attempting to evaluate or improve the security of their networks, systems and
devices. Proper use of the Recommendations requires careful analysis and adaptation to specific user requirements.
The Recommendations are not in any way intended to be a “quick fix” for anyone’s information security needs.
CIS makes no representations, warranties or covenants whatsoever as to (i) the positive or negative effect of the
Products or the Recommendations on the operation or the security of any particular network, computer system,
network device, software, hardware, or any component of any of the foregoing or (ii) the accuracy, reliability,
timeliness or completeness of any Product or Recommendation. CIS is providing the Products and t he
Recommendations “as is” and “as available” without representations, warranties or covenants of any kind.
User agreements.
By using the Products and/or the Recommendations, I and/or my organization (“we”) agree and acknowledge that:
No network, system, device, hardware, software or component can be made fully secure;
We are using the Products and the Recommendations solely at our own risk;
We are not compensating CIS to assume any liabilities associated with our use of the Products or the
Recommendations, even risks that result from CIS’s negligence or failure to perform;
We have the sole responsibility to evaluate the risks and benefits of the Products and Recommendations to us and
to adapt the Products and the Recommendations to our particular circumstances and requirements;
Neither CIS, nor any CIS Party (defined below) has any responsibility to make any corrections, updates, upgrades or
bug fixes or to notify us if it chooses at it sole option to do so; and
Neither CIS nor any CIS Party has or will have any liability to us whatsoever (whether based in contract, tort, strict
liability or otherwise) for any direct, indirect, incidental, consequential, or special damages (including without
limitation loss of profits, loss of sales, loss of or damage to reputation, loss of customers, loss of software, data,
information or emails, loss of privacy, loss of use of any computer or other equipment, business interruption,
wasted management or other staff resources or claims of any kind against us from third parties) arising out of or in
any way connected with our use of or our inability to use any of the Products or Recommendations (even if CIS has
been advised of the possibility of such damages), including without limitation any liability associated with
infringement of intellectual property, defects, bugs, errors, omissions, viruses, worms, backdoors, Trojan horses or
other harmful items.
CIS hereby grants each user the following rights, but only so long as the user complies with all of the terms of these
Agreed Terms of Use:
Except to the extent that we may have received additional authorization pursuant to a written agreement with CIS,
each user may download, install and use each of the Products on a single computer;
Each user may print one or more copies of any Product or any component of a Product that is in a .txt, .pdf, .doc,
.mcw, or .rtf format, provided that all such copies are printed in full and are kept intact, including without limitation
the text of this Agreed Terms of Use in its entirety.
Retention of intellectual property rights; limitations on distribution.
The Products are protected by copyright and other intellectual property laws and by international treaties. We
acknowledge and agree that we are not acquiring title to any intellectual property rights in the Products and that
full title and all ownership rights to the Products will remain the exclusive property of CIS or CIS Parties. CIS
reserves all rights not expressly granted to users in the preceding sectio n entitled “Grant of limited rights.” Subject
to the paragraph entitled “Special Rules” (which includes a waiver, granted to some classes of CIS Members, of
certain limitations in this paragraph), and except as we may have otherwise agreed in a written agreement with CIS,
we agree that we will not (i) decompile, disassemble, reverse engineer, or otherwise attempt to derive the source
code for any software Product that is not already in the form of source code; (ii) distribute, redistribute, encumber,
sell, rent, lease, lend, sublicense, or otherwise transfer or exploit rights to any Product or any component of a
Product; (iii) post any Product or any component of a Product on any website, bulletin board, ftp server,
newsgroup, or other similar mechanism or device, without regard to whether such mechanism or device is internal
or external, (iv) remove or alter trademark, logo, copyright or other proprietary notices, legends, symbols or labels
in any Product or any component of a Product; (v) remove these Agreed Terms of Use from, or alter these Agreed
Terms of Use as they appear in, any Product or any component of a Product; (vi) use any Product or any component
of a Product with any derivative works based directly on a Product or any component of a Product; ( vii) use any
Product or any component of a Product with other products or applications that are directly and specifically
dependent on such Product or any component for any part of their functionality, or (viii) represent or claim a
particular level of compliance with a CIS Benchmark, scoring tool or other Product. We will not facilitate or
otherwise aid other individuals or entities in any of the activities listed in this paragraph.
We hereby agree to indemnify, defend and hold CIS and all of its officers , directors, members, contributors,
employees, authors, developers, agents, affiliates, licensors, information and service providers, software suppliers,
hardware suppliers, and all other persons who aided CIS in the creation, development or maintenance of the
Products or Recommendations (“CIS Parties”) harmless from and against any and all liability, losses, costs and
expenses (including attorneys' fees and court costs) incurred by CIS or any CIS Party in connection with any claim
arising out of any violation by us of the preceding paragraph, including without limitation CIS’s right, at our
expense, to assume the exclusive defense and control of any matter subject to this indemnification, and in such case,
we agree to cooperate with CIS in its defense of such claim. We further agree that all CIS Parties are third-party
beneficiaries of our undertakings in these Agreed Terms of Use.
Special rules.
CIS has created and will from time to time create special rules for its members and for other persons and
organizations with which CIS has a written contractual relationship. Those special rules will override and supersede
these Agreed Terms of Use with respect to the users who are covered by the special rules. CIS hereby grants each
CIS Security Consulting or Software Vendor Member and each CIS Organizational User Member, but only so long as
such Member remains in good standing with CIS and complies with all of the terms of these Agreed Terms of Use,
the right to distribute the Products and Recommendations within such Member’s own organization, whether by
manual or electronic means. Each such Member acknowledges and agrees that the foregoing grant is subject to the
terms of such Member’s membership arrangement with CIS and may, therefore, be modified or terminated by CIS at
any time.
We acknowledge and agree that these Agreed Terms of Use will be governed by and construed in accordance with
the laws of the State of Maryland, that any action at law or in equity arising out of or relating to these Agreed Terms
of Use shall be filed only in the courts located in the State of Maryland, that we hereby consent and submit to the
personal jurisdiction of such courts for the purposes of litigating any such action. If any of these Agreed T erms of
Use shall be determined to be unlawful, void, or for any reason unenforceable, then such terms shall be deemed
severable and shall not affect the validity and enforceability of any remaining provisions. We acknowledge and
agree that we have read these Agreed Terms of Use in their entirety, understand them and agree to be bound by
them in all respects.
3 |P a g e
Table of Contents
Table of Contents.................................................................................................................................4
Overview...............................................................................................................................................6
Consensus Guidance.......................................................................................................................6
Intended Audience..........................................................................................................................6
Acknowledgements ........................................................................................................................6
Typographic Conventions..............................................................................................................7
Configuration Levels.......................................................................................................................7
Level-I Benchmark settings/actions ........................................................................................7
Level-II Benchmark settings/actions.......................................................................................7
Scoring Status ..................................................................................................................................8
Scorable........................................................................................................................................8
Not Scorable.................................................................................................................................8
Recommendations ..............................................................................................................................9
1. Authentication mechanisms......................................................................................................9
1.1 Select an appropriate authentication mechanism (Level I, Not Scorable) ..............9
1.2 Review the default login (Level I, Scorable).............................................................. 10
1.3 Store password hashes using SHA-256 only (Level I, Scorable) ............................ 11
1.4 Secure the sa account (Level I, Scorable) .................................................................. 12
1.5 Remove unused accounts and change default passwords (Level I, Scorable) ..... 14
1.6 Enforce password complexity (Level II, Scorable)................................................... 15
1.7 Set lockout thresholds (Level II, Scorable)................................................................ 19
1.8 Set a system-wide password expiration (Level II, Scorable).................................. 19
1.9 Set passwords on important roles (Level II, Scorable)............................................ 20
1.10 Use login triggers to validate users’ IP addresses (Level II, Not Scorable) ...... 21
1.11 Conceal Sensitive Input to isql (Level I, Not Scorable) ........................................ 22
2. Network Security Mechanisms .............................................................................................. 23
2.1 Enable Secure Socket Layer (SSL) Encryption (Level II, Scorable) ....................... 23
2.2 Enable message integrity (Level I, Scorable)............................................................ 24
2.3 Enable message confidentiality (Level I, Scorable).................................................. 25
2.4 Enable network password encryption (Level I, Scorable)...................................... 26
2.5 Remote Server Security Settings .................................................................................... 27
2.5.1 Enable password encryption (Level I, Scorable) .................................................. 27
2.5.2 Consider disabling remote access (Level II, Scorable) ........................................ 28
3. Database resource permissions............................................................................................. 29
3.1 General Resources......................................................................................................... 29
3.1.1 Set an appropriate default database for all users (Level I, Scorable)................ 29
3.1.2 Restrict use of set proxy (Level I, Not Scorable)................................................... 30
3.2 Database Users .............................................................................................................. 30
3.2.1 Review use of the guest user in databases (Level II, Scorable).......................... 30
3.3 Data Access..................................................................................................................... 31
3.3.1 Avoid use of grant all (Level I, Not Scorable)................................................ 31
3.3.2 Limit access via procedures, views and triggers (Level II, Not Scorable) ........ 31
3.4 Revoke default permissions for the public role (Level I, Scorable)....................... 32
3.5 Ensure updates to system tables are not permitted (Level I, Scorable) ............... 33
3.5.1 Protect database object text in syscomments (Level I, Scorable)...................... 33
3.6 Encryption settings........................................................................................................... 34
3.6.1 Ensure a strong system encryption password is set (Level I, Scorable)........... 34
3.6.2 Store encryption keys in a separate database (Level II, Scorable) .................... 35
3.6.3 Password protect encryption keys (Level II, Scorable)....................................... 36
4. Auditing, Logging and Reporting Mechanisms.................................................................... 38
4.1 Ensure sufficient space for logs (Level II,Scorable) ................................................. 38
4.2 Enabling resource limits (Level I, Scorable) ............................................................. 38
4.3 Enable auditing (Level I, Scorable) ............................................................................. 39
4.4 Configure multiple audit tables................................................................................... 41
4.5 Periodically review audit settings (Level II, Not Scorable)..................................... 41
4.6 Review audit queue size (Level I, Scorable).............................................................. 41
4.7 Review suspend audit configuration when device is full (Level II, Scorable)...... 42
4.8 Log successful and failed login attempt (Level I, Scorable) .................................... 43
4.9 Monitor Usage Statistics (Level II, Scorable) ............................................................ 44
5. Extensibility Mechanisms ....................................................................................................... 46
5.1 Ensure Java is disabled (Level I, Scorable) ................................................................ 46
5.2 Ensure External File System Access is disabled (Level I, Scorable) ...................... 47
5.3 Extended Stored Procedures........................................................................................... 48
5.3.1 Remove operating system related ESPs (Level II, Scorable) .............................. 48
5.3.2 Remove mail related ESPs (Level II, Scorable) ..................................................... 50
6. Host and Network Deployment ............................................................................................. 52
6.1 Password protect database backups (Level I, Scorable) ......................................... 52
6.2 Ensure the server is physically secure (Level II, Not Scorable) ............................. 53
6.3 Install on a dedicated server (Level I, Not Scorable) ............................................... 53
6.4 Maintain an inventory of all ASE instances (Level I, Not Scorable)....................... 53
6.5 Ensure ASE server names do not disclose sensitive information (Level I, Not
Scorable) ................................................................................................................................... 54
6.6 Remove sample databases if installed (Level I, Scorable) ...................................... 54
6.7 Create separate partitions for programs and data (Level I, Not Scorable) .......... 55
6.8 Run a host and/or network-based packet firewall (Level II, Not Scorable) ........ 55
6.9 Harden host operating system (Level I, Scorable) ................................................... 56
6.10 Ensure restrictive permissions on the Sybase directory (Level I, Scorable) ... 56
6.11 Keep up-to-date with Sybase security patches (Level I, Scorable) .................... 57
6.12 Update the Java Runtime Environment (JRE) regularly if Java is in use (Level II,
Not Scorable)............................................................................................................................ 59
Appendix A: References .................................................................................................................. 61
Appendix B: Change History ........................................................................................................... 62
5 |P a g e
Overview
This guide, Security Configuration Benchmark for Sybase ASE 15.0.x, provides security
configuration guidance for Sybase Adaptive Server Enterprise (ASE). Sybase ASE is an
enterprise-level relational database management system (RDBMS) with support for Java,
file system access and XML services. The following versions of Sybase ASE are in scope in
this guide:
Unless explicitly specified, when the server is referred to simply as “Sybase ASE”, it should
be understood that the setting applies to all version in scope.
The configuration settings in this document represent security best practices for the above
versions only; consequently settings that pertain to remote server interaction should be
reviewed carefully in environments that consist of both older and current versions of
Sybase ASE.
This guide was tested against Sybase ASE 15.0.2 running on Windows 2003 Server R2 and
Fedora Core 10. To obtain the latest version of this guide, please visit http://cisecurity.org.
If you have questions, comments, or have identified ways to improve this guide, please
write us at [email protected].
Consensus Guidance
This guide was created using a consensus review process comprised of volunteer and
contract subject matter experts. Consensus participants provide perspective from a diverse
set of backgrounds including consulting, software development, audit and compliance,
security research, operations, government, and legal.
Intended Audience
This document is intended for system, database, and application administrators, security
specialists, auditors, and help desk personnel who plan to develop, deploy, assess, or
secure solutions that incorporate Sybase ASE 15.
Acknowledgements
The following individuals and organizations have demonstrated a commitment to the IT
security community by contributing greatly to the consensus review of this configuration
guide:
Author
John Heasman, Next Generation Security Software
6 |P a g e
Contributors and Reviews
Barbara Banks, Sybase, Inc.
Rajnish K. Chitkara, Sybase, Inc
Rebecca Heffel, University of Washington
Mike de Libero, MDE Development, LLC
Blake Frantz, Center for Internet Security
Vivek Kandiyanallur, Sybase, Inc.
Alan Madsen, Sybase, Inc.
Christian Monberg, Hornall Anderson, Inc.
Steven Piliero, Center for Internet Security
Chad Thunberg, Leviathan Security Group, Inc.
Typographic Conventions
The following typographical conventions are used throughout this guide:
Convention Meaning
Stylized Monospace font Used for blocks of code, command, and script examples.
Text should be interpreted exactly as presented.
Monospace font Used for inline code, commands, or examples. Text should
be interpreted exactly as presented.
<italic font in brackets> Italic texts set in angle brackets denote a variable
requiring substitution for a real value.
Italic font Used to denote the title of a book, article, or other
publication.
Note Additional information or caveats
Configuration Levels
This section defines the configuration levels that are associated with each benchmark
recommendation. Configuration levels represent increasing levels of security assurance.
7 |P a g e
Scoring Status
This section defines the scoring statuses used within this document. The scoring status
indicates whether compliance with the given recommendation is discernable in an
automated manner.
Scorable
The platform’s compliance with the given recommendation can be determined via
automated means.
Not Scorable
The platform’s compliance with the given recommendation cannot be determined via
automated means.
8 |P a g e
Recommendations
1. Authentication mechanisms
This section provides guidance on the secure configuration of Sybase ASE authentication
mechanisms and password policy recommendations.
Many large organizations will have defined a system-wide password policy in their Policies
and Procedures documents dictating password complexity, expiry and lockout policy. The
job of the database administrator is to ensure that the databases under their control
enforce these policies. For organizations that do not have a rigid policy in place, the
database administrator should enforce a strong policy whilst enabling business
requirements.
For LDAPUA this is accomplished by connecting to the ASE server as a user with the
sso_role and executing the following SQL statement:
For PAMUA this is accomplished by connecting to the ASE server as a user with the
sso_role and executing the following SQL statement:
9 |P a g e
exec sp_configure "enable pam user auth", 2
Audit:
1. Perform the following to determine ASE’s authentication mode:
If the Config Value or Run Value returned for any of the above commands is non-
zero, ASE will authenticate against that provider. If all Config Value and Run Value
are zero, ASE will use Standard auithentication.
Additional References:
1. Further information on authentication mechanisms within Sybase ASE 15 is
contained within the technical whitepaper, Adaptive Server Enterprise Addresses
Application Security Challenges, available at
http://www.sybase.com/content/1030018/ASE_1252_Security_wp.pdf.
This registry key is empty by default, indicating that only domain users with valid
syslogins mappings may login. This setting should be reviewed to ensure that no default
login has been set. If one has been set, its purpose should be fully establ ished before it is
modified in order to prevent disruption to applications and users that may be reliant upon
10 | P a g e
it. If similar functionality is required it can be accomplished by setting up a group within
the Windows domain and creating a mapping within the syslogins table.
Rationale:
Assigning a value to the DefaultLogin registry key means that all users with valid
Windows domain credentials have some level of access to the database. This goes against
the security best practice principle of least privilege.
Remediation:
1. Set the value of the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\SYBASE \Server\ <ServerName> \DefaultLogin to
the empty string (where <ServerName> should be substituted for the name of the
ASE instance).
Audit:
1. Ensure the value of the Registry key
HKEY_LOCAL_MACHINE\SOFTWARE\SYBASE \Server\ <ServerName> \DefaultLogin is set
to the empty string (where <ServerName> should be substituted for the name of the
ASE instance).
The default install setting for new ASE 15.0.2 installations is to store encrypted passwords
as SHA-256 hashes only. ASE servers upgraded to 15.0.2 are set to also store encrypted
passwords using the ASE proprietary algorithm.
Support for the ASE proprietary algorithm facilitates downgrades to older versions of
Sybase ASE. If the System Administrator is certain that the ASE server will not be
downgraded to an earlier version then encrypted passwords should be stored as SHA-256
hashes only.
Note that this configuration setting is not present ASE 15.0 or 15.0.1.
Rationale:
The SHA-256 algorithm is considered more secure than the ASE proprietary algorithm.
Remediation:
1. Connect to the database as a user with the sso_role and execute the following SQL
statement to prevent the storage of encrypted passwords with the ASE algorithm:
11 | P a g e
Audit:
1. Connect to the database as a user with the sso_role and execute the following SQL
statement:
2. For a new master database, the above statement should return the following to
indicate that only SHA-256 is in use:
value message
-------- -----------------------------------------------------
NULL New master database.
3. For an upgraded database, the above statement should return the following to
indicate that only SHA-256 is in use (where <DateTime> is the date and time on
which the allow password downgrade option was set to 0):
value message
-------- ------------------------- ----------------------------
0 Last Password downgrade was allowed on <DateTime>
Sybase recommends using the sa account only for initial database configuration such as
creating other users, devices and databases. It is then recommended that the sa account is
locked.
Set a strong password on the sa account; although the sa account should ultimately
be locked, setting a strong password acts as a mitigating step while the database is
being configured or should it be accidently re-enabled. This may have severe
repercussions as the default password for the sa account is blank.
Create separate user accounts and groups assigning the sa_role, sso_role,
oper_role and sybase_ts_role roles as necessary, following the principle of least
privilege.
12 | P a g e
Remove the sa_role, sso_role, oper_role and the sybase_ts_role from the sa
account.
Lock the sa account
Rationale:
The first attack an intruder is likely to launch against Sybase ASE will be to test whether the
sa account is enabled and whether it has a blank password. If both of these conditions are
true, the attacker has no additional work to do to fully compromise the database.
Furthermore, in many organizations auditing requirements mandate the user of non-
default accounts so that operations can be accurately tracked.
Remediation:
1. Connect to the ASE server as a user with the sa_role and execute the following SQL
statement to set a strong password on the sa account (where <StrongPassword>
should be substituted for a suitable password):
3. Create separate user accounts and groups assigning the sa_role, sso_role,
oper_role and sybase_ts_role roles as necessary, following the principle of least
privilege.
4. Connect to the ASE server as a user with the sso_role and execute the following
SQL statements, ensuring they complete successfully, to strip the sa account of the
sso_role, oper_role and sybase_ts_role roles.
Note that it is essential that other accounts with at least the sa_role and the
sso_role have been created prior to carrying out this and the proceeding step.
5. Connect to the ASE Server as user with the sa_role and executing the following
statement, ensuring it completes successfully, to strip the sa account of the
sa_role.
13 | P a g e
6. Connect to the ASE server as a user with the sso_role and execute the following
SQL statement to lock the sa account:
Audit:
1. To verify that the sa account has a non-NULL password, you must attempt to
connect to Sybase ASE with a NULL password. The syslogins.password field will
not be NULL even if a NULL password is present. This validation step must be
performed prior to locking the sa account. If the account’s lock status is unknown, it
is not feasible to determine if its password is NULL.
2. As an optional step to ensure that a strong password is set, run a password cracking
tool on the encrypted password returned from the query.
3. Connect to the ASE server as a user with the sso_role and execute the following
SQL statement to verify that the sa account does not have privileged roles:
exec sp_displaylogin sa
4. Ensure that the text returned under Configured Authorization does not contain
any roles.
5. Ensure that the text returned by Locked reads YES and that the text returned by
Reason reads Account locked by ASE by manually executing sp_locklogin .
1.5 Remove unused accounts and change default passwords (Level I, Scorable)
Description:
Many Sybase components that interact with ASE create user accounts with weak
passwords such as “Sybase”, “SQL” or the username itself.
It is recommended that default accounts are given passwords that conform to a strong
password policy. Furthermore, accounts that are not in use should be removed. Below is a
list of common accounts to inspect:
probe
14 | P a g e
sybmail
jstask
mon_user
Rationale:
Default passwords present an easy means of compromising a database, even for unskilled
attackers. Even if the targeted user account does not have access to powerful roles or
sensitive data, the attacker need only find a privilege escalation vulnerability to execute a
full compromise.
Remediation:
1. Connect to the ASE server as a user that has select permission on
master.dbo.syslogins (such as a user with the sso_role) and execute the
following SQL statement to retrieve a list of database usernames:
use master
select name from syslogins
2. Set strong passwords on these accounts via the sp_password stored procedure and
ensure all client components that make use of the account are updated to use the
new password.
Audit:
1. Connect to the ASE server as a user that has select permission on
master.dbo.syslogins (such as a user with the sso_role) and execute the
following SQL statement to retrieve a list of database usernames:
use master
select name from syslogins
Setting the login mode to Integrated Mode so that password policy is enforced by
the Windows domain.
15 | P a g e
A configuration parameter to enforce server-wide, per user account and per role
minimum password length (set to 0 by default)
A configuration parameter to enforce at least one digit in a password (disabled by
default)
Sybase ASE 15.0.2 supports the above settings as well as more granular password
complexity via:
In addition, Sybase ASE 15.0.2 supports the creation of a stored procedure to enforce
custom password complexity requirements.
Upgrade systems to ASE 15.0.2 in order to make use of the more extensive password
complexity options.
Enable Integrated Mode to rely on the Windows domain password policy.
Accept the risk associated with the policy conflict and regularly audit password
strength using a password cracking tool.
Rationale:
Arguably the most common cause of database compromise is weak passwords. Setting
password complexity is essential step to ensuring the security and integrity of the data
within the database.
Remediation for ASE 15.0 and 15.0.1:
Perform the following to enable password complexity requirements while operating in
Standard login mode:
1. Connect to the ASE server as a user with the sso_role and execute the following
SQL statement in order to set a system-wide minimum password length according
to your organization’s password (substitute 8 for an acceptable value):
16 | P a g e
2. Set a custom minimum password length for specific users and roles as required.
This should not be less than the system-wide length. This can be accomplished via
the sp_modifylogin stored procedure.
Audit:
Perform the following to audit password complexity requirements while operating in
Standard login mode:
1. Connect to the ASE server (the sso_role is not required) and execute the following
SQL statement to confirm a system-wide minimum password length is enforced:
2. The Config Value and Run Value should represent the desired minimum password
length:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
minimum password length 8 0 8 8 bytes dynamic
3. Verify that important user accounts have a custom minimum password length as
required.
4. Execute the following statement to verify that password require at least one digit:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
check password for digit 0 0 1 1 switch dynamic
17 | P a g e
1. Connect to the ASE server as a user with the sso_role and execute the
sp_passwordpolicy stored procedure. The following options can be used to
configure a password policy in accordance with your organization’s requirements:
disallow simple A value of 1 turns this option on, and a value of 0 turns it off.
passwords
min digits in Indicates the minimum number of digits to be allowed in a
password
password.
min alpha in Indicates the minimum number of alphabetic characters in a
password
password.
min special Indicates the minimum number of special characters allowed in
char in
password
a password.
min upper char Indicates the minimum number of upper case characters
in password
allowed in a password.
min lower char Indicates the minimum number of lower case characters
in password
allowed in a password.
systemwide Indicates the system wide password expiration in days.
password
expiration
password exp Indicates the password expiration warning interval in days.
warn interval
minimum Sets the minimum length of the password.
password length
maximum failed Sets the maximum number of failed logins allowed in a session
logins
before the account is locked.
expire login Specifies that a login status changes to expired status when the
SSO creates a login or a user reset their login. The user will be
required to change their password on their first login.
2. Implement required custom password checks (e.g. to verify the password is not
based on a word associated with your organization) via creating the following
stored procedures in the master database:
sp_extrapwdchecks caller_password, new_password, login_name
sp_cleanpwdchecks, login_name
18 | P a g e
2. Verify that the password policy returned is in accordance with your organization’s
requirements.
The default lockout threshold in Sybase ASE allows unlimited incorrect login attempts. At a
minimum, a global lockout threshold should be set in accordance with your organization’s
password policy. It is recommended that user accounts that have powerful roles such as
sa_role or sso_role should have a stricter threshold set.
Rationale:
Allowing an attacker unlimited attempts to login to an account permits a brute force attack
to proceed unhindered, potentially leading to compromise of the database.
Remediation:
1. Connect to the ASE server with a user that has the sso_role and execute the
following SQL statement (note “5” should be substituted for the lockout threshold
required within your organization):
Audit:
1. Connect to the ASE server (the sso_role is not required) and execute the following
SQL statement:
2. The Config Value and Run Value should represent the desired lockout threshold.
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
maximum failed logins 0 0 5 5 number dynamic
19 | P a g e
It is recommended that a system-wide password expiration is set according to your
organization’s requirements.
Rationale:
Password expiration potentially mitigates the damage from a compromised account. It also
assists in identifying accounts that are no longer in use.
Remediation:
1. Connect to the ASE server with a user that has the sso_role and execute the
following SQL statement to set the system-wide password expiration (substitute 90
for a suitable password expiration value based on your organization’s
requirements):
Audit:
1. Connect to the ASE server (the sso_role is not required) and execute the following
SQL statement to retrieve the system-wide password expiration:
2. The Config Value and Run Value should represent the desired lockout threshold:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
systemwide password expiration 0 0 90 9 0 days dynamic
20 | P a g e
set role " <Role>" with password "<Password>"
Audit:
1. Connect to the ASE server with a user that has the select permission on the
master.dbo.syssrvroles table (e.g. a user with the sa_role) and execute the
following SQL statement:
use master
select name from syssrvroles where password = NULL
2. The role names returned do not currently have a password set. Ensure that this is
acceptable.
1.10 Use login triggers to validate users’ IP addresses (Level II, Not Scorable)
Description:
Sybase ASE supports login triggers; these execute a specified stored procedure every time a
user logs in. Login triggers can be used to carry out additional verification steps such as
checking the IP address that the user is logging in from is as expected.
Note: Global login triggers are available on ASE 15.0.2 and greater.
Rationale:
Login triggers can provide an additional layer of security through verification of criterion
such as IP address. Note that the IP address may be subject to spoofing or may indicate a
compromised client and as such should not be exclusively relied upon.
Remediation:
1. Connect to the ASE server with a user that has the sso_role and execute the
following SQL statement where <Login_Name> should be substituted for the
username on which the login trigger will fire and <Sproc_Name> for the specific
stored procedure. If <Login_Name> is set to NULL, a global login trigger is registered
(i.e. for all users). Global login triggers can also be set via the sp_logintrigger
stored procedure.
Note that the stored procedure registered as a login trigger must be available in the user’s
default database since Sybase ASE searches the sysobjects table in the user’s default
database in order to find the login trigger object.
Audit:
21 | P a g e
1. Connect to the ASE server with a user that has the sso_role and execute the
following SQL statement where <Login_Name> should be substituted for the
username for which the login trigger status is being determined:
2. Verify that the “Auto Login Script” value returned contains the expected stored
procedure name.
3. Determine the presence of a global login trigger via connecting to the ASE Server
with a user that has the sso_role and executing the following SQL statement:
exec sp_logintrigger
4. Verify that the stored procedure name returned is as expected and its status is set
to “Enabled”.
Audit:
1. Verify the isql sessions make use of the --conceal command line argument.
Additional References:
1. Further information on the –conceal option may be found in the New Features Open
Server 15.0 and SDK 15.0 for Microsoft Windows, Linux, and UNIX document
22 | P a g e
available at
http://infocenter.sybase.com/help/topic/com.sybase.dc20155_1500/pdf/newfesd.
pdf.
2.1 Enable Secure Socket Layer (SSL) Encryption (Level II, Scorable)
Description:
Sybase ASE supports SSL encryption as a means of ensuring confidentiality between clients
and servers. SSL is a widely accepted standard for securing the transmission of sensitive
information, such as credit card numbers, stock trades, and banking transactions over the
Internet. It relies on public-key cryptography and allows the client and server to negotiate
a mutually acceptable cipher.
Sybase ASE 15.0.2 also supports the NIST-approved AES algorithm and new options for
setting cipher suite preference via the sp_ssladmin stored procedure.
3. Connect to the ASE server as a user with the sso_role and execute the following
SQL statement to enable SSL:
23 | P a g e
exec sp_configure "enable ssl", 1
5. Use sp_ssladmin stored procedure to add a certificate to the certificates file. See
“Administering certificates”.
6. Execute the following SQL statement to enforce strong cipher suites (note ‘strong’
should be substituted for ‘FIPS’ if your organization mandates the use of FIPS-
compliant algorithms):
Audit:
1. Connect to the ASE server (the sso_role is not required) and execute the following
SQL statement to verify that SSL is enabled:
3. Execute the following SQL statement to retrieve the configured cipher suite
preference:
4. Ensure that the ciphers returned are acceptable. If no ciphers are returned then
cipher preference has not been set and Sybase will use the default ciphers.
24 | P a g e
Rationale:
Enabling message integrity prevents an attacker positioned between the client and the
server from intercepting and modifying messages.
Remediation:
1. Connect to the database as a user with the sso_role and execute the following SQL
statement to enable message integrity.
Audit:
1. Connect to the database (the sso_role is not required) and execute the following
SQL statement:
exec sp_configure "msg integrity reqd"
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
msg integrity reqd 0 0 1 1 switch dynamic
Audit:
25 | P a g e
1. Connect to the database (the sso_role is not required) and execute the following
SQL statement:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
msg confidentiality reqd 0 0 1 1 switch dynamic
There are three possible settings for the value of the net password encryption reqd
configuration parameter:
0 – This setting allows the client to choose the encryption types, including no
encryption. This is the default settings.
1 – This setting causes the server to permit either the older proprietary ASE
encryption or the RSA algorithm only.
2 – This setting causes the server to permit only the RSA algorithm.
If all client applications within your organization support the RSA algorithm (i.e. they use
client libraries accompanying ASE 15.0.2 or are RSA algorithm aware) then it is
recommended that setting 2 is enabled, otherwise it is recommended that setting 1 is
enabled.
Rationale:
Enabling network password encryption prevents an attacker positioned between the client
and the server from sniffing the password during the login process. The RSA algorithm is
preferred over the proprietary ASE algorithm since RSA is a widely accepted and analyzed
algorithm.
Remediation:
1. Connect to the database as a user with the sso_role and execute the following SQL
statement to set the network password encryption to 2:
26 | P a g e
exec sp_configure "net password encryption reqd", 2
Audit:
1. Connect to the database (the sso_role is not required) and execute the following
SQL statement:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
net password encryption reqd 0 0 2 2 switch dynamic
The net password encryption should be set to true for each remote server.
Rationale:
An attacker that is able to sniff the traffic between two servers would be able to capture
passwords that are sent in plain text.
27 | P a g e
Remediation:
1. Connect to the database as a user with the sso_role and execute the following SQL
statement (where <ServerName> represents the name of the remote server for
which password encryption will be enabled):
Audit:
1. Connect to the database (the sso_role is not required) and execute the following
SQL statement (where <ServerName> represents the name of the remote server for
which password encryption is being audited):
2. The status returned should contain the string net password encryption:
The Sybase System Administrator Guide for ASE 15.0, Volume 1 Chapter 5 claims:
Since other system administration actions are required to enable remote servers other than
Backup Server to execute RPCs, leaving this option set to 1 does not constitute a security risk.
Nonetheless, if communication with remote servers including the Backup Server is not
required then this configuration parameter can be set to 0 to disable server-to-server RPC.
Rationale:
Disabling remote access will reduce the remote attack surface of system.
Remediation:
1. Connect to the database as a user with the sso_role and execute the following SQL
statement to disable server-to-server RPC:
28 | P a g e
exec sp_configure 'allow remote access ', 0
Audit:
1. Connect to the database (the sso_role is not required) and execute the following
SQL statement:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
allow remote access 1 0 0 0 switch dynamic
use master
select name, dbname from syslogins where dbname = 'master'
2. For each user that has a default database of master, that does not have the sa_role
and/or the sso_role (role membership can be determined via the
sp_displaylogin stored procedure), execute the following SQL statement to modify
their default database. <Login> should be substituted for the appropriate username
and <Database> for the new default database to be set.
29 | P a g e
exec sp_modifylogin <Login>, defdb, <Database>
Audit:
1. Connect to the ASE server as a user that has select permission on syslogins (e.g a
user with the sa_role) and execute the following SQL statement to retrieve the list
of users that currently have a default database of master:
use master
select name, dbname from syslogins where dbname = 'master'
2. Ensure that the only users returned have the sa_role and/or the sso_role.
3.2.1 Review use of the guest user in databases (Level II, Scorable)
Description:
Adding a guest entry to the sysusers table of any database effectively permits any database
user to use the database with the permissions of the guest user (which by default inherits
the permissions of the public role).
Rather than using the guest user it is recommended that roles be set up within Sybase ASE
to facilitate multiuser access to databases.
Rationale:
30 | P a g e
Adding a guest entry to a database goes against the security best practice principle of least
privilege and makes it harder to audit operations.
Remediation:
1. Identify the databases that contain a guest user.
3. Either grant each user specific access to each database as required or create
appropriate roles and grant each role specific access to each database.
Audit:
1. Connect to the database as a user with the sa_role and execute the following SQL
statement to determine which databases contain a guest entry in their sysusers
table:
Remediation:
1. Use specific grant statements to assign the required privileges.
Audit:
1. Regularly review assigned privileges via the sp_helprotect stored procedure.
3.3.2 Limit access via procedures, views and triggers (Level II, Not Scorable)
Description:
Sybase ASE supports views and stored procedures as security mechanisms, allowing a user
(role or group) to be granted permission on a view or on a stored procedure even if they
have no permissions on objects the view or procedure references.
31 | P a g e
Rationale:
By defining different views and stored procedures and selectively granting permissions on
them, a user (or any combination of users) can be restricted to different subsets of data
allowing for a granular implementation of security requirements.
Remediation:
1. Identify the subsets of data that should be accessible to particular users. Implement
views and triggers as described in Sybase ASE System Administration Guide, Volume
1, chapter 17.
Audit:
1. Periodically review the user (role and group) requirements for access to data
updating the views and triggers appropriately.
3.4 Revoke default permissions for the public role (Level I, Scorable)
Description:
By default, the public role has select permission on many system tables, including the
syslogins table in the master database (though not on the password column).
Since all database users have the public role it is recommended that these permissions
are revoked from all databases.
Rationale:
Low privileged database users can glean useful information from system tables such as
account names and lockout status.
Remediation:
1. Connect to the ASE server as a user with the sa_role and execute the following SQL
statement for each database listed in sysdatabases (where <Database> should be
substituted for the appropriate database name). For the complete list of tables that
this command affects, see the description of the revoke command in the Sybase ASE
Reference Manual: Commands.
Note that the tables affected differ depending on whether the database is the master
database or not.
use <Database>
revoke default permissions on system tables
Audit:
32 | P a g e
1. Connect to the ASE server as a user with the sa_role and execute the following SQL
statement for each database listed in sysdatabases.
use <Database>
exec sp_helprotect
2. Ensure that public does not have select permission on any system tables.
3.5 Ensure updates to system tables are not permitted (Level I, Scorable)
Description:
Sybase ASE can protect system tables from direct or accidental alteration through SQL
queries via the allow updates to system tables configuration parameter.
This setting is enabled by default. It is recommended that this setting is re-enabled if it has
been disabled.
Rationale:
An attacker with sufficient privilege can re-enable direct updates to system tables, but this
configuration setting should protect against accidental alterations and will aid the audit
trail.
Remediation:
1. Connect to the ASE server as a user with the sso_role and execute the following
SQL statement:
Audit:
1. Connect to the ASE server (the sa_role is not required) and execute the following
SQL statement:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
allow updates to system table s 0 0 0 0 switch dynamic
33 | P a g e
The syscomments table contains the source code for business logic implementation such as
stored procedures. It also contains the text of views, triggers, default table constraints, and
procedures. By default the public role has select permission on this system table.
Audit:
1. Connect to the database (the sso_role is not required) and execute the following
SQL statement:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
select on syscomments.text 1 0 0 0 switch dynamic
This section contains best practice recommendations for configuring Sybase ASE
encryption settings.
34 | P a g e
It is the responsibility of the System Security Officer to set a strong system encryption
password. This password is used to generate a 128-bit key-encrypting key, which in turn is
used to encrypt column encryption keys (created by users with the create encryption
key privilege).
Rationale:
Setting a weak system encryption password facilitates the decryption of column encryption
keys and ultimately the data itself.
Remediation:
1. Connect to the ASE server as a user with the sso_role and execute the following
SQL statement to set a system encryption password (where <Password> should be
substituted for the strong system encryption password). Note that support for
encrypted columns must be enabled before the system encryption password can be
set.
Audit:
1. Connect to the ASE server as a user with the sso_role and execute the following
SQL statement to determine if a system encryption password is set.
35 | P a g e
create encryption key <Database>.<Owner>.<KeyName>
Audit:
1. Connect to the ASE server as a user with the sso_role and execute the following
SQL statements to verify that the database holding encrypted data does not contain
encryption keys (where <Database> should be substituted for the database holding
encrypted data).
use <Database>
exec sp_encryption helpkey
2. Verify that the text There are no encryption keys (key copies) like '%' in
'<Database>' is returned, indicating that the database holds no encryption keys.
Audit:
1. Connect to the ASE server as a user with the sso_role and execute the following
SQL statement to verify that passwords are set on each encryption key within the
36 | P a g e
specified database (where <Database> should be substituted for the database
holding encryption keys).
use <database>
go
2. Verify that none of the keys reported by this command contain “System Encr
Passwd” in the column “Type of Password”.
37 | P a g e
4. Auditing, Logging and Reporting Mechanisms
The auditing of security related events and the periodic analysis or alert-based monitoring
of audit logs are essential operations in order to detect ongoing and past database attacks,
both successful and unsuccessful. Though signature and anomaly-based intrusion
detection systems can be useful, they are often unable to detect customized attacks.
Consequently the most useful audit log is often likely to be on the database itself, provided
at least basic auditing has been configured.
This section provides guidance on the recommended configuration of the auditing options
within Sybase ASE.
It is recommended that this setting is enabled to mitigate against denial of service and data
mining attacks. This setting should be thoroughly tested on non-production servers to
ensure that it does not interfere with normal application behavior.
Rationale:
Resource limiting may be a useful defense against potential attacks aimed at denial of
service or data mining attacks (e.g. through SQL Injection).
38 | P a g e
Remediation:
1. Connect to the ASE server as a user with the sa_role and execute the following SQL
statement to enable resource limits. Note that the ASE Server must be restarted for
this configuration to take effect.
Audit:
1. Connect to the ASE server (the sa_role is not required) and execute the following
SQL statement:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
Allow resource limits 0 #4 1 1 switch static
In addition, audit settings should also be configured to detect significant departures from
typical business use such as execution of unused stored procedures as well as the creation
and modification of database objects. This may mean auditing GRANT, DROP and CREATE
actions as well.
39 | P a g e
Remediation:
1. Install the auditing functionality. This is a multistage process involving the
following steps:
2. Connect to the ASE server as a user with the sso_role and execute the following
SQL statement to enable auditing of security-related events, errors and login
attempts:
2. The Config Value and Run Value returned should be 1 indicating that auditing is
enabled:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
auditing 0 0 1 1 switch dynamic
40 | P a g e
3. Connect to the ASE server as a user with the sso_role and execute the following
SQL statement for each of actions that should be audited, where <Option> should be
substituted for the appropriate audit options (e.g. login), <Login> should be
substituted for the appropriate login scope (e.g. all) and <Object> should be
substituted for the appropriate object scope (e.g. all):
4. Verify that the text returned indicates the audit setting is on.
The default value is 100 audit records (approximately 42K of memory). If an attacker is
able to trigger a crash while an audit record is stored in memory but has not been written
to disk, the audit record will likely be lost (it may, however, be stored in a crash dump
depending on the system configuration).
41 | P a g e
It is recommended that this setting is reviewed; the default value of 100 is likely to be
sufficient for most organizations although depending on the nature of the data stored in the
database, this value could be reduced.
It should be noted that decreasing this value is likely to have an effect on performance,
especially on a system that is under heavy use and that generates a significant number of
audit events.
Rationale:
If this value is set high, an attacker may be able to cover their tracks by triggering a crash.
Remediation:
1. Connect to the ASE server as a user with the sso_role and execute the following
SQL statement to set the audit queue size to 100 (modify 100 as per your
organization’s requirements):
Audit:
1. Connect to the ASE server (the sso_role is not required) and execute the following
SQL statement:
2. The Config Value and Run Value returned should be 100 (or your organization’s
requirements):
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
audit queue size 100 104 100 100 number dynamic
4.7 Review suspend audit configuration when device is full (Level II, Scorable)
Description:
Sybase ASE is configured by default to suspend auditing when the device is full. This is
controlled via the suspend audit when device full configuration parameter. suspend
audit when device full is enabled by default.
If this option has been disabled (i.e. database operations continue when the audit device is
full), older events will be overwritten which could allow an attacker to mask evidence of an
attack.
Note that this is a potentially disruptive setting as it will suspend the audit process and all
user processes that cause an auditable event when the audit device is full. To resume
42 | P a g e
normal operation, an administrator with the sso_role must log in and set up an empty
table as the current audit table.
It is advised that this configuration is enabled for databases where maintaining an accurate
audit trail is more important than the database availability. If this setting is enabled, it is
recommended that audit device resources are checked regularly.
Rationale:
Enabling this configuration will ensure that an attacker cannot simply overwrite audit logs
by submitting a large number of events.
Remediation:
1. Connect to the ASE server as a user with the sso_role and execute the following
SQL statement:
Audit:
1. Connect to the ASE server (the sso_role is not required) and execute the following
SQL statement.
2. The Config Value and Run Value returned should be 1 indicating auditing will be
suspended when the audit device is full:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
suspend audit when device full 1 0 1 1 switch dynamic
It is recommended that both successful and failed login attempts are logged to the
Windows Event Log in addition to the standard Sybase audit trail.
Rationale:
Logging key events such as successful and failed login attempts to multiple places (i.e. the
Windows Event Log and the Sybase audit tables) means that there is less likelihood of an
attacker being able to cover their tracks in the event of a compromise.
43 | P a g e
Remediation:
1. Connect to the ASE server as a user with the sso_role and execute the following
SQL statements:
Audit:
1. Connect to the ASE server (the sso_role is not required) and execute the following
SQL statement:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
log audit logon failure 0 0 1 1 switch dynamic
3. Connect to the ASE server (the sso_role is not required) and execute the following
SQL statement:
Parameter Name Default Memory Use d Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
log audit logon success 0 0 1 1 switch dynamic
44 | P a g e
of statistics in order to be able to draw comparisons and thus determine abnormal
behavior.
Remediation:
1. Connect to the ASE server as a user with the sa_role and execute the following SQL
statement:
exec sp_reportstats
2. Once statistics have been recorded, a new accounting period should be initiated.
Connect to the ASE server as a user with the sa_role and execute the following SQL
statement:
exec sp_clearstats
Audit:
1. Ensure that there is a procedure to regularly review, record and clear server usage
statistics.
45 | P a g e
5. Extensibility Mechanisms
This section provides guidance on securing the extensions mechanism present within
Sybase that allow interaction with the operating system, network and file system
resources.
Java access in Sybase ASE cannot be configured on a per user basis; it is either available to
all users, or to none. It is disabled by default and it is recommended that it is not enabled
unless absolutely necessary. Note that only users with the sa_role can enable Java.
Rationale:
Java in ASE is a powerful target for an attacker since they can use it to interact with file
system and network resources. With Java disabled, the potential for gaining a foothold on
the host operating system and/or network is reduced.
Remediation:
1. Connect to the ASE server with a user that has the sa_role and execute the
following SQL statement:
Audit:
1. Connect to the ASE server with a user that has the sa_role and execute the
following SQL statement:
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
enable java 0 0 0 0 switch static
46 | P a g e
5.2 Ensure External File System Access is disabled (Level I, Scorable)
Description:
Sybase ASE contains functionality for interacting with the file system through the creation
of "proxy tables". This functionality is implemented by the Component Integration Service
(CIS) and is accessed via standard Transact-SQL commands. It allows files and directories
to be created, deleted, written to and queried.
By default only users with the sa_role or the sso_role can create proxy tables that map to
files or directories. It is nonetheless recommended that external file system access is
disabled.
Rationale:
Though an attacker would need to have compromised an account with the sa_role or sso
role in order to create new proxy tables via External File System Access, this functionality,
if not in use, should be disabled as a defense in depth measure. This functionality could be
abused to modify operating system configuration files or create files that would allow an
attacker to run code in another process.
Remediation:
1. Connect to the ASE server with a user that has the sa_role and execute the
following SQL statement:
4. Connect to the ASE server with a user that has the sa_role and execute the
following SQL statement:
Audit:
1. Connect to the ASE server (the sa_role is not required) and execute the following
SQL statement:
47 | P a g e
exec sp_configure 'enable cis'
Parameter Name Default Memory Used Config Value Run Value Unit Type
------------------------------ ----------- ----------- ------------ ------------ -------------------- ----------
enable cis 1 0 0 0 switch static
Parameter Name Default Memory Used Config Value Run Value Unit Type
-------------------------- ---- ----------- ----------- ------------ ------------ -------------------- ----------
enable file access 0 0 0 0 switch dynamic
The operating system user context under which the command executes is controlled by the
xp_cmdshell context configuration parameter. Though by default, this is set to only
permit execution by users with System Administration privileges at the operating system
level, it should be noted that this is insufficient since an attacker who compromised an
account with the sa_role could reconfigure the configuration parameter so that
xp_cmdshell executes commands under the user context that the database server itself is
running as.
48 | P a g e
By default, execution of the xp_cmdshell ESP is restricted to users with the sa_role. It is
recommended that it is removed, along with the other operating system related ESPs;
xp_freedll, xp_logevent (Windows only) and xp_enumgroups (Windows only).
Furthermore the library that houses each of these ESPs, sybsyesp.dll (Windows) or
sybsyesp.so (Unix), should be deleted from the file system to prevent them from being
recreated by an attacker.
Rationale:
The xp_cmdshell ESP provides a clear path for privilege escalation from the database to the
operating system. An attacker could use this functionality in conjunction with a SQL
injection attack to gain a foothold on the database host using it as a launch pad to
compromise other systems. If this ESP is not used, it is prudent to therefore remove it.
Remediation:
1. Connect to the ASE server with a user that has the sa_role and execute the
following statements:
If the above statements return “Access is denied”, stop the ASE server and repeat the
command.
On Unix systems, execute the following command from a command shell (assuming
the SYBASE environment variables have been set):
49 | P a g e
On Unix systems it may be necessary to stop and restart the ASE server for the
changes to take effect.
Audit:
1. Connect to the ASE server as a user with the select permission on
sybsystemprocs.dbo.sysobjects (e.g. a use with the sa_role) and execute the
following SQL statements:
use sybsystemprocs
go
select * from sysobjects where type='XP' and name= 'xp_cmdshell' or
name='xp_freed ll' or name='xp_logevent ' or name='xp_enumgroups '
On Unix systems, execute the following command from a command shell (assuming
the SYBASE environment variables have been set):
4. The above statement should return “File Not Found” (Windows) or “No such file or
directory” (Unix).
50 | P a g e
Rationale:
The email ESPs provide an attacker with suitable privileges additional means of
communicating with other systems on the network and exfiltrating data. Given that ESPs
have previously had a number of associated security flaws it is prudent to remove those
that are not in use.
Remediation:
1. Connect to the ASE server with a user that has the sa_role and execute the
following query:
3. If the above statement returns “Access is denied”, stop the ASE server and repeat the
command.
Audit:
1. Connect to the ASE server as a user with the select permission on
sybsystemprocs.dbo.sysobjects and execute the following SQL statements:
use sybsystemprocs
go
select * from sysobjects where type='XP' and name='xp_sendmail' or
name='xp_readmail' or name='xp_deletem ail' or name='xp_findnextmsg' or
name='xp_startmail ' or name='xp_stopmail'
51 | P a g e
6. Host and Network Deployment
The section provides guidance on configuring the host, network and environment for a
secure deployment of Sybase ASE.
Audit:
1. For the purposes of verifying that database dumps are password protected, the
load database command should be used with the headeronly parameter. This
parameter displays causes header information to be returned but does not load the
database. Connect to the ASE server with a user that has the sa_role, the oper_role
or is a database owner and execute the following statement for each database dump
(where <File> should be substituted for the full path to the database dump):
2. Verify that the only partial header information is returned along with the message:
Dump is password-protected, a valid password is required.
52 | P a g e
6.2 Ensure the server is physically secure (Level II, Not Scorable)
Description:
The Sybase ASE server should be in located in a secure environment to prevent
unauthorized physical access to the machine.
Rationale:
It is generally accepted that physical access to a system results in its compromise even if
the attacker has been granted no privileges or permissions on the target system.
Remediation:
1. Follow best practice recommendations for physical security and physical access
control.
Audit:
1. Verify that the physical security and physical access control meets an acceptable
standard.
2. Periodically perform network sweeps to identify listening Sybase ASE servers that
are not present in the inventory.
53 | P a g e
6.5 Ensure ASE server names do not disclose sensitive information (Level I, Not
Scorable)
Description:
When naming ASE server instances, ensure that no reference is made to version numbers
or other sensitive information.
Rationale:
Version or other sensitive information in the server name makes it easier for an attacker to
develop an attack strategy against the server.
Remediation:
1. When configuring ASE instances, follow a naming convention that does not include
version numbers or other sensitive information.
Audit:
1. Ensure no ASE instances include information deemed sensitive.
use master
select name from sysdatabases where name = 'pubs2' or name = 'pubs3' or
name = 'images' or name = 'jpubs' or name = 'interpubs '
2. Execute the following SQL statement for each database name returned in the query
(where <Database> should be substituted for the appropriate database name):
Audit:
1. Connect to the ASE server as a user with the sa_role and execute the following SQL
statements to determine which sample databases are present:
54 | P a g e
use master
select name from sysdatabases where name = 'pubs2' or name = 'pubs3' or
name = 'images' or name = 'jpubs' or name = 'interpubs '
6.7 Create separate partitions for programs and data (Level I, Not Scorable)
Description:
It is recommended that separate partitions are created for:
6.8 Run a host and/or network-based packet firewall (Level II, Not Scorable)
Description:
Sybase ASE can be configured to listen on a variety of network transports. By default it will
listen on TCP and named pipes. Though the default TCP port is 5000, if there are multiple
server instances running on a single host, there will be multiple listening ports. Dynamic
listeners can also be set up via the sp_listener stored procedure.
55 | P a g e
network, and to protect the rest of the network from the database servers in the event of a
compromise.
Remediation:
1. Run a host and/or network-based packet firewall to limit access to the database
server port based on IP address.
Audit:
1. Verify that the firewall rules are suitably restrictive.
Installing Sybase ASE to the default directory typically permits standard authenticated
users to read all files in the directory, potentially exposing sensitive information if the
databases themselves are located there. Furthermore, the default permissions also allow a
standard authenticated user to write new files in the directory. Note that users would need
sufficient privilege to logon to the system locally or remotely via Terminal Services.
56 | P a g e
The NTFS permissions on the installation directory should be reviewed and modified if
necessary ensure that only Administrators and the user that the Sybase ASE server is
configured to run as (typically NT AUTHORITY\SYSTEM) have full control of the directory and
that all others users have no permissions on the folder.
Note that removing permissions for a particular user is likely to impact that user’s ability to
run standard database connectivity tools such as isql.exe. It is recommended that
modifications to permissions are extensively tested on non-production systems first.
Rationale:
Weak NTFS permissions may allow a standard domain user to access sensitive data or
elevate privilege.
Remediation:
1. Open a command prompt and execute the following command to remove standard
user access to the Sybase directory. Repeat this command specifying appropriate
usernames/groups until only Administrators and the user that the Sybase ASE
server runs as have permissions on the directory.
2. The above command should return “processed dir: C:\sybase” (or an appropriate
path if Sybase is installed elsewhere). If an error is returned, consult the cacls
documentation.
Audit:
1. Open a command prompt and execute the following command to retrieve the NTFS
permissions on the Sybase directory:
cacls %SYBASE%
2. Ensure that only Administrators and the user that the Sybase ASE server runs as
have full control of the folder and that no other users have permissions on the
folder.
57 | P a g e
Updates to Sybase ASE come in the following forms:
Emergency Bug Fixes (EBFs) are released to correct the flawed component. The
accompanying documentation will typically state the severity of the issue (e.g.
Sybase views this as a mandatory correction that you should implement
immediately).
Interim Releases (IRs) are minor releases that introduce new features and
enhancements, incorporating previous ESDs.
Notification of upcoming patches and possible security threats from third party
components is often announced as an Urgent Notice. Urgent Notices may be
downloaded from the Sybase support site.
Occasionally details of vulnerabilities for which no patch exists may surface on security
mailing lists such as Bugtraq or Full Disclosure. It is therefore recommended that these
lists are regularly monitored. It may be preferable to set up keyword filters for “Sybase”
since these lists carry a high volume of traffic.
EBFs, ESDs and IRs should be installed in a timely manner subject to your organization’s
patching policy and only after they have been fully tested on non-production servers.
Rationale:
It is important to keep up-to-date with patches to ensure the security and integrity of the
data within the database. Privilege escalation vulnerabilities could be used directly via low
privileged users or indirectly via application flaws such as SQL injection to compromise the
database and gain a foothold on the host operating system.
Remediation:
1. Download and install the latest EBFs/ESD/IR from the Sybase download site.
Audit:
1. Connect to the ASE server (a privileged role is not required) and execute the
following SQL query to retrieve the version number and the ID of the most recently
applied EBF:
select @@version
58 | P a g e
2. Ensure the version number matches the latest IR and the most recent EBF/ESD is
applied via cross-checking with the information provided at the Sybase download
site.
Additional References:
1. An online archive of the Bugtraq mailing list is available at
http://www.securityfocus.com/archive/1.
2. An online archive of the Full Disclosure mailing list is available at
http://seclists.org/fulldisclosure/.
3. The Sybase support site is located at http://www.sybase.com/support/techdocs.
4. The Sybase download site is located at http://www.sybase.com/downloads.
6.12 Update the Java Runtime Environment (JRE) regularly if Java is in use
(Level II, Not Scorable)
Description:
Sybase ASE supports interaction with Java through standards such as JSQL. Sun
Microsystems JRE implementation is installed by default although a user with the sa_role
must enable Java before it can be used in the database.
Sun Microsystems regularly ship updated versions of the JRE to resolve security issues.
Whilst many of these updates address technologies that have no bearing on Sybase (such as
Java applets), some updates address security flaws in core JRE classes.
2. Open a command prompt and execute the following command to make a backup of
the existing JRE installation folder:
3. Open a command prompt and execute the following command to delete the existing
JRE installation folder. Press ‘Y’ to confirm deletion after thoroughly checking the
path has been typed as shown below:
C:\>rmdir /S "%SYBASE%/_jvm"
59 | P a g e
4. If the above command fails, stop the Sybase ASE server and execute the command
again.
5. Run the downloaded JRE installer. Select the Advanced Installation Options check
box and configure the following options:
6. Complete the JRE installation process and restart the Sybase ASE server if it was
stopped in step 4.
Audit:
1. Open a command prompt and execute the following command to retrieve the
version of the JRE current in use:
2. Ensure that this is the most up-to-date version by cross-checking it with the Java
download site.
Additional References
1. The Java download site is located at
http://java.sun.com/javase/downloads/index.jsp.
60 | P a g e
Appendix A: References
1. Network Intelligence India Pvt. Ltd. (2003). Guide to Sybase Security. Available:
http://www.niiconsulting.com/innovation/Sybase.pdf. Last accessed 17 July 2009.
2. Sybase, Inc. (2009). Sybase System Administration Guide, Volumes 1 & 2. Available:
http://manuals.info.apple.com/en_US/Enterprise_Deployment_Guide.pdf. Last accessed 17
July 2009.
3. David Litchfield, Chris Anley, John Heasman, Bill Grindlay (2005). The Database
Hacker’s Handbook. USA: Wiley.
4. International Sybase User Group (2006). ISUG Sybase ASE FAQ. Available:
http://www.isug.com/Sybase_FAQ/ASE/index.html. Last accessed 17 July 2009.
61 | P a g e
Appendix B: Change History
Date Version Changes for this version
9/1/2009 1.0.0 Public release
December 31, 2011 1.1.1 Resolved technical error available here
62 | P a g e