Troubleshooting
Common failure modes and debugging checklists
Common failure modes and debugging checklists.
Agent Not Calling Back
Symptoms: Implant deployed on target, no session appears in the operator console.
Checklist:
-
Server running?
# Check the server is listening ss -tlnp | grep 8443 -
Correct server IP and port?
- Check what was passed to
-s(server) and-p(port) in thebuildcommand or Web UI - If using a redirector: the agent’s server should point to the redirector, not the C2
- Check what was passed to
-
Redirector forwarding correctly?
# Test from the redirector host curl -k https://localhost:8443/api/poll/test # Should return 404 or a JSON error, not a connection refused -
Firewall blocking?
- Check the target’s outbound firewall: can it reach the redirector on port 443/8443?
- Check the C2’s inbound firewall: is port 8443 open to the redirector IP?
-
TLS certificate issues?
- Self-signed certs work (Schannel is configured to skip validation)
- But if using a redirector with nginx, make sure nginx has valid certs configured
-
Traffic profile mismatch?
- If the implant was built with
--profile slackbut the redirector isn’t configured for Slack URIs, the redirector will reject the requests - Verify the server’s active profile matches the implant’s
--profileand the redirector config
- If the implant was built with
-
Agent killed by EDR?
- Check if the process is still running on the target
- Try building without evasion flags first to isolate the issue
- Try the
--format serviceor--format dlldelivery method
-
DNS transport: NS records correct?
- Verify:
dig NS c2.example.com— should return your DNS server - Verify:
dig TXT test.c2.example.com @<YOUR_DNS_SERVER>— should get a response
- Verify:
BOF Crashes
Symptoms: Agent stops responding after running a specific BOF, or BOF returns no output.
Common causes:
-
Wrong arguments: Some BOFs require specific argument formats. Check the BOF Reference for usage.
-
Privilege insufficient: BOFs like
hashdump,nanodump,getsystem_tokenrequire admin/SYSTEM privileges. Check withwhoamifirst. -
Target process doesn’t exist: Injection BOFs (
createremotethread,steal_token) need a valid PID. Verify withpsfirst. -
BOF binary missing: The BOF
.ofile must be in thebofs/directory. Rebuild:cd bofs/ && ./build-bof.sh <bofname> -
Agent crashed: If the agent stops responding entirely, the BOF likely crashed the process. Redeploy the implant and avoid that BOF (or fix it).
Migration Failures
Symptoms: migrate command hangs or agent goes dark.
Debugging:
-
Target process alive? Check
psoutput for the target PID. -
Target process architecture? Must be x64. Migration to x86 (WoW64) processes will fail.
-
Protected process? Don’t migrate to
lsass.exe,csrss.exe,smss.exe, or other PPL-protected processes. -
Already migrated? Each migration creates a new agent. The old agent is still alive unless you
exitit. -
EDR blocked injection? Try a different injection technique:
# Rebuild with context hijack instead of default APC krait> build windows -s <IP> -p 8443 --context-hijack ...
Execute-Assembly Failures
Symptoms: execute-assembly returns no output or the agent hangs.
Checklist:
-
Assembly file exists? The path is resolved on the operator host, then uploaded to the agent.
-
.NET version: Krait hosts CLR v4 (supports .NET Framework 4.x assemblies). .NET Core/.NET 5+ assemblies won’t work.
-
Assembly arguments: Make sure arguments are passed correctly:
execute-assembly /opt/Seatbelt.exe -group=all -
Output capture: If using Bitdefender-safe mode (
execute-assembly-noeva), output capture usesAllocConsole+SetStdHandle. Some assemblies may not produce output if they write to a different stream. -
LoadLibrary proxy issues: If
--loadlib-proxyis enabled and the assembly loads an unusual DLL that the manual mapper can’t handle, the fallback to originalLdrLoadDllshould kick in. If the assembly still fails, rebuild without--loadlib-proxy.
TLS Handshake Issues
Symptoms: Agent connects but immediately disconnects, or connection resets.
-
Protocol mismatch: Krait uses TLS 1.2. If the server or redirector only accepts TLS 1.3, the handshake will fail.
-
SNI mismatch: If using nginx with
server_name, the implant must connect to a hostname that matches (not an IP). -
Certificate chain: Schannel skips certificate validation by default (
SCH_CRED_MANUAL_CRED_VALIDATION), so certificate issues shouldn’t cause failures. But nginx may require a complete certificate chain.
SOCKS Proxy Issues
Symptoms: SOCKS proxy starts but proxychains connections time out.
-
Port in use? Check if the SOCKS port is already bound:
ss -tlnp | grep 1080 -
Proxychains configured? Edit
/etc/proxychains4.conf:socks5 127.0.0.1 1080 -
Agent still alive? SOCKS traffic flows through the agent. If the agent sleeps, SOCKS pauses. Use a short interval when SOCKS is active.
-
Target reachable? The SOCKS proxy routes through the agent — the target must be reachable from the agent’s network position.
Server Startup Issues
-
Port already in use:
ss -tlnp | grep 8443 # Kill the existing process or use a different port -
BOFs directory not found:
[!] BOFs directory not found: bofs/Make sure you’re running from the release directory root where the
bofs/folder exists.
CLI Connection Issues
-
Server not reachable:
[!] Cannot connect to 127.0.0.1:50051Check that the server is running and the API port is correct.
-
Authentication failed:
[!] Authentication failedCheck the username and password. Operator accounts are in
operator/operators.json. -
No operators configured: If
operators.jsondoesn’t exist or is empty, the server runs in legacy single-operator mode (no auth). Create accounts with./server/krait-server operator add <name>.
Slack Transport Issues
Symptoms: Agent deployed with --transport slack, no session appears.
-
Server started with Slack flags? The server must have
--slack-token,--slack-channel, and--slack-pskto start the Slack poller. Check for[+] Slack channel pollerin server output. -
Bot in the channel? The Slack app bot must be invited to the channel:
/invite @YourBotName. -
Bot token scopes? The app needs
chat:write,channels:history, andchannels:read. Missing scopes cause silent API failures. -
Channel ID correct? Use the channel ID (
C...), not the channel name. Right-click the channel → View channel details → copy the ID at the bottom. -
PSK mismatch? The agent and server must use the same
--slack-pskvalue. A mismatch causes the server to reject registration with[!] Slack: rejected unauthenticated registration. -
Rate limited? Slack’s Tier 1 rate limit is ~1 request/second. With a 15-second poll interval this shouldn’t be an issue, but many agents in the same channel can trigger rate limits.
-
Large payload rejected? Payloads over 75KB are rejected by the server. The rejection message appears in the operator console. Use HTTPS-linked agents for
execute-assemblyand large file transfers.
GitHub Transport Issues
Symptoms: Agent deployed with --transport github, no session appears.
-
Server started with GitHub flags? The server must have
--github-token,--github-repo, and--github-pskto start the GitHub poller. Check for[+] GitHub channel pollerin server output. -
Repo exists and is accessible? The PAT must have access to the repository. Test:
curl -s -H "Authorization: token ghp_..." \ https://api.github.com/repos/owner/repo | jq .full_name -
PAT permissions? The token needs Contents: Read and write permission. A classic PAT needs
reposcope. -
PSK mismatch? Same as Slack — the agent and server must share the same
--github-psk. Mismatch causes rejected registration in the server log. -
Rate limit exhausted? GitHub allows 5,000 requests/hour per PAT. Check:
curl -s -H "Authorization: token ghp_..." \ https://api.github.com/rate_limit | jq .rateThe
remainingfield shows available requests. If 0, wait for theresettimestamp. -
Branch mismatch? The agent and server must target the same branch (
--github-branch). Default ismain. If the repo was created with amasterdefault branch, pass--github-branch masterto both. -
Repo not empty enough? The repo should be initialized (at least one commit). If the repo is completely empty (no commits), the Contents API returns 404 for directory listings. Push an initial empty commit or create a README.
-
Large payload rejected? Same as Slack — 75KB limit. Use HTTPS-linked agents for execute-assembly.
Debugging Tips
- Event log: The
logcommand shows timestamped events including registrations, task dispatches, results, and errors. Start here. - Timeline: The
timelinecommand shows events in chronological order — useful for correlating agent behavior with operator actions. - Results: The
resultscommand shows raw task output. If a BOF returned data but the console didn’t display it, check results directly. - Verbose server: Run the server in foreground (not as a systemd service) to see Python tracebacks and debug output.