Product SiteDocumentation Site

Rozdział 14. Bezpieczeństwo

14.1. Definiowanie polityki bezpieczeństwa
14.2. Firewall or Packet Filtering
14.2.1. nftables Behavior
14.2.2. Moving from iptables to nftables
14.2.3. Syntax of nft
14.2.4. Installing the Rules at Each Boot
14.3. Supervision: Prevention, Detection, Deterrence
14.3.1. Monitoring Logs with logcheck
14.3.2. Monitoring Activity
14.3.3. Avoiding Intrusion
14.3.4. Detecting Changes
14.3.5. Detecting Intrusion (IDS/NIDS)
14.4. Wprowadzenie do AppArmor
14.4.1. Principles
14.4.2. Enabling AppArmor and managing AppArmor profiles
14.4.3. Creating a new profile
14.5. Introduction to SELinux
14.5.1. Principles
14.5.2. Setting Up SELinux
14.5.3. Managing an SELinux System
14.5.4. Adapting the Rules
14.6. Other Security-Related Considerations
14.6.1. Inherent Risks of Web Applications
14.6.2. Knowing What To Expect
14.6.3. Choosing the Software Wisely
14.6.4. Managing a Machine as a Whole
14.6.5. Users Are Players
14.6.6. Physical Security
14.6.7. Legal Liability
14.7. Dealing with a Compromised Machine
14.7.1. Detecting and Seeing the Cracker's Intrusion
14.7.2. Putting the Server Off-Line
14.7.3. Keeping Everything that Could Be Used as Evidence
14.7.4. Re-installing
14.7.5. Forensic Analysis
14.7.6. Reconstituting the Attack Scenario
System informacyjny może mieć różny poziom ważności w zależności od środowiska. W niektórych przypadkach, jest to kluczowe dla przetrwania firmy. Dlatego musi on być chroniony przed różnymi rodzajami ryzyka. Proces oceny tych zagrożeń, definiowania i wdrażania ochrony jest wspólnie nazywany "procesem bezpieczeństwa".

14.1. Definiowanie polityki bezpieczeństwa

Samo słowo "bezpieczeństwo" obejmuje szeroki zakres pojęć, narzędzi i procedur, z których żadne nie ma zastosowania uniwersalnego. Wybór spośród nich wymaga precyzyjnego określenia, jakie są twoje cele. Zabezpieczenie systemu rozpoczyna się od odpowiedzi na kilka pytań. Pośpieszne wdawanie się w arbitralny zestaw narzędzi grozi skupieniem się na złych aspektach bezpieczeństwa.
Pierwszą rzeczą do ustalenia jest zatem cel. Dobre podejście pomocnicze w określeniu celu zaczyna się od następujących pytań:
  • Copróbujemy ochronić? Polityka bezpieczeństwa będzie się różnić w zależności od tego, czy chcemy chronić komputer, czy dane. W tym drugim przypadku musimy też wiedzieć, jakie dane chcemy chronić.
  • Przed czym próbujemy chronić? Czy przed wyciekiem poufnych danych? Przed przypadkową utratą danych? Przed stratą przychodów spowodowaną przerwaniem (zatrzymaniem, uszkodzeniem) usługi?
  • Also, who are we trying to protect against? Security measures will be quite different for guarding against a typo by a regular user of the system than they would be when protecting against a determined attacker group.
The term “risk” is customarily used to refer collectively to these three factors: what to protect, what needs to be prevented from happening, and who will try to make it happen. Modeling the risk requires answers to these three questions. From this risk model, a security policy can be constructed, and the policy can be implemented with concrete actions.
Extra constraints are also worth taking into account, as they can restrict the range of available policies. How far are we willing to go to secure a system? This question has a major impact on the policy to implement. The answer is too often only defined in terms of monetary costs, but the other elements should also be considered, such as the amount of inconvenience imposed on system users or performance degradation.
Once the risk has been modeled, one can start thinking about designing an actual security policy.
In most cases, the information system can be segmented in consistent and mostly independent subsets. Each subsystem will have its own requirements and constraints, and so the risk assessment and the design of the security policy should be undertaken separately for each. A good principle to keep in mind is that a short and well-defined perimeter is easier to defend than a long and winding frontier. The network organization should also be designed accordingly: the sensitive services should be concentrated on a small number of machines, and these machines should only be accessible via a minimal number of check-points; securing these check-points will be easier than securing all the sensitive machines against the entirety of the outside world. It is at this point that the usefulness of network filtering (including by firewalls) becomes apparent. This filtering can be implemented with dedicated hardware, but a possibly simpler and more flexible solution is to use a software firewall such as the one integrated in the Linux kernel.