Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for bug 8456 #2465

Merged
merged 1 commit into from Oct 9, 2013
Merged

fix for bug 8456 #2465

merged 1 commit into from Oct 9, 2013

Conversation

ZeroChaos-
Copy link
Contributor

On systems without bundled johntheripper (either by removing the bundled version or by no compatible version shipped) the system john is used. In this case, all of the checking for compatible bundled jtr makes no sense and as such we can shortcut out of this to not only reduce the size of msf (for embedded) but also to speed execution (saving multiple calls to some random bundled binary cpuinfo*.bin).

This patch makes it very easy to simply remove cpuinfo and msf will not try to run it when missing and default to running john from the path.

@kernelsmith
Copy link
Contributor

I don't see any issues with this change, but I haven't looked at any of the surrounding jtr code before

@todb-r7
Copy link

todb-r7 commented Oct 9, 2013

Just tested this on an ARMLE machine with and without the cpuinfo dir present, trying to trigger with info auxiliary/analyze/jtr_linux

and no errors are bugging the user.

@todb-r7
Copy link

todb-r7 commented Oct 9, 2013

Hmm, with the patch, using my contrived test, I'm still seeing

./msfconsole: No such file or directory - /home/todb/git/rapid7/metasploit-framework/data/cpuinfo/cpuinfo.ia64.bin

So, doesn't seem to solve on a x64 Linux platform when the bins are missing, but does solve when the whole cpuinfo dir is missing. Hmm let's see if we can't fix that.

@todb-r7
Copy link

todb-r7 commented Oct 9, 2013

As mentioned on IRC, the reason to be at least binary-specific is the case where someone's bonehead antivirus decides that that these binaries are evil and should be quarantined (and thus, leave the dir in tact).

@ZeroChaos-
Copy link
Contributor Author

your way fixes my issue as well as possible others, looks good

@todb-r7
Copy link

todb-r7 commented Oct 9, 2013

Tested a real jtr module run with the cpuinfo bins missing, and it correctly defaulted to a "run.linux.x86.any/john" binary, and with the cpuinfo bins in tact, the module used "run.linux.x64.mmx/john", also as expected.

Landing this.

todb-r7 pushed a commit that referenced this pull request Oct 9, 2013
@todb-r7 todb-r7 merged commit ce35841 into rapid7:master Oct 9, 2013
zeroSteiner pushed a commit to zeroSteiner/metasploit-framework that referenced this pull request Oct 30, 2013
This could be way more DRY. At least there's a YARD-ish comment.

This fixes up rapid7#2465
to be a more complete solution.

[SeeRM rapid7#8465]
@ZeroChaos- ZeroChaos- deleted the patch-1 branch March 17, 2014 02:19
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.

None yet

3 participants