CVE-2012-5690 - Improper Control of Generation of Code ('Code Injection')

Severity

93%

Complexity

86%

Confidentiality

165%

RealNetworks RealPlayer before 16.0.0.282 and RealPlayer SP 1.0 through 1.1.5 allow remote attackers to execute arbitrary code via a RealAudio file that triggers access to an invalid pointer.

RealNetworks RealPlayer before 16.0.0.282 and RealPlayer SP 1.0 through 1.1.5 allow remote attackers to execute arbitrary code via a RealAudio file that triggers access to an invalid pointer.

CVSS 2.0 Base Score 9.3. CVSS Attack Vector: network. CVSS Attack Complexity: medium. CVSS Vector: (AV:N/AC:M/Au:N/C:C/I:C/A:C).

Demo Examples

Improper Control of Generation of Code ('Code Injection')

CWE-94

This example attempts to write user messages to a message file and allow users to view them.


               
}
echo "Message Saved!<p>\n";
include($MessageFile);

While the programmer intends for the MessageFile to only include data, an attacker can provide a message such as:


               
message=%3C?php%20system(%22/bin/ls%20-l%22);?%3E

which will decode to the following:


               
<?php system("/bin/ls -l");?>

The programmer thought they were just including the contents of a regular data file, but PHP parsed it and executed the code. Now, this code is executed any time people view messages.

Notice that XSS (CWE-79) is also possible in this situation.

Improper Control of Generation of Code ('Code Injection')

CWE-94

edit-config.pl: This CGI script is used to modify settings in a configuration file.


               
}
# code to add a field/key to a file goes here
# code to set key to a particular file goes here
# code to delete key from a particular file goes here
eval($code);# this is super-efficient code, especially if you have to invoke# any one of dozens of different functions!
handleConfigAction($configfile, param('action'));
print "No action specified!\n";

The script intends to take the 'action' parameter and invoke one of a variety of functions based on the value of that parameter - config_file_add_key(), config_file_set_key(), or config_file_delete_key(). It could set up a conditional to invoke each function separately, but eval() is a powerful way of doing the same thing in fewer lines of code, especially when a large number of functions or variables are involved. Unfortunately, in this case, the attacker can provide other values in the action parameter, such as: add_key(",","); system("/bin/ls"); This would produce the following string in handleConfigAction(): config_file_add_key(",","); system("/bin/ls"); Any arbitrary Perl code could be added after the attacker has "closed off" the construction of the original function call, in order to prevent parsing errors from causing the malicious eval() to fail before the attacker's payload is activated. This particular manipulation would fail after the system() call, because the "_key(\$fname, \$key, \$val)" portion of the string would cause an error, but this is irrelevant to the attack because the payload has already been activated.

Overview

First reported 12 years ago

2012-12-19 11:55:00

Last updated 12 years ago

2012-12-19 11:55:00

Affected Software

RealNetworks RealPlayer 4

4

RealNetworks RealPlayer 5

5

RealNetworks RealPlayer G2 6

6

RealNetworks RealPlayer 7

7

RealNetworks RealPlayer 8

8

RealNetworks RealPlayer 10.0

10.0

RealNetworks RealPlayer 10.5

10.5

RealNetworks RealPlayer 11.0

11.0

RealNetworks RealPlayer 11.0.1

11.0.1

RealNetworks RealPlayer 11.0.2

11.0.2

RealNetworks RealPlayer 11.0.2.1744

11.0.2.1744

RealNetworks RealPlayer 11.0.2.2315

11.0.2.2315

RealNetworks RealPlayer 11.0.3

11.0.3

RealNetworks RealPlayer 11.0.4

11.0.4

RealNetworks RealPlayer 11.0.5

11.0.5

RealNetworks RealPlayer 11.1

11.1

RealNetworks RealPlayer 11.1.3

11.1.3

RealNetworks RealPlayer 11 Build 6.0.14.748

11_build_6.0.14.748

RealNetworks RealPlayer 12.0.0.1444

12.0.0.1444

RealNetworks RealPlayer 12.0.0.1548

12.0.0.1548

RealNetworks RealPlayer 14.0.0

14.0.0

RealNetworks RealPlayer 14.0.1

14.0.1

RealNetworks RealPlayer 14.0.1.609

14.0.1.609

RealNetworks RealPlayer 14.0.2

14.0.2

RealNetworks RealPlayer 14.0.3

14.0.3

RealNetworks RealPlayer 14.0.4

14.0.4

RealNetworks RealPlayer 14.0.5

14.0.5

RealNetworks RealPlayer 15.0.0

15.0.0

RealNetworks RealPlayer 15.0.4

15.0.4

RealNetworks RealPlayer 15.0.4.43

15.0.4.43

RealNetworks RealPlayer 15.0.5.109

15.0.5.109

RealNetworks RealPlayer 15.0.6.14

15.0.6.14

RealNetworks RealPlayer 15.02.71

15.02.71

RealNetworks RealPlayer

RealNetworks RealPlayer SP 1.0.0

1.0.0

RealNetworks RealPlayer SP 1.0.1

1.0.1

RealNetworks RealPlayer SP 1.0.2

1.0.2

RealNetworks RealPlayer SP 1.0.5

1.0.5

RealNetworks RealPlayer SP 1.1

1.1

RealNetworks RealPlayer SP 1.1.1

1.1.1

RealNetworks RealPlayer SP 1.1.2

1.1.2

RealNetworks RealPlayer SP 1.1.3

1.1.3

RealNetworks RealPlayer SP 1.1.4

1.1.4

RealNetworks RealPlayer SP 1.1.5

1.1.5

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.