OWASP Hunting

Server-side

Timing Attacks

Timing attacks exploit measurable differences in response time to infer secret data, enumerate users, or bypass rate limiting.

Payloads are read from main at 35c1f2b (committed 22 Nov 2026). Project version 1.0.2.

These payloads are for authorized testing only: systems you own, authorized bug bounty programs, or controlled lab environments. Unauthorized testing is illegal.

Payload files

Folder on GitHub

Use the arrow keys to move between payloads. Press Enter or C to copy the focused payload.

timing-attacks-payloads.txt

177 payloads · 12 KB
Source

Loading payloads for Timing Attacks…

What it is#

Timing attacks are side-channel attacks that exploit measurable differences in the time taken by the application to respond to different inputs. Common targets include user enumeration (different response times for valid vs invalid usernames), timing-based blind SQL injection, and cryptographic timing leaks in token comparison functions.

Attack vectors#

  • Login forms (user enumeration via timing)
  • Password comparison logic
  • Token validation (JWT, API keys, CSRF tokens)
  • SQL injection timing via SLEEP/WAITFOR
  • Any feature comparing secrets non-constantly

Testing methodology#

  1. Measure response times for valid vs invalid usernames in login forms
  2. Test for timing-based blind SQL injection with SLEEP()
  3. Use high-precision timing (multiple samples) to detect sub-millisecond differences
  4. Compare response times for existing vs non-existing password reset emails

Indicators of vulnerability#

  • Statistically significant response time difference for valid vs invalid usernames
  • Response delayed by the exact number of seconds specified in SLEEP()
  • Time correlation between first character of token and response time

Detection guidance#

Implement constant-time comparison for secrets and tokens. Add consistent timing to authentication responses. Monitor for unusually high volumes of timed requests.

Mitigation and remediation#

  • Use constant-time comparison functions for all secret comparisons (hmac.compare_digest in Python, crypto.timingSafeEqual in Node.js)
  • Add artificial consistent delay to authentication responses
  • Return identical responses for valid and invalid username inputs
  • Implement rate limiting on authentication endpoints

References#

Responsible Use

All content in this reference is for authorized security testing only. Use only on systems you own or have explicit written permission to test.

  • Systems and applications you own
  • Authorized penetration testing engagements
  • Bug bounty programs with defined scope
  • Educational lab environments (DVWA, WebGoat, HackTheBox)