Skip to content

Instantly share code, notes, and snippets.

View av-gantimurov's full-sized avatar

av-gantimurov

View GitHub Profile
@av-gantimurov
av-gantimurov / agent_tesla_decode_xor.py
Last active December 4, 2020 07:13
Script for decoding strings in decompiled AgentTesla samples
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Script for decoding string in AgentTesla source code for samples from Oct2020
Searches for specific class name. Class name may be defined by command arg.
Author: Gantimurov Alexander
Date: 2020-12-04 10:13
"""
@av-gantimurov
av-gantimurov / 151c1498ad114e882ceed52e03333ded.txt
Created December 4, 2020 06:13
String from AgentTesla md5:151c1498ad114e882ceed52e03333ded
'\x00'
'\x00\x00\x00'
'\x02'
'\x03'
'\tINTEGER '
'\tOBJECTIDENTIFIER '
'\tOCTETSTRING '
'\n'
'\r'
'\r\n'
@av-gantimurov
av-gantimurov / unxor.py
Created June 11, 2020 07:33
python3 xor algorithm
#!/usr/bin/env python3
import itertools
def xor(data, key):
return bytearray(a ^ b for a, b in zip(data, itertools.cycle(key)))
@av-gantimurov
av-gantimurov / mitmproxy.md
Last active March 14, 2023 09:06
Steps to configure mitmproxy for ssl interception in malware analysis

Mitmproxy

Steps to configure mitmproxy for ssl interception in malware analysis.

Download and install

wget https://snapshots.mitmproxy.org/5.0.1/mitmproxy-5.0.1-linux.tar.gz --output-document=mitmproxy.tgz
sudo tar -xzvf mitmproxy.tgz -C /usr/local/bin/

Configure

@av-gantimurov
av-gantimurov / resources.md
Last active November 27, 2024 20:04
List of resources for malware analysts
@av-gantimurov
av-gantimurov / munpack-fix.sh
Last active August 5, 2021 00:53
Fix munpack UTF-8 names in attachments
#!/bin/sh
find . -type f -iname '*X=' | while read name
do
newname=$(echo "$name" | sed 's/[[:print:]]*\/=Xutf-8XBX//I; s/X=XXX=Xutf-8XBX//gI; s/X=$//' | base64 -d )
dir=$(echo $name | sed 's/\/=Xutf-8XBX[A-Za-z0-9X=/+-]\+//I')
mv --verbose "$name" "${dir}/${newname}"
done