/etc/sysctl.conf
. Once the file is editied please run sysctl -p
to enable those settings.
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
/etc/sysconfig/iptables
. To enable these rules restart iptables with 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 $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
config# 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
[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] Don't allow outsiders to alter routing tables.
[5] Prevents joining a smurf attack
[6] Protection from bad icmp error messages
[7] enables syncookies for protection against syn flood attacks
[8] Log spoofed, source routed and redirect packets
[9] Log spoofed, source routed and redirect packets
[10] Don't allow source routed packets
[11] Don't allow source routed packets
[12] Enable reverse path filtering
[13] Enable reverse path filtering
[14] Don't allow outsiders to alter routing tables.
[15] Don't allow outsiders to alter routing tables.
[16] Don't allow outsiders to alter routing tables.
[17] First 4 lines
[18] Disabling will break many network protocols, like tcp. Disable only if you know what you are doing.
[19] Disable for more security but more difficult network troubleshooting.
[20] Allow all localhost activity. Generally a good idea, don't disable this unless you know what you are doing.
[21] This combination of these TCP flags is not defined. By accepting packets from them, the results may be unexpected.
[22] This combination of these TCP flags is not defined. By accepting packets from them, the results may be unexpected.
[23] This combination of these TCP flags is not defined. By accepting packets from them, the results may be unexpected.
[24] This combination of these TCP flags is not defined. By accepting packets from them, the results may be unexpected.
[25] This combination of these TCP flags is not defined. By accepting packets from them, the results may be unexpected.
[26] This combination of these TCP flags is not defined. By accepting packets from them, the results may be unexpected.
[27] This combination of these TCP flags is not defined. By accepting packets from them, the results may be unexpected.
[28] This combination of these TCP flags is not defined. By accepting packets from them, the results may be unexpected.
[29] This combination of these TCP flags is not defined. By accepting packets from them, the results may be unexpected.
[30]
To open specific tcp ports to the world. The example above should replace $PORT
with a tcp port number, like 80 for http.
[31]
To open udp ports to the world. The example above should replace $PORT
with a tcp port number, like 161 for snmp.
[32]
To open tcp ports to specific hosts or networks. Using just IP address without a netmask is proper. If a network address is defined, netmask is required. The example above should replace $PORT
with a tcp port number, like 80 for http.
[33]
To open udp ports to specific hosts or networks. Using just IP address without a netmask is proper. If a network address is defined, netmask is required. The example above should replace $PORT
with a tcp port number, like 161 for snmp.
[34] Before last line
[35] As last line
[36] This flag goes against some known standards and makes troubleshooting more difficult. The security added is debatable.
Complete | Requirement | Action | Comment |
---|---|---|---|
Must Not | Password Dissemination | Any and all 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 law enforcement requires it. Discuss with your lawyer in the event of a required legal dissemination. Passwords should not be given to management, technical professionals, or anyone else who asks for it. | |
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. It should also not be echoed in any way to the terminal. If, for some reason, it is needed, be sure to unset your bash history with unset HISTFILE . When using this method, create a new shell, unset the histfile, run your commands and log that shell out. Go for as short of a time as you can without a histfile set, it only gets written on logout so unsetting it, running commands, and setting it again won't work. | |
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 integer. 3) All passwords must have at least 1 lower case letter. 4) all passwords must have at least 1 upper case letter. 5) all passwords must have at least one non letter / non number character in them. | |
Should | ssh ProxyCommand | When using a gateway or proxy host to get from your workstation to another group of machines, the most secure option is to use ssh's ProxyCommand. See 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 user output device (like keyboard, mouse and monitor for example), either lock the screen, shell, or log out completely. | |
Should Not | Password Reuse | You should not reuse passwords in environments where there is not a single sign on for everything. This is especially the case with password protected keys, encrypted shares, access to personal sites like retirement sites, bank, etc. Always maintain different passwords where possible. | |
Should Not | Software installation | Users should not install any software that is not approved. Contact your helpdesk for more information - 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. When possible scripts or programs should not be run as your normal user if possible. Especially if this user account has access to sensitive passwords or keys. | |
Must Not | Relocate information offsite | Information contained on file shares, or in databases on our servers should be assumed to have a non-sharable license. As such it should not be transfered offsite without the express written consent of both admin fedoraproject.org and admin fedoraproject.org. This includes printed copies or data in any form. Exceptions to this include logs that contain no private information (which is defined by our privacy policy). | |
Must | Key Security | Any keys kept on any host must be readable only by the owner or group of that key. It should have permissions as close to 0400 as possible. | |
Must | Key passwords | All private keys must be encrypted with unique passwords. These passwords must meet the same criteria as any other password. | |
Must | Encryption Backups | Users who use encryption keys must have those keys backed up to a location that can be taken offline. Ideally a usb key or other such 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 / restored. The filesystem this key backup exists on should be encrypted. | |
Must | Stolen / Missing Equipment | Any stolen or missing equpment containing any sensitive data including passwords or keys (even encrypted) must be reported as quickly as possible. When handled quickly, missing equipment is often a minor issue. |
Complete | Requirement | Action | Comment |
---|---|---|---|
Must | Password Sharing | When a password is not directly tied to a human-user (for example, mailman password or network device password), the shared password must only be stored and shared in an encrypted format among an assigned group. When any user is removed from this group, that password must be changed. Shared passwords should be avoided where 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 never 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, like that of a database for a web application, are considered shared passwords. See the section on "Password Sharing" for details. | |
Must Not | Self Access | Admins and users must not give themselves access to resources unless it is an emergency or a setup issue. Follow normal steps to get in a group and sponsored by someone. |
Complete | Requirement | Action | Comment |
---|---|---|---|
Must Not | Make Changes | Unless it is part of a task that is assigned to you, no one is to make any changes to a host without permission from the incident coordinator. This includes shutting services down, logging in or out, etc. | |
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. [37] | |
Must | Information Disclosure | Discussion of the incident must only happen between the team chosen by the incident coordinator. Before talking to someone, make sure they are on the list first. [38] | |
Must | Assumptions | Do not make any assumptions that something is being done, is already done, etc. Work 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 and not 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 to an agreed secure location. Provide a size estimate. Include basic details about the images including the architecture and what would be required to get these iamges up and running again. | |
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, not 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 invovle disabling central authentication altogether. |
Sign off | Task | Description |
---|---|---|
Notify Management | This is the initial "we have a problem" contact. It should be by phone, leave a message if no one answers and send an email. Ensure the following people have been contacted: legal@fedoraproject.org, fpl@fedoraproject.org | |
Threat Assessment | Once the Threat Assessment has been completed (below) email it to: legal@fedoraproject.org, fpl@fedoraproject.org. Ensure to let them know 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? | ||
Best initial guess, how long have we been compromised? |
Sign off | Task | Description |
---|---|---|
Entry Investigation | Answer the questions below. |
Complete | Question | Answer |
---|---|---|
How did the attacker gain entry to our services? | ||
Did the attacker have stolen credentials to gain access to our services? | ||
Is it possible / likely this was done by a malicious associate or by 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 the host(s) to gain access to our systems? | ||
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 / data stores do we need to audit? |
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 | If a partner has been determined to be affected / notified (see section: "Partner Communication"), ensure notifications going out do not jeopardize the integrety of any investigations they may be doing. | |
Service Repair | Once a service repair plan is put in place notify everyone which services will be unavailable during rebuild and repair. | |
Credentials | Once the environment is deemed secure, notify all affected parties and have them change their password. | |
Entry | Once the entry point has been found and fixed, let everyone know what the problem was and how it was fixed. If this was an unknown software vulnerability, work with upstream to fix the issue before sending this notification out. | |
Time line/Postmortem | Once the rebuild/repair phase is complete and services are back online 100% send a summary of what was done and why. This should include the same time line used by the incident response team to let people know what was done and when. |
Sign off | Task | Description |
---|---|---|
Investigation | Intrusion entry point discovered, summary and details sent to incident coordinator, entrypoint is closed / secured. |
Complete | Task | Description |
---|---|---|
Increase Logging | Increase logging of any and all services suspected of being involved in the attack. | |
File Motifications | Compare files to known good copies, as well as backup copies. rpm -V is telling. Additionally look at ctime, mtime and atimes. |
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 unaltered with. Compare to off site backups if necessary. | |
Database Data | Verify databases. Both the physical machines and the data in them. Depending on the level of access this may just be verifying a single database, it may mean looking at several. | |
Shared data | Verify shared data is as it should be. This includes removing any malicious files that had been left behind. Make a list of files that have changed during the incident window and verify them. | |
Temp/Cache Data | Remove any temporary or cached data and rebuild from scratch. Alternatively it may be more feasible to verify the local cache with remote cache. |
Sign off | Task | Description |
---|---|---|
Secure Environment | Ensure the below tasks 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 come up with a strategic order to the rebuilds if one is needed. |
[37] This is mostly to make sure people can work independently and not step on each others toes.
[38] Due to the sensitive nature of a security event, it's generally important to keep additional information from being exposed to the attacker(s). This restriction has the unfortunate side effect of decreasing openness about the handling of the event. Timely communication to the service's' users and resolution of the problem can help decrease the effect.