TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Wmic.exe Whitelisting Bypass – Hacking with Style, Stylesheets (2018)

42 pointsby kencauseyalmost 6 years ago

6 comments

0xDEFC0DEalmost 6 years ago
It&#x27;s worth nothing that Windows Defender stops the &#x27;remote include&#x27; part even if there&#x27;s nothing in the file (test.txt only contains the word &#x27;blah&#x27; so we should get a parsing&#x2F;stylesheet error):<p><a href="https:&#x2F;&#x2F;i.imgur.com&#x2F;jP3yJNQ.jpg" rel="nofollow">https:&#x2F;&#x2F;i.imgur.com&#x2F;jP3yJNQ.jpg</a>
评论 #20384398 未加载
kencauseyalmost 6 years ago
This story appears to be related to this:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20384519" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20384519</a><p>More info (with some marketing):<p><a href="https:&#x2F;&#x2F;www.microsoft.com&#x2F;security&#x2F;blog&#x2F;2019&#x2F;07&#x2F;08&#x2F;dismantling-a-fileless-campaign-microsoft-defender-atp-next-gen-protection-exposes-astaroth-attack&#x2F;?utm_source=Direct" rel="nofollow">https:&#x2F;&#x2F;www.microsoft.com&#x2F;security&#x2F;blog&#x2F;2019&#x2F;07&#x2F;08&#x2F;dismantli...</a>
ktpsnsalmost 6 years ago
This is something which baffles me as a +15yrs &quot;linux guy&quot; who thought to know what kind of ecosystem the big desktop OS brings: MS Windows is really rich in tooling, both in terms of desktop and command line tools. And there is similar bloat as with Linux: I never heard of wmic.exe before, but the fact that it can be used to manage network interfaces sounds similarly fucked up as the linux story (&#x2F;sbin&#x2F;ifconfig, &#x2F;sbin&#x2F;ip, the unloved network manager, resolv.d, etc. pp). Just to give another example: mshta.exe was basically the Electron platform but in early 2000. And it was shipped right out of the box. That&#x27;s very elegant.<p>Since I have an addition to write tools which solve problems they were not intended to solve (violating Unix philosophy), I admire that wmic.exe can use XSLT to generate reports. Of course, PowerShell solves the problem of structured output in a better way. A contemporary Unix tool would simply have the option for JSON output and that&#x27;s it. But including an XSL processor which even executes scripting languages... hilarious!
toygalmost 6 years ago
Before inevitabile anti-XML comments appear: the hole is due to Microsoft making it possible to execute VB code included in what were supposed to be <i>style</i>sheets. It’s like blindly eval()ing a json field: a bad idea regardless of format, and not part of the spec (if i remember correctly).
kencauseyalmost 6 years ago
And here is a MITRE entry:<p><a href="https:&#x2F;&#x2F;attack.mitre.org&#x2F;techniques&#x2F;T1220&#x2F;" rel="nofollow">https:&#x2F;&#x2F;attack.mitre.org&#x2F;techniques&#x2F;T1220&#x2F;</a>
tinus_hnalmost 6 years ago
Why does it run untrusted shortcut files in the first place? That’s where you need to block, it’s clearly as bad as running executables sent through email.
评论 #20385848 未加载