Matthew Profile picture
Jul 11 14 tweets 8 min read Twitter logo Read on Twitter
Safely investigating a ransomware hosting site using Censys and GrabbrApp 😄

I'll show how to confirm that a "clean" IP was hosting ransomware. You'll also get to see some cool hunting queries and methods for safely downloading malware files.

Thread 👇
[1/12]

#Censys #malware





[2/] I started with some @censysio queries that I've previously published on my site.



The query in this case was looking for #powershell scripts contained in #python based open directories. https://t.co/cMwbV3YGShembee-research.ghost.io/shodan-censys-…
[2.1] A direct link to the censys search

search.censys.io/search?resourc…
[3/] This query returned 26 results. One of which was based out of Shanghai, China.

180.166.220[.]180

This IP had 0 VT detections as of 11/07/23.

As well as a highly suspicious open directory containing "darkside.bin" and "shell.ps1"

https://t.co/4GlRK6zOrbvirustotal.com/gui/ip-address…


[4/] The "Darkside.bin" file was interesting and I wanted to obtain a sample.

Typically I would do this with #Powershell (iwr) and a method I've demonstrated on my blog.

Today I'll show a safer and "cleaner" method using @GrabbrAppIO .

(Blog) https://t.co/G5dzsgNhkAembee-research.ghost.io/smokeloader-an…


[5/] My previous powershell method works ok, but it requires interaction with the IP and a "safe" VM/VPN which is not always available.

So I decided to try @GrabbrAppIO by @valhalla_dev.

This tool was designed for the exact purpose of safely retrieving suspicious files.
[6/] I signed up for GrabbrApp (there's a free option) and input the complete url for "darkside.bin".

You can try that here.
https://t.co/ep9iK8MowLgrabbrapp.io
[7/] GrabbrApp was able to retrieve the file and presented both a hash and link for safe download.

Checking the SHA256 hash in Virustotal immediately confirmed Darkside ransomware.

(No need to directly interact with the IP or ransomware file)

https://t.co/j7BDr20IvNvirustotal.com/gui/file/151fb…


[8/] There were numerous other files contained in the same open directory.

I was able to safely obtain the remaining files using the same method detailed above.



[9/] There were some cases where the hash was not available on #Virustotal and a manual download was required to investigate.

I was able to do this using GrabbrApp which also has the ability to save a suspicious file.

[10] I'll leave the analysis there as I just wanted to show the tool.

There are likely dozens more files across the remaining 25 results in the @censysio search. As well as the searches in the blog post.

I hope people have some fun and see what they can find😁
[11] I've been following @valhalla_dev for a while now and I genuinely think GrabbrApp is a product that I will personally be using.

I can see this saving me a lot of time and effort when doing personal research, particularly malware downloaders and confirming Censys queries.
[12/] There are likely other use cases I haven't encountered yet, and I'll try and share some more as I learn.

For now, here's some links to the queries and tools used.

GrabbrApp:

Queries: https://t.co/t67NIUPWWT

Cont'd....grabbrapp.io
embee-research.ghost.io/shodan-censys-…
[12.1/12]

Censys Search:

VT: https://t.co/zzTrScDmRvsearch.censys.io/search?resourc…
virustotal.com/gui/ip-address…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Matthew

Matthew Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @embee_research

Jun 28
A collection of incredible (non-corporate) malware analysis and reverse engineering blogs that I have personally enjoyed over the years.

All focused on education and knowledge sharing of malware/RE topics.

[1/14] 🧵
(In no particular order)

#malware #education
[2/14] @_n1ghtw0lf for incredible reverse engineering writeups. Including detailed examples of advanced tooling and scripting. eg x64dbg , #emulation and dotnet configuration extractors.

n1ght-w0lf.github.io
[3/14] @FarghlyMal in depth reverse engineering writeups of modern malware. In depth content on using #x64dbg and IDA Pro.

Even without IDA pro, his marked up decompiled code can easily be followed in #Ghidra or other decompiler.

farghlymal.github.io
Read 15 tweets
May 8
🚨Malware Tips 🚨 - Resolving API Hashes Using Conditional Breakpoints.

By adding breakpoints and log conditions to a function that resolves api hashes, it's possible to quickly resolve api hashes in bulk.

Thread
[1/11] 👇

#Malware #AgentTesla #Ghidra #Debugging ImageImageImage
[1.1/11]
Link to original sample: bazaar.abuse.ch/sample/7512be2…

Link to Full Blog: embee-research.ghost.io/agenttesla-ful…
[2/11] You first need to locate a function that resolves api hashes.

An example can be seen here - A giveaway is the same function is repeatedly called with hash-like values. An extra telltale sign is that each return value is cast as code (code *). Image
Read 12 tweets
Mar 22
🐀 AsyncRAT 🐀 - Defeating Obfuscation Using CyberChef

An overview of some advanced CyberChef tricks for decoding malware

[1/12] 🧵

#AsyncRAT #Decoding #CyberChef #Malware Decoding Decimal Values using cyberchefDecoding String Reverse Using CyberchefDecoding Replace Operations Using CyberChefExample of Using Registers and Regex to perform Replace Oper
[2/] First, some links if you wish to follow along.

The Malware File: bazaar.abuse.ch/sample/26c9f29…

Links to CyberChef Recipes:
github.com/embee-research…
[3] Decimal Values:

Some text is converted to decimal to hinder simple text based analysis.

To defeat:
- Subsection - This grabs encoded data without removing the rest of the script
- Regex - Grab the decimal and ignore the "chr" junk
- From Decimal - Decode the decimal Decimal Encoded Values "chr(45)" etc - Prior to De
Read 12 tweets
Mar 16
Ursnif Loader (Javascript) - Manual Decoding Using Cyberchef

[1/13] 👇🧵

#Cyberchef #Decoding #Ursnif #Malware
[1.1] A quick summary/TLDR before we get started

- Remove comments (manually or using regex)
- Remove "split" strings (manually or using regex)
- Remove obfuscated numbers
- (optional) Rename Variables
- Apply beautifier and syntax highlight
[2] First, I downloaded the sample from Malware Bazaar and loaded it into a safe analysis VM.

You can find the same sample here
bazaar.abuse.ch/sample/2a72302…
Read 14 tweets
Mar 14
Potential #DanaBot Loader - De-Obfuscation using CyberChef and Python.

Sample: bazaar.abuse.ch/sample/80aad66…

C2: 0/90 VT
Script: 5/59 VT

[1/5] 👇

#Regex #python #cyberchef #malware ImageImageImageImage
[2/5] Note the initial script contains a large amount of junk comments to mask the "real" code.

These can be removed using #cyberchef and a short #regex.

Find and Replace
^(REM|').*\n ImageImage
[3/5] There are some long junk numbers scattered throughout the code.

Personally, I decoded with Python and an eval inside of a safe VM. ImageImage
Read 5 tweets
Jan 16
(Possible) AsyncRat loader - Interesting regex to decode the obfuscated C2.

Script was found on host with an active #AsyncRat infection.

#malware #regex #decoding
[1/6] The team at @HuntressLabs are still observing IronPython executables used to load #malware.

In these cases - IronPython (ipyw.exe) file is typically renamed to SupportTool.exe or Ctfmon.exe

Since ipyw.exe is "legitimate", the VT detection rate is very low (0/72).
[2/6] The "update.py" is where the malicious action starts.

This is usually a simple python file containing an additional obfuscated script.

Below you can see this decoded via #CyberChef.
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(