- Learn
- Computer Science & IT
- Cybersecurity
- Cybersecurity Fundamentals
- System Hardening and Patching
System Hardening and Patching: Finding Vulnerabilities
BeginnerLesson 7 of 8 in Cybersecurity Fundamentals Course
What you will learn
- Tell vulnerabilities apart from threats, exploits and risk, follow a vulnerability from discovery to fix, and recognize the main kinds of weakness in software, settings, hardware, virtualization, cloud services and the supply chain.
- Define vulnerabilities and follow their life cycleUse the terms vulnerability, threat, exploit, risk and attack surface correctly and describe how a vulnerability moves from discovery to disclosure, patch and exploitation.
- Recognize software and application vulnerabilitiesExplain how memory errors, race conditions, injection flaws, unsafe updates and operating-system flaws arise in software, and name the main defense against each.
- Recognize weaknesses in settings, hardware, cloud services and suppliersIdentify vulnerabilities that come from configuration, outdated or unmanaged equipment, virtualization, cloud use, cryptography and third parties rather than from one coding bug.
- Define vulnerabilities and follow their life cycle
- Explain how vulnerabilities are discovered with scans and tests, how they are named and described in shared databases, and how the Common Vulnerability Scoring System rates their severity.
- Find vulnerabilities with scans and testsCompare scanning, penetration testing and other discovery methods, read a basic scan finding and decide whether it is real.
- Look up vulnerabilities with CVE, CWE and the NVDUse the shared identifiers and databases to find a vulnerability's details, tell a single flaw from a weakness type and check whether it is being exploited.
- Read and interpret CVSS scoresExplain what the Common Vulnerability Scoring System measures, read a vector string, match scores to severity ratings and avoid treating a score as the full risk.
- Find vulnerabilities with scans and tests
- Plan, test, deploy and verify security updates across an organization, and protect systems that cannot be patched quickly or at all.
- Run the patch management cycleFollow the steps from knowing what you own to proving that an update worked, including prioritization, testing, staged rollout and a way back.
- Protect systems that cannot be patched quicklyRespond to zero-days and emergencies, and reduce risk with workarounds and compensating controls when a patch is unavailable, unsafe or impossible.
- Run the patch management cycle
- Reduce the attack surface of computers and other devices, turn hardening into documented baselines that are deployed and kept up to date, and adapt hardening to network devices, cloud resources and specialized systems.
- Reduce the attack surface of a computerApply the core hardening techniques to a workstation or server and explain how each one removes a way in.
- Establish, deploy and maintain secure baselinesBuild a documented secure configuration from a trusted benchmark, roll it out consistently and keep systems from drifting away from it.
- Harden network devices, cloud resources and specialized systemsApply hardening to switches and routers, servers, cloud infrastructure, and embedded, IoT and industrial systems, which each allow different controls.
- Reduce the attack surface of a computer
- Replace insecure protocols with secure ones, protect remote administration, and apply the key secure settings for web, DNS and email services.
- Choose secure protocols and portsReplace clear-text protocols with encrypted alternatives, know the standard ports of common services and keep TLS settings current.
- Secure remote administrationConfigure SSH, Remote Desktop and device management interfaces so administrators can work remotely without opening a way in for attackers.
- Secure web, DNS and email servicesApply the main secure settings for web servers, DNS servers and email domains and explain what each setting protects against.
- Choose secure protocols and ports
- Combine endpoint security tools, manage and secure mobile devices, configure Wi-Fi securely and apply the basic controls that make applications harder to attack.
- Protect endpoints with layered security toolsCompare antivirus, EDR, XDR, host firewalls, intrusion prevention and application control, and combine them so each layer covers gaps in the others.
- Secure mobile devicesChoose a deployment model, enforce settings with mobile device management and explain the risks of jailbreaking, sideloading and mobile connections.
- Secure wireless networksConfigure Wi-Fi with current encryption and authentication, plan access-point placement and detect rogue access points.
- Apply application security basicsExplain the main controls that make applications harder to attack: input validation, secure cookies, code signing, security testing, dependency updates, secrets handling, least privilege and web application firewalls.
- Protect endpoints with layered security tools
System Hardening and Patching study guide
1Explain how vulnerabilities arise and what kinds exist
Weaknesses can arise in code, settings, devices, and the organizations that supply them. Describing each weakness accurately helps you choose a useful response: a code patch, a configuration change, tighter access, or a replacement. Start by connecting vulnerability, threat, exploit, and risk, then follow the ways software and surrounding systems can fail. Public incidents show why a known fix and an installed fix are different things.
1.1 Weaknesses, attacks, and the time to fix them
A system can have a weakness long before anyone attacks it. Clear terms help you describe what is wrong, what could happen, and what action will reduce the danger.
Connect four security terms
A vulnerability is a weakness in software, hardware, settings, or a process that could harm confidentiality, integrity, or availability. A threat is something that could cause that harm, such as an attacker or malware. An exploit is the code or technique that uses a particular weakness. Risk combines the likelihood of harm with its impact.
Suppose a company uses an old file-upload library on its public website. The library's flaw is the vulnerability. A ransomware group searching for affected sites is the threat. Its script that triggers the flaw is the exploit. Customer records and internet access make the risk serious. The same flaw on an isolated test machine has the same technical weakness but a different risk.
Find the ways in
The attack surface is the set of places an attacker can try to enter a system or move data out. It includes network services, accounts, applications, web forms, application programming interfaces (APIs), physical ports, cloud consoles, and people who can be tricked. An unused service still gives an attacker something to test.
Hardening reduces those entry points, for example by disabling an unused remote-access service. Patching fixes known weaknesses in the software that remains. Neither action makes the attackers disappear.
Follow a vulnerability through time
A typical life cycle looks like this:
- A weakness enters code, hardware, or a configuration.
- A vendor, researcher, or attacker discovers it.
- The finding is reported and disclosed.
- The vendor issues an advisory, fix, or workaround, often linked to a CVE identifier.
- Organizations apply the fix to their affected systems.
- Attackers use published details to target systems still running the vulnerable version.
The steps can overlap: attackers may exploit a flaw before it is disclosed. Coordinated disclosure gives the vendor private notice and time to prepare a fix before details are published. Some policies use a deadline, such as 90 days. A bug bounty rewards researchers for reports made through the program's agreed process.
Understand the exposure window
A zero-day is known to or used by attackers before a vendor fix is available. Once a fix exists, organizations still have to install it. The exposure window is the time a system remains vulnerable after exploitation becomes possible; downloading an update without applying it leaves that window open.
Microsoft published MS17-010 on March 14, 2017. WannaCry began spreading through an SMBv1 file-sharing flaw on May 12, 2017, 59 days later. The outbreak affected more than 230,000 computers in about 150 countries. A fix had been available for almost two months, but many systems had not received it.
A quiet system can still contain vulnerabilities. Reports of attacks describe what has been observed; scans, advisories, and testing help uncover weaknesses before an attack makes them visible.
Key Takeaways
- Vulnerability means weakness; threat means a possible source of harm; exploit means a way to use the weakness.
- Risk depends on likelihood and impact, so identical flaws can create different risks.
- Hardening shrinks the attack surface; patching fixes known weaknesses.
- Coordinated disclosure gives vendors time to prepare a fix before publication.
- A fix closes the exposure window only after it is applied successfully.
1.2 How software weaknesses let attacks work
Software becomes vulnerable when it handles data, timing, permissions, or trusted components unsafely. Recognizing the failure helps you choose a defense that addresses its cause.
Memory and timing errors
A buffer overflow writes beyond a fixed area of memory. If a buffer holds 16 bytes and receives 200 bytes without a bounds check, 184 bytes exceed its capacity. They can corrupt nearby data, crash a process, or alter control information. C and C++ require particular care with bounds. Data execution prevention (DEP) and address space layout randomization (ASLR) make exploitation harder; a code fix removes the defect. A crafted-input crash shows an availability problem, but its cause still needs investigation before you conclude that code execution is possible.
Memory injection runs malicious code inside another process, sometimes by loading a dynamic-link library (DLL). The injected code gains the process's permissions. Some methods stay in memory; others load disk files. Endpoint detection and response tools look for suspicious process behavior.
A race condition depends on operations occurring in the wrong order. In a time-of-check to time-of-use (TOCTOU) flaw, a program checks a file, then an attacker swaps the resource before it is used. Making the check and action atomic—one indivisible operation—closes that timing gap. For example, two simultaneous withdrawals of 80 can both read a balance of 100 and wrongly release 160 if the balance check and update are not protected together.
Keep input from becoming instructions
| Weakness | What happens | Main defense |
|---|---|---|
| Structured Query Language (SQL) injection | User input changes a database command | Parameterized queries |
| Cross-site scripting (XSS) | Attacker-controlled content runs as script in a visitor's browser | Context-appropriate output encoding |
A login query built by joining SQL text and typed input can treat part of the input as a condition. A parameterized query sends the value separately as data, so it cannot become query syntax. Validation and a database account with limited rights add protection.
For XSS, imagine a comment rendered as executable page content. Output encoding makes the browser display text in that location. Content Security Policy limits allowed scripts, and HttpOnly limits scripts' access to session cookies. Blocking a list of suspicious characters misses unexpected ways to express an attack.
Weaknesses in code and updates
A hardcoded secret is a password or API key embedded in code or a readable configuration. Anyone who obtains it may gain access. Unsafe exception handling can expose paths and database details, or allow access after an authorization check errors. Code review and scanning help find these defects.
A malicious update arrives through a compromised build or update system. In 2020, attackers inserted a backdoor into SolarWinds Orion updates downloaded by up to about 18,000 customers. Some compromised updates had valid signatures. Official download channels and signature checks remain useful, alongside testing and monitoring after installation.
Operating-system flaws affect kernels, drivers, and built-in services. They can enable privilege escalation, where a normal user gains administrator rights, or remote takeover. Vendors issue routine security releases and urgent out-of-band fixes. Microsoft's regular monthly release is on the second Tuesday, often called "Patch Tuesday."
Key Takeaways
- Buffer bounds checks prevent writes into neighboring memory; DEP and ASLR limit exploitation.
- Atomic checks and actions prevent TOCTOU timing gaps.
- Parameterized queries keep database input separate from SQL commands.
- Output encoding addresses XSS; browser scripts and database queries are different targets.
- A valid update signature establishes origin and integrity, while a compromised build can still deliver malware.
- OS flaws, hardcoded secrets, and unsafe error handling need fixes as well as runtime protection.
1.3 Weaknesses beyond application code
A fully patched program can still run in an unsafe environment. Settings, device support, cloud permissions, and suppliers all affect the paths available to an attacker.
Settings and assets
A misconfiguration is an unsafe setting, such as public file permissions, debugging left on, unnecessary services, or logging disabled. Fix it by changing the setting. A patch for unrelated code will leave the permission unchanged.
Change factory default credentials during setup. Public manuals often list them. Mirai used about 60 common username-and-password pairs to take over large numbers of cameras and routers in 2016, then combined them into a denial-of-service network.
Firmware is low-level software in devices, including routers and a computer's Unified Extensible Firmware Interface (UEFI) startup software. Reinstalling an operating system leaves device firmware in place, so firmware needs its own update process. Legacy equipment is older technology still needed for a business task. A product at end of life (EOL) no longer receives its normal security updates. Windows 10's regular support ended on October 14, 2025; extended security update arrangements provide a limited additional route for eligible installations.
An inventory must also find unmanaged assets. Shadow IT is technology staff adopt without approval; a rogue access point is an unauthorized device connected to the network. Stale credentials are accounts or keys that remain usable after their purpose ends. Forgotten devices and accounts escape routine patching and review.
Virtual machines and cloud services
A virtual machine (VM) normally stays inside an isolated environment controlled by a hypervisor. A VM escape breaks that boundary, allowing access to the host or other VMs. Resource reuse can leak a previous VM's data if reassigned memory or storage is not cleared. Hypervisors need patches and secure settings too.
Cloud security follows shared responsibility. Providers protect physical facilities and the underlying platform. Customers configure their accounts, access, network rules, and data. In infrastructure as a service (IaaS), customers also patch and harden guest operating systems and applications.
For example, an analyst makes a bucket of exports public for a test and leaves it public. Anyone who finds the address can read it. The provider's infrastructure can work exactly as designed while the customer's data is exposed.
Cryptography and suppliers
Cryptographic weaknesses include obsolete algorithms or protocols, short keys, weak randomness, invalid certificates, and exposed private keys. MD5 and SHA-1 are unsuitable for secure signatures; DES, RC4, SSL, and TLS 1.0/1.1 are outdated. Even strong encryption loses its protection if an attacker obtains its key from beside the encrypted data.
Suppliers can introduce risk through software components, hardware firmware, and remote support access. A software bill of materials (SBOM) lists components so owners can find affected products when a library has a flaw. In March 2024, a backdoor was discovered in XZ Utils 5.6.0 and 5.6.1, identified as CVE-2024-3094, before it reached most stable Linux releases. Assess suppliers, verify updates, and maintain component records; the dependency can matter even when your team did not write it.
Key Takeaways
- Misconfigurations require setting changes, and default credentials require replacement.
- Inventory firmware, unsupported equipment, shadow IT, and stale credentials.
- VM escape breaks isolation; uncleared reused resources can expose previous data.
- Cloud customers still control their access, settings, and data; IaaS customers also patch guest systems.
- Strong cryptography needs protected keys, and supplier risk needs component visibility.
2Find, identify and score vulnerabilities
Vulnerability findings become useful when you can explain what was checked, verify the evidence, and connect it to an applicable fix. Scans and tests provide different views of a system. Shared identifiers join their results to vendor guidance, while severity scores describe technical impact and attack conditions. Exploitation evidence and exposure then help you decide what needs prompt attention without treating a number as a complete risk assessment.
2.1 Choose a scan and check its findings
A vulnerability scanner checks systems for known flaws and unsafe settings. It discovers hosts, identifies services and versions, and compares evidence with a regularly updated library of checks, often called plugins.
Choose the right viewpoint
Scan only systems you own or have written permission to test. Agree on scope and timing with owners, especially for fragile industrial, medical, or older equipment that probes could disrupt.
| Choice | What it changes |
|---|---|
| External or internal | An internet view or a view from inside the network |
| Credentialed or non-credentialed | Direct inspection after login or evidence exposed over the network |
| Agent-based or agentless | A reporting program on the device or a central scanner connecting to it |
These choices combine. An internal scan can be credentialed or non-credentialed. Credentialed scans can inspect installed packages and settings, reducing uncertainty from service banners. Agents help cover laptops that rarely connect to the office. Agentless scans avoid installing a program but need network access to the target.
Nessus, Greenbone/OpenVAS, Qualys, and Rapid7 products are examples of vulnerability scanners. Nmap mainly discovers ports and services and can support the discovery step.
Read a finding as evidence
A useful result identifies the host, port, service, issue, vulnerability identifier where available, severity, evidence, and recommended action. Consider a scan of 10.0.5.20:
- TCP 80: Apache HTTP Server 2.4.49, path traversal, CVE-2021-41773, CVSS 3.1 base score 9.8 (Critical), known exploited.
- TCP 21: anonymous File Transfer Protocol (FTP) login enabled, Medium severity.
- TCP 443: TLS 1.0 enabled, Medium severity.
First confirm the installed Apache package and advisory, then upgrade the affected server promptly. Disable anonymous FTP or replace the service with secure file transfer, and remove TLS 1.0 support. Each finding needs its own remedy: a software update, an access change, and a protocol-setting change.
Decide whether the result is real
A false positive reports a weakness that is absent. A scanner may see an old version banner even though the distributor backported the fix into that package. Check the installed build and vendor advisory before dismissing or escalating it.
A false negative misses a real weakness. Missing credentials, outdated plugins, unreachable assets, or an unknown flaw can all hide problems. A true positive correctly finds a weakness; a true negative correctly reports its absence. After remediation, inspect the running version or setting and rescan the same issue. Also check that the service still works.
Use complementary methods
A penetration test uses authorized attempts to exploit weaknesses within agreed rules and shows their practical impact. A scan broadly lists possible weaknesses; a penetration test can show how they combine. Static application security testing (SAST) reads code without running it; dynamic application security testing (DAST) probes the running application. Package monitoring matches dependencies against vulnerability records. Audits, advisories, and researcher reports supply further evidence. A clean scan leaves any unreachable assets, unknown flaws, and untested business logic to other checks.
Key Takeaways
- Scan viewpoint, login access, and agent deployment are separate choices.
- Credentialed evidence helps distinguish missing patches from misleading version banners.
- A false positive invents a finding; a false negative misses a real one.
- Confirm remediation with system evidence and a rescan.
- Penetration tests, code analysis, and dependency monitoring complement scanning.
2.2 Use identifiers and advisories to find a fix
A scan, a vendor bulletin, and a news report may describe the same flaw differently. Shared identifiers let you join that evidence without confusing a particular vulnerability with a broad kind of mistake.
Identify the specific flaw
Common Vulnerabilities and Exposures (CVE) gives publicly known vulnerabilities shared identifiers. A CVE ID has the form CVE-YYYY-NNNN, with at least four digits in the final part. CVE-2021-44228 identifies Log4Shell in Apache Log4j; CVE-2014-0160 identifies Heartbleed in OpenSSL.
CVE Numbering Authorities (CNAs) assign IDs under the CVE Program. They include vendors, projects, response teams, and researchers. The year can reflect reservation, first public disclosure, or first record publication. It does not reliably tell you when the flaw was discovered, and a larger final number does not mean greater severity.
A CVE record provides a description and references. Follow the vendor advisory to learn affected versions, fixed versions, installation steps, and any workaround. Many unsafe settings and in-house flaws have no CVE ID, so absence from a CVE database leaves those weaknesses possible.
Identify the kind of weakness
Common Weakness Enumeration (CWE) classifies the underlying mistake. Thousands of separate XSS vulnerabilities can each have a CVE ID and share CWE-79.
| Classification | Weakness type |
|---|---|
| CWE-79 | Cross-site scripting |
| CWE-89 | SQL injection |
| CWE-22 | Path traversal |
| CWE-787 / CWE-120 | Out-of-bounds write / classic buffer overflow |
| CWE-367 | TOCTOU race condition |
| CWE-798 | Hardcoded credentials |
The National Vulnerability Database (NVD), maintained by the National Institute of Standards and Technology (NIST) and used worldwide, adds information such as CVSS scores, CWE classifications, and affected-product data. Different sources can score one flaw differently. For CVE-2021-41773, the NVD lists a CVSS 3.1 base score of 9.8 (Critical), while another source lists 7.5 (High). Record the source and version when comparing scores.
Separate severity from exploitation
The CISA Known Exploited Vulnerabilities (KEV) catalog records CVEs with reliable exploitation evidence and remediation guidance. A listing establishes that the flaw has been used in attacks; it does not date every attack or establish current activity on your own network.
The Forum of Incident Response and Security Teams (FIRST) publishes the Exploit Prediction Scoring System (EPSS), which estimates the probability of exploitation in the next 30 days, from 0 to 1. It is a forecast, while KEV records observed exploitation. Neither is the same as technical severity.
Follow the advisory as it changes
For Log4Shell, a lookup links CVE-2021-44228 to remote code execution in Log4j, affected versions starting at 2.0-beta9, CVSS 3.1 base score 10.0 (Critical), and KEV evidence. The first fix in 2.15.0 was incomplete. Related flaws required later releases including 2.16.0, 2.17.0, and 2.17.1. The correct action comes from the latest applicable vendor guidance, including the product's release branch; selecting the first version mentioned in an old bulletin can leave related weaknesses open.
Key Takeaways
- CVE identifies a particular vulnerability; CWE identifies a weakness type.
- CVE numbers encode neither severity nor a reliable discovery date.
- Use NVD analysis with the score source and CVSS version.
- KEV records exploitation evidence; EPSS estimates 30-day exploitation probability.
- The vendor advisory supplies the applicable fix and can change as related flaws are found.
2.3 Read severity scores without confusing them with risk
The Common Vulnerability Scoring System (CVSS) describes technical severity on a scale from 0.0 to 10.0. FIRST maintains the standard. Version 4.0 was published on November 1, 2023; version 3.1 remains common, so always keep the version with a score.
Match the severity band
| Rating | Score |
|---|---|
| None | 0.0 |
| Low | 0.1–3.9 |
| Medium | 4.0–6.9 |
| High | 7.0–8.9 |
| Critical | 9.0–10.0 |
For example, 6.9 is Medium, 7.0 is High, and 9.0 is Critical. These are bands of severity, not percentages of attacks.
Choose the metric group
CVSS 4.0 has Base, Threat, Environmental, and Supplemental groups. Base describes intrinsic properties. Threat reflects exploitation evidence through Exploit Maturity. Environmental reflects the deployment and security requirements of a particular organization. Supplemental adds context, such as Safety and Automatable, without changing the numeric score.
A score label names its inputs: CVSS-B is Base only; CVSS-BT adds Threat; CVSS-BE adds Environmental; CVSS-BTE adds both. Version 3.1 instead names its groups Base, Temporal, and Environmental.
Decode the base metrics
CVSS 4.0 exploitability metrics describe what an attack needs:
- AV, Attack Vector: Network, Adjacent, Local, or Physical access.
- AC, Attack Complexity: whether the attacker must overcome security measures such as address randomization.
- AT, Attack Requirements: deployment or execution conditions outside the attacker's full control, such as winning a race.
- PR, Privileges Required: None, Low, or High.
- UI, User Interaction: None, Passive, or Active. Visiting a page can be passive; importing a file or bypassing a warning can be active.
Impact is scored separately for the vulnerable system—VC, VI, VA—and subsequent systems—SC, SI, SA. Each records confidentiality, integrity, or availability impact as High, Low, or None. Version 3.1 uses C, I, A and a Scope metric. Scope Changed means impact crosses a security authority boundary, not simply that two components are involved.
Read a vector step by step
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Start at the version. Then AV:N means network access, AC:L low complexity, AT:N no special attack requirements, PR:N no privileges, and UI:N no user interaction. The vulnerable system has high impact in all three areas; subsequent-system impacts are None. This vector scores CVSS-B 9.3 (Critical).
The comparable version 3.1 vector, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, scores 9.8 (Critical). Changing its Scope to S:C, as in Log4Shell's vector, produces 10.0 (Critical). Calculations differ across versions; the values are not interchangeable measures on one unchanged scale.
Add context and choose action
Use FIRST's calculator to derive scores from metrics. For the 4.0 example, E:A (Attacked) gives CVSS-BT 9.3 (Critical), E:P (Proof-of-Concept) 8.9 (High), and E:U (Unreported) 8.1 (High). An unset Exploit Maturity assumes Attacked. Environmental metrics can lower or raise severity: limiting access to a local administrative domain or increasing confidentiality requirements changes the assessment. In the stated same-segment-only example, MAV:A produces CVSS-BE 8.7 (High).
Risk also depends on exposure, exploitation evidence, and the importance of the asset. A Medium flaw being exploited on a public service can demand action before a Critical flaw on an isolated lab machine. The same CVE on 300 machines still has one base assessment; the machines can have different environmental conditions.
Key Takeaways
- CVSS measures technical severity; use version, score, rating, and scoring source together.
- CVSS 4.0 separates Base, Threat, Environmental, and Supplemental metrics.
- Supplemental metrics add context without changing the score.
- AT covers attack conditions; AC covers overcoming security measures.
- Vector strings expose the assumptions behind scores.
- Version 3.1 Scope concerns security authority boundaries.
- Use exploitation evidence, exposure, and asset importance alongside severity when choosing action.
3Apply patches and updates in a controlled way
An update changes a working system, so patching must manage both security exposure and the chance of disruption. A reliable cycle starts with an inventory and ends with evidence that the flaw is removed and the service still works. Testing, staged rollout, and rollback make that change controllable. When a patch cannot be installed yet, targeted temporary controls protect the exposed route while an owner arranges a permanent fix or replacement.
3.1 A patch cycle that ends with evidence
A patch updates software or firmware to fix a bug or vulnerability. Patch management makes those updates repeatable across the equipment an organization owns. NIST describes this work as preventive maintenance: it is part of running technology reliably.
Know what needs updating
Keep an inventory of hardware, software, firmware, versions, and owners. Include browsers, document readers, runtimes, VPN clients, network devices, and laptops that are often offline. An operating system's automatic updater may leave these separate products untouched.
Monitor vendor advisories, scan findings, and exploitation evidence. Updates have different purposes: a security update fixes weaknesses, a hotfix addresses an urgent specific problem, a cumulative update bundles earlier fixes, and a feature update changes functions or versions. Firmware updates have their own vendor procedures.
Work through the cycle
- Inventory assets and their versions.
- Monitor for applicable fixes.
- Assess and prioritize using severity, exploitation, exposure, and asset importance.
- Test on representative systems, including important applications and drivers.
- Approve the change, timing, responsible person, and rollback plan.
- Deploy in stages so problems affect a limited group first.
- Verify the running version, the vulnerability result, and service operation.
- Record outcomes and systems that still need work.
A maintenance window is an agreed time for changes and possible downtime. A rollback, or backout, restores a working state if the update fails. Prepare a suitable backup or snapshot before server changes and test the recovery method. Some updates require a restart; a successful download or installer message leaves that question unanswered.
Set urgency from more than a score
Suppose three fixes arrive: an internet-facing web-server flaw rated CVSS 3.1 9.8 (Critical) and listed in KEV; a local workstation flaw rated 7.8 (High) with no reported exploitation; and a desktop-app flaw rated 5.3 (Medium). The exposed, exploited server needs the emergency route. The workstation and app enter the planned cycle, with urgency reviewed as evidence changes. An emergency route shortens testing and approval; it still includes them.
Limit disruption with rings
For 400 laptops, start with a 5% pilot: 20 machines. After two days without problems, deploy to another 25% of the full fleet: 100 machines. The final ring contains 280. Both early percentages refer to the full 400, so 120 have been updated before the final ring. Choose representative devices, including different drivers and critical applications, to make the pilot useful.
Central tools and package managers distribute updates, but completion still needs evidence. A laptop that was offline may remain vulnerable even when most of its ring succeeds.
The 2017 Equifax breach shows why ownership and verification matter. Apache released a Struts fix in March; attackers reached an unpatched application in mid-May and stole data on more than 145 million people. A later GAO review identified failures in patch communication and vulnerability detection. Assigning an owner and checking the actual application build addresses different gaps in that chain.
Key Takeaways
- Inventory applications and firmware as well as operating systems.
- Prioritize with severity, exploitation evidence, exposure, and asset importance.
- Test representative systems and prepare rollback before deployment.
- Staged rings limit the reach of a faulty update.
- Check the running version, rescan, and test service operation before recording completion.
3.2 Reduce exposure while a patch is delayed
Sometimes a patch is unavailable or cannot be installed safely yet. Defenders still have ways to limit attack paths while arranging a lasting fix.
Recognize the reason for delay
A zero-day may have no vendor patch. An unsupported product may never receive one. An update can break a critical application, require a shutdown, or need certification by a medical or industrial equipment manufacturer. Some small connected devices have no update mechanism at all. The reason for delay determines what temporary protection can work.
For an exposed flaw already used by attackers, use an emergency change process: a short representative test, approval by an authorized person, prompt deployment outside the normal schedule, and documentation of the result. Vendors may issue out-of-band updates between regular release dates. Waiting for the monthly cycle keeps an avoidable exposure open.
Match a control to the attack path
A compensating control reduces risk when the usual control cannot be used. Choose one that interrupts the particular route to the flaw:
- Disable the vulnerable service or feature if the system can work without it.
- Block the affected port, or permit only required sources and destinations.
- Move the system to an isolated network segment.
- Restrict administration to selected workstations.
- Add intrusion-prevention or web application firewall rules for known exploit traffic.
- Increase monitoring so attempted attacks are noticed and acted on.
Filtering exploit traffic is often called virtual patching. The rule protects a route to the defect; it leaves the vulnerable code present. A different route or unexpected exploit can bypass an incomplete rule.
A workaround is a temporary action in a vendor advisory, such as disabling a feature. Keep following that advisory. Early Log4Shell mitigations did not block every attack path, so using the first published setting and stopping there left gaps. Install the applicable fix when available.
Work through a legacy-system example
A factory depends on a control PC running Windows 7, whose regular support ended on January 14, 2020. The machine vendor has not certified a replacement operating system.
- Put the PC in a separate segment with firewall rules allowing only the machine and one engineering workstation.
- Remove email and browsing, and control USB storage.
- Allow only the control application to run.
- Forward logs for review and watch the permitted connections.
- Record the exception, assign an owner, and set a review and replacement date.
The network rules restrict entry; application control limits execution; monitoring supports detection. None changes the old software into a supported product.
Keep an exit from the exception
Plan upgrades or replacement before support ends. If continued use is necessary, document the reason and controls and consider extended support where offered. Include router, switch, Internet of Things (IoT), Basic Input/Output System (BIOS), and UEFI firmware in the inventory and maintenance schedule; their updates often need manual work and downtime. Ask for the vendor's security-update support period when buying devices.
Key Takeaways
- An emergency path speeds testing, approval, deployment, and documentation.
- Compensating controls interrupt attack paths while the underlying flaw remains.
- Vendor workarounds require follow-up as guidance changes.
- Unsupported systems need an owner, isolation, review date, and replacement plan.
4Harden systems with secure baselines
Secure configurations turn general security principles into settings a device can actually enforce. Begin with the role: decide which functions, users, and connections it needs. Document that configuration as a baseline, deploy it consistently, and compare live systems with it as changes accumulate. The same principles guide a workstation, router, cloud VM, or industrial controller, but their available controls and operational needs differ.
4.1 Give a computer only the functions it needs
Hardening changes a system's configuration to reduce its attack surface. The guiding principle is least functionality: keep the functions required for its role and remove the rest. A convenient default installation often enables more than that role needs.
Start with software and services
Remove unused applications, server roles, features, and accounts. Each extra program brings code that needs updates; each running service offers another place to connect. Stop the service as well as adjusting firewall rules when the function is unnecessary.
Consider a web server with TCP ports 22, 23, 80, 443, and 3306 reachable. Its role is to serve a secure website and support remote administration.
- Keep TCP 443 for HTTPS.
- Keep TCP 80 only for the HTTP-to-HTTPS redirect if required.
- Limit SSH on TCP 22 to the administrator network and use key authentication.
- Disable Telnet on TCP 23 because SSH supplies encrypted administration.
- Bind MySQL on TCP 3306 locally or restrict it to the private application network.
The public can reach the website, administrators have a controlled entry, and the database is no longer exposed to everyone. This is role-based hardening: closing 443 as well would stop the service the machine exists to provide.
Protect accounts and traffic
Change default passwords, remove stale accounts, and disable unnecessary built-in accounts where supported. Use a standard account for daily work and a separate named administrator account for changes. Require multifactor authentication for administration so a stolen password alone is insufficient.
Enable a host firewall with default-deny inbound rules and explicit exceptions for needed traffic. It protects the device itself, including a laptop away from the office. Endpoint protection adds checks on malicious files and behavior; it covers a different route from firewall filtering.
Protect stored data and startup
Full-disk encryption protects data on a lost or stolen device. Examples include BitLocker, FileVault, and LUKS. Secure network protocols protect data in transit. Encryption at rest does not replace control of an already unlocked session.
A Trusted Platform Module (TPM) can protect encryption keys and bind their release to expected boot measurements. UEFI Secure Boot checks signatures on startup components to block many bootkits. Firmware passwords restrict setting changes, and disabling unneeded USB or network boot prevents easy startup of another operating system. Keep recovery information controlled and available to authorized support staff.
Enforce and observe the settings
Windows Group Policy can apply settings centrally. Security-Enhanced Linux (SELinux) enforces mandatory access rules that limit what a process may access, including privileged processes. Application allow listing limits which programs may run. Enable security logging, send events to a central system, and synchronize clocks through Network Time Protocol (NTP) so events can be compared.
Test changes against real work before rollout. A required application may need a documented exception. Later installations and troubleshooting can reopen services or permissions, so compare devices with the approved configuration throughout their life.
Key Takeaways
- Least functionality removes services and software that the system role does not need.
- Keep public services, database access, and administration on distinct access paths.
- Use separate named administrator accounts and MFA.
- Combine host firewall rules, endpoint protection, disk encryption, and startup protection.
- Central settings, logging, and time synchronization support consistent operation.
- Test hardening changes and check them again after software and configuration changes.
4.2 Build and maintain a secure baseline
A secure baseline is a documented, approved configuration for a system type, such as a laptop or web server. It makes hardening repeatable and gives each later check a defined standard to compare with.
Establish a baseline that fits the role
Start with a trusted benchmark for the product and version. CIS Benchmarks, from the Center for Internet Security, provide consensus-built configuration guidance. Level 1 targets essential protection with limited usability impact. Level 2 adds stronger defense in depth and can reduce functionality. DISA's Security Technical Implementation Guides (STIGs) and vendor security baselines are other starting points.
Tailor the benchmark to the role. A web server and a developer laptop need different functions even if they use the same operating system. Test settings outside production, record deviations and their reasons, obtain approval, and assign a baseline version. A restriction that prevents an essential application from working needs an evaluated exception, not an undocumented local override.
Deploy the approved settings
Manual setup makes it easy to miss a setting or type different values on similar systems. Automate deployment with a golden image, Group Policy, a device-management platform, configuration-management tools such as Ansible, or infrastructure-as-code templates for cloud systems.
A golden image is a preconfigured build template. New systems start from the same approved state, but the image itself needs updates. A machine built from an old image can start with old software even when its settings match the image perfectly. Baseline deployment and patch deployment work together.
Detect configuration drift
Configuration drift is movement away from the approved settings. An administrator may enable an old service for troubleshooting, or an installer may add a firewall exception. If the temporary change remains, the real device no longer matches the approved design.
Compliance scans compare settings with the baseline. Tools can use the Security Content Automation Protocol (SCAP), CIS-CAT, or scanner audit policies. Investigate each difference, restore the approved setting or approve a justified exception, and retain a record of the decision. Update the baseline when the operating system, benchmark, or required role changes.
Read a compliance result
A server passes 228 of 240 checks. Dividing 228 by 240 gives 0.95, so compliance is 95%. The 12 failures include SMBv1 enabled, a guest account enabled, and audit logging disabled.
The percentage tells you how many checks passed. The failed checks tell you what exposure remains. Turning off SMBv1 and the guest account removes unwanted access paths; restoring logging makes security events visible. Recheck the failed settings after correction. If one setting is genuinely required, document and approve that exception with its protection and review date.
A passing configuration report answers a configuration question. Continue separate patch and vulnerability checks, since a device can match its settings standard while an application contains a newly discovered flaw.
Key Takeaways
- Establish, deploy, and maintain are the three stages of a baseline.
- Tailor trusted benchmarks to the role, test changes, and document deviations.
- Automated deployment reduces inconsistent manual settings.
- Drift checks compare the real configuration with the approved baseline.
- Investigate failed checks by their meaning, not only by the compliance percentage.
4.3 Adapt hardening to the device and its job
The principles of hardening stay consistent, but the available controls differ. A laptop can run an endpoint agent; a small sensor may offer only a few settings and a firmware update. Select controls that protect the actual role without stopping it.
Network equipment and servers
For switches and routers, change defaults, update firmware, and keep configuration backups. Use SSH or HTTPS for management and disable Telnet and clear-text management pages. Limit management to a dedicated network or selected administrator addresses. Use SNMPv3 with authentication and encryption for management data.
Shut down unused switch ports and place them in an unused virtual LAN (VLAN). Port security or 802.1X authentication limits connections by unknown devices. Send device logs to a central destination. A server also needs role-specific hardening: a file server does not need a spare web server enabled, and its administrative entry needs separate restrictions from its user service.
Cloud resources
Protect the root or owner account with MFA and reserve it for exceptional tasks. Give daily accounts narrow roles, block public storage by default, encrypt data, keep security-group rules limited, and enable activity and audit logs. Cloud security posture management (CSPM) tools compare cloud settings with expected standards.
Suppose a cloud rule permits Remote Desktop on TCP 3389 from 0.0.0.0/0. That source means any IPv4 address. Replace it with access from the company VPN's permitted range or use a bastion or just-in-time service. The example range 203.0.113.0/24 contains 256 addresses; in a real deployment use the organization's actual authorized range. Removing public reachability reduces exposure even though RDP traffic is encrypted.
For an IaaS virtual machine, also harden and patch its guest operating system and applications. Provider security does not apply the customer's guest patches.
Connected and industrial devices
Embedded systems run a dedicated function. Internet of Things (IoT) devices include sensors, cameras, and smart appliances. A real-time operating system (RTOS) supports tasks with timing requirements, such as machine control. These systems may have limited memory, long lifetimes, and few update options.
Change defaults, disable unused cloud access, Telnet, and Universal Plug and Play (UPnP), update firmware, and place devices in a separate segment. Give them direct internet access only when their role needs it. Choose products with stated security support periods.
Industrial control systems (ICS) and supervisory control and data acquisition (SCADA) systems run physical processes. Safety and availability shape every change. Separate office IT from operational technology (OT), control remote maintenance, and coordinate patches and assessments with equipment owners and vendors. Passive discovery may suit equipment that active probes can disrupt.
An air gap removes direct network connections, but maintenance laptops and removable media can still cross it. Stuxnet demonstrated that isolated industrial systems can be reached through such paths. Control these transfers and authorized access along with the network boundary.
Key Takeaways
- Restrict and log network-device management; disable unused physical ports.
- Cloud hardening includes roles, storage, network rules, logging, and IaaS guest updates.
- Embedded and IoT devices need settings, firmware support, and segmentation suited to their limits.
- Industrial changes must preserve safety and availability.
- Air gaps still need controls for media and maintenance access.
5Configure common network services securely
Network services expose useful functions to other machines, including powerful administrative access. Choosing an encrypted protocol is one part of protecting them; authentication, restricted reachability, maintained certificates, and service settings complete the work. Common ports help you recognize the service in an audit. Web, DNS, and email controls then address threats specific to pages, name lookups, and the domains shown on messages.
5.1 Choose encrypted services and restrict their access
Older network protocols often send usernames, passwords, and content in clear text. A secure replacement protects the connection with encryption and authentication. It still needs strong credentials and rules limiting who can reach it.
Replace clear-text services
| Purpose | Older service | Secure choice |
|---|---|---|
| Remote shell | Telnet, TCP 23 | SSH, TCP 22 |
| File transfer | FTP, TCP 20/21 | SFTP over SSH, TCP 22; or FTPS over TLS |
| Web | HTTP, TCP 80 | HTTPS, TCP 443 |
| Directory access | LDAP, TCP 389 | LDAPS, TCP 636; or LDAP with StartTLS |
| Mail retrieval | POP3, TCP 110; IMAP, TCP 143 | POP3S, TCP 995; IMAPS, TCP 993 |
SSH File Transfer Protocol (SFTP) runs over Secure Shell (SSH). FTP over TLS (FTPS) is FTP protected by Transport Layer Security (TLS): implicit TLS commonly uses TCP 990, while explicit TLS starts on TCP 21. Similar names do not make SFTP and FTPS interchangeable services.
Mail clients submit messages over TCP 587 with STARTTLS or TCP 465 with implicit TLS. Mail servers exchange messages on TCP 25, where STARTTLS upgrades a connection. StartTLS means a protocol begins in its normal form and then negotiates TLS; configure it so required protected operations cannot fall back to clear text.
Secure management and supporting services
Simple Network Management Protocol (SNMP) v1 and v2c expose community strings without encryption. Use SNMPv3 authPriv, which supplies authentication and encryption on UDP 161, with traps commonly on UDP 162. Choosing v3 without its privacy level leaves an important setting unresolved.
Domain Name System (DNS) traffic uses port 53 and is normally unencrypted. DNS over TLS uses TCP 853; DNS over HTTPS uses TCP 443. DNSSEC signs DNS data for authenticity and integrity. It does not encrypt queries or responses.
Server Message Block (SMB) file sharing uses TCP 445. Disable SMBv1; SMBv3 supports encryption, which needs suitable configuration. Remote Desktop Protocol (RDP) uses TCP 3389 and encrypts traffic, but its administrative power makes public exposure dangerous. Restrict it through controlled remote access.
Keep TLS settings current
Use TLS 1.2 or 1.3, disable all SSL versions and TLS 1.0/1.1, remove weak cipher suites, and maintain trusted certificates. RFC 8996 formally deprecated TLS 1.0 and 1.1 in 2021. Renew certificates before expiration and investigate trust errors instead of training users to bypass warnings.
A printer audit finds Telnet, FTP, and a factory password. Disable those services, enable HTTPS management, set unique credentials, and restrict management sources. A directory service accepting unencrypted logins needs LDAPS or required StartTLS. Rescan both the service settings and the exposed ports after changes.
Port numbers describe conventions, not security. Telnet on TCP 2323 still exposes credentials. SSH on a different port still needs authentication and access restrictions. HTTPS secures a connection to a domain; a fraudulent site can also obtain a valid certificate.
Key Takeaways
- Choose the secure protocol and its required authentication and encryption settings.
- SFTP uses SSH; FTPS uses TLS.
- SNMPv3 authPriv provides both authentication and encryption.
- DNSSEC signs DNS data; DoT and DoH encrypt DNS transport.
- Use TLS 1.2/1.3 and current trusted certificates.
- Moving a service to an unusual port leaves its protocol properties unchanged.
5.2 Keep administrative access controlled and recoverable
Remote administration provides powerful control over a system. Protect three things together: who can reach the service, how an administrator authenticates, and which actions can be traced to that person.
Harden SSH access
Use named accounts and individual keys. The public key can be stored on the server; the private key stays on the administrator's device and should be protected with a passphrase. On OpenSSH, settings in /etc/ssh/sshd_config include:
PermitRootLogin noto block direct root login. Administrators sign in individually and usesudofor privileged tasks.PasswordAuthentication noto disable that password authentication method while using key-based access.AllowGroups ssh-adminsor an appropriateAllowUsersrule to limit eligible accounts.
Keep OpenSSH patched, restrict TCP 22 to the management network or VPN, and review authentication methods required by the access policy. Remove departing staff members' keys. Tools that block repeated login failures add another layer against guessing.
Make changes without losing access
An administrator changing SSH should keep the working session open. First install and test the authorized key and group membership. Check the new configuration with sshd -t, reload the service, then open a second session using the intended login path. Confirm the new session works before closing the original. A syntax check catches configuration errors, while the second session also tests the practical login route and permissions.
If the second login fails, use the existing session to inspect and correct the change.
Restrict Remote Desktop
RDP encrypts session traffic, but an internet-visible TCP 3389 still gives attackers an administrative service to attack. Use a VPN or Remote Desktop Gateway with MFA instead of direct public access. Require Network Level Authentication (NLA) so authentication occurs before a full session is created. Limit eligible users, use an account lockout policy, and patch the server.
BlueKeep, CVE-2019-0708, affected RDP on older Windows systems before login. This illustrates why passwords alone cannot address an unpatched remote-service flaw.
Separate management from ordinary use
Put router interfaces, hypervisor consoles, database admin panels, and storage controllers on a dedicated management network. Permit access from approved administrator devices or a jump host, also called a bastion. The jump host is hardened, strongly authenticated, and can record administrative sessions; it becomes a controlled entry point that also needs its own updates and monitoring.
Apply the same rules to remote-support tools. Require strong authentication and MFA where available, review who can connect, and remove the tool after its purpose ends. Legitimate remote-control software left installed gives an attacker a useful route if its access is compromised.
Key Takeaways
- Restrict remote administration to approved sources and named users.
- Protect private keys and revoke obsolete access.
- Check SSH syntax and test a second login before closing the working session.
- Keep RDP behind controlled remote access with MFA, NLA, and current patches.
5.3 Secure websites, name services, and email domains
Web, DNS, and email services need settings matched to how each protocol works. Encryption protects connections; service configuration and domain authentication address additional ways attackers can misuse them.
Harden a web server
Serve HTTPS with TLS 1.2 or 1.3 and redirect HTTP. HTTP Strict Transport Security (HSTS) tells browsers to use HTTPS on later visits. Remove sample applications, default pages, test files, and unused modules. Disable directory listing, limit detailed errors, run the process without administrator rights, prevent uploaded files from executing, and keep the server and frameworks patched.
Browser headers add controls: Content-Security-Policy limits permitted resources and scripts; frame-ancestors controls framing to reduce clickjacking; X-Content-Type-Options: nosniff prevents type guessing. A web application firewall (WAF) can filter suspicious HTTP requests while code and configuration fixes address their causes.
For Apache 2.4.49, upgrading addresses its known path-traversal flaw. ServerTokens Prod hides detailed version information, and Options -Indexes disables file listings. These are three separate changes: hiding the banner leaves the vulnerable code present.
Limit DNS misuse
An authoritative server answers for the zones it hosts. A recursive resolver finds answers for clients. Separate their roles. Restrict recursive lookups to authorized clients; an open resolver can be abused to amplify denial-of-service traffic. Restrict full zone transfers (AXFR) to approved secondary servers so outsiders cannot obtain a zone's record list.
DNSSEC signs zone data so validating resolvers can detect forged answers. Keep DNS software patched and use resolver filtering to block known malicious domains where appropriate. DNSSEC's signature protection leaves DNS contents visible unless a separate encrypted transport is used.
Authenticate an email domain
| Mechanism | What it checks |
|---|---|
| SPF | Whether a server may send for the envelope-sender domain |
| DKIM | Whether a domain's cryptographic signature verifies for the signed message content |
| DMARC | Whether passing SPF or DKIM aligns with the visible From domain |
Sender Policy Framework (SPF) publishes authorized senders in DNS. DomainKeys Identified Mail (DKIM) signs with a private key and publishes the verification key in DNS. Domain-based Message Authentication, Reporting, and Conformance (DMARC) links authentication to the From domain the reader sees. A passing aligned SPF result or a passing aligned DKIM signature can provide a DMARC pass. An unrelated domain's valid signature cannot establish that alignment.
For example.com, an SPF record such as v=spf1 ip4:192.0.2.10 include:mail.example.net -all authorizes the stated senders. A DMARC record at _dmarc.example.com can be v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.com. Start with p=none to collect reports, repair legitimate sender alignment, then strengthen to quarantine or reject. These policies express the domain owner's requested handling; receivers apply their own checks and policy too.
Do not run an open mail relay. Restrict relaying to authorized users or networks, use TLS for client access and STARTTLS between servers, and filter spam, malware, and dangerous attachments.
Key Takeaways
- Patch web software, remove unused content, and restrict file execution and service permissions.
- HSTS and browser security headers protect different aspects of web use.
- Restrict recursion and zone transfers to their intended clients.
- DMARC needs a passing SPF or DKIM result aligned with the visible From domain.
- Use reports before tightening DMARC policy, and restrict mail relaying.
6Protect endpoints, mobile devices, wireless networks and applications
Endpoint, mobile, wireless, and application controls protect systems where people connect, open content, and run programs. Their jobs overlap without being identical: some stop execution, some detect behavior, some restrict data movement, and some control access. Work through the protection each layer supplies, then choose settings that fit ownership, connectivity, and application needs. A layered design remains useful when one detector misses a new attack.
6.1 Combine endpoint controls that cover different gaps
An endpoint is a device that users work on or that runs services: a laptop, desktop, server, phone, tablet, or virtual machine. Endpoints receive email, run programs, and connect to networks, so they need protection both on and off the office network.
Detect files and behavior
Signature-based antivirus matches known malware patterns, such as hashes or byte sequences. It works well for recognized samples but can miss changed or new malware. Heuristic and behavior-based detection looks for suspicious features and actions, such as a document starting PowerShell or a process rapidly encrypting files. It can catch new attacks, with more false alarms to investigate. Modern tools combine approaches.
Endpoint detection and response (EDR) records process launches, file activity, logins, and connections. Analysts can follow a timeline and respond by stopping a process or isolating a device. Product capabilities differ; some can undo particular changes. Extended detection and response (XDR) correlates endpoint evidence with email, cloud, network, and identity data to connect parts of an attack.
Control network access and execution
A host firewall filters a device's traffic wherever it connects. A host-based intrusion detection system (HIDS) alerts on signs of attack; a host-based intrusion prevention system (HIPS) can block activity. File integrity monitoring (FIM) alerts when critical files change.
Application control determines which programs can run. An allow list permits approved programs and blocks the rest. A block list rejects named programs but permits others, so new malware may pass. A payroll device allowing only 12 approved applications can block invoice.pdf.exe even before antivirus recognizes it. Maintain approval rules as legitimate software changes.
Protect data and admission
Full-disk encryption protects lost-device data. Data loss prevention (DLP) can inspect and restrict sensitive data leaving through uploads, email, or removable storage. Device control limits USB and other media. Network access control (NAC) checks whether a device meets policy—such as current patches, encryption, and running protection—before admitting it to the network. It often uses 802.1X.
Sandboxing runs untrusted code in an isolated environment. Browsers isolate web content, mobile platforms isolate apps, and email tools can open attachments in a sandbox to observe behavior. Isolation reduces the effect on the main system; it still depends on the sandbox working correctly.
Follow a layered attack response
An employee opens an attachment carrying new ransomware. Signature detection may miss the sample. Application allow listing can stop its execution. If it runs, EDR may detect mass encryption and isolate the laptop. A host firewall rule can restrict lateral SMB connections, and tested backups support recovery of damaged files.
These layers act at different stages, which is defense in depth. Keep their software and policies current and assign someone to act on alerts. EDR contains suspicious activity while patching removes a known defect; both Windows and non-Windows endpoints need controls suited to their risks.
Key Takeaways
- Signature and behavior detection complement each other.
- EDR supports endpoint investigation and response; XDR correlates multiple data sources.
- Host firewalls, HIDS/HIPS, and file integrity monitoring observe or control different activity.
- Allow lists stop unapproved programs; block lists name programs to reject.
- DLP protects outbound data, while NAC checks devices before admission.
- Layered controls need updates, maintained policies, and action on alerts.
6.2 Manage phones without mixing up ownership and control
Phones hold work messages, files, and authentication apps while moving through public places and networks. Security needs both local protection and a practical way to manage the device if it is lost or stops meeting policy.
Set and enforce a mobile baseline
Require a screen lock, protected storage, automatic OS and app updates, and installation from official stores. Current mobile platforms commonly encrypt storage, but device policy must confirm the required protection is active. Limit unnecessary permissions and remove unused apps. A flashlight app requesting contacts and microphone access deserves scrutiny.
Mobile device management (MDM) enrolls phones and applies passcode, encryption, OS version, app, Wi-Fi, VPN, and email policies. Depending on the platform and enrollment, it can locate, lock, or wipe devices. Unified endpoint management (UEM) extends central management to computers too. Work profiles or containers separate company apps and data from personal content, enabling a selective wipe of work data.
Choose a deployment model
| Model | Ownership and use |
|---|---|
| BYOD: bring your own device | Employee owns it and uses it for work |
| COPE: corporate-owned, personally enabled | Company owns it and permits personal use |
| CYOD: choose your own device | Employee chooses from approved company-owned models |
| Corporate-owned, business-only | Company owns it and limits it to work |
For sensitive clinical devices that must run only approved work apps, a company-owned business-only model fits better than a personal phone. BYOD typically needs a work profile and clear privacy boundaries. Actual management and wipe capabilities depend on platform and enrollment, so ownership alone cannot determine every technical capability.
Recognize changed trust boundaries
Jailbreaking on iOS and rooting on Android give control beyond normal restrictions. They can weaken app isolation and code checks and interfere with updates. MDM compliance policies can block such devices from work data. Sideloading installs apps outside the official store and bypasses that store's review; review remains useful even though malicious apps sometimes reach official stores too.
Limit connection risks
Disable automatic joining of open Wi-Fi, verify the network, and use HTTPS and the organization's VPN on untrusted networks. An evil twin copies a legitimate network's name to attract connections. Turn off unnecessary Bluetooth and refuse unknown pairing requests. Keep it patched, since some vulnerabilities, such as BlueBorne, did not require pairing.
SIM swapping transfers a victim's phone number to an attacker-controlled SIM through carrier account abuse. It can redirect text-message authentication codes; authenticator apps and security keys avoid that particular dependency. Near-field communication (NFC) works over a few centimeters, but managed devices should still disable it when unnecessary.
Respond to loss
When a worker reports a phone lost, remotely lock and try to locate it. Apply the organization's wipe policy if it remains missing, using a work-only wipe for the managed work profile or a full wipe where authorized and supported. Revoke active work sessions as well. Encryption and a strong lock protect stored data while the device is missing; remote commands may need the device to reconnect before they take effect.
Key Takeaways
- MDM applies mobile policy; UEM includes computers, and containers separate work data.
- Choose ownership and personal-use rules to fit the job and privacy needs.
- Rooting, jailbreaking, and sideloading change the protection and trust model.
- Review permissions and secure mobile network connections.
- Lost-device response includes lock, appropriate wipe, and session revocation.
6.3 Secure Wi-Fi access and its management path
Wi-Fi security depends on encryption, authentication, access-point configuration, and network separation. A network name or a list of allowed hardware addresses cannot replace those protections.
Choose modern protection
Wired Equivalent Privacy (WEP) is broken and should not be used. Original Wi-Fi Protected Access (WPA) with Temporal Key Integrity Protocol (TKIP) is deprecated. WPA2 with AES-CCMP remains common. AES is the Advanced Encryption Standard; CCMP is its Wi-Fi data-protection protocol. A captured WPA2-Personal handshake lets an attacker guess weak shared passphrases offline. Install platform patches, including fixes for flaws such as KRACK.
Choose WPA3, the third Wi-Fi Protected Access generation, where supported. WPA3-Personal uses Simultaneous Authentication of Equals (SAE), which resists offline password guessing and supplies forward secrecy. Previously captured traffic stays protected if the passphrase is later revealed. WPA3 requires Protected Management Frames to protect against certain forged management messages. Transition mode supports older WPA2 clients, whose connections retain WPA2's properties.
Match authentication to the users
| Mode | How access is managed |
|---|---|
| Personal | Everyone uses a shared passphrase |
| Enterprise | Each user or device authenticates separately through 802.1X |
Enterprise networks commonly use a Remote Authentication Dial-In User Service (RADIUS) server for authentication, authorization, and accounting (AAA). Extensible Authentication Protocol (EAP) methods include EAP-TLS with certificates and Protected EAP (PEAP) with passwords inside a protected tunnel. Enterprise access lets staff revoke one person's access without changing every device's shared password. WPA3-Enterprise also offers a 192-bit security mode for environments that require it.
In a 40-person office, a passphrase on a whiteboard gives visitors the same credential as staff. Move staff to Enterprise authentication and put guests on a separate VLAN with internet-only access. A captive portal can manage guest sign-in, but separation and encrypted connections still need their own configuration.
Harden and place access points
Change default admin credentials, update firmware, disable Wi-Fi Protected Setup (WPS), and restrict management to approved wired or management-network sources over SSH or HTTPS. WPS's PIN method creates a guessing path even when the main Wi-Fi passphrase is strong.
Use a site survey to measure signal and interference. A heat map shows the measured coverage across a floor plan. Use these to position access points and identify unexpected transmitters. Limiting signal spill is useful planning, but low transmit power alone cannot keep out a listener using a better antenna.
Detect unauthorized access points
A rogue access point is an unauthorized device connected to the network. An evil twin imitates a trusted network name to lure users. Wireless intrusion prevention systems (WIPS) and repeated surveys help detect them. Wired 802.1X or NAC can restrict a rogue device plugged into a switch.
A hidden service set identifier (SSID) still appears in traffic and device searches. Media access control (MAC) addresses are visible and can be copied. Hiding the name or filtering MAC addresses leaves the need for strong encryption and authenticated access unchanged.
Key Takeaways
- Use WPA3 where possible and maintain patches for all Wi-Fi clients and access points.
- SAE resists offline password guessing and provides forward secrecy.
- Enterprise authentication gives each user or device separately revocable access.
- Separate guests, disable WPS, and restrict access-point administration.
- Surveys and WIPS detect rogue devices and impersonating networks.
- Hidden SSIDs and MAC filters cannot replace encryption and authentication.
6.4 Protect an application from input to running code
Application security joins configuration, testing, update management, and runtime controls. Administrators use these controls on software they operate, even when another team writes the code.
Check inputs where they are trusted
Input validation checks expected type, length, range, and format on the server. Browser checks help users but can be bypassed with direct requests. An order quantity rule of "whole number from 1 to 99" rejects a negative quantity that could otherwise produce an invalid total or refund. Allow-list validation accepts expected values; a block list of suspicious characters can miss new forms of bad input.
Validation complements the main injection defenses: parameterized queries for SQL and context-appropriate output encoding for XSS. Each addresses a different part of handling input safely.
Protect sessions
A session cookie represents a logged-in session. Set appropriate attributes:
Secure: send it only through HTTPS.HttpOnly: prevent page scripts from reading it.SameSite=LaxorSameSite=Strict: restrict cross-site sending and reduce cross-site request forgery.
For example, Set-Cookie: session=abc123; Secure; HttpOnly; SameSite=Strict combines three controls. Give sessions a suitable short lifetime. HttpOnly limits cookie theft through scripts, but an XSS flaw can still perform harmful actions in the browser, so fix the flaw too.
Check code, components, and secrets
Code signing verifies publisher identity and that signed bytes have not changed. It cannot establish that the original bytes are safe; a compromised build can be correctly signed. Require signed code where appropriate and keep release testing and monitoring.
SAST scans source without running it. DAST probes a running application. Fuzzing supplies many malformed or random inputs to find failures such as crashes. Manual review adds checks on business logic. These methods expose different classes of problem.
Maintain an SBOM and monitor dependencies for CVEs, including libraries brought in indirectly. Update affected components and remove unused ones. Log4Shell spread through products whose operators had never directly chosen Log4j.
Keep passwords, API keys, and private keys in a secrets manager or protected configuration. Public certificates can be distributed; their corresponding private keys must stay protected. Secrets scanning can find accidentally committed credentials. If a secret reaches a public repository, revoke and replace it: deleting the current file leaves earlier copies usable.
Limit damage at runtime
Run under a least-privilege account. A web application's database account should access only the data and operations its role needs. Use sandboxing or containers for isolation, a WAF to filter malicious HTTP patterns, and rate limiting to slow repeated requests such as login guesses.
A WAF can act as a virtual patch during remediation, but its rules can miss an attack route. Fix the underlying code or configuration.
Key Takeaways
- Validate inputs on the server and use the specific injection defense for their output or destination.
- Secure, HttpOnly, and SameSite protect different cookie properties.
- Signing verifies origin and integrity; testing evaluates security behavior.
- SAST, DAST, fuzzing, and manual review find different defects.
- Inventory and update dependencies, including indirect ones.
- Revoke and replace exposed secrets; deletion alone leaves copies usable.
- Least privilege, isolation, WAF filtering, and rate limiting limit runtime exposure.
System Hardening and Patching examples
1Trace a weakness from cause to protection
14 steps
- 1IntroductionStart with the weakness
A public portal runs an old upload component. To explain the danger clearly, separate the defect from the attacker, the attack technique, and the possible damage.
You will follow that distinction through software, cloud settings, and supplier updates. The useful question is always: what failed, and what change addresses that failure?
- 2ExplanationName the parts of an attack
A vulnerability is a weakness. A threat can cause harm. An exploit is code or a technique that uses a weakness. Risk combines likelihood and impact.
In the portal, the old component's flaw is the vulnerability, a criminal group is the threat, and its flaw-triggering script is the exploit. Customer data and public reachability help explain the risk.
- 3ExampleFollow the exposure window
A vendor publishes a fixed upload component. The portal owner has downloaded it but still runs the old build. The exposure window stays open until the fixed code is installed and running.
This happened at scale with WannaCry: Microsoft published MS17-010 on March 14, 2017, and the outbreak began 59 days later on May 12. Availability of a fix and protection of a particular machine are separate events.
- 4ChallengeCompare two copies of the flaw
A public booking server and an isolated empty training VM run the same vulnerable build. Why can the training VM have lower risk without having a different vulnerability?
---reveal---
The flaw is the same, but reachability and impact differ. Isolation reduces ways to reach the VM, and it holds no real records. Those facts change risk, while the vulnerable code remains until fixed.
- 5ExplanationRecognize memory failures
A buffer overflow writes beyond a memory area's capacity. In the 16-byte buffer example, 200 bytes exceed capacity by 184 bytes and can overwrite nearby memory. The result may be a crash or a more serious compromise.
DEP and ASLR make exploitation harder; the code still needs repair. Memory injection is a different technique: malicious code runs inside another legitimate process, sometimes after loading a file from disk.
- 6ExampleFind a timing gap
A program checks whether a user can write to a temporary file. Before it writes, an attacker replaces that file with a link to a protected resource. The program acts on something different from what it checked.
This is a time-of-check to time-of-use flaw. An atomic operation makes the relevant check and action indivisible, preventing that resource swap between them.
- 7ConnectionSeparate database and browser injection
SQL injection changes a database command when typed input becomes part of its syntax. Parameterized queries keep values separate from the command.
Cross-site scripting (XSS) makes attacker-controlled content run in another visitor's browser. Context-appropriate output encoding makes the browser display the content as data. A filter that removes a few characters can miss alternate expressions of either attack.
- 8ChallengeMatch the fix to the failure
A comment page displays ordinary comments safely, but a search endpoint builds SQL commands by joining typed terms into the query. Would adding stronger browser output encoding fix the search problem? Explain the needed change.
---reveal---
No. The search problem is input entering database command syntax, so use parameterized queries. Browser encoding addresses how page content is interpreted, not how the server constructs SQL.
- 9Key InsightA trusted release can carry bad code
Attackers can compromise a vendor's build or update system and distribute malware through an official, signed update. SolarWinds Orion showed this supply-chain route in 2020.
A signature verifies the publisher and whether bytes changed after signing. It does not evaluate whether those bytes are safe. Keep official sourcing and verification alongside testing, dependency review, and behavior monitoring.
- 10ExampleFind the cloud setting
An analyst makes a storage bucket public for a test and forgets to restore private access. The cloud service is working as configured, yet private exports are exposed.
This is a misconfiguration. Restrict the bucket's access and review the exposed data. In IaaS, the customer also patches and hardens the guest operating system; provider security covers a different part of the service.
- 11TipLook beyond installed applications
Include device firmware, unsupported products, unapproved cloud tools, stale credentials, and the hypervisor in the inventory. An OS reinstall leaves separate firmware in place.
A VM escape crosses a guest's isolation boundary; uncleared reused resources can leak a previous guest's data. Keep a software bill of materials (SBOM) to identify products that contain a newly vulnerable library.
- 12ChallengePatch or change a setting?
A printer has current firmware but still accepts its published factory password. What correction addresses the stated weakness, and why is reinstalling the firmware insufficient?
---reveal---
Replace the default credential with an approved unique one. The problem is an unsafe login setting; installing the same current firmware leaves that password usable.
- 13ChallengeCombine software and access findings
A cloud VM runs an old app component and exposes its management port to every IPv4 address. What two distinct corrections are needed?
---reveal---
Install the applicable component fix and restrict the management source or use controlled gateway access. Patching the app leaves public administration open, while restricting administration leaves the old component vulnerable through any remaining route to it.
- 14RecapDescribe the cause before the control
Use the chain weakness → possible exploitation → harm to explain a finding. Then choose a control tied to its cause: repair code, change unsafe settings, restrict access, or replace unsupported technology.
A quiet system and a familiar supplier still need that examination.
2Turn a scan result into a supported decision
15 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionTreat a finding as a claim to check
- 2ExplanationChoose viewpoint and access separately
- 3ExampleRead one finding completely
- 4ExampleVerify a misleading banner
- 5ChallengeCheck what the scan missed
- 6ExplanationJoin the right records
- 7Key InsightObserved attacks differ from a forecast
- 8ChallengeRead what an identifier establishes
- 9ExplanationKeep version and score together
- 10ExplanationSeparate the CVSS 4.0 groups
- 11ExampleDecode the attack prerequisites
- 12ExampleRead impact and calculate
- 13ChallengeChoose the metric group
- 14ChallengeChoose which host needs earlier action
- 15RecapCarry evidence into the action
3Deploy an update and handle systems left behind
11 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionManage the change as well as the flaw
- 2ExplanationStart with versions and owners
- 3ExampleDefine a representative pilot
- 4ExampleExpand only after the pilot check
- 5ChallengeCalculate and justify a new rollout
- 6Key InsightVerify the running service
- 7ExplanationUse the emergency path when needed
- 8ExampleProtect a controller that cannot update
- 9ChallengeChoose a workable temporary control
- 10ChallengeRespond when the first rollout fails
- 11RecapClose with a checked state
4Harden a server and keep its configuration consistent
13 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionBegin with the server's job
- 2ExampleRead the exposed services
- 3ExampleRemove the unnecessary paths
- 4ConnectionProtect identity, storage, and startup
- 5ChallengeHarden a new role
- 6ExplanationEstablish an approved baseline
- 7TipDeploy settings consistently
- 8ChallengeInterpret a compliance percentage
- 9ExampleRestrict a cloud management rule
- 10ExplanationAdapt to smaller and physical systems
- 11ChallengeProtect an isolated machine
- 12ChallengeResolve drift without breaking the role
- 13RecapKeep role and configuration connected
5Secure a service from protocol to access policy
14 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionEncryption is part of a service design
- 2ExplanationMatch the service to its replacement
- 3TipCheck transport and protection settings
- 4ChallengeChoose what actually encrypts DNS
- 5ExamplePlan an SSH access change
- 6ExampleCheck before closing the old session
- 7ChallengeFind the remaining admin exposure
- 8ConnectionUse a controlled management entry
- 9ExampleSeparate a web patch from concealment
- 10ExplanationLimit browser and DNS behavior
- 11ExplanationConnect email checks to the visible domain
- 12ChallengeReason through one mail result
- 13ChallengeFix two services without losing their roles
- 14RecapAsk what each control protects
6Build protection around devices and applications
17 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionFollow one piece of suspicious content
- 2ExplanationRecognize known code and suspicious behavior
- 3ExampleStop execution or contain the device
- 4ChallengeSeparate admission from data control
- 5ExplanationManage work data on a phone
- 6ExampleChoose ownership for the job
- 7TipReview permissions and connections
- 8ChallengeRespond to a lost personal phone
- 9ExplanationChoose Wi-Fi authentication
- 10ExampleSeparate staff and guest paths
- 11ChallengeRecognize a copied network name
- 12ExampleValidate an order on the server
- 13ExplanationGive cookies the right protections
- 14Key InsightVerify code and protect secrets
- 15ChallengeAssign testing to the right stage
- 16ChallengeConnect three layers without overclaiming
- 17RecapGive each layer a specific job
System Hardening and Patching practice questions
Set 1: Recognize weaknesses and choose basic protections10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Read findings and configure secure access10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
AV:N/PR:N/UI:N. What can an analyst read from those values?Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Verify evidence and manage controlled changes10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
p=reject. Some legitimate provider mail has SPF passing for the provider's unrelated domain and no DKIM signature. What should be corrected for that mail?Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Combine protection with operational needs10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H at 9.8 (Critical); the other gives CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N at 9.3 (Critical). What combined interpretation is justified?Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Secure and SameSite=Strict. The team also needs to prevent page scripts from reading it. What attribute supplies that control?Show answerHide answer
Save this lesson to see this answer.
Set 5: Resolve layered findings in new situations10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
Agent-based scan
Application allow list
Attack surface
B
Base metrics
Buffer overflow
BYOD
C
CIS Benchmark
Code signing
Compensating control
Configuration drift
Content Security Policy
Coordinated disclosure
COPE
Credentialed scan
Cross-site scripting
CSPM
CVE
CVSS
CWE
D
DAST
DKIM
DLP
DMARC
DNS over HTTPS
DNSSEC
E
EDR
Emergency change
End of life
Endpoint
Environmental metrics
EPSS
Evil twin
Exploit
Exposure window
F
False negative
False positive
File integrity monitoring
Firmware
FTPS
Full-disk encryption
G
Golden image
H
Hardcoded secret
Hardening
HIDS
HIPS
Host firewall
Hotfix
HSTS
HttpOnly
I
ICS and SCADA
Input validation
IoT
J
Jump host
K
KEV
L
Least functionality
M
Management network
MDM
Memory injection
Misconfiguration
N
NAC
NLA
NVD
O
Output encoding
P
Parameterized query
Patch
Patch management
Penetration test
Private key
Privilege escalation
R
Race condition
RADIUS
RDP
Recursive resolver
Risk
Rogue access point
Rollback
Rollout ring
RTOS
S
SAE
SameSite
Sandbox
SAST
SBOM
Scope
Secure baseline
Secure Boot
Selective wipe
SFTP
Shadow IT
Shared responsibility
Sideloading
Signature detection
SNMPv3 authPriv
SPF
SQL injection
SSH
STIG
Supplemental metrics
Supply chain
T
Threat
Threat metrics
TLS
TOCTOU
U
UEM
V
Vector string
PR:N in the vector shows that the attack requires no existing privileges.Vendor advisory
Virtual patching
VM escape
Vulnerability
Vulnerability scanning
W
WAF
Workaround
WPA3
WPS
X
XDR
Z
Zero-day
Zone transfer
#
802.1X
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.