Repository navigation
Fix Kerberos auth, target-file mounts, and DNS hangs in Docker run - #126
Merged
aconite33 merged 1 commit intoOct 13, 2026
Conversation
- 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>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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/workso relative target-list files resolve too, and pass throughKRB5CCNAME/krb5.confwhen present on the host. Still pulls the publishedblacklanternsecurity/manspiderimage by default; setMANSPIDER_LOCAL_BUILD=1to instead build and run from a local checkout.manspider.py: validate Kerberos ccache availability up front with a clear error instead of failing silently deep in impacket, and add-K/--ccacheto point at a specific ccache file directly (bypassessudostrippingKRB5CCNAME, and overrides any existingKRB5CCNAME).smb.py/util.py: addrun_with_timeout()and use it aroundSMBConnection()andkerberosLogin()— impacket's owntimeout=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.Test plan
file:445" bugs are fixedMANSPIDER_LOCAL_BUILD=1 ./manspider.sh --helpstill builds and runs correctly