From pa.dec.com!decwrl!uunet!sparky!kent Sun Nov 24 12:49:46 PST 1991 Article: 3140 of comp.sources.misc Newsgroups: comp.sources.misc Path: pa.dec.com!decwrl!uunet!sparky!kent From: aem@uk.ac.amber (Alec David Edward Muffett) Subject: v26i051: crack - The Password Cracker, version 4.0a, Patch01 Message-ID: <1991Nov24.050909.5353@sparky.imd.sterling.com> Followup-To: comp.sources.d X-Md4-Signature: aa54ae597617eb0dce6ff71df53368cb Sender: kent@sparky.imd.sterling.com (Kent Landfield) Organization: Sterling Software, IMD Date: Sun, 24 Nov 1991 05:09:09 GMT Approved: kent@sparky.imd.sterling.com Lines: 278 Submitted-by: aem@uk.ac.amber (Alec David Edward Muffett) Posting-number: Volume 26, Issue 51 Archive-name: crack/patch01 Environment: UNIX Patch-To: crack: Volume 25, Issue 5-9 This is patch number 1 to Crack v4.0a - The Unix Password Cracker. It brings the version number up to v4.0b. This patch fixes a number of annoying bugs and incompatibilities for SV and HP_UX systems, as detailed in the BUGS file. It also adds a note regarding use of the Crack dictionary generation language to "Scripts/dicts.rules" - I suggest that you read this a.s.a.p. To apply these patches:- Extract this message into a file, "cd" to the Crack v4.0a directory, and type: patch -p1 < filename - alec INET: aem@aber.ac.uk JANET: aem@uk.ac.aber BITNET: aem%aber@ukacrl UUCP: ...!mcsun!ukc!aber!aem ARPA: aem%uk.ac.aber@nsfnet-relay.ac.uk NAME: Alec David Edward Muffett, Unix Security Guru and avid Whisky Drinker. diff -rc ../crack40a/BUGS ./BUGS *** ../crack40a/BUGS Mon Nov 18 10:27:14 1991 --- ./BUGS Fri Nov 8 10:51:07 1991 *************** *** 1,11 **** ! Bugs as of 24th October 1991:- - * Scripts/do_join: have removed the 'spot the short passwd' - functionality since awk was producing some weird errors to do with not - having enough fields to printf(). It's being silly, because one of the - values is undefined (ie: $3 is NULL. What the hell, it's replicated in - crack-pwc.c, anyway... nobody should miss it... - * Crack: is known to occasionally hang during a "Crack -network" whilst rshing from machine to machine on some architectures. It's a persistent problem at some sites, when Crack rsh'es to a particular machine and --- 1,5 ---- ! Bugs as of 7th November 1991:- * Crack: is known to occasionally hang during a "Crack -network" whilst rshing from machine to machine on some architectures. It's a persistent problem at some sites, when Crack rsh'es to a particular machine and *************** *** 14,16 **** --- 8,21 ---- FIX: mark machines that hang Crack with the "-f" option in network.conf file - then the 'rsh' will be backgrounded and Crack will continue to the next machine. + + * crack-pwc.c: had sprintf("string", args...) instead of sprintf(buffer, + "string", args...) which mucked up the 'nastygrams'... Fixed in 4.0b + + * Scripts/RCrack: Hewlett-Packards return HP_UX not HP-UX, or vice + versa. I now match HP*UX in order to bypass this. Fixed in 4.0b + + * Sources/crack.h: defined gethostname() as "char *" not "int", and + clashed with correct declaration in "crack-port.c". Fixed in 4.0b. + + * Sources/speeds.c: downgraded "#elif" into multiple "#ifdef"s - v4.0b diff -rc ../crack40a/Crack ./Crack *** ../crack40a/Crack Mon Nov 18 11:37:10 1991 --- ./Crack Thu Nov 7 14:41:44 1991 *************** *** 49,55 **** ############### FROM HERE ON IN IT'S ALL MY FAULT ############### ### ! version="4.0a RELEASE" # version number pwl="" # user specified domail="" # user specified fgnd="" # user specified --- 49,55 ---- ############### FROM HERE ON IN IT'S ALL MY FAULT ############### ### ! version="4.0b RELEASE" # version number pwl="" # user specified domail="" # user specified fgnd="" # user specified Common subdirectories: ../crack40a/DictSrc and ./DictSrc Common subdirectories: ../crack40a/Dicts and ./Dicts Common subdirectories: ../crack40a/Docs and ./Docs Common subdirectories: ../crack40a/Runtime and ./Runtime Common subdirectories: ../crack40a/Scripts and ./Scripts Common subdirectories: ../crack40a/Sources and ./Sources diff -rc ../crack40a/DictSrc/bad_pws.dat ./DictSrc/bad_pws.dat *** ../crack40a/DictSrc/bad_pws.dat Mon Nov 18 11:37:17 1991 --- ./DictSrc/bad_pws.dat Thu Nov 7 15:25:01 1991 *************** *** 1,3 **** --- 1,7 ---- + animal + creator + mac + shark Bongpoo 0 1 diff -rc ../crack40a/Scripts/RCrack ./Scripts/RCrack *** ../crack40a/Scripts/RCrack Mon Nov 18 11:37:25 1991 --- ./Scripts/RCrack Thu Nov 7 14:41:45 1991 *************** *** 23,29 **** ### case $machine in ! "HP_UX") # Hewlett Packard boxen remote_shell="remsh" ;; # "XENIX"|"Xenix") # Just a suggestion... --- 23,29 ---- ### case $machine in ! "HP*UX") # Hewlett Packard boxen remote_shell="remsh" ;; # "XENIX"|"Xenix") # Just a suggestion... diff -rc ../crack40a/Scripts/dicts.rules ./Scripts/dicts.rules *** ../crack40a/Scripts/dicts.rules Mon Nov 18 10:27:36 1991 --- ./Scripts/dicts.rules Thu Nov 7 16:11:34 1991 *************** *** 18,23 **** --- 18,27 ---- # xnm = extract substring from position n for m characters # u = force word uppercase ### + # A lot of people haven't realised that the above is a complete + # description language; ie: if you want to create a dictionary of short + # words with "123" appended, use "<6l$1$2$3" - see ? + ### # Here we go... ### l diff -rc ../crack40a/Sources/crack-pwc.c ./Sources/crack-pwc.c *** ../crack40a/Sources/crack-pwc.c Mon Nov 18 11:38:37 1991 --- ./Sources/crack-pwc.c Thu Nov 7 14:55:23 1991 *************** *** 18,24 **** * will. */ ! char version[] = "4.0a"; /* version of prog */ char runtime[] = "Runtime"; char feedback_string[] = "!fb!"; char rulefile[] = "Scripts/dicts.rules"; --- 18,24 ---- * will. */ ! char version[] = "4.0b"; /* version of prog */ char runtime[] = "Runtime"; char feedback_string[] = "!fb!"; char rulefile[] = "Scripts/dicts.rules"; *************** *** 106,112 **** { char dobuff[STRINGSIZE]; ! sprintf ("%s %s", nastygram, eptr -> passwd.pw_name); system (dobuff); } } --- 106,112 ---- { char dobuff[STRINGSIZE]; ! sprintf (dobuff, "%s %s", nastygram, eptr -> passwd.pw_name); system (dobuff); } } *************** *** 118,124 **** /* bury magnets */ /* swallow the rapture */ /* let's gather feathers */ ! /* don't fall on me - from 'Fall in Me' by R.E.M. */ Log ("Caught a SIGTERM! Commiting suicide...\n"); Log ("\n"); sync (); --- 118,124 ---- /* bury magnets */ /* swallow the rapture */ /* let's gather feathers */ ! /* don't fall on me - from 'Fall on Me' by R.E.M. */ Log ("Caught a SIGTERM! Commiting suicide...\n"); Log ("\n"); sync (); diff -rc ../crack40a/Sources/crack.h ./Sources/crack.h *** ../crack40a/Sources/crack.h Mon Nov 18 11:37:52 1991 --- ./Sources/crack.h Fri Nov 8 10:36:39 1991 *************** *** 17,23 **** extern char *Lowercase (); extern char *Clone (); extern char *Mangle (); ! extern char *gethostname (); #ifdef FAST_TOCASE #define toupper(x) _toupper(x) --- 17,23 ---- extern char *Lowercase (); extern char *Clone (); extern char *Mangle (); ! extern int gethostname (); #ifdef FAST_TOCASE #define toupper(x) _toupper(x) diff -rc ../crack40a/Sources/speeds.c ./Sources/speeds.c *** ../crack40a/Sources/speeds.c Mon Nov 18 10:28:06 1991 --- ./Sources/speeds.c Fri Nov 8 10:42:10 1991 *************** *** 21,33 **** { printf ("Did %f %s()s per second.\n", ((float) cnt) / ((float) ITIME), ! #if defined(T1) "fcrypt" ! #elif defined(T2) "XForm" #else "crypt" #endif ); exit (0); } --- 21,35 ---- { printf ("Did %f %s()s per second.\n", ((float) cnt) / ((float) ITIME), ! #ifdef T1 "fcrypt" ! #else ! #ifdef T2 "XForm" #else "crypt" #endif + #endif ); exit (0); } *************** *** 51,62 **** for (cnt = 0;; cnt++) { ! #if defined(T1) fcrypt ("fredfred", "eek"); ! #elif defined(T2) XForm (quarters, 0); #else crypt ("fredfred", "eek"); #endif } } --- 53,66 ---- for (cnt = 0;; cnt++) { ! #ifdef T1 fcrypt ("fredfred", "eek"); ! #else ! #ifdef T2 XForm (quarters, 0); #else crypt ("fredfred", "eek"); + #endif #endif } } exit 0 # Just in case...