├── C
├── PoSeidon
│ ├── decryptPoseidonCfg.c
│ └── decryptPoseidonCfg.exe
└── queryWorkingSet.c
├── IDA
├── Blog_Posts
│ └── AnalyzingPDFMalware
│ │ └── xord.idb
└── Flame_sKyWIper
│ └── advnetcfg_string_deobfuscate.py
├── LICENSE
├── Python
├── Alina
│ └── alinaTrafficDecode.py
├── AutoIT
│ └── autoit_conv_strings.py
├── CherryPicker
│ └── cherryConfig.py
└── Framework
│ └── decode_framework.py
├── README
├── Ruby
├── .placeholder
├── Alina
│ ├── .gitignore
│ ├── alina.rb
│ └── spark.rb
├── Dexter
│ └── dexter_decode.rb
├── FinSpy
│ ├── README
│ ├── extractConfig.rb
│ ├── parseConfig.rb
│ └── writeConfig.rb
└── Punkey
│ └── decPunkey.rb
└── Yara
├── Apache_Injection_Module
└── apacheInjection.yara
├── CherryPicker
└── cherryPicker.yar
└── Punkey
└── punkey.yar
/C/PoSeidon/decryptPoseidonCfg.c:
--------------------------------------------------------------------------------
1 | /*
2 | # Copyright
3 | # =========
4 | # Copyright (C) 2016 Trustwave Holdings, Inc.
5 | #
6 | # This program is free software: you can redistribute it and/or modify
7 | # it under the terms of the GNU General Public License as published by
8 | # the Free Software Foundation, either version 3 of the License, or
9 | # (at your option) any later version.
10 | #
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program. If not, see
18 | #
19 | #
20 | # Usage: decryptPoseidonCfg.exe
21 | # Author: Eric Merritt
22 | # Date: 2016-01-21
23 | #WinHost.exe.cfg jfnwn02cybn83duf37fj decrypted.txt
24 | # =Synopsis
25 | #
26 | # This is a decryptor program to decrypt configuration files that are downloaded
27 | # in association of a poseidon infection. The configuration files contain additional
28 | # C&C domains that are used by the malware.
29 | #
30 | # IMPORTANT!!!!
31 | # This file MUST be ran on the system that encrypted it for the decryption to work.
32 | # The APIs (CryptUnprotectData, CryptProtectData) perform encryption that can only be
33 | # encrypted/decrypted on the system it originally was used on.
34 | #
35 | # Input: encrypted file, password, and output file
36 | # Output: prints decrypted text to screen and writes output to given output file
37 | #
38 | # Example: decryptPoseidonCfg.exe WinHost.exe.cfg jfnwn02cybn83duf37fj decrypted.txt
39 | #
40 | #
41 | # Output: decrypted.txt (containing decrypted file contents)
42 | */
43 |
44 | #include
45 | #include "Windows.h"
46 | #include
47 | #include
48 |
49 | #pragma comment(lib, "Crypt32")
50 |
51 |
52 | int main(int argc, char* argv[])
53 | {
54 | DATA_BLOB entropy;
55 | DATA_BLOB DataOut;
56 | DATA_BLOB DataVerify;
57 | HANDLE hSourceFile = INVALID_HANDLE_VALUE;
58 | HANDLE hDestinationFile = INVALID_HANDLE_VALUE;
59 | PBYTE pbBuffer = NULL;
60 | DWORD dwBufferLen, dwCount;
61 | char *password = NULL;
62 | char *encryptedFile = NULL;
63 | char *outputFile = NULL;
64 |
65 | if (argc < 4)
66 | {
67 | printf("%s