Skip to content

Lesson 3 of 9 · 23m

STRIDE in Practice Without the Checkbox Exercise

Use STRIDE as a prompt for adversarial thinking, not six buckets to fill. Concrete questions and examples for each category.

STRIDE — Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege — is useful because it forces you beyond "can someone log in?" It fails when teams turn it into a form: one row per category, filled with generic statements like "SQL injection possible." STRIDE is a set of questions you ask while walking each trust-boundary crossing.

Spoofing: can they become someone or something else?

Ask what proves identity for each actor and flow. A webhook claiming to be from Stripe is spoofable unless you verify the signature; an internal service call is spoofable if any pod can mint the same header; a browser session is spoofable if cookies are not bound with sane Secure, HttpOnly, and SameSite attributes.

# verifying a Stripe-style webhook means verifying bytes, not parsed JSON
signature = request.headers["Stripe-Signature"]
event = stripe.Webhook.construct_event(
    payload=request.body,           # exact raw body
    sig_header=signature,
    secret=settings.STRIPE_WEBHOOK_SECRET,
    tolerance=300,
)

If identity is carried by a mutable field — user_id in the request body, X-User-Id from the edge — that is a spoofing finding, not a convenience.

Tampering: can they modify data or state in transit or at rest?

Tampering is broader than TLS. Can a user alter a price in a hidden form field? Can a retry duplicate a transfer? Can a template injection alter generated HTML? Can a compromised dependency modify a build artifact? Integrity controls include signatures, checksums, server-side authorization, idempotency, and immutable release artifacts.

Repudiation: can someone plausibly deny an important action?

Repudiation is not "log everything." It is whether you can establish who performed security-relevant actions with enough context to investigate: actor, subject, object, timestamp, source, request id, and outcome. Logs that contain bearer tokens, reset links, or full payment data create a new incident while solving the old one.

{"event":"admin.role.granted","actor":"u_123","object":"u_981","role":"support_admin","request_id":"req_7f2","result":"allowed"}

Information disclosure, denial of service, elevation of privilege

For data exposure, follow both reads and side effects: verbose errors, cache keys, analytics events, logs, exports, backups, screenshots, search indexing. For denial of service, ask what resource an attacker controls: request count, payload size, regex complexity, queue fanout, password hash cost. For privilege elevation, look for transitions: user to admin, tenant A to tenant B, sandboxed input to server-side execution, read-only token to write access.

Use STRIDE selectively

Do not force all six categories onto every flow. A static public marketing page may have no meaningful repudiation threat; a refund approval endpoint absolutely does. Depth beats coverage.

Field notes

  • STRIDE-per-element is more useful than STRIDE-per-system: ask the categories at each boundary crossing.
  • "Encrypted in transit" answers part of tampering and disclosure, none of spoofing, repudiation, DoS, or privilege escalation.
  • Abuse cases are often normal features used at scale: password reset, invite links, file preview, search, exports.
  • Write the finding as a concrete attacker action: "customer can replay captured webhook to reissue refund" beats "insufficient integrity controls.

Was this lesson helpful?

Sign in to rate