text stringlengths 0 1.99k |
|---|
+ download an executable |
+ perhaps decrypt the executable |
+ execute the executable |
Frankly I see nothing wrong with this, but apparently Microsoft disagrees! |
A funny quirk about behavioral analysis, though, is that it relies on |
identifying the behavior of a given execution context, not the sum of its |
executions. In order for behavioral analysis to succeed, the bad behaviors |
which happen in combination need to happen within the same execution |
context. If we split the three tasks above into three separate execution |
contexts-- download, decrypt and execute-- will this be sufficient to |
bypass the behavioral detection? |
Yes! While I did not reverse-engineer NisSrv.exe to see the why's of why I |
evaded, the theory of splitting up tasks across execution contexts |
succeeded in bypassing Defender. The payload thus evolved into an |
interesting multistage payload. The user would have to run the infected |
executable multiple times before a sheep would appear. This would have |
the added benefit of confusing stealth. Where is the sheep coming from? |
Why does it keep happening when I run this program? Baffling! But |
adorable. In this way, Broodsac lives up to the name of the multi-staged |
worm it was named after, the green-banded broodsac.[9] |
Our zen garden is tended, and ready to be shared, for others to meditate |
upon and ponder for their own gardens. For that meditation, the various |
code objects contained in the tarball attached to this article have been |
annotated with comments to explain the individual code areas and what |
they're doing. Naturally, the complexity of the dinosaur that is the PE |
format comes with annoying, disgusting tricks and habits that make one |
ashamed of their code in the first place. I apologize on Mark Zbikowski's |
behalf. |
--[ 6. Conclusions |
It is without a doubt that the strange developmental anomalies you see |
within wild samples of malware are the byproduct of some sort of build |
system. SmokeLoader's use of encrypted functions is certainly not a |
feature of the MSVC compiler[10]. But even a nasty rewrite of a C-file |
being dumped into a directory for an IDE to compile, while quick and dirty |
as we hackers love to do, would technically count as a build system. After |
all, the Visual Studio IDE is merely a shell for the build system that is |
MSVC. But as virus writers, we are still technically engineers at the end |
of the day. We long for the beautiful solution to the problem. |
We ultimately want our own little zen garden to tend to. |
The beauty of CMake in particular is in the fact that it's cross-platform. |
So if you have code-- for example, an obfuscation engine-- that is capable |
of being used on multiple platforms, CMake can be used to make building |
the project on each platform relatively painless. Just like how CMake |
wrangles MSVC, it can also wrangle the complex build environment that is |
GNU Make. Many other build targets are supported-- but some not as fully |
as MSVC and GNU. Exotic targets may have some difficulty. |
I hope I have made a good argument for incorporating build systems into |
your payload development. While we can certainly get by with surface shell |
scripts, wouldn't it be wonderful to get into the guts of the machine at |
the linker level? Linux developers have that privilege, why not liberate |
that access on Windows? After all, we're all effectively the demons of our |
target operating systems-- we lurk at the lowest level of the machine, and |
we love it here. |
--[ 7. Shouts |
0x6d6e647a for editing, dc949 for being family, slop pit for memes and |
hardchats. |
--[ 8. References |
[1]: 40Hex #8: An Introduction to Nonoverwriting Virii, Part II: EXE |
Infectors, |
ERROR: type should be string, got " https://amethyst.systems/zines/40hex8/40HEX-8.007.txt" |
[2]: 29A #6: W32.Shrug, by roy g biv, |
ERROR: type should be string, got " https://amethyst.systems/zines/29a6/29A-6.615.txt" |
[3]: 29A #2: PE infection under Win32, |
ERROR: type should be string, got " https://amethyst.systems/zines/29a2/29A-2.3_1.txt" |
[4]: https://github.com/Adrianotiger/desktopPet |
[5]: https://github.com/commial/experiments/tree/master/windows-defender |
/VDM |
[6]: https://github.com/matterpreter/DefenderCheck |
[7]: https://github.com/rasta-mouse/ThreatCheck |
[8]: https://techcommunity.microsoft.com/t5 |
/security-compliance-and-identity |
/enhancements-to-behavior-monitoring-and-network-inspection |
/ba-p/247706 |
[9]: https://en.wikipedia.org/wiki/Leucochloridium_paradoxum |
[10]: https://www.sentinelone.com/blog |
/going-deep-a-guide-to-reversing-smoke-loader-malware/, |
see "Decoding the Buffer" |
--[ 9. Artifacts |
begin 644 broodsac.tar.gz |
M'XL(`````````^P]:W?;-K+][%^!9KNI9$N.93O>['7L<V1)KG6O+/E(<K*] |
MV5P>2H0L-A2I)2D[WC;__<[@10"D'G;<;;MK?6@L<#`8S`SF";&C.(J\Q!V_ |
M:ERZGVC'3])D-_V<?O.4GSWX'!T>XK^UO[S>T__%3^WUT>MO:H>O_[)_N'^X |
M]_KH&QC9.]C_ANP]*15+/HLD=6-"OIDOXGE`E\.M>_X'_8QG('9GYH?^;#%S |
M8OJ/A1]3K_2NU1^T>UURL%M[7=[:FL?13W2<ED9"6TB#U`>73A?^4]Y*:%IJ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.