CIS_Debian_Linux_8_Benchmark_v1.0.0
CIS_Debian_Linux_8_Benchmark_v1.0.0
CENTER FOR INTERNET SECURITY (CIS) SECURITY BENCHMARKS MEMBERSHIP TERMS OF USE
CIS SECURITY BENCHMARKS DIVISION MEMBERS MAY:
Use XLS Benchmarks in accordance with
UNDER THE FOLLOWING TERMS AND CONDITIONS:
SB Products Provided As Is. CIS is providing the SB Products as is and as available without: (1) any representations, warranties, or covenant
any SB Product on the operation or the security of any network, system, software, hardware, or any component of any of them, and (b) the ac
notify you of any corrections, updates, upgrades, or fixes.
Intellectual Property and Rights Reserved. You are not acquiring any title or ownership rights in or to any SB Product, and full title and all own
expressly granted in these Terms of Use are hereby reserved.
Restrictions. You acknowledge and agree that you may not: (1) decompile, dis-assemble, alter, reverse engineer, or otherwise attempt to der
redistribute, sell, rent, lease, sublicense or otherwise transfer or exploit any rights to any SB Product in any way or for any purpose; (3) post a
(4) remove from or alter these CIS Security Benchmarks Terms of Use on any SB Product; (5) remove from or alter any proprietary notices on
based directly on an SB Product or any component of an SB Product; (7) use any SB Product or any component of an SB Product with other
an SB Product for any part of their functionality; (8) represent or claim a particular level of compliance or consistency with any SB Product; or
of Use.
Your Responsibility to Evaluate Risks. You acknowledge and agree that: (1) no network, system, device, hardware, software, or component
Products to your particular circumstances and requirements; and (3) CIS is not assuming any of the liabilities associated with your use of any
CIS Liability. You acknowledge and agree that neither CIS nor any of its employees, officers, directors, agents or other service providers has
direct, indirect, incidental, consequential, or special damages that arise out of or are connected in any way with your use of any SB Product.
Indemnification. You agree to indemnify, defend, and hold CIS and all of CIS's employees, officers, directors, agents and other service provid
your violation of these CIS Security Benchmarks Terms of Use.
Jurisdiction. You acknowledge and agree that: (1) these CIS Security Benchmarks Terms of Use will be governed by and construed in accor
these CIS Security Benchmarks Terms of Use shall be filed only in the courts located in the State of New York; and (3) you hereby consent a
U.S. Export Control and Sanctions laws. Regarding your use of the SB Products with any non-U.S. entity or country, you acknowledge that it
to time by the U.S. Bureau of Industry and Security (BIS) and the U.S. Office of Foreign Assets Control (OFAC).
SPECIAL RULES FOR CIS MEMBERS:
Distribution of SB Products by Member. CIS hereby grants to each Member in good standing the right to distribute the SB Products within su
and agrees that the foregoing grants in this paragraph are subject to the terms of any membership arrangement with CIS and may, therefore,
Membership Agreement. For those CIS Members whose membership is governed by a membership agreement, in addition to these Terms o
any conflict exists between these Terms of Use and the terms of a Member's membership agreement, the terms of the membership agreeme
No Reimbursement of Membership Fees. In the event that a CIS Security Benchmarks Member terminates its membership prior to the end o
certification fees, unless: (1) Member terminates its membership for cause under the terms of its membership agreement; or (2) CIS terminate
the Member's membership fee and any unused certification fees, if applicable.
section
recommendation
# # title status scoring status description rationale statement
2 2.2 Set nodev option for interim scored The nodev mount optiSince the /tmp filesy
2 2.3 Set nosuid option forinterim scored The nosuid mount opti
Since the /tmp filesy
2 2.4 Set noexec option forinterim scored The noexec mount opt
Since the /tmp filesy
2 2.5 Create Separate Partiinterim scored The /var directory i Since the /var directo
2 2.6 Bind Mount the /var/ interim scored The /var/tmp directorAll programs that use
2 2.7 Create Separate Partiinterim scored The /var/log director There are two importa
2 2.8 Create Separate Partiinterim scored The auditing daemon,There are two importa
2 2.9 Create Separate Partinterim scored The /home directory If the system is inte
Since the user partitions are not intended to sup
2 2.10 Add nodev Option to interim scored When set on a file sy
NOTE: The actions in the item refer to the
2 2.11 Add nodev Option to interim unscored Set nodev on removab Removable media cont
2 2.12 Add noexec Option t interim unscored Set noexec on removSetting this option
2 2.13 Add nosuid Option t interim unscored Set nosuid on removaSetting this option
2 2.14 Add nodev Option to interim scored The nodev mount optiSince the /run/shm fi
2 2.15 Add nosuid Option tointerim scored The nosuid mount optSetting this option
2 2.16 Add noexec Option tointerim scored Set noexec on the shSetting this option
2 2.17 Set Sticky Bit on All interim scored Setting the sticky bi This feature prevents
3 3.2 Set Permissions on binterim scored Set permission on theSetting the permissi
3 3.3 Set Boot Loader Pa interim scored Setting the boot loa Requiring a boot pas
4 4.3 Enable Randomized interim scored Set the system flag Randomly placing virt
4 4.4 Disable Prelink interim scored The prelinking featur The prelinking featur
5 OS Services interim While applying system updates and patches helps correct known vu
5 5.3 Ensure daytime is n interim scored daytime is a network Disabling this servic
5 5.4 Ensure echo is not interim scored echo is a network serDisabling this servic
5 5.5 Ensure discard is no interim scored discard is a network Disabling this servic
5 5.6 Ensure time is not e interim scored time is a network serDisabling this servic
The items in this section are intended to ensure that legacy services
5.1 Ensure Legacy Serviinterim
NOTE: The audit items in the section check to see if the packag
5.1 5.1.1 Ensure NIS is not insinterim scored The Network Informati
The NIS service is i
5.1 5.1.2 Ensure rsh server is interim scored The Berkeley rsh-serv
These legacy servic
5.1 5.1.3 Ensure rsh client is ninterim scored The rsh package contThese legacy clients
5.1 5.1.4 Ensure talk server i interim scored The talk software mak
The software present
5.1 5.1.5 Ensure talk client is interim scored The talk software maThe software present
5.1 5.1.6 Ensure telnet server interim scored The telnet-server pa The telnet protocol
5.1 5.1.7 Ensure tftp-server is interim scored Trivial File Transfer TFTP does not suppor
The eXtended InterNET Daemon (xinetd) is an open source super d
5.1 5.1.8 Ensure xinetd is not interim scored If there are no xine
This section describes
NOTE: Several services
other thatrecommended
services are installed ontoservers that spe
be disabled in
6 Special Purpose Ser interim
NOTE: This section lists common packages for different service
6 6.1 Ensure the X Windowinterim scored The X Window system
Unless your organizat
6 6.2 Ensure Avahi Server interim scored Avahi is a free zeroc Since servers are not
6 6.3 Ensure print server i interim unscored The Common Unix Prin
If the system does no
6 6.6 Ensure LDAP is not interim unscored The Lightweight DireIf the server will no
6 6.8 Ensure DNS Server iinterim unscored The Domain Name Sys
Unless a server is sp
6 6.9 Ensure FTP Server i interim unscored The File Transfer ProFTP does not protect
6 6.12 Ensure Samba is notinterim unscored The Samba daemon Ifallthere is no need t
6 6.14 Ensure SNMP Serverinterim unscored The Simple Network The SNMP server com
The software for all Mail Transfer Agents is com
6 6.15 Configure Mail Transinterim scored Mail Transfer Agents
NOTE: The remediation given here provid
6 6.16 Ensure rsync serviceinterim scored The rsyncd service cThe rsyncd service p
7 Network Configuratiointerim This section provides guidance for secure network and firewall confi
7.2 Modify Network Parainterim The following network parameters determine if the system is to act a
7.2 7.2.1 Disable Source Rou interim scored In networking, sourc Setting net.ipv4.con
7.2 7.2.2 Disable ICMP Redireinterim scored ICMP redirect message
Attackers could use
7.2 7.2.3 Disable Secure ICMPinterim scored Secure ICMP redirectIt is still possible
7.2 7.2.4 Log Suspicious Packinterim scored When enabled, this f Enabling this feature
7.2 7.2.5 Enable Ignore Broadinterim scored Setting net.ipv4.icm Accepting ICMP echo
7.2 7.2.6 Enable Bad Error Meinterim scored Setting icmp_ignore_Some routers (and so
7.2 7.2.8 Enable TCP SYN Cointerim scored When tcp_syncookiesAttackers use SYN fl
7.3 Configure IPv6 interim IPv6 is a networking protocol that supersedes IPv4. It has more rout
7.3 7.3.1 Disable IPv6 Router interim unscored This setting disables It is recommended tha
7.3 7.3.2 Disable IPv6 Redire interim unscored This setting preventsIt is recommended tha
7.3 7.3.3 Disable IPv6 interim unscored Although IPv6 has mIf IPv6 is not to be
7.4 7.4.1 Install TCP Wrapper interim scored TCP Wrappers provides
TCP Wrappers provide
7.4 7.4.2 Create /etc/hosts.all interim unscored The /etc/hosts.allow The /etc/hosts.allow
7.4 7.4.3 Verify Permissions o interim scored The /etc/hosts.allow It is critical to ens
7.4 7.4.4 Create /etc/hosts.de interim unscored The /etc/hosts.deny fThe /etc/hosts.deny f
7.4 7.4.5 Verify Permissions o interim scored The /etc/hosts.deny It is critical to ens
7.5 Uncommon Network interim The Linux kernel modules support several network protocols that are
If the protocol is not required, it is recommende
7.5 7.5.1 Disable DCCP interim unscored The Datagram Congest
to reduce the potential attack surface.
7.5 7.5.2 Disable SCTP interim unscored The Stream Control TIf the protocol is no
The items in this section describe how to configure logging, log mon
7.5 7.5.3 Disable RDS interim unscored The Reliable DatagraIf the protocol is no
It is recommended that rsyslog be used for logging (with logwat
7.5 7.5.4 Disable TIPC interim unscored The Transparent Int If the protocol is no
In addition to the local log files created by the steps in this secti
8 Logging and Auditin interim
Because it is often necessary to correlate log information from m
8 8.4 Configure logrotate interim unscored The system includes By t keeping the log fi
It is important that all logs described in this section be monitore
System auditing, through auditd, allows system administrators to mo
8.1 Configure System Acinterim
NOTE: For 64 bit systems that have arch as a rule parameter, you w
WhenNOTE
auditing,
ON itLOG
is important to carefully configure
FILE PERMISSIONS: the storage
There really requ
isn't a "one
8.1.1 Configure Data Rete interim
NOTE: Items in this section configure auditd, ensure it is install
8.2 Configure rsyslog interim The rsyslog software is recommended as a replacement for the defa
8.2 8.2.1 Install the rsyslog p interim scored The rsyslog packageThe security enhancem
8.2 8.2.2 Ensure the rsyslog Sinterim scored Once the rsyslog pack
If the rsyslog servic
8.2 8.2.3 Configure /etc/rsyslo interim unscored The /etc/rsyslog.confA great deal of impor
8.2 8.2.4 Create and Set Permiinterim scored A log file must alreadIt is important to en
8.2 8.2.5 Configure rsyslog t interim scored The rsyslog utility s Storing log data on a
8.2 8.2.6 Accept Remote rsys interim unscored By default, rsyslog The guidance in the
8.3 Advanced Intrusion interim AIDE is a file integrity checking tool, similar in nature to Tripwire. Wh
9 System Access, Authinterim
9 9.4 Restrict root Login interim unscored The file /etc/securett Since the system cons
9.1 9.1.1 Enable cron Daemo interim scored The cron daemon is uWhile there may not
9.3 9.3.6 Set SSH IgnoreRhostinterim scored The IgnoreRhosts parSetting this paramet
9.3 9.3.9 Set SSH PermitEmptinterim scored There are several options
The PermitEmptyPassw available
Disallowing to limit
remote s which users and group ca
9.3 9.3.14 Set SSH Banner interim scored The Banner parameter
DenyUsers Banners are used to w
12 12.1 Verify Permissions o interim scored The /etc/passwd file It is critical to ens
12 12.2 Verify Permissions o interim scored The /etc/shadow file If attackers can gain
12 12.3 Verify Permissions o interim scored The /etc/group file c The /etc/group file
12 12.4 Verify User/Group O interim scored The /etc/passwd file The /etc/passwd file
12 12.5 Verify User/Group O interim scored The /etc/shadow file If attackers can gain
12 12.6 Verify User/Group O interim scored The /etc/group file c The /etc/group file
12 12.10 Find SUID System Einterim unscored The owner of a file There are valid reaso
12 12.11 Find SGID System Einterim unscored The owner of a file There are valid reas
13 Review User and Grointerim This section provides guidance on securing aspects of the users and
13 13.1 Ensure Password Fieinterim scored An account with an eAll accounts must ha
13 13.2 Verify No Legacy "+" interim scored The character + in vaThese entries may pr
13 13.3 Verify No Legacy "+" interim scored The character + in vaThese entries may pr
13 13.4 Verify No Legacy "+" interim scored The character + in vaThese entries may pr
13 13.5 Verify No UID 0 Accointerim scored Any account with UIDThis access must be
13 13.6 Ensure root PATH Intinterim scored The root user can exIncluding the current
13 13.8 Check User Dot File interim scored While the system admi
Group or world-writab
13 13.10 Check for Presence ointerim scored While no .rhosts file This action is only m
13 13.11 Check Groups in /et interim scored Over time, system adGroups defined in the
13 13.12 Check That Users Arinterim scored Users can be definedIf the user's home di
13 13.13 Check User Home Diinterim scored The user home directo
Since the user is acc
13 13.14 Check for Duplicate interim scored Although the useraddUsers must be assign
13 13.16 Check for Duplicate interim scored Although the useraddIf a user is assigned
13 13.18 Check for Presence ointerim scored The .netrc file contai The .netrc file prese
13 13.19 Check for Presence ointerim scored The .forward file spe Use of the .forward f
13 13.20 Ensure shadow grouinterim scored The shadow group allAny users assigned t
remediation procedureaudit procedure impact statement CCE-ID
it and then remove the data from the directory that was in the old partition. Otherwise it will still consume space in the old partition that will be masked when
2 -a ! -perm -1000 \) 2>/dev/null
vulnerabilities is to disable all services that are not required for normal system operation. This prevents the exploitation of vulnerabilities discovered at a late
owever removal is also an acceptable remediation.
ed that someone may have installed them separately. However, this is also true for any other type of rogue software. It is beyond the scope of this benchm
ecommended that they be disabled or deleted from the system to reduce the potential attack surface.
ct -6 default:
k address (127.0.0.1):
n /etc/hosts.allow:
ng summarization) to automatically monitor logs for intrusion attempts and other suspicious system behavior.
re, centralized log server via an encrypted connection. Not only does centralized logging help sites correlate events that may be occurring on multiple syste
at the time be synchronized among systems and devices connected to the local network. The standard Internet protocol for time synchronization is the Netw
otated according to your site policy.
ntry in one log could be more significant when compared to an entry in another log.
of data. By default, auditd will audit SELinux AVC denials, system logins, account modifications, and authentication events. Events will be logged to /var/log
ly one rule is needed.
in onlyso
ssions 4 copies of them. Older
that administrators versions
who are in awill be deleted.
defined It is
security possible
group, suchonasa "wheel"
system do
thatnot
thehave
20 MBs of auditprivileges
to elevate logs maytofillroot
up in
theorder
system causing
to read loss of
log files. audit
Also, if a
-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server.
ate logging is set. In addition, perform the following command and ensure that the log files are logging information:
and verify that the _<owner>:<group>_ is root:root and the permissions are 0600 (for sites that have not implemented a secure group) and root:securegrp w
ogfile.example.com_ is the name of your central log host).
n files by alerting when the files are changed. When setting up AIDE, decide internally what the site policy will be concerning integrity checking. Review the
et of shared objects that are loaded and executed when a program needs to authenticate a user. Files for PAM are typically located in the /etc/pam.d directo
password file.
lcredit=-1
g of sensitive data off the network.
ommand:
sshd_config file.
ssions.
ese login banners also has the side effect of hiding OS version information and other detailed system information from attackers attempting to target specifi
e system, the fact that the system is subject to monitoring and that such monitoring is in compliance with local statutes, and that use of the system implies c
d /etc/issue.net files. Review the contents of these files with the "cat" command and ensure that it is appropriate for your organization.
use the /usr/sbin/grpck command to check for other inconsistencies in the /etc/group file.
ecurity policy.
tored on separate partitions and have stricter mount options. A user partition is a filesystem that has been established for use by the users and does not co
on that will be masked when the new filesystem is mounted. For example, if a system is in single-user mode with no filesystems mounted and the administr
rabilities discovered at a later date. If a service is not enabled, it cannot be exploited. The actions in this section of the document provide guidance on what
nd the scope of this benchmark to address software that is installed using non-standard methods and installation directories.
occurring on multiple systems, but having a second copy of the system log information may be critical after a system compromise where the attacker has m
e synchronization is the Network Time Protocol (NTP), which is supported by most network-ready devices. See the ntpd(8) manual page for more informatio
nts will be logged to /var/log/audit/audit.log. The recording of these events will use a modest amount of disk space on a system. If significantly more events
ystem
der causing
to read loss of
log files. audit
Also, if adata.
thirdWhile
party the
log recommendations
aggregation tool ishere
used,provide
it may guidance, check
need to have yourpermissions
group site policy for auditthe
to read storage requirements.
log files, which is preferable to havi
group) and root:securegrp with permissions of 0640 (for sites that have implemented a secure group):
egrity checking. Review the AIDE quick start guide and AIDE documentation before proceeding.
ated in the /etc/pam.d directory. PAM must be carefully configured to secure system authentication. While this section covers some of PAM, please consult
ay, use the chage command to effect changes to individual userIDs.
t use of the system implies consent to such monitoring. It is important that the organization's legal counsel review the content of all messages before any sy
y the users and does not contain software for system operations. The directives in this section are easier to perform during initial system installation. If the s
mounted and the administrator adds a lot of data to the /tmp directory, this data will still consume space in / once the /tmp filesystem is mounted unless it i
nt provide guidance on what services can be safely disabled and under which circumstances, greatly reducing the number of possible threats to the resultin
ise where the attacker has modified the local log files on the affected system(s). If a log correlation system is deployed, configure it to process the logs des
If significantly more events are captured, additional on system or off system storage may need to be allocated.
, which is preferable to having it run setuid to root. Therefore, there are two remediation and audit steps for log file permissions. One is for systems that do
me of PAM, please consult other PAM resources to fully understand the configuration capabilities.
all messages before any system modifications are made, as these warning messages are inherently site-specific. More information (including citations of r
al system installation. If the system is already installed, it is recommended that a full backup be performed before repartitioning the system.
One is for systems that do not have a secured group method implemented that only permits root to read the log files (root:root 600). The other is for sites t
ation (including citations of relevant case law) can be found at http://www.justice.gov/criminal/cybercrime/ [http://www.justice.gov/criminal/cybercrime/ ]
600). The other is for sites that do have such a setup and are designated as root:securegrp 640 where securegrp is the defined security group (in some ca
v/criminal/cybercrime/ ]
security group (in some cases wheel).
section
recommendation
# # title status scoring status description rationale statement
2 2.20 Disable Mounting of interim unscored The jffs2 (journaling Removing support for
2 2.21 Disable Mounting of interim unscored The hfs filesystem ty Removing support for
2 2.22 Disable Mounting of interim unscored The hfsplus filesyst Removing support for
2 2.23 Disable Mounting of interim unscored The squashfs filesys Removing support for
2 2.24 Disable Mounting of interim unscored The udf filesystem t Removing support for
4 4.5 Activate AppArmor interim scored AppArmor provides aFor an action to occ
5 OS Services interim While applying system updates and patches helps correct known vu
The items in this section are intended to ensure that legacy services
5.1 Ensure Legacy Serviinterim
This section describes
NOTE: The services
audit items thatsection
in the are installed
check on servers
to see if thethat spe
packag
6 Special Purpose Ser interim
NOTE: This section lists common packages for different service
7 Network Configuratiointerim This section provides guidance for secure network and firewall confi
7.1 Modify Network Parainterim The following network parameters determine if the system is to act a
7.2 Modify Network Parainterim The following network parameters determine if the system is to act a
7.3 Configure IPv6 interim IPv6 is a networking protocol that supersedes IPv4. It has more rout
The items in this section describe how to configure logging, log mon
7.4 Install TCP Wrapper interim
It is recommended that rsyslog be used for logging (with logwat
7.5 Uncommon Network interim The Linux kernel modules support several network protocols that are
In addition to the local log files created by the steps in this secti
8 Logging and Auditin interim
Because it is often necessary to correlate log information from m
System auditing, through auditd, allows system administrators to mo
8.1 Configure System Acinterim
NOTE: For 64 bit systems that have arch as a rule parameter, you w
It is important that all logs described in this section be monitore
8.1 8.1.2 Install and Enable a interim scored Install and turn on The capturing of sys
NOTE ON LOG FILE PERMISSIONS: There really isn't a "one
8.1 8.1.3 Enable Auditing for Pinterim scored Configure grub or lil Audit events need to
8.1 8.1.4 Record Events That interim scored Capture events where
Unexpected changes i
8.1 8.1.5 Record Events That interim scored Record events affectUnexpected changes t
8.1 8.1.7 Record Events That interim scored Monitor SELinux manda
Changes to files in t
8.1 8.1.8 Collect Login and L interim scored Monitor login and logMonitoring login/logo
8.1 8.1.9 Collect Session Initi interim scored Monitor session initi Monitoring these file
8.1 8.1.10 Collect Discretionar interim scored Monitor changes to fiMonitoring for changes
8.1 8.1.12 Collect Use of Priv interim scored Monitor privileged p Execution of privile
It is highly unusual for a non privileged user to m
8.1 8.1.13 Collect Successful interim scored Monitor the use of t
NOTE: This tracks successful and unsucc
8.1 8.1.14 Collect File Deletio interim scored Monitor the use of syMonitoring these call
8.1 8.1.17 Collect Kernel Modu interim scored Monitor the loading Monitoring the use o
8.1 8.1.18 Make the Audit Conf interim scored Set system audit so tIn immutable mode, u
When auditing, it is important to carefully configure the storage requ
8.1.1 Configure Data Rete interim
NOTE: Items in this section configure auditd, ensure it is install
8.1.1 8.1.1.1 Configure Audit Log interim unscored Configure the maximum
It is important that
8.1.1 8.1.1.3 Keep All Auditing In interim scored Normally, auditd will In high security cont
8.2 Configure rsyslog interim The rsyslog software is recommended as a replacement for the defa
8.3 Advanced Intrusion interim AIDE is a file integrity checking tool, similar in nature to Tripwire. Wh
8.3 8.3.1 Install AIDE interim scored In some installations Install AIDE to make u
12 Verify System File P interim NOTE: The text provided in the remediation actions for these ite
13 Review User and Grointerim This section provides guidance on securing aspects of the users and
remediation procedureaudit procedure impact statement CCE-ID
system-wide functions can be further protected by placing them on separate partitions. This provides protection for resource exhaustion and enables the us
# /sbin/modprobe -n -v cramfs
Edit that
itioning a system or create the file been
has already /etc/modprobe.d/CIS.conf anddata
installed, make sure the add has
the following line:over to the new partition, unmount it and then remove the data from
been copied
install /bin/true
# /sbin/lsmod | grep cramfs
install cramfs /bin/true
<No output>
Check the status of AppArmor:
# /sbin/modprobe
# apparmor_status -n -v freevxfs
Edit or create the file /etc/modprobe.d/CIS.conf and add the following line:
install
AppArmor /bin/trueavailable in kernel.
#
26 /sbin/modprobe
/sbin/lsmod
profiles are| loaded. grep -n freexvfs
-v jffs2
Edit or create
install the file/bin/true
freevxfs /etc/modprobe.d/CIS.conf and add the following line:
install
<No /bin/true
output>
26 profiles are in enforce mode.
#/bin/ping
/sbin/modprobe
/sbin/lsmod | grep jffs2 -n -v hfs
Edit or create
install jffs2the/bin/true
file /etc/modprobe.d/CIS.conf and add the following line:
install
<No /bin/true
output>
/sbin/klogd
# /sbin/modprobe
/sbin/lsmod | grep -n hfs-v hfsplus
Edit or create
install hfsthe /sbin/syslog-ng
file /etc/modprobe.d/CIS.conf
/bin/true and add the following line:
install
<No /bin/true
output>
/sbin/syslogd
# /sbin/modprobe
/sbin/lsmod | grep -n hfsplus
-v squashfs
Edit or create
install the file
hfsplus /usr/lib/chromium-browser/chromium-browser
/etc/modprobe.d/CIS.conf
/bin/true and add the following line:
install
<No output> /bin/true
Install apparmor and apparmor-utils /usr/lib/chromium-browser/chromium-browser//browser_java
if missing (additional profiles can be found in the apparmor-profiles package):
# /sbin/modprobe
/sbin/lsmod | grep -n squashfs
-v udf
Edit or create
install squashfs /usr/lib/chromium-browser/chromium-browser//browser_openjdk
the file /bin/true
/etc/modprobe.d/CIS.conf and add the following line:
install
<No output> /bin/true
# apt-get install apparmor /usr/lib/chromium-browser/chromium-browser//chromium_browser_sandbox
apparmor-profiles apparmor-utils
# /sbin/lsmod | grep udf
install udf /bin/true /usr/lib/chromium-browser/chromium-browser//sanitized_helper
<No output>
Add apparmor=1/usr/lib/dovecot/deliver
and security=apparmor to GRUB_CMDLINE_LINUX in /etc/default/grub:
/usr/lib/dovecot/dovecot-auth
GRUB_CMDLINE_LINUX="apparmor=1
/usr/lib/dovecot/imap security=apparmor"
/usr/lib/dovecot/imap-login
Update grub configuration /usr/lib/dovecot/managesieve-login
(reboot will be required to apply changes):
/usr/lib/dovecot/pop3
tes and patches helps correct known
# update-grub vulnerabilities, one of the best ways to protect the system against as yet unreported vulnerabilities is to disable all ser
/usr/lib/dovecot/pop3-login
intended to ensure that legacy services are not active on the system. This guidance recommends disabling the software however removal is also an accep
/usr/sbin/avahi-daemon
Set all profiles to/usr/sbin/dnsmasq
enforce mode:
ces thatsection
in the are installed
check on servers
to see if thethat specifically
packages
/usr/sbin/dovecot need in
are listed to therun package
these services. management If any of these services
database are notItrequired,
and installed. could beitargued
is recommended
that someone thatmay
theyhave
be disabl
insta
# aa-enforce /etc/apparmor.d/*
/usr/sbin/identd
s common packages for different services /usr/sbin/mdnsdhowever there are alternate packages which provide many of these services which should also be disabled or de
nce for secure network Any and firewall configuration.
unconfined processes
/usr/sbin/named may need to have a profile created or activated for them and then be restarted.
/usr/sbin/nmbd
meters determine if the system is to /usr/sbin/nscd act as a _host only_. A system is considered _host only_ if the system has a single interface, or has multiple interfaces
/usr/sbin/smbd
meters determine if the system is to /usr/{sbin/traceroute,bin/traceroute.db}
act as a router. A system acts as a router if it has at least two interfaces and is configured to perform routing functions.
0 profiles are in complain mode.
l that supersedes IPv4. It has more0routable processes addresses
have profiles and has defined.built in security. If IPv6 is to be used, follow this section of the benchmark to configure IPv6
cribe how to configure logging, log0monitoring, processes and are in auditing,
enforceusing mode. tools included in most distributions.
0 processes are in complain mode.
rsyslog be used for logging (with logwatch 0 processes providingare unconfinedsummarization) but have andaauditd
profilebe used for auditing (with aureport providing summarization) to automatica
defined.
upport several network protocols that are not commonly used. If these protocols are not needed, it is recommended that they be disabled in the kernel.
og files created by the steps in thisRun section,the
Ensurefollowingalso to
it is profiles ensure
recommended
are loaded, auditd no isprofiles
that installed:
sites collect
are in copies
complain of their
mode, system
and no logs on a secure,
processes centralized log server via an e
are unconfined.
For 64 bit systems, add Perform
the following
the following lines to the determine
/etc/audit/audit.rules
if events where file.
the system date and/or time has been modified are captured.
Installlog
essary to correlate auditd:
information from many # dpkgdifferent
-s auditd systems (particularly after a security incident) it is recommended that the time be synchronized amon
ditd, allows system administrators to monitor their systems such that they can detect unauthorized access or modification of data. By default, auditd will aud
-a always,exit -F arch=b64 On a 64 -S bitadjtimex
system, -Sperform
settimeofday the following
-k time-changecommand and ensure the output is as shown.
at have arch asFora64 rulebitparameter,
systems, add youthe willfollowing
need twolines rules: to one the /etc/audit/audit.rules
for 64 bit and one forfile. 32 bit systems. For 32 bit systems, only one rule is needed.
gs described -a Editalways,exit
in this apt-get -F
/etc/default/grub
# section arch=b32
install
be On a Ensure
to include
auditd
monitored 64onbit
-S system,
adjtimex
aaudit=1
package
regular -S
as perform
settimeofday
basispart
status of the
and following
-S stime
GRUB_CMDLINE_LINUX:
is installed
correlated oktocommand
-k time-change
installed.
determine and ensure
trends. the output innocuous
A seemingly is as shown entry in one log could be more sign
-a always,exit -F arch=b64 to determine
Perform #-Sgrep if events to
clock_settime
the time-change
following that modify the
-kdetermine
/etc/audit/audit.rules
time-change system's environment
if /boot/grub/grub.cfg are recorded.
is configured to log processes that start prior to auditd.
-a exit,always -F arch=b64 -S sethostname -S setdomainname -k system-locale
ERMISSIONS: -aThere
always,exit
really -F
If needed arch=b32
enable
isn't a -a
GRUB_CMDLINE_LINUX="audit=1""one always,exit
auditd: -S clock_settime
Perform
size -F arch=b64
the
fits all" following
solution -k time-change
-S
to adjtimex
determine -S settimeofday
if auditd files.-kMany
is enabled. time-change
-S to
the permissions
-k on
log sites utilize group permissions so that administrators who
-a exit,always -F arch=b32 -S sethostname setdomainname system-locale
Add the following-plines
-w /etc/localtime wa -a -kto # grep
the
always,exit
time-change system-locale
/etc/audit/audit.rules
-F arch=b32
"linux" /etc/audit/audit.rules
/boot/grub/grub.cfg-Sfile.
adjtimex -S settimeofday -S stime -k time-change
-w /etc/issue -p wa -kPerform system-locale the following to determine if events that modify user/group information are recorded.
For 64
# Execute
Andbit run
systems,
thethe
# systemctl following add
following
enable the
-a exit,alwaysfollowing
always,exit
command
#command
auditd systemctl lines
to-Frestart
toarch=b64
update
is-enabled toauditd
thethe-S/etc/audit/audit.rules
sethostname
clock_settime
grub configuration:
auditd -S file.
-k setdomainname
time-change -k system-locale
-w /etc/issue.net -p wa -k system-locale
# pkill-w-P/etc/group
1-HUP auditd -p For
-a 64
waexit,alwaysbit systems,
-kMake
identity
always,exit sure -Feach perform
arch=b32 line that -S the following
sethostname
clock_settime
starts command
with linux -S and
setdomainname
-k has
time-change
the ensureparameter
audit=1 the
-k outputset.
system-locale is as shown to determine if permission modific
-w /etc/hosts -p wa -k system-locale # grep identity /etc/audit/audit.rules
-a always,exit
-w /etc/passwd
# update-grub -p wa -F-w arch=b64
-k Ensure-Sresult
/etc/issue
identity
/etc/localtime -pchmod
wa -p is-k -S -kfchmod
system-locale
waenabled. time-change -S fchmodat -F auid>=1000 \
-w /etc/network -p wa-w -k/etc/group
system-locale -p wa -k identity
-F
-w auid!=4294967295
/etc/gshadow
For 32 bit systems, -p wa -w-k-k/etc/issue.net
perm_mod
# grep
identity
add perm_mod
the following -p walines /etc/audit/audit.rules
-k system-locale
to the /etc/audit/audit.rules file.
# Execute the following -w command
/etc/passwd to -prestartwa -kauditd identity
-a
-w always,exit
/etc/shadow-F-parch=b32 wa-a-w-kalways,exit
-S achmod
/etc/hosts
identity
On 32 -p -Fwa
bit -Sarch=b64
fchmod
-k
system, -S
system-locale-S chmod
perform fchmodat -S -F
fchmod
the following auid>=1000-S fchmodat
command \ and -F auid>=1000
ensure the output \ is as shown.
Add
# pkillthe-Pfollowing
1-HUP auditd lines -wto/etc/gshadow
the /etc/audit/audit.rules-p wato-kthe identityfile.
For
-F 64-abit systems, -F
-w auid!=4294967295
/etc/security/opasswd
always,exit add
-F
-w-k the-p following
auid!=4294967295
perm_mod
/etc/network
arch=b32 wa -k-Sidentity lines
-p
adjtimex /etc/audit/audit.rules
perm_mod
wa -k-Ssystem-locale
settimeofday -S stime -k file.
time-change
Perform
-w /etc/shadow the following -p wa to
-k determine
identity if events that modify the system's mandatory access controls are recorded
-a
Add always,exit the -F
the following
# Execute arch=b64
lines
following
arch=b32On
-a to 64the
command bit
always,exit
#-S systems,
chown to-Frestart
-S
/etc/audit/audit.rules
grep clock_settime
time-change perform
arch=b32
fchown auditd -Sthe following
fchownat
chmod
file.
-k/etc/audit/audit.rules
time-change -S-S command
fchmod and
lchown-S-Ffchmodat ensure
auid>=1000 -Fthe \ output is as
auid>=1000 \ shown to determine if there are unsucces
Add
For 32 thebitfollowing
systems, Perform
-w lines
addtothe the following lines
/etc/audit/audit.rules
following
/etc/security/opasswd to determine
-p towa if login and logout events
the-k/etc/audit/audit.rules
identity file. are recorded.
-F
Add
#
-wpkill -a-Palways,exit
auid!=4294967295
the following
1-HUP auditd
/etc/localtime -F
-plines
wa -F arch=b64
-a-k to
-k the 32-S
auid!=4294967295
perm_mod creat
For/etc/audit/audit.rules
always,exit
time-change bit-F systems, -S-k
arch=b32 open -S-S
perm_mod
perform openat
file. -S truncate
the following
adjtimex command
settimeofday -S ftruncate
-Sand \ -k time-change
ensure
stime the output is as shown to determine if events that m
-w /etc/selinux/ -p wa -k MAC-policy # grep MAC-policy /etc/audit/audit.rules
-F
-a exit=-EACCES
always,exit the -F
-w /var/log/faillog
# Execute -F -a
arch=b32
following auid>=1000
-p #-S
wa
command grep
always,exit
-kchown access
-F
loginsto-Fauid!=4294967295
-S
restart /etc/audit/audit.rules
arch=b64
fchown
arch=b32 auditd -S fchownat
chown -k -S
clock_settime access
-S
fchown
lchown -S-F fchownat
-k time-change auid>=1000 -S lchown
\ -F auid>=1000 \
# Execute the following
-a exit,always -FPerform
-warch=b32 # grep
command the-S
/etc/selinux/ following
logins
tosethostname
-p
restartwa toauditd
-k determine
/etc/audit/audit.rules
MAC-policy if session initiation
-S setdomainname information is collected.
-k system-locale
-a
-F
-w always,exit
auid!=4294967295 -F auditd
-w-P/var/run/utmp
/var/log/lastlog
# pkill 1-HUP arch=b32
-p wa-a
-F
-w -kalways,exit
-p -S-kcreat
auid!=4294967295
perm_mod
wa
-k #logins
grep
/etc/localtimesession -F
-S-p arch=b64
system-locale openwa-k-k -Sperm_mod
openat
-S creat -S-S truncate
/etc/audit/audit.rules
time-change open -S-Sopenat ftruncate -S truncate
\ -S ftruncate \
#
-wpkill -P 1-HUP
/etc/issue -p wa auditd-k-w /var/log/faillog -p wa -k logins
system-locale
-F
-a exit=-EACCES
-w always,exit
/var/log/wtmp
/var/log/tallylog -p-F
-F arch=b64
-pwa-F
auid>=1000
-a
wa-k exit=-EACCES
always,exit
-S
-ksession
logins
exit,always -F-Fauid!=4294967295
setxattr -S-Flsetxattr
arch=b32 auid>=1000 -S-Schown -F-kauid!=4294967295
fsetxattr
sethostname access
-S fchown
-S removexattr -S fchownat
-S setdomainname -k access
-S \ -S -klchown -F auid>=1000 \
system-locale
To remediate this-pissue,
-w /etc/issue.net wa the system
# grep
-w-k/var/log/lastlog
system-locale sessionadministrator
-p /etc/audit/audit.rules
wa -k logins will have to execute a find command to locate all the privileged programs and then add an a
-a always,exit
lremovexattr
-w the-S-F
/var/log/btmp
# Execute arch=b64-a
fremovexattr
-p
followingwa -F
-w-k always,exit
-S-F creat
auid!=4294967295
session
command
/etc/issue to-F
-S
auid>=1000
-p arch=b32
open
restart
wa -S
-kauditd openat
-S creat
-Fperm_mod
-k system-locale -S-S
auid!=4294967295 truncate
open -S-S -kopenat
ftruncate
perm_mod -S truncate
\ -S ftruncate \
-w /etc/hosts -p wa -k-w /var/run/utmp
/var/log/tallylog-p-pwa
system-locale wa-k-ksession logins
-F
-a exit=-EPERM
always,exit
# Execute
pkill -HUP the -P-F 1 -F
following
auditdauid>=1000
arch=b32-F exit=-EACCES
-a always,exit
command -Fto
-S setxattr auid!=4294967295
-Frestart -Fwa
arch=b64
-S auid>=1000
lsetxattr
auditd -S-Ssetxattr -F
-k access
fsetxattr auid!=4294967295
-S-S lsetxattr
removexattr -k access
-S fsetxattr
-S \ -S removexattr -S \
-w -F path=" $1
/etc/network -p "wa- -w
will
-w-k
/etc/issue.net
populate each-p
/var/log/wtmp
system-locale -pfile
waname
-k system-locale
-k session found through the find command and processed by awk.
At
-a a minimum,
always,exit
lremovexattr
# pkill -HUP -P -S-Fconfigure
arch=b32-a
1fremovexattr
auditd the-Saudit
always,exit
lremovexattr
-w /etc/hosts-F creat system
-F
-S
auid>=1000
-S
-p arch=b64
open
fremovexattr
wa -k tosystem-locale
collect
-S
-F openat
-S-F file
creat -S
auid!=4294967295 deletion
-S
auid>=1000 openevents
truncate -S
-F-S
-kopenatfor all-Susers
ftruncate
auid!=4294967295
perm_mod truncate
\ and -S root.
-k ftruncate \
perm_mod
For
-F 64 bit systems,
perm=x
# Execute - willfollowing
the write add the
ancommand
-w audit following
/var/log/btmprecord iflines
-pthe
to restart wato file
-k the /etc/audit/audit.rules file.
is executed.
session
auditd
-F exit=-EPERM
# Execute -F auid>=1000
the following -F
-a
-w exit=-EPERM
always,exit
command
/etc/network -Fto auid!=4294967295
-F-p -F
restart auid>=1000
arch=b32
wa -kauditd -S setxattr
system-locale -F-kauid!=4294967295
access
-S lsetxattr -S fsetxattr -k access -S removexattr -S \
-F auid>=500
# pkillFor-P 641-HUP - will
auditd For
write 64
a bit
record systems
if the perform
user executing the following
the command
command is and
not a ensure
privileged the output
user. is as shown to determine if filesystem mounts
# Execute
pkillNOTE:
-HUP thebit
-P
Use systems,
following
1 the
auditd For
-a add
64
lremovexattr bit
lastalways,exit
command
command the systems,
following
to-F
-S restart perform
arch=b32
tofremovexattr
read to/var/log/wtmp
the-S
auditd /etc/audit/audit.rules
the following
creat
-F -S
auid>=1000 open
(last command
with -S
-Fno file.
openat and-Sensure
auid!=4294967295
parameters) truncate
andthe-S-koutput is as\ shown
ftruncate
perm_mod
/var/run/utmp (last -f to determine if file deletion events
/var/run/utmp)
-a always,exit
-F auid!= 4294967295 -F arch=b64
- will ignore -S Daemon
mount -Fevents auid>=1000 -F auid!=4294967295 -k mounts
# pkill -HUP -P 1 auditd -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k access
-a always,exit -F arch=b32#-S grep mountmounts -F auid>=1000
/etc/audit/audit.rules -F auid!=4294967295 -k mounts
-a
Foralways,exit
32 bit systems, -FVerify
arch=b64
add#
Forgrep
that 32an
the -S
delete
unlink
bitaudit
following
systems, /etc/audit/audit.rules
-S
line linesunlinkat
for each
perform
to the-S rename
setuid/setgid -S program
/etc/audit/audit.rules
the following renameat
command -F
file.and auid>=1000
identified ensurein thethe \ output
find command appears
is as shown to in the auditiffile
determine with the ab
permission m
# Execute therecords
All audit following -awillalways,exit
command
be tagged to-Fwith
restart
arch=b64theauditd -S mount
identifier -F auid>=1000 -F auid!=4294967295 -k mounts
"privileged."
-F auid!=4294967295
For 32 bit systems, -a-kalways,exit
delete
addOn the 32 bit -F
following arch=b64
systems, lines -Sthe
perform
to unlinkthe -S unlinkat
/etc/audit/audit.rules
following -S rename
command file.and -Sensure
renameat the -F auid>=1000
output is as shown \ to determine if there are uns
# pkill -HUP -P 1 auditd -a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=4294967295 -k mounts
-a always,exit
-a always,exit -F arch=b32
-F-Farch=b32
auid!=4294967295
#-Sgrep unlink
-S
perm_mod-S unlinkat
chmod -S-k/etc/audit/audit.rules
delete
-S rename
fchmod -S fchmodat-S renameat -F auid>=1000
-F auid>=1000 \ \
# find PART -xdev \( -perm -4000 -o -perm -2000 \) -type f | awk '{print \
-F auid!=4294967295
-a always,exit -F-a-k always,exit
delete
arch=b32# grep-S
perm_mod -F
access
creat arch=b32
-S open-S-Sunlink
/etc/audit/audit.rules openat
chmod -S unlinkat
-S-S truncate
fchmod -S
-S-Srename
ftruncate
fchmodat -S-Frenameat
\ auid>=1000 -F auid>=1000
\ \
For 32 bit -F
"-a always,exit systems,
path=" add $1For" the32perm=x
-F following
bit systems -Flines perform
auid>=1000to the the /etc/audit/audit.rules
-Ffollowing command
auid!=4294967295 file.and
\ ensure the output is as shown to determine if filesystem mo
Add
#
-F the following
-aExecute
exit=-EACCES
always,exit the -F lines
following
-F -F
arch=b32-a to
auid>=1000the-S/etc/audit/audit.rules
auid!=4294967295
command
always,exit chown -Fto-Fauid!=4294967295
restart
-S arch=b32
fchown -kauditd -Sfile.
delete
perm_mod creat-k-Saccess
fchownat open
-S lchown-S openat -S truncate\ -S ftruncate \
-F auid>=1000
-k privileged" }' Perform the following to determine if changes to /etc/sudoers are recorded.
#
-Fpkill
-a -HUP -P-F1 arch=b32
always,exit
auid!=4294967295 auditd -F exit=-EACCES
-S creat -F
-a-kalways,exit
perm_mod -Sarch=b32
open
-F auid>=1000
-S openat-S chown -F
-S auid!=4294967295
truncate
-S fchown -S -Sftruncate
fchownat-k \access
-S lchown -F auid>=1000 \
-a always,exit -F arch=b32 # grep-S mounts
mount/etc/audit/audit.rules
-F auid>=1000 -F auid!=4294967295 -k mounts
-F -w /etc/sudoers
exit=-EPERM
-a always,exit -F -Farch=b32-p always,exit
-F waFor
auid>=1000
-a -k scope
32
auid!=4294967295
-S bitauid!=4294967295
-F
setxattr -Fsystems,
arch=b32
-S lsetxattr perform
-k perm_mod-S-Screat the
-k -S
fsetxattr following
access
open -Scommand
openat -S
-S removexattr -Sand \ ensure
truncate -S the output\ is as shown to determine if file deletion e
ftruncate
# Execute
Next, theaddfollowing
those-a lines #togrep
always,exit
command the scope to-Frestart /etc/audit/audit.rules
arch=b32
/etc/audit/audit.rules auditd -S mount file. -F auid>=1000 -F auid!=4294967295 -k mounts
# Execute
For 32the
lremovexattr -Sfollowing
bit systems, -F
fremovexattr command
add -F
exit=-EPERM
-a always,exit to-Frestart
theauid>=1000
following -F toauditd
auid>=1000
arch=b32 theauid!=4294967295
-F -S/etc/audit/audit.rules
-F auid!=4294967295
setxattr -S lsetxattr file.
-k perm_mod -k access
-S fsetxattr -S removexattr -S \
# pkill -HUP -P 1 auditd -w /etc/sudoers -p wa -k scope
# pkill
Execute-HUP the -Pfollowing
1 auditd # grep delete
lremovexattr
command -S /etc/audit/audit.rules
to fremovexattr
restart auditd-F auid>=1000 -F auid!=4294967295 -k perm_mod
# pkill-a-HUP
always,exit
-P 1 auditd -F-aarch=b32
always,exit -S -F unlink arch=b32 -S unlinkat -S unlink -S rename-S unlinkat -S renameat
-S rename -F -S auid>=1000
renameat \-F auid>=1000 \
-F auid!=4294967295-F-kauid!=4294967295 delete -k delete
# Execute the following command to restart auditd
# pkill -P 1-HUP auditd
Add the following lines to the /etc/audit/audit.rules file.
Perform the following to determine if kernel module loading and unloading is recorded.
Add the following lines to the /etc/audit/audit.rules file.
Perform the following to determine if administrator activity is recorded.
-w /var/log/sudo.log -p wa -k actions
# grep modules /etc/audit/audit.rules
-w /sbin/insmod
# Execute the following-p command
x -k modules to restart auditd
-w /sbin/insmod
# grep actions -p x/etc/audit/audit.rules
-k modules
-w /sbin/rmmod
# pkill -HUP -P 1-pauditd
x -k modules
-w /sbin/rmmod
/var/log/sudo.log -p x -p
-k wa
modules
-k actions
Add the following lines
-w /sbin/modprobe -p x to
-k the /etc/audit/audit.rules file.
modules
Perform the following
-w /sbin/modprobe -p xto-kdetermine
modules if the audit configuration is immutable.
FOR NOTE:
32 BIT The
SYSTEMS,
system ADDmust be configured with su disabled (See Item 9.5 Restrict Access to the su Command) to force all command execu
FOR 32 BIT SYSTEMS
-e 2
-a always,exit -F arch=b32 -S init_module -S delete_module -k modules
# tail -n 1-F
-a always,exit /etc/audit/audit.rules
arch=b32 -S init_module -S delete_module -k modules
t to carefully configure
FOR 64 BIT the SYSTEMS,
storage requirements
ADD for audit logs. By default, auditd will max out the log files at 5MB and retain only 4 copies of them. Older ve
-e
FOR 2 64 BIT SYSTEMS
Set the max_log_file
NOTE:
-a always,exit This mustparameter
-F arch=b64be the-S lastin line
/etc/audit/auditd.conf
init_module in the
-S/etc/audit/audit.rules
delete_module -k modules file
Perform the following
-a always,exit to determine
-F arch=b64 ifthe
auditd
-S init_module -Sisdelete_module
maximum configured to notify
size of the audit the
log administrator
-k modulesfiles. and halt the system when audit logs a
ction configure auditd, ensure it is installed per 8.1.2 Install and Enable auditd Service.
Add the following lines
max_log_file to the /etc/audit/auditd.conf file.
= _<MB>_
# grep space_left_action /etc/audit/auditd.conf
max_log_file /etc/audit/auditd.conf
space_left_action
max_log_file = _<MB>_ = email
space_left_action
NOTE: MB is the number = email of MegaBytes the file can be.
Perform the following to determine
# grep action_mail_acct if audit logs are retained.
/etc/audit/auditd.conf
Add the following =line
action_mail_acct rootto the /etc/audit/auditd.conf file.
action_mail_acct = root
admin_space_left_action = halt
# grep # grep max_log_file_action /etc/audit/auditd.conf
admin_space_left_action
max_log_file_action = keep_logs
Install AIDE: max_log_file_action
admin_space_left_action = keep_logs
= halt
mmended as a replacement for the default syslogd daemon and provides improvements over syslogd, such as connection-oriented (i.e. TCP) transmission
# apt-get install aide
Execute
ng tool, similar thetofollowing
in nature Tripwire.command:
Run the following
While to ensure
it cannot prevent aide is installed:
intrusions, it can detect unauthorized changes to configuration files by alerting when the files a
Initialize AIDE:
# crontab -u root -e # dpkg -s aide
Perform the following to determine if there is a cron job scheduled to run the aide check.
# aideinit
Add the following lineEnsure
to the crontab:
package status is installed ok installed.
# crontab
# cp /var/lib/aide/aide.db.new -u root -l | grep aide
/var/lib/aide/aide.db
0 5 * * * /usr/sbin/aide --check
0 5 * * * /usr/sbin/aide --check
NOTE: The prelinking feature can interfere with AIDE because it alters binaries to speed up their start up times. Run /usr/sbin/prelink -ua
NOTE: The checking in this instance occurs every day at 5am. Alter the frequency and time of the checks in compliance with site policy.
cure, encrypted replacement for common login services such as telnet, ftp, rlogin, rsh, and rcp.
ion Modules) is a service that implements modular authentication modules on UNIX systems. PAM is implemented as a set of shared objects that are loade
gly recommended that sites abandon older clear-text login protocols and use SSH to prevent session hijacking and sniffing of sensitive data off the network
nstalled the contents of this section are not required. You can check the install status of the ssh server with the following command:
nce on setting up secure defaults for system and user accounts and their environment.
er
ge prior
word to the
control normal user
parameters login
have may
been assisttothe
moved prosecution
PAM, of trespassers
some parameters on available
are still the computer system.
through Changing
the shadow some ofsuite.
password theseAny
login bannersmade
changes also to
has the si
/etc/logi
y the US Department of Defense require that warning messages include at least the name of the organization that owns the system, the fact that the system
ed in the remediation actions for these items is intended as an example only. Please edit to include the specific text for your organization as approved by yo
it and then remove the data from the directory that was in the old partition. Otherwise it will still consume space in the old partition that will be masked when
vulnerabilities is to disable all services that are not required for normal system operation. This prevents the exploitation of vulnerabilities discovered at a late
owever removal is also an acceptable remediation.
ecommended thatmay
ed that someone theyhave
be disabled
installedorthem
deleted from theHowever,
separately. system tothis
reduce thetrue
is also potential
for anyattack
othersurface.
type of rogue software. It is beyond the scope of this benchm
ng summarization) to automatically monitor logs for intrusion attempts and other suspicious system behavior.
ey be disabled in the kernel.
re, centralized log server via an encrypted connection. Not only does centralized logging help sites correlate events that may be occurring on multiple syste
e unconfined.
n modified are captured.
at the time be synchronized among systems and devices connected to the local network. The standard Internet protocol for time synchronization is the Netw
of data. By default, auditd will audit SELinux AVC denials, system logins, account modifications, and authentication events. Events will be logged to /var/log
hown.
ly one rule is needed.
ntry in one log could be more significant when compared to an entry in another log.
hat start prior to auditd.
ssions so that administrators who are in a defined security group, such as "wheel" do not have to elevate privileges to root in order to read log files. Also, if a
hown.
controls are recorded
o determine if there are unsuccessful attempts to access files.
own to determine if events that modify the system's environment are recorded.
ppears
own to in the auditiffile
determine with the above
permission attributes.
modifications are being recorded.
\
own to determine if there are unsuccessful attempts to access files.
\
own to determine if filesystem mounts are recorded.
\
in only 4 copies of them. Older versions will be deleted. It is possible on a system that the 20 MBs of audit logs may fill up the system causing loss of audit
halt the system when audit logs are full.
-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server.
n files by alerting when the files are changed. When setting up AIDE, decide internally what the site policy will be concerning integrity checking. Review the
et of shared objects that are loaded and executed when a program needs to authenticate a user. Files for PAM are typically located in the /etc/pam.d directo
g of sensitive data off the network.
ommand:
ese login
e. Any bannersmade
changes also to
has the side effect
/etc/login.defs willofonly
hiding
be OS version
applied information
if the and other detailed
usermod command is used. system information
If userIDs are addedfrom attackers
a different attempting
way, to target
use the chage specifi
command
e system, the fact that the system is subject to monitoring and that such monitoring is in compliance with local statutes, and that use of the system implies c
on that will be masked when the new filesystem is mounted. For example, if a system is in single-user mode with no filesystems mounted and the administr
rabilities discovered at a later date. If a service is not enabled, it cannot be exploited. The actions in this section of the document provide guidance on what
nd the scope of this benchmark to address software that is installed using non-standard methods and installation directories.
occurring on multiple systems, but having a second copy of the system log information may be critical after a system compromise where the attacker has m
e synchronization is the Network Time Protocol (NTP), which is supported by most network-ready devices. See the ntpd(8) manual page for more informatio
nts will be logged to /var/log/audit/audit.log. The recording of these events will use a modest amount of disk space on a system. If significantly more events
der to read log files. Also, if a third party log aggregation tool is used, it may need to have group permissions to read the log files, which is preferable to havi
ystem causing loss of audit data. While the recommendations here provide guidance, check your site policy for audit storage requirements.
egrity checking. Review the AIDE quick start guide and AIDE documentation before proceeding.
ated in the /etc/pam.d directory. PAM must be carefully configured to secure system authentication. While this section covers some of PAM, please consult
say,
attempting to target
use the chage specific to
command exploits
effect at a system.
changes to individual userIDs.
t use of the system implies consent to such monitoring. It is important that the organization's legal counsel review the content of all messages before any sy
y the users and does not contain software for system operations. The directives in this section are easier to perform during initial system installation. If the s
mounted and the administrator adds a lot of data to the /tmp directory, this data will still consume space in / once the /tmp filesystem is mounted unless it i
nt provide guidance on what services can be safely disabled and under which circumstances, greatly reducing the number of possible threats to the resultin
ise where the attacker has modified the local log files on the affected system(s). If a log correlation system is deployed, configure it to process the logs des
, which is preferable to having it run setuid to root. Therefore, there are two remediation and audit steps for log file permissions. One is for systems that do
me of PAM, please consult other PAM resources to fully understand the configuration capabilities.
all messages before any system modifications are made, as these warning messages are inherently site-specific. More information (including citations of r
al system installation. If the system is already installed, it is recommended that a full backup be performed before repartitioning the system.
One is for systems that do not have a secured group method implemented that only permits root to read the log files (root:root 600). The other is for sites t
ation (including citations of relevant case law) can be found at http://www.justice.gov/criminal/cybercrime/ [http://www.justice.gov/criminal/cybercrime/ ]
600). The other is for sites that do have such a setup and are designated as root:securegrp 640 where securegrp is the defined security group (in some ca
v/criminal/cybercrime/ ]
security group (in some cases wheel).