No description, website, or topics provided.
Branch: master
Clone or download
Markel Updated for Emotet 2019
No many changes!

The layer 2 was modified by the gang.
- They try to evade the unpacker duplicating a function in layer2.
- The function for hooking the final payload was changed too.
Latest commit 7e3c412 Jan 5, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc initial commit Dec 10, 2018
resources initial commit Dec 10, 2018
unpacked_sample_idc initial commit Dec 10, 2018
unpacker Updated for Emotet 2019 Jan 5, 2019

Emotet research

In this repository you can find documentation about the packer of Emotet and its unpacker. This unpacker extracts the command and controls, and the public RSA key of Emotet (botnet identifier).

alt text

General purpouse

The purpose of this repository is, to show how the packet of emotet works, provide a sample of emotet payload with its idc (made by me)

Also I wrote an unpacker for emotet (using TitanEngine) which extracts the final payload of emotet and the intermediate layers for extracting it.

In addition, the unpackers extrats to a file the static configuration of emotet, the command and controls and its public RSA key (botnet identifier).

Directories and files

    - Source code of the packer. file is the script for running the unpacker.
    - Titan Engine DLL, or you can download from The DLL must be on C:/windows/system32/ folder.
    - Documentation of the emotet unpacker.
    - In this directory you can find a sample of final payload of the Emotet next to an idc documented by me.


Before to use the unpacker, I recommend to read the documentation I did about this packer. (./doc/EN_emotet_packer_analysis_and_config_extraction_v1.pdf)

  • pyrhon2.7
  • yara-python
  • Titan Engine DLL. Provided in this repo, or you can download from its web page


If success a folder named "output" will be created.

    - Emotet payload unpacked. (PE File)
    - Layer2 of emotet packer. (PE File)
    - Emotet payload unpacked step 1, if you read the packer documentation you will realized that in the first step this file doesn't work, it must be fixed up. (PE File)
    - List of "ip:port" of commands and controls.
    - RSA key used for communicating with the command and control.


After install all requeriments and the Titan Engine DLL...

cd unpacker/src/
./ [options] {filename or folder}

CMD Demo


double click :S

GUI Demo

Then select the target file in the box.
Press the "UnPack" buttom.
Enjoy =)

Final words

These documentation and unpacker were done between November and December of 2018 if after these dates it doesn't work maybe the unpacker doesn't work well or Emotet developers changed the packer.

This unpacker isn't perfect, it's my first dynamic unpacker using Titan Engine. I did this research on my free time, because currently I'm not working on this kind of stuff and I don't have enough time.

It'd be cool keep the repository updated for new versions of the packer or for some future error fixes. Therefore, feel free to send PR or open issues. I will try to keep it updated if I have time.

Enjoy and keep fighting against the malware =)