>_ infosec reads

Guide

Defense in Depth

Why defense cannot stop at the edge, the layers to build, and twenty things you can do this month.

Why the edge is not enough

Defense in depth means no single control is the only thing between an attacker and what matters. Each layer assumes the one in front of it has already failed.

That assumption used to be cautious. It is now just accurate. AI-assisted vulnerability research has sharply accelerated how fast flaws are found and turned into working exploits. Published estimates differ in method and in the exact numbers, but they agree on direction: the gap between a flaw becoming known and being used in attacks has fallen from months, to weeks, to less than a day. Microsoft's 2026 Digital Defense Report puts the median time from discovery in the wild to weaponization at well under 24 hours. Synack's 2026 vulnerability report describes the same gap as hours.

A strategy built on the edge assumes you can patch before the attacker arrives. When exploits appear within hours of disclosure, and sometimes before a fix exists, you will lose that race some of the time. What decides the outcome then is everything behind the edge: whether the attacker can move, whether they can escalate, whether anyone notices, and whether you can recover.

The layers

Defense in depth layers1 PEOPLE AND POLICY2 EDGE AND PERIMETER3 NETWORK4 IDENTITY AND ACCESS5 ENDPOINT AND HOST6 APPLICATION7 DATA8 DETECTevery layer9 RESPOND AND RECOVERevery layer
Seven nested layers, with detection and recovery spanning all of them. An attacker who gets through one should meet another.

1. People and policy

Training, procedures, least-privilege decisions and the habits that decide whether controls get used.

In the age of AI-speed exploitsAI makes phishing and pretexting cheaper and more convincing. Procedures that do not rely on spotting a fake, such as call-back verification for payment or access changes, hold up better than awareness alone.

2. Edge and perimeter

Firewalls, VPN gateways, email and web filtering, and anything reachable from the internet.

In the age of AI-speed exploitsEdge devices are where the patch race is lost first. Keep the exposed surface small enough that you can patch or pull every item on it within hours.

3. Network

Segmentation, internal firewalls and control of east-west traffic.

In the age of AI-speed exploitsAssume one host will fall to an exploit you had no time to patch. Segmentation decides whether that is one host or the whole environment.

4. Identity and access

Authentication, MFA, privileged access and service accounts.

In the age of AI-speed exploitsMost intrusions still turn on a credential. Phishing-resistant MFA and narrow privileges limit what a single compromised account or host can reach.

5. Endpoint and host

Patching, hardening, endpoint protection and configuration baselines on servers and workstations.

In the age of AI-speed exploitsHardening buys time. A service that is disabled, or running unprivileged, turns a critical exploit into a contained one.

6. Application

Secure defaults, dependency management, input handling and secrets management.

In the age of AI-speed exploitsThe same tools that find flaws for attackers can find them for you. Run them on your own code and dependencies before someone else does.

7. Data

Encryption, access controls on the data itself, classification and retention.

In the age of AI-speed exploitsThis is what the attacker came for. Encrypt it, limit who can read it and keep less of it.

8. Detect

Logging, monitoring and alerting across every layer.

In the age of AI-speed exploitsWhen prevention has hours instead of weeks, detection is what tells you that you lost the race. Logs you are not collecting cannot be searched afterward.

9. Respond and recover

Incident response, backups and tested restores.

In the age of AI-speed exploitsSpeed of recovery is a control. An offline backup and a rehearsed plan are the difference between a bad week and a lost quarter.

Top 20 low-hanging fruit

Ordered roughly by value for effort. None needs new budget beyond a password manager. Test changes on one system before rolling them out, and adapt commands to your environment.

#1 · Identity and access

Turn on MFA for every admin and remote-access account

The single highest-value control against stolen and guessed passwords.

Step by step
  1. List every account with admin rights and every way into the network from outside: VPN, remote desktop gateways, cloud consoles, email.
  2. Enforce MFA in the identity provider with a policy, not per-user opt-in. In Microsoft Entra this is a Conditional Access policy; in Google Workspace it is 2-Step Verification enforcement.
  3. Prefer passkeys, security keys or authenticator apps with number matching. Avoid SMS where you can.
  4. Find and fix the exceptions: service accounts, break-glass accounts and legacy protocols that bypass MFA.

#2 · Endpoint and host

Enable automatic security updates on servers

Removes the human delay for the bulk of patches.

Step by step
  1. Debian and Ubuntu.
    sudo apt install -y unattended-upgrades
    sudo dpkg-reconfigure -plow unattended-upgrades
  2. RHEL, Rocky, Alma and Fedora. Then set apply_updates = yes in /etc/dnf/automatic.conf.
    sudo dnf install -y dnf-automatic
    sudo systemctl enable --now dnf-automatic.timer
  3. Confirm the timer is scheduled.
    systemctl list-timers | grep -Ei 'apt|dnf'

#3 · People and policy

Patch what is being exploited first

You cannot patch everything in hours. You can patch the short list attackers are using now.

Step by step
  1. Pull recent additions from the CISA Known Exploited Vulnerabilities feed. Replace the date.
    curl -s https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json \
      | jq -r '.vulnerabilities[] | select(.dateAdded >= "<YYYY-MM-DD>") | [.cveID, .vendorProject, .product] | @tsv'
  2. Compare the products against your inventory and put anything that matches at the top of the patch queue.
  3. Write the rule down: known-exploited flaws on internet-facing systems are fixed or mitigated within a set number of hours, and someone owns checking the feed.

#4 · Edge and perimeter

Find out what you expose to the internet

You cannot defend or patch an exposure you do not know about.

Step by step
  1. From outside your network, scan only address ranges you own or are authorized to test.
    nmap -Pn -sV --top-ports 1000 <your-public-ip-range>
  2. For every open port, record the owner and the reason. Close anything without both.
  3. Move admin interfaces (RDP, SSH, device management pages) behind a VPN or an identity-aware proxy.
  4. Repeat monthly and compare against the last result.

#5 · Endpoint and host

Harden SSH: keys only, no root login

Ends password guessing against SSH outright.

Step by step
  1. Confirm you can log in with a key and use sudo before changing anything.
  2. Set these in /etc/ssh/sshd_config, or a file under /etc/ssh/sshd_config.d/.
    PasswordAuthentication no
    KbdInteractiveAuthentication no
    PermitRootLogin no
  3. Validate and reload. Keep your current session open and test a new login in a second window. The service is named ssh on Debian and Ubuntu.
    sudo sshd -t && sudo systemctl reload sshd

#6 · Network

Set host firewalls to deny inbound by default

Each host should accept only the connections it needs, even from inside.

Step by step
  1. Linux with ufw. Allow your admin network first so you do not lock yourself out.
    sudo ufw default deny incoming
    sudo ufw default allow outgoing
    sudo ufw allow from <admin-network-cidr> to any port 22 proto tcp
    sudo ufw enable
    sudo ufw status verbose
  2. Windows, in an elevated PowerShell session.
    Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True -DefaultInboundAction Block
    Get-NetFirewallProfile | Select-Object Name, Enabled, DefaultInboundAction

#7 · Network

Block workstation-to-workstation SMB and RDP

Workstations rarely need to talk to each other. Ransomware and intruders rely on it.

Step by step
  1. Confirm that file shares and remote support run through servers or a management network, not peer to peer.
  2. Deploy inbound block rules to workstations by Group Policy or Intune. To test on one machine first:
    New-NetFirewallRule -DisplayName "Block inbound SMB" -Direction Inbound -Protocol TCP -LocalPort 445 -Action Block
    New-NetFirewallRule -DisplayName "Block inbound RDP" -Direction Inbound -Protocol TCP -LocalPort 3389 -Action Block
  3. If the help desk needs RDP, add an allow rule scoped to the help desk subnet instead of skipping the block.

#8 · Endpoint and host

Disable SMBv1

An obsolete protocol with a history of wormable flaws.

Step by step
  1. Check the current state.
    Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol
  2. Disable it. If a legacy device still needs it, isolate that device instead of leaving it on everywhere.
    Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force

#9 · Identity and access

Remove local admin rights from daily-use accounts

Limits what malware and a phished user can do on the machine.

Step by step
  1. See who is a local administrator.
    Get-LocalGroupMember -Group Administrators
  2. Remove ordinary user accounts. Give people who need elevation a separate admin account.
  3. Use Windows LAPS so each machine has a unique, rotated local administrator password.

#10 · Identity and access

Review privileged groups and disable stale accounts

Old accounts and forgotten group memberships are free access for an intruder.

Step by step
  1. List who is in the most powerful groups.
    Get-ADGroupMember "Domain Admins" -Recursive | Select-Object Name, SamAccountName
  2. Find enabled user accounts with no logon in 90 days.
    Search-ADAccount -AccountInactive -TimeSpan 90.00:00:00 -UsersOnly | Where-Object Enabled | Select-Object Name, LastLogonDate
  3. Disable first, delete later. Put a recurring review on the calendar with a named owner.

#11 · People and policy

Roll out a password manager and end password reuse

Reused passwords turn someone else's breach into yours.

Step by step
  1. Pick one manager for the organization and pay for it, so people do not improvise.
  2. Start with admins and anyone handling money. Move shared credentials out of spreadsheets and chat into shared vaults.
  3. Turn on the manager's breach and reuse reports and work the list down.

#12 · Network

Use protective DNS

Blocks many connections to known-malicious domains before they start.

Step by step
  1. Point your DNS forwarders or DHCP scope at a filtering resolver.
    Quad9:               9.9.9.9   and  149.112.112.112
    Cloudflare (malware) 1.1.1.2   and  1.0.0.2
  2. Block outbound DNS (port 53) from clients to anything except your own resolvers, so the filter cannot be bypassed by accident.
  3. Keep resolver logs. They are one of the cheapest detection sources you have.

#13 · Edge and perimeter

Publish SPF, DKIM and DMARC

Makes it much harder to spoof your domain in phishing.

Step by step
  1. Check what you publish today.
    dig +short TXT <your-domain>
    dig +short TXT _dmarc.<your-domain>
  2. Publish SPF listing only your real senders, and enable DKIM signing in your mail provider.
    <your-domain>.         TXT  "v=spf1 include:<your-mail-provider> -all"
  3. Start DMARC in monitoring mode, read the reports, then move to quarantine and reject.
    _dmarc.<your-domain>.  TXT  "v=DMARC1; p=none; rua=mailto:<reports-address>"
  4. Domains that send no mail should publish v=spf1 -all and a DMARC policy of reject.

#14 · Application

Block Office macros from the internet

Closes a long-standing malware delivery route.

Step by step
  1. In Group Policy or Intune, enable "Block macros from running in Office files from the Internet" for Word, Excel and PowerPoint.
  2. For teams that need macros, use Trusted Locations or signed macros instead of a blanket exception.

#15 · Endpoint and host

Verify endpoint protection is on everywhere

Coverage gaps are where intrusions start. Most environments have some.

Step by step
  1. Check Microsoft Defender status on a machine.
    Get-MpComputerStatus | Select-Object AMServiceEnabled, RealTimeProtectionEnabled, IsTamperProtected, AntivirusSignatureLastUpdated
  2. Compare the device count in your endpoint console with your asset inventory and chase the difference.
  3. Turn on tamper protection so an intruder cannot simply switch it off.

#16 · Data

Turn on full-disk encryption

A lost or stolen laptop becomes a hardware loss, not a breach.

Step by step
  1. Check status.
    # Windows
    manage-bde -status
    # macOS
    fdesetup status
    # Linux (look for crypto_LUKS)
    lsblk -f
  2. Enable BitLocker or FileVault through device management so recovery keys are escrowed centrally.

#17 · Respond and recover

Keep one backup copy offline and test a restore

Intruders go after backups first. An untested backup is a hope.

Step by step
  1. Follow 3-2-1: three copies, two kinds of storage, one offline or immutable.
  2. Use separate credentials for the backup system, not domain accounts, and require MFA for deletion.
  3. Restore one real system to an isolated network each quarter, time it, and write the time down.

#18 · Detect

Send logs to a central place and keep them

Local logs die with the host, and intruders clear them.

Step by step
  1. Forward Linux logs with rsyslog. Create /etc/rsyslog.d/90-forward.conf with this line (@@ means TCP).
    *.* @@<log-server>:514
  2. Restart the service.
    sudo systemctl restart rsyslog
  3. Prioritize authentication, DNS, firewall, VPN and endpoint logs. Keep at least 90 days.

#19 · Detect

Enable PowerShell script block logging

Records what scripts actually ran, including obfuscated ones.

Step by step
  1. Set by Group Policy (Administrative Templates > Windows Components > Windows PowerShell), or directly:
    New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging' -Force
    Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging' -Name EnableScriptBlockLogging -Value 1
  2. Events appear as ID 4104 in the Microsoft-Windows-PowerShell/Operational log. Forward that log centrally.

#20 · Respond and recover

Write a one-page incident plan and rehearse it

The first hour goes better when nobody is deciding who is in charge.

Step by step
  1. One page: who declares an incident, who leads, who can authorize taking systems offline, and how to reach them out of band if email is down.
  2. Add outside contacts: legal, cyber insurer, incident response firm, law enforcement.
  3. Print it. Then run a 60-minute tabletop on a realistic scenario, such as an edge device exploited overnight, and fix what it exposes.

Sources