Skip to content

Instantly share code, notes, and snippets.

Parameter Example Value Meaning Default Value
Query (objectclass=pKIEnrollmentService) Filter on objectclass attribute to query EnterpriseCA objects N/A - required argument
Attributes *,ntsecuritydescriptor Return all attributes and the nTSecurityDescriptor (allows BOFHound to parse ACLs) All attributes, but excluding nTSecurityDescriptor
Result Count 0 Return all results (non-zero value limits results returned) 0
Scope 3 Use subtree (deep) search. Lower values can be used to narrow the search scope 3
Domain Controller " Left unspecified to resort to default behavior Defaults to automatic DC resolution
Distinguished Name/Search Base CN=Configuration,DC=domain,DC=local Begin the query in the Configuration naming context The default domain context
LDAPS N/A Left unspecified for regular LDAP; set to 1 for LDAPS usage 0
@Tw1sm
Tw1sm / SituationalAwareness.py
Created October 22, 2024 22:16
Updated Havoc SituationalAwareness.py Snippet for ldapsearch BOF
# Need to link to blog
#
# Update param parsing func
#
def ldapsearch_parse_params( demon, params ):
packer = Packer()
num_params = len(params)
@Tw1sm
Tw1sm / decrypt_cookies.py
Last active February 25, 2025 18:41
Decrypt Slack/Chrome Cookies
import sqlite3
import sys
import json
from Crypto.Cipher import AES
from Crypto.Protocol.KDF import PBKDF2
kSalt = "saltysalt"
kDerivedKeySizeInBits = 128
kEncryptionIterations = 1003
kEncryptionVersionPrefix = "v10"