Skip to main content

Documentation Index

Fetch the complete documentation index at: https://threatbasis.io/llms.txt

Use this file to discover all available pages before exploring further.

Network security has evolved from perimeter-focused defense to identity-centric and application-aware controls that assume breach and minimize blast radius. Security engineers architect default-deny, micro-segmented, observable networks where every connection is authenticated, authorized, and logged. Modern network security treats the network as untrusted infrastructure requiring continuous verification rather than a trusted zone protected by perimeter defenses. Cloud-native architectures and remote work have eliminated traditional network perimeters, requiring network security to adapt through Zero Trust principles, service mesh architectures, and identity-based access controls. According to Verizon’s Data Breach Investigations Report, network-based attacks remain a primary vector for data breaches, making robust network security essential for organizational resilience.

Core Network Security Principles

The following table summarizes the foundational principles that guide modern network security architecture:
PrincipleDescriptionKey ControlsOutcome
Default DenyBlock all traffic unless explicitly permittedAllowlists, network policies, security groupsPrevents unauthorized access
Least PrivilegeLimit connectivity to minimum requiredMicro-segmentation, NetworkPoliciesContains breach blast radius
Authenticated EdgesCryptographically verify all connectionsmTLS, SPIFFE/SPIRE, certificate managementPrevents impersonation attacks
Network ObservabilityLog and monitor all network activityFlow logs, DNS logs, SIEM integrationEnables threat detection
Network ResilienceProtect against overload and DoSRate limiting, circuit breakers, CDNsMaintains availability

Default Deny

Network policies should deny all traffic by default, with explicit allowlists for required connections. Default deny applies to both inbound and outbound traffic, preventing unauthorized ingress and data exfiltration through egress control. Allowlists should be scoped per service and per tenant, specifying exactly which sources can connect to which destinations on which ports. Overly broad allowlists that permit entire subnets or IP ranges reduce security to checkbox compliance without meaningful protection. Default deny requires comprehensive understanding of application communication patterns, making network flow mapping essential during architecture design and migration planning.

Least Privilege Connectivity

Micro-segmentation divides networks into small zones with independent access controls, limiting lateral movement from compromised systems. Cloud platforms provide micro-segmentation through VPCs/VNETs, subnets, AWS Security Groups, and network ACLs. Kubernetes NetworkPolicies provide pod-level network segmentation, restricting which pods can communicate. Service mesh architectures like Istio and Linkerd enforce authorization policies at Layer 7, enabling fine-grained access control based on service identity and request attributes.
# Example Kubernetes NetworkPolicy: Default deny all ingress
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-deny-ingress
  namespace: production
spec:
  podSelector: {}
  policyTypes:
    - Ingress
Least privilege connectivity ensures that compromised systems can only access resources they legitimately need, containing breach impact.

Authenticated Network Edges

TLS encryption should be universal for data in transit, protecting confidentiality and integrity. Mutual TLS (mTLS) for service-to-service communication provides cryptographic authentication, eliminating reliance on network location for trust. SPIFFE/SPIRE provides workload identity for mTLS, with automatic certificate rotation and cryptographic service identity. Service mesh platforms including Istio and Linkerd provide mTLS by default with transparent encryption.
Authentication MethodUse CaseKey BenefitImplementation
TLS 1.3Client-server encryptionConfidentiality and integrityLoad balancers, reverse proxies
mTLSService-to-serviceMutual authenticationService mesh, SPIFFE/SPIRE
Certificate pinningHigh-security clientsPrevents CA compromiseMobile apps, critical services
DANE/TLSADNS-based cert validationReduces CA dependencyDNS infrastructure
Authenticated edges prevent network-based attacks including man-in-the-middle, eavesdropping, and session hijacking.

Network Observability

Comprehensive network logging including flow logs, DNS logs, HTTP logs, and TLS metadata enables threat detection and forensic investigation. Logs should include source and destination identities, not just IP addresses, enabling identity-based analysis. Tamper-evident log storage prevents attackers from covering tracks by modifying logs. Centralized log aggregation with long retention enables historical analysis and threat hunting using tools like Splunk, Elastic Security, or Sumo Logic. Network observability provides visibility into attack patterns, data exfiltration, and lateral movement that may evade endpoint detection.

Network Resilience

Rate limiting, backpressure, and circuit breakers protect services from overload and denial-of-service attacks. Token bucket algorithms provide fair rate limiting while allowing burst traffic. DoS-resistant front doors including CDNs (Cloudflare, AWS CloudFront, Akamai), load balancers, and API gateways absorb attack traffic before it reaches application infrastructure. Graceful degradation with feature flags maintains core functionality during attacks.

Protocol-Specific Security

The following table summarizes security considerations for common network protocols:
ProtocolPrimary ThreatsKey MitigationsStandards/References
IPv4/IPv6Spoofing, RA flooding, NDP attacksRFC 1918 filtering, RA Guard, NDP protectionRFC 7039
DNSSpoofing, cache poisoning, tunnelingDNSSEC, DNS filtering, query loggingRFC 4033
BGPRoute hijacking, prefix leaksRPKI, max-prefix limits, route filteringRFC 7454
EmailSpoofing, phishing, malwareSPF, DKIM, DMARC, content filteringRFC 7489
TLSDowngrade attacks, weak ciphersTLS 1.3, certificate transparencyRFC 8446

IPv4 and IPv6 Security

RFC 1918 private address space should be filtered at network edges, preventing external routing of private addresses. IPv6 introduces new attack surfaces including Router Advertisement flooding and Neighbor Discovery Protocol attacks. RA Guard and NDP protections prevent rogue router advertisements and neighbor discovery spoofing. SLAAC (Stateless Address Autoconfiguration) can create unexpected address assignments, requiring careful configuration or disablement in favor of DHCPv6.

DNS Security

DNSSEC provides cryptographic integrity for DNS responses, preventing DNS spoofing and cache poisoning. While DNSSEC deployment remains limited, it should be used where feasible for critical domains. Egress control on DNS prevents DNS tunneling for data exfiltration and command-and-control. Dedicated DNS resolvers with logging enable detection of malicious domains and data exfiltration attempts. DNS filtering using services like Quad9, Cloudflare Gateway, or Cisco Umbrella blocks known malicious domains, phishing sites, and data exfiltration destinations. DNS query logging provides valuable threat intelligence and incident investigation data.

Routing Security

BGP security through RPKI (Resource Public Key Infrastructure) validates route announcements, preventing route hijacking. Max-prefix limits prevent route table overflow attacks. Provider-managed peering with guardrails reduces exposure to routing attacks while maintaining connectivity. Organizations should avoid operating their own BGP unless they have expertise and monitoring capabilities. The MANRS initiative provides routing security best practices.

Email Security

SPF (Sender Policy Framework), DKIM (DomainKeys Identified Mail), and DMARC (Domain-based Message Authentication, Reporting, and Conformance) provide email authentication and anti-spoofing protection. Email should be treated as untrusted ingress requiring content filtering, attachment scanning, and link protection. Email remains a primary attack vector for phishing and malware delivery according to CISA guidance.

Network Security Controls

The following table compares network security control types and their capabilities:
Control TypeOSI LayerDetection MethodDeployment ModeExample Tools
Packet Filter FirewallL3-L4Stateless rulesInlineiptables, nftables
Stateful FirewallL3-L4Connection trackingInlinepfSense, Palo Alto
WAFL7HTTP inspectionInline/Reverse proxyModSecurity, AWS WAF
IDSL3-L7Signature/AnomalyPassive/TAPSuricata, Zeek
IPSL3-L7Signature/AnomalyInlineSnort, Suricata
NDRL3-L7ML/BehavioralPassiveDarktrace, Vectra

Firewalls and Web Application Firewalls

Layer 3/4 firewalls provide network-level access control based on IP addresses, ports, and protocols. Layer 7 Web Application Firewalls (WAFs) inspect HTTP traffic for application-layer attacks including SQL injection and cross-site scripting. Infrastructure-as-code for firewall policies using tools like Terraform or Pulumi enables version control, testing, and automated deployment. Shadow rules in audit mode enable safe policy testing before enforcement.
# Example Terraform: AWS Security Group with explicit rules
resource "aws_security_group" "web_tier" {
  name        = "web-tier-sg"
  description = "Security group for web tier"
  vpc_id      = aws_vpc.main.id

  ingress {
    description = "HTTPS from load balancer"
    from_port   = 443
    to_port     = 443
    protocol    = "tcp"
    security_groups = [aws_security_group.alb.id]
  }

  egress {
    description = "Database access only"
    from_port   = 5432
    to_port     = 5432
    protocol    = "tcp"
    security_groups = [aws_security_group.database.id]
  }
}
Cloud-native firewalls integrate with cloud platforms, providing dynamic rule updates based on resource tags and auto-scaling groups.

Intrusion Detection and Prevention

Intrusion Detection Systems (IDS) and Intrusion Prevention Systems (IPS) analyze network traffic for attack patterns using signature-based and anomaly-based detection. Network Detection and Response (NDR) platforms provide advanced threat detection with machine learning. Suricata and Zeek provide open-source network security monitoring with deep packet inspection. Signature-based detection identifies known attacks from sources like Emerging Threats, while anomaly detection identifies unusual traffic patterns. Tuning reduces false positives that create alert fatigue, with continuous refinement based on environment-specific traffic patterns. The MITRE ATT&CK framework provides a taxonomy for mapping detected behaviors to known attack techniques.

DDoS Protection

Distributed Denial of Service (DDoS) protection requires multiple layers including provider-level scrubbing, anycast routing, rate limiting, and application-level controls.
DDoS Attack TypeLayerMitigation StrategyProtection Service
Volumetric (UDP flood)L3-L4Scrubbing, blackholingAWS Shield, Cloudflare
Protocol (SYN flood)L4SYN cookies, rate limitingLoad balancers, firewalls
Application (HTTP flood)L7WAF, bot detection, CAPTCHAAkamai, Imperva
Amplification (DNS, NTP)L3-L4BCP38, response rate limitingISP filtering
Provider scrubbing services absorb large-scale volumetric attacks before they reach organizational infrastructure. Anycast routing distributes traffic across multiple locations, making attacks harder to execute. Application-level rate limiting and token buckets prevent application-layer DDoS attacks that bypass network-level protections. Feature flags enable graceful degradation during attacks.

Egress Control

Egress proxies with authentication restrict outbound connections to known services, preventing data exfiltration and command-and-control communication. Proxy authentication ensures that only authorized users and services can make outbound connections. TLS inspection enables deep packet inspection of encrypted traffic but raises privacy concerns requiring strong governance. TLS inspection should be limited to corporate devices with clear user notification and privacy review per NIST guidelines. Egress filtering blocks connections to known malicious infrastructure, data exfiltration services, and unauthorized cloud platforms. Tools like Zscaler and Netskope provide cloud-based egress security.

Network Segmentation Patterns

Effective network segmentation limits blast radius and prevents lateral movement. The following table summarizes common segmentation patterns:
PatternImplementationUse CaseIsolation Level
Environment IsolationSeparate accounts/projectsDev/staging/prod separationStrong
Tenant IsolationSeparate VPCs/VNETsMulti-tenant SaaSStrong
Control Plane IsolationDedicated management networkSecurity infrastructureCritical
Workload SegmentationNetworkPolicies, security groupsMicroservicesGranular
Data Tier IsolationPrivate subnets, no internetDatabase protectionStrong

Environment Isolation

Production, staging, and development environments should use separate cloud accounts or projects with independent networking. Environment isolation prevents development environment compromises from affecting production. Separate credentials per environment ensure that development credentials cannot access production resources. Network-level isolation provides defense-in-depth beyond access control. AWS Organizations and Azure Management Groups enable multi-account strategies.

Tenant Isolation

Multi-tenant systems require isolation at both data and network layers. Shared backends without policy enforcement create cross-tenant data leakage risks. Network-level tenant isolation through separate VPCs or VNETs provides strong isolation boundaries. Application-level tenant isolation through authorization policies provides fine-grained control. See AWS multi-tenancy best practices for implementation guidance.

Control Plane Isolation

Security tooling and identity infrastructure should reside in separate, locked-down network segments. Control plane isolation prevents attackers from disabling security controls or compromising identity systems. Dedicated management networks for infrastructure administration prevent production network compromises from affecting management capabilities. Bastion hosts or AWS Systems Manager Session Manager provide secure administrative access without exposing management interfaces.

Network Monitoring and Forensics

Comprehensive network monitoring enables threat detection, incident response, and forensic investigation. The following table outlines key data sources:
Data SourceInformation CapturedRetention RecommendationPrimary Use Case
VPC Flow LogsSource, destination, ports, bytes90 days minimumTraffic analysis, anomaly detection
DNS Query LogsDomain lookups, client IPs90 days minimumThreat intelligence, exfiltration detection
HTTP/Proxy LogsURLs, headers, response codes30-90 daysApplication security, forensics
Packet CaptureFull packet contentOn-demand onlyDeep forensic investigation
TLS MetadataCertificate info, cipher suites30 daysEncryption compliance, threat detection

Flow and Connection Logging

VPC Flow Logs, NetFlow, and IPFIX provide network flow data including source, destination, ports, and byte counts. Flow logs enable traffic pattern analysis, anomaly detection, and forensic investigation. DNS query logs capture all DNS requests, providing visibility into domain access patterns and potential data exfiltration. HTTP reverse proxy logs capture application-layer request details. Log retention should balance storage costs with forensic and compliance requirements, typically ranging from 30 days to one year per NIST SP 800-92 guidance.

Packet Capture

Full packet capture provides comprehensive network forensics but creates storage and privacy challenges. On-demand packet capture via network taps or port mirrors enables targeted capture during investigations. Blanket full packet capture in production should be avoided due to storage costs and privacy implications. Packet capture should be triggered by playbooks during security incidents. Tools like Wireshark, tcpdump, and cloud-native solutions like AWS Traffic Mirroring enable targeted capture.

Time Synchronization

Accurate time synchronization through NTP or PTP enables correlation of events across distributed systems. Clock discipline ensures that timestamps are reliable for forensic analysis and compliance. Time synchronization should be monitored, with alerts on clock drift that could indicate attacks or infrastructure issues. Cloud providers offer managed time services like Amazon Time Sync Service and Google Public NTP.

Common Network Security Pitfalls

The following table summarizes common network security mistakes and their mitigations:
PitfallRiskMitigationDetection Method
Flat NetworksUnlimited lateral movementMicro-segmentation, NetworkPoliciesNetwork flow analysis
Permissive EgressData exfiltration, C2Egress proxies, allowlistsEgress monitoring
Unmonitored Third-PartySupply chain attacksDedicated segments, monitoringConnection logging
Implicit East-West TrustLateral movementmTLS, service mesh policiesTraffic inspection
Shared Jump BoxesCredential compromiseIndividual access, PAMSession logging
Unmanaged DevicesPersistent vulnerabilitiesAsset inventory, patchingVulnerability scanning

Flat Networks

Flat networks without segmentation provide unlimited lateral movement for attackers. Micro-segmentation should be implemented even in cloud environments where traditional VLANs don’t exist. The MITRE ATT&CK Lateral Movement techniques demonstrate why segmentation is critical.

Permissive Egress

Allowing all outbound traffic enables data exfiltration and command-and-control communication. Egress should be restricted to known services with monitoring and alerting. Implement egress controls following CISA’s network segmentation guidance.

Unmonitored Third-Party Connectivity

Third-party connections including vendor access, partner integrations, and supply chain connections create attack vectors. Third-party connectivity should be monitored with same rigor as user access per NIST SP 800-161 supply chain risk management guidance.

Implicit East-West Trust

Trusting all traffic within the network perimeter enables lateral movement. East-west traffic between services should be authenticated and authorized using Zero Trust principles.

Shared Jump Boxes

Shared jump boxes with long-lived credentials create single points of compromise. Privileged access should use individual credentials with comprehensive logging through Privileged Access Management (PAM) solutions.

Unmanaged Network Devices

Network devices with default credentials or outdated firmware create persistent vulnerabilities. All network devices should be inventoried, hardened, and patched following CIS Benchmarks for network devices.

Network Security Metrics

Measuring network security effectiveness requires tracking key performance indicators:
MetricDescriptionTargetAlert Threshold
Mean Time to Detect (MTTD)Time from intrusion to detection< 24 hours> 72 hours
Mean Time to Respond (MTTR)Time from detection to containment< 4 hours> 24 hours
Segmentation Coverage% of workloads with network policies> 95%< 80%
Egress Policy Coverage% of egress traffic through proxies> 90%< 70%
mTLS Adoption% of service-to-service traffic encrypted> 99%< 95%
Vulnerability RemediationNetwork device patches within SLA> 95%< 80%

Conclusion

Network security fundamentals require defense-in-depth with default deny policies, micro-segmentation, authenticated connections, and comprehensive observability. Security engineers design networks that assume breach and minimize blast radius through least privilege connectivity and continuous monitoring. Key success factors:
  • Default deny policies with explicit allowlists for all network traffic
  • Micro-segmentation limiting lateral movement between workloads
  • mTLS and authenticated connections for all service-to-service communication
  • Comprehensive logging and monitoring for threat detection
  • Egress controls preventing data exfiltration and C2 communication
  • Regular assessment against security metrics and continuous improvement
Success requires treating network security as foundational architecture rather than perimeter controls, with security integrated into network design from the beginning. Organizations that invest in network security fundamentals build resilient infrastructures that resist network-based attacks while providing visibility for threat detection and response.

References