---
title: Recreating the Crime Scene - A JSRat Story
description: Recently, I was using Netwitness Endpoint (ECAT) to help triage a large environment.  During this time, I identified a few systems that were exploited
---

- [Home](https://mydev.netwitness.com/home)
- Integrations 
    - [Netwitness Platform Integrations](https://mydev.netwitness.com/netwitnessplatformintegrations)
    - [Third Party Integrations](https://mydev.netwitness.com/thirdpartyintegrations)
- [Knowledge Center](https://mydev.netwitness.com/knowledge-base)
- Community 
    - [Blogs](https://mydev.netwitness.com/netwitness-security-llc-blog)
    - Discussions
- Customers 
    - [Manage Products and Licenses](https://mydev.netwitness.com/nwportal)
    - Downloads
- Partners 
    - [Partner Program](https://mydev.netwitness.com/partner)
    - [Partner Resources](https://mydev.netwitness.com/partnerresources)
    - [Submit a New Deal Registration](https://mydev.netwitness.com/dealregistration)
    - [Become a Partner](https://mydev.netwitness.com/becomeapartner)
    - [Update Your Partner Locator Profile](https://www.netwitness.com/partner-locator/?utm_source=pardotnewsletter&utm_medium=email&utm_campaign=partner_march)
    - [NetWitness LinkedIn Partner Hub](https://linkedin.com/showcase/netwitnesspartners/)
- Education 
    - [Instructor Led Training Schedule](https://mydev.netwitness.com/instructorledtrainingschedule)
    - [NetWitness Training Catalog](https://mydev.netwitness.com/netwitnesstrainingcatalog)
    - [Security Awareness Training](https://mydev.netwitness.com/securityawarenesstraining)
    - [New Product Readiness](https://mydev.netwitness.com/newproductreadiness)
    - [On-Demand Virtual Labs](https://mydev.netwitness.com/ondemandvirtuallabs)
    - [Additional Training Information](https://mydev.netwitness.com/additionaltraininginformation)
    - [Frequently Asked Questions](https://mydev.netwitness.com/educationfaq)
    - [Contact NetWitness Education Team](https://mydev.netwitness.com/contact-netwitness-education-team)
- Support 
    - [Contact Support](https://mydev.netwitness.com/contact-support)
    - [Create a New Case](https://mydev.netwitness.com/create-support-case)
    - [View My Cases](https://mydev.netwitness.com/viewmycase)
    - [Product Version Life Cycle](https://mydev.netwitness.com/product-version-life-cycle)
    - [Warranty & Replacement Parts](https://mydev.netwitness.com/warranty-and-replacement-parts)
    - [Community Support Forum](https://mydev.netwitness.com/community-support-forum)
    - [Technical Support Guide](https://mydev.netwitness.com/technical-support-guide)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

![search](https://21725316.fs1.hubspotusercontent-na1.net/hubfs/21725316/Ladder/Image/search.svg)

# Recreating the Crime Scene - A JSRat Story

- Home
 */*- [Netwitness blogs](https://mydev.netwitness.com/netwitness-security-llc-blog)
*/*- recreating the crime scene - a jsrat story

 13 Jul, 2017

**Author:** Anonymous

Recently, I was using Netwitness Endpoint (ECAT) to help triage a large environment.  During this time, I identified a few systems that were exploited by malicious html file.  It was part of a phishing campaign that came in via email.  Unfortunately, I was unable to find the file because it was no longer in the Outlook Temporary Internet Files folder.  However, since we have tracking data coming in from the agents, I was able to recreate the scene even without the initial malicious code.

The original compromise showed tracking data like the one below:

![pastedImage\_3.png](https://mydev.netwitness.com/hubfs/Imported_Blog_Media/26073i78FA4AF85C5A9C70.png "pastedImage_3.png")

Here we can see that Outlook starts up Chrome to open a file in the Outlook Temporary Internet Files directory.  From there we see **regsvr32.exe** kicked off that had a URL in it's launch arguments.  The regsvr32.exe is a legitimate and signed Microsoft file used to register DLL's and other controls into the Windows Registry.  Last year, researcher Casey Smith described how this component could take a URL to a remote file as an argument to bypass various security controls.  The URL could be over HTTP or HTTPS and would point to an SCT file.  This SCT file is really just an XML file with instructions on what regsvr32.exe should do.

With the tracking data showing us step by step what occurred on the system, we can use these commands on a different system and attempt to recreate the infection.  

On my analysis system, I opened a command prompt and ran that started this off.  

![pastedImage\_5.png](https://mydev.netwitness.com/hubfs/Imported_Blog_Media/26075i175026197D5ABEA0.png "pastedImage_5.png")

This URL took us to the malicious script on a Google API site over SSL.  The contents of that SCT file can be seen below:

![pastedImage\_6.png](https://mydev.netwitness.com/hubfs/Imported_Blog_Media/26076i92772F63E562DB7E.png "pastedImage_6.png")

In there we see the syntax the JSRat is going to execute leveraging **mshta** as well as another URL.  This new 'terra' URL sends another XML scriptlet to download and install a malicious dll called **'rubyonrais.dll'.**

![pastedImage\_10.png](https://mydev.netwitness.com/hubfs/Imported_Blog_Media/26078iD393E84503B37A37.png "pastedImage_10.png")![pastedImage\_11.png](https://mydev.netwitness.com/hubfs/Imported_Blog_Media/26072i21E5DB45F108A9DE.png "pastedImage_11.png")

Tracking data in our analysis system looks very similar to what our original host showed along with the registering of the DLL.

![pastedImage\_8.png](https://mydev.netwitness.com/hubfs/Imported_Blog_Media/26077iAB9A861CB3503B3C.png "pastedImage_8.png")

If we take a look at the network traffic associated with this, we can get insight into what was happening as well.  

![pastedImage\_12.png](https://mydev.netwitness.com/hubfs/Imported_Blog_Media/26074i736F5EEF70FEBB2A.png "pastedImage_12.png")

We can see the request to '**storage.googleapis.com**' over SSL and then the connection to **'meubackup.terra\[.\]com\[.\]br'**.  This downloaded a 1.4mb file based on the network traffic.  Even though this is an SSL connection, we can still see the meta data about that session.  I can now go and find the file where the script told us it would be.  In the C:\\Users\\Public\\Administrator folder.

![pastedImage\_15.png](https://mydev.netwitness.com/hubfs/Imported_Blog_Media/26079iFC8040D8A2A3A3D4.png "pastedImage_15.png")

Currently this could be picked up with the IIOC "Runs mshta with javascript arguments".

Another we could create is slightly different than one out of the box to cover both HTTP and HTTPS connections.  

| Regsvr32\_runs\_with\_HTTP\_argument |
| --- |
| --Runs\_REGSVR32\_HTTP.sql Runs REGSVR32.EXE with HTTP argument  /\* DB Query SELECT mn.MachineName, se.EventUTCTime, sfn.Filename, se.FileName\_Target, se.Path\_Target, se.LaunchArguments\_Target, sla.LaunchArguments FROM \[dbo\].\[WinTrackingEvents\_P0\] AS \[se\] WITH(NOLOCK) -- Also try P1 INNER JOIN \[dbo\].\[MachineModulePaths\] AS \[mp\] WITH(NOLOCK) ON (\[mp\].\[PK\_MachineModulePaths\] = \[se\].\[FK\_MachineModulePaths\]) INNER JOIN \[dbo\].\[FileNames\] AS \[sfn\] WITH(NOLOCK) ON (\[sfn\].\[PK\_FileNames\] = \[mp\].\[FK\_FileNames\]) INNER JOIN \[dbo\].\[machines\] AS \[mn\] WITH(NOLOCK) ON \[mn\].\[PK\_Machines\] = \[se\].\[FK\_Machines\] INNER JOIN \[dbo\].\[LaunchArguments\] AS \[sla\] WITH(NOLOCK) ON \[sla\].\[PK\_LaunchArguments\] = \[se\].\[FK\_LaunchArguments\_\_SourceCommandLine\] WHERE \[se\].\[BehaviorProcessCreateProcess\] = 1 AND \[se\].FileName\_Target = N'regsvr32.exe' AND \[se\].LaunchArguments\_Target LIKE N'%/i:http%' --ORDER BY se.EventUTCTime desc ORDER BY mn.MachineName desc \*/ -- IIOC SELECT DISTINCT \[se\].\[FK\_Machines\], \[se\].\[FK\_MachineModulePaths\] --,\[se\].\[PK\_WinTrackingEvents\] AS \[FK\_mocSentinelEvents\]   -- If you are using 4.3.0.4, remove the comment dash above FROM \[dbo\].\[WinTrackingEventsCache\] AS \[se\] WITH(NOLOCK) WHERE \[se\].\[BehaviorProcessCreateProcess\] = 1 AND \[se\].FileName\_Target = N'regsvr32.exe' AND \[se\].LaunchArguments\_Target LIKE N'%/i:http%' OPTION (RECOMPILE); |
|  |

I hope you find this useful and as always, happy hunting.

Chris

 Topic:

[0 Comment](https://mydev.netwitness.com/netwitness-security-llc-blog/recreatingthecrimescene-ajsratstory#comments-listing)

###### CATEGORIES

- All
- [Blog](https://mydev.netwitness.com/netwitness-security-llc-blog/tag/blog)

##### RECENT POST

[Netwitness Platform Integration with AWS Application Load Balancer Access logs](https://mydev.netwitness.com/netwitness-security-llc-blog/netwitnessplatformintegrationwithawsapplicationloadbalanceraccesslogs)

 23 Jul, 2024

[The Sky Is Crying: The Wake of the 19 JUL 2024 CrowdStrike Content Update for Microsoft Windows and We Should Take Away From It](https://mydev.netwitness.com/netwitness-security-llc-blog/715124)

 20 Jul, 2024

[DDoS using BotNet Use Case](https://mydev.netwitness.com/netwitness-security-llc-blog/ddosusingbotnetusecase)

 7 May, 2024

[NetWitness Platform](https://www.netwitness.com/)

[Acceptable Use Policy](https://www.netwitness.com/wp-content/uploads/Acceptable-Use-Policy-092022.pdf) [Privacy Statement](https://www.netwitness.com/wp-content/uploads/NetWitness-Privacy-Statement-07292024.pdf)

![NetWitness Logo](https://mydev.netwitness.com/hubfs/Portal-Partner%20Program/netwitness-logo-RGB-white%201.png)

[![LinkedIn](https://mydev.netwitness.com/hubfs/Portal-Partner%20Program/linkedin.png)](https://www.linkedin.com/company/netwitness-platform/) [![YouTube](https://mydev.netwitness.com/hubfs/Portal-Partner%20Program/Youtube.jpg)](https://www.youtube.com/@netwitness)

© 2026 NetWitness LLC. All rights reserved.

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Anonymous",
    "url" : "https://mydev.netwitness.com/netwitness-security-llc-blog/author/anonymous"
  },
  "dateModified" : "2026-03-20T10:27:53.896Z",
  "datePublished" : "2017-07-13T04:00:00.000Z",
  "headline" : "Recreating the Crime Scene - A JSRat Story",
  "mainEntityOfPage" : {
    "@id" : "https://mydev.netwitness.com/netwitness-security-llc-blog/recreatingthecrimescene-ajsratstory",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://mydev.netwitness.com/hubfs/netwitness-logo-CMYK.jpg"
    }
  }
}
```