new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

OWASP Cheat Sheets · all subjects

application_security/architecture

265 notes in this subject, read out of this brain and free to use. This is page 2 of 5.

Policy-as-Code key principles

Zero Trust policies should be defined as code, not manually, ensuring consistency, reproducibility, and auditability. Key principles include: version-controlled policies, tested within CI/CD pipelines, automatically enforced at deployment, and traceable via audit logs.

Zero Trust response to insider threats

Verify every action regardless of user location, role, or tenure. No implicit trust is given to employees inside network perimeter.

Common organizational mistake: moving too fast

Some organizations try to implement Zero Trust in a few months, which usually leads to broken workflows, user frustration, and incomplete security coverage. Zero Trust is a multi-year journey that requires careful planning and phased implementation. Rushing the process often means having to redo work later when problems surface.

Zero Trust Security Loop: four steps

Zero Trust uses a four-step security loop: (1) Policy-as-Code - Policies are defined in code repositories and tested. (2) Continuous Verification - Every change and deployment is validated against policies. (3) Telemetry Signals - Runtime signals provide continuous monitoring. (4) Feedback Loop - Collected signals are used to refine policies. This three-part approach makes Zero Trust a dynamic, continuously adaptive security model.

Zero Trust core principle: all communication is secured regardless of network location

Every connection must be encrypted and authenticated, whether between office and cloud, between internal systems, or from home to work. Network location does not determine trust level. Use strong encryption (TLS 1.3 or better) for everything.

Policy-as-Code use cases

Policy-as-code use cases include: admission control, workload security (privileges, capabilities, runtime profiles), network segmentation (L3-L7), image and artifact security, and RBAC enforcement.

Policy-as-Code recommended tools

Recommended tools for policy-as-code include: Open Policy Agent (OPA) / Gatekeeper, Kyverno, Cilium Network Policies, and cloud provider policy engines (AWS SCP, Azure Policy, GCP Org Policy).

Zero Trust core principle: all data sources and computing services are resources

Everything in your network is a resource that needs protection including servers, databases, cloud services, IoT devices, and user devices. Do not assume anything is safe just because it is internal to your network. Each resource needs its own security controls.

GDPR compliance with Zero Trust controls

Privacy-by-design, data access logging, and breach detection help meet GDPR compliance requirements.

HIPAA compliance with Zero Trust controls

Granular access controls, data encryption, and audit trails help meet HIPAA compliance requirements.

PCI DSS compliance with Zero Trust controls

Network segmentation, encrypted communications, and access monitoring help meet PCI DSS compliance requirements.

ISO 27001 compliance with Zero Trust controls

Risk-based access decisions and information security management help meet ISO 27001 compliance requirements.

SOC 2 compliance with Zero Trust controls

Strong access controls, continuous monitoring, and audit logging help meet SOC 2 compliance requirements.

Common organizational mistake: vendor lock-in

Zero Trust involves many different technologies, and some vendors will try to sell you a complete Zero Trust platform that locks you into their ecosystem. Keep your options open by choosing solutions that support open standards and can integrate with multiple vendors. Your security architecture should be flexible enough to adapt as threats and technologies evolve.

Common organizational mistake: no executive support

Zero Trust implementation requires significant changes to how people work, substantial budget for new tools, and coordination across multiple teams. Without strong leadership commitment and budget approval, your project will stall when it encounters resistance or resource constraints. Get executive sponsorship before you start, not after you run into problems.

Common mistake: relying only on network security

Many organizations think they can just add network controls and call it Zero Trust. But Zero Trust is fundamentally about identity-based security, not network security. If you are still thinking in terms of inside and outside the network, you are missing the point. Focus on verifying identity and device health for every access request, regardless of where it comes from.

Container security: network policies

Control which containers can talk to each other.

Multi-cloud: consistent policies

Apply the same security rules everywhere.

Multi-cloud: secure connections

Encrypt communication between cloud environments.

Legacy system solution: network isolation

Put legacy systems in separate, heavily monitored network zones with very restricted access. You cannot apply Zero Trust principles directly to these systems, but you can control how they communicate with everything else. Monitor all traffic to and from these zones and require modern authentication for any access to the zone itself.

Zero Trust implementation aligns with CISA Zero Trust Maturity Model v2.0

Implementation phases line up with the CISA Zero Trust Maturity Model v2.0, but timeline will depend on organization size and resources.

Zero Trust implementation timeline

Most organizations take 3-5 years to fully implement Zero Trust, and that is with dedicated teams and management support. Do not expect quick results. This takes time.

Zero Trust implementation Phase 4: plan ahead

Start thinking about post-quantum cryptography, new authentication methods, and AI-powered security tools.

Zero Trust implementation Phase 4: stay current

Update threat intelligence, adjust risk scoring, and change policies based on new attack methods. What worked last year might not work now.

Zero Trust implementation Phase 2: break up network

Split your flat network into smaller, separate segments. Start with your most important applications. This is technically hard and network teams might not like the extra work.

Legacy system challenge: network dependencies

Older systems were designed for flat, trusted networks where everything inside the perimeter was considered safe. These systems often require direct network access between components and cannot work properly when you implement micro-segmentation. They expect to communicate freely with other systems without going through identity checks.

Zero Trust implementation Phase 1: replace VPN

Switch to Zero Trust Network Access (ZTNA) that only gives access to specific applications. Regular VPNs give too much access once someone logs in. This is usually a significant change users notice.

Zero Trust implementation Phase 1: figure out what you have

Make a list of all users, devices, applications, and how data moves around. You will find forgotten systems, shadow IT, and connections nobody documented. This takes longer than expected.

Application security: API security gateways

Authenticate every API call, validate request schemas, and enforce rate limits for microservices communication using REST security best practices.

Container security: service mesh

Automatically handle identity and encryption between containers.

Network controls: replace VPNs with Zero Trust Network Access

Use Zero Trust Network Access (ZTNA) instead of traditional VPNs.

Network controls: web filtering

Control what websites users can visit.

Network controls: DNS filtering

Block access to malicious websites.

Common organizational mistake: skipping user training

Zero Trust changes how people authenticate, access applications, and handle security alerts. If you do not invest in educating your staff about why these changes are necessary and how to work with them, you will face constant resistance and support tickets. Plan for comprehensive training programs, not just email announcements.

Micro-segmentation: encrypted communications

All communication between systems must be encrypted.

Micro-segmentation: block by default

Do not allow traffic unless specifically permitted.

Micro-segmentation: separate by application

Each application gets its own network segment.

Endpoint protection: remote wipe capability

Ability to erase lost or stolen devices.

Endpoint protection: anti-malware software

Real-time protection against viruses and malware.

Device security: revoke trust when compromised

Automatically remove access if device security is compromised.

Device security: register all devices

Keep a list of approved devices with unique certificates.

Zero Trust technology components

Zero Trust requires several technology categories working together: Identity and Access Management (strong authentication with MFA and risk-based access decisions), Zero Trust Network Access (ZTNA) (application-level access instead of network-level VPNs), Web Application Security (protect applications and APIs from OWASP Top 10 attacks), Security Monitoring (real-time visibility and automated response to threats).

API-First Attacks defense with Zero Trust

Direct attacks on APIs bypass network security entirely. Zero Trust requires authentication and authorization for every API call, validates request schemas, and uses behavioral analysis to detect abuse patterns.

Cloud Configuration Drift defense with Zero Trust

Misconfigured cloud resources expose data outside traditional network boundaries. Zero Trust uses policy-as-code, continuous compliance monitoring, and resource-level access controls to prevent unauthorized data access.

Supply Chain Attacks defense with Zero Trust

Malicious code hidden in trusted software (like SolarWinds) bypasses perimeter security completely. Zero Trust responds with application-level identity verification, runtime behavior monitoring, and micro-segmentation to limit damage.

Continuous Verification: every access, deployment, and configuration change is verified

Zero Trust requires every access, deployment, and configuration change to be automatically verified. Verification examples include: workload identity verification (SPIFFE/SPIRE, IAM), image signature validation (cosign / sigstore), security quality gates (SAST, IaC scanning, image scanning), RBAC drift detection, network policy drift detection, and automated enforcement at admission. This approach prevents risky components from entering clusters during CI/CD.

Zero Trust response to compromised device

Device health is continuously monitored. Access is immediately revoked if compromise is detected, unlike traditional VPN access that grants network access without ongoing verification.

Zero Trust response to lateral movement

Micro-segmentation blocks movement between systems. Each connection is verified, preventing attackers from moving freely after gaining initial access.

Network-level DoS defense: caching for bandwidth resilience

Implement caching so future requests for cached data are served faster. The more data served via caching, the more resilient the application becomes to bandwidth exhaustion attacks.

MAC flooding attack mechanism and data leakage risk

In MAC flooding attacks, a switch is flooded with packets containing different source MAC addresses to consume the limited memory of the switch's MAC address table. This causes valid MAC addresses to be purged and forces the switch to fail over to hub mode, forwarding all data to all ports and causing data leakage.

Software design concept: use asynchronous operations to avoid waiting on large tasks

Employ asynchronous operations and threading to avoid operations that must wait for completion of large tasks before proceeding.

Software design concept: protect against buffer overflow and underflow

Learn to prevent buffer overflow and underflow vulnerabilities, as these often lead to DoS-related security issues.

Software design concept: proper exception handling in DoS scenarios

Handle exceptions gracefully during DoS attacks. An overwhelmed system may throw exceptions; code must handle them properly so the system can continue operating rather than failing completely.

Software design concept: avoid CPU-intensive operations in DoS contexts

Avoid operations that consume large amounts of CPU resources, as these become serious performance drags during DoS attacks. Review performance issues in code and language-specific problems (Java, JVM, IIS).

Software design concept: prevent single points of failure in DoS defense

Detect and prevent single points of failure (SPOF) by employing stateless components, using redundant systems, creating bulkheads to stop failures from spreading across infrastructure, and ensuring systems can survive external service failures. Most DoS attacks exploit SPOFs in overwhelmed systems.

Software design concept: graceful degradation for DoS resilience

Implement graceful degradation during application design to limit DoS impact. The system or application must continue at reduced functionality rather than failing completely when portions break. This fault-tolerant design prevents sudden and abrupt application termination.

Slow HTTP attacks deliver fragmented requests to exhaust connections

Slow HTTP attacks deliver HTTP requests very slowly and fragmented, one piece at a time. The server keeps resources allocated while waiting for incoming data, and eventually reaches the maximum concurrent connection pool, resulting in DoS. These attacks require minimal resources from an attacker's perspective.

ARP poisoning attack mechanism and mitigation

In ARP poisoning attacks, a malicious actor sends spoofed ARP (Address Resolution Protocol) messages to link their MAC address to a legitimate IP address, allowing them to intercept, modify, or stop data intended for that IP. Mitigation includes packet filtering to identify and block offending ARP packets, or using static ARP tables (though difficult to maintain).

Application layer DoS attacks exhaust resources or disable functionality

Application layer attacks (OSI layer 7) make applications unavailable by exhausting system resources or rendering them functionally unusable without necessarily consuming network bandwidth. These attacks place operational strain on the application server, are the most challenging to identify and mitigate, and are often the result of exploiting protocol stack weaknesses.

DoS cheat sheet scope and analysis methodology

The OWASP Denial of Service Cheat Sheet describes methodology for handling DoS attacks across three main attack surfaces: Application layer (OSI 7), Session/protocol layer (OSI 4-6), and Network/volumetric layer (OSI 3). It recommends thorough analysis of system inventory based on functionality, architecture, and performance to identify potential DoS vulnerabilities, single points of failure, and bottlenecks. Defense mechanisms should align with scaling options (scaling up for hardware, scaling out for components), existing conceptual techniques (redundancy, bulk-heading), and cost analysis.

Give your agent this brain