LDAP filter obfuscation tool
Project description
nebbia
LDAP filter obfuscation tool.
Analyze the filter using Abstract Syntax Tree, applies structural transformation and return an equivalent query.
Useful for sneaky query to the Domain Controller or edit tools that queries against the domain (like Certipy).
Installation
pip install nebbia
dev:
git clone https://github.com/Fasertio/nebbia
cd nebbia
pip install -e ".[dev]"
Library usage
from nebbia import obfuscate, parse, serialize
query = "(&(objectClass=person)(uid=jdoe)(!(locked=true)))"
result = obfuscate(query)
print(result)
# es: (&((!(!(\75Id=\6A\64\6F\65))))(oBjEcTcLaSs=\70\65\72son)(!(loCkeD=true)))
r1 = obfuscate(query, seed=42)
r2 = obfuscate(query, seed=42)
assert r1 == r2
from nebbia import parse, serialize, NodeType
ast = parse("(sAMAccountName=krbtgt)")
print(ast)
# ASTNode(FILTER, 'sAMAccountName'='krbtgt')
ast.value = "administrator"
print(serialize(ast))
# (sAMAccountName=administrator)
CLI
#single query
nebbia "(uid=jdoe)"
#multiple
nebbia "(&(uid=admin)(objectClass=person))" --count 3
#deterministic output
nebbia "(cn=krbtgt)" --seed 42
#disable ANSI color
nebbia "(uid=test)" --no-color
#stdin
echo "(uid=admin)" | nebbia
#python module
python -m nebbia "(uid=jdoe)" --count 2
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nebbia-1.1.4.tar.gz.
File metadata
- Download URL: nebbia-1.1.4.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c1519cb4abb256b94842008435c6ef381205f51e38476ec2d4ed127eb568f3a
|
|
| MD5 |
d9911410fb9ed41e529cba8def4cfe7f
|
|
| BLAKE2b-256 |
5a13645b8c4f3a1e3bc5b1b12d35c655893a6e29a09b3cbefd9aefbc03331c24
|
Provenance
The following attestation bundles were made for nebbia-1.1.4.tar.gz:
Publisher:
workflow.yml on Fasertio/nebbia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nebbia-1.1.4.tar.gz -
Subject digest:
4c1519cb4abb256b94842008435c6ef381205f51e38476ec2d4ed127eb568f3a - Sigstore transparency entry: 1793849908
- Sigstore integration time:
-
Permalink:
Fasertio/nebbia@2cba88f4b40c555b2a2fd4746e7d685ed87a19aa -
Branch / Tag:
refs/tags/v1.1.4 - Owner: https://github.com/Fasertio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@2cba88f4b40c555b2a2fd4746e7d685ed87a19aa -
Trigger Event:
push
-
Statement type:
File details
Details for the file nebbia-1.1.4-py3-none-any.whl.
File metadata
- Download URL: nebbia-1.1.4-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42b6fd7564e32fe22506a141a0f7972da216f90fd626ebad0aeac12038cd29af
|
|
| MD5 |
e0a4040aad215e0b0071c39a2788ef11
|
|
| BLAKE2b-256 |
1eb83fa7a02ff1e81eae28309476d6dc0de11f39ffe63930aebd0229c8e4bb7d
|
Provenance
The following attestation bundles were made for nebbia-1.1.4-py3-none-any.whl:
Publisher:
workflow.yml on Fasertio/nebbia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nebbia-1.1.4-py3-none-any.whl -
Subject digest:
42b6fd7564e32fe22506a141a0f7972da216f90fd626ebad0aeac12038cd29af - Sigstore transparency entry: 1793850032
- Sigstore integration time:
-
Permalink:
Fasertio/nebbia@2cba88f4b40c555b2a2fd4746e7d685ed87a19aa -
Branch / Tag:
refs/tags/v1.1.4 - Owner: https://github.com/Fasertio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@2cba88f4b40c555b2a2fd4746e7d685ed87a19aa -
Trigger Event:
push
-
Statement type: