CVE-2013-3444 - Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Severity

90%

Complexity

80%

Confidentiality

165%

The web framework in Cisco WAAS Software before 4.x and 5.x before 5.0.3e, 5.1.x before 5.1.1c, and 5.2.x before 5.2.1; Cisco ACNS Software 4.x and 5.x before 5.5.29.2; Cisco ECDS Software 2.x before 2.5.6; Cisco CDS-IS Software 2.x before 2.6.3.b50 and 3.1.x before 3.1.2b54; Cisco VDS-IS Software 3.2.x before 3.2.1.b9; Cisco VDS-SB Software 1.x before 1.1.0-b96; Cisco VDS-OE Software 1.x before 1.0.1; and Cisco VDS-OS Software 1.x in central-management mode allows remote authenticated users to execute arbitrary commands by appending crafted strings to values in GUI fields, aka Bug IDs CSCug40609, CSCug48855, CSCug48921, CSCug48872, CSCuh21103, CSCuh21020, and CSCug56790.

The web framework in Cisco WAAS Software before 4.x and 5.x before 5.0.3e, 5.1.x before 5.1.1c, and 5.2.x before 5.2.1; Cisco ACNS Software 4.x and 5.x before 5.5.29.2; Cisco ECDS Software 2.x before 2.5.6; Cisco CDS-IS Software 2.x before 2.6.3.b50 and 3.1.x before 3.1.2b54; Cisco VDS-IS Software 3.2.x before 3.2.1.b9; Cisco VDS-SB Software 1.x before 1.1.0-b96; Cisco VDS-OE Software 1.x before 1.0.1; and Cisco VDS-OS Software 1.x in central-management mode allows remote authenticated users to execute arbitrary commands by appending crafted strings to values in GUI fields, aka Bug IDs CSCug40609, CSCug48855, CSCug48921, CSCug48872, CSCuh21103, CSCuh21020, and CSCug56790.

CVSS 2.0 Base Score 9. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (AV:N/AC:L/Au:S/C:C/I:C/A:C).

Demo Examples

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

CWE-78

This example code intends to take the name of a user and list the contents of that user's home directory. It is subject to the first variant of OS command injection.


               
system($command);

The $userName variable is not checked for malicious input. An attacker could set the $userName variable to an arbitrary OS command such as:


               
;rm -rf /

Which would result in $command being:


               
ls -l /home/;rm -rf /

Since the semi-colon is a command separator in Unix, the OS would first execute the ls command, then the rm command, deleting the entire file system.

Also note that this example code is vulnerable to Path Traversal (CWE-22) and Untrusted Search Path (CWE-426) attacks.

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

CWE-78

This example is a web application that intends to perform a DNS lookup of a user-supplied domain name. It is subject to the first variant of OS command injection.


               
}
close($fh);
print "<br>\n";

Suppose an attacker provides a domain name like this:


               
cwe.mitre.org%20%3B%20/bin/ls%20-l

The "%3B" sequence decodes to the ";" character, and the %20 decodes to a space. The open() statement would then process a string like this:


               
/path/to/nslookup cwe.mitre.org ; /bin/ls -l

As a result, the attacker executes the "/bin/ls -l" command and gets a list of all the files in the program's working directory. The input could be replaced with much more dangerous commands, such as installing a malicious program on the server.

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

CWE-78

The example below reads the name of a shell script to execute from the system properties. It is subject to the second variant of OS command injection.


               
System.exec(script);

If an attacker has control over this property, then they could modify the property to point to a dangerous program.

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

CWE-78

In the example below, a method is used to transform geographic coordinates from latitude and longitude format to UTM format. The method gets the input coordinates from a user through a HTTP request and executes a program local to the application server that performs the transformation. The method passes the latitude and longitude coordinates as a command-line option to the external program and will perform some processing to retrieve the results of the transformation and return the resulting UTM coordinates.


               
}
return utmCoords;
// process results of coordinate transform// ...

However, the method does not verify that the contents of the coordinates input parameter includes only correctly-formatted latitude and longitude coordinates. If the input coordinates were not validated prior to the call to this method, a malicious user could execute another program local to the application server by appending '&' followed by the command for another program to the end of the coordinate string. The '&' instructs the Windows operating system to execute another program.

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

CWE-78

The following code is from an administrative web application designed to allow users to kick off a backup of an Oracle database using a batch-file wrapper around the rman utility and then run a cleanup.bat script to delete some temporary files. The script rmanDB.bat accepts a single command line parameter, which specifies what type of backup to perform. Because access to the database is restricted, the application runs the backup as a privileged user.


               
...
"&&c:\\utl\\cleanup.bat\"")

The problem here is that the program does not do any validation on the backuptype parameter read from the user. Typically the Runtime.exec() function will not execute multiple commands, but in this case the program first runs the cmd.exe shell in order to run multiple commands with a single call to Runtime.exec(). Once the shell is invoked, it will happily execute multiple commands separated by two ampersands. If an attacker passes a string of the form "& del c:\\dbms\\*.*", then the application will execute this command along with the others specified by the program. Because of the nature of the application, it runs with the privileges necessary to interact with the database, which means whatever command the attacker injects will run with those privileges as well.

Overview

Type

Cisco

First reported 11 years ago

2013-08-01 13:32:00

Last updated 7 years ago

2017-08-29 01:33:00

Affected Software

Cisco Wide Area Application Services (WAAS) 5.1.1

5.1.1

Cisco Wide Area Application Services (WAAS) 5.2

5.2

Cisco Wide Area Application Services (WAAS) 4.0.1

4.0.1

Cisco Wide Area Application Services (WAAS) 4.0.3

4.0.3

Cisco Wide Area Application Services (WAAS) 4.0.5

4.0.5

Cisco Wide Area Application Services (WAAS) 4.0.7

4.0.7

Cisco Wide Area Application Services (WAAS) 4.0.9

4.0.9

Cisco Wide Area Application Services (WAAS) 4.0.11

4.0.11

Cisco Wide Area Application Services (WAAS) 4.0.13

4.0.13

Cisco Wide Area Application Services (WAAS) 4.0.17

4.0.17

Cisco Wide Area Application Services (WAAS) 4.0.19

4.0.19

Cisco Wide Area Application Services (WAAS) 4.0.21

4.0.21

Cisco Wide Area Application Services (WAAS) 4.0.23

4.0.23

Cisco Wide Area Application Services (WAAS) 4.0.25

4.0.25

Cisco Wide Area Application Services (WAAS) 4.0.27

4.0.27

Cisco Application and Content Networking System (ACNS) Software 4.1.3

4.1.3

Cisco Application and Content Networking System (ACNS) Software 4.2.3

4.2.3

Cisco Application and Content Networking System (ACNS) Software 4.2.5

4.2.5

Cisco Application and Content Networking System (ACNS) Software 4.2.7.3

4.2.7.3

Cisco Application and Content Networking System (ACNS) Software 4.2.9.3

4.2.9.3

Cisco Application and Content Networking System (ACNS) Software 4.2.11.5

4.2.11.5

Cisco Application and Content Networking System (ACNS) Software 4.2.13.1

4.2.13.1

Cisco Application and Content Networking System (ACNS) Software 5.0

5.0

Cisco Application and Content Networking System (ACNS) Software 5.0.1

5.0.1

Cisco Application and Content Networking System (ACNS) Software 5.0.3.5

5.0.3.5

Cisco Application and Content Networking System (ACNS) Software 5.0.5.9

5.0.5.9

Cisco Application and Content Networking System (ACNS) Software 5.0.7.10

5.0.7.10

Cisco Application and Content Networking System (ACNS) Software 5.0.9.9

5.0.9.9

Cisco Application and Content Networking System (ACNS) Software 5.0.11.6

5.0.11.6

Cisco Application and Content Networking System (ACNS) Software 5.0.13.2

5.0.13.2

Cisco Application and Content Networking System (ACNS) Software 5.0.15.1

5.0.15.1

Cisco Application and Content Networking System (ACNS) Software 5.0.17.6

5.0.17.6

Cisco Application and Content Networking System (ACNS) Software 5.1.1.3

5.1.1.3

Cisco Application and Content Networking System (ACNS) Software 5.1.3.15

5.1.3.15

Cisco Application and Content Networking System (ACNS) Software 5.1.5.2

5.1.5.2

Cisco Application and Content Networking System (ACNS) Software 5.1.7.7

5.1.7.7

Cisco Application and Content Networking System (ACNS) Software 5.1.9.5

5.1.9.5

Cisco Application and Content Networking System (ACNS) Software 5.1.11.6

5.1.11.6

Cisco Application and Content Networking System (ACNS) Software 5.1.13.7

5.1.13.7

Cisco Application and Content Networking System (ACNS) Software 5.1.15.5

5.1.15.5

Cisco Application and Content Networking System (ACNS) Software 5.4

5.4

Cisco Application and Content Networking System (ACNS) Software 5.4.1.10

5.4.1.10

Cisco Application and Content Networking System (ACNS) Software 5.4.3.17

5.4.3.17

Cisco Application and Content Networking System (ACNS) Software 5.4.5.7

5.4.5.7

Cisco Application and Content Networking System (ACNS) Software 5.4.7.3

5.4.7.3

Cisco Application and Content Networking System (ACNS) Software 5.5

5.5

Cisco Application and Content Networking System (ACNS) Software 5.5.1.7

5.5.1.7

Cisco Application and Content Networking System (ACNS) Software 5.5.3.1

5.5.3.1

Cisco Application and Content Networking System (ACNS) Software 5.5.5.4

5.5.5.4

Cisco Application and Content Networking System (ACNS) Software 5.5.7.7

5.5.7.7

Cisco Application and Content Networking System (ACNS) Software 5.5.9.9

5.5.9.9

Cisco Application and Content Networking System (ACNS) Software 5.5.11.2

5.5.11.2

Cisco Application and Content Networking System (ACNS) Software 5.5.13.7

5.5.13.7

Cisco Application and Content Networking System (ACNS) Software 5.5.15.2

5.5.15.2

Cisco Application and Content Networking System (ACNS) Software 5.5.17

5.5.17

Cisco Application and Content Networking System (ACNS) Software 5.5.19

5.5.19

Cisco Application and Content Networking System (ACNS) Software 5.5.21

5.5.21

Cisco Application and Content Networking System (ACNS) Software 5.5.23

5.5.23

Cisco Application and Content Networking System (ACNS) Software 5.5.25

5.5.25

Cisco Application and Content Networking System (ACNS) Software 5.5.27

5.5.27

Cisco Application and Content Networking System (ACNS) Software 5.5.29

5.5.29

Cisco Enterprise Content Delivery Network (ECDN) Software 2.0

2.0

Cisco Enterprise Content Delivery Network (ECDN) Software 2.5.3

2.5.3

Cisco Enterprise Content Delivery Network (ECDN) Software 2.5.5

2.5.5

Cisco Internet Streamer Content Delivery System (CDS-IS) 2.0

2.0

Cisco Internet Streamer Content Delivery System (CDS-IS) 2.6

2.6

Cisco Internet Streamer Content Delivery System (CDS-IS) 3.1

3.1

Cisco Videoscape Distribution Suite Optimization Engine (VDS-OE) 1.0.0

1.0.0

Cisco VideoScape Delivery System for Internet Streamer (VDS-IS) 3.2.0

3.2.0

Cisco VideoScape Delivery System for Internet Streamer (VDS-IS) 3.2.1

3.2.1

Cisco VideoScape Delivery System Origin Server (VDS-OS) 1.0

1.0

Cisco Videoscape Distribution Suite Optimization Engine (VDS-OE) 1.0.0

1.0.0

Cisco Videoscape Distribution Suite Service Broker (VDS-SB) 1.0.0

1.0.0

Cisco Videoscape Distribution Suite Service Broker (VDS-SB) 1.0.1

1.0.1

Cisco Videoscape Distribution Suite Service Broker (VDS-SB) 1.1.0

1.1.0

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.