Data states
Data at rest, in transit and in use each need their own lock
Protect data at rest with encryption, data in transit with TLS, and data in use with access control and confidential computing.
Follow one customer record through its day. At rest, it sits on a disk, in a database, in last night’s backup. The threat: a stolen laptop or a copied backup. The control: encryption, with the keys kept somewhere safer than the disk. In transit, it crosses networks. The threat: someone listening or tampering on the way. The control: TLS, VPNs and SSH. In use, it sits decrypted in memory while a program works on it. Here encryption mostly cannot help, so access control and isolation do the work.
Encryption at rest · Going deeper
Full-disk, file, database and cloud encryption, and when each helps
Full-disk encryption protects a powered-off device; database and cloud encryption depend on who holds the keys.
Full-disk encryption protects a powered-off device; database and cloud encryption depend on who holds the keys. Full-disk encryption (BitLocker, FileVault) the whole drive, unlocked at boot with keys sealed in the TPM or secure enclave. Protects a lost or stolen device that is powered off; does nothing once a user is logged in. File and folder encryption protects chosen files even on a running system, and can travel with the file. Database encryption transparent data encryption covers the database files; column-level encryption protects specific fields even from database administrators. Cloud storage encrypted by default with provider keys; customer-managed keys in a KMS add control and an audit trail, and deleting the key makes the data unreadable (crypto-shredding). Removable media and backups encrypt them too; backups are a favourite target because they hold everything. Ask two questions of any “encrypted” claim: when is it decrypted, and who holds the key?
- Full-disk encryption (BitLocker, FileVault) the whole drive, unlocked at boot with keys sealed in the TPM or secure enclave. Protects a lost or stolen device that is powered off; does nothing once a user is logged in.
- File and folder encryption protects chosen files even on a running system, and can travel with the file.
- Database encryption transparent data encryption covers the database files; column-level encryption protects specific fields even from database administrators.
- Cloud storage encrypted by default with provider keys; customer-managed keys in a KMS add control and an audit trail, and deleting the key makes the data unreadable (crypto-shredding).
- Removable media and backups encrypt them too; backups are a favourite target because they hold everything.
Data classification
Classify data first, or every file gets the same protection
Data classification sets levels and handling rules; the data owner decides and labels carry the decision.
Not all data deserves the same care. A typical scheme has four levels. Public, such as a price list: anyone may see it. Internal, such as policies: all staff. Confidential, such as contracts: only teams who need them, encrypted at rest and in transit. And restricted, such as card data or health records: named people only, always encrypted, every access logged, never shared by default. The data owner decides the level. The label travels with the file, so encryption, access rules and data loss prevention can act on it automatically.
Data roles and types · Going deeper · 1 of 2
Owners, custodians, controllers, and the data types regulators care about
Know the data owner, data custodian, data controller and data processor, plus PII, PHI and sanitisation.
Know the data owner, data custodian, data controller and data processor, plus PII, PHI and sanitisation. Roles. Data owner a senior business person accountable for the data: sets classification and approves access. Data custodian operates the systems that store it: backups, encryption, access settings. Data steward looks after quality and correct use. Controller and processor (GDPR) the controller decides why and how personal data is used; a processor handles it on the controller’s behalf, such as a cloud payroll provider. Types of sensitive data. Location and end of life. Data sovereignty means data is subject to the laws of the country where it is stored, so many companies pin regions. At end of life, media is sanitised by clearing, purging or destroying it (NIST SP 800-88), with a certificate of destruction as evidence.
Roles
- Data owner a senior business person accountable for the data: sets classification and approves access.
- Data custodian operates the systems that store it: backups, encryption, access settings.
- Data steward looks after quality and correct use.
- Controller and processor (GDPR) the controller decides why and how personal data is used; a processor handles it on the controller’s behalf, such as a cloud payroll provider.
Types of sensitive data
Location and end of life
Data sovereignty means data is subject to the laws of the country where it is stored, so many companies pin regions. At end of life, media is sanitised by clearing, purging or destroying it (NIST SP 800-88), with a certificate of destruction as evidence.
Data classification · Going deeper · 2 of 2
Masking hides, tokens substitute, encryption locks, hashes fingerprint
Masking, tokenisation, encryption and hashing protect the same data in different ways; data minimisation beats them all.
Take one card number and protect it four ways. Masking shows only the last four digits. Perfect for a support agent, and it cannot be undone. Tokenisation swaps the number for a random token. Only a secure vault can map it back, so systems that hold only tokens fall out of PCI scope. Encryption scrambles it with a key. Anyone with the key gets it back, so protecting the key is everything. Hashing makes a one-way fingerprint, useful to check a match. But a card number is guessable, so the hash needs a secret key too.
Data loss prevention
DLP catches sensitive data on its way out the door
Data loss prevention (DLP) finds sensitive data by label, pattern or fingerprint and blocks, encrypts or logs it.
Classification tells you what matters. Data loss prevention watches it leave. Someone tries to send a spreadsheet of two thousand four hundred card numbers: to a personal email, a USB stick, or a personal cloud folder. The DLP policy recognises it: the restricted label, card-number patterns, and a checksum, the Luhn check, that weeds out random digits. Depending on the rule, it blocks and explains why, encrypts or asks for approval, or allows it and logs it for the security team.
Hardening
Hardening removes every door you do not need, and locks the rest
Hardening applies a secure baseline such as the CIS Benchmarks to reduce the attack surface.
A fresh install is built for convenience, not security. Hardening fixes that in four moves. Remove what is not needed: software, services, open ports, default accounts. Lock down what stays: new passwords, no everyday admin rights, a host firewall, disk encryption and secure boot. Keep it current: patches, firmware, and replacing anything past end of life. And watch it: logs to the SIEM, an EDR agent, and alerts when key files change. Write it down as a baseline, apply it automatically, and check that machines do not drift.
Managing devices · Going deeper
Mobile device management, BYOD and secure boot
MDM enforces policy on phones and laptops; BYOD separates work from personal; secure boot protects startup.
MDM enforces policy on phones and laptops; BYOD separates work from personal; secure boot protects startup. Mobile device management. MDM enrols devices and enforces policy: a passcode, encryption, OS version, approved apps, and remote wipe if a device is lost. Unified endpoint management (UEM) covers laptops and phones together. Corporate-owned (COPE, CYOD) the company controls the whole device and may allow personal use. Bring your own device (BYOD) a work container or work profile keeps company apps and data separate, and wipes only that part when someone leaves. Trusting startup. Secure boot UEFI firmware runs only a bootloader signed by a trusted key, blocking bootkits. Measured boot records each startup step in the TPM so a server can check (attest) the device is in a known-good state. Harder cases. Embedded and IoT devices (cameras, printers, building controls) often ship with default passwords and rarely get updates. Change the defaults, put them on their own network segment and keep an inventory.
Mobile device management
MDM enrols devices and enforces policy: a passcode, encryption, OS version, approved apps, and remote wipe if a device is lost. Unified endpoint management (UEM) covers laptops and phones together.
- Corporate-owned (COPE, CYOD) the company controls the whole device and may allow personal use.
- Bring your own device (BYOD) a work container or work profile keeps company apps and data separate, and wipes only that part when someone leaves.
Trusting startup
- Secure boot UEFI firmware runs only a bootloader signed by a trusted key, blocking bootkits.
- Measured boot records each startup step in the TPM so a server can check (attest) the device is in a known-good state.
Harder cases
Embedded and IoT devices (cameras, printers, building controls) often ship with default passwords and rarely get updates. Change the defaults, put them on their own network segment and keep an inventory.
Endpoint detection
EDR judges what a program does, not what the file looks like
EDR records endpoint behaviour, detects suspicious chains and can isolate a device; antivirus matches known files.
Here is a modern attack, step by step, on one laptop. A user opens an invoice from email. Word starts PowerShell with an encoded command: unusual already. PowerShell downloads a payload straight into memory, and rundll32 runs it. Nothing malicious ever lands on disk. Then it reads the memory of LSASS, where Windows keeps credentials. Signature antivirus scanned every file and found nothing. Endpoint detection and response saw the whole chain, raised a high alert, and cut the laptop off the network before the stolen credentials could be used.
Endpoint tools · Going deeper
Antivirus, EDR, XDR, MDR and application control
Know antivirus, EDR, XDR, MDR, HIPS, application allow listing and FIM.
Know antivirus, EDR, XDR, MDR, HIPS, application allow listing and FIM. Antivirus (EPP) blocks known malware by signature and heuristics. Still useful as a first filter. EDR continuous recording and behaviour detection on endpoints, with response actions: isolate, kill, collect evidence. XDR extends the same correlation across endpoints, email, identity, cloud and network. MDR a managed service: an outside team watches and responds around the clock. Host-based IPS (HIPS) blocks suspicious actions on the host, such as writing to system areas. Application allow listing only approved programs may run. Very strong, demanding to maintain; deny listing blocks known-bad ones. File integrity monitoring (FIM) alerts when critical system or configuration files change.
- Antivirus (EPP) blocks known malware by signature and heuristics. Still useful as a first filter.
- EDR continuous recording and behaviour detection on endpoints, with response actions: isolate, kill, collect evidence.
- XDR extends the same correlation across endpoints, email, identity, cloud and network.
- MDR a managed service: an outside team watches and responds around the clock.
- Host-based IPS (HIPS) blocks suspicious actions on the host, such as writing to system areas.
- Application allow listing only approved programs may run. Very strong, demanding to maintain; deny listing blocks known-bad ones.
- File integrity monitoring (FIM) alerts when critical system or configuration files change.
Secure development
Security is built into every stage of development, not tested in
A secure development lifecycle uses threat modelling, SAST, SCA, an SBOM, DAST and signed releases.
Applications are only as secure as the way they are built. Security starts at planning, with requirements and abuse cases. Design adds a threat model. Code gets peer review and static analysis. The build scans dependencies, produces a software bill of materials and checks for leaked secrets. Testing adds dynamic scans, fuzzing and penetration tests. Releases are signed, and production runs behind a WAF with monitoring. What production reveals feeds the next design. Shift left: a flaw caught at design costs a meeting; caught in production, it costs an incident.
Application security testing · Going deeper
SAST, DAST, SCA, fuzzing, SBOMs and secure coding basics
Compare SAST, DAST, IAST, SCA and fuzzing; an SBOM lists every component.
Compare SAST, DAST, IAST, SCA and fuzzing; an SBOM lists every component. Testing tools. SAST (static) reads source code for insecure patterns without running it. Early and thorough; noisy. DAST (dynamic) attacks the running application from outside, like a user. Finds real, reachable issues; later in the cycle. IAST instruments the running app to see inside while tests run. SCA (software composition analysis) finds known-vulnerable open-source dependencies, the way Log4Shell spread. Fuzzing feeds huge volumes of malformed input to find crashes and memory bugs. Supply chain. A software bill of materials (SBOM, in SPDX or CycloneDX format) lists every component and version, so when the next Log4Shell lands you can answer “are we affected?” in minutes. Pin and verify dependencies, sign builds, and keep secrets in a vault, never in code. Secure coding basics.
Testing tools
- SAST (static) reads source code for insecure patterns without running it. Early and thorough; noisy.
- DAST (dynamic) attacks the running application from outside, like a user. Finds real, reachable issues; later in the cycle.
- IAST instruments the running app to see inside while tests run.
- SCA (software composition analysis) finds known-vulnerable open-source dependencies, the way Log4Shell spread.
- Fuzzing feeds huge volumes of malformed input to find crashes and memory bugs.
Supply chain
A software bill of materials (SBOM, in SPDX or CycloneDX format) lists every component and version, so when the next Log4Shell lands you can answer “are we affected?” in minutes. Pin and verify dependencies, sign builds, and keep secrets in a vault, never in code.
Secure coding basics
Lesson complete
You finished “Protecting devices, applications and data”
Nicely done.