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

Full Su/SuDo support for UNIX Configuration Audits

Previously, Tenable announced that full su/sudo support for UNIX host-based checks was now supported by Nessus 3.2 but that UNIX configuration audits did not have access to this feature. With the latest release of the unix_compliance_check.nbin file (version 1.5.8), full support for su and sudo while performing UNIX compliance audits is now supported. This blog entry discusses this and several other new features.

Using su or sudo

Consider the following execution of an audit policy named test100.audit against a Linux server using the nasl Nessus command line tool:

[[email protected] ~]# /opt/nessus/bin/nasl -t 

            Unix Compliance Checks, version 1.5.8

Which file contains your security policy ?
SSH login to connect with :
How do you want to authenticate ? (key or password)
SSH password :
How do you want to elevate your privileges ? (nothing/sudo/su) [nothing] :
Enter the su password to use :
Running in command line -- trying to obtain the list of RPMs, if any... (that may take some time)
"/var/log/secure enabled" : [PASSED]
It is a requirement that all of our UNIX servers log authpriv events to /var/log/secure
and not just /var/log/messages or some other locations. Separate log monitoring tools
periodically log into each system and inspect just the secure file.

Using the latest UNIX Compliance Checks nbin plugin, we are now prompted to see if we want to try and use sudo or su once logged into the target server. In this case, we've logged in with a user named 'walle' and also provided a separate password to use the su command to become root.

Within the Nessus Client GUI, specifying UNIX su or sudo credentials while also specifying a UNIX compliance audit policy will cause the audit to be performed with su or sudo.

Adding Information to your UNIX Audits

Also new in this release is the ability to specify one or more 'info' tags in your UNIX audit items. This feature has been available for auditing of Windows operating systems and applications and is now available for the UNIX platforms as well.

The 'info' tag can be used to add extra information about the audit such as a regulation, URL, corporate policy or a reason why the setting is required.

The format is also very simple. Within a 'custom_item' element of an audit file, add an 'info' tag, then a colon and then within quotes a string. Multiple info tags can be added on separate lines to format the text as a paragraph.

Consider the following audit policy for UNIX being displayed:

[[email protected] ~]# cat test100.audit
#system     : "Linux"
type        : FILE_CONTENT_CHECK
#type       : FUNCTION_CALL
description : "/var/log/secure enabled"
info        : "It is a requirement that all of our UNIX servers log authpriv events to /var/log/secure"
info        : "and not just /var/log/messages or some other locations. Separate log monitoring tools"
info        : "periodically log into each system and inspect just the secure file."
file        : "/etc/syslog.conf"
regex       : "^authpriv.*/var/log/secure"
expect      : "authpriv.*/var/log/secure"

The text within these 'info' lines will be displayed in the resulting report regardless if the audit receives a PASSED or FAILED rating.

Support for SSHv1

And lastly, as of this release, the UNIX Compliance Checks nbin plugin also supports version 1 of SSH. If you run or need to audit UNIX servers which run SSHv1 instead of SSHv2, or have been configured to only support version 1 of the SSH protocol, you can now make use of this feature.

Obtaining the Plugin

If your Nessus scanners are subscribed to the Direct Feed or they are being managed by the Security Center, the plugin is likely already on your scanners.

For More Information

These previous blog entries concern UNIX auditing and su/sudo support:

Subscribe to the Tenable Blog