This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rule QuantLoader { | |
meta: | |
author = "FDD" | |
description = "QuantLoader Payload" | |
cape_type = "QuantLoader Payload" | |
strings: | |
$payloadDownload = { 55 89 e5 83 ec 08 8b ?? ?? 89 04 24 e8 ?? ?? ?? ?? 80 ?? ?? ?? ?? ?? ?? 74 ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 89 04 24 e8 ?? ?? ?? ?? 80 ?? ?? ?? ?? ?? ?? 74 ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 89 04 24 e8 ?? ?? ?? ?? 80 ?? ?? ?? ?? ?? ?? 74 ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 89 04 24 e8 ?? ?? ?? ?? c9 c3 } | |
$configdecrypt = { 55 89 e5 83 ec 18 ff 05 b0 98 40 00 c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? ?? c7 44 24 04 00 00 00 00 c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? ?? c7 44 24 04 00 00 00 00 c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? ?? c7 44 24 04 00 00 00 00 c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 80 ?? ?? ?? ?? ?? ?? 0f 84 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 89 44 24 04 c7 ?? ?? ?? ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import yara | |
import struct | |
import pefile | |
log = logging.getLogger(__name__) | |
log.setLevel(logging.INFO) | |
yaraf = "/opt/CAPEv2/data/yara/CAPE/QuantLoader.yar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) 2010-2015 Cuckoo Foundation. | |
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org | |
# This signature was contributed by RedSocks - http://redsocks.nl | |
# See the file 'docs/LICENSE' for copying permission. | |
import struct | |
from builtins import bytes | |
from lib.cuckoo.common.abstracts import Signature | |
class QuantloaderDump(Signature): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rule QuantLoaderCfg { | |
meta: | |
author = "FDD" | |
strings: | |
$payloadDownload = { 55 89 e5 83 ec 08 8b ?? ?? 89 04 24 e8 ?? ?? ?? ?? 80 ?? ?? ?? ?? ?? ?? 74 ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 89 04 24 e8 ?? ?? ?? ?? 80 ?? ?? ?? ?? ?? ?? 74 ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 89 04 24 e8 ?? ?? ?? ?? 80 ?? ?? ?? ?? ?? ?? 74 ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 89 04 24 e8 ?? ?? ?? ?? c9 c3 } | |
$configdecrypt = { 55 89 e5 83 ec 18 ff 05 b0 98 40 00 c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? ?? c7 44 24 04 00 00 00 00 c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? ?? c7 44 24 04 00 00 00 00 c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? ?? c7 44 24 04 00 00 00 00 c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 80 ?? ?? ?? ?? ?? ?? 0f 84 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 89 44 24 04 c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? c7 ?? ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 89 44 24 04 c7 ?? ?? ?? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import r2pipe | |
import sys | |
def zignature_to_yara(zignature): | |
b = zignature["bytes"] | |
b = b.replace(".", "?") | |
if len(b) % 2 != 0: | |
b += "?" | |
yarastr = " ".join(b[i:i+2] for i in range(0, len(b), 2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _HAS_EXCEPTIONS 0 | |
#define _CRT_SECURE_NO_WARNINGS | |
#include | |
#include | |
#include | |
#include | |
struct InjectArgs | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extracted from http://resources.infosecinstitute.com/andromeda-bot-analysis/#gref | |
typedef LONG(WINAPI* NtUnmapViewOfSection)(HANDLE ProcessHandle, PVOID BaseAddress); | |
class runPE { | |
public: | |
void run(LPSTR szFilePath, PVOID pFile) | |
{ | |
PIMAGE_DOS_HEADER IDH; | |
PIMAGE_NT_HEADERS INH; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <iostream> | |
#include <Wininet.h> | |
#pragma comment(lib, "Wininet.lib") | |
void decrypt(char * b, char * c, int n) { | |
for (int i = 0; i < n; i++) { | |
c[i] = b[i] ^ 'f'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <iostream> | |
#define FILE_PATH "C:\\Users\\ferna\\Desktop\\tmp.file" | |
void decrypt(char * b, char * c, int n) { | |
for (int i = 0; i < n; i++) { | |
c[i] = b[i] ^ 'f'; | |
} | |
} |
NewerOlder