Repository navigation
ENG-8819 fix(network-ops): collect cracked passwords on time-boxed/partial hashcat and john runs - #174
Merged
Conversation
…hcat and john runs (ENG-8819) hashcat and john recover passwords into a potfile as they run, and the tools returned that via a second `--show` step. But the crack step ran through the platform execute() helper, which raises on any non-zero exit, so the function aborted before `--show` — discarding every password hashcat actually recovered on the normal time-boxed path. Classify the crack step's outcome instead of failing on all of them: - hashcat: tolerate the exit codes that mean "ran then stopped" (1 exhausted, 2/3 aborted, 4 halted by --runtime — confirmed against current Kali hashcat) and a timeout kill, then always read results via `--show`. A no-backend error keeps its actionable "use john_the_ripper" message; any other failure (255, negative, or no parseable exit code) is re-raised so an empty result never masks a broken invocation. - john: tolerate the run timeout (its only time box) and collect via `--show`; a non-zero john exit is a genuine failure and surfaces. Adds tests covering partial/exhausted/runtime/timeout recovery and the genuine-failure-surfaces paths for both tools. Bumps network-ops to 2.1.9.
danielvaughn
approved these changes
Oct 14, 2026
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
hashcatandjohn_the_ripperinnetwork-ops/tools/cracking.pyrecover passwords into a potfile as they run and return them via a second--showstep. But the crack step runs through the platformexecute()helper, which raises on any non-zero exit — so on the normal time-boxed path (hashcat exits non-zero when the keyspace is exhausted or the--runtimebox fires) the function aborted before--showever ran, and every password hashcat had actually recovered was discarded while the operator saw a command failure.This classifies the crack step's outcome instead of treating all non-zero exits as failure.
Changes
1(exhausted),2/3(aborted),4(halted by--runtime) — plus a timeout kill, then always collect results via--show. A missing compute backend keeps its actionable "usejohn_the_ripper" message. Any other failure (255, negative, or an error with no parseable exit code) is re-raised, so an empty--showresult can never be mistaken for "nothing cracked".--show; a non-zero john exit is a genuine failure and surfaces.network-opsbumped to2.1.9.Notes
execute()'s failure text; if that text ever lacks a parseable code the error is treated as genuine and re-raised (fails toward surfacing, not swallowing).kalilinux/kali-rolling:latest(the sandbox base image): exhausted1,--runtime4, malformed hash255,--show0. The ticket's assumption of2for--runtimeis actually4on current hashcat — hence tolerating the whole1–4"ran then stopped" range rather than pinning one code against an unpinned rolling image.