Operating System - HP-UX
1826417 Members
3623 Online
109692 Solutions
New Discussion

Re: Assistance w/configuring Crack using gcc

 
SOLVED
Go to solution
Jeffrey Davis_1
Frequent Advisor

Assistance w/configuring Crack using gcc

Hi all. I'm not a programmer by nature, so bear with me. I'm trying to set up Crack5.0 and am running into a couple problems. I'm sure it's not too bad, I'm just not sure if I need to compile Crack, gcc, and/or binutils as well. I "have" looked at all the other threads&papers on this, but they haven't helped as of yet. Here's what I've done so far.
I've loaded a copy of Crack5.0 under:
"/tmp/Crack5.0/c50a"
I've loaded the following under "/opt/FAST/":
gcc-2.95.2 (Can't get ahold of C-ANSI-C)
binutils-2.9.1
From here I've done the following:
- vi'd "~/c50a/Crack" and set "CRACK_PATH" to:
/tmp/Crack5.0/c50a:/opt/FAST/gcc-2.95.2:/opt/FAST/binutils-2.9.1:/usr/local/bin:
- commented out the "cc" info and uncommented the 'gcc' stuff:
# gcc 2.7.2
CC=gcc
CFLAGS="-g -O2 -Wall $C5FLAGS"
LIBS=-lcrypt # uncomment only if necessary to use stdlib crypt(), eg: NetBSD MD5
- vi'd '/tmp/crack5.0/c50a/src/libdes/Makefile' and commented accordingly the lines for 'gcc'.
CC=gcc
CFLAGS= -O4 -fomit-frame-pointer -funroll-loops $(OPTS) $(CFLAG)
-Note: I did not do any compiling of '~/binutils or ~/gcc'. Not sure if I need to or not.
-Proceeded to do a './Crack -makeonly' and get the following messages:
------------------------------------------
# ./Crack -makeonly
Crack 5.0a: The Password Cracker.
(c) Alec Muffett, 1991, 1992, 1993, 1994, 1995, 1996
System: HP-UX nmkt B.11.00 U 9000/800 606319383 unlimited-user license
Home: /tmp/crack5.0/c50a
Invoked: ./Crack -makeonly
Option: -makeonly enabled
Stamp: hp-ux-b-9000/800

Crack: making utilities in run/bin/hp-ux-b-9000/800
find . -name "*~" -print | xargs -n50 rm -f
( cd src; for dir in * ; do ( cd $dir ; make clean ) ; done )
rm -f dawglib.o debug.o rules.o stringlib.o *~
/bin/rm -f *.o tags core rpw destest des speed libdes.a .nfs* *.old *.bak destest rpw des speed
rm -f *.o *~
`../../run/bin/hp-ux-b-9000/800/libc5.a' is up to date.
gcc -g -O2 -Wall -DUSE_STRING_H -DUSE_STDLIB_H -DUSE_SIGNAL_H -DUSE_SYS_TYPES_H -DUSE_UNISTD_H -
DUSE_PWD_H -I../lib -o ../../run/bin/hp-ux-b-9000/800/dawg dawg.c ../../run/bin/hp-ux-b-9000/800/libc5.a
-lcrypt
Make: Cannot load gcc. Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
-------------------------------------------
Any further thoughts...
8 REPLIES 8
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Assistance w/configuring Crack using gcc

Hi Jeff,

This looks to me like it is not able to find gcc in it's path. Either set the path using the PATH statement before the compilation or specify full path to gcc in your Makefile.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
someone_4
Honored Contributor

Re: Assistance w/configuring Crack using gcc

Hi,
I just did this ..with the help of this link

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x358337f45ef7d4118fef0090279cd0f9,00.html

After making thoose changes run

Crack -makeonly

then

Crack -makedict

then you are ready to go.

Crack [filename]
eg: Crack -nice 10 /etc/passwd


Richard






Jeffrey Davis_1
Frequent Advisor

Re: Assistance w/configuring Crack using gcc

Hi all. Thanks for the hint. I got the '-makeonly' to run fine.
When I run the '-makedict' it seems ok except for 2 messages.
Please advise as to wether I should be concerned with these or not.
Thanks in advance.
------------------------------------------
(ending output from './Crack -makedict')

Crack: making dictionary groups, please be patient...
doing group 1...
/tmp/crack5.0/c50a/scripts/smartcat[36]: /usr/dict/*words*: Cannot find or open the file.
doing group 2...
doing group 3...
mkdictgrps: uniq'ing dictionary groups...
group 1 and 2...
group 1 and 3...
group 2 and 3...
mkdictgrps: compressing dictionary groups...
/tmp/crack5.0/c50a/scripts/smartcomp[15]: gzip: not found.
/tmp/crack5.0/c50a/scripts/smartcomp[15]: gzip: not found.
/tmp/crack5.0/c50a/scripts/smartcomp[15]: gzip: not found.
Crack: Created new dictionaries...
Crack: makedict done
someone_4
Honored Contributor

Re: Assistance w/configuring Crack using gcc

Hi Jeff,
I dont rememeber if i got thoose errors. I know I got the first one about the *make* and it didnt seem to effect anything. What happends wwhen you try to run it?

./Crack /etc/passwd

that will make a Reporter that you can execute and see the report. What I did was make a test user and give a simple password of abc123 and it worked I saw it in the report in the "passwords cracked as of ".

Richard
Sridhar Bhaskarla
Honored Contributor

Re: Assistance w/configuring Crack using gcc

Jeff,

I have a suspecion that your dictonary used by crack is not properly built. To verify that create a user with a simple password like 'cat' and see if your crack can crack the program.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jeffrey Davis_1
Frequent Advisor

Re: Assistance w/configuring Crack using gcc

Hi. This sounds good. But all my systems are trusted. Any suggestions on running against these?
Sridhar Bhaskarla
Honored Contributor

Re: Assistance w/configuring Crack using gcc

Hi Jeffrey,

You need to modify your conf/dictgrps.conf file to replace /usr/dict with /usr/share/dict. Leave the remaining entries as they are.

As per the trusted system, the good thing about it is that an ordinary user cannot look at the encrypted passwords to crack. And when you create the system to trusted for the first time, it expires the user passwords so that users will change them to stronger passwords (ofcourse you can override this option too). If you still want to crack the passwords, you need to write a script that searches files under /tcb/files/auth in [a-b][A-B] directories, picks up the users and their passwords into a file. Then you need to join this file and /etc/passwd to get the original password file. You need to put it in a secured directory and run Crack on it otherwise it defeats the purpose of the system being trusted.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
someone_4
Honored Contributor

Re: Assistance w/configuring Crack using gcc

I dont know if you can run on a trusted system. I have not tried it .. The system I was working on was not trusted.

I went to a trusted system and went to
/tcb/files/auth
and ran crack against one of my users. I see that it did not like that file.
:(


Richard