CAPEC-60 - Reusing Session IDs (aka Session Replay)

This attack targets the reuse of valid session ID to spoof the target system in order to gain privileges. The attacker tries to reuse a stolen session ID used previously during a transaction to perform spoofing and session hijacking. Another name for this type of attack is Session Replay.

Severity

Likelihood

Confidentiality

Integrity

Availability

  • Attack Methods 3
  • Spoofing
  • Social Engineering
  • Analysis
  • Purposes 1
  • Penetration
  • Sec Principles 1
  • Securing the Weakest Link
  • Scopes 1
  • Gain privileges / assume identity
  • Authorization
  • Access_Control
  • Confidentiality

Low level: If an attacker can steal a valid session ID, he can then try to be authenticated with that stolen session ID.

Medium level: More sophisticated attack can be used to hijack a valid session from a user and spoof a legitimate user by reusing his valid session ID.

The target host uses session IDs to keep track of the users.

Session IDs are used to control access to resources.

The session IDs used by the target host are not well protected from session theft.

The attacker can listen to a conversation between the client and server and steal a valid session ID.

The attacker can try to steal session information from the user's cookies.

The attacker can try a valid session from a finished transaction and find out that the transaction associated with the session ID did not time out.

Step 1 -

The attacker interacts with the target host and finds that session IDs are used to authenticate users..

Step 2 -

The attacker steals a session ID from a valid user..


Step 1 -

The attacker tries to use the stolen session ID to gain access to the system with the privileges of the session ID's original owner..


Always invalidate a session ID after the user logout.

Setup a session time out for the session IDs.

Protect the communication between the client and server. For instance it is best practice to use SSL to mitigate man in the middle attack.

Do not code send session ID with GET method, otherwise the session ID will be copied to the URL. In general avoid writing session IDs in the URLs. URLs can get logged in log files, which are vulnerable to an attacker.

Encrypt the session data associated with the session ID.

Use multifactor authentication.