Skip to content
This repository was archived by the owner on Jul 24, 2022. It is now read-only.
/ timing-server Public archive

Web server used to illustrate timing attack vulnerabilities

Notifications You must be signed in to change notification settings

rgdd/timing-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Timing attacks use time as a side-channel which leaks information about the data that a program is operating on. To illustrate such a timing vulnerability for educational purposes, this project provides an insecure web server that does user authentication in non-constant time:

  • The server computers a user's unique authentication tag based on a secure primitive for message authentication codes.
  • This tag is then byte-by-byte compared to a user-supplied authentication tag such that an error is returned as soon as there is a mis-match.

The last step is not constant time, and can be exploited to guess a user's authentication tag. By default, the server listens for HTTP GET requests on http://localhost:20000/auth/<delay>/<user>/<tag>, where tag is a 4-byte hex-encoded tag for <user>. The <delay> specifies how long the server will pause in ms after each byte-by-byte comparison, making it easier to exploit the vulnerability without an excessive amount of repetitions. If access is granted, HTTP status 200 OK is returned.

Access granted example: http://localhost:20000/auth/50/alice/c3d36f5f

Access denied example: http://localhost:20000/auth/1/alice/c3d36f5f

For further configuration options, e.g., to increase the tag size, invoke the help flag (-h or --help).

About

Web server used to illustrate timing attack vulnerabilities

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages