RansomCoinPublic : A DFIR Tool To Extract Cryptocoin Addresses

RansomCoinPublic is a DFIR tool to extract cryptocoin addresses and other indicators of compromise from binaries. Extracting metadata and hardcoded Indicators of Compromise from ransomware, in a scalable, efficient, way with cuckoo integrations.

Ideally, is it run during cuckoo dynamic analysis, but can also be used for static analysis on large collections of ransomware. Designed to be fast, with low false positive for cryptocurrency addresses. Limited false positives for emails, urls, onions, and domains (which is pretty hard to make perfect).

In short, this is fast and easy initial triage if you only want monetisation vectors.

Installation

Please ensure you have Python3 installed.

In a Linux Virtual Machine

It is advisable to download and install a virtualizer such as VirtualBox. Install your desired Linux virtual machine (i.e. Lubuntu, Kali Linux, etc) then follow the instructions below.

From the tools folder:

sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python-dev python3-tlsh

python3 -m pip install -r requirements.txt

Note: If you get an error saying No module named pip, try running

sudo apt-get install python3-pip

Also Read – HuskyCI : Performing Security Tests Inside Your CI

Usage

A tutorial video is available:

The following commands can be run from the “Tools” folder to analyse malware samples located in this directory. This will run the code across all files in the directoy and provide feedback on the estimated time to completion via TQDM. You will need write access for a file called Ransomware.csv in the directory you are working in (which contains the results). It should be possible to run the code across read only malware files though, so only Ransomware.csv need write access.

Coinlector.py

After running coinlector.py the results are output to a file in the same directory called Ransomware.csv

python3 coinlector.py

View the results by running

less Ransomware.csv

Currently we are testing for:

  • Bitcoin Addresses (BTC)
  • Bitcoin Cash Addresses (BCH)
  • Monero Addresses (XMR)
  • Bitcoin Private Keys
  • Ethereum addresses (ETH)
  • Ripple addresses (XRP)
  • LTC addresses (LTC)
  • DOGECOIN addresses (DOGE)
  • NEO addresses (NEO)
  • DASH addresses (DASH)
  • Domains (Address)
  • Email Addresses (Email)
  • Onion Addresses (Address)

View URLs, email addresses, and cryptocurrency addresses by running the following grep commands.

less Ransomware.csv | grep URL

less Ransomware.csv | grep Email

less Ransomware.csv | grep Address

Grep for Monero addresses by running

less Ransomware.csv | grep XMR

The same command can be used to search for other cryptocurrencies using the abbreviations in the list above.

Tempuscoin.py

tempuscoin.py outputs a list of timestamped ransom transactions. The file TemporalRansoms.csv is created showing the sending and receiving Bitcoin addresses, the amount in BTC and its equivalent value in EUR, USD at the time of the transaction.

python3 tempuscoin.py

View the results by running.

less TemporalRansoms.csv

Eventcoin.py

This code will probably need to be altered to be made usable with your own MISP instance. It uses PyMISP to create events from the Ransomware.csv file, and groups of events share the same name. The default is to create events that are not published, and then to add details by hand before publishing. YMMV.

R K

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

17 hours ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

17 hours ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

3 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

5 days ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

1 week ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

1 week ago