--- john-1.7.orig/debian/changelog +++ john-1.7/debian/changelog @@ -0,0 +1,592 @@ +john (1.7-30ubuntu1) intrepid; urgency=low + + * New upstream release. + + * debian/control + - update to Standards-Version 3.8.0 with changes to the homepage field. + + + -- Bhavani Shankar Mon, 28 Jul 2008 13:53:13 +0530 + +john (1.6-40.3ubuntu1) hardy; urgency=low + + * Merge from Debian; remaining changes: + - Build for lpia as done for i386. + + -- Matthias Klose Tue, 29 Jan 2008 15:07:00 +0100 + +john (1.6-40.3) unstable; urgency=low + + * Non-maintainer upload. + * Fixed build failure on !(i386 || alpha). Revert to the state of version + 1.6-40.1, and used Ubuntu's sysconf-based patch instead of Thiemo's + CLOCKS_PER_SEC patch. Closes: #460697. + * Add debian/patches/mips.diff: patch from Thiemo Seufer to fix FTBFS on + mips and mipsel. Closes: #415738. + + -- Lucas Nussbaum Mon, 14 Jan 2008 20:00:36 +0100 + +john (1.6-40.2) unstable; urgency=low + + * Non-maintainer upload. + * Applied patch from Thiemo Seufer to replace CLK_TCK by CLOCKS_PER_SEC. + Fixes FTBFS (Closes: #420980). + + -- Lucas Nussbaum Sat, 12 Jan 2008 22:11:08 +0100 + +john (1.6-40.1ubuntu2) gutsy; urgency=low + + * Build for lpia as done for i386. + + -- Matthias Klose Fri, 10 Aug 2007 20:54:38 +0000 + +john (1.6-40.1ubuntu1) gutsy; urgency=low + + * Merge from debian unstable, remaining changes: + - debian/patches/20_sysconf_clk_tck.patch: fix FTBFS + + -- Kees Cook Tue, 08 May 2007 03:37:44 -0700 + +john (1.6-40.1) unstable; urgency=high + + * Non-maintainer upload. + * High-urgency for RC bugfix. + * The following bug fixes are mostly cherry-picked from an omnibus patch + by Justin Pryzby : + * Complete rewrite of maintainer scripts to neither remove nor edit + conffiles (Closes: #375850) + - the debconf settings are not necessary for package operation, + so just don't use debconf, and remove debconf-related files from + debian directory (incidentally closes: #412797) + - preserves settings in preinst, rather than moving conffiles to + foo.old + - do the conffile relocation in preinst (not postinst, which + inhibits dpkg diffs when they should be displayed) + - the cronjob in /etc/cron.d does nothing if the executable isn't + +x, so doesn't need to be commented out on uninstallation + - minor edits to debian/README to reflect these changes + * Set /var/run/john to mode 0700 in postinst configure unless a + dpkg-statoverride exists (Closes: #403855) + * On uninstallation, remove restore file from /var/lib, not /usr/share; + and do so in postrm remove, not prerm remove. On upgrade, if restore + file exists in /usr/share but not in /var/lib, move it in postinst. + + -- Kevin B. McCarty Wed, 14 Mar 2007 17:06:16 -0400 + +john (1.6-40ubuntu2) edgy; urgency=low + + * Add 'debian/patches/20_sysconf_clk_tck.patch' to fix FTBFS + (Closes Ubuntu #65831). + + -- Kees Cook Fri, 13 Oct 2006 09:34:11 -0700 + +john (1.6-40ubuntu1) edgy; urgency=low + + * Merge from debian unstable. + + -- Daniel T Chen Wed, 28 Jun 2006 05:28:44 +0100 + +john (1.6-40) unstable; urgency=low + + * debian/control: updated my e-mail address. + + * debian/preinst, debian/postinst, debian/postrm: + - reorganized the code + - added debhelper token + * debian/postrm: + - changed interpreter to /bin/sh + * debian/prerm: + - always remove temporary file. (Closes: #350423) + + -- Guilherme de S. Pastore Tue, 18 Apr 2006 23:40:20 -0300 + +john (1.6-39ubuntu1) dapper; urgency=low + + * Create the /var/run/john directory in the crontab if necessary. + + -- Scott James Remnant Wed, 19 Apr 2006 14:31:54 +0100 + +john (1.6-39) unstable; urgency=low + + * debian/man/john.8: + - escape the apostrophe at the beginning of like 139. + * debian/extra/mailer: + - fixed configuration file parser in order to, among other things, + appropriately ignore comments (Closes: #340902) + + -- Guilherme de S. Pastore Thu, 29 Dec 2005 10:21:25 -0200 + +john (1.6-38) unstable; urgency=low + + * debian/control: + - update to Standards-Version 3.6.2.1 with no changes + * debian/patches: + - faq.diff, makefile.diff, system-wide.diff: transformed changes made to + the source tree directly and stored in the .diff.gz file into patches, + so it's possible to maintain the package in an SVN repository + * debian/postinst: + - modify indentation + - remove $tmp if $cronfile doesn't exist (Closes: #332488) + * Updated Swedish debconf templates translation; thanks to + Daniel Nylander (Closes: #334883) + + -- Guilherme de S. Pastore Fri, 11 Nov 2005 22:39:25 -0200 + +john (1.6-37) unstable; urgency=medium + + * debian/control: + - updated maintainer's e-mail address + * debian/config, debian/postrm, debian/preinst: + - Removed bashisms + * debian/man/john.8: + - fixed typo, thanks to A Costa (Closes: #325683) + * debian/extra/john: + - remove the /proc existence check, which will make the script + simply fall back to john-any if MMX can't be checked for + * debian/copyright: + - cosmetic fixes + - updated FSF's address + + -- Guilherme de S. Pastore Fri, 12 Aug 2005 17:36:04 -0300 + +john (1.6-36) unstable; urgency=medium + + * debian/control: + - added debconf-2.0 as alternative to debconf dependency + * debian/extra/john: + - run john-{any,mmx} with the same we've been given, so it + works with unshadow and friends (Closes: #322442) + * debian/rules: + - install john.conf with the right permissions + - append to binary-install/john instead of binary-post-install/john + + -- Guilherme de S. Pastore Thu, 4 Aug 2005 14:11:07 -0300 + +john (1.6-35) unstable; urgency=low + + * Moved john-any and john-mmx to /usr/lib/john on i386, as the user + is not supposed (and won't be able) to run them directly + * Fix stupid usage of debian/john.install that broke a couple of things + in -34 (not uploaded to Debian, at least) + * debian/extra/john-mail.conf: + - Make it clear(er) that one shouldn't put the path to the system + password file in the passfile directive (Closes: #296766) + + -- Guilherme de S. Pastore Sat, 30 Jul 2005 12:20:02 -0300 + +john (1.6-34) unstable; urgency=low + + * debian/control: + - Rewrote both short and long description + - Updated Standards-Version to 3.6.2 with no changes + - Christian Kurz is really MIA, as he stated he would be. Removed + him from Uploaders. Thanks for the great work! + * debian/docs: + - Move installation of doc/NEWS to john.install, so we don't have to + manually rename it in debian/rules + * debian/examples: + - Removed run/john.ini from the list, it's the configuration file + * debian/po: + - de.po, es.po: unfuzzied header + - pt_BR.po: converted from ISO-8859-1 to UTF-8 + - vi.po: added Vietnamese translation from Clytie Siddall (Closes: #314258) + * debian/rules: + - General cleanups + - Don't strip files manually: dh_strip handles this + - Moved manpages installation to debian/john.manpages + - Don't include cdbs's buildcore.mk: it's included by debhelper.mk + - Properly use dpkg-architecture instead of dpkg --print-architecture + - Added /var/run/john to DEB_FIXPERMS_EXCLUDE: the location needs to + be safe from normal user reading + - Symlinks are now handled within debian/john.links, and always point + to /usr/sbin/john, as the script should handle non-MMX machines + * debian/README.wordlists: + - Rewritten from scratch for better language + - Removed references to non-free costly word lists + + -- Guilherme de S. Pastore Mon, 18 Jul 2005 13:27:24 -0300 + +john (1.6-33) unstable; urgency=medium + + * Fixed cronjob so that it doesn't send empty e-mails when no + password is cracked (Closes: #272065) + * Debconf templates: + - Updated Czech translation from Miroslav Kure (Closes: #273839) + - Updated Brazilian Portuguese translation from Tiago Vaz (Closes: #272432) + + -- Guilherme de S. Pastore Fri, 19 Nov 2004 21:09:15 -0200 + +john (1.6-32) unstable; urgency=medium + + * Fix "errors" displayed to user during purge (Closes: #268938) + * Debconf templates: + - Added Turkish translation from Recai Oktas (Closes: #269518) + - Updated Japanese translation from Hideki Yamane (Closes: #269530) + - Updated Dutch translation from Frans Pop (Closes: #269825) + - Updated German translation from Florian Ernst (Closes: #271299) + - Updated French translation from Frédéric Zulian (Closes: 271433, 271440) + [ Javier Fernandez-Sanguino ] + * The cronjob will now echo the output of the mailer script so that + root gets a mail about easy passwords like it previously did + + -- Guilherme de S. Pastore Sun, 12 Sep 2004 19:43:23 -0300 + +john (1.6-31) unstable; urgency=low + + * Added versioned dependency on dpkg >= 1.10.16, to have correct version + of start-stop-daemon and not wipe out system's /etc/shadow + (Closes: #266737) + + -- Guilherme de S. Pastore Wed, 18 Aug 2004 22:56:17 -0300 + +john (1.6-30) unstable; urgency=low + + * Rewrote debconf templates (Closes: #259299) + - Added Danish translation from Claus Hindsgaul + - Added Russian translation from Yuri Kozlov + * Fixed handling of warning of "No configuration file" when upgrading + from a version that used the old path, /etc/john.ini (Closes: #259320) + [ Javier Fernandez-Sanguino ] + * Updated Spanish translation of debconf templates + - Revision by Rudy Godoy + * debian/extra/cronjob: + - Remove all comments before grepping and only use the first definition. + Supposedly closes: #262316 + + -- Guilherme de S. Pastore Wed, 14 Jul 2004 06:31:47 -0300 + +john (1.6-29) unstable; urgency=high + + * debian/extra/cronjob: + - Installed again with execution permitions (+x) (Closes: #259084) + * Fixes related to configuration files move from /etc to /etc/john: + - debian/man/john.8 + - debian/extra/mailer (Closes: #259085) + - Debconf template and pt_BR translation + [ Javier Fernandez-Sanguino ] + * Minor typo fixes in the templates as suggested by Nicolas François in + #259191 + * Unfuzzied spanish translations after revision. + * Added missing entries of previous version to the changelog + * Remove files under /var/run/john and /etc/john on purge + + -- Guilherme de S. Pastore Mon, 12 Jul 2004 21:03:47 -0300 + +john (1.6-28) unstable; urgency=medium + + * Ported debian/rules to use CDBS + - Removed debian/conffiles, debhelper handles this + - Uses debian/dirs and others instead of polluting debian/rules + - Made cleanups and removed things that remained there from older + releases, such as unnecessary directories + * Bumped Standards-Version to 3.6.1.1 + * Moved manpages to section 8 (Closes: #252206) + - Fixed problems (Closes: #252506) + * Re-added sparc support with generic target (Closes: #220928) + * Added real alternative to suggestion on wordlist + * Removed lintian/linda overrides, don't need them anymore + * Moved configuration files to /etc/john/ (Closes: #141741, #229597) + * Only check for configuration file in config if it's an upgrade + (Closes: #251227, #253194) + * Added patch from Goswin von Brederlow to avoid segfaults when + casting signed char to unsigned int on amd64 (Closes: #251095) + * Added clarification to the manpage about having to run john with + -show from the same directory where the password was cracked, so + that it works (Closes: #228750) + [ Javier Fernandez-Sanguino ] + * Build on all architectures Debian supports, using the 'generic' + target for the ones not supported by john (Closes: #138689, #224883) + * Major rewrite of the cronjob which will now work as follows: + - Mailer uses the latest password file to avoid mailing users warning + about passwords if they have changed it (Closes: #251172) + - Stale files are now removed under some circunstances (so /var/run/john + does not fill up with cronpasswd files) + - John is started/stopped using start-stop-daemon which makes it + write the pid file properly (unlike previously). Also, + the start-stop-daemon usage makes it possible to run john as a + non-root user (if everything is 'chowned' to him). + - This new cronjob will now restore interrupted sessions correctly + (and uses the john.rec files) (Closes: #213164) + + -- Guilherme de S. Pastore Thu, 27 May 2004 18:14:28 -0300 + +john (1.6-27) unstable; urgency=low + + * New maintainer + * Bumped Standards-Version to 3.6.1.0 + * Removed Origin: field from debian/control + * Corrected typo on debian/man/mailer.1 (Closes: #249574) + * Added Czech translation provided by Miroslav Kure (Closes: #244363) + * Dropped Sparc support so that bug fixes can progress into testing. + This will remain until there is a proper fix for this issue. + [ Javier Fernandez-Sanguino ] + * Updated debian/po/fr.po with patch provided by Christian Perrier (merged + manually the changes since they are not using the latest version) + (Closes #229624) + * Updated the Spanish translation (debian/po/es.po) + * Added the ldap-extract script provided by Klaus Ethgen to the examples + (Closes: #226980) + * Nice John's cron job per default (nobody rejected this and seems + a reasonable request since john should be able to recover nicely) + (Closes: #228799) + * Fixed PID loop in the cronjob (Closes: #227323) + [ Christian Kurz] + * Updated debian/po/pt_BR.po with patch provided by Andre Luis Lopes + (Closes: #228122) + * Updated debian/po/ja.po with a patch provided by Hideki Yamane + (Closes: #235647) + * Updated debian/po/de.po with a patch provided by Florian Ernst + (Closes: #244524) + + -- Guilherme de S. Pastore Mon, 17 May 2004 22:39:21 -0300 + +john (1.6-26) unstable; urgency=medium + + * The "I should not forget to dupload stuff" Release. + [ Javier Fernandez-Sanguino ] + * Created a new template, and modified the config so it checks + whether john.ini exists or not (Closes: #226897) + * The default john.ini file is now included as an example (so the user can + use it for restoration of the config file) + * Added a proper charset to the de.po file. + * Updated the spanish po file. + [ Christian Kurz ] + * Updated debian/po/fr.po with patch provided by Christian Perrier (Closes: #227024) + + -- Javier Fernandez-Sanguino Pen~a Mon, 12 Jan 2004 20:29:35 +0100 + +john (1.6-25) unstable; urgency=low + + * The "I still have to submit the code to alioth... Merry Xmas!" Release + * Added debconf loading to prerm script, thanks to Bastian Kleineidam + (Closes: #224160) + * Removed debbugs call in debian/control (Closes: #220069) + * Added japanese translation provided by Hideki Yamane (Closes: #224182) + * Removed lintian/override creation from debian/rules (Closes: #223374) + + -- Javier Fernandez-Sanguino Pen~a Fri, 26 Dec 2003 14:22:11 +0100 + +john (1.6-24) unstable; urgency=low + + * When upgrading, do not ask to enable the cronjob if the user has + not chosen to replace it. + + -- Javier Fernandez-Sanguino Pen~a Mon, 17 Nov 2003 01:05:47 +0100 + +john (1.6-23) unstable; urgency=low + + * Fixed the cronjob in order to avoid mails with just + "Usage: /usr/sbin/mailer PASSWORD-FILE" since it seems that under + some circumstances the restoration of jobs does not work properly. + Also added usage line. + * Modified prerm script in order to deinstall the cronjob if the + user is removing the package and has enabled the cronjob (Closes: #220845) + * Also modified the cron.d file to only run the cronjob if the file + exists and is executable. + + -- Javier Fernandez-Sanguino Pen~a Fri, 14 Nov 2003 01:34:22 +0100 + +john (1.6-22) unstable; urgency=low + + * Really fixed src/Makefile (I should have noticed that sparc.h was + not being created) since it still fails to build in sparc. + + -- Javier Fernandez-Sanguino Pen~a Wed, 12 Nov 2003 17:36:35 +0100 + +john (1.6-21) unstable; urgency=low + + * Modified src/Makefile in an attempt to fix the sparc build (broken since + 1.6-19) + + -- Javier Fernandez-Sanguino Pen~a Wed, 12 Nov 2003 11:15:04 +0100 + +john (1.6-20) unstable; urgency=low + + * New co-maintainer (myself) in an attempt to offload Christian + of some of work in this package. + * Fixed typos in debian/rules (Closes: #220013, #213154) + * Included some more information in the description as well as the + upstream location (Closes: #220008) + * Added template in order to allow for configuration of wordlists + by the user, as well as a README.wordlist document + (Closes: #159488, #123837, #220015) + * Recovered configuration note regarding cron jobs so john will now + properly enable/disable it if asked to (Closes: #220021) + * Included Spanish debconf translation (Closes: #220011) + * Recovered German translation of the cronjob and added a de.po file. + * Added Dutch debconf translation provided by Philippe Faes + (Closes: #211349) + * Added French debconf translation provided by Frederic Zulian + (Closes: #211540) + * Added author's name and updated email address in copyright. + * Creation of /var/run/john/ in order to use this location + for the temporary file in john-mail.conf (this is mode 0700 so that + even if the passwords are stored there the impact is reduced) + + -- Javier Fernandez-Sanguino Pen~a Mon, 10 Nov 2003 22:01:00 +0100 + +john (1.6-19) unstable; urgency=low + + * This release wouldn't have been possible without the help from Jeronimo + Pellegrini and Gergely Nagy. Both were a great help for me and so it's + only fair to credit them here and say a big "THANK YOU"! + * john will create now the files john.pot, john.ini and restore in the + directory where it was started from. + * Changed the unshadow.1 manpage as suggested by Colin Watson. This means + that one occurance of .br was replaced by .PP and an newline was added. + This will address the issue of the slightly broken unshadow manpage, + that has been reported as bug #142848. + * The manpage john.1 won't mention the non-existing john-ini.5 anymore. This + is going to fix the bug #122438. + * Integrated two patches from Jeronimo Pellegrini that are going to improve + the cronjob. Also thanks to Gergely Nagy for his help with devising and + developing the patches. This should address bug #162991. + * Also the whole setup and behaviour of the cronjob has been modified. This + should also fix the bug #118012 since the code has been changed. + * Updated the URL pointer in the FAQ. This should fix the bug report + #159580. + * Changed the wrong comment in the file /etc/john-mail.conf. This will fix + the bug #162599. + * Fixed the location of password.lst and the location of the files for the + incremental mode in /etc/john.ini. This will fix the bugreport #79831. + * Reworked support for translation of debconf messages. Now this package is + using po-debconf for this purpose. + + -- Christian Kurz Wed, 11 Dec 2002 22:17:09 +0100 + +john (1.6-18) unstable; urgency=low + + * Applied a patch from Jeronimo Pellegrini to remove the reference + to the unexisting john.ini(5) manpage. (Closes: #122438) + * Applied a fix from Ben Okopnik to the unshadow manpage. + (Closes: #142848) + + -- Christian Kurz Sun, 14 Apr 2002 23:33:09 +0200 + +john (1.6-17) unstable; urgency=low + + * Rewording of comments in config file. (Closes: #115556) + (Thanks to Martin F Krafft) + * Included hack to remove cronjob if needed. (Closes: #114835,#117034) + + -- Christian Kurz Sun, 14 Oct 2001 20:14:42 +0200 + +john (1.6-16) unstable; urgency=low + + * Integrated patch from Damyan Ivanov to fix unquoted sed + expressions. (Closes: #113557) + + -- Christian Kurz Wed, 26 Sep 2001 12:57:53 +0200 + +john (1.6-15) unstable; urgency=low + + * Fixed typo in debconf templates. (Closes: #112058,#113166) + * Should fix another problem with the lock-file. (Closes: #113332) + + -- Christian Kurz Wed, 12 Sep 2001 16:08:30 +0200 + +john (1.6-14) unstable; urgency=low + + * Added german debconf translation from Sebastian Feltel. + (Closes: #109980) + * Fixed two typos in the john.1 manpage, noted by Stephen Frost. + * Applied patch from Daniel Kobras to fix two oversights in the + cronjob script. (Closes: #110272) + * Applied patch from Jeronimo Pellegrini to fix some small problems + in the scripts. (Closes: #110957) + + -- Christian Kurz Sat, 25 Aug 2001 09:09:18 +0200 + +john (1.6-13) unstable; urgency=low + + * We'll gzip the example file, which is about 12k. But the other files + which are just 2-6k will be stay uncompressed, until some very good + reasons are presented to convince me. (Closes: #96650) + * Integration of Patch from Jeronimo Pellegrini to support the + installation and deinstallation of a cronjob. (Closes: #101970) + + -- Christian Kurz Thu, 12 Jul 2001 22:55:09 +0200 + +john (1.6-12) unstable; urgency=low + + * Now we finally added manpages for john which have been written by + Jordi Mallach and Jeronimo Pellegrini. (Closes: #62498) + * Applied a patch from Jeronimo Pellegrini to make the mailer script + more configurable. (Closes: #101968) + + -- Christian Kurz Sun, 20 May 2001 10:18:56 +0200 + +john (1.6-11) unstable; urgency=low + + * Fixed Symlinks for $ARCHITECURE != i386. (Closes: #92280) + + -- Christian Kurz Sat, 31 Mar 2001 18:34:42 +0200 + +john (1.6-10) unstable; urgency=low + + * Fixed the symlinks, since we didn't notice that we broke them with + the 1.6-8 release. Now, it should work fine again. (Closes: #91824) + + -- Christian Kurz Wed, 28 Mar 2001 08:22:18 +0200 + +john (1.6-9) unstable; urgency=low + + * Fixed the name of the override file for john and also it' + location. (Closes: #81218) + + -- Christian Kurz Sun, 25 Mar 2001 00:30:33 +0100 + +john (1.6-8) unstable; urgency=low + + * Fixed the startup script for john to correctly use bash. + + -- Christian Kurz Thu, 1 Mar 2001 20:00:13 +0100 + +john (1.6-7) unstable; urgency=low + + * Fixed a typo to build john also on Alpha (Closes: #83696) + + -- Christian Kurz Sat, 27 Jan 2001 09:13:13 +0100 + +john (1.6-6) unstable; urgency=low + + * Added sparc-fix from Solar Designer (Closes: #81756). + * Changed rules file to build two different versions of john, one with + mmx extensions, and one without. + * Added wrapper script to start john. + + -- Christian Kurz Fri, 12 Jan 2001 22:31:05 +0100 + +john (1.6-5) unstable; urgency=low + + * Moved overrides file to correct location (Closes: 81218). + * Added 3 lines to overrides file for the symlinks. + + -- Christian Kurz Thu, 4 Jan 2001 20:51:32 +0100 + +john (1.6-4) unstable; urgency=low + + * Hopefully I fixed now the logfile-path-bug. + + -- Christian Kurz Fri, 8 Dec 2000 22:26:26 +0100 + +john (1.6-3) unstable; urgency=low + + * Fixed pre-rm to allow removal of package (Closes: 74091). + + -- Christian Kurz Thu, 5 Oct 2000 21:55:51 +0200 + +john (1.6-2) unstable; urgency=low + + * Changed debian/rules to be faster and more portable. + * Fixed prerm-script to run only on purges. + * Fixed some pathes to better defaults. + + -- Christian Kurz Mon, 15 May 2000 19:37:07 +0200 + +john (1.6-1) unstable; urgency=low + + * First Debian release. + + -- Christian Kurz Sat, 1 Apr 2000 12:23:57 +0200 + --- john-1.7.orig/debian/man/mailer.8 +++ john-1.7/debian/man/mailer.8 @@ -0,0 +1,44 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" +.\" mailer.8 is copyright 1999-2001 by +.\" Jordi Mallach +.\" This is free documentation, see the latest version of the GNU General +.\" Public License for copying conditions. There is NO warranty. +.TH MAILER 8 "June 03, 2004" john +.\" Please adjust this date whenever revising the manpage. +.SH NAME +mailer \- script to warn users about their weak passwords +.SH SYNOPSIS +.B mailer +\fIpassword-files\fP +.SH DESCRIPTION +This manual page documents briefly the +.B mailer +command, which is part of the john package. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +\fBjohn\fP, better known as John the Ripper, is a tool to find weak +passwords of users in a server. +.br +The \fBmailer\fP tool is useful to inform users which have been found to +be using weak passwords by mail. +.P +You should edit the message mailer will send to the users, but remember to +copy the script to a safe place before editing it, as it's +generally a bad idea to modify things living in /usr. +.SH SEE ALSO +.BR john (8), +.BR unafs (8), +.BR unique (8), +.BR unshadow (8). +.PP +The programs are documented fully by John's documentation, +which should be available in \fI/usr/share/doc/john\fP or other +location, depending on your system. +.SH AUTHOR +This manual page was written by Jordi Mallach , +for the Debian GNU/Linux system (but may be used by others). +.br +John the Ripper and mailer were written by Solar Designer +. The complete list of contributors can be found in +the CREDITS file in the documentation directory. --- john-1.7.orig/debian/man/unique.8 +++ john-1.7/debian/man/unique.8 @@ -0,0 +1,41 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" +.\" unique.8 is copyright 1999-2001 by +.\" Jordi Mallach +.\" This is free documentation, see the latest version of the GNU General +.\" Public License for copying conditions. There is NO warranty. +.TH UNIQUE 8 "June 03, 2004" john +.\" Please adjust this date whenever revising the manpage. +.SH NAME +unique \- removes duplicates from a wordlist +.SH SYNOPSIS +.B unique +\fIoutput-file\fP +.SH DESCRIPTION +This manual page documents briefly the +.B unique +command, which is part of the john package. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +\fBjohn\fP, better known as John the Ripper, is a tool to find weak +passwords of users in a server. +.br +The \fBunique\fP tool finds and removes duplicate entries from a +wordlist (read from stdin), without changing the order. This is important +to increase the performance of john when using the wordlist method. +.SH SEE ALSO +.BR john (8), +.BR mailer (8), +.BR unafs (8), +.BR unshadow (8). +.PP +The programs are documented fully by John's documentation, +which should be available in \fI/usr/share/doc/john\fP or other +location, depending on your system. +.SH AUTHOR +This manual page was written by Jordi Mallach , +for the Debian GNU/Linux system (but may be used by others). +.br +John the Ripper and mailer were written by Solar Designer +. The complete list of contributors can be found in +the CREDITS file in the documentation directory. --- john-1.7.orig/debian/man/unshadow.8 +++ john-1.7/debian/man/unshadow.8 @@ -0,0 +1,43 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" +.\" unshadow.8 is copyright 1999-2001 by +.\" Jordi Mallach +.\" This is free documentation, see the latest version of the GNU General +.\" Public License for copying conditions. There is NO warranty. +.TH UNSHADOW 8 "June 03, 2004" john +.\" Please adjust this date whenever revising the manpage. +.SH NAME +unshadow \- combines passwd and shadow files +.SH SYNOPSIS +.B unshadow +\fIpassword-file shadow-file\fP +.SH DESCRIPTION +This manual page documents briefly the +.B unshadow +command, which is part of the john package. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +\fBjohn\fP, better known as John the Ripper, is a tool to find weak +passwords of users in a server. +.PP +The \fBunshadow\fP tool combines the passwd and shadow files so John can +use them. You might need this since if you only used your shadow file, the +GECOS information wouldn't be used by the "single crack" mode, and also you +wouldn't be able to use the '\-shells' option. On a normal system you'll need +to run unshadow as root to be able to read the shadow file. +.SH SEE ALSO +.BR john (8), +.BR mailer (8), +.BR unafs (8), +.BR unique (8). +.PP +The programs are documented fully by John's documentation, +which should be available in \fI/usr/share/doc/john\fP or other +location, depending on your system. +.SH AUTHOR +This manual page was written by Jordi Mallach , +for the Debian GNU/Linux system (but may be used by others). +.br +John the Ripper and mailer were written by Solar Designer +. The complete list of contributors can be found in +the CREDITS file in the documentation directory. --- john-1.7.orig/debian/man/unafs.8 +++ john-1.7/debian/man/unafs.8 @@ -0,0 +1,40 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" +.\" unafs.8 is copyright 1999-2001 by +.\" Jordi Mallach +.\" This is free documentation, see the latest version of the GNU General +.\" Public License for copying conditions. There is NO warranty. +.TH UNAFS 8 "June 03, 2004" john +.\" Please adjust this date whenever revising the manpage. +.SH NAME +unafs \- script to warn users about their weak passwords +.SH SYNOPSIS +.B unafs +\fIpassword-files cell-name\fP +.SH DESCRIPTION +This manual page documents briefly the +.B unafs +command, which is part of the john package. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +\fBjohn\fP, better known as John the Ripper, is a tool to find weak +passwords of users in a server. +.br +The \fBunafs\fP tool gets password hashes out of the binary AFS +database, and produces a file usable by John. +.SH SEE ALSO +.BR john (8), +.BR mailer (8), +.BR unique (8), +.BR unshadow (8). +.PP +The programs are documented fully by John's documentation, +which should be available in \fI/usr/share/doc/john\fP or other +location, depending on your system. +.SH AUTHOR +This manual page was written by Jordi Mallach , +for the Debian GNU/Linux system (but may be used by others). +.br +John the Ripper and mailer were written by Solar Designer +. The complete list of contributors can be found in +the CREDITS file in the documentation directory. --- john-1.7.orig/debian/man/john.8 +++ john-1.7/debian/man/john.8 @@ -0,0 +1,218 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" +.\" john.8 is copyright 1999-2001 by +.\" Jordi Mallach +.\" This is free documentation, see the latest version of the GNU General +.\" Public License for copying conditions. There is NO warranty. +.TH JOHN 8 "June 03, 2004" john +.\" Please adjust this date whenever revising the manpage. +.SH NAME +john \- a tool to find weak passwords of your users +.SH SYNOPSIS +.B john +.RI [ options ] " password-files" +.SH DESCRIPTION +This manual page documents briefly the +.B john +command. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +\fBjohn\fP, better known as John the Ripper, is a tool to find weak +passwords of users in a server. John can use a dictionary or some search +pattern as well as a password file to check for passwords. John supports +different cracking modes and understands many ciphertext formats, like +several DES variants, MD5 and blowfish. It can also be used to extract AFS +and Windows NT passwords. +.SH USAGE +To use John, you just need to supply it a password file and the desired +options. If no mode is specified, john will try "single" first, then +"wordlist" and finally "incremental". +.P +Once John finds a password, it will be printed to the terminal and saved +into a file called ~/john.pot. John will read this file when it restarts +so it doesn't try to crack already done passwords. +.P +To see the cracked passwords, use +.P +john \-show passwd +.P +Important: do this under the same directory where the password was cracked +(when using the cronjob, /var/lib/john), otherwise it won't work. +.P +While cracking, you can press any key for status, or Ctrl+C to abort the +session, saving point information to a file ( +.I ~/restore +by default). By the +way, if you press Ctrl+C twice John will abort immediately without saving. +The point information is also saved every 10 minutes (configurable in the +configuration file, +.I ~/john.ini +) in case of a crash. +.P +To continue an interrupted session, run: +.P +john \-restore +.P +Now, you may notice that many accounts have a disabled shell, you can make +John ignore these (assume that shell is called ' +.I /etc/expired +'): +.P +john \-show \-shells:\-/etc/expired passwd +.P +You might want to mail all the users who got weak passwords, +to tell them to change the passwords. It's not always a good idea though +(unfortunately, lots of people seem to ignore such mail, it can be used +as a hint for crackers, etc), but anyway, I'll assume you know what you're +doing. Get a copy of the 'mailer' script supplied with John, so you won't +change anything that's under +.I /usr/bin +; edit the message it sends, and +possibly the mail command inside it (especially if the password file is +from a different box than you got John running on). +Then run: +.P + ./mailer passwd +.P +Anyway, you probably should have a look at +.I /usr/share/doc/john/OPTIONS +for a list of all the command line options, and at +.I /usr/share/doc/john/EXAMPLES +for more John usage examples with other cracking modes. +.SH OPTIONS +All the options recognized by john start with a single dash (`\-'). +A summary of options is included below. +.TP +.B \-external:MODE +Enables an external mode, using external functions defined in ~/john.ini's +[List.External:MODE] section. +.TP +.B \-format:NAME +Allows you to override the ciphertext format detection. Currently, valid +format names are DES, BSDI, MD5, BF, AFS, LM. You can use this option when +cracking or with '\-test'. Note that John can't crack password files with +different ciphertext formats at the same time. +.TP +.B \-groups:[\-]GID[,..] +Tells John to load users of the specified group(s) only. +.TP +.B \-incremental[:MODE] +Enables the incremental mode, using the specified ~/john.ini definition +(section [Incremental:MODE], or [Incremental:All] by default). +.TP +.B \-makechars:FILE +Generates a charset file, based on character frequencies from ~/john.pot, +for use with the incremental mode. The entire ~/john.pot will be used for +the charset file unless you specify some password files. You can also use +an external filter() routine with this option. +.TP +.B \-restore[:FILE] +Continues an interrupted cracking session, reading point information from +the specified file (~/restore by default). +.TP +.B \-rules +Enables wordlist rules, that are read from [List.Rules:Wordlist]. +.TP +.B \-salts:[\-]COUNT +This feature sometimes allows to achieve better performance. For example +you can crack only some salts using '\-salts:2' faster, and then crack the +rest using '\-salts:\-2'. Total cracking time will be about the same, but +you will get some passwords cracked earlier. +.TP +.B \-savemem:LEVEL +You might need this option if you don't have enough memory, or don't want +John to affect other processes too much. Level 1 tells John not to waste +memory on login names, so you won't see them while cracking. Higher levels +have a performance impact: you should probably avoid using them unless John +doesn't work or gets into swap otherwise. +.TP +.B \-session:FILE +Allows you to specify another point information file's name to use for +this cracking session. This is useful for running multiple instances of +John in parallel, or just to be able to recover an older session later, +not always continue the latest one. +.TP +.B \-shells:[\-]SHELL[,..] +This option is useful to load accounts with a valid shell only, or not to +load accounts with a bad shell. You can omit the path before a shell name, +so '\-shells:csh' will match both '/bin/csh' and '/usr/bin/csh', while +\'\-shells:/bin/csh' will only match '/bin/csh'. +.TP +.B \-show +Shows the cracked passwords in a convenient form. You should also specify +the password files. You can use this option while another John is cracking, +to see what it did so far. +.TP +.B \-single +Enables the "single crack" mode, using rules from [List.Rules:Single]. +.TP +.B \-status[:FILE] +Prints status of an interrupted or running session. To get an up to date +status information of a detached running session, send that copy of John +a SIGHUP before using this option. +.TP +.B \-stdin +These are used to enable the wordlist mode (reading from stdin). +.TP +.B \-stdout[:LENGTH] +When used with a cracking mode, except for "single crack", makes John +print the words it generates to stdout instead of cracking. While applying +wordlist rules, the significant password length is assumed to be LENGTH, +or unlimited by default. +.TP +.B \-test +Benchmarks all the enabled ciphertext format crackers, and tests them for +correct operation at the same time. +.TP +.B \-users:[\-]LOGIN|UID[,..] +Allows you to filter a few accounts for cracking, etc. A dash before the +list can be used to invert the check (that is, load all the users that +aren't listed). +.TP +.B \-wordfile:FILE +These are used to enable the wordlist mode, reading words from FILE. +.SH MODES +John can work in the following modes: +.TP +\fBWordlist\fP +John will simply use a file with a list of words that will be checked +against the passwords. See RULES for the format of wordlist files. +.TP +\fBSingle crack\fP +In this mode, john will try to crack the password using the login/GECOS +information as passwords. +.TP +\fBIncremental\fP +This is the most powerful mode. John will try any character combination +to resolve the password. +Details about these modes can be found in the MODES file in john's +documentation, including how to define your own cracking methods. +.SH FILES +.TP +.I /etc/john/john.conf +is where you configure how john will behave. +.TP +.I /etc/john/john\-mail.msg +has the message sent to users when their passwords are successfully cracked. +.TP +.I /etc/john/john\-mail.conf +is used to configure how john will send messages to users that had their passwords +cracked. +.P +.SH SEE ALSO +.BR mailer (8), +.BR unafs (8), +.BR unique (8), +.BR unshadow (8), +.PP +The programs and the configuration files are documented fully by John's +documentation, which should be available in \fI/usr/share/doc/john\fP or +other location, depending on your system. +.SH AUTHOR +This manual page was written by Jordi Mallach +and Jeronimo Pellegrini , for the +Debian GNU/Linux system (but may be used by others). +.br +John the Ripper was written by Solar Designer . +The complete list of contributors can be found in the CREDITS file +in the documentation directory. --- john-1.7.orig/debian/john.links +++ john-1.7/debian/john.links @@ -0,0 +1,3 @@ +usr/sbin/john usr/sbin/unafs +usr/sbin/john usr/sbin/unique +usr/sbin/john usr/sbin/unshadow --- john-1.7.orig/debian/patches/faq.diff +++ john-1.7/debian/patches/faq.diff @@ -0,0 +1,18 @@ +--- john-1.6.orig/doc/FAQ ++++ john-1.6/doc/FAQ +@@ -103,10 +103,13 @@ + A: Upgrade your binutils. At least version 2.8.1.0.15 is known to work. + + Q: Where do I get the wordlists? +-A: You can find some at ftp://sable.ox.ac.uk/pub/wordlists/. ++A: You can find some at: ++ ftp://ftp.zedz.net/pub/crypto/wordlists/ ++ ftp://ftp.cerias.purdue.edu/pub/dict/ ++ ftp://ftp.ox.ac.uk/pub/wordlists/ + + Q: What is the primary site for John? +-A: http://www.false.com/security/john/. ++A: http://www.openwall.com/john/. + + Q: How can I contact you? + A: See doc/CREDITS. --- john-1.7.orig/debian/patches/sysconf_clk_tck.diff +++ john-1.7/debian/patches/sysconf_clk_tck.diff @@ -0,0 +1,100 @@ +diff -Nur john-1.6/src/bench.c john-1.6.new/src/bench.c +--- john-1.6/src/bench.c 2000-04-01 02:21:43.000000000 -0800 ++++ john-1.6.new/src/bench.c 2006-10-13 09:36:47.906521852 -0700 +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + + #include "times.h" + +@@ -103,7 +104,7 @@ + it.it_value.tv_sec = BENCHMARK_TIME; + if (setitimer(ITIMER_REAL, &it, NULL)) pexit("setitimer"); + #else +- sig_timer_emu_init(BENCHMARK_TIME * CLK_TCK); ++ sig_timer_emu_init(BENCHMARK_TIME * sysconf(_SC_CLK_TCK)); + #endif + + start_real = times(&buf); +@@ -144,8 +145,8 @@ + { + unsigned long cps_hi, cps_lo; + +- cps_hi = count * CLK_TCK / time; +- cps_lo = count * ((unsigned ARCH_WORD)CLK_TCK * 10) / time % 10; ++ cps_hi = count * sysconf(_SC_CLK_TCK) / time; ++ cps_lo = count * ((unsigned ARCH_WORD)sysconf(_SC_CLK_TCK) * 10) / time % 10; + + sprintf(buffer, cps_hi < 100 ? "%lu.%lu" : "%lu", cps_hi, cps_lo); + } +diff -Nur john-1.6/src/best.c john-1.6.new/src/best.c +--- john-1.6/src/best.c 2000-04-01 02:21:43.000000000 -0800 ++++ john-1.6.new/src/best.c 2006-10-13 09:37:01.859218512 -0700 +@@ -9,6 +9,7 @@ + + #include + #include ++#include + + #include "params.h" + #include "common.h" +@@ -56,7 +57,7 @@ + fprintf(stderr, "FAILED\n"); + } else { + virtual = (unsigned long) +- (results.count * CLK_TCK * 10 / results.virtual); ++ (results.count * sysconf(_SC_CLK_TCK) * 10 / results.virtual); + + benchmark_cps(results.count, results.real, s_real); + benchmark_cps(results.count, results.virtual, s_virtual); +diff -Nur john-1.6/src/signals.c john-1.6.new/src/signals.c +--- john-1.6/src/signals.c 2000-04-01 02:21:43.000000000 -0800 ++++ john-1.6.new/src/signals.c 2006-10-13 09:37:35.480897303 -0700 +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + + #ifdef __DJGPP__ + #include +@@ -217,7 +218,7 @@ + { + #if !OS_TIMER + signal(SIGALRM, sig_handle_timer); +- sig_timer_emu_init(TIMER_INTERVAL * CLK_TCK); ++ sig_timer_emu_init(TIMER_INTERVAL * sysconf(_SC_CLK_TCK)); + #else + struct sigaction sa; + struct itimerval it; +diff -Nur john-1.6/src/status.c john-1.6.new/src/status.c +--- john-1.6/src/status.c 2000-04-01 02:21:43.000000000 -0800 ++++ john-1.6.new/src/status.c 2006-10-13 09:38:00.130128134 -0700 +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + + #include "times.h" + +@@ -35,7 +36,7 @@ + if (!status_restored_time) + memset(&status, 0, sizeof(status)); + status.start_time = +- get_time() - status_restored_time * CLK_TCK; ++ get_time() - status_restored_time * sysconf(_SC_CLK_TCK); + } + + status_get_progress = get_progress; +@@ -48,7 +49,7 @@ + + unsigned int status_get_time() + { +- return (get_time() - status.start_time) / CLK_TCK; ++ return (get_time() - status.start_time) / sysconf(_SC_CLK_TCK); + } + + static char *status_get_cps(char *buffer) --- john-1.7.orig/debian/patches/amd64.diff +++ john-1.7/debian/patches/amd64.diff @@ -0,0 +1,107 @@ +diff -Nurd john-1.6.deb/src/loader.c john-1.6/src/loader.c +--- john-1.6.deb/src/loader.c 2000-04-01 10:21:43.000000000 +0000 ++++ john-1.6/src/loader.c 2004-05-27 14:26:18.889618326 +0000 +@@ -31,7 +31,7 @@ + #define issep \ + "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\177\377" + +-static char issep_map[0x100]; ++static unsigned char issep_map[0x100]; + static int issep_initialized = 0; + + static void read_file(struct db_main *db, char *name, int flags, +@@ -67,7 +67,7 @@ + + static void ldr_init_issep() + { +- char *pos; ++ unsigned char *pos; + + if (issep_initialized) return; + +@@ -241,7 +241,7 @@ + + static void ldr_split_string(struct list_main *dst, char *src) + { +- char *word, *pos; ++ unsigned char *word, *pos; + + pos = src; + do { +diff -Nurd john-1.6.deb/src/rules.c john-1.6/src/rules.c +--- john-1.6.deb/src/rules.c 2000-04-01 10:21:43.000000000 +0000 ++++ john-1.6/src/rules.c 2004-05-27 14:26:18.890618158 +0000 +@@ -126,9 +126,9 @@ + for (pos = 0; (out[pos] = (conv)[(ARCH_INDEX)in[pos]]); pos++); \ + } + +-static void rules_init_class(char name, char *valid) ++static void rules_init_class(unsigned char name, char *valid) + { +- char *pos, inv; ++ unsigned char *pos, inv; + + rules_classes[(ARCH_INDEX)name] = + mem_alloc_tiny(0x100, MEM_ALIGN_NONE); +@@ -163,7 +163,7 @@ + rules_init_class('x', CHARS_LOWER CHARS_UPPER CHARS_DIGITS); + } + +-static char *rules_init_conv(char *src, char *dst) ++static char *rules_init_conv(unsigned char *src, char *dst) + { + char *conv; + int pos; +@@ -215,7 +215,7 @@ + rules_errno = RULES_ERROR_NONE; + } + +-char *rules_reject(char *rule, struct db_main *db) ++char *rules_reject(unsigned char *rule, struct db_main *db) + { + while (RULE) + switch (LAST) { +@@ -257,10 +257,10 @@ + return rule - 1; + } + +-char *rules_apply(char *word, char *rule, int split) ++char *rules_apply(char *word, unsigned char *rule, int split) + { +- static char buffer[3][RULE_WORD_SIZE * 2]; +- char *in = buffer[0], *out = buffer[1]; ++ static unsigned char buffer[3][RULE_WORD_SIZE * 2]; ++ unsigned char *in = buffer[0], *out = buffer[1]; + char memory[RULE_WORD_SIZE]; + int memory_empty, which; + char value, *class; +@@ -648,7 +648,7 @@ + int rules_check(struct rpp_context *start, int split) + { + struct rpp_context ctx; +- char *rule; ++ unsigned char *rule; + int count; + + rules_errno = RULES_ERROR_NONE; +diff -Nurd john-1.6.deb/src/rules.h john-1.6/src/rules.h +--- john-1.6.deb/src/rules.h 2000-04-01 10:21:43.000000000 +0000 ++++ john-1.6/src/rules.h 2004-05-27 14:26:18.890618158 +0000 +@@ -51,7 +51,7 @@ + * error. If the database is NULL, all rules are accepted (to be used + * for syntax checking). + */ +-extern char *rules_reject(char *rule, struct db_main *db); ++extern char *rules_reject(unsigned char *rule, struct db_main *db); + + /* + * Applies rule to a word. Returns the updated word, or NULL if rejected or +@@ -61,7 +61,7 @@ + * split == 0 "single crack" mode, only one word + * split < 0 other cracking modes, "single crack" mode rules are invalid + */ +-extern char *rules_apply(char *word, char *rule, int split); ++extern char *rules_apply(char *word, unsigned char *rule, int split); + + /* + * Checks if all the rules for context are valid. Returns the number of rules, --- john-1.7.orig/debian/patches/makefile.diff +++ john-1.7/debian/patches/makefile.diff @@ -0,0 +1,105 @@ +--- john-1.6.orig/src/Makefile ++++ john-1.6/src/Makefile +@@ -116,13 +116,13 @@ + $(LN) x86-any.h arch.h + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(JOHN_OBJS) x86.o" \ +- CFLAGS="$(CFLAGS) -m486" ++ CFLAGS="$(CFLAGS) -mcpu=i486" + + linux-x86-mmx-elf: + $(LN) x86-mmx.h arch.h + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(JOHN_OBJS) x86.o" \ +- CFLAGS="$(CFLAGS) -m486" ++ CFLAGS="$(CFLAGS) -mcpu=i486" + + linux-x86-k6-elf: + $(LN) x86-k6.h arch.h +@@ -133,10 +133,10 @@ + $(LN) x86-any.h arch.h + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(JOHN_OBJS) x86.o" \ +- CFLAGS="$(CFLAGS) -m486" \ ++ CFLAGS="$(CFLAGS) -mcpu=i486" \ + ASFLAGS="$(ASFLAGS) -DUNDERSCORES -DALIGN_LOG" + +-linux-alpha: ++linux-alpha: alpha.h + $(LN) alpha.h arch.h + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(BITSLICE_OBJS) $(JOHN_OBJS) alpha.o" +@@ -146,9 +146,9 @@ + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(JOHN_OBJS) alpha.o" + +-linux-sparc: +- $(MAKE) HAMMER=use-linux-sparc sparc.h +- ln -s sparc.h arch.h ++linux-sparc: ++ $(MAKE) use-linux-sparc HAMMER=use-linux-sparc NAIL=sparc.h ++ $(LN) sparc.h arch.h + $(MAKE) use-linux-sparc NAIL="$(PROJ)" + + use-linux-sparc: +@@ -160,7 +160,7 @@ + $(LN) x86-any.h arch.h + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(JOHN_OBJS) x86.o" \ +- CFLAGS="$(CFLAGS) -m486" \ ++ CFLAGS="$(CFLAGS) -mcpu=i486" \ + ASFLAGS="$(ASFLAGS) -DUNDERSCORES -DALIGN_LOG -DBSD" + + freebsd-x86-k6-a.out: +@@ -173,14 +173,14 @@ + $(LN) x86-any.h arch.h + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(JOHN_OBJS) x86.o" \ +- CFLAGS="$(CFLAGS) -m486" \ ++ CFLAGS="$(CFLAGS) -mcpu=i486" \ + ASFLAGS="$(ASFLAGS) -DBSD" + + freebsd-x86-mmx-elf: + $(LN) x86-mmx.h arch.h + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(JOHN_OBJS) x86.o" \ +- CFLAGS="$(CFLAGS) -m486" \ ++ CFLAGS="$(CFLAGS) -mcpu=i486" \ + ASFLAGS="$(ASFLAGS) -DBSD" + + freebsd-x86-k6-elf: +@@ -193,7 +193,7 @@ + $(LN) x86-any.h arch.h + $(MAKE) $(PROJ) \ + JOHN_OBJS="$(JOHN_OBJS) x86.o" \ +- CFLAGS="$(CFLAGS) -m486" \ ++ CFLAGS="$(CFLAGS) -mcpu=i486" \ + ASFLAGS="$(ASFLAGS) -DUNDERSCORES -DALIGN_LOG -DBSD" + + openbsd-x86-k6: +@@ -260,7 +260,7 @@ + $(MAKE) $(PROJ) \ + SHELL=/bin/sh \ + JOHN_OBJS="$(JOHN_OBJS) solaris-x86.o" \ +- CFLAGS="$(CFLAGS) -m486" ++ CFLAGS="$(CFLAGS) -mcpu=i486" + + solaris-x86-k6: + $(RM) arch.h +@@ -340,14 +340,14 @@ + copy x86-any.h arch.h + $(MAKE) $(PROJ_DOS) \ + JOHN_OBJS="$(JOHN_OBJS) x86.o" \ +- CFLAGS="$(CFLAGS) -m486" \ ++ CFLAGS="$(CFLAGS) -mcpu=i486" \ + ASFLAGS="$(ASFLAGS) -DUNDERSCORES -DALIGN_LOG" + + dos-djgpp-x86-mmx: + copy x86-mmx.h arch.h + $(MAKE) $(PROJ_DOS) \ + JOHN_OBJS="$(JOHN_OBJS) x86.o" \ +- CFLAGS="$(CFLAGS) -m486" \ ++ CFLAGS="$(CFLAGS) -mcpu=i486" \ + ASFLAGS="$(ASFLAGS) -DUNDERSCORES -DALIGN_LOG" + + dos-djgpp-x86-k6: --- john-1.7.orig/debian/patches/system-wide.diff +++ john-1.7/debian/patches/system-wide.diff @@ -0,0 +1,58 @@ +--- john-1.6.orig/run/john.ini ++++ john-1.6/run/john.ini +@@ -5,7 +5,7 @@ + + [Options] + # Wordlist file name, to be used in batch mode +-Wordfile = ~/password.lst ++Wordfile = /usr/share/john/password.lst + # Use idle cycles only + Idle = N + # Crash recovery file saving delay in seconds +@@ -314,25 +314,25 @@ + + # Incremental modes + [Incremental:All] +-File = ~/all.chr ++File = /usr/share/john/all.chr + MinLen = 0 + MaxLen = 8 + CharCount = 95 + + [Incremental:Alpha] +-File = ~/alpha.chr ++File = /usr/share/john/alpha.chr + MinLen = 1 + MaxLen = 8 + CharCount = 26 + + [Incremental:Digits] +-File = ~/digits.chr ++File = /usr/share/john/digits.chr + MinLen = 1 + MaxLen = 8 + CharCount = 10 + + [Incremental:LanMan] +-File = ~/lanman.chr ++File = /usr/share/john/lanman.chr + MinLen = 0 + MaxLen = 7 + CharCount = 69 +--- john-1.6.orig/src/params.h ++++ john-1.6/src/params.h +@@ -52,10 +52,10 @@ + /* + * File names. + */ +-#define LOG_NAME "~/john.pot" +-#define CFG_NAME "~/john.ini" +-#define RECOVERY_NAME "~/restore" +-#define WORDLIST_NAME "~/password.lst" ++#define LOG_NAME "john.pot" ++#define CFG_NAME "/etc/john/john.conf" ++#define RECOVERY_NAME "restore" ++#define WORDLIST_NAME "/usr/share/john/password.lst" + + /* + * Configuration file section names. --- john-1.7.orig/debian/patches/mipsel.diff +++ john-1.7/debian/patches/mipsel.diff @@ -0,0 +1,123 @@ +diff -burN john-1.6.orig/src/Makefile john-1.6/src/Makefile +--- john-1.6.orig/src/Makefile 2008-01-14 19:55:03.000000000 +0100 ++++ john-1.6/src/Makefile 2008-01-14 19:59:16.000000000 +0100 +@@ -86,6 +86,8 @@ + @echo "linux-x86-any-a.out Linux, x86, a.out binaries" + @echo "linux-alpha Linux, Alpha" + @echo "linux-sparc Linux, SPARC" ++ @echo "linux-mips Linux, MIPS" ++ @echo "linux-mipsel Linux, MIPSel" + @echo "freebsd-x86-any-a.out FreeBSD, x86, a.out binaries" + @echo "freebsd-x86-k6-a.out FreeBSD, AMD K6, a.out binaries" + @echo "freebsd-x86-any-elf FreeBSD, x86, ELF binaries" +@@ -156,6 +158,16 @@ + BENCH_DES_OBJS_DEPEND="$(BENCH_DES_OBJS_ORIG) sparc.o" \ + JOHN_OBJS="$(BITSLICE_OBJS) $(JOHN_OBJS_ORIG) sparc.o" + ++linux-mips: mips.h ++ $(LN) mips.h arch.h ++ $(MAKE) $(PROJ) \ ++ JOHN_OBJS="$(BITSLICE_OBJS) $(JOHN_OBJS)" ++ ++linux-mipsel: mipsel.h ++ $(LN) mipsel.h arch.h ++ $(MAKE) $(PROJ) \ ++ JOHN_OBJS="$(BITSLICE_OBJS) $(JOHN_OBJS)" ++ + freebsd-x86-any-a.out: + $(LN) x86-any.h arch.h + $(MAKE) $(PROJ) \ +diff -burN john-1.6.orig/src/mipsel.h john-1.6/src/mipsel.h +--- john-1.6.orig/src/mipsel.h 1970-01-01 01:00:00.000000000 +0100 ++++ john-1.6/src/mipsel.h 2008-01-14 19:56:44.000000000 +0100 +@@ -0,0 +1,43 @@ ++/* ++ * This file is part of John the Ripper password cracker, ++ * Copyright (c) 1996-98 by Solar Designer ++ */ ++ ++/* ++ * Architecture specific parameters for little-endian MIPS. ++ */ ++ ++#ifndef _JOHN_ARCH_H ++#define _JOHN_ARCH_H ++ ++#define ARCH_GENERIC 1 ++#define ARCH_WORD long ++#define ARCH_SIZE 4 ++#define ARCH_BITS 32 ++#define ARCH_BITS_STR "32" ++#define ARCH_LITTLE_ENDIAN 1 ++#define ARCH_INT_GT_32 0 ++#define ARCH_ALLOWS_UNALIGNED 0 ++#define ARCH_INDEX unsigned int ++ ++#define OS_TIMER 1 ++#define OS_FLOCK 1 ++ ++#define CPU_DETECT 0 ++ ++#define DES_ASM 0 ++#define DES_128K 0 ++#define DES_X2 0 ++#define DES_MASK 0 ++#define DES_SCALE 1 ++#define DES_EXTB 0 ++#define DES_COPY 1 ++#define DES_BS 0 ++ ++#define MD5_ASM 0 ++#define MD5_IMM 0 ++ ++#define BF_ASM 0 ++#define BF_SCALE 0 ++ ++#endif +diff -burN john-1.6.orig/src/mips.h john-1.6/src/mips.h +--- john-1.6.orig/src/mips.h 1970-01-01 01:00:00.000000000 +0100 ++++ john-1.6/src/mips.h 2008-01-14 19:56:44.000000000 +0100 +@@ -0,0 +1,43 @@ ++/* ++ * This file is part of John the Ripper password cracker, ++ * Copyright (c) 1996-98 by Solar Designer ++ */ ++ ++/* ++ * Architecture specific parameters for big-endian MIPS. ++ */ ++ ++#ifndef _JOHN_ARCH_H ++#define _JOHN_ARCH_H ++ ++#define ARCH_GENERIC 1 ++#define ARCH_WORD long ++#define ARCH_SIZE 4 ++#define ARCH_BITS 32 ++#define ARCH_BITS_STR "32" ++#define ARCH_LITTLE_ENDIAN 0 ++#define ARCH_INT_GT_32 0 ++#define ARCH_ALLOWS_UNALIGNED 0 ++#define ARCH_INDEX unsigned int ++ ++#define OS_TIMER 1 ++#define OS_FLOCK 1 ++ ++#define CPU_DETECT 0 ++ ++#define DES_ASM 0 ++#define DES_128K 0 ++#define DES_X2 0 ++#define DES_MASK 0 ++#define DES_SCALE 1 ++#define DES_EXTB 0 ++#define DES_COPY 1 ++#define DES_BS 0 ++ ++#define MD5_ASM 0 ++#define MD5_IMM 0 ++ ++#define BF_ASM 0 ++#define BF_SCALE 0 ++ ++#endif --- john-1.7.orig/debian/postrm +++ john-1.7/debian/postrm @@ -0,0 +1,61 @@ +#!/bin/sh +set -e + +# Revert relocation of a conffile from one location to another. +# The forward path is preinst install|upgrade. +# $1 is the original pathname of the conffile, +# $2 is the pathname of the current conffile. +unmv_conffile () +{ + if [ -e "$1" ] ; then + echo "Not reverting conffile relocation to $2;" + echo "original pathname $1 exists." + elif [ -e "$1.moved_by_preinst" ] ; then + echo "Reverting removal of unmodified conffile:" + echo -n " " + mv -v "$1.moved_by_preinst" "$1" + elif [ -e "$2" ] ; then + echo "Reverting relocation of modified conffile to original location:" + echo -n " " + mv -fv $2 $1 + fi >&2 +} + +case $1 in +disappear|remove) + # These are the restore and cracked-password file used by the + # cronjob for attacking the system password file for a short + # period each day: + d=/var/lib/john + rm -f $d/restore $d/john.pot + d=/var/run/john +# FIXME: this is configurable... + rm -f $d/john.pid $d/cronpasswd.* + ;; + +abort-install|abort-upgrade) + # Revert relocation of conffiles: + p1=/etc + p2=/etc/john + if dpkg --compare-versions "$2" le-nl 1.6-27; then + unmv_conffile $p1/john.ini $p2/john.conf + unmv_conffile $p1/john-mail.conf $p2/john-mail.conf + unmv_conffile $p1/john-mail.msg $p2/john-mail.msg + + # "Display the warning, but don't fail if nonempty": + rmdir $p2 || rmdir --ignore-fail-on-non-empty $p2 + fi + ;; + +purge|upgrade|failed-upgrade) + # These cases need no actions here + : + ;; + +*) + echo "$0: undocumented call: $@" >&2 + exit 1 + ;; +esac + +#DEBHELPER# --- john-1.7.orig/debian/preinst +++ john-1.7/debian/preinst @@ -0,0 +1,63 @@ +#!/bin/sh +set -e + +dpkgstat=/var/lib/dpkg/status + +# Relocate a conffile from one location to another; it is removed iff +# unmodified, and moved iff modified. +# The undo path is postrm abort-install|abort-upgrade. +# $1 is the old pathname of the conffile, +# $2 is the new pathname of the conffile. +mv_conffile () +{ + [ ! -f "$1" ] && return + if [ -e "$2" ] ; then + echo "Not moving conffile $1 to $2; new file exists" + return + fi + + orgmd5=`sed -nre "/^Conffiles:/,/^[^ ]/{ \\'$1' {s///; s/^ *//; s/ .*//; p;}}" $dpkgstat` + curmd5=`md5sum $1 |sed -e 's/ .*//'` + if [ "$orgmd5" = "$curmd5" ]; then + # conffile unmodified; prepare to remove it, allowing + # dpkg to install a new copy to the new location + # before "configuration" + echo "Preparing to remove unmodified conffile:" + echo -n " " + mv -fv $1 $1.moved_by_preinst + else + # conffile modified by admin; relocate it, causing + # dpkg to prompt, as intended + echo "Relocating modified conffile to new location:" + echo -n " " + mv -fv $1 $2 + fi >&2 +} + +p1=/etc +p2=/etc/john +case $1 in +install|upgrade) + [ -d $p2 ] || mkdir $p2 + if dpkg --compare-versions "$2" le-nl 1.6-27; then + mv_conffile $p1/john.ini $p2/john.conf + mv_conffile $p1/john-mail.conf $p2/john-mail.conf + mv_conffile $p1/john-mail.msg $p2/john-mail.msg + + # No need to remove the obsolete conffile + # /etc/cron.daily/john, since old prerm does so + # unconditionally (and there is nothing we can do to stop it) + fi + ;; + +abort-upgrade) + # This case needs no actions here + ;; + +*) + echo "$0: undocumented call: $@" + exit 1 + ;; +esac + +#DEBHELPER# --- john-1.7.orig/debian/examples +++ john-1.7/debian/examples @@ -0,0 +1 @@ +debian/extra/ldap-extract --- john-1.7.orig/debian/README.wordlists +++ john-1.7/debian/README.wordlists @@ -0,0 +1,47 @@ +John the Ripper and word lists +------------------------------ +(or how to remove the false sense of security) + +The Debian version of John the Ripper can be configured to run as a +cron job, which will make it periodically check the passwords used +on the system in order to determine if they are really "secure" +(that is, not easy to guess or crack by brute force). + +Currently, john provides its own word list for password cracking, which +contains a lot of common passwords, as provided by john's author, and +can be found on /usr/share/john/password.lst. However, user passwords +strongly depend on the mother tongue and the cultural background, hence, +the default word list alone might not be ideal for every system. + +This is the reason why, in some cases, installing john and running it +often might give sense of security that is not necessarily true. While +you think it will be able to guess easy passwords, it it only able to +guess easy and common English passwords. + +If you think this is the case, there are a number of wordlists you can +use: provided by Debian or other sources (FTP servers related to security +often provide a directory with those). + +Some spell checkers in Debian provide the word lists used by them (26 at +the time of writing these lines). They may be useful to look for passwords +based on words, and are available for many foreign languages. You can see +the list of packages providing wordlists by running + +$ grep-available -e wordlist -n -F Provides -s package + +Notice that there are some other Debian packages (such as 'jargon') that +might provide word lists useful for password-checking purposes too. + +Some word lists suitable for password cracking can be found on, among +others: + ftp://ftp.zedz.net/pub/crypto/wordlists/ + ftp://ftp.cerias.purdue.edu/pub/dict/ + ftp://ftp.ox.ac.uk/pub/wordlists/ + +They are not simply dictionaries, but a compendium of common names, +heroes, popular teams, etc., which may provide even more useful input +for john. + +-- +The Debian Maintainers of john +Tue, 19 Jul 2005 14:15:15 -0300 --- john-1.7.orig/debian/compat +++ john-1.7/debian/compat @@ -0,0 +1 @@ +4 --- john-1.7.orig/debian/postinst +++ john-1.7/debian/postinst @@ -0,0 +1,66 @@ +#!/bin/sh +set -e + +# Versions earlier than 1.6-34 and later than (perhaps) 1.6-19 include +# /var/run/john as mode 0755, which could allow users to read cracked +# passwords. Later versions fixed the permissions of the included +# directory, but dpkg doesn't automatically make changes to directory +# modes. +fixperms () +{ + p=/var/run/john + # If the admin has an override, don't touch it + # (even if the override is to mode 0700?) + dpkg-statoverride --list $p >/dev/null && return + curmod=`stat -c %a $p` + [ $(( 0$curmod & 07077 )) -eq 0 ] && return + chmod -v 0700 $p +} + +# Commit conffile move from preinst +rm_conffile_do () +{ + c=0 + # a=1 is a search if the files exist, + # a=2 is removal of those which do + for a in 1 2; do + for f in john-mail.conf john-mail.msg john.ini; do + g=/etc/$f.moved_by_preinst + [ -e $g ] || continue + c=$(( $c + 1 )) + [ "$a" -eq 1 ] && break + echo -n " " + rm -fv $g + done + + [ "$c" -eq 0 ] && return + [ "$a" -eq 1 ] || continue + echo "Committing removal of unmodified conffiles:" + done >&2 +} + +case $1 in +configure|abort-upgrade|abort-remove|abort-deconfigure) + fixperms + rm_conffile_do + + # this state file has moved to /var/lib/john quite some time ago + old=/usr/share/john/restore + new=/var/lib/john/restore + + if [ -e $old ] ; then + if [ -e $new ] ; then + rm -f $old + else + mv -f $old $new + fi + fi + ;; + +*) + echo "$0: undocumented call $@" >&2 + exit 1 + ;; +esac + +#DEBHELPER# --- john-1.7.orig/debian/john.install +++ john-1.7/debian/john.install @@ -0,0 +1,8 @@ +debian/extra/mailer usr/sbin +debian/extra/john-mail.msg etc/john +debian/extra/john-mail.conf etc/john +run/all.chr usr/share/john +run/alpha.chr usr/share/john +run/digits.chr usr/share/john +run/lanman.chr usr/share/john +run/password.lst usr/share/john --- john-1.7.orig/debian/control +++ john-1.7/debian/control @@ -0,0 +1,25 @@ +Source: john +Section: admin +Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Guilherme de S. Pastore +Uploaders: Javier Fernandez-Sanguino Pen~a +Standards-Version: 3.8.0 +Build-Depends: cdbs, debhelper (>= 4.1.16) +Homepage: http://www.openwall.com/john/ + +Package: john +Architecture: any +Depends: ${shlibs:Depends}, dpkg (>= 1.10.16) +Suggests: wenglish | wordlist +Description: active password cracking tool + john, mostly known as John the Ripper, is a tool designed to help systems + administrators to find weak (easy to guess or crack through brute force) + passwords, and even automatically mail users warning them about it, if it + is desired. + . + It can also be used with different cyphertext formats, including Unix's + DES and MD5, Kerberos AFS passwords, Windows' LM hashes, BSDI's extended DES, + and OpenBSD's Blowfish. + . + --- john-1.7.orig/debian/README +++ john-1.7/debian/README @@ -0,0 +1,31 @@ +John the Ripper (john) for Debian +----------------------------------- + + --- Previous Users of john --- + + The previous version of this package used a cronjob that was + inflexible. This means it would start one instance of john the ripper + and run until either all passwords were found or it wasn't able to + crack them. + + So starting with version 1.6-19 of the package, the new cronjob + is a lot more flexible. The system administrator will now be able to + define when to start the cronjob and how long it should run daily. The + cronjob will then be automatically stopped after that time and the + current state saved. When the cronjob is then started again the next + day, it will pick off where it stopped. If you don't want to the + cronjob to continue an old session, but instead start with a fresh copy + of the password file, you need to remove the file + /var/lib/john/restore. + + The package upgrade already installed the new cronjob and removed the + old one. If you want the new cronjob to run, you must uncomment the + active lines from /etc/cron.d/john; you might also modify it to + change at which time the cronjob shall be started and at which time it + should be stopped. + + The new cronjob will only be started after you edited /etc/cron.d/john. + If you don't edit the file, the cronjob will not be started and you can + run john from the command line. + + -- Christian Kurz , Tue, 02 Sep 2003 22:52:46 +0200 --- john-1.7.orig/debian/copyright +++ john-1.7/debian/copyright @@ -0,0 +1,28 @@ +This is a Debian prepackaged version of john the ripper. The package has +been created by Christian Kurz . + +Source code was obtained from: + http://www.openwall.com/john/ + +Author: Alexander Peslyak aka Solar Designer + +The following copyright applies to this package: + + Copyright (c) 2000 Solar Designer + All rights reserved. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + + A complete version of the GPL can be found in /usr/share/common-licenses/GPL. --- john-1.7.orig/debian/john.manpages +++ john-1.7/debian/john.manpages @@ -0,0 +1,5 @@ +debian/man/john.8 +debian/man/mailer.8 +debian/man/unafs.8 +debian/man/unique.8 +debian/man/unshadow.8 --- john-1.7.orig/debian/extra/ldap-extract +++ john-1.7/debian/extra/ldap-extract @@ -0,0 +1,60 @@ +#! /usr/bin/perl +# +# Script to extract passwords from an LDAP directory server +# The script has to be called with: +# +# ldap-extract ldap://server baseDN AdminDN Adminpassword +# +# This script requires the 'libnet-ldap-perl' package +# +# (c) 2004 Klaus Ethgen +# Licensed under the GNU General Public License version 2. +# +# TODO +# - The script will only retrieve passwords in crypt format +# other formats (MD5, SHA-1...) are not supported. + +use strict; +use warnings; +use Getopt::Std; +our($opt_h); +getopts('h'); +if ( $opt_h || @ARGV != 4 ) { + print "Usage: $0 ldap://server baseDN AdminDN Adminpassword\n"; + exit 1; +} +eval "use Net::LDAP"; +if ($@) { + print "ERROR: Could not load the Net::LDAP module\n"; + print "(Hint: If you are running this in Debian install the libnet-ldap-perl package)\n"; + exit 1; +} + +my ($host) = $ARGV[0] =~ /ldap:\/\/(.*)/; +my $ldap = Net::LDAP->new("localhost") or die $@; +$ldap->bind($ARGV[2], password => $ARGV[3], version => 3) or die "Cannot bind to ldap server $ARGV[2]: $!"; +my $res = $ldap->search(base => $ARGV[1], scope => "sub", attrs => + [qw(cn uid userPassword loginShell homeDirectory uidNumber gidNumber)],filter => "cn=*"); +my $x = $res->as_struct; +foreach (keys %$x) +{ + print $x->{$_}->{uid}->[0]; + my $pw = $x->{$_}->{userpassword}->[0]; + if ($pw =~ /^\{crypt\}(.*)$/) + { + $pw = $1; + } +# else +# { +# $pw =~ s/^\{.+\}/\$1\$/; +# } + print ":$pw"; + foreach my $i (qw(uidnumber gidnumber cn homedirectory loginshell)) + { + print ":", $x->{$_}->{$i}->[0]; + } + print "\n"; +} +$ldap->unbind; + +exit 0; --- john-1.7.orig/debian/extra/john-mail.msg +++ john-1.7/debian/extra/john-mail.msg @@ -0,0 +1,8 @@ +Subject: Bad password! + +Hello! + +Your password for account @LOGIN at host @HOSTNAME is too easy! +Please change it as soon as possible. + +John the Ripper, an automated password cracker. --- john-1.7.orig/debian/extra/mailer +++ john-1.7/debian/extra/mailer @@ -0,0 +1,53 @@ +#!/bin/sh +# +# This file is part of John the Ripper password cracker, +# Copyright (c) 1996-98 by Solar Designer +# + +if [ $# -ne 1 ]; then + echo "Usage: $0 PASSWORD-FILE" + exit 0 +fi + +if [ ! -f /etc/john/john-mail.conf ]; then + echo "Couldn't find /etc/john/john-mail.conf -- stopping!" + exit 0 +fi + +if [ ! -f /etc/john/john-mail.msg ]; then + echo "Couldn't find /etc/john/john-mail.msg -- stopping!" + exit 0 +fi + +# In Debian, john should be in /usr/sbin. "john" binaries in other +# locations should not be used. +JOHNDIR=/usr/sbin + +# Let's get stuff from conf file: +SHELLS=`grep -e "^[ ]*shells[ ]*=[ ]*" /etc/john/john-mail.conf | sed "s/.*=[ ]*//"` +MAILCMD=`grep -e "^[ ]*mailcmd[ ]*=[ ]*" /etc/john/john-mail.conf | sed "s/.*=[ ]*//"` +MAILARGS=`grep -e "^[ ]*mailargs[ ]*=[ ]*" /etc/john/john-mail.conf | sed "s/.*=[ ]*//"` + +# Let's start +$JOHNDIR/john -show "$1" -shells:$SHELLS | sed -n 's/:.*//p' | +( + SENT=0 + + while read LOGIN; do + echo Sending mail to "$LOGIN"... + +# Sends a message to each user; a template is in /etc/john/john.msg +# Subject, Reply-to, and other header lines should be put +# at the top of that file. + sed -e 's/@LOGIN/'$LOGIN'/g' \ + -e 's/@HOSTNAME/'$HOSTNAME'/g' /etc/john/john-mail.msg | + $MAILCMD $MAILARGS $LOGIN + + SENT=$(($SENT+1)) + done + + if [ ! $SENT -eq 0 ]; then + echo "John has cracked $SENT passwords. If you want to see them," + echo "use john -show . (See john(1) for details)." + fi +) --- john-1.7.orig/debian/extra/john +++ john-1.7/debian/extra/john @@ -0,0 +1,14 @@ +#!/bin/bash -e + +MYNAME=john +if [ -n $0 ]; then + MYNAME=$(basename $0) +fi + +if grep -q '^flags.* mmx' /proc/cpuinfo; then + exec -a $MYNAME /usr/lib/john/john-mmx $* +else + exec -a $MYNAME /usr/lib/john/john-any $* +fi + +exit 0 --- john-1.7.orig/debian/extra/CONFIG.mailer +++ john-1.7/debian/extra/CONFIG.mailer @@ -0,0 +1,59 @@ +This version of john has two new conffiles for the mailer script: + +/etc/john/john-mail.conf +----------------------- + +This is where you define the command used to send messages to users, +and the shells to be ignored when sending the messages. A working +example is already installed. + +You can set the shells to be ignored, for example: + +shells=-,/bin/false,/dev/null,/bin/sync,/usr/bin/falselogin + +The default is set to: + +shells=-,/bin/false,/dev/null,/bin/sync + +And you may set the command used to send the message (the message +will be piped into this command): + +mailcmd=/usr/sbin/sendmail + +That is the default. If you use sendmail, or if your mailer provides +a "sendmail" executable, you may use the above line. + +And if you want to pass extra arguments to your mailer, set +mailargs: + +mailargs= ... + +The default is not to define mailargs. + +/etc/john/john-mail.msg +----------------------- + +This is the message template to be sent to the user. In the message, +the strings @LOGIN and @HOSTNAME will be substituted for the user's +login and the host name. + +If you use sendmail as mail command, you may include the headers +at the top of the template message, like this: + + +============================================================= +Subject: Gotcha! +Cc: root + +Just cracked your password for account @LOGIN at @HOSTNAME. +Please change it. + +John the Ripper. +============================================================= + +You may also use some binary of yours as the mail command; then it +will be called, and the template (with the variables already +substituted) will be piped into it. This may be useful if you want +to use complex logging (using a DBMS, for example), or if you +want to automatically run scripts (that block the account, +perhaps?) --- john-1.7.orig/debian/extra/john-mail.conf +++ john-1.7/debian/extra/john-mail.conf @@ -0,0 +1,25 @@ +# Sample configuration file for john. +# + +# These are the shells that should be ignored by john. If you +# install falselogin, for example, you may want to add it to +# the list. +shells=-,/bin/false,/dev/null,/bin/sync + +# This is the mail command. You may actually use any program +# here; the message in /etc/john/john-mail.msg will be piped into it, +# with the login name and host name substituted. +# You may want to use a program to log information about +# weak passwords (but that means sensitive information would be +# kept somewhere - be careful!) +mailcmd=/usr/sbin/sendmail + +# The passfile directive specifies a *temporary* file which will have +# the contents of /etc/passwd and /etc/shadow while the john cronjob +# is running. +# +# ***WARNING***: this will be a copy of your password file, that will +# be broken by the end of the operation. DO *NOT* PUT THE PATH FOR YOUR +# REAL PASSWORD FILE HERE, OR IT WILL BE LOST. Simply specify a location +# that is considered safe for john to put a copy of the password file. +passfile=/var/run/john/cronpasswd --- john-1.7.orig/debian/extra/cronjob +++ john-1.7/debian/extra/cronjob @@ -0,0 +1,199 @@ +#!/bin/bash +# +# This script runs every day, trying to crack passwords, and then calls +# mailer to warn the users (and maybe also root) about that. + +# One of two options should be passed to this script: +# start -- start running john +# stop -- stops running john +# The script will run/stop john (as a background process if started) +# and exit. + +# The time when the script is called can be configured in /etc/cron.d/john + +# You can pass options to john in /etc/cron.d/john. See john(1) for the possible +# options, and include them after "JOHN_OPTIONS=" below. + +JOHNDIR=/usr/sbin +PASSWD=/etc/passwd +SHADOW=/etc/shadow +RUNDIR=/var/lib/john +PIDDIR=/var/run/john +RESTORE=$RUNDIR/restore + +PASSFILE=`grep -v ^# /etc/john/john-mail.conf | grep -e "[ ]*passfile[ ]*=[ ]*" | sed -e "s/#.*//" -e "s/.*=[ ]*//" |head -1` +cd $RUNDIR + +# Gets the PID of the process that should be running john, +# and sends SIGHUP to it. +# +john_stop() +{ + + RESTOREFILE="" + if [ -f $RESTORE ]; then + RESTOREFILE=`grep ^$PASSFILE $RESTORE` + fi + + if [ -f $PIDDIR/john.pid ] + then + # Stop john, we don't really care too much about the error + # messages (just in case, the john cronjob might have finished + # its job and exited) + /sbin/start-stop-daemon --stop -q -o --pidfile $PIDDIR/john.pid 2>&1 >/dev/null + rm $PIDDIR/john.pid + else + # Try the old (deprecated) method if we don't have a piddfile + john_stop_all + fi + + + # Once finished we determine if we need to mail anything + rm -f /var/lock/john + if [ ! -z "$RESTOREFILE" -a -f "$RESTOREFILE" ] ; then + # But use the latest shadow file + TMPFILE=`mktemp $PASSFILE.XXXXXX` || exit 1 + chmod og-rwx $TMPFILE + if [ -n "$SHADOW" -a -f "$SHADOW" ]; then + $JOHNDIR/unshadow $PASSWD $SHADOW >> $TMPFILE + else + cat $PASSWD >> $TMPFILE + fi + # Move to the directory where john.pot resides + OUTPUT=`$JOHNDIR/mailer $TMPFILE 2>&1` + # Mailer mails to root if there is something relevant + # this could be done by configuring john-mail.msg too.. + if [ -n "$OUTPUT" ]; then + echo $OUTPUT + fi + rm -f $TMPFILE + fi +} + +# Gets the PID of all the processes called "john" processes, try to checks +# which one we want, and sends SIGHUP to it. +# +john_stop_all() +{ + +PID=`/bin/pidof john` +for p in $PID; do + PROCPATH=$(readlink /proc/$p/exe) + RELEVANTPATH=`echo $PROCPATH | sed -e"s^$JOHNDIR/john.*^$JOHNDIR/john^"` + if [ "$RELEVANTPATH" = $JOHNDIR/john ]; then + kill -2 $p + fi +done + +} + +# Starts john +# +john_start() +{ + +if [ -z $PASSFILE ]; then + mail -s "John cronjob is not configured yet!" root <> $TMPFILE + else + cat $PASSWD >> $TMPFILE + fi +fi + +# We capture the output of john, and check if there was a line with +# "guesses: 0" in it. If not, then either john exited abnormally, or +# passwords were guessed -- and in both cases we send all the output +# to stdout. +# +if [ ! -f /var/lock/john -a ! -f $PIDDIR/john.pid ]; then + touch /var/lock/john + + # Run john in background + # TODO: start-stop-daemon is flexible enought we could run + # it using a different user + if [ -z "$RESTORE_OPTION" ] ; then + /sbin/start-stop-daemon --start --chdir $RUNDIR -b -m \ + --pidfile $PIDDIR/john.pid --exec $JOHNDIR/john -- \ + $JOHN_OPTIONS $TMPFILE > /dev/null + else + # Note: If we are restoring the session all the options are already + # there... + /sbin/start-stop-daemon --start --chdir $RUNDIR -b -m \ + --pidfile $PIDDIR/john.pid --exec $JOHNDIR/john -- \ + $RESTORE_OPTION $JOHN_OPTIONS $TMPFILE > /dev/null + fi +else + PID=`cat $PIDDIR/john.pid` + # Redundant check (just in case) + PROCPATH=$(readlink /proc/$PID/exe) + RELEVANTPATH=`echo $PROCPATH | sed -e"s^$JOHNDIR/john.*^$JOHNDIR/john^"` + if [ "$RELEVANTPATH" = $JOHNDIR/john ]; then + mail -s "John is already running" root <&2 + exit 1 + ;; +esac + +#DEBHELPER#