Lesson 1 of 4 Vulnerabilities of Systems and Architectures

Client, Server and Database Systems

Traditional client, server and database systems remain the core of most environments. This lesson covers their typical vulnerabilities and mitigations, including the database-specific problems of aggregation and inference.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify common vulnerabilities of client and server systems.
  • Distinguish aggregation from inference and describe database countermeasures.

Client-based systems

Clients such as desktops, laptops, tablets and phones are exposed to users and to untrusted content from email, websites and removable media. Typical weaknesses include unpatched operating systems and browsers, users with local administrator rights, malicious attachments and downloads, sensitive data cached locally and devices that are lost or stolen.

Mitigations include prompt patching, endpoint protection and EDR, application allowlisting, removal of local administrator rights, browser isolation for risky browsing, full-disk encryption and mobile device management with remote wipe.

Clients are the most common entry point for attacks because they are where untrusted content meets a human decision. The attacker does not need to break into a protected server if an employee will open a malicious document on a laptop that already has access to that server. Removing local administrator rights is one of the most effective client controls, because much malware needs those rights to install itself, disable protection or extract stored credentials. Client applications that store data locally, such as a sales app that caches customer records for offline use, also turn each device into a small database that must be encrypted and wiped when lost.

Applets and mobile code, such as scripts in web pages and macros in documents, run on the client with whatever rights the user or the host application has. The defences are to block macros from internet-sourced documents by default, keep browsers and their sandboxes current and avoid plug-ins that run code outside the browser's protections.

Scenario questions

Hardening the client

Exam skills 3.5.1

Choose the client control that addresses each weakness.

Log in to try this activity Interactive activities are free with an account.

Server-based systems

Servers concentrate data and services, so they are high-value targets. Weaknesses include unnecessary services and open ports, default configurations, missing patches, over-privileged service accounts and weak control of data flows between services.

Servers are hardened against a documented baseline: remove unneeded roles and software, apply least privilege to service accounts, restrict management interfaces to administrative networks, enable host firewalls and file integrity monitoring, and send logs to a central collector. Running one primary service per server limits the impact of a compromise.

Data flow control is a server weakness that is easy to miss. A web server that can open connections to any internal system gives an attacker who compromises it a launch point for the whole network. Restricting each server so that it can reach only the systems it needs, for example the web server may talk only to the application server on one port, contains a compromise. Outbound restrictions matter as well: a database server rarely needs to reach the internet, so blocking its outbound traffic stops malware from contacting its operators or sending data out.

Select all that apply

Containing a server compromise

Exam skills 3.5.2

Identify controls that limit what an attacker can do from a compromised server.

Log in to try this activity Interactive activities are free with an account.

Database systems

Databases face injection attacks, excessive privileges, unencrypted backups and two problems specific to stored data. Aggregation occurs when individually harmless pieces of data are combined into something more sensitive, such as many unclassified troop supply orders revealing an operation. Inference occurs when a user deduces sensitive information from data they are allowed to see, such as calculating one person's salary from department totals.

Countermeasures include views and cell suppression that limit what users see, polyinstantiation (storing different versions of a record for different clearance levels so that lower-cleared users cannot infer that a secret record exists), noise and perturbation in statistical results, parameterised queries, least privilege and database activity monitoring. Databases protect transaction integrity through the ACID properties: atomicity (all or nothing), consistency, isolation and durability.

Aggregation needs a different response from inference. Because each individual item is legitimately available, the control must look at the combination: limiting how many records a user can retrieve in a period, classifying a complete compilation at a higher level than its parts, and monitoring for users who query unusually large volumes. The ACID properties protect integrity in a different sense: atomicity ensures that a funds transfer either debits and credits both accounts or does neither, consistency ensures that each transaction leaves the database valid, isolation stops concurrent transactions from seeing each other's partial changes, and durability ensures that a committed transaction survives a crash.

The following diagram shows an inference through an aggregate query and the controls that prevent it.

An inference attack through an aggregate query. A user authorised to run statistical queries asks for an average over a group so small that one member's value can be deduced, for example a group of two that includes the user. Suppressing results for small groups or adding noise prevents it; encryption does not, because the query is authorised.
Aggregation and inference are classic database threats.
Match the pairs

Database threats and ACID

Exam skills 3.5.3

Match each database concept with its description.

Log in to try this activity Interactive activities are free with an account.
Worked example

Polyinstantiation in a logistics database

A military logistics database holds a record for a ship whose real cargo, weapons for a secret operation, is classified Secret. A user cleared only for Unclassified queries the ship's cargo. What should the database return?

If the database refused the query, or showed an empty field, the user could infer that something secret was being hidden. With polyinstantiation, the database stores two versions of the record at different levels, and the Unclassified user sees a plausible cover entry, such as general supplies.

The technique also prevents a lower-level user from accidentally overwriting a higher-level record when they insert a record with the same key.

Worked example

Preventing inference

An HR database lets managers query average salaries by department. A manager whose department has only two employees, one of whom is the manager, can calculate the other employee's salary exactly. What is the problem and the control?

This is an inference problem: the manager deduces confidential data from an aggregate they are allowed to see. Controls include suppressing results for groups below a minimum size (cell suppression) or adding noise to statistical results. Encrypting the database would not help, because the manager is authorised to run the query.

Check yourself

Which database technique stores different versions of a record for different clearance levels?

Show answer

Polyinstantiation, which prevents inference about higher-level data.

Exam Tips

Remember for the exam

  • Aggregation combines; inference deduces.
  • Polyinstantiation counters inference in multilevel databases.
  • Harden servers to a baseline and remove unneeded services.