This file contains hidden or 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
#!/bin/bash | |
# hashcat mask generator | |
# by @singe | |
infile="$1" | |
outfile="$1.freq.masks" | |
outfile2="$1.length.masks" | |
tmp=$(mktemp) |
This file contains hidden or 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
using NtApiDotNet; | |
using NtApiDotNet.Ndr.Marshal; | |
using NtApiDotNet.Win32; | |
using NtApiDotNet.Win32.Rpc.Transport; | |
using NtApiDotNet.Win32.Security.Authentication; | |
using NtApiDotNet.Win32.Security.Authentication.Kerberos; | |
using NtApiDotNet.Win32.Security.Authentication.Kerberos.Client; | |
using NtApiDotNet.Win32.Security.Authentication.Kerberos.Server; | |
using NtApiDotNet.Win32.Security.Authentication.Logon; | |
using System; |
This file contains hidden or 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
# Source: System.Management.Automation.dll | |
# This list is used to determin if a ScriptBlock contains potential suspicious content | |
# If a match is found an automatic 4104 with a "warning" level is generated. | |
# https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/runtime/CompiledScriptBlock.cs | |
- "Add-Type" | |
- "AddSecurityPackage" | |
- "AdjustTokenPrivileges" | |
- "AllocHGlobal" | |
- "BindingFlags" | |
- "Bypass" |
This file contains hidden or 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
#!/usr/bin/env python3 | |
""" | |
Python script to enumerate valid Microsoft 365 domains, retrieve tenant name, and check for an MDI instance. | |
Based on: https://github.com/thalpius/Microsoft-Defender-for-Identity-Check-Instance. | |
Usage: ./check_mdi.py -d <domain> | |
""" | |
import argparse | |
import dns.resolver |
This file contains hidden or 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 paramiko | |
import sys | |
import requests | |
pad=lambda n: '\0'*(n+1)+(chr(16-n)*(16-n-1)) | |
block_xor=lambda x,y: ''.join(chr(ord(a)^ord(b)) for a,b in zip(x,y)) | |
byte_xor=lambda x,y,z: x[:y]+chr(ord(x[y])^z)+x[y+1:] | |
set_pad=lambda x,n: block_xor(pad(n), x) | |
def formatData(d): |
This file contains hidden or 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
// Twitter thread: https://twitter.com/_xpn_/status/1543682652066258946 (was a bit bored ;) | |
// Needs to be run on the SCCM server containing the "Microsoft Systems Management Server" CSP for it to work. | |
using System; | |
using System.Collections.Generic; | |
using System.Runtime.InteropServices; | |
namespace SCCMDecryptPOC | |
{ | |
internal class Program |
This file contains hidden or 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
#!/bin/sh | |
file="$1" | |
tmp=$(mktemp) | |
# change specials & digits to hashcat format | |
sed -e "s/[[:punct:]]/?s/g" \ | |
-e "s/[[:digit:]]/?d/g" \ | |
$file \ | |
> $tmp \ | |
&& \ |
This file contains hidden or 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
<# | |
Meta | |
Date: 2022 March 28th | |
Updated: 2023 October 6th | |
Authors: Dray Agha (Twitter @purp1ew0lf), Dipo Rodipe (Twitter @dipotwb) | |
Company: Huntress Labs | |
Purpose: Automate setting up Sysmon and pulling Ippsec's sysmon IoC streamliner. Great for malware lab. | |
#> | |
################################################################################################################ |
This file contains hidden or 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
/* | |
* Research by Evan McBroom and Chris Thompson (@_Mayyhem) | |
* Roger Zander made security recommendations for SCCM based on the claim that NAA credentials could be recovered. | |
* Source: https://rzander.azurewebsites.net/network-access-accounts-are-evil/ | |
* Roger stated that recover was "possible with a few lines of code" but did not provide any code. Here is working code. | |
*/ | |
#include <Windows.h> | |
#include <stdio.h> |
This file contains hidden or 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 os | |
import argparse | |
from exchangelib import Credentials, Account, Configuration | |
from exchangelib.errors import ErrorNonExistentMailbox, UnauthorizedError | |
def args(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-c", "--creds", dest="creds", help="List of known valid user credentials in the format [email protected]:password", action='store', required=True) | |
parser.add_argument("-t", "--target", dest="target", help="Target Exchange server.", action='store', required=True) | |
args = parser.parse_args() |