mirror of
https://github.com/0xMarcio/PentestPilot.git
synced 2026-02-12 21:12:49 +00:00
Initial commit of PentestPilot — AI‑assisted pentest recon and orchestration toolkit.\n\nHighlights:\n- Resumeable pipelines (full_pipeline) with manifest state and elapsed timings\n- Rich dashboard (colors, severity bars, durations, compact/json modes)\n- Web helpers: httpx→nuclei auto, tech routing + quick scanners\n- Agents: multi‑task orchestrator (web/full/ad/notes/post) with resume\n- AD/SMB, password utils, shells, transfer, privesc, tunnels\n- QoL scripts: proxy toggle, cleanup, tmux init, URL extractor\n- Docs: README (Quick Start + Docs Index), HOWTO (deep guide), TOOLKIT (catalog with examples)\n\nStructure:\n- bin/automation: pipelines, dashboard, manifest, resume, tech_actions\n- bin/web: routing, scanners, helpers\n- bin/ai: orchestrators + robust AI utils\n- bin/ad, bin/passwords, bin/shells, bin/transfer, bin/privesc, bin/misc, bin/dns, bin/scan, bin/windows, bin/hashes\n- HOWTO.md and TOOLKIT.md cross‑linked with examples\n\nUse:\n- settarget <target>; agent full <domain|hosts.txt>; dashboard --compact\n- See HOWTO.md for setup, semantics, and examples.
39 lines
969 B
Bash
Executable File
39 lines
969 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
usage(){
|
|
echo "Usage: $(basename "$0") <ip> [user] [pass]" >&2
|
|
echo "- Tries to auto-detect base DN, then dumps common trees." >&2
|
|
exit 1
|
|
}
|
|
|
|
ip=${1:-${TARGET:-}}
|
|
user=${2:-}
|
|
pass=${3:-}
|
|
[[ -z "$ip" ]] && usage
|
|
|
|
bind_args=(-x)
|
|
if [[ -n "$user" ]]; then
|
|
bind_args=(-x -D "$user" -w "$pass")
|
|
fi
|
|
|
|
outdir=${OUTDIR:-scans}
|
|
mkdir -p "$outdir"
|
|
ts=$(date +%Y%m%d_%H%M%S)
|
|
base="$outdir/${ip//\//_}_ldap_${ts}"
|
|
|
|
echo "[+] Query namingContexts"
|
|
BASES=$(ldapsearch -H "ldap://$ip" "${bind_args[@]}" -s base -b "" namingContexts 2>/dev/null | awk '/^namingContexts:/{print $2}')
|
|
if [[ -z "$BASES" ]]; then
|
|
echo "[!] Could not determine base DNs. Try manual -b."
|
|
exit 1
|
|
fi
|
|
echo "$BASES" | tee "$base.bases.txt"
|
|
|
|
for b in $BASES; do
|
|
echo "[+] Dumping base: $b" | tee -a "$base.dump.txt"
|
|
ldapsearch -H "ldap://$ip" "${bind_args[@]}" -b "$b" '(objectClass=*)' 2>/dev/null | tee -a "$base.dump.txt"
|
|
done
|
|
echo "[+] Saved to $base.*"
|
|
|