Skip to content

Fix Kerberos auth, target-file mounts, and DNS hangs in Docker run - #127

Merged
aconite33 merged 1 commit into
blacklanternsecurity:feature/classification-dfs-certs-jsonfrom
Sw3d1shPh1sh:fix/kerberos-docker-mounts-and-timeouts
Oct 13, 2026
Merged

aconite33 merged 1 commit into
blacklanternsecurity:feature/classification-dfs-certs-jsonfrom
Sw3d1shPh1sh:fix/kerberos-docker-mounts-and-timeouts

Conversation

@aconite33

Copy link
Copy Markdown
Contributor

Retargets the changes from #126 onto feature/classification-dfs-certs-json instead of master.

#126 was merged into master by mistake and has since been backed out there (revert commit 671ff72). This PR brings the same fix onto the feature branch, where it was intended to land. Same head branch and commit (ab4aa08) — no changes to the original work.

Original work by @Sw3d1shPh1sh.

What it does

  • Kerberos: adds -K/--ccache to point directly at a ccache file (sets KRB5CCNAME for the run), with clearer error messages and validation of file-backed caches (leaving KEYRING:/DIR:/MEMORY:/API: types to krb5).
  • Docker run wrapper: fixes target-file mounts and DNS hangs.

Merges cleanly into the feature branch (verified).

- manspider.sh: mount the invoking user's real home directory read-only
  so absolute target-file and ccache paths resolve inside the container,
  mount cwd at /work so relative target-list files resolve too, and pass
  through KRB5CCNAME/krb5.conf when present on the host. Still pulls the
  published blacklanternsecurity/manspider image by default; set
  MANSPIDER_LOCAL_BUILD=1 to instead build and run from this checkout's
  source (e.g. when testing local patches before they're released).
- manspider.py: validate Kerberos ccache availability up front with a
  clear error instead of failing silently deep in impacket, and add
  -K/--ccache to point at a specific ccache file directly (bypasses
  sudo stripping KRB5CCNAME, and overrides any existing KRB5CCNAME).
- smb.py/util.py: add run_with_timeout() and use it around
  SMBConnection() and kerberosLogin() -- impacket's own timeout= kwarg
  only bounds the TCP connect/recv phase, not DNS resolution
  (socket.getaddrinfo()), so an unreachable/garbage target could hang
  for minutes with no indication anything was wrong. Also stop
  re-attempting Kerberos on the guest/null session fallback, and warn
  (rather than silently swallow) when a target-list file can't be
  opened.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aconite33
aconite33 merged commit b80a9da into blacklanternsecurity:feature/classification-dfs-certs-json Oct 13, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants