-1

I imagine it’s due to time stamps and sequence numbers. However, those can be replayed as well.

The attacker can't create new sequence numbers or time stamps without being detected if the integrity of every message is maintained. This can be obtained by using HMAC verification of an authentication tag over the message. The attacker doesn't have the symmetric HMAC key if it was sent over an encrypted tunnel between the victim and server.

Is there more to it than this? Or is this really the basic idea?

5
  • 1
    Your question is unclear to me. Are you asking about how to design a protocol where replay attacks are impossible? Are you asking how replay attacks are handled in specific protocols (which?). Are you asking for all ways how replay attacks can be prevented (too broad)? Commented Jul 14, 2018 at 12:34
  • Sorry for being unclear, I want to know if replay attacks are prevented completely by combining tcp sequencing numbers and HTTPS. Commented Jul 14, 2018 at 18:49
  • If the system is checking timestamps and sequence numbers, how can this be replayed??
    – schroeder
    Commented Jul 18, 2018 at 11:27
  • Can you not, as an attacker, create a fake timestamp and sequence number? Commented Jul 18, 2018 at 16:39
  • @AznBoyStride if you are creating your own timestamps and sequence numbers, then it is no longer being "replayed"
    – schroeder
    Commented Jul 23, 2018 at 16:04

1 Answer 1

0

Yes, sequence numbers and time stamps are good ways to disallow replay attacks. However, you don't need message authenticity nor message integrity to make them work. The reason is simple: the check only disallows messages that would otherwise be accepted.

However, if you do offer authenticity / integrity over the message then you'll still want to include the sequence number / time stamp in the calculation. Otherwise an attacker may change just the sequence number / time stamp to a new value and use that. And you do want to offer authenticity / authenticity for a secure protocol, for instance by calculating an authentication tag using a secure MAC algorithm.

The above isn't officially a replay attack because it is an active attack that alters the message that is send. That is however of little consolation if your protocol is compromised. And yes, after the integrity of the message is validated, you just need to check the sequence number or timestamp. It is then "that simple".


Notes:

  • Checking a time stamp or storing a sequence number in a persistent way is not necessarily easy, which is why I put "that simple" between quotation marks.
  • Make sure that you cannot replay your own messages, for instance by including an sender / receiver in the message or by using separate session keys for each party.
0

Not the answer you're looking for? Browse other questions tagged .