Skip to content

Instantly share code, notes, and snippets.

View jakobfriedl's full-sized avatar
πŸ”±

Jakob Friedl jakobfriedl

πŸ”±
View GitHub Profile
@jakobfriedl
jakobfriedl / Shhhavoc.py
Last active February 27, 2024 12:15
Shhhloader integration for Havoc
#!/usr/bin/env python
# -*- Coding: UTF-8 -*-
# Author: Jakob Friedl
# Created on: Mon, 16. Oct 2023
# Description: Shhhloader support for Havoc C2 framework
# Usage: Load this script into Havoc: Scripts -> Scripts Manager -> Load to create Shhhloader Tab
import os, sys, subprocess
import threading
import havoc
@jakobfriedl
jakobfriedl / stager.nim
Created October 24, 2023 10:43
Shellcode stager that loads remote shellcode directly into memory of specified process.
import winim
import os
import httpclient, streams
import sequtils, strutils, strformat
# Status indicators
template success(s: varargs[untyped]): untyped =
when DEBUG:
echo "[+] ", s
template fail(s: varargs[untyped]): untyped =
@jakobfriedl
jakobfriedl / ADOE.py
Created October 24, 2023 14:11
Active Directory Object Enumerator for Havoc
#!/usr/bin/env python
# -*- Coding: UTF-8 -*-
# Author: Jakob Friedl
# Created on: Mon, 23. Oct 2023
# Description: Active Directory object enumeration for Havoc
import havocui
import havoc
import re
@jakobfriedl
jakobfriedl / mitre_parser.py
Last active October 30, 2023 15:19
Parses MITRE ATT&CK enterprise tactics, techniques and sub-techniques to python list format
#!/usr/bin/env python
# -*- Coding: UTF-8 -*-
# Author: Jakob Friedl
# Created on: Mon, 30. Oct. 2023
# Description: Parses MITRE ATT&CK enterprise tactics, techniques and sub-techniques
from bs4 import BeautifulSoup
import requests
import re
import urllib3
@jakobfriedl
jakobfriedl / generator.py
Last active August 5, 2024 07:03
Generate payloads (reverse shell, macro, shellcode, ...)
#!/usr/bin/env python3
# Author: Jakob Friedl
# Description: Generate payloads
import sys
import argparse
import base64
parser = argparse.ArgumentParser(description="Payload generator v1")
# parser.add_argument('type', help='Type of payload to use.', choices=['revshell', 'shellcode'])
@jakobfriedl
jakobfriedl / pcap_analyzer.py
Last active May 19, 2024 14:20
Analyze .pcap files.
from scapy.all import rdpcap, IP, TCP, DNS, DNSQR
from collections import defaultdict
import argparse
def banner():
print("""
β•”β•β•—β”Œβ”€β”β”Œβ”€β”β”Œβ”€β” β•”β•β•—β”Œβ”β”Œβ”Œβ”€β”β”¬ ┬ β”¬β”Œβ”€β”β”Œβ”€β”β”¬β”€β”
╠═╝│ β”œβ”€β”€β”œβ”€β”˜ β• β•β•£β”‚β”‚β”‚β”œβ”€β”€β”‚ β””β”¬β”˜β”Œβ”€β”˜β”œβ”€ β”œβ”¬β”˜
β•© β””β”€β”˜β”΄ β”΄β”΄ β•© β•©β”˜β””β”˜β”΄ β”΄β”΄β”€β”˜β”΄ β””β”€β”˜β””β”€β”˜β”΄β””β”€
""")
@jakobfriedl
jakobfriedl / PrepareMacroStrings.ps1
Created September 13, 2024 08:06
Obfuscate VBA strings for evasion
function ObfuscateString($inputString, $rotKey) {
[string]$output = ""
$inputString.ToString().ToCharArray() | %{
[string]$thischar = [byte][char]$_ + $rotKey
if($thischar.Length -eq 1) {
$thischar = [string]"00" + $thischar
$output += $thischar
}
elseif($thischar.Length -eq 2) {
$thischar = [string]"0" + $thischar