System hardening is the practice of securing a computer system by minimising its attack surface. Measures used can include the uninstallation of unneeded or unused software, especially those which run a network service, and the changing of various system or application settings from flexible default values to more secure values. This blog post investigates what hardening is meant to deliver, how it can be achieved, and the potential drawbacks or considerations that need to be kept in mind.
The concept of hardening, or target hardening to give it its full name or when referring to it out of context, originates in a concept that is used in the military and security services to refer to strengthening the security of a building or other physical installation. It would often include measures such as modifications to the building itself (such as upgraded doors and windows) as well as environmental alteration such as removing bushes or other ground cover that could offer hiding places or screened approach to the installation, as well as adding or improving gates, fences, or other barriers.
The idea behind the concept of hardening can serve many purposes, including:
• Providing a visibly strong defense that will deter attackers from making an attack against the target, in the knowledge that it may be expensive, time-consuming, or ultimately fruitless.
• Keeping adversaries at a distance; or
• protecting the target in the event of some form of attack by making it more resistant to various attack techniques, especially those involving brute force.
Although the techniques and materials are different in modern security environments, the same approach to hardening physical installations is in fact very common in the realm of physical security when designing modern real-world compute facilities such as data centres. The same principles were used for centuries in building castles with strong walls, and surrounding structures such as moats, ditches, fences and walls are all adopted still, albeit with different materials and technologies.
However, in this article we are not going to look at physical security and how hardening applies to data centres, but rather how analogous techniques can be used at the software level to improve the security of web applications and servers against electronic forms of attack. This form of server hardening is variously described as security auditing, compliance testing or system hardening.
Various factors combine to make web servers and web applications appealing targets for criminals and others: they can be accessed trivially across the internet from anywhere in the world, often anonymously; the attacker can remain safely distant in a different country that may provide both anonymity and immunity from prosecution; and the compromise of a web application server can often be lucrative to criminals in numerous ways, whether by permitting the extortion of money via ransomware, or the exfiltration (theft) of valuable data such as credit card numbers.
Those running web application servers and those trying to attack them are therefore in a constant arms race, and it pays dividends for anyone running a web application service to be able to better protect their organisation and its customers by ensuring that, as much as possible, measures are taken to deter attackers or prevent successful attacks against the web servers and their applications that they are responsible for.
Hardening is often described in the context of computer systems as the reduction of the attack surface of the system in question. The attack surface of a system or network is normally defined as the sum of the different points (“attack vectors”) via which the system is exposed to attack. It can alternatively be viewed as a combination of the ways in which actions that can be performed on a system remotely. This may include several components; from externally facing services to internal components such as an associated database or host operating system.
Intuitively, the more actions available to a user, or the more components accessible through these actions, the more exposed the attack surface. The more exposed the attack surface, the more likely the system could be successfully attacked, and hence the more insecure it is. If we can reduce the attack surface to each component, we can decrease the likelihood of attack and make a system more secure.
The number of potential ways in which a system can be hardened is extensive, but we provide a summary list of key considerations at a high level below. It is possible to apply the same essential principles to both a host/system configuration at the operating system level, as well as to an application or service configuration at the application level:
It is possible to go about reviewing system and application configuration manually, however there are generally hundreds of items that can be checked and can be extremely time-consuming and prone to error or inconsistency between systems. It is generally better to make use of an automated method for checking that a system is suitably hardened and actioning any recommendations after careful review.
System auditing scripts and tools include Lynis and Bastille but a number of other tools are also available. In general, most of these tools will be a delivery platform that provides either auditing (checking that a system is hardened and pointing out gaps or potential improvements) or hardening (automatic or guided application of a hardened configuration to a host). The actual hardening provided is generally drawn from one of several high-profile and trusted sets of configuration baselines that are maintained separately and able to be used as open standards for what a secure configuration baseline looks like – two of the more commonly applied standards are the CIS (Centre for Internet Security) Benchmarks, and OpenSCAP (Security Content Automation Protocol).
System hardening is undoubtably of net benefit to any organisation, but there are nevertheless some factors that need to be kept in mind as considerations:
AppCheck is a software security vendor based in the UK, offering a leading security scanning platform that automates the discovery of security flaws within organisations websites, applications, network, and cloud infrastructure. AppCheck are authorized by the Common Vulnerabilities and Exposures (CVE) Program as a CVE Numbering Authority (CNA)
As always, if you require any more information on this topic or want to see what unexpected vulnerabilities AppCheck can pick up in your website and applications then please get in contact with us: info@localhost
No software to download or install.
Contact us or call us 0113 887 8380
AppCheck is a software security vendor based in the UK, offering a leading security scanning platform that automates the discovery of security flaws within organisations websites, applications, network and cloud infrastructure. AppCheck are authorized by te Common Vulnerabilities and Exposures (CVE) Program aas a CVE Numbering Authority (CNA)