Edition 1
/etc/sysctl.conf file. Once the file is edited, run sysctl -p to enable the settings on a persistent basis.
| Complete | Requirement | Action | Service/Config |
|---|---|---|---|
| Should | Set | net.ipv4.ip_forward = 0[1] | |
| Should | Set | net.ipv4.conf.all.send_redirects = 0[2] | |
| Should | Set | net.ipv4.conf.default.send_redirects = 0[3] | |
| Must | Set | net.ipv4.conf.all.accept_redirects = 0[4] | |
| Must | Set | net.ipv4.icmp_echo_ignore_broadcasts = 1[5] | |
| Must | Set | net.ipv4.icmp_ignore_bogus_error_responses = 1[6] | |
| Must | Set | net.ipv4.tcp_syncookies = 1[7] | |
| Must | Set | net.ipv4.conf.all.log_martians = 1[8] | |
| Must | Set | net.ipv4.conf.default.log_martians = 1[9] | |
| Must | Set | net.ipv4.conf.all.accept_source_route = 0[10] | |
| Must | Set | net.ipv4.conf.default.accept_source_route = 0[11] | |
| Must | Set | net.ipv4.conf.all.rp_filter = 1[12] | |
| Must | Set | net.ipv4.conf.default.rp_filter = 1[13] | |
| Must | Set | net.ipv4.conf.default.accept_redirects = 0[14] | |
| Must | Set | net.ipv4.conf.all.secure_redirects = 0[15] | |
| Must | Set | net.ipv4.conf.default.secure_redirects = 0[16] |
/etc/sysctl.conf config# Kernel sysctl configuration file for Red Hat Linux # # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and # sysctl.conf(5) for more details. # Controls IP packet forwarding net.ipv4.ip_forward = 0 # Controls source route verification net.ipv4.conf.default.rp_filter = 1 # Do not accept source routing net.ipv4.conf.default.accept_source_route = 0 # Controls the System Request debugging functionality of the kernel kernel.sysrq = 0 # Controls whether core dumps will append the PID to the core filename. # Useful for debugging multi-threaded applications. kernel.core_uses_pid = 1 # Controls the use of TCP syncookies net.ipv4.tcp_syncookies = 1 # CSI Compliance net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 net.ipv4.conf.all.accept_redirects = 0 net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.icmp_ignore_bogus_error_responses = 1 net.ipv4.conf.all.log_martians = 1 net.ipv4.conf.default.log_martians = 1 net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_redirects = 0 net.ipv4.conf.all.secure_redirects = 0 net.ipv4.conf.default.secure_redirects = 0
iptables configuration can be made directly to /etc/sysconfig/iptables. To enable these rules restart iptables with the command service iptables restart.
| Complete | Requirement | Action | Config |
|---|---|---|---|
| Must | Set | *filter :INPUT DROP [] :FORWARD ACCEPT [] :OUTPUT ACCEPT [][17] | |
| Should | Set | -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT[18] | |
| Should | Set | -A INPUT -p icmp -j ACCEPT[19] | |
| May | Set | -A INPUT -i lo -j ACCEPT[20] | |
| Must | Set | -A INPUT -p tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j REJECT[21] | |
| Must | Set | -A INPUT -p tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -j REJECT[22] | |
| Must | Set | -A INPUT -p tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,PSH,URG -j REJECT[23] | |
| Must | Set | -A INPUT -p tcp --tcp-flags FIN,SYN FIN,SYN -j REJECT[24] | |
| Must | Set | -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j REJECT[25] | |
| Must | Set | -A INPUT -p tcp --tcp-flags FIN,RST FIN,RST -j REJECT[26] | |
| Must | Set | -A INPUT -p tcp --tcp-flags FIN,ACK FIN -j REJECT[27] | |
| Must | Set | -A INPUT -p tcp --tcp-flags PSH,ACK PSH -j REJECT[28] | |
| Must | Set | -A INPUT -p tcp --tcp-flags ACK,URG URG -j REJECT[29] | |
| Should | Use | -A INPUT -p tcp -m tcp --dport [30] | |
| Should | Use | -A INPUT -p udp -m udp --dport [31] | |
| Should | Use | -A INPUT -p tcp -m tcp -s $IPADDRES/$NETMASK --dport [32] | |
| Should | Use | -A INPUT -p udp -m udp -s $IPADDRES/$NETMASK --dport [33] | |
| Should | Set | -A INPUT -j LOG --log-prefix "FW-REJECT "[34] | |
| Must | Set | -A INPUT -j REJECT --reject-with icmp-host-prohibited[35] | |
| Should not | Use | -j DROP[36] |
/etc/sysconfig/iptables configuration# Firewall configuration written by system-config-firewall *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j REJECT -A INPUT -p tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -j REJECT -A INPUT -p tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,PSH,URG -j REJECT -A INPUT -p tcp --tcp-flags FIN,SYN FIN,SYN -j REJECT -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j REJECT -A INPUT -p tcp --tcp-flags FIN,RST FIN,RST -j REJECT -A INPUT -p tcp --tcp-flags FIN,ACK FIN -j REJECT -A INPUT -p tcp --tcp-flags PSH,ACK PSH -j REJECT -A INPUT -p tcp --tcp-flags ACK,URG URG -j REJECT # Add enabled ports here -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT # Log and reject everything else -A INPUT -j LOG --log-prefix "FW-REJECT " -A INPUT -j REJECT --reject-with icmp-host-prohibited COMMIT
| Category | Description |
|---|---|
| Low | The potential impact is LOW if the loss of confidentiality, integrity, or availability could be expected to have limited adverse effect on organizational operations, organizational assets or individuals. A limited adverse effect means that, for example, the loss of confidentiality, integrity, or availability might (i) cause a degradation in mission capability to an extent and duration that the organization is able to perform its primary functions, but the effectiveness of the functions is noticably reduced; (ii) result in minor damage to organizational assets; (iii) result in minor financial loss; or (iv) result in minor harm to individuals. |
| Moderate | The potential impact is MODERATE if the loss of confidentiality, integrity, or availability could be expected to have a serious adverse effect on organization operations, organizational assets, or individuals. A serious adverse effect means that, for example, the loss of confidentiality, integrity, or availability might (i) cause a significant degradation in mission capability to an extent and duration that the organization is able to performe its primary functions, but the effectiveness of the function is significantly reduced; (ii) result in significant damage to organizational assets; (iii) result in significant financial loss; or (iv) result in significant harm to individuals that does not involve loss of life or serious life threatnening injuries. |
| High | The potential impact is HIGH if the loss of confidentiality, integrity, or availability could be expected to have a severe or catastrophic adverse effect on organizational operations, organizational assets, or individuals. A severe or catastrophic adverse effect means that, for example, the loss of confidentiality, integrity, or availability might (i) cause a severe degradation in or loss of confidentiality, integrity, or availability might (i) cause a severe degradation in or loss of mission capability to an extent and duration that the organization is not able to perform one or more of its primary functions; (ii) result in major damage to organizational assets; (iii) result in major financial loss; or (iv) result in severe or catastrophic harm to individuals involving loss of life or serious life threatning injuries. |
/etc/system_identification. This summary should contain the following information:
Security Category: Moderate Primary Contact: Joe Example example@example.com - (555) 322-9511 Environment: Production Purpose: Provide web services Relationship: This host relies on db[1-2] for it's primary data layer and is contacted by proxy[1-5] for that service. This document is provided as part of CSI standards. See http://infrastructure.fedoraproject.org/csi/security-policy/ for more information.
[1] Unless this host serves as a network device, do not pass traffic between networks.
[2] Unless this host serves as a network device, do not act like a network device.
[3] Unless this host serves as a network device, do not act like a network device.
[4] Do not permit outsiders to alter routing tables.
[5] Prevents this host from joining a smurf attack
[6] Protection from bad ICMP error messages
[7] Enables syncookies for protection against syn flood attacks
[8] Log any spoofed, source routed and redirect packets
[9] Log any spoofed, source routed and redirect packets
[10] Do not allow source routed packets
[11] Do not allow source routed packets
[12] Enable reverse path filtering
[13] Enable reverse path filtering
[14] Do not allow outsiders to alter routing tables.
[15] Do not allow outsiders to alter routing tables.
[16] Do not allow outsiders to alter routing tables.
[17] First 4 lines
[18] Disabling will break many network protocols, like TCP. Disable this rule only if you know what you are doing.
[19] Disable for more security, but understand that doing so creates more difficulty in network troubleshooting.
[20] Allow all localhost activity. Generally a good idea, so do not disable this unless you know what you are doing.
[21] The combination of these TCP flags is not defined. Accepting packets so marked may cause unexpected results.
[22] The combination of these TCP flags is not defined. Accepting packets so marked may cause unexpected results.
[23] The combination of these TCP flags is not defined. Accepting packets so marked may cause unexpected results.
[24] The combination of these TCP flags is not defined. Accepting packets so marked may cause unexpected results.
[25] The combination of these TCP flags is not defined. Accepting packets so marked may cause unexpected results.
[26] The combination of these TCP flags is not defined. Accepting packets so marked may cause unexpected results.
[27] The combination of these TCP flags is not defined. Accepting packets so marked may cause unexpected results.
[28] The combination of these TCP flags is not defined. Accepting packets so marked may cause unexpected results.
[29] The combination of these TCP flags is not defined. Accepting packets so marked may cause unexpected results.
[30]
This rule opens specific TCP ports to the world. When using this example, replace $PORT with a TCP port number such as 80 for HTTP traffic.
[31]
This rule opens UDP ports to the world. When using this example, replace $PORT with a UDP port number such as 161 for SNMP traffic.
[32]
This rule opens TCP ports to specific hosts or networks. Using an IP address without a netmask is proper. If a network address is defined, the netmask is required. When using this example, replace $PORT with a TCP port number such as 80 for HTTP traffic.
[33]
This rule opens UDP ports to specific hosts or networks. Using an IP address without a netmask is proper. If a network address is defined, the netmask is required. When using this example, replace $PORT with a UDP port number such as 161 for SNMP traffic.
[34] Before last line
[35] As last line
[36] This flag violates some known standards and makes troubleshooting more difficult. The security added is debatable.
[37] See http://csrc.nist.gov/publications/nistpubs/800-123/SP800-123.pdf for more information.
| Complete | Requirement | Action | Comment |
|---|---|---|---|
| Must Not | Password Dissemination | Any passwords must be kept secret, known only to the person who created them. Under no circumstances should a user give a password to anyone, unless required by law enforcement. Discuss with your legal counsel in the event of a required legal dissemination. Passwords should not be given to management, technical professionals, or anyone else who asks for them. | |
| Must Not | Host authentication | Do not log in to any password- or key-protected services from any hosts that are not your personal workstation or a machine or host run by The Fedora Project. | |
| Must Not | Password Usage | Users must not type their plain text passwords into a file on an unencrypted filesystem. Users must also ensure they do not display their passwords on a terminal using any method that records them to an alternate, unsecured location. If, for some reason, a password is displayed in this way, such as typing the password directly in a shell command, be sure to deactivate the retention of shell history, such as unset HISTFILE in the case of the bash shell. When using this method, create a new shell, deactivate the shell history retention, run your commands and log out of that shell as soon as possible. Shell history is written at logout time, so you cannot "hide" commands by temporarily turning off shell history retention. | |
| Must | Password Entropy | All passwords must meet all of the following requirements: (1) Passwords must be at least 8 characters long. (2) Each password must have at least 1 numeric character. (3) Each password must have at least 1 lower case letter. (4) Each password must have at least 1 upper case letter. (5) Each password must have at least one non-alphanumeric character in them. | |
| Should | ssh ProxyCommand | When using a gateway or proxy host to access another group of machines from your workstation, the most secure option is to use the ssh command's ProxyCommand option. Refer to man ssh_config for more information on proper setup. | |
| Must | Desktop Locking | Any time you physically leave your workstation or any other host that contains a user input or output device such as a keyboard, mouse, or monitor, either lock the screen or shell, or log out completely. | |
| Should Not | Password Reuse | Avoid reusing passwords in environments where there is not a single sign on capability. This is especially important in the case of password protected keys, encrypted shares, access to sensitive personal sites such as banking or other finances, and so on. Always maintain different passwords wherever possible. | |
| Should Not | Software installation | Users should not install any unapproved software. Contact your helpdesk for more information at fedora-infrastructure-list@redhat.com. Advanced or power users who are running programs or scripts that have not been installed by the helpdesk may be liable for any damage they do. Whenever possible scripts or programs should be run under a freshly created user account with standard privileges, to limit access to sensitive passwords or keys. | |
| Must Not | Relocate information offsite | Information contained on file shares, or in databases on infrastructure servers should be assumed to have a non-shareable license. This information should not be transfered offsite without the express written consent of both admin fedoraproject.org and admin fedoraproject.org, including printed copies or data in any form. Exceptions to this rule may include logs that contain no private information, as defined by the applicable privacy policy. | |
| Must | Key Security | Keys retained on any host must be readable only by the owner or group of that key, and ideally should retain file permissions that allow the user owner to read them, but prevent any other access. In UNIX parlance this is a permission setting of 0400. | |
| Must | Key passwords | All private keys must be encrypted with unique passwords. These passwords must meet the criteria laid out above. | |
| Must | Encryption Backups | Users who use encryption keys must retain backups of those keys in a location that can be taken offline, ideally a USB key or other detachable device. This device must be kept in a secure location and only connected to a host while a backup is being made, or while a key from that device is being used or restored. The filesystem on which this key backup exists should be encrypted. | |
| Must | Stolen or Missing Equipment | Any stolen or missing equpment containing any sensitive data including passwords or keys, whether encrypted or not, must be reported as quickly as possible. When handled expediently, issues due to missing equipment can be easily mitigated. |
| Complete | Requirement | Action | Comment |
|---|---|---|---|
| Must | Password Sharing | When a password is not directly tied to a human-user (for example, a mail management software password or network device password), the shared password must be stored and shared in an encrypted format accessible only by an assigned group. When any user is removed from this group, that password must be changed. Shared passwords should be avoided wherever feasible. | |
| Must | Role Accounts | Accounts that provide access to resources for purpose of automation or other system related access must be tied to an individual user and not shared. The person associated with that account may change, but no more then one person at a time should be responsible for a role based account. | |
| Must | Data Access Passwords | Passwords that provide access to data resources, such as a database for a web application, are considered shared passwords. See the exception on "Password Sharing" for details. | |
| Must Not | Self Access | Administrators and users must not give themselves access to resources unless there is an extant emergency or a setup issue. Follow normal procedures to obtain group membership or sponsorship. |
| Complete | Requirement | Action | Comment |
|---|---|---|---|
| Must Not | Make Changes | Unless it is part of a task that is assigned to you, do not make any changes to a host without permission from the incident coordinator. This includes shutting services down, logging in or out, and other configuration changes. | |
| Must Not | Task Assignment | Incident team members must not work on tasks that have not explicitly been assigned to them without discussing it with the incident coordinator or the task leader. [38] | |
| Must | Information Disclosure | Discussion of the incident must only happen between the members of the team chosen by the incident coordinator. Before discussing any incident with someone, make sure they are on the list of team members. [39] | |
| Must | Assumptions | Do not make any assumptions about task assignments or completion. Discuss any concerns you have with the incident coordinator. |
| Sign off | Task | Description |
|---|---|---|
| Snapshot | If possible, take two LVM snapshots of all volumes on affected systems. If possible, take a snapshot at the disk level to get an entire disk image, as opposed to logical volume images. If LVM is not being used, try to dd the block device somewhere piping through ssh. | |
| Snapshot Copy | Work with the incident coordinator to copy the images from the "Snapshot" task above to an agreed secure location. Provide a size estimate. Include basic details about the images, including the architecture and the requirements to restore these images to a running state. | |
| Log Copy | Make an off-site copy of any relevant logs. | |
| Incident Response Team List | Create and maintain a list of people who are aware of the compromise and its details. Once the list is made, it must not grow without the approval of the incident coordinator unless already specified in this incident response plan. | |
| Time line | Create and maintain a time line, sorted by the actual time an event took place. The timeline should indicate the actual time of events and not simply the time of discovery. | |
| Disabling Authentication | Aside from the incident response team, disable access to any hosts that are suspected as compromised. In extreme cases this may involve disabling central authentication altogether. |
| Sign off | Task | Description |
|---|---|---|
| Notify Management | This is the initial contact through which management is notified that an incident has either occurred or is in progress. Contact is to be made by phone, and all contact numbers should be used until either the manager has been reached, or the list of contact numbers has been exhausted. A message is to be left at each number if no one answers. Phone contact must be followed up by email, whether or not the manager was reached directly. Ensure the following people have been contacted: legal@fedoraproject.org, fpl@fedoraproject.org | |
| Threat Assessment | Complete the Threat Assessment below, and email it to: legal@fedoraproject.org, fpl@fedoraproject.org. Inform the recipients that until the final assessment has been completed, the information provided should be considered preliminary. Additionally include a copy of the time line in its current state. |
| Sign off | Task | Description |
|---|---|---|
| Threat Assessment | Answer the questions below. |
| Complete | Question | Answer |
|---|---|---|
| Could this incident impact end users or customers? | ||
| Could this incident impact contributors, contractors, co-workers, or partners? | ||
| Could private data have been read or written to by the attacker? | ||
| Has private data been read or written to by the attacker? | ||
| Provide an estimate of how long the incident has been occurring. |
| Sign off | Task | Description |
|---|---|---|
| Entry Investigation | Answer the questions below. |
| Complete | Question | Answer |
|---|---|---|
| How did the attacker gain entry to the services? | ||
| What is the likelihood the incident was caused by (1) a malicious associate, or (2) someone without any prior association with The Fedora Project? | ||
| Did the attacker use a known or unknown vulnerability in software installed on the system? | ||
| Did the attacker use physical access to any of the host(s) covered by this plan to gain additional access? | ||
| Did the attack appear to come from other machines operated by The Fedora Project? | ||
| Did the attack appear to come from machines operated by any of our hosting providers? |
| Sign off | Task | Description |
|---|---|---|
| Impact Assessment | Answer the questions below. |
| Complete | Question | Answer |
|---|---|---|
| Which hosts are impacted? | ||
| Which services are potentially impacted? | ||
| Which databases or other data stores require auditing to ensure their integrity? |
| Sign off | Task | Description |
|---|---|---|
| Partner Notification | At the discretion of the incident coordinator, contact partner with details about the incident for further investigation. |
| Sign off | Task | Description |
|---|---|---|
| Initial Notification | Let everyone know that an incident has happened. | |
| Partner Integrity | When a partner has been determined to be affected and therefore notified (refer to Section 4.3.5, “Partner Communication”), outgoing notifications must not jeopardize the integrety of any investigations underway by those partners. | |
| Service Repair | Once a service repair plan is formulated, notify all affected parties about any service availability changes during rebuild and repair. | |
| Credentials | Once the environment is deemed secure, notify all affected parties and institute a system-wide password change by all account holders. | |
| Entry | Once the entry point has been located, assessed, and repaired, and investigations are completed, notify all affected parties of the cause of the incident and the specific repairs undertaken to prevent recurrence. | |
| Time line/Postmortem | Once the rebuild/repair phase is complete and services are returned to normal, send a summary of the repairs undertaken and, if appropriate, the rationale for these actions. This communication should include the same time line used by the incident response team. |
| Sign off | Task | Description |
|---|---|---|
| Investigation | Once the intrusion entry point discovered, send a summary and details to the incident coordinator. | |
| Mitigation | Ensure the point of entry is closed or properly secured. |
| Complete | Task | Description |
|---|---|---|
| Increase Logging | Increase logging of any and all services suspected of being involved in the attack to a level sufficient to determine that no unauthorized access is ongoing. | |
| File Notifications | Compare files to known good copies, as well as backup copies. Use best practices such as the rpm -V command to ensure the integrity of system contents. If appropriate, examine file metadata such as change, modify, and access times to develop information about the nature of the incident. |
| Sign off | Task | Description |
|---|---|---|
| Data Integrity | Ensure the below table has been completed and is accurate. |
| Complete | Task | Description |
|---|---|---|
| Configuration Management | Ensure the configuration management repository is intact and has not been altered as a result of an unauthorized access. Compare to off-site backups if necessary. | |
| Database Data | Verify hosts containing any databases, and the data that resides therein. The nature of this task depends on the extent of any unauthorized access. The incident response team must reach an informed consensus on the procedures required. | |
| Shared data | Verify shared data has not been altered as a result of an unauthorized access. Malicious files that may have been left behind during the incident should be listed and removed from the system. Make a list of files that have changed during the incident window and verify them. | |
| Temporary or Cached Data | Remove any temporary or cached data and rebuild from scratch. If this procedure is not feasible, verify the local cache against a known good remote cache. |
| Sign off | Task | Description |
|---|---|---|
| Secure Environment | Ensure the tasks below have been completed successfully. |
| Complete | Task | Description |
|---|---|---|
| Host Rebuilds | Rebuild any hosts that have been compromised or are suspected of compromise. Work with the incident coordinator and task coordinator to develop a strategic order for rebuilding if necessary. |
[38] Maintaining strict task separation ensures that team members can work independently and not step on each others toes.
[39] Due to the sensitive nature of a security event, additional information should not be exposed to the attacker(s). This restriction has the unfortunate side effect of decreasing openness about the handling of the event. Timely communication to service users and efficient resolution of the problem can help decrease this effect.
| Revision History | |||
|---|---|---|---|
| Revision 1 | Wed Apr 28 2010 | ||
| |||