GithubHelp home page GithubHelp logo

hnjm / locker_decrypter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mikatammi/locker_decrypter

1.0 3.0 0.0 144 KB

Locker Decrypter - Python tool to decrypt files encrypted by Locker malware

Python 100.00%

locker_decrypter's Introduction

Locker Decrypter

License

Public domain

What is this about?

Locker is probably one of the worst malware which exists as of today. It is variant of Cryptolocker family of malware, and so called ransomware, which encrypts victim's important files (such as photos and documents) based on file extension.

I had to rescue files from computer infected by this pesky Locker-malware, and since there were no proper Linux-tools to decrypt the files, I decided to write one.

On May 30th, this kind of document appeared in pastebin: http://pastebin.com/1WZGqrUH

The document describes the format used in the encrypted files so that one can decrypt the files, assuming that the encryption key is known.

Also a 100MB+ csv-file containing all the RSA-keypairs and bitcoin addresses for ransom payments was posted to https://mega.co.nz/#!W85whbSb!kAb-5VS1Gf20zYziUOgMOaYWDsI87o4QHJBqJiOW6Z4

Dependencies

This tool requires Python 2 (tested with 2.7, Python 3 does not work as someone would need to port the rijndael.py).

  • untangle
  • pycrypto

How to decrypt my files

First you have to dig either RSA public key or Bitcoin address from vitcim's computer. The files containing relevant information typically reside in C:\ProgramData\rkcl directory.

  • data.aa0 - Contains list of encrypted files
  • data.aa6 - Contains the bitcoin address
  • data.aa7 - Contains the public key

Use either RSA public key or Bitcoin address to find the private key from the csv-file referred above and to save it to file private_key.xml:

grep [BITCOIN ADDRESS HERE] database_dump.csv | sed -e 's/.*,.*,//g' > private_key.xml

Then run the tool in a directory where you want to decrypt your files:

lockerdecrypter.py <private_key.xml> <directory_to_decrypt>

The tool automatically tries to determine which of the files were actually encrypted and which were not.

Credits

I couldn't find any good library implementation of Rijndael for Python so first I have to give credit to Bram Cohen for Rijndael reference implementation I used implementing this. I also quite deliberately took the example class implementing crypto-block-chain from this stackoverflow post: http://stackoverflow.com/questions/8356689/python-equivalent-of-phps-mcrypt-rijndael-256-cbc

locker_decrypter's People

Contributors

mikatammi avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.