Giter VIP home page Giter VIP logo

configmatter-linux's Introduction

ConfigMatter-linux

ConfigMatter-linux is a static configuration extractor implemented in Golang for BlackMatter Ransomware (targeting GNU/Linux and VMware ESXi). By default the script will print the extracted information to stdout (using the -v (verbose) or -d (debug) flag is recommended for deeper investigations (hexdump, debug information in case of errors). It is also capable of dumping the malware configuration to disk as a JSON file with the -j flag.

Usage

go run configmatter-linux.go blackmatter-linux_structs.go [-v] [-d] [-j] path/to/sample.elf

Screenshots

Running the script

Configuration structure

The configuration of BlackMatter is stored as a Base64 string in the .cfgETD section for the encryptor and .cfgDTD for the decryptor. The next layer is zlib compression (the Windows version uses APlib). Once it is decompressed you will be presented with a rolling XOR encryption where the first 32 bytes of the data are the key.

Running the script

Encryptor

The configuration of the encryptor contains the following data:

Value Description
rsa RSA public key
remove-self Switch for self-deletion
worker-concurrency Threading
disk.enable Switch for file encryption
disk.type Storage type to encrypt
disk.dark-size Number of bytes to encrypt
disk.white-size Number of bytes to skip
disk.min-size Minimum amount of data to encrypt
disk.extension-list File extensions
log.enable Switch for logging
log.level Verbosity level of the log
log.path Filepath of the log file
message.enable Swtich for the ransomnote
message.file-name Filename of the ransomnote
message.file-content Contents of the ransomnote
landing.enable Switch for C2 communication
landing.bot-id Campaign ID
landing.key AES Key for C2 communication
landing.urls C2 URLs
kill-vm.enable Switch for VM shutdown
kill-vm.ignore-list Exceptions from VM shutdown
kill-process.enable Switch for process termination
kill-process.list List of processes to terminate

Decryptor

The configuration of the decryptor contains the following data:

Value Description
rsa RSA private key
remove-self Switch for self-deletion
worker-concurrency Threading
disk.enable Switch for file decryption
disk.type Storage type to decrypt
disk.dark-size Number of bytes to decrypt
disk.white-size Number of bytes to skip
disk.min-size Minimum amount of data to decrypt
disk.extension-list File extensions
log.enable Switch for logging
log.level Verbosity level of the log
log.path Filepath of the log file
message.enable Swtich for the ransomnote
message.file-name Filename of the ransomnote

Testing

This configuration extractor has been tested successfully with the following samples:

SHA-256 Sample Version
1247a68b960aa81b7517c614c12c8b5d1921d1d2fdf17be636079ad94caf970f VirusTotal 1.6.0.2
6a7b7147fea63d77368c73cef205eb75d16ef209a246b05698358a28fd16e502 VirusTotal 1.6.0.2
e48c87a1bb47f60080320167d73f30ca3e6e9964c04ce294c20a451ec1dff425 VirusTotal 1.6.0.2
d4645d2c29505cf10d1b201826c777b62cbf9d752cb1008bef1192e0dd545a82 VirusTotal 1.6.0.4

If you encounter an error with ConfigMatter, please file a bug report via an issue. Contributions are always welcome :)

configmatter-linux's People

Contributors

f0wl avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.