Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Tenable Blog

Subscribe

Auditing Linux, Apache, & MySQL Against CIS Benchmarks

Stacking Up to CIS Benchmarks

The Center for Internet Security (CIS) establishes consensus benchmarks for a large variety of applications and operating systems. These benchmarks are a valuable aid to evaluate the security of your systems. Tenable has produced a number of Nessus audit files that have been certified by the Center for Internet Security to perform audits against the CIS standards. These audit files are available to ProfessionalFeed and Security Center customers through the the Tenable Support Portal.
To use these audit files, you will need to provide Nessus with credentials to login to the target host to compare the configuration against the CIS standards. Scans that use login credentials run much faster than network-based scans and the results often provide more detailed vulnerability
findings and information on configuration issues.

The audit files I used for this scan are:

    • CIS_MySQL_4.1_5.1_Benchmark_v1.0.1.audit

  • CIS_Apache_v2_1.audit

  • CIS_Redhat_ES5_1_1.audit

The above audit files correspond to the published CIS benchmarks. You can obtain these benchmark documents by registering on the Center For Internet security web site. The audit files are loaded into the NessusClient and the scan policy is configured accordingly (please refer to the Nessus 4.0 Users Guide for more information).

Note

The target system in this example is actually running CentOS 5.2. CentOS mirrors the Red Hat distributions libraries and most of its configuration. The CIS Apache configuration checks expect the Apache software to reside in /usr/local/apache2 , which is not where it resides on CentOS. To rectify this problem we can use some simple Linux commands to create a symbolic link that allows the compliance checks to find the Apache configuration:


# mkdir /usr/local/apache2
# mkdir /usr/local/apache2/conf
# ln -s /etc/httpd/conf/httpd.conf /usr/local/apache2/conf/httpd.conf

Setting up Nessus for Compliance Checking

The NessusClient needs credentials on the target host to perform compliance checking on the operating system and Apache configuration. This procedure has been covered on the Tenable Blog in several posts (For example, "Configuring Nessus To Scan Through Firewalls"), and in the Nessus Product Documentation.

If you want to audit a database configuration, provide Nessus with database credentials, the name of the database to test and the database type as shown:

MysqlSettings.png

The login provided must exist in the database and have the appropriate permissions. To setup access permissions on the MySQL server, execute the following command on the database:

mysql> grant all on oscomm.* to nessus@'192.168.10.122' identified by 'areallylongandcomplicatedbypass';

The SQL statement above creates a user called "nessus" and grants permission to all tables in the "oscomm" database. The user name in this example is "nessus" but it can be anything.

Reviewing the Results

When the scan completes, you will see results that you may not see in a network-based scan. For example, in our PCI compliant post, Nessus found problems with the MySQL configuration. The compliance audit scan with login credentials goes much deeper and finds that the database is using insecure passwords:

DBchecks-Hashes1.png

The compliance checking can check the strength of the password by measuring the size of the hash and against a required certain length. Passwords are often the weakest link in your defenses, and this check provides a great way to test them. The database is also not using SSL for communications:

DBChecksSSL2.png

The above check audits the MySQL configuration and tests if SSL is enabled for communications with the MySQL server. Compliance checking also identifies missing functionality. For example, the CIS benchmarks for Apache servers require that mod_security be installed and configured. The compliance checking does not find this on our target system and reports on it:

UNIX-Checks-ModSecurity.png

Conclusion

Nessus provides several different ways to test your systems for vulnerabilities and compliance against multiple standards. Network-based scans provide a thorough view of the vulnerabilities available to remote attackers. Standards, such as PCI-DSS, help guide you in the configuration of such scans and the security level of your systems as a whole. Security benchmarks, such as those from CIS, offer very detailed system hardening guidelines. System hardening is crucial to securing your systems and preventing attacks. For example, if an attacker does penetrate a system, hardening the operating system can lessen the impact and make an attacker work hard to collect sensitive information. Nessus provides a way to audit your systems on a regular basis and ensure that the hardening guidelines are followed. You can even create your own audit files and test your systems against internal policies and procedures.

References

Related Articles

Cybersecurity News You Can Use

Enter your email and never miss timely alerts and security guidance from the experts at Tenable.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Try Tenable Web App Scanning

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable One Exposure Management platform. Safely scan your entire online portfolio for vulnerabilities with a high degree of accuracy without heavy manual effort or disruption to critical web applications. Sign up now.

Your Tenable Web App Scanning trial also includes Tenable Vulnerability Management and Tenable Lumin.

Buy Tenable Web App Scanning

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

5 FQDNs

$3,578

Buy Now

Try Tenable Lumin

Visualize and explore your exposure management, track risk reduction over time and benchmark against your peers with Tenable Lumin.

Your Tenable Lumin trial also includes Tenable Vulnerability Management and Tenable Web App Scanning.

Buy Tenable Lumin

Contact a Sales Representative to see how Tenable Lumin can help you gain insight across your entire organization and manage cyber risk.

Try Tenable Nessus Professional Free

FREE FOR 7 DAYS

Tenable Nessus is the most comprehensive vulnerability scanner on the market today.

NEW - Tenable Nessus Expert
Now Available

Nessus Expert adds even more features, including external attack surface scanning, and the ability to add domains and scan cloud infrastructure. Click here to Try Nessus Expert.

Fill out the form below to continue with a Nessus Pro Trial.

Buy Tenable Nessus Professional

Tenable Nessus is the most comprehensive vulnerability scanner on the market today. Tenable Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy a multi-year license and save. Add Advanced Support for access to phone, community and chat support 24 hours a day, 365 days a year.

Select Your License

Buy a multi-year license and save.

Add Support and Training

Try Tenable Nessus Expert Free

FREE FOR 7 DAYS

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Already have Tenable Nessus Professional?
Upgrade to Nessus Expert free for 7 days.

Buy Tenable Nessus Expert

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Select Your License

Buy a multi-year license and save more.

Add Support and Training