<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Elastic Security Labs - Articles by Mark Mager</title>
        <link>https://www.elastic.co/jp/security-labs</link>
        <description>Trusted security news &amp; research from the team at Elastic.</description>
        <lastBuildDate>Wed, 22 Apr 2026 13:50:44 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>Elastic Security Labs - Articles by Mark Mager</title>
            <url>https://www.elastic.co/jp/security-labs/assets/security-labs-thumbnail.png</url>
            <link>https://www.elastic.co/jp/security-labs</link>
        </image>
        <copyright>© 2026. elasticsearch B.V. All Rights Reserved</copyright>
        <item>
            <title><![CDATA[Storm on the Horizon: Inside the AJCloud IoT Ecosystem]]></title>
            <link>https://www.elastic.co/jp/security-labs/storm-on-the-horizon</link>
            <guid>storm-on-the-horizon</guid>
            <pubDate>Fri, 20 Sep 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[Wi-Fi cameras are popular due to their affordability and convenience but often have security vulnerabilities that can be exploited.]]></description>
            <content:encoded><![CDATA[<h2>Introduction</h2>
<p>Wi-Fi cameras are some of the most common IoT devices found in households, businesses, and other public spaces. They tend to be quite affordable and provide users with easy access to a live video stream on their mobile device from anywhere on the planet. As is often the case with IoT devices, security tends to be overlooked in these cameras, leaving them open to critical vulnerabilities. If exploited, these vulnerabilities can lead to devastating effects on the cameras and the networks within which they’re deployed. They can lead to the compromise of the sensitive PII of their users.</p>
<p>A recent <a href="https://www.youtube.com/watch?v=qoojLdKJvkc">Elastic ON Week</a> afforded us the opportunity to explore the attack surface of these types of devices to gain a deeper understanding of how they are being compromised. We focused primarily on performing vulnerability research on the <a href="https://www.amazon.com/Wireless-Security-Wansview-Detection-Compatible/dp/B07QKXM2D3?th=1">Wansview Q5</a> (along with the nearly identical <a href="https://www.wansview.com/q6">Q6</a>), one of the more popular and affordable cameras sold on Amazon. Wansview is a provider of security products based in Shenzhen, China, and one of Amazon's more prominent distributors of Wi-Fi cameras.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image12.png" alt="" title="image_tooltip" /></p>
<p>The Q5 offers the same basic feature set seen in most cameras:</p>
<ul>
<li>Pan / tilt / zoom</li>
<li>Night vision</li>
<li>Two-way audio</li>
<li>Video recording to SD card</li>
<li>Integration with Smart Home AI assistants (e.g. Alexa)</li>
<li>ONVIF for interoperability with other security products</li>
<li>RTSP for direct access to video feed within LAN</li>
<li>Automated firmware updates from the cloud</li>
<li>Remote technical support</li>
<li>Shared device access with other accounts</li>
<li>Optional monthly subscription for cloud storage and motion detection</li>
</ul>
<p>Like most other Wi-Fi cameras, these models require an active connection to their vendor cloud infrastructure for basic operation; without access to the Internet, they simply will not operate. Before a camera can go live, it must be paired to a <a href="https://www.youtube.com/watch?v=UiF7xKnXfC0">registered user account</a> via Wansview’s official mobile app and a standard <a href="https://youtu.be/PLMNKoO1214?si=G8sYxT3EagE3u_cw">QR code-based setup process</a>. Once this process is complete, the camera will be fully online and operational.</p>
<h2>AJCloud: A Brief Introduction</h2>
<p>Though Wansview has been in operation <a href="https://www.wansview.com/about_company">since 2009</a>, at the moment they primarily appear to be a reseller of camera products built by a separate company based in Nanjing, China: <a href="https://www.ajcloud.net">AJCloud</a>.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image19.png" alt="" title="image_tooltip" /></p>
<p>AJCloud provides vendors with access to manufactured security devices, the necessary firmware, mobile and desktop user applications, the cloud management platform, and services that connect everything together. Since AJCloud was founded in 2018, they have partnered with several vendors, both large and small, including but not limited to the following:</p>
<ul>
<li><a href="https://www.wansview.com">Wansview</a></li>
<li><a href="https://cinnado.com">Cinnado</a></li>
<li><a href="https://www.amazon.com/stores/GALAYOU/page/789538ED-82AC-43AF-B676-6622577A1982?ref_=ast_bln&amp;store_ref=bl_ast_dp_brandLogo_sto">Galayou</a></li>
<li><a href="https://www.faleemi.com">Faleemi</a></li>
<li><a href="https://www.philips.com">Philips</a></li>
<li><a href="https://www.septekon.com">Septekon</a></li>
<li><a href="https://www.smarteyegroup.com">Smarteye</a></li>
<li><a href="http://www.homeguardworld.com">Homeguard</a></li>
<li><a href="https://ipuppee.com">iPupPee</a></li>
</ul>
<p>A cursory review of mobile and desktop applications developed and published by AJCloud on <a href="https://play.google.com/store/apps/developer?id=AJCLOUD+INTERNATIONAL+INC.&amp;hl=en_US">Google Play</a>, <a href="https://apps.apple.com/us/developer/ajcloud-labs-inc/id1396464400">Apple’s App Store</a>, and the <a href="https://apps.microsoft.com/search/publisher?name=%E5%8D%97%E4%BA%AC%E5%AE%89%E5%B1%85%E4%BA%91%E4%BF%A1%E6%81%AF%E6%8A%80%E6%9C%AF%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8&amp;hl=en-us&amp;gl=US">Microsoft Store</a> reveals their ties to each of these vendors. Besides superficial company branding, these applications are identical in form and function, and they all require connectivity with the AJCloud management platform.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image26.png" alt="" title="image_tooltip" /></p>
<p>As for the cameras, it is apparent that these vendors are selling similar models with only minor modifications to the camera housing and underlying hardware.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image16.png" alt="" title="image_tooltip" /></p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image9.png" alt="" title="image_tooltip" /></p>
<p>The resemblance between the <a href="https://www.faleemi.com/product/fsc886/">Faleemi 886</a> and the <a href="https://www.youtube.com/watch?v=X5P5fGhRxAs">Wansview Q6 (1080p)</a> is obvious</p>
<p>Reusing hardware manufacturing and software development resources likely helps to control costs and simplify logistics for AJCloud and its resellers. However, this streamlining of assets also means that security vulnerabilities discovered in one camera model would likely permeate all products associated with AJCloud.</p>
<p>Despite its critical role in bringing these devices to consumers, AJCloud has a relatively low public profile. However, IPVM researchers recently <a href="https://ipvm.com/reports/ajcloud-wansview-leak">published</a> research on a significant vulnerability (which has since been resolved) in AJCloud’s GitLab repository. This vulnerability would allow any user to access source code, credentials, certificates, and other sensitive data without requiring authentication.</p>
<p>Though total sales figures are difficult to derive for Wansview and other vendors in the Wi-Fi camera space, IPVM estimated that at least one million devices were connected to the AJCloud platform at the time of publication of their report. As camera sales <a href="https://www.statista.com/forecasts/1301193/worldwide-smart-security-camera-homes">continue to soar</a> into the hundreds of millions, it is safe to assume that more of AJCloud’s devices will be connected in homes across the world for years to come.</p>
<h2>Initial Vulnerability Research Efforts</h2>
<p>To gain a deeper understanding of the security posture of the Wansview Q5, we attacked it from multiple angles:</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image23.png" alt="" title="image_tooltip" /></p>
<p>At first, our efforts were primarily focused on active and passive network reconnaissance of the camera and the <a href="https://play.google.com/store/apps/details?id=net.ajcloud.wansviewplus&amp;hl=en_US">Android version</a> of Wansview Cloud, Wansview’s official mobile app. We scanned for open ports, eavesdropped on network communications through man-in-the-middle (MitM) attacks, attempted to coerce unpredictable behavior from the cameras through intentional misconfiguration in the app, and disrupted the operation of the cameras by abusing the QR code format and physically interacting with the camera. The devices and their infrastructure were surprisingly resilient to these types of surface-level attacks, and our initial efforts yielded few noteworthy successes.</p>
<p>We were particularly surprised by our lack of success intercepting network communications on both the camera and the app. We repeatedly encountered robust security features (e.g., certificate pinning, app and OS version restrictions, and properly secured TLS connections) that disrupted our attempts.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image13.png" alt="" title="image_tooltip" /></p>
<p>Reverse engineering tools allowed us to analyze the APK much more closely, though the complexity of the code obfuscation observed within the decompiled Java source code would require an extended length of time to fully piece together.</p>
<p>Our limited initial success would require us to explore further options that would provide us with more nuanced insight into the Q5 and how it operates.</p>
<h2>Initial Hardware Hacking</h2>
<p>To gain more insight into how the camera functioned, we decided to take a closer look at the camera firmware. While some firmware packages are available online, we wanted to take a look at the code directly and be able to monitor it and the resulting logs while the camera was running. To do this, we first took a look at the hardware diagram for the system on a chip (SoC) to see if there were any hardware avenues we might be able to leverage. The Wansview Q5 uses a <a href="https://www.cnx-software.com/2020/04/26/ingenic-t31-ai-video-processor-combines-xburst-1-mips-and-risc-v-lite-cores/">Ingenic Xburst T31 SoC</a>, its system block diagram is depicted below.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image4.png" alt="" title="image_tooltip" /></p>
<p>One avenue that stood out to us was the I2Cx3/UARTx2/SPIx2 SPI I/O block. If accessible, these I/O blocks often provide log output interfaces and/or shell interfaces, which can be used for debugging and interacting with the SoC. Appearing promising, we then performed a hardware teardown of the camera and found what appeared to be a UART serial interface to the SoC, shown below.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image15.png" alt="" title="image_tooltip" /></p>
<p>Next, we connected a logic analyzer to see what protocol was being used over these pins, and when decoded, the signal was indeed UART.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image33.png" alt="" title="image_tooltip" /></p>
<p>Now that we can access an exposed UART interface, we then looked to establish a shell connection to the SoC via UART. There are a number of different software mechanisms to do this, but for our purposes we used the Unix utility <code>screen</code> with the detected baud rate from the logic analyzer.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image11.png" alt="" title="image_tooltip" /></p>
<p>Upon opening and monitoring the boot sequence, we discovered that secure boot was not enabled despite being supported by the SoC. We then proceeded to modify the configuration to boot into single user mode providing a root shell for us to use to examine the firmware before the initialization processes were performed, shown below.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image29.png" alt="" title="image_tooltip" /></p>
<p>Once in single-user mode, we were able to pull the firmware files for static analysis using the <code>binwalk</code> utility, as shown below.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image32.png" alt="" title="image_tooltip" /></p>
<p>At this stage, the filesystem is generally read-only; however, we wanted to be able to make edits and instantiate only specific parts of the firmware initialization as needed, so we did some quick setups for additional persistence beyond single-user mode access. This can be done in a number of ways, but there are two primary methods one may wish to use. Generally speaking, in both approaches, one will want to make as few modifications to the existing configuration as possible. This is generally preferred when running dynamic analysis if possible, as we have had the least impact on the run time environment. One method we used for this approach is to make a <code>tmpfs</code> partition for read/write access in memory and mount it via <code>fstab</code>. In our case <code>fstab</code> was already considered in such a way that supported this, and as such made it a very minimal change. See the commands and results for this approach below.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image17.png" alt="" title="image_tooltip" /></p>
<p>Another method is to pull existing user credentials and attempt to use these to log in. This approach was also successful. The password hash for the root user can be found in the <code>etc/passwd</code> file and decrypted using a tool like John the Ripper. In our above examples, we were transferring data and files entirely over the serial connection. The camera also has an available SD card slot that can be mounted and used to transfer files. Going forward, we will be using the SD card or local network for moving files as the bandwidth makes for faster and easier transfer; however, serial can still be used for all communications for the hardware setup and debugging if preferred.</p>
<p>Now, we have root level access to the camera providing access to the firmware and dmesg logs while the software is running. Using both the firmware and logs as reference, we then looked to further examine the user interfaces for the camera to see if there was a good entry point we could use to gain further insight.</p>
<h2>Wansview Cloud for Windows</h2>
<p>After the mobile apps proved to be more secure than we had originally anticipated, we shifted our focus to an older version of the Wansview Cloud application built for Windows 7. This app, which is still <a href="https://www.wansview.com/support_download">available for download</a>, would provide us with direct insight into the network communications involved with cameras connected to the AJCloud platform.</p>
<p>Thanks in large part to overindulgent debug logging on behalf of the developers, the Windows app spills out its secrets with reckless abandon seldom seen in commercial software. The first sign that things are amiss is that user login credentials are logged in cleartext.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image24.png" alt="" title="image_tooltip" /></p>
<p>Reverse engineering the main executable and DLLs (which are not packed, unlike the Wansview Cloud APK) was expedited thanks to the frequent use of verbose log messages containing unique strings. Identifying references to specific files and lines within its underlying codebase helped us to quickly map out core components of the application and establish the high level control flow.</p>
<p>Network communications, which were difficult for us to intercept on Android, are still transmitted over TLS, though they are conveniently logged to disk in cleartext. With full access to all HTTP POST request and response data (which is packed into JSON objects), there was no further need to pursue MitM attacks on the application side.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image8.png" alt="POST request to https://sdc-portal.ajcloud.net/api/v1/app-startup" title="POST request to https://sdc-portal.ajcloud.net/api/v1/app-startup" /></p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image25.png" alt="POST response from https://sdc-portal.ajcloud.net/api/v1/app-startup" title="POST response from https://sdc-portal.ajcloud.net/api/v1/app-startup" /></p>
<p>Within the POST responses, we found sensitive metadata including links to publicly accessible screen captures along with information about the camera’s location, network configuration, and its firmware version.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image1.jpg" alt="https://cam-snapshot-use1.oss-us-east-1.aliyuncs.com/f838ee39636aba95db7170aa321828a1/snapshot.jpeg" title="https://cam-snapshot-use1.oss-us-east-1.aliyuncs.com/f838ee39636aba95db7170aa321828a1/snapshot.jpeg" /></p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image10.png" alt="POST response from https://cam-gw-us.ajcloud.net/api/v1/fetch-infos" title="POST response from https://cam-gw-us.ajcloud.net/api/v1/fetch-infos" /></p>
<p>After documenting all POST requests and responses found within the log data, we began to experiment with manipulating different fields in each request in an attempt to access data not associated with our camera or account. We would eventually utilize a debugger to change the deviceId to that of a target camera not paired with the current logged in account. A camera deviceId doubles as its serial number and can be found printed on a sticker label located on either the back or bottom of a camera.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image2.png" alt="" title="image_tooltip" /></p>
<p>We found the most appropriate target for our attack in a code section where the deviceId is first transmitted in a POST request to <a href="https://sdc-us.ajcloud.net/api/v1/dev-config">https://sdc-us.ajcloud.net/api/v1/dev-config</a>:</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image31.png" alt="" title="image_tooltip" /></p>
<p>Our plan was to set a breakpoint at the instruction highlighted in the screenshot above, swap out the deviceId within memory, and then allow the app to resume execution.</p>
<p>Amazingly enough, this naive approach not only worked to retrieve sensitive data stored in the AJCloud platform associated with the target camera and the account it is tied to, but it also connected us to the camera itself. This allowed us to access its video and audio streams and remotely control it through the app as if it were our own camera.</p>
<p>Through exploiting this vulnerability and testing against multiple models from various vendors, we determined that all devices connected to the AJCloud platform could be remotely accessed and controlled in this manner. We wrote a <a href="https://github.com/elastic/camera-hacks/blob/main/windows/win_exploit.py">PoC exploit script</a> to automate this process and effectively demonstrate the ease with which this access control vulnerability within AJCloud’s infrastructure can be trivially exploited.</p>
<h2>Exploring the network communications</h2>
<p>Though we were able to build and reliably trigger an exploit against a critical vulnerability in the AJCloud platform, we would need to dig further in order to gain a better understanding of the inner workings of the apps, the camera firmware, and the cloud infrastructure.</p>
<p>As we explored beyond the POST requests and responses observed throughout the sign-in process, we noticed a plethora of UDP requests and responses from a wide assortment of IPs. Little in the way of discernible plaintext data could be found throughout these communications, and the target UDP port numbers for the outbound requests seemed to vary. Further investigation would later reveal that this UDP activity was indicative of PPPP, an IoT peer-to-peer (P2P) protocol that was analyzed and demonstrated extensively by Paul Marrapesse during his <a href="https://youtu.be/Z_gKEF76oMM?si=cqCBU6iPxCyEm-xm">presentation at DEF CON 28</a>. We would later conclude that the way in which we exploited the vulnerability we discovered was facilitated through modified P2P requests, which led us to further explore the critical role that P2P plays in the AJCloud platform.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image22.png" alt="" title="image_tooltip" /></p>
<p>The main purpose of P2P is to facilitate communication between applications and IoT devices, regardless of the network configurations involved. P2P primarily utilizes an approach based around <a href="https://en.wikipedia.org/wiki/UDP_hole_punching">UDP hole punching</a> to create temporary communication pathways that allow requests to reach their target either directly or through a relay server located in a more accessible network environment. The core set of P2P commands integrated into AJCloud’s apps provides access to video and audio streams as well as the microphone and pan/tilt/zoom.</p>
<h2>Advanced Hardware Hacking</h2>
<p>With our additional understanding of the P2P communications, it was now time to examine the camera itself more closely during these P2P conversations, including running the camera software in a debugger. To start, we set up the camera with a live logging output via the UART serial connection that we established earlier, shown below.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image5.png" alt="" title="image_tooltip" /></p>
<p>This provided a live look at the log messages from the applications as well as any additional logging sources we needed. From this information, we identified the primary binary that is used to establish communication between the camera and the cloud as well as providing the interfaces to access the camera via P2P.</p>
<p>This binary is locally called initApp, and it runs once the camera has been fully initialized and the boot sequence is completed. Given this, we set out to run this binary with a debugger to better evaluate the local functions. In attempting to do so, we encountered a kernel watchdog that detected when initApp was not running and would forcibly restart the camera if it detected a problem. This watchdog checks for writes to <code>/dev/watchdog</code> and, if these writes cease, will trigger a timer that will reboot the camera if the writes do not resume. This makes debugging more difficult as when one pauses the execution of initApp, the writes to the watchdog pause as well. An example of this stopping behavior is shown below:</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image18.png" alt="" title="image_tooltip" /></p>
<p>To avoid this, one could simply try writing to the watchdog whenever initApp stops to prevent the reboot. However, another cleaner option is to make use of the magic close feature of the <a href="https://www.kernel.org/doc/Documentation/watchdog/watchdog-api.txt">Linux Kernel Watchdog Driver API</a>. In short, if one writes a specific magic character ‘V’ <code>/dev/watchdog</code> the watchdog will be disabled. There are other methods of defeating the watchdog as well, but this was the one we chose for our research as it makes it easy to enable and disable the watchdog at will.</p>
<p>With the watchdog disabled, setting up to debug initApp is fairly straightforward. We wanted to run the code directly on the camera, if possible, instead of using an emulator. The architecture of the camera is Little Endian MIPS (MIPSEL). We were fortunate that pre-built GDB and GDBServer binaries were able to function without modification; however, we did not know this initially, so we also set up a toolchain to compile GDBServer specifically for the camera. One technique that might be useful if you find yourself in a similar situation is to use a compilation tool like gcc to compile some source code to your suspected target architecture and see if it runs; see the example below.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image25.png" alt="" title="image_tooltip" /></p>
<p>In our case, since our SoC was known to us, we were fairly certain of the target architecture; however, in certain situations, this may not be so simple to discover, and working from hello world binaries can be useful to establish an initial understanding. Once we were able to compile binaries, we then compiled GDBServer for our camera and then used it to attach and launch initApp. Then, we connected to it from another computer on the same local network as the camera. An example of this is shown below:</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image7.png" alt="" title="image_tooltip" /></p>
<p>As a note for the above example, we are using the <code>-x</code> parameter to pass in some commands for convenience, but they are not necessary for debugging. For more information on any of the files or commands, please see our <a href="https://github.com/elastic/camera-hacks/tree/main">elastic/camera-hacks</a> GitHub repo. In order for initApp to load properly, we also needed to ensure that the libraries used by the binary were accessible via the <code>PATH</code> and <code>LD_LIBARY_PATH</code> environment variables. With this setup, we were then able to debug the binary as we needed. Since we also used the magic character method of defeating the watchdog earlier we also will need to make sure to control instances where the watchdog can be re-enabled. In most cases, we do not want this to happen. As such, we overwrote the watchdog calls in initApp so that the watchdog would not be re-enabled while we were debugging, as shown below.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image3.png" alt="" title="image_tooltip" /></p>
<p>The following video shows the full setup process from boot to running GDBServer. In the video, we also start a new initApp process, and as such, we need to kill both the original process and the <code>daemon.sh</code> shell script that will spawn a new initApp process if it is killed.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/video1.gif" alt="" /></p>
<h2>Building a P2P Client</h2>
<p>In order to further explore the full extent of capabilities which P2P provides to AJCloud IoT devices and how they can be abused by attackers, we set out to build our own standalone client. This approach would remove the overhead of manipulating the Wansview Cloud Windows app while allowing us to more rapidly connect to cameras and test out commands we derive from reverse engineering the firmware.</p>
<p>From the configuration data we obtained earlier from the Windows app logs, we knew that a client issues requests to up to three different servers as part of the connection process. These servers provide instructions to clients as to where traffic should be routed in order to access a given camera. If you would like to discover more of these servers out in the open, you can scan the Internet using the following four-byte UDP payload on port <code>60722</code>. Paul Marrapese used this technique to great effect as part of his research.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image34.png" alt="" title="image_tooltip" /></p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image6.png" alt="" title="image_tooltip" /></p>
<p>In order to properly establish a P2P connection, a client must first send a simple hello message (<code>MSG_HELLO</code>), which needs to be ACK’d (<code>MSG_HELLO_ACK</code>) by a peer-to-peer server. The client then queries the server (<code>MSG_P2P_REQ</code>) for a particular deviceId. If the server is aware of that device, then it will respond (<code>MSG_PUNCH_TO</code>) to the client with a target IP address and UDP port number pair. The client will then attempt to connect (<code>MSG_PUNCH_PKT</code>) to the IP and port pair along with other ports <a href="https://github.com/elastic/camera-hacks/blob/deb2abe9a7a1009c5c1b7d34584f143d5b62c82e/p2p/p2p_client.py#L247-L260">within a predetermined range</a> as part of a <a href="https://en.wikipedia.org/wiki/UDP_hole_punching">UDP hole punching</a> routine. If successful, the target will send a message (<code>MSG_PUNCH_PKT</code>) back to the client along with a final message (<code>MSG_P2P_RDY</code>) to confirm that the connection has been established.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image28.gif" alt="" title="image_tooltip" /></p>
<p>After connecting to a camera, we are primarily interested in sending different <code>MSG_DRW</code> packets and observing their behavior. These packets contain commands which will allow us to physically manipulate the camera, view and listen to its video and audio streams, access data stored within it, or alter its configuration. The most straightforward command we started with involved panning the camera counter clockwise, which we could easily identify as a single message transmission.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image30.png" alt="" title="image_tooltip" /></p>
<p>Debug log messages on the camera allowed us to easily locate where this command was processed within the firmware.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image20.png" alt="" title="image_tooltip" /></p>
<p>Locating the source of this particular message placed us in the main routine which handles processing MSG_DRW messages, which provided us with critical insight into how this command is invoked and what other commands are supported by the firmware.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image14.png" alt="" title="image_tooltip" /></p>
<p>Extensive reverse engineering and testing allowed us to build a <a href="https://github.com/elastic/camera-hacks/blob/main/p2p/p2p_client.py">PoC P2P client</a> which allows users to connect to any camera on the AJCloud platform, provided they have access to its deviceId. Basic commands supported by the client include camera panning and tilting, rebooting, resetting, playing audio clips, and even crashing the firmware.</p>
<p>The most dangerous capability we were able to implement was through a command which modifies a core device configuration file: <code>/var/syscfg/config_default/app_ajy_sn.ini</code>. On our test camera, the file’s contents were originally as follows:</p>
<pre><code>[common]
product_name=Q5
model=NAV
vendor=WVC
serialnum=WVCD7HUJWJNXEKXF
macaddress=
wifimacaddress=
</code></pre>
<p>While this appears to contain basic device metadata, this file is the only means through which the camera knows how to identify itself. Upon startup, the camera reads in the contents of this file and then attempts to connect to the AJCloud platform through a series of curl requests to various API endpoints. These curl requests pass along the product name, camera model, vendor code, and serial number values extracted from the INI file as query string arguments. We used our client to deliver a message which overwrites the contents like so:</p>
<pre><code>[common]
product_name=
model=OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~HH01
vendor=YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~HH01
serialnum=defghijklmnopqrstuvwxyz{|}~HH01
macaddress=
wifimacaddress=
</code></pre>
<p>After the camera is reset, all curl requests issued to AJCloud platform API endpoints as part of the startup routine will fail due to the malformed data contained within the INI file. These requests will continue to periodically be sent, but they will never succeed and the camera will remain inactive and inaccessible through any apps. Unfortunately, there is no simple way to restore the previous file contents through resetting the camera, updating its firmware, or restoring the factory settings. File modifications carried out through this command will effectively brick a camera and render it useless.</p>
&lt;iframe src=&quot;https://drive.google.com/file/d/1oK_umHYfScza-F5RQNUGgFe3GFOt5n--/preview&quot; width=&quot;640&quot; height=&quot;480&quot; allow=&quot;autoplay&quot;&gt;&lt;/iframe&gt;
<p>Taking a closer look at the decompiled function (<code>syscfg_setAjySnParams</code>) which overwrites the values stored in <code>app_ajy_sn.ini</code>, we can see that input parameters, extracted from the <code>MSG_DRW</code> command are used to pass along string data which will be used to overwrite the model, vendor, and serial number fields in the file. memset is used to overwrite three global variables, intended to store these input strings, with null bytes. strcpy is then used to transfer the input parameters into these globals. In each instance, this will result in bytes being copied directly from the <code>MSG_DRW</code> command buffer until it encounters a null character.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/image21.png" alt="" title="image_tooltip" /></p>
<p>Because no validation is enforced on the length of these input parameters extracted from the command, it is trivial to craft a message of sufficient length which will trigger a buffer overflow. While we did not leverage this vulnerability as part of our attack to brick the camera, this appears to be an instance where an exploit could be developed which would allow for an attacker to achieve remote code execution on the camera.</p>
<h2>Impact</h2>
<p>We have confirmed that a broad range of devices across several vendors affiliated with AJCloud and several different firmware versions are affected by these vulnerabilities and flaws. Overall, we successfully demonstrated our attacks against fifteen different camera products from Wansview, Galayou, Cinnado, and Faleemi. Based on our findings, it is safe to assume that all devices which operate AJCloud firmware and connect to the AJCloud platform are affected.</p>
<p>All attempts to contact both AJCloud and Wansview in order to disclose these vulnerabilities and flaws were unsuccessful.</p>
<h2>What did the vendors do right?</h2>
<p>Despite the vulnerabilities we discovered and discussed previously, there are a number of the security controls that AJCloud and the camera vendors implemented well. For such a low cost device, many best practices were implemented. First, the network communications are secured well using certificate based WebSocket authentication. In addition to adding encryption, putting many of the API endpoints behind the certificate auth makes man in the middle attacks significantly more challenging. Furthermore, the APKs for the mobile apps were signed and obfuscated making manipulating these apps very time consuming.</p>
<p>Additionally, the vendors also made some sound decisions with the camera hardware and firmware. The local OS for the camera is effectively limited, focusing on just the needed functionality for their product. The file system is configured to be read only, outside of logging, and the kernel watchdog is an effective method of ensuring uptime and reducing risk of being stuck in a failed state. The Ingenic Xburst T31 SoC, provides a capable platform with a wide range of support including secure boot, a Power-On Reset (POR) watchdog, and a separate RISC-V processor capable of running some rudimentary machine learning on the camera input.</p>
<h2>What did the vendors do wrong?</h2>
<p>Unfortunately, there were a number of missed opportunities with these available features. Potentially the most egregious is the unauthenticated cloud access. Given the API access controls established for many of the endpoints, having the camera user access endpoints available via serial number without authentication is a huge and avoidable misstep. The P2P protocol is also vulnerable as we showcased, but compared to the API access which should be immediately fixable, this may take some more time to fix the protocol. It is a very dangerous vulnerability, but it is a little bit more understandable as it requires considerably more time investment to both discover and fix.</p>
<p>From the application side, the primary issue is with the Windows app which has extensive debug logging which should have been removed before releasing publicly. As for the hardware, it can be easily manipulated with physical access (exposed reset button, etc.). This is not so much an issue given the target consumer audience. It is expected to err on the side of usability rather than security, especially given physical access to the device. On a similar note, secure boot should be enabled, especially given that the T31 SoC supports it. While not strictly necessary, this would make it much harder to debug the source code and firmware of the device directly, making it more difficult to discover vulnerabilities that may be present. Ideally it would be implemented in such a way that the bootloader could still load an unsigned OS to allow for easier tinkering and development, but would prevent the signed OS from loading until the boot loader configuration is restored. However, one significant flaw in the current firmware is the dependence on the original serial number that is not stored in a read only mount point while the system is running. Manipulating the serial number should not permanently brick the device. It should either have a mechanism for requesting a new serial number (or restoring its original serial number) should its serial number be overwritten, or the serial number should be immutable.</p>
<h2>Mitigations</h2>
<p>Certain steps can be taken in order to reduce the attack surface and limit potential adverse effects in the event of an attack, though they vary in their effectiveness.</p>
<p>Segmenting Wi-Fi cameras and other IoT devices off from the rest of your network is a highly recommended countermeasure which will prevent attackers from pivoting laterally to more critical systems. However, this approach does not prevent an attacker from obtaining sensitive user data through exploiting the access control vulnerability we discovered in the AJCloud platform. Also, considering the ease in which we were able to demonstrate how cameras could be accessed and manipulated remotely via P2P, any device connected to the AJCloud platform is still at significant risk of compromise regardless of its local network configuration.</p>
<p>Restricting all network communications to and from these cameras would not be feasible due to how essential connectivity to the AJCloud platform is to their operation. As previously mentioned, the devices will simply not operate if they are unable to connect to various API endpoints upon startup.</p>
<p>A viable approach could be restricting communications beyond the initial startup routine. However, this would prevent remote access and control via mobile and desktop apps, which would defeat the entire purpose of these cameras in the first place. For further research in this area, please refer to “<a href="https://petsymposium.org/popets/2021/popets-2021-0075.pdf">Blocking Without Breaking: Identification and Mitigation of Non-Essential IoT Traffic</a>”, which explored this approach more in-depth across a myriad of IoT devices and vendors.</p>
<p>The best approach to securing any Wi-Fi camera, regardless of vendor, while maintaining core functionality would be to flash it with alternative open source firmware such as <a href="https://openipc.org">OpenIPC</a> or <a href="https://thingino.com">thingino</a>. Switching to open source firmware avoids the headaches associated with forced connectivity to vendor cloud platforms by providing users with fine grain control of device configuration and remote network accessibility. Open access to the firmware source helps to ensure that critical flaws and vulnerabilities are quickly identified and patched by diligent project contributors.</p>
<h2>Key Takeaways</h2>
<p>Our research revealed several critical vulnerabilities that span all aspects of cameras operating AJCloud firmware which are connected to their platform. Significant flaws in access control management on their platform and the PPPP peer protocol provides an expansive attack surface which affects millions of active devices across the world. Exploiting these flaws and vulnerabilities leads to the exposure of sensitive user data and provides attackers with full remote control of any camera connected to the AJCloud platform. Furthermore, a built-in P2P command, which intentionally provides arbitrary write access to a key configuration file, can be leveraged to either permanently disable cameras or facilitate remote code execution through triggering a buffer overflow.</p>
<p>Please visit our <a href="https://github.com/elastic/camera-hacks">GitHub repository</a> for custom tools and scripts we have built along with data and notes we have captured which we felt would provide the most benefit to the security research community.</p>
]]></content:encoded>
            <category>security-labs</category>
            <enclosure url="https://www.elastic.co/jp/security-labs/assets/images/storm-on-the-horizon/storm-on-the-horizon.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Operation Bleeding Bear]]></title>
            <link>https://www.elastic.co/jp/security-labs/operation-bleeding-bear</link>
            <guid>operation-bleeding-bear</guid>
            <pubDate>Tue, 06 Dec 2022 00:00:00 GMT</pubDate>
            <description><![CDATA[Elastic Security verifies new destructive malware targeting Ukraine: Operation Bleeding Bear]]></description>
            <content:encoded><![CDATA[<h2>Key Takeaways</h2>
<ul>
<li>Elastic Security provides new analysis and insights into targeted campaign against Ukraine organizations with destructive malware reported over the weekend of Jan 15, 2022</li>
<li>Techniques observed include process hollowing, tampering with Windows Defender, using a Master Boot Record (MBR) wiper, and file corruptor component</li>
<li>Elastic Security prevents each stage of the described campaign using prebuilt endpoint protection features</li>
</ul>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image16.jpg" alt="" /></p>
<h2>Overview</h2>
<p>Over this past weekend (1/15/2022), Microsoft released details of a new <a href="https://www.microsoft.com/security/blog/2022/01/15/destructive-malware-targeting-ukrainian-organizations/">campaign targeting Ukrainian government entities</a> and organizations with destructive malware. In a multi-staged attack, one malware component known as WhisperGate utilizes a wiping capability on the Master Boot Record (MBR), making any machine impacted inoperable after boot-up.</p>
<p>Within another stage, a file infector component is used to corrupt files in specific directories with specific file extensions. The elements used in this campaign lack the common characteristics of a ransomware compromise – in this case the adversary uses the same Bitcoin address for each victim and offers no sign of intent to decrypt the victim’s machine.</p>
<p>The Ukrainian National Cyber Security Coordination Center has been referring to this threat activity on its official <a href="https://twitter.com/ncsccUA/status/1482733473228013569?s=20">Twitter</a> and <a href="https://www.facebook.com/ncsccUA/posts/449966023412420">Facebook</a> accounts as Operation Bleeding Bear.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image12.jpg" alt="Translation: Update information on the cyber attack on January 13-14 on Ukrainian infrastructure. For a coordinated response report the incident: report@ncscc.gov.ua" /></p>
<p><strong>Elastic users are fully protected</strong> from attacks like these through our advanced malware detection and Ransomware Protection capabilities in the platform. The Elastic Security team continues to monitor these events. This case highlights the importance of prevention when it’s up against ransomware and malware with destructive capabilities.</p>
<h3>Stage 1: WhisperGate MBR payload</h3>
<p>The Master Boot Record (MBR) is software that executes stored start-up information and, most importantly, informs the system of the location of the bootable partition on disk that contains the user’s operating system. If tampered with, this can result in the system being inoperable – a common tactic for malware and ransomware campaigns over the years to interrupt operation of the infected system.</p>
<p>The stage 1 binary is named stage1.exe and has low complexity. A 8192 byte buffer containing the new MBR data that includes the ransom note is allocated on the stack. A file handle is retrieved from <strong>CreateFileW</strong> pointing to the first physical drive which represents the MBR. That file handle is then called by <strong>WriteFile</strong> which takes only 512 bytes from the buffer writing over the Master Boot Record.</p>
<h2>Malware analysis breakdown (Stages 1-4)</h2>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image2.jpg" alt="" /></p>
<p>The host is subsequently rendered inoperable during the next boot-up sequence. Below is a screenshot showing the ransom note from an affected virtual machine.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image3.jpg" alt="" /></p>
<p>Contained within the ransom note are instructions soliciting payment to a bitcoin wallet address of <a href="https://www.blockchain.com/btc/address/1AVNM68gj6PGPFcJuftKATa4WLnzg8fpfv">1AVNM68gj6PGPFcJuftKATa4WLnzg8fpfv</a>. The wallet does not appear to have received funds from victims as of the publication of this post.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image5.jpg" alt="" /></p>
<h3>Stage 2/3: Discord downloader and injector</h3>
<p>Once the payload has gained a foothold, further destructive capabilities are facilitated by the stage 2 binary, called stage2.exe. This binary pulls down and launches a payload hosted via the Discord content delivery network, a <a href="https://www.riskiq.com/blog/external-threat-management/discord-cdn-abuse-malware/">recently</a> <a href="https://www.zscaler.com/blogs/security-research/discord-cdn-popular-choice-hosting-malicious-payloads">reported</a> approach which is increasingly being used by malicious actors.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image1.jpg" alt="" /></p>
<p>The obfuscated .NET payload (described as Stage 3 below) is then executed in memory, setting off a number of events including:</p>
<ul>
<li>Writing and executing a VBS script that uses PowerShell to add a Windows Defender exclusion on the root directory (C:)</li>
</ul>
<pre><code>Writing and executing a VBS script

&quot;C:\Windows\System32\WScript.exe&quot;&quot;C:\Users\jim\AppData\Local\Temp\Nmddfrqqrbyjeygggda.vbs&quot;

</code></pre>
<pre><code>Uses PowerShell to add a Windows Defender exclusion

powershell.exe Set-MpPreference -ExclusionPath 'C:\'
</code></pre>
<p><a href="https://www.nirsoft.net/utils/advanced_run.html">AdvancedRun</a>, a program used to run Windows applications with different settings, is then dropped to disk and executed in order to launch the Service Control Manager and stop the Windows Defender service (WinDefend).</p>
<pre><code>AdvancedRun is used to stop Windows Defender

&quot;C:\Users\jim\AppData\Local\Temp\AdvancedRun.exe&quot; /EXEFilename &quot;C:\Windows\System32\sc.exe&quot; `
  /WindowState 0 /CommandLine &quot;stop WinDefend&quot;  /StartDirectory &quot;&quot; /RunAs 8 /Run

</code></pre>
<p>AdvancedRun is used again when launching PowerShell to recursively delete the Windows Defender directory and its files.</p>
<pre><code>AdvancedRun deleting the Windows Defender directory

&quot;C:\Users\jim\AppData\Local\Temp\AdvancedRun.exe&quot; `
  /EXEFilename &quot;C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe&quot; /WindowState 0 `
  /CommandLine &quot;rmdir 'C:\ProgramData\Microsoft\Windows Defender' -Recurse&quot; `
  /StartDirectory &quot;&quot; /RunAs 8 /Run
</code></pre>
<p>Copies InstallUtil.exe is a command-line utility that allows users to install and uninstall server resources from the local machine into the user’s %TEMP% directory. This action leverages the file for <a href="https://www.elastic.co/jp/blog/ten-process-injection-techniques-technical-survey-common-and-trending-process">process hollowing</a> by launching it in a suspended state.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image14.jpg" alt="" /></p>
<p>It then proceeds to allocate memory (VirtualAllocEx , write the file corruptor payload (described as the Final Stage below) into memory (WriteProcessMemory), modify the thread entry point (SetThreadContext) to point to the file corruptor entry point, and start execution of the file corruptor (ResumeThread).</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image8.jpg" alt="" /></p>
<h3>Final stage: File corruptor</h3>
<p>The final file corruptor payload is loaded in memory via process hollowing to the InstallUtil process. The file corruptor:</p>
<ul>
<li>Targets any local hard drives, attached USB drives, or mounted network shares</li>
<li>Scans directories for files matching internal hard-coded extension list (excluding the Windows folder)</li>
</ul>
<pre><code>.3DM .3DS .602 .7Z .ACCDB .AI .ARC .ASC .ASM .ASP .ASPX .BACKUP .BAK .BAT .BMP .BRD
.BZ .BZ2 .C .CGM .CLASS .CMD .CONFIG .CPP .CRT .CS .CSR .CSV .DB .DBF .DCH .DER .DIF
.DIP .DJVU.SH .DOC .DOCB .DOCM .DOCX .DOT .DOTM .DOTX .DWG .EDB .EML .FRM .GIF .GO
.GZ .H .HDD .HTM .HTML .HWP .IBD .INC .INI .ISO .JAR .JAVA .JPEG .JPG .JS .JSP .KDBX
.KEY .LAY .LAY6 .LDF .LOG .MAX .MDB .MDF .MML .MSG .MYD .MYI .NEF .NVRAM .ODB .ODG .ODP
.ODS .ODT .OGG .ONETOC2 .OST .OTG .OTP .OTS .OTT .P12 .PAQ .PAS .PDF .PEM .PFX .PHP .PHP3
.PHP4 .PHP5 .PHP6 .PHP7 .PHPS .PHTML .PL .PNG .POT .POTM .POTX .PPAM .PPK .PPS .PPSM .PPSX
.PPT .PPTM .PPTX .PS1 .PSD .PST .PY .RAR .RAW .RB .RTF .SAV .SCH .SHTML .SLDM .SLDX .SLK
.SLN .SNT .SQ3 .SQL .SQLITE3 .SQLITEDB .STC .STD .STI .STW .SUO .SVG .SXC .SXD .SXI .SXM
.SXW .TAR .TBK .TGZ .TIF .TIFF .TXT .UOP .UOT .VB .VBS .VCD .VDI .VHD .VMDK .VMEM .VMSD
.VMSN .VMSS .VMTM .VMTX .VMX .VMXF .VSD .VSDX .VSWP .WAR .WB2 .WK1 .WKS .XHTML .XLC .XLM
.XLS .XLSB .XLSM .XLSX .XLT .XLTM .XLTX .XLW .YML .ZIP

</code></pre>
<ul>
<li>Overwrites the start of each targeted file with 1MB of static data (byte 0xCC), regardless of file size</li>
<li>Renames each targeted file to a randomized extension</li>
<li>Deletes self with the command:</li>
</ul>
<pre><code>Overwriting, renaming, and deleting files

cmd.exe /min /C ping 111.111.111.111 -n 5 -w 10 &gt; Nul &amp; Del /f /q &lt;running process path&gt;

</code></pre>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image9.jpg" alt="" /></p>
<h2>MBR protection with Elastic Security</h2>
<p>Changes to the MBR are particularly strong signals of anomalous and destructive activity typically associated with ransomware. To counteract this, Elastic security researchers built an MBR protection component based around these signals into our multi-layered ransomware protection feature.</p>
<p>When a process attempts to overwrite the contents of the MBR, the prewrite buffer and other associated process metadata will be analyzed inline before any changes are written to disk. If the activity is deemed malicious in nature, the process will either be terminated immediately (prevention mode) and / or an appropriate ransomware alert will be generated (prevention and detection modes) to allow security operators time to respond.</p>
<p>When configured in prevention mode, Elastic Security’s ransomware protection ensures that the integrity of the MBR is fully preserved, with no changes ever reaching disk thanks to the synchronous framework leveraged by the feature — effectively preventing the ransomware attack in their tracks as the offending process is terminated.</p>
<p>When WriteFile is invoked on PhysicalDrive0 on a host running Elastic Security with ransomware protection enabled, the pending change will immediately be analyzed and deemed malicious. Afterwards, the process will be terminated, the endpoint user will be alerted via a popup notification, and a ransomware prevention alert will be sent to and stored in Elasticsearch. The intended ransom note can be easily deciphered after Base64 decoding the contents of the prewrite buffer found in the alert within Kibana.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image13.jpg" alt="" /></p>
<p>It is important to note that while this behaviour is detected by Elastic, it is not specific to this payload and rather the behaviour the payload is exhibiting. This increases our chance of being able to detect and prevent malicious behaviors, even when a static signature of the malware is not known. Threat actors find this kind of control more difficult to evade than traditional, signature-based detection and prevention approaches.</p>
<h2>Observing WhisperGate in Elastic Security</h2>
<p>By observing the process hash of the stage 1 dropper above (a196c6b8ffcb97ffb276d04f354696e2391311db3841ae16c8c9f56f36a38e92) via the process.hash function within Elastic Security, we can isolate the ransomware alert and analyze the blocked attempt at overwriting the MBR.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image7.png" alt="" /></p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image4.jpg" alt="" /></p>
<p>As we can see, the data is stored as a Base64 encoded string in Elasticsearch. Decoded, we can see the contents of the ransom note that would be displayed to the end user of an affected system.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/operation-bleeding-bear-image6.png" alt="" /></p>
<h2>Alert breakdown and defensive recommendations</h2>
<p>The following alerts were triggered in Elastic Security during our investigations:</p>
<h3>Endpoint Security Integration Alerts</h3>
<h4>Stage 1 - MBR Wiper</h4>
<p>(a196c6b8ffcb97ffb276d04f354696e2391311db3841ae16c8c9f56f36a38e92)</p>
<ul>
<li>Malware Prevention Alert</li>
<li>Ransomware Prevention Alert (MBR overwrite)</li>
</ul>
<h4>Stage 2 - Downloader</h4>
<p>(dcbbae5a1c61dbbbb7dcd6dc5dd1eb1169f5329958d38b58c3fd9384081c9b78)</p>
<ul>
<li>Malware Prevention Alert</li>
</ul>
<h4>Stage 3 + Stage 4 - Injector/File Corruptor</h4>
<p>(34CA75A8C190F20B8A7596AFEB255F2228CB2467BD210B2637965B61AC7EA907)</p>
<ul>
<li>Ransomware Prevention Alert (canary files)</li>
<li>Malicious Behaviour Prevention Alert - Binary Masquerading via Untrusted Path</li>
<li>Memory Threat Prevention Alert</li>
</ul>
<h3>Prebuilt Detection Engine Alerts</h3>
<p>The following existing <a href="https://github.com/elastic/detection-rules">public detection rules</a> can also be used to detect some of the employed techniques:</p>
<ul>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/execution_suspicious_cmd_wmi.toml">Suspicious Execution via Windows Management Instrumentation (WMI)</a></li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/defense_evasion_defender_exclusion_via_powershell.toml">Windows Defender Exclusions Added via PowerShell</a></li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/command_and_control_common_webservices.toml">Connection to Commonly Abused Web Services</a></li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/execution_from_unusual_directory.toml">Process Execution from an Unusual Directory</a></li>
<li><a href="https://github.com/elastic/detection-rules/blob/82ec6ac1eeb62a1383792719a1943b551264ed16/rules/windows/initial_access_script_executing_powershell.toml">Windows Script Executing PowerShell</a></li>
<li><a href="https://github.com/elastic/detection-rules/blob/ef7548f04c4341e0d1a172810330d59453f46a21/rules/windows/defense_evasion_disabling_windows_defender_powershell.toml">Disabling Windows Defender Security Settings via PowerShell</a></li>
</ul>
<h3>Hunting queries</h3>
<p>Detect attempt to tamper with Windows defender settings via <a href="https://www.nirsoft.net/utils/advanced_run.html">NirSoft AdvancedRun</a> executed by <a href="https://www.virustotal.com/gui/file/923eb77b3c9e11d6c56052318c119c1a22d11ab71675e6b95d05eeb73d1accd6/community">the Stage 3 injector</a>:</p>
<pre><code>Detect attempts to tamper with Windows Defender

process where event.type == &quot;start&quot; and
process.pe.original_file_name == &quot;AdvancedRun.exe&quot; and
process.command_line :
   (&quot;*rmdir*Windows Defender*Recurse*&quot;,
    &quot;*stop WinDefend*&quot;)
</code></pre>
<p>Masquerade as InstallUtil via code injection:</p>
<pre><code>Identifies code injection with InstallUtil

process where event.type == &quot;start&quot; and
process.pe.original_file_name == &quot;InstallUtil.exe&quot; and
not process.executable : &quot;?:\\Windows\\Microsoft.NET\\*&quot;
</code></pre>
<h2>MITRE ATT&amp;CK</h2>
<ul>
<li><a href="https://attack.mitre.org/techniques/T1561/002/">T1561.002 - Disk Structure Wipe</a></li>
<li><a href="https://attack.mitre.org/techniques/T1562/001/">T1562.001 - Disable or Modify Tools</a></li>
<li><a href="https://attack.mitre.org/techniques/T1047/">T1047 - Windows Management Instrumentation</a></li>
<li><a href="https://attack.mitre.org/techniques/T1102/">T1102 - Web Service</a></li>
<li><a href="https://attack.mitre.org/techniques/T1055/">T1055 - Process Injection</a></li>
<li><a href="https://attack.mitre.org/techniques/T1027/">T1027 - Obfuscated Files or Information</a></li>
</ul>
<h2>Summary</h2>
<p>These targeted attacks on Ukraine using destructive malware match a similar pattern observed in the past such as <a href="https://www.wired.com/story/notpetya-cyberattack-ukraine-russia-code-crashed-the-world/">NotPetya</a>. By leveraging different malware components to wipe machines and corrupt files, it’s apparent there was no intent to recover any funds, but likely a technique used to sow chaos and doubt into Ukraine’s stability.</p>
<p>As these events are still ongoing, we wanted to release some initial analysis and observations from our perspective. We also wanted to highlight the prevention capabilities of Elastic Security across each stage of this attack, available to everyone today.</p>
<p>Existing Elastic Security users can access these capabilities within the product. If you’re new to Elastic Security, take a look at our <a href="https://www.elastic.co/jp/training/free#quick-starts">Quick Start guides</a> (bite-sized training videos to get you started quickly) or our <a href="https://www.elastic.co/jp/training/free#fundamentals">free fundamentals training courses</a>. You can always get started with a <a href="https://cloud.elastic.co/registration?elektra=whats-new-elastic-security-7-16-blog">free 14-day trial of Elastic Cloud</a>.</p>
<h2>Indicators</h2>
<table>
<thead>
<tr>
<th>Indicator</th>
<th>Type</th>
<th>Note</th>
</tr>
</thead>
<tbody>
<tr>
<td>a196c6b8ffcb97ffb276d04f354696e2391311db3841ae16c8c9f56f36a38e92</td>
<td>SHA256</td>
<td>Stage1.exe (MBR wiper)</td>
</tr>
<tr>
<td>dcbbae5a1c61dbbbb7dcd6dc5dd1eb1169f5329958d38b58c3fd9384081c9b78</td>
<td>SHA256</td>
<td>Stage2.exe (Downloader)</td>
</tr>
<tr>
<td>923eb77b3c9e11d6c56052318c119c1a22d11ab71675e6b95d05eeb73d1accd6</td>
<td>SHA256</td>
<td>Stage3 (Injector - original)</td>
</tr>
<tr>
<td>9ef7dbd3da51332a78eff19146d21c82957821e464e8133e9594a07d716d892d</td>
<td>SHA256</td>
<td>Stage3 (Injector - fixed)</td>
</tr>
<tr>
<td>34CA75A8C190F20B8A7596AFEB255F2228CB2467BD210B2637965B61AC7EA907</td>
<td>SHA256</td>
<td>Stage4 (File Corruptor)</td>
</tr>
</tbody>
</table>
<h2>Artifacts</h2>
<p>Artifacts are also available for <a href="https://assets.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltc57bd32cdaea24f7/628e88d8b385dc5352428ffc/bleeding-bear-indicators.zip">download</a> in both ECS and STIX format in a combined zip bundle.</p>
]]></content:encoded>
            <category>security-labs</category>
            <enclosure url="https://www.elastic.co/jp/security-labs/assets/images/operation-bleeding-bear/bleeding-bear.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Elastic protects against data wiper malware targeting Ukraine: HERMETICWIPER]]></title>
            <link>https://www.elastic.co/jp/security-labs/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper</link>
            <guid>elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper</guid>
            <pubDate>Fri, 09 Sep 2022 00:00:00 GMT</pubDate>
            <description><![CDATA[Analysis of the HERMETICWIPER malware targeting Ukranian organizations.]]></description>
            <content:encoded><![CDATA[<h2>Introduction</h2>
<p>On February 23, 2022, the ESET threat research team <a href="https://twitter.com/ESETresearch/status/1496581903205511181">disclosed a series of findings</a> pertaining to a Data Wiper malware campaign, impacting hundreds of systems across Ukraine, named <a href="https://twitter.com/juanandres_gs/status/1496607141888724997">HERMETICWIPER</a>. Elastic previously published research on <a href="https://www.elastic.co/jp/security-labs/operation-bleeding-bear">Operation Bleeding Bear</a>, a campaign targeted towards Ukrainian assets with similar destructive intentions.</p>
<p>Malware Wipers remain a common tactic of adversaries looking to cause havoc on systems impacted by their payloads. Typically this class of malware is designed to wipe the contents of any drives a system may have, rendering the end-users personal data lost. Many more recent examples of this class of payload incorporate tactics that also tamper with the boot process, with HERMETICWIPER being no exception.</p>
<p>Customers leveraging the Elastic Agent version 7.9+, and above are protected against this specific malware, with further research being undertaken to improve detection efficacy.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-8.png" alt="" /></p>
<h2>Malware Wipers &amp; Ukrainian Targets</h2>
<p>Unfortunately, this is not the first time this year that Ukranian systems have been the target of Data-wiping payloads - Microsoft <a href="https://therecord.media/microsoft-data-wiping-malware-disguised-as-ransomware-targets-ukraine-again/">published findings</a> pertaining to similar, observed attacks that impacted systems within Ukraine, however initially impacting a far smaller number of systems. The publication outlined that the targeting of this specific earlier campaign was focused on multiple government agencies, non-profits, and information technology organizations throughout the country.</p>
<h2>Malware Stage Analysis</h2>
<p>HERMETICWIPER is digitally signed by Hermetica Digital Ltd., an organization <a href="https://opencorporates.com/companies/cy/HE419469">registered</a> in Cyprus, and embeds 4 legitimate driver files from <a href="https://www.easeus.com/partition-manager">EaseUS Partition Manager</a> that are compressed using MS-DOS utility (mscompress). Hermetica Digital Ltd. has revoked the code-signing certificate.</p>
<p>Upon execution, HERMETICWIPER creates a kernel mode service and interacts with it via DeviceIoControl API function. The main objective is to corrupt any attached physical drive and render the system data unrecoverable.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-20.png" alt="" /></p>
<p>Below is a summary of the events generated during the installation phase using, Windows events logs and Elastic Agent.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-16.jpg" alt="" /></p>
<p>Following the installation process, HERMETICWIPER determines the dimensions of each partition by calculating the bytes in each sector and sectors in each cluster using the GetDiskFreeSpaceW Windows API <a href="https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdiskfreespacew">function</a>.</p>
<p>The malware interacts with the IOCTL interface, passing the parameter IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS with a value of 0x560000 to the device driver in order to retrieve the physical location of the root driver (\.\C). The root drive corresponds to the volume Windows uses to boot, and its identification is essential to achieve a destructive impact.</p>
<p>The NTFS/FAT boot sector and random file physical offsets are enumerated for each accessible physical drive, and then overwritten by the output of the CryptGenRandom <a href="https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptgenrandom">API function</a> and a series of FSCTL_GET_RETRIEVAL_POINTERS and FSCTL_MOVE_FILE IOCTLs.</p>
<p>Once the system crashes or restarts, the system is unable to boot and the data is corrupted.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-15.jpg" alt="" /></p>
<h2>Interesting Functionality</h2>
<p>Similar to different ransomware families, HERMETICWIPER avoids specific critical folders and files during the wiping process. This ensures the machine is still operable and will not impact the disk wiping/file corrupting process at a later stage.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-13.jpg" alt="" /></p>
<p>Another interesting technique observed when targeted files are queued for wiping is how they are accessed by concatenating the value ::$INDEX_ALLOCATION to a filename. This documented <a href="https://sec-consult.com/blog/detail/pentesters-windows-ntfs-tricks-collection/">NTFS trick</a> is an additional method to bypass access-control list (ACL) permissions on targeted files to provide more reliability when accessing these files.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-19.jpg" alt="" /></p>
<p>HERMETICWIPER also modifies two registry settings during execution (ShowCompColor and ShowInfoTip), setting those key values to 0. Within Windows, when a user chooses to compress NTFS directories/files, there is a setting that allows the user to differentiate them in Windows Explorer showing them as blue representing compressed data or green for encrypted data. This is an attempt by the malware to not set off any suspicious behavior to the user with different coloring on directories/files before the disk corruption occurs on the machine.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-6.jpg" alt="" /></p>
<h2>Shredding Component Analysis</h2>
<p>The malware wipes specific target folders/files writing pre-generated random data at specific disk addresses. It does this by setting up 4 different shredding queues in the binary.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-3.jpg" alt="" /></p>
<p>Each queue usage and its functionality is undetermined, but are used at different points in the sample. The shredding queue is composed of a linked list of targets which contain random pre-generated data (generated at queuing) of the size of the target, the disk number and a linked list of “file” parts with disk addresses and sizes.</p>
<pre><code>HERMETICWIPER Structure for ShredTarget function

struct ctf::ShredTarget
{
ctf::ShredTarget *p_next;
ctf::ShredTarget *p_prev;
ctf::FilePart *p_parts;
int disk_number;
uint8_t *p_random_filled_buffer;
int p_random_filled_buffer_size;
};
</code></pre>
<pre><code>HERMETICWIPER Structure for FilePart function

struct ctf::FilePart
{
ctf::FilePart *p_next;
ctf::FilePart *p_prev;
uint64_t start_address;
uint64_t size;
};
</code></pre>
<pre><code>HERMETICWIPER targeting file, folder, and disk partitions

ctf::QueueFileShred
ctf::QueueFolderShred
ctf::callback::IfPathContainNtUserQueueFileShred
ctf::callback::QueueNtfsBitmapAndLogAttributeShred
ctf::callback::QueueFileShredIfNotSymlink
ctf::callback::QueuePartitionFirstClusterShred
ctf::callback::QueuePartitionShred
</code></pre>
<p>The malware emphasizes the following items that are targeted for shredding.</p>
<ul>
<li>The dropped driver if something goes wrong or after service start:</li>
</ul>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-4.jpg" alt="" /></p>
<ul>
<li>The malware process itself if driver launch goes wrong:</li>
</ul>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-image-21.jpg" alt="" /></p>
<ul>
<li>The disk’s partition first cluster (enumerates up to 100):</li>
</ul>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-7.jpg" alt="" /></p>
<ul>
<li>The System Volume information direct used to store Windows restore points:</li>
</ul>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-14.jpg" alt="" /></p>
<p>Interestingly if the computer doesn’t belong to a domain controller it will target more assets:</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-5.jpg" alt="" /></p>
<p>After queuing the different targets previously described, the sample starts different synchronous/asynchronous shredding threads for each of its queues:</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-10.jpg" alt="" /></p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-12.jpg" alt="" /></p>
<p>The thread launcher will then start a new thread for each target.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-9.jpg" alt="" /></p>
<p>The shredding thread will then iterate through the target’s file parts and use the driver for writing at addresses on specified disk.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-17.jpg" alt="" /></p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-1.jpg" alt="" /></p>
<h2>Driver Analysis</h2>
<p>The driver that is loaded by the user mode component is quite similar to the driver that belongs to Eldos Rawdisk and has been leveraged previously by threat actors like <a href="https://securelist.com/shamoon-the-wiper-further-details-part-ii/57784/">Shamoon</a> and Lazarus. The difference is that HERMETICWIPER abuses a driver (epmntdrv.sys) that belongs to EaseUS Partition Master, a legitimate disk partitioning software.</p>
<p>When the driver is loaded, it creates a device named \Device\EPMNTDRV and creates a symbolic link to be exposed to user mode. Then, it initializes the driver object with the following entry points.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-2.jpg" alt="" /></p>
<p>Looking at the dispatch function that handles the IRP_MJ_CREATE requests, we can see that the driver builds the name of the symlink \Device\HarddiskX\Partition0 and saves a pointer to its file object on the driver’s file object fs context. The driver then uses the volume manager device object to obtain a pointer to the highest level device object in the disk device stack.</p>
<p>After that, it iterates over the stack looking for the Disk driver, that is the Microsoft storage class driver that implements functionality common to all storage devices. Once found, it saves a pointer to its device object in the FsContext2 field of the file object structure.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-11.jpg" alt="" /></p>
<p>Moving to the function that handles the write requests, we can see that it builds an asynchronous <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/i-o-request-packets">Input Output Request Packet</a> (IRP), which is an API used for drivers to communicate with each other, and forwards it the volume manager device. The buffer used in the IRP is described by the <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ns-wdm-_mdl">Memory Descriptor List</a> (MDL) driver function. Finally, a completion routine is provided that will free the MDL and release memory used by the IRP.</p>
<p><img src="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/malware-targeting-ukraine-hermeticwiper-18.png" alt="" /></p>
<p>The read requests are similar to the write requests in concept, in other words, the IoBuildsynchronousFsdRequest() <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-iobuildsynchronousfsdrequest">API function</a> uses the IRP_MJ_READ <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/ifs/irp-mj-read">driver function</a> instead of the IRP_MJ_WRITE <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/irp-mj-write">driver function</a> when sending the IRP to the driver. Finally, the routine that handles I/O control codes finds the highest device object in the stack where the volume manager is located and calls IoBuildDeviceIoControlRequest() to forward the IRP that contains the I/O control code to the appropriate driver.</p>
<blockquote>
<p>All in all, the driver functionality is very simple. It acts as a proxy between user space and the low level file system drivers, allowing raw disk sector manipulation and as a result circumventing Windows operating system security features.</p>
</blockquote>
<h2>Prebuilt Detection Engine Alerts</h2>
<p>The following existing <a href="https://github.com/elastic/detection-rules">public detection rules</a> can also be used to detect some of the employed post exploitation techniques described by Symantec Threat Intelligence Team and ESET [<a href="https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/shuckworm-gamaredon-espionage-ukraine">1</a>][<a href="https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/ukraine-wiper-malware-russia">2</a>][<a href="https://www.welivesecurity.com/2022/03/01/isaacwiper-hermeticwizard-wiper-worm-targeting-ukraine/">3</a>] :</p>
<ul>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/execution_suspicious_cmd_wmi.toml">Suspicious Cmd Execution via WMI</a> (Deployment of wiper via Impacket WMI)</li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/lateral_movement_direct_outbound_smb_connection.toml">Direct Outbound SMB Connection</a> (SMB spreader)</li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/lateral_movement_remote_services.toml">Remotely Started Services via RPC</a> (Remcom)</li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/lateral_movement_executable_tool_transfer_smb.toml">Lateral Tool Transfer</a> (staging PE via file shares for remote execution)</li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/credential_access_cmdline_dump_tool.toml">Potential Credential Access via Windows Utilities</a></li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/credential_access_suspicious_lsass_access_memdump.toml">Potential Credential Access via LSASS Memory Dump</a></li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/execution_from_unusual_directory.toml">Process Execution from an Unusual Directory</a></li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/execution_from_unusual_path_cmdline.toml">Execution from Unusual Directory - Command Line</a></li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/persistence_suspicious_scheduled_task_runtime.toml">Scheduled Task Execution</a></li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/persistence_local_scheduled_task_creation.toml">Scheduled Task Creation</a></li>
<li><a href="https://github.com/elastic/detection-rules/blob/main/rules/windows/defense_evasion_mshta_beacon.toml">Suspicious MSHTA Execution</a></li>
</ul>
<h2>YARA Rules</h2>
<pre><code>rule Windows_Wiper_HERMETICWIPER {
    meta:
        Author = &quot;Elastic Security&quot;
        creation_date = &quot;2022-02-24&quot;
        last_modified = &quot;2022-02-24&quot;
        os = &quot;Windows&quot;
        arch = &quot;x86&quot;
        category_type = &quot;Wiper&quot;
        family = &quot;HERMETICWIPER&quot;
        threat_name = &quot;Windows.Wiper.HERMETICWIPER&quot;
        description = &quot;Detects HERMETICWIPER used to target Ukrainian organization&quot;
        reference_sample = &quot;1bc44eef75779e3ca1eefb8ff5a64807dbc942b1e4a2672d77b9f6928d292591&quot;

    strings:
        $a1 = &quot;\\\\?\\C:\\Windows\\System32\\winevt\\Logs&quot; wide fullword
        $a2 = &quot;\\\\.\\EPMNTDRV\\%u&quot; wide fullword
        $a3 = &quot;tdrv.pdb&quot; ascii fullword
        $a4 = &quot;%s%.2s&quot; wide fullword
        $a5 = &quot;ccessdri&quot; ascii fullword
        $a6 = &quot;Hermetica Digital&quot;
    condition:
        all of them
}

</code></pre>
<h2>Observables</h2>
<table>
<thead>
<tr>
<th>Observable</th>
<th>Type</th>
<th>Reference</th>
<th>Note</th>
</tr>
</thead>
<tbody>
<tr>
<td>1bc44eef75779e3ca1eefb8ff5a64807dbc942b1e4a2672d77b9f6928d292591</td>
<td>SHA-256</td>
<td>Wiper malware</td>
<td>HERMETICWIPER</td>
</tr>
<tr>
<td>0385eeab00e946a302b24a91dea4187c1210597b8e17cd9e2230450f5ece21da</td>
<td>SHA-256</td>
<td>Wiper malware</td>
<td>HERMETICWIPER</td>
</tr>
<tr>
<td>3c557727953a8f6b4788984464fb77741b821991acbf5e746aebdd02615b1767</td>
<td>SHA-256</td>
<td>Wiper malware</td>
<td>HERMETICWIPER</td>
</tr>
<tr>
<td>2c10b2ec0b995b88c27d141d6f7b14d6b8177c52818687e4ff8e6ecf53adf5bf</td>
<td>SHA-256</td>
<td>Wiper malware</td>
<td>HERMETICWIPER</td>
</tr>
</tbody>
</table>
<h2>Artifacts</h2>
<p>Artifacts are also available for <a href="https://assets.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt42ce05ad40a762e8/628e88d9bd980555189d997b/hermeticwiper-indicators.zip">download</a> in both ECS and STIX format in a combined zip bundle.</p>
<h2>References</h2>
<p>The following research was referenced throughout the document:</p>
<ul>
<li><a href="https://twitter.com/ESETresearch/status/1496581903205511181">https://twitter.com/ESETresearch/status/1496581903205511181</a></li>
<li><a href="https://twitter.com/juanandres_gs/status/1496607141888724997">https://twitter.com/juanandres_gs/status/1496607141888724997</a></li>
<li><a href="https://elastic.co/security-labs/operation-bleeding-bear">https://elastic.co/security-labs/operation-bleeding-bear</a></li>
<li><a href="https://therecord.media/microsoft-data-wiping-malware-disguised-as-ransomware-targets-ukraine-again/">https://therecord.media/microsoft-data-wiping-malware-disguised-as-ransomware-targets-ukraine-again/</a></li>
<li><a href="https://opencorporates.com/companies/cy/HE419469">https://opencorporates.com/companies/cy/HE419469</a></li>
<li><a href="https://www.easeus.com/partition-manager">https://www.easeus.com/partition-manager</a></li>
<li><a href="https://docs.microsoft.com/en-us/windows/win32/devio/device-input-and-output-control-ioctl-">https://docs.microsoft.com/en-us/windows/win32/devio/device-input-and-output-control-ioctl-</a></li>
<li><a href="https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdiskfreespacew">https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdiskfreespacew</a></li>
<li><a href="https://docs.microsoft.com/en-us/windows/win32/secauthz/access-tokens">https://docs.microsoft.com/en-us/windows/win32/secauthz/access-tokens</a></li>
<li><a href="https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-findresourcew">https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-findresourcew</a></li>
<li><a href="https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadresource">https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadresource</a></li>
</ul>
]]></content:encoded>
            <category>security-labs</category>
            <enclosure url="https://www.elastic.co/jp/security-labs/assets/images/elastic-protects-against-data-wiper-malware-targeting-ukraine-hermeticwiper/photo-edited-11@2x.jpg" length="0" type="image/jpg"/>
        </item>
    </channel>
</rss>