Difference between revisions of "Capture-replay"

From OWASP
Jump to: navigation, search
(Description)
 
(8 intermediate revisions by one user not shown)
Line 2: Line 2:
 
{{Template:SecureSoftware}}
 
{{Template:SecureSoftware}}
  
==Overview==
+
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
  
 +
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
 +
 +
==Description==
 
A capture-relay protocol flaw exists when it is possible for a malicious user to sniff network traffic and replay it to the server in question to the same effect as the original message (or with minor changes).  
 
A capture-relay protocol flaw exists when it is possible for a malicious user to sniff network traffic and replay it to the server in question to the same effect as the original message (or with minor changes).  
  
==Consequences ==
+
'''Consequences'''
  
 
* Authorization: Messages sent with a capture-relay attack allow access to resources which are not otherwise accessible without proper authentication.
 
* Authorization: Messages sent with a capture-relay attack allow access to resources which are not otherwise accessible without proper authentication.
  
==Exposure period ==
+
'''Exposure period'''
  
 
* Design: Prevention of capture-relay attacks must be performed at the time of protocol design.
 
* Design: Prevention of capture-relay attacks must be performed at the time of protocol design.
  
==Platform ==
+
'''Platform'''
  
* Languages: All
+
* Languages: All
 +
* Operating platforms: All
  
* Operating platforms: All
+
'''Required resources'''
 
+
==Required resources ==
+
  
 
Network proximity: Some ability to sniff from, and inject messages into, a stream would be required to capitalize on this flaw.
 
Network proximity: Some ability to sniff from, and inject messages into, a stream would be required to capitalize on this flaw.
  
==Severity ==
+
'''Severity'''
  
 
Medium to High
 
Medium to High
  
==Likelihood  of exploit ==
+
'''Likelihood  of exploit'''
  
 
High
 
High
  
==Avoidance and mitigation ==
+
Capture-relay attacks are common and can be difficult to defeat without cryptography. They are a subset of network injection attacks that rely on listening in on previously sent valid commands, then changing them slightly if necessary and resending the same commands to the server.
  
* Design: Utilize some sequence or time stamping functionality along with a checksum which takes this into account in order to ensure that messages can be parsed only once.
+
Since any attacker who can listen to traffic can see sequence numbers, it is necessary to sign messages with some kind of cryptography to ensure that sequence numbers are not simply doctored along with content.
 
+
==Discussion ==
+
  
Capture-relay attacks are common and can be difficult to defeat without cryptography. They are a subset of network injection attacks that rely listening in on previously sent valid commands, then changing them slightly if necessary and resending the same commands to the server.
+
==Risk Factors==
 
+
TBD
Since any attacker who can listen to traffic can see sequence numbers, it is necessary to sign messages with some kind of cryptography to ensure that sequence numbers are not simply doctored along with content.
+
  
 
==Examples ==
 
==Examples ==
Line 75: Line 74:
 
</pre>
 
</pre>
  
==Related problems ==
+
==Related [[Attacks]]==
 +
 
 +
* [[Attack 1]]
 +
* [[Attack 2]]
 +
 
 +
 
 +
==Related [[Vulnerabilities]]==
 +
 
 +
* [[Vulnerability 1]]
 +
* [[Vulnerabiltiy 2]]
 +
 
 +
 
 +
==Related [[Controls]]==
 +
 
 +
* [[Control 1]]
 +
* [[Control 2]]
 +
* Design: Utilize some sequence or time stamping functionality along with a checksum which takes this into account in order to ensure that messages can be parsed only once.
 +
 
 +
==Related [[Technical Impacts]]==
  
Not available.
+
* [[Technical Impact 1]]
 +
* [[Technical Impact 2]]
  
  
Line 86: Line 104:
 
[[Category:C]]
 
[[Category:C]]
 
[[Category:Java]]
 
[[Category:Java]]
 +
[[Category:OWASP ASDR Project]]

Latest revision as of 08:42, 21 February 2009

This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.



Last revision (mm/dd/yy): 02/21/2009

Vulnerabilities Table of Contents

Description

A capture-relay protocol flaw exists when it is possible for a malicious user to sniff network traffic and replay it to the server in question to the same effect as the original message (or with minor changes).

Consequences

  • Authorization: Messages sent with a capture-relay attack allow access to resources which are not otherwise accessible without proper authentication.

Exposure period

  • Design: Prevention of capture-relay attacks must be performed at the time of protocol design.

Platform

  • Languages: All
  • Operating platforms: All

Required resources

Network proximity: Some ability to sniff from, and inject messages into, a stream would be required to capitalize on this flaw.

Severity

Medium to High

Likelihood of exploit

High

Capture-relay attacks are common and can be difficult to defeat without cryptography. They are a subset of network injection attacks that rely on listening in on previously sent valid commands, then changing them slightly if necessary and resending the same commands to the server.

Since any attacker who can listen to traffic can see sequence numbers, it is necessary to sign messages with some kind of cryptography to ensure that sequence numbers are not simply doctored along with content.

Risk Factors

TBD

Examples

In C/C++:

unsigned char *simple_digest(char *alg,char *buf,unsigned int len, int *olen) {
        const EVP_MD *m;
        EVP_MD_CTX ctx;
        unsigned char *ret;

        OpenSSL_add_all_digests();
        if (!(m = EVP_get_digestbyname(alg)))
                return NULL;
        if (!(ret = (unsigned char*)malloc(EVP_MAX_MD_SIZE)))
                return NULL;
        EVP_DigestInit(&ctx, m);
        EVP_DigestUpdate(&ctx,buf,len);
        EVP_DigestFinal(&ctx,ret,olen);
        return ret;
}

unsigned char *generate_password_and_cmd(char *password_and_cmd){
        simple_digest("sha1",password,strlen(password_and_cmd)...);
}

In Java:

String command = new String("some cmd to execute & the password")
MessageDigest encer = MessageDigest.getInstance("SHA");
encer.update(command.getBytes("UTF-8"));
byte[] digest = encer.digest();

Related Attacks


Related Vulnerabilities


Related Controls

  • Control 1
  • Control 2
  • Design: Utilize some sequence or time stamping functionality along with a checksum which takes this into account in order to ensure that messages can be parsed only once.

Related Technical Impacts