Study guide · Mitigations, Hardening and Asset Management
Mitigations, Hardening and Asset Management
A network is only as secure as its systems. On this page you learn how to harden systems, which protective tools exist and how they work together. These include firewalls, intrusion detection, endpoint protection, network access control and email protection. You also get to know deception techniques such as honeypots. The last part is about asset management: you can only protect what you know about. Devices go through a lifecycle from procurement to secure disposal. The running example is once again the mid-sized mail-order retailer with its online shop.
Hardening systems
Hardening means switching off what is not needed and configuring the rest securely. Every service, every account and every open port is a potential attack surface. Hardening removes unneeded software, closes unnecessary ports, changes default passwords and sets secure defaults. It is often based on templates called baselines, for example from vendors, CIS or the German BSI.
In Windows domains, such settings are distributed via Group Policy. This pushes requirements such as password rules, screen lock or disabled services centrally to all computers. On Linux there is SELinux. It enforces mandatory access control, MAC for short. A central policy defines what each process may do. Even root cannot simply override it while the system is running.
Hardening can have side effects. After a server is hardened, a business application stops working. Rolling back the hardening completely would be wrong. It is better to find the cause and allow only the necessary exception. The exception is documented and reviewed regularly. This way the server stays as secure as possible.
A strong form of hardening is application control with an allow list. Only approved programs may start, everything else is blocked. On workstations with many programs, this takes a lot of effort. On point-of-sale systems that run only a single application, however, it is the most effective measure against ransomware. Unknown malicious code never starts, even if no virus scanner knows it.
Firewalls and their rules
A firewall filters traffic according to rules. A layer 4 firewall checks addresses, ports and protocols. A layer 7 firewall also understands the application and inspects content, such as which web page is being requested. It is also called a next-generation firewall.
Rules are typically evaluated from top to bottom. The first matching rule applies, and the rest are no longer checked. At the end there is usually a rule that denies everything not explicitly allowed. That is why order matters: specific rules belong before general ones.
This exact mistake is in the rule list in the image. Rule 1 allows HTTPS from any source to any destination. As a result, the guest network also reaches the server network on port 443 before rule 2 is even checked. The fix: the deny rule for the guest network moves to the top, or rule 1 is restricted to the right sources and destinations.
For web applications there is the web application firewall, WAF for short. It filters HTTP requests to web applications and detects attacks such as SQL injection or cross-site scripting. Unified threat management, UTM for short, combines several protective functions in one device, such as firewall, antivirus, web filter and VPN. This is easy to manage, but a single device becomes a bottleneck and a single point of failure.
In front of a login API, rate limiting helps. It allows only a certain number of requests per time period. This slows down mass login attempts, such as when passwords are being tried one after another.
Detecting and stopping attacks
An IDS, an intrusion detection system, detects attacks and reports them. An IPS, an intrusion prevention system, can also block them. To do so, it sits directly in the traffic flow. A NIDS monitors an entire network. A HIDS runs on a single host and sees its files, processes and logs there. Attacks are detected through signatures of known patterns or through deviations from normal behavior.
An IPS can also block the wrong things. The retailer's online shop regularly blocks legitimate customers because the IPS produces many false positives. Switching off the IPS would be the wrong way. The team tunes signatures and thresholds based on the false positives. It first tests critical rules in detection mode. There they only report and do not block. Only once they work cleanly does the team switch them to blocking.
Wireless networks need monitoring too. A WIPS, a wireless intrusion prevention system, monitors WLANs and intervenes. For example, it detects rogue access points posing as the company network and can stop connections to them.